/* Tell Me More — Bible Reader · site stylesheet
   Direction B, "Margin" (design/website-redesign.md, W-15, Oct 3 2026):
   a reading column. Newsreader for headlines and anything meant to be
   read at length; Public Sans for everything you operate. Quiet neutrals
   and one ink-blue; the app's warm Parchment lives in its own screenshots
   and videos, not in the page around them. Type stays generous — the
   people this app is for read this site too. */

:root {
  --page:      #FBFBF8;
  --band:      #F1F0EA;
  --ink:       #1E1D1A;
  --ink-2:     #63605A;
  --rule:      #E4E2DB;
  --accent:    #2E4E7E;
  --on-accent: #FFFFFF;
  --gold:      #A5791F;
  --red:       #9E2B25;
  --shadow:    0 1px 2px rgba(30, 29, 26, .06), 0 10px 30px rgba(30, 29, 26, .08);
  --bar:       rgba(251, 251, 248, .86);

  --serif:  "Newsreader", Georgia, "Times New Roman", serif;
  --display:"Newsreader", Georgia, serif;
  --sans:   "Public Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  --measure: 40rem;
  --wide:    70rem;
  --gutter:  clamp(16px, 4vw, 40px);
  --label:   13rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page:      #161614;
    --band:      #1F1F1C;
    --ink:       #ECEAE3;
    --ink-2:     #A9A69D;
    --rule:      #2E2D29;
    --accent:    #9DB7E0;
    --on-accent: #10182A;
    --gold:      #D9AE5A;
    --red:       #E8A39B;
    --shadow:    0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
    --bar:       rgba(22, 22, 20, .86);
  }
}
:root[data-theme="dark"] {
  --page:      #161614;
  --band:      #1F1F1C;
  --ink:       #ECEAE3;
  --ink-2:     #A9A69D;
  --rule:      #2E2D29;
  --accent:    #9DB7E0;
  --on-accent: #10182A;
  --gold:      #D9AE5A;
  --red:       #E8A39B;
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
  --bar:       rgba(22, 22, 20, .86);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;          /* 18px */
  line-height: 1.6;
}
img, video, iframe { max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; text-wrap: balance; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5.6vw, 3.9rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.25rem); margin-top: 2.6rem; }
h3 { font-family: var(--sans); font-size: 1.15rem; font-weight: 600; letter-spacing: 0; margin-top: 1.8rem; }
p, ul, ol { margin: .9em 0; }
li + li { margin-top: .35em; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
code, kbd { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .88em; background: var(--band); padding: .1em .35em; border-radius: 4px; }
.kbd { font-family: var(--sans); font-weight: 600; background: var(--band); border: 1px solid var(--rule); border-radius: 6px; padding: .05em .45em; white-space: nowrap; }
.muted { color: var(--ink-2); }
.small { font-size: .9rem; }
.eyebrow, .label { font-family: var(--sans); font-size: .8rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 .9rem; }

/* ---- layout ---- */
/* The page is one column of reading width; the home page and the notes
   index widen to --wide and hang their section labels in a left margin on
   iPad and Mac, stacked above on a phone. */
.wrap { max-width: var(--wide); margin: 0 auto; padding-inline: var(--gutter); }
.prose { max-width: var(--measure); }
.prose > p, .prose li, .guide p, .guide li { font-family: var(--serif); font-size: 1.2rem; line-height: 1.6; }
.prose h2:first-child { margin-top: 0; }
.prose h1 { margin-bottom: .4rem; }

header.site {
  position: sticky; top: 0; z-index: 20;
  background: var(--bar); -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--rule);
}
header.site .bar { max-width: var(--wide); margin: 0 auto; padding: .7rem var(--gutter); display: flex; align-items: center; gap: 1rem; }
header.site .brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font: 500 1.3rem/1 var(--display); letter-spacing: -.01em; min-height: 44px; }
header.site .brand img { width: 30px; height: 30px; border-radius: 7px; }
header.site .brand span { color: var(--ink-2); font-style: italic; }
nav.site { margin-left: auto; display: flex; align-items: center; gap: .2rem; font-size: 1rem; }
nav.site a { color: var(--ink-2); text-decoration: none; padding: .5rem .8rem; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; }
nav.site a:hover { color: var(--ink); background: var(--band); }
nav.site a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 1px; }
nav.site a.cta { background: var(--ink); color: var(--page); margin-left: .4rem; font-weight: 500; padding-inline: 1rem; }
nav.site a.cta:hover { background: var(--accent); color: var(--on-accent); }
/* On a phone: the brand and one Menu button; the links open beneath. A
   <details> needs no script and VoiceOver announces it as a button. */
