/* Bible Verses Today — design tokens and components.
   Source of truth: docs/design/homepage-handoff.md (high fidelity: colours, type, spacing are final). */

@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/eb-garamond-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/eb-garamond-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'EB Garamond'; font-style: italic; font-weight: 400; font-display: swap; src: url('/fonts/eb-garamond-latin-400-italic.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'EB Garamond'; font-style: italic; font-weight: 400; font-display: swap; src: url('/fonts/eb-garamond-latin-ext-400-italic.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/eb-garamond-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/hanken-grotesk-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/hanken-grotesk-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/hanken-grotesk-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/hanken-grotesk-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #F7F3EA;
  --panel: #EFE7D6;
  --field: #FBF8F1;
  --navy: #1F2A44;
  --navy-hover: #2C3A5C;
  --verse: #1A2340;
  --latin: #39425A;
  --text-2: #3a4358;
  --text-3: #4a5060;
  --text-4: #5b6170;
  --placeholder: #8a8576;
  --gold-text: #6B5A2E;
  --gold-rule: #C2A660;
  --gold-ornament: #A8873A;
  --hairline: #E5DCC8;
  --control: #CFC3A6;
  --error: #8C2F1B;
  --serif: 'EB Garamond', Garamond, 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --pad: clamp(20px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--navy); font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
::placeholder { color: var(--placeholder); opacity: 1; }
[hidden] { display: none !important; }
.sc { font-variant: small-caps; font-variant-caps: small-caps; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.no-js .js-only { display: none !important; }

.skip { position: absolute; left: 12px; top: -60px; background: var(--navy); color: var(--bg); padding: 10px 16px; border-radius: 6px; z-index: 10; }
.skip:focus { top: 12px; }

.env-banner { background: var(--navy); color: var(--bg); font-size: 13px; text-align: center; padding: 6px var(--pad); }

/* Header */
.site-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 24px var(--pad); border-bottom: 1px solid var(--hairline); }
.wordmark { font-family: var(--serif); font-size: 22px; letter-spacing: .02em; }
.wordmark:hover { text-decoration: none; }
.wordmark em { font-style: italic; }
.site-nav { display: flex; flex-wrap: wrap; gap: clamp(18px, 3vw, 36px); font-size: 15px; color: var(--text-2); }
.site-nav a[aria-current='page'] { color: var(--navy); text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--gold-rule); }

/* Verse hero */
.verse { display: flex; flex-direction: column; align-items: center; padding: clamp(56px, 9vw, 96px) var(--pad) clamp(56px, 8vw, 88px); gap: clamp(28px, 4vw, 40px); }
.eyebrow { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-text); margin: 0; font-weight: 400; }
.dateline { display: flex; align-items: center; gap: 18px; text-align: center; }
.dateline::before, .dateline::after { content: ''; width: 48px; height: 1px; background: var(--gold-rule); flex: none; }
.verse-text { margin: 0; max-width: 820px; text-align: center; font-family: var(--serif); font-size: clamp(30px, 4.6vw, 50px); line-height: 1.28; text-wrap: pretty; color: var(--verse); }
.verse-text.long { font-size: clamp(26px, 3.6vw, 40px); line-height: 1.32; }
.verse-text.longer { font-size: clamp(23px, 2.9vw, 32px); line-height: 1.38; }
.verse-ref { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.verse-ref .ref { font-family: var(--serif); font-size: 22px; letter-spacing: .14em; text-transform: uppercase; font-style: normal; }
.verse-ref .edition { font-size: 14px; color: var(--text-4); }
.latin { display: none; flex-direction: column; align-items: center; gap: 18px; max-width: 680px; }
html[data-latin='1'] .latin { display: flex; }
.latin .ornament { font-family: var(--serif); color: var(--gold-ornament); font-size: 18px; letter-spacing: .6em; margin-right: -.6em; }
.latin-text { margin: 0; text-align: center; font-family: var(--serif); font-style: italic; font-size: clamp(22px, 3vw, 30px); line-height: 1.4; color: var(--latin); text-wrap: pretty; }
.latin .caption { font-size: 14px; color: var(--text-4); text-align: center; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; font-size: 15px; }
.pill { display: inline-block; color: var(--navy); background: transparent; border: 1px solid var(--control); border-radius: 999px; padding: 10px 20px; line-height: 1.5; }
.pill:hover { background: var(--panel); text-decoration: none; }
.context-note { margin: 8px 0 0; max-width: 560px; text-align: center; font-size: 16px; line-height: 1.65; color: var(--text-3); text-wrap: pretty; }
.day-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 32px; font-size: 15px; color: var(--text-2); }

