/* Faith Quote: one stylesheet for the whole site. Large type, the brand's colours, light only.
   Class names here are a contract: pages and features use them, so rename nothing without a search.

   How it is meant to feel: a well-set page of a book. Scripture is in a serif face (Newsreader) at a generous
   size; headings and the name are in Fraunces; what you read around the scripture and what you tap (the menu,
   buttons, labels, small print) is in a plain sans face (Inter). The three typefaces are served from /fonts.
   Written for a 375px phone first: one column. On a wide screen the top and foot of the page spread out, and the
   home page, a day and a verse get a second column beside the reading (see "Wide pages" below). Plain pages of
   writing stay one reading column in the middle. Nothing moves. */

@font-face { font-family: "Fraunces"; src: url("/fonts/fraunces-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  /* Light only (Kyle, November 12): a dark background does not suit the site, so it ignores the device's dark setting. */
  color-scheme: light;
  /* The brand's colours (Kyle, November 12): a white page, deep blue for words and buttons, gold for shapes,
     amber for small labels, and a pale warm tint for panels. Gold is never used for text. */
  --bg: #ffffff;
  --surface: #fff8e8;
  --ink: #14324a;
  --muted: #3f5568;
  --line: #ece3cd;
  --brand: #14324a;
  --brand-ink: #ffffff;
  --accent: #8a5a00;
  --gold: #f2b33d;
  --good: #1f6b3a;
  --bad: #a12d2d;
  --radius: 12px;
  --measure: 36rem;
  /* The widest a page gets: the top, the foot, and pages with a side column. */
  --page: 64rem;
  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.65; }
strong, b { font-weight: 600; }
a { color: var(--brand); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.25; margin: 0; font-weight: 600; text-wrap: balance; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
p { margin: 0; text-wrap: pretty; }
blockquote, figure { margin: 0; }
/* Plain lists inside written pages (About, Privacy). Lists with a class of their own set their own spacing. */
article ul:not([class]), article ol:not([class]) { margin-bottom: 0; padding-left: 1.3rem; }
article ul:not([class]) > li + li, article ol:not([class]) > li + li { margin-top: 0.35rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85em; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 0.05em 0.3em; }
[id] { scroll-margin-top: 1rem; }

/* What you tap and the small print: plain sans, so it stays clear at a small size. */
nav, label, button, input, select, textarea, summary, figcaption, dt, th { font-family: var(--sans); }

.skip { position: absolute; left: -999px; font-family: var(--sans); }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: 0.5rem 1rem; z-index: 10; }

/* Shown only on the staging copy. */
.staging-note { margin: 0; padding: 0.45rem 1rem; background: var(--ink); color: #ffffff; font-size: 0.8rem; text-align: center; }
.staging-note a { color: #ffffff; }

/* The top of every page. On a phone: the name and a search button, then the menu in a row that slides
   sideways. On a wide screen: the name, the menu and a search box in one line. */
.site-header { border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.site-header-in { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1rem; max-width: var(--page); margin: 0 auto; padding: 0.6rem 1rem 0.2rem; }
.brand { font-family: var(--display); font-size: 1.45rem; font-weight: 600; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; white-space: nowrap; }
.brand-mark { width: 2.1rem; height: 2.1rem; flex: none; }
.brand-name { line-height: 1; }
.brand-i { position: relative; display: inline-block; }
/* The rays sit where the dot of the i would be, a little above the letter. */
.brand-i svg { position: absolute; left: 50%; top: -0.13em; width: 0.56em; height: 0.4em; margin-left: -0.28em; }
.search-link { margin-left: auto; display: inline-grid; place-items: center; width: 44px; height: 44px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; }
.search-link[aria-current="page"] { border-color: var(--ink); }
.site-header nav { order: 3; flex: 1 0 100%; display: flex; gap: 0 1.15rem; overflow-x: auto; white-space: nowrap; font-size: 0.85rem; scrollbar-width: none; }
.site-header nav::-webkit-scrollbar { display: none; }
.site-header nav a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.site-header nav a:hover { color: var(--ink); text-decoration: underline; }
.site-header nav a[aria-current="page"] { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.4em; }
.site-search { display: none; }
.site-search input[type="search"] { flex: 1 1 auto; min-width: 0; background: var(--bg); font-size: 0.85rem; }
.site-search button { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--brand); color: var(--brand-ink); cursor: pointer; }

main { max-width: var(--measure); margin: 0 auto; padding: 0.5rem 1rem 3.5rem; }
main.wide { max-width: var(--page); }

/* The foot of every page: four short lists of links, two across on a phone and four on a wide screen. */
.site-footer { border-top: 1px solid var(--line); background: #f7f9fa; color: var(--muted); font-family: var(--sans); font-size: 0.85rem; }
.site-footer-in { max-width: var(--page); margin: 0 auto; padding: 1.5rem 1rem 2.5rem; }
.footer-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; margin-bottom: 1rem; }
.footer-cols nav { display: grid; align-content: start; }
.footer-cols h2 { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.footer-cols a { display: inline-flex; align-items: center; min-height: 44px; }

/* Wide pages: the reading on the left and a side column on the right. On a phone the side column comes after
   the reading, so nothing is ever beside the verse on a small screen. */
.with-rail { display: grid; gap: 2.5rem; }
.with-rail > * { min-width: 0; }
.rail { display: grid; gap: 1.25rem; align-content: start; }
/* A plain box: white, with a thin line round it. (.card is the tinted one.) */
.tile { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem 1.25rem; }
.tile > * + * { margin-top: 0.6rem; }
.tiles { display: grid; gap: 1rem; }
.tiles > * { min-width: 0; }
/* The small word above a box's contents: "TODAY'S BIBLE QUESTION". */
.label { font-family: var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.label a { color: inherit; }
.more { font-family: var(--sans); font-size: 0.9rem; font-weight: 600; }
.more a, a.more { display: inline-block; padding: 0.45rem 0; }
/* Which part of a six-part story today is. */
.steps { display: flex; gap: 0.3rem; }
.steps > span { width: 1.7rem; height: 0.35rem; border-radius: 999px; background: var(--line); }
.steps > .done { background: var(--brand); }
/* The week at a glance: days that have run are links, today is marked, days to come show no verse. */
.week-list { list-style: none; margin: 0; padding: 0; }
.week-list li { margin: 0; }
.week-list li > a, .week-list li > span { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; min-height: 44px; padding: 0.3rem 0.6rem; border-radius: 8px; font-family: var(--sans); font-size: 0.85rem; text-decoration: none; }
.week-list li > a:hover { background: var(--surface); }
.week-list .is-today { background: var(--surface); font-weight: 600; }
.week-list .to-come { color: var(--muted); }
.week-list .when { color: var(--muted); font-weight: 400; }
/* The signup box in the side column: dark, so it is the one thing there that stands out. */
.card.signup-dark { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.card.signup-dark .muted { color: #dce5eb; }
.card.signup-dark input[type="email"] { background: #ffffff; border-color: #ffffff; }
.card.signup-dark .btn-primary { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.card.signup-dark a { color: var(--brand-ink); }
.card.signup-dark :focus-visible { outline-color: var(--gold); }
/* "Find a verse for…": the topics as chips on a warm band. */
.band { background: var(--surface); border-radius: 16px; padding: 1.4rem 1.1rem 1.5rem; }
.band .chip { background: var(--bg); color: var(--ink); }
.topic-groups { display: grid; gap: 1.4rem; }
.topic-groups > * { min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; margin: 0; padding: 0; }
.chips > li { margin: 0; }
.hubs { display: grid; gap: 1rem; }
.hubs > * { min-width: 0; display: flex; flex-direction: column; }
.hubs .more { margin-top: auto; padding-top: 0.4rem; }
.two-up { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.two-up .btn { border-radius: var(--radius); padding-left: 0.4rem; padding-right: 0.4rem; font-size: 0.85rem; white-space: nowrap; }
/* Where a page sits: Read the Bible › Colossians › Chapter 3 › Verse 15. */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.5rem; font-family: var(--sans); font-size: 0.8rem; color: var(--muted); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.pair-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.pair-nav a { display: grid; gap: 0.1rem; padding: 0.7rem 0.9rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-family: var(--sans); }
.pair-nav a:hover { border-color: var(--muted); }
.pair-nav a > span:first-child { font-size: 0.75rem; color: var(--muted); }
.pair-nav a > span:last-child { font-weight: 600; }
.pair-nav .next { text-align: right; }

/* Layout helpers */
.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 2.5rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.between { justify-content: space-between; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-family: var(--sans); font-size: 0.85rem; }
.eyebrow { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.04em; color: var(--accent); font-weight: 600; }
.eyebrow a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* The opening paragraph of a page, and a question: a little larger than the rest. */
.lead { font-size: 1.2rem; line-height: 1.55; }

/* The verse itself */
.verse { font-family: var(--serif); font-size: 1.7rem; line-height: 1.38; margin: 0; text-wrap: pretty; }
.verse-block { padding: 1rem 0 0.25rem; }
.verse-block .ref { margin-top: 0.9rem; }
.ref { font-family: var(--sans); color: var(--muted); font-size: 0.9rem; }
.ref a { display: inline-block; padding: 0.3rem 0; }
.passage { font-family: var(--serif); font-size: 1.15rem; line-height: 1.75; }
.passage .v { font-family: var(--sans); font-size: 0.65em; font-weight: 600; color: var(--muted); vertical-align: 0.45em; line-height: 0; margin-right: 0.3em; }
.passage .hl { background: #f1e3c8; background: color-mix(in srgb, var(--accent) 20%, transparent); border-radius: 4px; padding: 0.05em 0.15em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.passage .psalm-heading { display: block; font-family: var(--sans); font-size: 0.8em; font-style: italic; color: var(--muted); margin: 0 0 0.4em; }
.passage .omitted { color: var(--muted); font-style: italic; font-family: var(--sans); font-size: 0.85em; }
/* A verse quoted in a list or beside other things: smaller than the day's verse, same face. */
.quote { font-family: var(--serif); font-size: 1.25rem; line-height: 1.5; }
.prayer { font-style: italic; font-size: 1.15rem; line-height: 1.6; }

/* A day's page */
.dateline { font-family: var(--sans); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.03em; color: var(--muted); text-wrap: wrap; }
.dateline a { color: var(--accent); display: inline-block; padding: 0.6rem 0; }
.next-line { font-style: italic; color: var(--muted); }

/* Boxes */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.2rem 1.3rem; }
.card > * + * { margin-top: 0.6rem; }
.note { border-left: 3px solid var(--accent); padding: 0.1rem 0 0.1rem 1rem; }
.ad-slot { border: 1px dashed var(--line); border-radius: var(--radius); min-height: 100px; display: grid; place-items: center; color: var(--muted); font-family: var(--sans); font-size: 0.75rem; }

/* Buttons and chips */
.btn { display: inline-block; font: inherit; font-family: var(--sans); font-size: 1rem; font-weight: 600; line-height: 1.4; cursor: pointer; text-decoration: none; text-align: center; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0.65rem 1.2rem; min-height: 44px; }
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { border-color: var(--ink); }
.btn-block { display: block; width: 100%; }
.chip { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--sans); font-size: 0.85rem; font-weight: 600; text-decoration: none; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 1rem; }
a.chip:hover { color: var(--ink); border-color: var(--muted); }
.chip-on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
a.chip-on:hover { color: var(--brand-ink); }

/* Lists of links */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 0.9rem 0; margin: 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list > li > * + * { margin-top: 0.4rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.5rem; }
/* A plain list where each line is, or opens with, a link. */
.link-list { list-style: none; margin-bottom: 0; padding: 0; }
.link-list > li { margin: 0; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.link-list > li:last-child { border-bottom: 0; }
.link-list > li > a:only-child { display: block; padding: 0.3rem 0; }
/* One day in the archive or on a week's page: the whole row is the link. */
.day-link { display: grid; gap: 0.1rem; text-decoration: none; color: var(--ink); }
.day-link .day-subject { font-size: 1.2rem; line-height: 1.35; color: var(--brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.day-link:hover .day-subject { text-decoration-thickness: 2px; }
.link-list > li > a.day-link:only-child { display: grid; }
/* Inside a box the same row is a little smaller. */
.tile .day-link .day-subject { font-size: 1rem; }

/* Forms */
label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.3rem; }
input[type="text"], input[type="email"], input[type="search"], textarea, select { width: 100%; font: inherit; font-family: var(--sans); font-size: 1rem; color: var(--ink); background: var(--surface); border: 1px solid var(--muted); border-radius: 10px; padding: 0.65rem 0.8rem; min-height: 44px; }
::placeholder { color: var(--muted); opacity: 1; }
.signup { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.signup input { flex: 1 1 12rem; }
.signup .btn { flex: 1 1 auto; }
.form-error { color: var(--bad); font-family: var(--sans); font-size: 0.9rem; }
.form-ok { color: var(--good); font-family: var(--sans); font-size: 0.95rem; }

/* The Bible question */
.choices { display: grid; gap: 0.5rem; list-style: none; margin-bottom: 0; padding: 0; }
.choices > li { margin: 0; }
.choice { display: block; text-align: left; border-radius: var(--radius); padding: 0.75rem 1.1rem; overflow-wrap: anywhere; }
.choice.right { border-color: var(--good); color: var(--good); }
.choice.wrong { border-color: var(--bad); color: var(--bad); }
.bar { height: 0.5rem; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--brand); }

/* Sunday's questions: each answer opens in place, with or without JavaScript. */
.quiz { margin-bottom: 0; padding-left: 1.5rem; }
.quiz > li { padding-left: 0.2rem; }
.quiz > li + li { margin-top: 1.75rem; }
.quiz > li > * + * { margin-top: 0.6rem; }
.quiz-choices { list-style: none; margin-bottom: 0; padding: 0; }
.quiz-choices > li + li { margin-top: 0.25rem; }
.quiz-choices .letter { display: inline-block; min-width: 1.4em; font-family: var(--sans); font-size: 0.85em; font-weight: 600; color: var(--muted); }
details > summary { cursor: pointer; font-size: 0.95rem; font-weight: 600; color: var(--brand); padding: 0.6rem 0; min-height: 44px; }
details > * + * { margin-top: 0.5rem; }
details[open] { border-left: 3px solid var(--accent); padding-left: 1rem; }

/* Reader pages */
.chapter-nav { display: flex; justify-content: space-between; gap: 0.5rem; }
.numbers { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.8rem, 1fr)); gap: 0.4rem; font-family: var(--sans); }
.numbers a { text-align: center; padding: 0.45rem 0; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }

@media (min-width: 40rem) {
  .site-header { margin-bottom: 2rem; }
  .site-header-in { padding-top: 0.9rem; }
  main { padding-left: 0; padding-right: 0; }
  main.wide { padding-left: 1rem; padding-right: 1rem; }
  .footer-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles > .span-2 { grid-column: span 2; }
  .tile .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band { padding: 1.75rem 1.75rem 1.9rem; }
  .verse { font-size: 2.1rem; line-height: 1.32; }
  .verse-block { padding-top: 1.5rem; }
  h1 { font-size: 1.9rem; }
  .stack-lg > * + * { margin-top: 3rem; }
}
@media (min-width: 52rem) {
  .hubs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* The first group of topics is the longest, so it gets the most room. */
  .topic-groups { grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr) minmax(0, 1fr); }
}
@media (min-width: 62rem) {
  .site-header-in { padding-bottom: 0.7rem; gap: 0 1.5rem; }
  .search-link { display: none; }
  .site-header nav { order: 0; flex: 1 1 auto; overflow: visible; }
  .site-search { display: flex; gap: 0.4rem; flex: 0 1 16rem; }
  .with-rail { grid-template-columns: minmax(0, 1fr) 18.5rem; gap: 3rem; align-items: start; }
  /* The reading column keeps a line length that is easy on the eye even though the page is wide. */
  .with-rail > .reading { max-width: 41rem; }
}
@media print {
  .site-header nav, .site-search, .search-link, .site-footer, .rail, .ad-slot, .signup, .btn, .chip { display: none; }
  body { background: #fff; color: #000; }
}