details.menu { display: none; margin-left: auto; }
details.menu summary { list-style: none; cursor: pointer; min-height: 44px; min-width: 44px; padding: .5rem .9rem; border: 1px solid var(--rule); border-radius: 8px; font-weight: 500; display: inline-flex; align-items: center; }
details.menu summary::-webkit-details-marker { display: none; }
details.menu[open] summary { background: var(--band); }
details.menu nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--page); border-bottom: 1px solid var(--rule); padding: .5rem var(--gutter) 1rem; display: grid; }
details.menu nav a { color: var(--ink); text-decoration: none; font-size: 1.2rem; padding: .8rem 0; border-bottom: 1px solid var(--rule); min-height: 48px; }
details.menu nav a:last-child { border-bottom: 0; color: var(--accent); font-weight: 600; }
@media (max-width: 720px) {
  nav.site { display: none; }
  details.menu { display: block; }
  header.site .brand span { display: none; }
}

main { padding-block: 2.5rem 4rem; }

footer.site {
  border-top: 1px solid var(--rule); padding-block: 1.8rem 2.5rem;
  font-size: .92rem; color: var(--ink-2);
  display: flex; flex-wrap: wrap; gap: .6rem 2rem; justify-content: space-between;
}
footer.site nav { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
footer.site a { color: inherit; text-decoration: none; }
footer.site a:hover { color: var(--ink); text-decoration: underline; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 52px; padding: .6rem 1.4rem; border-radius: 8px;
  font-family: var(--sans); font-size: 1.05rem; font-weight: 500; text-decoration: none;
  background: var(--ink); color: var(--page); border: 1px solid transparent;
}
.btn:hover { background: var(--accent); color: var(--on-accent); }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.secondary:hover { background: var(--band); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; align-items: center; margin-top: 1.6rem; }
.btn-row .link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: .3em; }

/* ---- home: the opening ---- */
.hero { padding-block: 1.5rem 2.5rem; max-width: 52rem; }
.hero h1 { font-size: clamp(2.5rem, 6.4vw, 4.4rem); line-height: 1.03; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .sub { color: var(--ink-2); font-size: clamp(1.15rem, 2vw, 1.3rem); max-width: 36ch; margin: 1.2rem 0 0; }
.facts { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; color: var(--ink-2); font-size: .92rem; margin: 1.4rem 0 0; padding: 0; list-style: none; }
.facts li { margin: 0; }
.facts li::before { content: "— "; color: var(--rule); }

/* ---- home: sections with a label in the margin ---- */
.sect { border-top: 1px solid var(--rule); padding-block: 2.6rem; display: grid; gap: 1rem; }
.sect > .label { margin: .35rem 0 0; }
.sect > div > :first-child { margin-top: 0; }
.sect h2 { margin-top: 0; }
.story p { font: 400 clamp(1.3rem, 2.2vw, 1.55rem)/1.45 var(--serif); max-width: 32ch; margin: 0 0 1rem; }
.story p.muted { font: 400 1.05rem/1.6 var(--sans); max-width: var(--measure); }
.flist { list-style: none; margin: 0; padding: 0; }
.flist li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: .95rem 0; border-bottom: 1px solid var(--rule); margin: 0; }
.flist li:first-child { padding-top: 0; }
.flist b { font-weight: 600; }
.flist span { color: var(--ink-2); }
@media (min-width: 760px) {
  .sect { grid-template-columns: var(--label) 1fr; gap: 2.5rem; }
  .flist li { grid-template-columns: 9rem 1fr; }
}

/* ---- the essential settings callout ---- */
/* The one boxed thing on a page: these settings decide whether the app
   sounds good, so they are lifted out rather than left in the prose. */
.essentials { border: 1px solid var(--rule); border-left: 4px solid var(--accent); border-radius: 10px; background: var(--band); padding: 1.4rem 1.5rem 1.2rem; margin: 2rem 0; max-width: 52rem; }
.essentials .eyebrow { margin-bottom: .4rem; color: var(--accent); }
.essentials h2 { margin: 0 0 .4rem; font-size: clamp(1.5rem, 2.8vw, 1.9rem); }
.essentials > p { margin: 0 0 1rem; color: var(--ink-2); font-family: var(--sans); font-size: 1rem; }
.essentials ol { list-style: none; counter-reset: ess; margin: 0; padding: 0; display: grid; gap: 1rem; }
.essentials li { counter-increment: ess; display: grid; grid-template-columns: 2.2rem 1fr; gap: .2rem .8rem; margin: 0; }
.essentials li::before { content: counter(ess); grid-row: span 2; width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); font: 600 1rem/2rem var(--sans); text-align: center; }
.essentials h3 { margin: .2rem 0 0; font-size: 1.1rem; }
.essentials li p { margin: 0; font-family: var(--sans); font-size: 1rem; color: var(--ink-2); line-height: 1.55; }
.essentials a { white-space: nowrap; font-weight: 500; }
.essentials .ess-after { margin: 1.1rem 0 0; padding-top: .9rem; border-top: 1px solid var(--rule); font-family: var(--sans); font-size: 1rem; color: var(--ink-2); line-height: 1.55; }