/* Signup panel */
.signup-wrap { max-width: 1072px; margin: 0 auto; padding: 0 var(--pad); width: 100%; }
.signup { padding: clamp(36px, 6vw, 64px) clamp(20px, 5vw, 64px); background: var(--panel); display: flex; flex-direction: column; align-items: center; gap: 28px; border-radius: 4px; }
.signup h2, .signup h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.4vw, 36px); line-height: 1.2; text-align: center; text-wrap: balance; }
.signup .sub { margin: -12px 0 0; font-size: 16px; color: var(--text-3); text-align: center; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
.email-row { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; max-width: 560px; }
.input { flex: 1 1 240px; min-width: 0; font-size: 16px; padding: 14px 18px; border: 1px solid var(--control); background: var(--field); border-radius: 6px; color: var(--navy); }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231F2A44' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.btn { flex: 0 0 auto; font-size: 16px; font-weight: 500; padding: 14px 24px; background: var(--navy); color: var(--bg); border: 0; border-radius: 6px; line-height: 1.5; display: inline-block; text-align: center; }
.btn:hover { background: var(--navy-hover); text-decoration: none; }
.btn[disabled] { opacity: .7; cursor: default; }
.btn.quiet { background: transparent; color: var(--navy); border: 1px solid var(--control); padding: 13px 23px; }
.btn.quiet:hover { background: var(--panel); }
.signup .btn.quiet:hover { background: var(--field); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); text-align: left; }
.check input { accent-color: var(--navy); width: 16px; height: 16px; flex: none; margin: 0; }
.fine { font-size: 13px; color: var(--text-4); text-align: center; margin: 0; }
.fine a, .prose a, .note a, .footer-note a { text-decoration: underline; text-underline-offset: 3px; }
.form-error { margin: 0; padding: 12px 16px; border: 1px solid var(--error); border-radius: 6px; color: var(--error); background: var(--field); font-size: 15px; max-width: 560px; width: 100%; }
.form-ok { margin: 0; padding: 12px 16px; border: 1px solid var(--control); border-radius: 6px; background: var(--field); font-size: 15px; max-width: 560px; width: 100%; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Full forms (subscribe, preferences) */
.form { display: flex; flex-direction: column; gap: 28px; width: 100%; max-width: 640px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field > legend, .legend { font-size: 15px; font-weight: 500; color: var(--navy); padding: 0; }
.field .hint { font-size: 14px; color: var(--text-4); margin: 0; }
.field .input { flex: none; width: 100%; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.radios { display: flex; flex-direction: column; gap: 10px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.linkish { background: none; border: 0; padding: 0; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; font-size: 15px; }
.linkish.danger { color: var(--error); }
.status-line { font-size: 15px; color: var(--text-3); margin: 0; }
.status-line strong { color: var(--navy); font-weight: 600; }

/* Topic directory */
.directory { padding: clamp(56px, 8vw, 80px) var(--pad) 64px; display: flex; flex-direction: column; align-items: center; gap: 32px; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); column-gap: 48px; width: 100%; max-width: 900px; font-family: var(--serif); font-size: 21px; margin: 0; padding: 0; list-style: none; }
.topic-grid a { display: block; padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.more { font-size: 15px; color: var(--text-2); }

/* Inner pages */
.page { padding: clamp(48px, 7vw, 80px) var(--pad) clamp(48px, 7vw, 72px); display: flex; flex-direction: column; align-items: center; gap: clamp(24px, 3.5vw, 36px); }
.page-head { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; max-width: 760px; }
.page h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4.4vw, 46px); line-height: 1.16; color: var(--verse); text-wrap: balance; }
.lede { margin: 0; font-size: 18px; line-height: 1.65; color: var(--text-3); max-width: 620px; text-wrap: pretty; }
.prose { width: 100%; max-width: 660px; font-size: 17px; line-height: 1.7; color: var(--text-2); }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.1em; text-wrap: pretty; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.25; color: var(--verse); margin: 1.8em 0 .5em; }
.prose h3 { font-family: var(--sans); font-weight: 600; font-size: 17px; color: var(--navy); margin: 1.6em 0 .4em; }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.prose li { margin-bottom: .45em; }
.prose dl { margin: 0 0 1.1em; }
.prose dt { font-weight: 600; color: var(--navy); margin-top: 1em; }
.prose dd { margin: .2em 0 0; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82em; overflow-wrap: anywhere; }
.note { width: 100%; max-width: 660px; background: var(--panel); border-radius: 4px; padding: 18px 22px; font-size: 15px; line-height: 1.65; color: var(--text-2); margin: 0; }

/* Topic page passages */
.passages { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 720px; display: flex; flex-direction: column; }
.passage { padding: clamp(28px, 4vw, 40px) 0; border-bottom: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 14px; }
.passage:first-child { border-top: 1px solid var(--hairline); }
.passage blockquote { margin: 0; font-family: var(--serif); font-size: clamp(22px, 2.6vw, 27px); line-height: 1.36; color: var(--verse); text-wrap: pretty; }
.passage .ref-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.passage .ref { font-family: var(--serif); font-size: 18px; letter-spacing: .14em; text-transform: uppercase; }
.passage .edition { font-size: 13px; color: var(--text-4); }
.passage .latin { align-items: flex-start; gap: 6px; max-width: none; }
.passage .latin-text { text-align: left; font-size: clamp(18px, 2.1vw, 21px); }
.passage .latin .caption { font-size: 13px; text-align: left; }
.passage .p-note { margin: 0; font-size: 15px; line-height: 1.65; color: var(--text-3); }
.passage .p-actions { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; color: var(--text-2); }
.passage .p-actions button { background: none; border: 0; padding: 0; color: inherit; }
.passage .p-actions button:hover { text-decoration: underline; text-underline-offset: 3px; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; font-size: 15px; }
.topic-list { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 900px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 48px; }
.topic-list li { padding: 20px 0; border-bottom: 1px solid var(--hairline); }
.topic-list a { font-family: var(--serif); font-size: 23px; line-height: 1.25; }
.topic-list p { margin: 6px 0 0; font-size: 15px; line-height: 1.55; color: var(--text-3); }
.related { display: flex; flex-direction: column; align-items: center; gap: 20px; width: 100%; }
.tag-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* Read in context */
.context { width: 100%; max-width: 660px; display: flex; flex-direction: column; gap: 18px; scroll-margin-top: 24px; }
.context h2 { margin: 0; text-align: center; }
.chapter { font-family: var(--serif); font-size: 20px; line-height: 1.6; color: var(--text-2); }
.chapter p { margin: 0 0 .9em; }
.chapter .q { display: block; }
.chapter .ch-title { font-family: var(--sans); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-4); margin: 1.6em 0 .8em; }
.chapter .super { font-style: italic; color: var(--text-4); }
.chapter sup { font-family: var(--sans); font-size: 11px; color: var(--text-4); margin-right: 3px; vertical-align: .5em; line-height: 0; }
.chapter mark { background: #EDE2C4; color: var(--verse); padding: 1px 0; box-shadow: 3px 0 0 #EDE2C4, -3px 0 0 #EDE2C4; }

/* Saved */
.saved-empty { color: var(--text-3); text-align: center; max-width: 520px; margin: 0; }

/* Dev mailbox */
.mail { width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 20px; }
.mail article { border: 1px solid var(--hairline); border-radius: 4px; background: var(--field); }
.mail header { padding: 12px 16px; border-bottom: 1px solid var(--hairline); font-size: 14px; color: var(--text-3); }
.mail pre { margin: 0; padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.55; }

/* Footer */
.site-footer { padding: 36px var(--pad); border-top: 1px solid var(--hairline); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 32px; font-size: 13px; color: var(--text-4); }
.footer-note { max-width: 560px; line-height: 1.6; margin: 0; }
.footer-nav { display: flex; gap: 12px 24px; flex-wrap: wrap; align-content: flex-start; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media print {
  .site-nav, .actions, .signup-wrap, .directory, .footer-nav, .toolbar, .p-actions, .env-banner { display: none !important; }
  body { background: #fff; }
  .latin { display: flex; }
}
