/* I Have Crayon: "Printables Library" (design C, dennis/Misc#89). One stylesheet for every page. */
:root {
  --ink: #14213d; --ink-2: #5a6478; --ground: #f4f5f7; --paper: #ffffff; --line: #d9dde5; --line-2: #e6e9ef;
  --accent: #ffd23f; --link-hover: #0b5bd3;
  --wide: 1260px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: "Archivo", system-ui, sans-serif; font-size: 17px; line-height: 1.5; }
a { color: var(--ink); }
a:hover { color: var(--link-hover); }
img { max-width: 100%; height: auto; }
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--link-hover); outline-offset: 2px; }
.narrow { font-family: "Archivo Narrow", "Archivo", sans-serif; }

/* Header */
.site-head { background: var(--accent); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-top: 14px; padding-bottom: 14px; }
.logo { text-decoration: none; font-weight: 800; font-size: 24px; letter-spacing: -0.01em; white-space: nowrap; }
.search { flex: 1 1 320px; display: flex; min-width: 0; }
.search input { flex: 1; min-width: 0; font: inherit; padding: 12px 14px; border: 2px solid var(--ink); border-right: 0; background: var(--paper); color: var(--ink); border-radius: 0; }
.search button { font: inherit; font-weight: 800; padding: 12px 18px; border: 2px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; }
.main-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.main-nav a { text-decoration: none; font-family: "Archivo Narrow", sans-serif; font-weight: 700; font-size: 17px; text-transform: uppercase; padding: 10px 0; }
.main-nav a[aria-current] { box-shadow: inset 0 -3px 0 var(--ink); }