/* ---- home: what's in the app, as tiers ---- */
.tiers { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: 0; }
.tiers > li { margin: 0; padding: 1.4rem 0; border-top: 1px solid var(--rule); }
.tiers > li:first-child { border-top: 0; padding-top: .4rem; }
.tiers h3 { font: 500 clamp(1.35rem, 2.4vw, 1.6rem)/1.2 var(--serif); margin: .5rem 0 .4rem; letter-spacing: -.005em; }
.tiers p { margin: 0; color: var(--ink-2); max-width: 60ch; }
.tier-tag { display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2) !important; border: 1px solid var(--rule); border-radius: 999px; padding: .2rem .7rem; }
.tier-tag.free { color: var(--accent) !important; border-color: var(--accent); }
.works { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0; }
.works li { margin: 0; display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding: .55rem 0; border-top: 1px dashed var(--rule); font-size: 1rem; color: var(--ink-2); }
.works b { color: var(--ink); font-weight: 600; }
@media (max-width: 560px) { .works li { grid-template-columns: 1fr; gap: .1rem; } }

/* ---- the notes ---- */
.nrow { display: grid; gap: .1rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.nrow:first-child { padding-top: 0; }
.nrow b { font: 500 1.4rem/1.25 var(--serif); }
.nrow small { color: var(--ink-2); font-size: .9rem; font-variant-numeric: tabular-nums; }
.nrow:hover b { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
@media (min-width: 760px) { .nrow { grid-template-columns: 1fr auto; align-items: baseline; gap: 2rem; } }

.notes-head { padding-bottom: 1.6rem; }
.notes-head p { color: var(--ink-2); max-width: 46ch; margin-top: .8rem; }
.year { font-size: .95rem; font-weight: 500; color: var(--ink-2); padding: 1.6rem 0 .4rem; border-bottom: 1px solid var(--ink); }
.entry { display: grid; gap: .25rem; padding: 1.3rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.entry b { font: 500 clamp(1.4rem, 2.6vw, 1.65rem)/1.2 var(--serif); }
.entry p { margin: 0; color: var(--ink-2); font-size: 1rem; max-width: 60ch; }
.entry small { color: var(--ink-2); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.entry:hover b { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
@media (min-width: 760px) {
  .entry { grid-template-columns: 10rem 1fr; column-gap: 2rem; }
  .entry small { grid-row: span 2; padding-top: .55rem; }
}
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.2rem 0 0; padding: 0; list-style: none; }
.tags li { margin: 0; }
.tags a { display: inline-flex; align-items: center; min-height: 40px; padding: .3rem .9rem; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: .92rem; }
.tags a:hover, .tags a[aria-current="true"] { background: var(--ink); color: var(--page); border-color: var(--ink); }

article.note-page { display: grid; gap: 0; }
article.note-page .head { margin-bottom: 2rem; }
article.note-page .head small { color: var(--ink-2); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
article.note-page h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-top: .6rem; max-width: 22ch; }
article.note-page .aside { color: var(--ink-2); font-size: .92rem; border-top: 1px solid var(--rule); padding-top: .7rem; margin-bottom: 1.6rem; }
article.note-page .aside a { color: inherit; }
article.note-page .body { max-width: var(--measure); }
article.note-page .body p, article.note-page .body li { font: 400 1.25rem/1.62 var(--serif); }
article.note-page .body h2 { font: 600 1.15rem/1.3 var(--sans); letter-spacing: 0; margin: 2.4rem 0 .6rem; }
article.note-page .body blockquote { margin: 1.6rem 0; padding-left: 1.2rem; border-left: 2px solid var(--accent); color: var(--ink-2); }
article.note-page .body figure { margin: 2rem 0; }
article.note-page .body figure img { border-radius: 8px; display: block; }
article.note-page .body figcaption { font-size: .9rem; color: var(--ink-2); margin-top: .6rem; }
article.note-page .body table { font-size: 1rem; }
article.note-page .body pre { background: var(--band); padding: 1rem 1.2rem; border-radius: 8px; overflow-x: auto; font-size: .9rem; }
article.note-page .body pre code { background: none; padding: 0; }
.note-nav { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--rule); margin-top: 3rem; padding-top: 1.2rem; font-size: .95rem; }
.note-nav a { color: var(--ink); text-decoration: none; max-width: 45%; }
.note-nav a span { display: block; color: var(--ink-2); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
@media (min-width: 900px) {
  article.note-page { grid-template-columns: var(--label) 1fr; column-gap: 2.5rem; }
  article.note-page .head, .note-nav { grid-column: 1 / -1; }
  article.note-page .aside { margin: 0; position: sticky; top: 5.5rem; align-self: start; }
}

/* ---- features (kept for any page that still uses them) ---- */
.features { margin-bottom: 2.5rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.2rem; margin-top: 2rem; }
.feature { border-top: 1px solid var(--rule); padding-top: 1rem; }
.feature h3 { margin-top: 0; }
.feature p { margin-bottom: 0; color: var(--ink-2); }

/* ---- steps (numbered because they are a sequence) ---- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.5rem 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; align-items: start; padding-block: 1rem; border-top: 1px solid var(--rule); }
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps li::before { content: counter(step); font-family: var(--display); font-size: 1.9rem; font-weight: 600; color: var(--accent); line-height: 1; padding-top: .1rem; }
.steps li > :first-child { margin-top: 0; }
.steps li > :last-child { margin-bottom: 0; }

/* ---- QR pair ---- */
.qr-one { max-width: 18rem; margin: 1.5rem auto 0; }
.qr-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.qr { background: #fff; color: #111; border-radius: 16px; padding: 1.2rem; text-align: center; box-shadow: var(--shadow); }
.qr svg { width: min(100%, 220px); height: auto; display: block; margin: 0 auto .8rem; }
.qr .label { font-family: var(--sans); font-weight: 700; font-size: 1.1rem; }
.qr .url { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; word-break: break-all; color: #444; margin-top: .3rem; }

/* ---- video cards ---- */
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1.4rem; margin-top: 1.5rem; }
.video { background: var(--band); border-radius: 16px; overflow: hidden; }
.video .frame { aspect-ratio: 16 / 9; background: var(--rule); display: grid; place-items: center; color: var(--ink-2); font-family: var(--sans); }
.video .frame iframe { width: 100%; height: 100%; border: 0; }
.video .body { padding: 1rem 1.2rem 1.2rem; }
.video h3 { margin: 0; font-size: 1.2rem; }
.video .len { font-family: var(--sans); color: var(--ink-2); font-size: .95rem; }
.video p { margin: .4rem 0 0; font-size: 1.05rem; }

/* ---- callouts ---- */
.note { border-left: 4px solid var(--gold); background: var(--band); padding: .8rem 1.1rem; border-radius: 0 12px 12px 0; margin: 1.4rem 0; }
.note > :first-child { margin-top: 0; } .note > :last-child { margin-bottom: 0; }

/* ---- tables ---- */
table { border-collapse: collapse; width: 100%; margin: 1.2rem 0; font-size: 1.05rem; }
th, td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-family: var(--sans); font-weight: 600; }
.table-wrap { overflow-x: auto; }

/* ---- guide (generated from the app's own guide) ---- */
/* A sidebar of sections on iPad landscape and Mac, sticky, with the
   section on screen marked; on narrower screens an "On this page" button
   above the text. Pictures in the guide are figures with a caption. */
.doc-head { max-width: var(--measure); margin-bottom: 2rem; }
.doc-head h1 { margin-bottom: .4rem; }
.doc { display: grid; gap: 1.5rem; }
.doc-nav { display: none; }
/* The list reads as an outline: numbered sections in ink, their
   subsections smaller and grey on a thin tree line, and only the section
   on screen marked — no rule down the whole list. */
.doc-nav ol, .doc-jump ol { list-style: none; margin: 0; padding: 0; counter-reset: sec; }
.doc-nav li, .doc-jump li { margin: 0; }
.doc-nav > ol > li, .doc-jump nav > ol > li { counter-increment: sec; }
.doc-nav a, .doc-jump a { position: relative; display: flex; align-items: center; gap: .7rem; min-height: 36px; padding: .4rem .6rem; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: .95rem; font-weight: 500; line-height: 1.3; }
.doc-nav > ol > li > a::before, .doc-jump nav > ol > li > a::before { content: counter(sec); flex: 0 0 1.4rem; color: var(--ink-2); font-weight: 400; font-size: .85rem; font-variant-numeric: tabular-nums; text-align: right; }
.doc-nav ol ol, .doc-jump ol ol { margin: 0 0 .35rem 2.7rem; border-left: 1px solid var(--rule); }
.doc-nav ol ol a, .doc-jump ol ol a { min-height: 32px; padding: .3rem .7rem; font-size: .87rem; font-weight: 400; color: var(--ink-2); border-radius: 0 6px 6px 0; }
.doc-nav a:hover, .doc-jump a:hover { background: var(--band); }
.doc-nav a[aria-current="true"], .doc-jump a[aria-current="true"] { color: var(--accent); background: var(--band); }
.doc-nav > ol > li > a[aria-current="true"]::before, .doc-jump nav > ol > li > a[aria-current="true"]::before { color: var(--accent); font-weight: 600; }
.doc-nav ol ol a[aria-current="true"], .doc-jump ol ol a[aria-current="true"] { box-shadow: inset 2px 0 0 var(--accent); margin-left: -1px; }
.doc-nav .label { margin-bottom: .6rem; padding-left: .6rem; }
/* On a phone the same outline, with full-size targets. */
.doc-jump a { min-height: 48px; font-size: 1.05rem; }
.doc-jump ol ol a { min-height: 44px; font-size: .98rem; }
.doc-jump { border: 1px solid var(--rule); border-radius: 10px; margin-bottom: 1.8rem; }
.doc-jump summary { min-height: 52px; padding: .6rem 1rem; display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-weight: 500; list-style: none; }
.doc-jump summary::-webkit-details-marker { display: none; }
.doc-jump summary::after { content: "+"; font-size: 1.4rem; color: var(--ink-2); }
.doc-jump[open] summary::after { content: "\2212"; }
.doc-jump nav { padding: 0 1rem 1rem; }
.guide { max-width: var(--measure); min-width: 0; }
.guide h2, .guide h3 { scroll-margin-top: 5.5rem; }
.guide h2:first-child { margin-top: 0; }
.guide figure { margin: 2rem 0; }
.guide figure img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--rule); }
.guide figcaption { font-size: .92rem; color: var(--ink-2); margin-top: .6rem; }
@media (min-width: 900px) {
  .doc { grid-template-columns: 15rem minmax(0, 1fr); gap: 3.5rem; align-items: start; }
  .doc-nav { display: block; position: sticky; top: 5rem; max-height: calc(100vh - 6rem); overflow-y: auto; padding-bottom: 1rem; }
  .doc-jump { display: none; }
}

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print { header.site, footer.site, nav.site { display: none; } body { background: #fff; color: #000; } }

/* ==== video shorts (js/shorts.js) ====================================
   The video is the iPad's screen only. The frame round it is drawn here
   from data-frame, so an iPad can become a plain screen or a cinema with
   no new video. The ring and callout are drawn over it in % of the
   screen, which is the video's own coordinate space. */

.shorts { margin-block: 2rem 2.5rem; }
.shorts-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: 1rem; }
.shorts-tabs button {
  font: 600 1.05rem/1 var(--sans); letter-spacing: .02em; color: var(--ink);
  min-height: 48px; padding: .5rem 1.05rem; border-radius: 999px;
  background: var(--band); border: 2px solid transparent; cursor: pointer;
}
.shorts-tabs button:hover { border-color: var(--rule); }
.shorts-tabs button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }

.device {
  --bezel: #1F1B18; --bezel-edge: #3A332D;
  position: relative; container-type: inline-size;
  margin-inline: auto; max-width: 56rem;
}
.device .screen {
  position: relative; aspect-ratio: 1280 / 882; overflow: hidden;
  background: #F5EEDD; cursor: pointer; isolation: isolate;
}
.device video, .device .hold { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.device .hold { background: center / cover no-repeat; z-index: 0; }
.device video { z-index: 1; }
.device .overlay { position: absolute; inset: 0; z-index: 3; pointer-events: none; }

/* The iPad: a dark bezel of even width, rounded to match the display's own corners. */
/* A modern iPad's bezel: thin and even, about 1.6% of the width a side.
   In %, not cqw: the frame is the container its own children measure, so
   its own padding in cqw would measure the page instead. */
.device[data-frame="ipad"] {
  padding: 1.6%; border-radius: clamp(14px, 2.6vw, 30px); background: var(--bezel);
  box-shadow: inset 0 0 0 1px var(--bezel-edge), 0 2px 4px rgba(0,0,0,.18), 0 18px 48px rgba(68,53,41,.22);
}
.device[data-frame="ipad"]::before {      /* the camera, on the long edge */
  content: ""; position: absolute; top: .55cqw; left: 50%; width: .5cqw; height: .5cqw;
  border-radius: 50%; background: #0B0A09; box-shadow: inset 0 0 0 .12cqw #2A2622; transform: translateX(-50%);
}
.device[data-frame="ipad"] .screen { border-radius: 1.5cqw; }

/* A plain screen: just rounded corners and a soft shadow. */
.device[data-frame="plain"] .screen { border-radius: 1.6cqw; box-shadow: var(--shadow); }

/* The cinema: a dark room, the screen glowing, a row of seats in front. */
.device[data-frame="theater"] {
  padding: 5% 7% 11%; border-radius: 14px;
  background: radial-gradient(120% 90% at 50% 35%, #3A2A20 0%, #120D0A 60%, #050404 100%);
}
.device[data-frame="theater"] .screen { box-shadow: 0 0 6cqw rgba(255, 232, 196, .22), 0 0 1.4cqw rgba(255, 232, 196, .35); }
.device[data-frame="theater"]::after {   /* two rows of seat backs, the near row darker */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9cqw; border-radius: 0 0 1.4cqw 1.4cqw;
  background:
    radial-gradient(closest-side, #020101 92%, transparent 100%) -3cqw 3.6cqw / 9cqw 9cqw repeat-x,
    radial-gradient(closest-side, #0D0907 92%, transparent 100%) 1.5cqw 1.2cqw / 9cqw 8cqw repeat-x;
}

/* ---- the title card that opens each short ---- */
.titlecard {
  position: absolute; inset: 0; z-index: 4; display: grid; align-content: center; justify-items: center;
  text-align: center; padding: 6cqw; gap: 1.2cqw; pointer-events: none;
  background: rgba(245, 238, 221, .88); color: #443529;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .5s ease;
}
.titlecard.solid { background: #F5EEDD; }
.titlecard.on { opacity: 1; }
.titlecard .eyebrow { font: 700 clamp(10px, 1.6cqw, 22px)/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #70604B; }
.titlecard .rule { width: 9cqw; height: .35cqw; background: #A5791F; border-radius: 1px; transform-origin: center; }
.titlecard .title { font: 600 clamp(18px, 5.2cqw, 64px)/1.1 var(--display); max-width: 80%; text-wrap: balance; }
.titlecard .line { font: 400 clamp(13px, 2.4cqw, 28px)/1.35 var(--serif); color: #70604B; max-width: 70%; }
.titlecard .w { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .titlecard.on .rule { animation: tc-rule .7s cubic-bezier(.2,.7,.2,1) both; }
  .titlecard.on .eyebrow { animation: tc-up .6s ease both; }
  .titlecard.on .w { animation: tc-up .55s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(.18s + var(--i) * .08s); }
  .titlecard.on .line { animation: tc-up .6s ease .55s both; }
}
@keyframes tc-rule { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes tc-up { from { opacity: 0; transform: translateY(.9cqw); } to { opacity: 1; transform: none; } }

/* ---- the focus ring and the callout ---- */
/* Off unless a cue asks for it ("glow": true): the callout is enough.
   When it is on, light round the thing and nothing on it — no fill, no
   edge (Joe, Oct 1). */
.ring {
  position: absolute; border-radius: 2.4cqw;
  box-shadow: 0 0 2.6cqw 1.2cqw rgba(214, 160, 60, .42), 0 0 .8cqw .2cqw rgba(214, 160, 60, .25);
  opacity: 0; transform: scale(1.04); transition: opacity .45s ease, transform .5s cubic-bezier(.2,.7,.2,1);
}
.ring.on { opacity: 1; transform: none; }
.ring.on.off { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .ring.on.tap { animation: ring-tap 1.2s ease-in-out .4s 2; }
}
@keyframes ring-tap {
  0%, 100% { box-shadow: 0 0 2.6cqw 1.2cqw rgba(214,160,60,.42), 0 0 .8cqw .2cqw rgba(214,160,60,.25); }
  50% { box-shadow: 0 0 3.8cqw 2.2cqw rgba(214,160,60,.6), 0 0 1.2cqw .4cqw rgba(214,160,60,.35); }
}
/* ---- the fingertip ---- */
/* Where the finger touched, like iOS's Show Touches: a soft dot that
   presses, a ring that ripples out, and for a drag the dot travels.
   Drawn by js/shorts.js frame by frame from the video's own clock, so it
   pauses with the video. Fixed colours: it sits on the iPad's screen, which
   is the same in either page theme. */
.touch {
  position: absolute; width: 4.6cqw; height: 4.6cqw; margin: -2.3cqw 0 0 -2.3cqw;
  border-radius: 50%; pointer-events: none; opacity: 0; will-change: transform, opacity;
  background: radial-gradient(circle, rgba(255,255,255,.92) 0 34%, rgba(255,255,255,.62) 62%, rgba(255,255,255,.45) 100%);
  box-shadow: 0 0 0 .22cqw rgba(68,45,28,.55), 0 .3cqw 1.2cqw rgba(30,20,10,.35);
}
.touch .ripple {
  position: absolute; inset: 0; border-radius: 50%; opacity: 0;
  box-shadow: 0 0 0 .3cqw rgba(135,83,52,.75);
}
.callout {
  --tail: 50%;
  position: absolute; max-width: 42%; padding: 1.1cqw 1.6cqw; border-radius: 1.3cqw;
  background: #2A1F17; color: #FFF8EC; font: 600 clamp(11px, 2.15cqw, 26px)/1.25 var(--sans);
  box-shadow: 0 .4cqw 1.6cqw rgba(0,0,0,.28);
  opacity: 0; transform: translateY(.6cqw); transition: opacity .35s ease, transform .4s cubic-bezier(.2,.7,.2,1);
}
.callout.on { opacity: 1; transform: none; }
.callout::after {   /* the tail, pointing back at the ring */
  content: ""; position: absolute; width: 1.8cqw; height: 1.8cqw; background: inherit; border-radius: .25cqw;
  transform: translate(-50%, -50%) rotate(45deg);
}
.callout[data-side="below"]::after { left: var(--tail); top: 0; }
.callout[data-side="above"]::after { left: var(--tail); top: 100%; }
.callout[data-side="right"]::after { left: 0; top: var(--tail); }
.callout[data-side="left"]::after { left: 100%; top: var(--tail); }
.callout[data-side="inside"]::after { display: none; }

/* ---- the words beside it, and the controls ---- */
/* The controls centred under the video; the words under them left-justified,
   on the same left edge as the page's text (Joe, Oct 1). */
.shorts-below { display: flex; flex-direction: column; align-items: stretch; gap: 1rem; margin-top: 1.1rem; }
.showcase-text { min-height: 7.5rem; max-width: var(--measure); text-align: left; }
.showcase-text .glyph { font: 700 .9rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: .4rem; }
.showcase-text h3 { margin: 0; font-size: 1.45rem; }
.showcase-text p { margin: .4rem 0 0; font-size: 1.12rem; }
.showcase-text .soon { font-family: var(--sans); font-weight: 600; color: var(--ink-2); font-size: 1rem; }
.shorts-controls { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; order: -1; }
.shorts-controls button {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem;
  min-width: 64px; min-height: 64px; padding: .4rem .6rem; border-radius: 16px;
  font: 600 .85rem/1 var(--sans); color: var(--ink); background: var(--band); border: 2px solid transparent; cursor: pointer;
}
.shorts-controls button:hover { border-color: var(--rule); }
.shorts-controls button svg { width: 22px; height: 22px; fill: currentColor; }
.shorts-controls [data-act="play"].is-playing { background: var(--accent); color: var(--on-accent); }
.shorts-controls [data-act="sound"][aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.shorts-controls .i-pause, .is-playing .i-play { display: none; }
.is-playing .i-pause { display: inline; }
.shorts:not(.js) .shorts-controls, .shorts:not(.js) .shorts-tabs { display: none; }
.shorts:not(.js) video { position: static; }
@media (max-width: 640px) {
  .callout { max-width: 60%; font-size: 3.2cqw; }
}

/* ---- the tutorials page ---- */
.chapter-head { margin-top: 2.8rem; }
.chapter-head p { margin: .3rem 0 0; color: var(--ink-2); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.3rem; margin-top: 1.2rem; }
.tile { background: var(--band); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.tile .thumb { position: relative; display: block; aspect-ratio: 1280 / 882; background: var(--rule) center / cover no-repeat; border: 0; padding: 0; cursor: pointer; width: 100%; }
.tile .thumb::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; transform: translate(-50%, -50%);
  border-radius: 50%; background: rgba(42, 31, 23, .82) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23FFF8EC' d='M8 5v14l11-7z'/%3E%3C/svg%3E") 56% 50% / 30px no-repeat;
}
.tile .thumb.soon::after { display: none; }
.tile .thumb.soon { display: grid; place-items: center; font: 600 1rem var(--sans); color: var(--ink-2); cursor: default; }
.tile .body { padding: .9rem 1.1rem 1.1rem; }
.tile h3 { margin: 0; font-size: 1.2rem; }
.tile .len { font: 600 .9rem var(--sans); color: var(--ink-2); margin-top: .2rem; }
.tile p { margin: .4rem 0 0; font-size: 1.02rem; }
.draft-flag { font: 700 .75rem var(--sans); letter-spacing: .06em; text-transform: uppercase; background: var(--gold); color: #fff; border-radius: 6px; padding: .1rem .4rem; margin-left: .4rem; vertical-align: middle; }

dialog.reel { width: min(96vw, 64rem); max-height: 96vh; border: 0; border-radius: 20px; padding: 1.2rem 1.2rem 1.4rem; background: var(--page); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.45); }
dialog.reel::backdrop { background: rgba(20, 14, 10, .72); }
dialog.reel .reel-top { display: flex; justify-content: flex-end; margin-bottom: .6rem; }
dialog.reel .shorts { margin: 0; }

/* ---- arriving at a section by a link ---- */
/* A link to "voices.html#other-languages" lands with the heading clear of
   the sticky bar, marked with the accent rule while it is the target, and
   lit for a moment so the eye finds it (Joe, Oct 4: "no indication of
   where I am"). */
:where(h2, h3)[id] { scroll-margin-top: 5.5rem; }
h2:target, h3:target { position: relative; }
h2:target::before, h3:target::before { content: ""; position: absolute; left: -1rem; top: .1em; bottom: .1em; width: 4px; border-radius: 2px; background: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  h2:target, h3:target { animation: arrive 2.4s ease-out; border-radius: 6px; }
  @keyframes arrive {
    0%, 35% { background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: 0 0 0 .4rem color-mix(in srgb, var(--accent) 16%, transparent); }
    100% { background: transparent; box-shadow: 0 0 0 .4rem transparent; }
  }
}
@media (max-width: 900px) { header.site .brand span { display: none; } }

/* ---- Setup: System Settings / App Settings tabs ----
   Without script both panels show, one after the other, and the tabs are
   links to them; with it, one panel at a time. */
.setup-tabs { display: flex; flex-wrap: wrap; gap: .25rem; margin: 2rem 0 2rem; border-bottom: 1px solid var(--rule); max-width: 52rem; }
.setup-tabs a {
  font: 600 1.1rem/1 var(--sans); letter-spacing: .01em; color: var(--ink-2); text-decoration: none;
  min-height: 48px; padding: .9rem 1.1rem .8rem; display: inline-flex; align-items: center;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.setup-tabs a:hover { color: var(--ink); }
.setup-tabs a[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
html:not(.js-tabs) .setup-tabs a[aria-selected] { color: var(--accent); }
.setup-tabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.setup-panel { scroll-margin-top: 5.5rem; }
html:not(.js-tabs) #app-settings { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--rule); }

/* The Margin's sections, drawn as they look in the app's Settings. */
.settings-mock { max-width: 26rem; margin: 1.6rem 0 2rem; padding: 1rem 1rem .9rem; background: var(--band); border: 1px solid var(--rule); border-radius: 14px; }
.settings-mock .mock-title { font: 500 .78rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin: .2rem .4rem .7rem; }
.settings-mock ul { list-style: none; margin: 0; padding: 0; background: var(--page); border-radius: 10px; overflow: hidden; }
.settings-mock li { display: flex; align-items: center; gap: .8rem; min-height: 46px; padding: 0 .9rem; font: 400 1.05rem/1.2 var(--sans); }
.settings-mock li + li { border-top: 1px solid var(--rule); }
.settings-mock li::before { content: ""; flex: none; width: 1.3rem; height: 1.3rem; border-radius: 50%; box-sizing: border-box; border: 2px solid var(--rule); }
.settings-mock li.on::before {
  border: 0; background: var(--accent) no-repeat center / 70% auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5.2l3.2 3L11 1.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.settings-mock li.off { color: var(--ink-2); }
.settings-mock li::after { content: ""; margin-left: auto; width: 1.2rem; height: .7rem; flex: none; background: linear-gradient(var(--ink-2) 0 0) top / 100% 2px no-repeat, linear-gradient(var(--ink-2) 0 0) center / 100% 2px no-repeat, linear-gradient(var(--ink-2) 0 0) bottom / 100% 2px no-repeat; opacity: .55; }
.settings-mock figcaption { font: 400 .95rem/1.5 var(--sans); color: var(--ink-2); margin: .8rem .3rem 0; }
.settings-table { max-width: 52rem; }
.settings-table td:first-child { white-space: nowrap; }
.setup-tabs { scroll-margin-top: 5.5rem; }