/* Topic strip */
.topics { background: var(--paper); border-bottom: 1px solid var(--line); }
.topics .wrap { display: flex; gap: 8px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: thin; }
.chip { flex: 0 0 auto; text-decoration: none; font-size: 15px; font-weight: 600; padding: 8px 12px; border: 1px solid var(--line); background: var(--paper); white-space: nowrap; }
.chip[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip span { color: var(--ink-2); font-weight: 400; margin-left: 4px; }
.chip[aria-current] span { color: #cfd6e4; }

/* Layout */
.page { padding-top: 24px; padding-bottom: 64px; }
.crumbs { font-size: 15px; color: var(--ink-2); margin: 0 0 18px; }
.crumbs a { color: var(--ink-2); }
.list-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; margin-bottom: 18px; }
.list-head h1 { margin: 0; font-weight: 800; font-size: 34px; line-height: 1.1; letter-spacing: -0.01em; }
.list-head p { margin: 0; color: var(--ink-2); font-size: 15px; }
.lead { margin: -6px 0 22px; max-width: 70ch; color: #2c3550; }

h2.section { font-weight: 800; font-size: 24px; margin: 28px 0 12px; }
.list-head + .lead + section h2.section, .list-head + section h2.section { margin-top: 8px; }
.topics-grid .card img { aspect-ratio: 16 / 10; }
.supplies { margin-top: 28px; background: var(--paper); border: 1px solid var(--line); padding: 14px 18px; }
.side .supplies { margin-top: 0; }
.supplies h2 { margin: 0 0 8px; font-family: "Archivo Narrow", sans-serif; text-transform: uppercase; font-size: 16px; letter-spacing: 0.04em; }
.supplies ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.supplies li a { display: inline-block; padding: 8px 0; }
.supplies .disclose { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
.supplies .disclose a { color: var(--ink-2); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 18px; }
.card { background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; }
.card > a:first-child { display: block; background: #fff; text-decoration: none; }
.card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-bottom: 1px solid var(--line); }
.card .noimg { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; padding: 16px; border-bottom: 1px solid var(--line); background: #fffbe8; font-weight: 800; font-size: 26px; text-align: center; color: var(--ink); }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .title { text-decoration: none; font-weight: 600; line-height: 1.3; }
.card .meta { font-size: 14px; color: var(--ink-2); }
.card .actions { margin-top: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; text-decoration: none; text-align: center; font: inherit; font-weight: 800; font-size: 14px; letter-spacing: 0.02em; padding: 10px 8px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; text-transform: uppercase; }
.btn:hover { color: var(--ink); background: #fff6cf; }
.btn.primary { background: var(--accent); }
.btn.primary:hover { background: #ffc800; }
.btn.dark { background: var(--ink); color: #fff; }

.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.pager a, .pager span { min-width: 44px; height: 44px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--paper); text-decoration: none; }
.pager [aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 800; }
.pager .gap { border: 0; background: none; min-width: 20px; padding: 0; }


/* Item page */
.item { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.viewer { flex: 999 1 520px; min-width: 0; background: var(--paper); border: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.viewer figure { margin: 0; }
.viewer #sheet { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: #fff; }
.viewer figcaption { font-size: 14px; color: var(--ink-2); margin-top: 8px; }
.sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.sheets a { display: block; border: 2px solid var(--line); background: #fff; padding: 0; }
.sheets a[aria-current="true"] { border-color: var(--ink); }
.sheets img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.side h1 { margin: 0; font-weight: 800; font-size: 38px; line-height: 1.08; letter-spacing: -0.01em; }
.side .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.side .actions .btn { font-size: 16px; padding: 14px 8px; }
.side .actions.one { grid-template-columns: 1fr; }
.side .actions.one[hidden], .side .actions.one:has(> [hidden]:only-child) { display: none; }
.pdfs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pdfs .btn { font-size: 15px; }
.verse { margin: 0; padding: 16px 18px; background: var(--paper); border: 1px solid var(--line); font-size: 19px; line-height: 1.5; }
.verse cite { display: block; margin-top: 8px; font-size: 14px; font-style: normal; color: var(--ink-2); }
.specs { border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); font-size: 16px; width: 100%; }
.specs th { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line-2); font-family: "Archivo Narrow", sans-serif; text-transform: uppercase; font-size: 14px; color: var(--ink-2); width: 40%; font-weight: 700; }
.specs td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 0; }
.about { background: var(--paper); border: 1px solid var(--line); padding: 4px 16px; }
.about summary { font-weight: 600; cursor: pointer; padding: 12px 0; min-height: 44px; }
.about .prose { padding-bottom: 12px; }
.prose { max-width: 72ch; }
.prose h2 { font-size: 22px; margin: 22px 0 6px; }
.prose h3 { font-size: 18px; margin: 18px 0 4px; }
.prose p, .prose li { margin: 0 0 10px; }
.prose blockquote { margin: 12px 0; padding-left: 14px; border-left: 3px solid var(--accent); }
.seq { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; border-top: 1px solid var(--line); padding-top: 12px; }
.seq a { padding: 10px 0; }
.related { margin-top: 36px; }
.related h2 { font-weight: 800; font-size: 26px; margin: 0 0 14px; }

/* A–Z */
.az-letters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.az-letters a { min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--paper); text-decoration: none; font-weight: 800; }
.az h2 { font-weight: 800; font-size: 28px; margin: 28px 0 10px; scroll-margin-top: 12px; }
.az ul { list-style: none; margin: 0; padding: 0; columns: 3 16rem; column-gap: 28px; }
.az li { break-inside: avoid; padding: 4px 0; }

/* Plain pages and search */
.plain { background: var(--paper); border: 1px solid var(--line); padding: 24px 28px; }
.plain h1 { margin-top: 0; font-size: 34px; }
.search-page .pagefind-ui { --pagefind-ui-scale: 0.9; --pagefind-ui-primary: #14213d; --pagefind-ui-text: #14213d; --pagefind-ui-background: #ffffff; --pagefind-ui-border: #d9dde5; --pagefind-ui-tag: #f4f5f7; --pagefind-ui-border-radius: 0; --pagefind-ui-font: "Archivo", system-ui, sans-serif; }

/* Footer */
.site-foot { background: var(--ink); color: #d5dbe7; margin-top: 0; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding-top: 32px; padding-bottom: 32px; font-size: 15px; }
.site-foot a { color: #d5dbe7; }
.site-foot a:hover { color: #fff; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.subscribe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.subscribe label { color: #fff; font-weight: 600; }
.subscribe input[type=email] { font: inherit; padding: 10px 12px; border: 0; min-width: 0; flex: 1 1 200px; }
.subscribe button { font: inherit; font-weight: 800; padding: 10px 16px; border: 0; background: var(--accent); color: var(--ink); cursor: pointer; min-height: 44px; }
.fine { width: 100%; font-size: 13px; color: #aab3c5; margin: 0; }

@media (max-width: 560px) {
  .list-head h1 { font-size: 28px; }
  .side h1 { font-size: 30px; }
  .viewer { padding: 12px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card .body { padding: 10px; }
  .card .actions { grid-template-columns: 1fr; }
}

/* Print: only the current sheet, filling a US letter page. */
@page { size: letter portrait; margin: 0.35in; }
@media print {
  body { background: #fff; }
  body > :not(main), main > :not(.item), .item > :not(.viewer), .viewer > :not(figure), .viewer figcaption, script { display: none !important; }
  main, .item, .viewer, .viewer figure { display: block; margin: 0; padding: 0; border: 0; background: none; }
  #sheet { display: block; width: 100%; height: 9.6in; max-width: none; object-fit: contain; aspect-ratio: auto; break-inside: avoid; }
}
