/* Nephite Atlas — rustic, modern, set in the Fell types */
:root {
  --parchment: #efe5cf;
  --parchment-2: #e7d9bb;
  --parchment-3: #dccaa4;
  --edge: #c9b48a;
  --ink: #2a2018;
  --ink-soft: #5b4a39;
  --ink-faint: #6a5844;
  --walnut: #4a3221;
  --walnut-deep: #2b1d13;
  --grove: #1f2a19;
  --grove-2: #2d3b24;
  --moss: #4f6040;
  --brass: #b08a4a;
  --brass-light: #d9bc7c;
  --oxblood: #7a2b22;
  --oxblood-deep: #5e1f18;
  --ok: #46663a;
  --warn: #7a520f;
  --brass-text: #765a24;  /* brass dark enough for text on parchment */
  --bad: #92301f;
  --radius: 3px;
  --shadow-paper: 0 1px 0 rgba(255, 250, 235, .6) inset, 0 18px 40px -18px rgba(43, 29, 19, .55), 0 2px 6px rgba(43, 29, 19, .18);
  --display: "IM Fell English", "EB Garamond", Georgia, serif;
  --display-sc: "IM Fell English SC", "IM Fell English", Georgia, serif;
  --body: "EB Garamond", Garamond, Georgia, serif;
  --noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .25  0 0 0 0 .15  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--parchment);
  background-image: var(--noise), radial-gradient(ellipse at 50% 0%, #f6eedb 0%, var(--parchment) 45%, var(--parchment-2) 100%);
  background-blend-mode: multiply, normal;
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--oxblood); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--oxblood-deep); }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.sc { font-family: var(--display-sc); letter-spacing: .06em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- ornaments ---------- */
.rule { display: flex; align-items: center; gap: 14px; color: var(--brass); margin: 0 auto; max-width: 420px; }
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, currentColor 30%, currentColor 70%, transparent); }
.rule span { font-family: var(--display); font-size: 22px; line-height: 1; }
.eyebrow { font-family: var(--display-sc); letter-spacing: .14em; font-size: 14px; color: var(--brass-text); text-transform: lowercase; }
.hero .eyebrow, .timeline-band .eyebrow { color: var(--brass-light); }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(180deg, var(--walnut) 0%, var(--walnut-deep) 100%);
  border-bottom: 1px solid #1a110b;
  box-shadow: 0 1px 0 rgba(217, 188, 124, .35) inset, 0 6px 18px -8px rgba(0, 0, 0, .5);
  color: var(--parchment);
}
.topbar::after { content: ""; position: absolute; inset: auto 0 -4px 0; height: 3px; background: linear-gradient(90deg, transparent, var(--brass) 20%, var(--brass-light) 50%, var(--brass) 80%, transparent); opacity: .55; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--parchment); text-decoration: none; }
.brand:hover { color: #fff8e6; }
.brand-seal { width: 38px; height: 38px; flex: none; }
.brand-name { font-family: var(--display-sc); font-size: 25px; letter-spacing: .04em; line-height: 1; }
.brand-name em { font-family: var(--display); font-style: italic; color: var(--brass-light); letter-spacing: 0; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: #e9dcc0; text-decoration: none; font-family: var(--display-sc); letter-spacing: .08em; font-size: 15px; }
.nav a:hover { color: var(--brass-light); }
.account {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid rgba(217, 188, 124, .45); border-radius: 999px;
  padding: 4px 6px 4px 14px; font-size: 15px; color: #efe3c6; white-space: nowrap;
}
.account b { font-family: var(--display-sc); font-weight: normal; color: var(--brass-light); letter-spacing: .06em; }
.account button { all: unset; cursor: pointer; font-family: var(--display-sc); letter-spacing: .08em; font-size: 13px; padding: 4px 12px; border-radius: 999px; background: var(--oxblood); color: #fbefd8; border: 1px solid rgba(217, 188, 124, .55); }
.account button:hover { background: var(--oxblood-deep); }
.account button:focus-visible { outline: 2px solid var(--brass-light); outline-offset: 2px; }

/* ---------- hero (the grove) ---------- */
.hero { position: relative; color: #f4ead2; overflow: hidden; background: var(--grove); isolation: isolate; }
.hero-scene { position: absolute; inset: 0; z-index: -1; }
.hero-scene svg { width: 100%; height: 100%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--noise); opacity: .5; mix-blend-mode: overlay; pointer-events: none; }
.hero-inner { padding: 72px 0 64px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-family: var(--display); font-weight: normal; font-size: clamp(40px, 5.6vw, 72px); line-height: 1.02; margin: 14px 0 10px; text-shadow: 0 2px 30px rgba(0, 0, 0, .45); }
.hero h1 i { color: var(--brass-light); }
.hero .attrib { font-family: var(--display); font-style: italic; color: var(--brass-light); font-size: 20px; margin: 0 0 22px; }
.hero .lede { font-size: 21px; max-width: 34ch; color: #eadfc4; margin: 0 0 26px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; font-family: var(--display-sc); letter-spacing: .08em; font-size: 14px; color: #cfc2a3; }
.hero-facts span::before { content: "❧ "; color: var(--brass); }

/* ---------- ask card ---------- */
.paper {
  position: relative;
  background: var(--parchment);
  background-image: var(--noise), linear-gradient(180deg, #f5ecd8, var(--parchment) 40%, var(--parchment-2));
  background-blend-mode: multiply, normal;
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-paper);
}
.paper::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(122, 43, 34, .28); outline: 1px solid rgba(176, 138, 74, .35); outline-offset: 3px; pointer-events: none; border-radius: 1px; }
.ask-card { padding: 30px 30px 24px; }
.ask-card h2 { font-family: var(--display-sc); font-weight: normal; font-size: 22px; letter-spacing: .06em; margin: 0 0 4px; color: var(--walnut); }
.ask-card p.hint { margin: 0 0 14px; color: var(--ink-soft); font-size: 16px; font-style: italic; }
.ask-card textarea {
  width: 100%; min-height: 120px; resize: vertical;
  font: inherit; font-size: 19px; line-height: 1.5; color: var(--ink);
  background: rgba(255, 252, 242, .55);
  border: 1px solid var(--edge); border-radius: 2px;
  padding: 12px 14px;
  box-shadow: inset 0 2px 6px rgba(74, 50, 33, .12);
}
.ask-card textarea:focus { outline: 2px solid var(--brass); outline-offset: 1px; background: rgba(255, 252, 242, .85); }
.ask-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.counter { font-size: 14px; color: var(--ink-faint); }
.btn {
  all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--display-sc); letter-spacing: .1em; font-size: 17px;
  padding: 11px 26px; border-radius: 2px;
  background: linear-gradient(180deg, #8a3328, var(--oxblood) 55%, var(--oxblood-deep));
  color: #fbf0da; border: 1px solid #4a1812;
  box-shadow: 0 1px 0 rgba(255, 220, 180, .35) inset, 0 6px 14px -6px rgba(94, 31, 24, .8);
  transition: transform .08s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn.ghost { background: transparent; color: var(--walnut); border-color: var(--edge); box-shadow: none; }
.btn.ghost:hover { background: rgba(176, 138, 74, .12); }
.btn.brass { background: linear-gradient(180deg, var(--brass-light), var(--brass) 60%, #8d6a32); color: var(--walnut-deep); border-color: #6e5226; }
.samples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.samples button {
  all: unset; cursor: pointer; font-size: 15px; font-style: italic; color: var(--walnut);
  padding: 4px 12px; border: 1px dashed rgba(122, 43, 34, .35); border-radius: 999px; background: rgba(255, 250, 238, .45);
}
.samples button:hover { border-style: solid; background: rgba(255, 250, 238, .85); }
.samples button:focus-visible { outline: 2px solid var(--brass); }

/* ---------- reading desk (answer) ---------- */
.desk { padding: 56px 0 24px; scroll-margin-top: 70px; }
.desk[hidden] { display: none; }
.desk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.answer { padding: 40px 48px 32px; }
.answer-q { font-family: var(--display); font-style: italic; font-size: 25px; line-height: 1.3; color: var(--walnut); margin: 0 0 6px; }
.answer-meta { font-size: 14px; color: var(--ink-faint); font-family: var(--display-sc); letter-spacing: .08em; margin-bottom: 18px; }
.answer-body { font-size: 20px; line-height: 1.68; hyphens: auto; }
.answer-body > p:first-child::first-letter {
  float: left; font-family: var(--display); color: var(--oxblood);
  font-size: 4.1em; line-height: .82; padding: 6px 10px 0 0;
}
.answer-body h3 { font-family: var(--display-sc); font-weight: normal; letter-spacing: .05em; font-size: 21px; color: var(--walnut); margin: 1.4em 0 .3em; }
.answer-body ul, .answer-body ol { padding-left: 1.2em; }
.answer-body li { margin: .2em 0; }
.answer-body li::marker { color: var(--brass); }
.answer-body strong { font-weight: 600; color: var(--walnut-deep); }
.answer-body .further { border-top: 1px solid rgba(176, 138, 74, .5); padding-top: 12px; margin-top: 20px; font-size: 17px; }
.cursor { display: inline-block; width: .55em; height: 1.05em; vertical-align: -0.15em; background: var(--oxblood); opacity: .7; animation: blink 1s steps(2) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }

.cite {
  all: unset; cursor: pointer; display: inline; white-space: nowrap;
  font-family: var(--display-sc); font-size: .82em; letter-spacing: .03em;
  color: var(--walnut); padding: 0 .3em; border-radius: 2px;
  background: rgba(176, 138, 74, .16); border-bottom: 1px dotted var(--brass);
}
.cite::after { content: ""; display: inline-block; width: .5em; height: .5em; margin-left: .3em; border-radius: 50%; background: var(--brass); vertical-align: .12em; opacity: .5; }
.cite.verified { background: rgba(70, 102, 58, .13); border-bottom: 1px solid rgba(70, 102, 58, .6); }
.cite.verified::after { background: var(--ok); opacity: 1; }
.cite.unconfirmed { background: rgba(162, 113, 31, .15); border-bottom: 1px dashed var(--warn); }
.cite.unconfirmed::after { background: var(--warn); opacity: 1; }
.cite.invalid { background: rgba(146, 48, 31, .13); border-bottom: 1px solid var(--bad); text-decoration: line-through; text-decoration-color: rgba(146, 48, 31, .6); }
.cite.invalid::after { background: var(--bad); opacity: 1; }
.cite:focus-visible { outline: 2px solid var(--brass); }

.answer-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 26px; padding-top: 16px; border-top: 1px dashed var(--edge); font-size: 15px; color: var(--ink-soft); }
.answer-tools .fb { display: flex; gap: 8px; align-items: center; }
.answer-tools .fb button { all: unset; cursor: pointer; padding: 3px 12px; border: 1px solid var(--edge); border-radius: 999px; font-size: 14px; }
.answer-tools .fb button[aria-pressed="true"] { background: var(--walnut); color: var(--parchment); border-color: var(--walnut); }
.notice { margin-top: 18px; padding: 12px 16px; border-left: 3px solid var(--warn); background: rgba(162, 113, 31, .1); font-size: 16px; }
.notice.bad { border-color: var(--bad); background: rgba(146, 48, 31, .08); }
.notice.debated { border-color: var(--oxblood); background: rgba(122, 43, 34, .07); }

/* side panel */
.side { display: grid; gap: 20px; position: sticky; top: 84px; }
.panel { padding: 22px 24px; }
.panel h3 { font-family: var(--display-sc); font-weight: normal; font-size: 19px; letter-spacing: .06em; margin: 0 0 12px; color: var(--walnut); display: flex; align-items: center; gap: 10px; }
.panel h3::after { content: ""; flex: 1; height: 1px; background: var(--edge); }
.ledger { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; margin-bottom: 10px; }
.ledger div { padding: 8px 4px; border: 1px solid var(--edge); background: rgba(255, 251, 240, .5); }
.ledger b { display: block; font-family: var(--display); font-size: 30px; font-weight: normal; line-height: 1; }
.ledger span { font-family: var(--display-sc); font-size: 12px; letter-spacing: .08em; color: var(--ink-soft); }
.ledger .ok b { color: var(--ok); } .ledger .warn b { color: var(--warn); } .ledger .bad b { color: var(--bad); }
.ledger-note { font-size: 14.5px; color: var(--ink-soft); margin: 6px 0 0; line-height: 1.45; }
.sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 420px; overflow-y: auto; overflow-x: hidden; }
.sources li { min-width: 0; }
.sources li { font-size: 15.5px; line-height: 1.4; }
.sources button { all: unset; cursor: pointer; display: block; width: 100%; padding: 6px 8px; border-radius: 2px; }
.sources button:hover, .sources button:focus-visible { background: rgba(176, 138, 74, .14); }
.sources .ref { font-family: var(--display-sc); letter-spacing: .03em; color: var(--walnut); }
.sources .tag { font-size: 12px; font-family: var(--display-sc); letter-spacing: .08em; color: var(--ink-faint); margin-left: 6px; }
.sources .snip { display: block; color: var(--ink-soft); font-size: 14.5px; font-style: italic; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.badge { display: inline-block; font-family: var(--display-sc); font-size: 12px; letter-spacing: .08em; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; }
.badge.established { color: var(--ok); } .badge.debated { color: var(--oxblood); }

/* popover */
.pop {
  position: fixed; z-index: 60; width: min(420px, calc(100vw - 32px)); max-height: 60vh; overflow: auto;
  padding: 18px 20px 16px; font-size: 16.5px; line-height: 1.5;
}
.pop[hidden] { display: none; }
.pop h4 { margin: 0 0 4px; font-family: var(--display-sc); font-weight: normal; letter-spacing: .05em; font-size: 19px; color: var(--walnut); }
.pop .status { font-size: 14px; margin-bottom: 10px; }
.pop .status.verified { color: var(--ok); } .pop .status.unconfirmed { color: var(--warn); } .pop .status.invalid { color: var(--bad); }
.pop .verse { margin: 0 0 8px; }
.pop .verse sup { font-family: var(--display); color: var(--oxblood); margin-right: 4px; }
.pop .close { all: unset; cursor: pointer; position: absolute; top: 8px; right: 12px; font-size: 22px; color: var(--ink-faint); }

/* ---------- content sections ---------- */
section.band { padding: 84px 0; }
.band-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.band-head h2 { font-family: var(--display); font-weight: normal; font-size: clamp(32px, 4vw, 46px); line-height: 1.1; margin: 10px 0 14px; color: var(--walnut-deep); }
.band-head p { color: var(--ink-soft); margin: 0; font-size: 20px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { padding: 34px 28px 28px; }
.step .num { font-family: var(--display); font-size: 48px; line-height: 1; color: var(--oxblood); }
.step h3 { font-family: var(--display-sc); font-weight: normal; letter-spacing: .05em; font-size: 22px; margin: 10px 0 8px; color: var(--walnut); }
.step p { margin: 0; color: var(--ink-soft); font-size: 18px; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 26px; margin-top: 30px; font-size: 16px; color: var(--ink-soft); }
.legend .cite { cursor: default; }

/* timeline — homage */
.timeline-band { background: linear-gradient(180deg, var(--walnut-deep), #20160e); color: #eadfc6; position: relative; overflow: hidden; }
.timeline-band::before { content: ""; position: absolute; inset: 0; background: var(--noise); opacity: .55; mix-blend-mode: overlay; }
.timeline-band .band-head h2 { color: #f3e7cb; }
.timeline-band .band-head p { color: #cdbf9f; }
.timeline { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, 1fr); gap: 0; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 46px; height: 2px; background: linear-gradient(90deg, transparent, var(--brass) 6%, var(--brass) 94%, transparent); }
.timeline li { position: relative; padding: 0 10px; text-align: center; }
.timeline .yr { font-family: var(--display); font-size: 28px; color: var(--brass-light); line-height: 1; }
.timeline .dot { width: 14px; height: 14px; margin: 12px auto 16px; border-radius: 50%; background: var(--walnut-deep); border: 2px solid var(--brass-light); box-shadow: 0 0 0 4px rgba(176, 138, 74, .18); }
.timeline li.key .dot { background: var(--brass-light); box-shadow: 0 0 0 5px rgba(217, 188, 124, .25), 0 0 22px rgba(255, 230, 170, .5); }
.timeline h4 { font-family: var(--display-sc); font-weight: normal; letter-spacing: .04em; font-size: 16px; margin: 0 0 4px; color: #f2e5c6; }
.timeline p { margin: 0; font-size: 14.5px; line-height: 1.4; color: #c2b491; }
.homage { max-width: 760px; margin: 52px auto 0; text-align: center; font-family: var(--display); font-style: italic; font-size: 23px; line-height: 1.5; color: #e8dbbd; position: relative; }
.homage cite { display: block; font-style: normal; font-family: var(--display-sc); letter-spacing: .1em; font-size: 15px; color: var(--brass); margin-top: 10px; }

.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.principle h3 { font-family: var(--display); font-weight: normal; font-size: 27px; margin: 10px 0 8px; color: var(--walnut-deep); }
.principle p { margin: 0; color: var(--ink-soft); font-size: 18px; }
.principle svg { width: 46px; height: 46px; color: var(--oxblood); }

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; gap: 28px; }
.plan { padding: 36px 34px 30px; display: flex; flex-direction: column; }
.plan.featured { background-image: var(--noise), linear-gradient(180deg, #f8efdb, #efe1c2); }
.plan .ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--oxblood); color: #fbefd8; font-family: var(--display-sc); letter-spacing: .12em; font-size: 13px; padding: 3px 14px; border: 1px solid #4a1812; white-space: nowrap; }
.plan h3 { font-family: var(--display-sc); font-weight: normal; letter-spacing: .08em; font-size: 24px; margin: 0; color: var(--walnut); }
.plan .price { font-family: var(--display); font-size: 54px; line-height: 1; margin: 12px 0 4px; color: var(--walnut-deep); }
.plan .price small { font-size: 18px; color: var(--ink-soft); font-family: var(--body); }
.plan ul { list-style: none; padding: 0; margin: 18px 0 26px; flex: 1; }
.plan li { padding: 6px 0 6px 26px; position: relative; border-bottom: 1px dotted var(--edge); font-size: 17.5px; }
.plan li::before { content: "✦"; position: absolute; left: 2px; color: var(--brass); }
.plan .btn { width: 100%; }

.faq { max-width: 780px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--edge); padding: 14px 4px; }
.faq summary { cursor: pointer; font-family: var(--display); font-size: 22px; color: var(--walnut-deep); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--brass); font-size: 26px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 4px; color: var(--ink-soft); font-size: 18px; }

/* footer */
.site-foot { background: var(--grove); color: #cfc3a6; padding: 54px 0 34px; position: relative; }
.site-foot::before { content: ""; position: absolute; inset: 0; background: var(--noise); opacity: .45; mix-blend-mode: overlay; pointer-events: none; }
.foot-grid { position: relative; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.site-foot .disclaimer { font-size: 16px; line-height: 1.55; color: #d9cdb0; }
.site-foot .colophon { font-family: var(--display); font-style: italic; font-size: 15px; color: #a99c7e; }
.site-foot a { color: var(--brass-light); }
.test-ribbon { display: inline-block; margin-top: 10px; font-family: var(--display-sc); letter-spacing: .1em; font-size: 13px; color: #1f2a19; background: var(--brass-light); padding: 2px 10px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; padding: 14px 22px; font-size: 17px; max-width: calc(100vw - 32px); }
.toast[hidden] { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; padding: 48px 0 44px; gap: 30px; }
  .desk-grid { grid-template-columns: 1fr; }
  .side { position: static; }
  .steps, .principles { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; gap: 18px; padding-left: 26px; }
  .timeline::before { left: 6px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background: linear-gradient(180deg, transparent, var(--brass) 4%, var(--brass) 96%, transparent); }
  .timeline li { text-align: left; display: grid; grid-template-columns: 76px 1fr; column-gap: 12px; padding: 0; }
  .timeline .yr { grid-row: span 2; font-size: 24px; }
  .timeline .dot { position: absolute; left: -26px; top: 6px; margin: 0; }
  .plans { grid-template-columns: minmax(0, 420px); }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 18px; }
  .nav a.hide-sm { display: none; }
  .brand-name { font-size: 21px; }
  .brand-seal { width: 32px; height: 32px; }
  .account .plan-label { display: none; }
  .answer { padding: 28px 22px 24px; }
  .answer-body { font-size: 18.5px; }
  .ask-card { padding: 24px 20px 20px; }
  section.band { padding: 60px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
  .hero-scene .shaft { animation: none !important; }
}

/* unverified "quotations" rendered as paraphrase */
.paraphrase { font-style: italic; text-decoration: underline dotted var(--warn); text-underline-offset: 4px; cursor: help; }

/* ---------- pricing toggle, three plans ---------- */
.billing-toggle { display: flex; justify-content: center; gap: 0; margin: -18px auto 34px; width: max-content; max-width: 100%; border: 1px solid var(--edge); border-radius: 999px; padding: 4px; background: rgba(255, 251, 240, .55); }
.billing-toggle button { all: unset; cursor: pointer; font-family: var(--display-sc); letter-spacing: .08em; font-size: 15px; padding: 7px 20px; border-radius: 999px; color: var(--walnut); }
.billing-toggle button[aria-pressed="true"] { background: var(--walnut); color: var(--parchment); }
.billing-toggle button:focus-visible { outline: 2px solid var(--brass); }
.billing-toggle .save { font-family: var(--body); font-style: italic; font-size: 13px; letter-spacing: 0; color: var(--oxblood); margin-left: 4px; }
.billing-toggle button[aria-pressed="true"] .save { color: var(--brass-light); }
.plans.three { grid-template-columns: repeat(3, minmax(0, 340px)); }
.plan-note { margin: 0; font-size: 15px; font-style: italic; color: var(--ink-soft); min-height: 1.4em; }
.fine { text-align: center; font-size: 15px; color: var(--ink-soft); margin: 26px auto 0; max-width: 640px; }
.foot-links { font-family: var(--display-sc); letter-spacing: .08em; font-size: 15px; }
.share-row { display: flex; gap: 8px; }
.share-row button { all: unset; cursor: pointer; padding: 3px 12px; border: 1px solid var(--edge); border-radius: 999px; font-size: 14px; }
.share-row button:hover, .share-row button:focus-visible { background: rgba(176, 138, 74, .14); }
@media (max-width: 1100px) { .plans.three { grid-template-columns: minmax(0, 420px); } }

/* ---------- inner pages ---------- */
.page { padding: 48px 0 72px; }
.page-narrow { width: min(820px, 100% - 32px); margin-inline: auto; }
.page h1 { font-family: var(--display); font-weight: normal; font-size: clamp(34px, 4.5vw, 52px); line-height: 1.08; margin: 6px 0 10px; color: var(--walnut-deep); }
.page .lede-sm { color: var(--ink-soft); font-size: 19px; margin: 0 0 30px; }
.card { padding: 30px 32px 26px; margin-bottom: 26px; }
.card h2 { font-family: var(--display-sc); font-weight: normal; letter-spacing: .06em; font-size: 22px; margin: 0 0 14px; color: var(--walnut); display: flex; align-items: center; gap: 12px; }
.card h2::after { content: ""; flex: 1; height: 1px; background: var(--edge); }
.field { display: flex; gap: 10px; flex-wrap: wrap; }
.field input { flex: 1 1 240px; font: inherit; font-size: 18px; padding: 10px 12px; border: 1px solid var(--edge); background: rgba(255, 252, 242, .7); border-radius: 2px; color: var(--ink); min-width: 0; }
.field input:focus { outline: 2px solid var(--brass); outline-offset: 1px; }
.muted { color: var(--ink-soft); font-size: 16px; }
.msg { min-height: 1.5em; font-size: 16px; margin: 10px 0 0; }
.msg.err { color: var(--bad); } .msg.ok { color: var(--ok); }
.meter { height: 10px; border: 1px solid var(--edge); background: rgba(255, 251, 240, .6); border-radius: 999px; overflow: hidden; margin: 10px 0 6px; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--moss), var(--brass)); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 4px 0 16px; font-size: 17.5px; }
.kv dt { font-family: var(--display-sc); letter-spacing: .05em; color: var(--ink-soft); }
.kv dd { margin: 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dotted var(--edge); }
.list li a { color: var(--walnut-deep); text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list li a:hover { color: var(--oxblood); text-decoration: underline; }
.list .when { font-size: 14px; color: var(--ink-faint); white-space: nowrap; }
.link-btn { all: unset; cursor: pointer; font-size: 14px; color: var(--oxblood); padding: 2px 6px; }
.link-btn:hover, .link-btn:focus-visible { text-decoration: underline; }
.btn.small { font-size: 14px; padding: 8px 16px; }
.legal h2 { font-family: var(--display); font-weight: normal; font-size: 26px; margin: 34px 0 8px; color: var(--walnut-deep); }
.legal p, .legal li { font-size: 18px; color: var(--ink); }
.legal .updated { font-family: var(--display-sc); letter-spacing: .08em; color: var(--ink-faint); font-size: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat { padding: 16px 18px; border: 1px solid var(--edge); background: rgba(255, 251, 240, .55); }
.stat b { display: block; font-family: var(--display); font-weight: normal; font-size: 34px; line-height: 1.1; color: var(--walnut-deep); }
.stat span { font-family: var(--display-sc); letter-spacing: .06em; font-size: 13px; color: var(--ink-soft); }
pre.json { white-space: pre-wrap; word-break: break-word; font-size: 13px; background: rgba(255, 251, 240, .6); border: 1px solid var(--edge); padding: 12px; max-height: 360px; overflow: auto; }
@media (max-width: 720px) { .card { padding: 24px 20px 20px; } .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dd { margin-bottom: 8px; } }

/* ---------- question modes ---------- */
.mode-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 2px 0 14px; }
.mode-toggle button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 1px; padding: 9px 12px 8px; border: 1px solid var(--edge); border-radius: 2px; background: rgba(255, 251, 240, .45); }
.mode-toggle button:hover { background: rgba(255, 251, 240, .8); }
.mode-toggle button:focus-visible { outline: 2px solid var(--brass); outline-offset: 1px; }
.mode-toggle button[aria-checked="true"] { border-color: var(--oxblood); background: rgba(122, 43, 34, .08); box-shadow: inset 0 0 0 1px var(--oxblood); }
.mode-name { font-family: var(--display-sc); letter-spacing: .05em; font-size: 16px; color: var(--walnut-deep); }
.mode-sub { font-size: 13.5px; font-style: italic; color: var(--ink-soft); }
.mode-left { font-size: 13px; color: var(--oxblood); min-height: 1.2em; }

/* ---------- threaded answers & follow-ups ---------- */
.turn + .turn { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--edge); }
.turn + .turn .answer-q::before { content: "Follow-up · "; font-family: var(--display-sc); font-style: normal; font-size: .62em; letter-spacing: .08em; color: var(--brass); vertical-align: .15em; }
.turn + .turn .answer-body > p:first-child::first-letter { float: none; font-size: inherit; color: inherit; padding: 0; font-family: inherit; line-height: inherit; }
.mode-badge { display: inline-block; margin-left: 8px; font-family: var(--display-sc); font-size: 12px; letter-spacing: .08em; color: var(--oxblood); border: 1px solid currentColor; border-radius: 999px; padding: 0 8px; vertical-align: .1em; }
.follow { margin-top: 26px; padding-top: 18px; border-top: 1px dashed var(--edge); }
.follow-label { display: block; font-family: var(--display-sc); letter-spacing: .06em; font-size: 16px; color: var(--walnut); margin-bottom: 8px; }
.follow-note { margin: 8px 0 0; font-size: 14.5px; color: var(--ink-soft); font-style: italic; }
.cite.web { text-decoration: none; }
.cite.web::after { content: "↗"; width: auto; height: auto; background: none; border-radius: 0; color: var(--ok); opacity: 1; margin-left: .25em; vertical-align: 0; font-family: var(--body); }
.cite.web.invalid::after { content: "?"; color: var(--bad); }
.sources a { display: block; padding: 6px 8px; border-radius: 2px; text-decoration: none; color: inherit; }
.sources a:hover, .sources a:focus-visible { background: rgba(176, 138, 74, .14); }

/* ---------- four plans ---------- */
.plans.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.plans.four .plan { padding: 30px 24px 24px; }
.plans.four .price { font-size: 46px; }
.plan-total { margin: 6px 0 0; font-size: 18px; color: var(--ink-soft); }
.plan-total b { font-family: var(--display); font-weight: normal; font-size: 26px; color: var(--walnut-deep); }
.modes-explain { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; max-width: 900px; margin: 34px auto 0; }
.modes-explain h4 { font-family: var(--display-sc); font-weight: normal; letter-spacing: .05em; font-size: 19px; margin: 0 0 4px; color: var(--walnut); }
.modes-explain h4 span { font-family: var(--body); font-style: italic; letter-spacing: 0; font-size: 16px; color: var(--ink-soft); }
.modes-explain p { margin: 0; color: var(--ink-soft); font-size: 17px; }
@media (max-width: 1100px) { .plans.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .plans.four, .modes-explain { grid-template-columns: 1fr; } .mode-toggle { grid-template-columns: 1fr; } }
.meter-label { margin: 12px 0 0; font-size: 15px; color: var(--ink-soft); font-family: var(--display-sc); letter-spacing: .04em; } .meter-label span { font-family: var(--body); letter-spacing: 0; }

/* ---------- compliance bits ---------- */
.ai-note { margin: 12px 0 0; font-size: 14px; color: var(--ink-soft); font-style: italic; }
.closing-bar { background: var(--oxblood-deep); color: #fbefd8; text-align: center; padding: 10px 16px; font-size: 16px; position: relative; z-index: 40; }
.closing-bar a { color: var(--brass-light); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.45; margin-top: 16px; color: var(--ink); text-transform: none; letter-spacing: 0; font-family: var(--body); }
.consent input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 16px; margin: 10px 0 16px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--edge); }
.legal-table th { font-family: var(--display-sc); font-weight: normal; letter-spacing: .04em; color: var(--walnut); }
@media (max-width: 640px) { .legal-table, .legal-table tbody, .legal-table tr, .legal-table td, .legal-table th { display: block; } .legal-table tr:first-child { display: none; } .legal-table td { border: 0; padding: 2px 0; } .legal-table tr { border-bottom: 1px solid var(--edge); padding: 8px 0; } }


/* ---------- Come, Follow Me lesson prep ---------- */
.lesson-head { max-width: 760px; }
.lesson-form { margin-top: 6px; }
.lesson-form::before { pointer-events: none; }
.lf-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px 20px; margin-bottom: 4px; }
.lf { display: grid; gap: 6px; align-content: start; min-width: 0; border: 0; padding: 0; margin: 0; }
.lf-wide { grid-column: 1 / -1; }
.lf-label { font-family: var(--display-sc); letter-spacing: .06em; font-size: 16px; color: var(--walnut); padding: 0; }
.lf-label i { font-family: var(--body); letter-spacing: 0; font-size: 14px; color: var(--ink-soft); }
.lf-help { font-size: 14px; color: var(--ink-faint); font-style: italic; min-height: 1.2em; }
.lesson-form select, .lesson-form input:not([type]), .lesson-form input[type="text"] {
  font: inherit; font-size: 17px; padding: 9px 10px; border: 1px solid var(--edge); background: rgba(255, 252, 242, .75);
  border-radius: 2px; color: var(--ink); width: 100%; box-sizing: border-box; min-width: 0; }
.lesson-form select:focus, .lesson-form input:focus { outline: 2px solid var(--brass); outline-offset: 1px; }
.lesson-form details summary { cursor: pointer; font-size: 16px; color: var(--oxblood); }
.lesson-form details[open] summary { margin-bottom: 8px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--edge); border-radius: 2px; overflow: hidden; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; text-align: center; padding: 9px 4px; font-size: 15.5px; background: rgba(255, 251, 240, .5); }
.seg label + label span { border-left: 1px solid var(--edge); }
.seg input:checked + span { background: var(--walnut); color: var(--parchment); }
.seg input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: -3px; }
.lesson-more { margin-top: 26px; text-align: center; }
.print-passages { display: none; }
.cta-lesson { display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: center; padding: 34px 38px; }
.cta-lesson h2 { font-family: var(--display); font-weight: normal; font-size: clamp(28px, 3.4vw, 40px); margin: 6px 0 8px; color: var(--walnut-deep); line-height: 1.1; }
.cta-lesson p { margin: 0 0 8px; color: var(--ink-soft); font-size: 18px; }
.cta-lesson .this-week { border-left: 3px solid var(--brass); padding: 6px 0 6px 18px; }
.cta-lesson .this-week b { display: block; font-family: var(--display); font-weight: normal; font-size: 26px; color: var(--oxblood); }
.cta-lesson .row-actions { margin-top: 14px; }
@media (max-width: 860px) { .lf-grid { grid-template-columns: 1fr; } .cta-lesson { grid-template-columns: 1fr; padding: 26px 22px; } }

/* ---------- weekly Come, Follow Me pages ---------- */
.cfm-week .answer-body h3:first-child { margin-top: 0; }
.cfm-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 26px 0 0; font-size: 17px; }
.cfm-passage { margin: 0 0 16px; }
.cfm-passage h4 { margin: 0 0 4px; font-family: var(--display-sc); font-weight: normal; letter-spacing: .04em; font-size: 17px; color: var(--walnut); }
.cfm-passage p { margin: 0 0 4px; font-size: 16.5px; line-height: 1.55; }
.cfm-passage sup { font-family: var(--display); color: var(--oxblood); margin-right: 3px; }
.cfm-list { list-style: none; padding: 0; margin: 0; }
.cfm-list li { display: grid; grid-template-columns: 70px 150px 1fr; gap: 12px; padding: 10px 6px; border-bottom: 1px dotted var(--edge); align-items: baseline; }
.cfm-list li.now { background: rgba(176, 138, 74, .14); }
.cfm-list .wk { font-family: var(--display-sc); letter-spacing: .05em; color: var(--ink-faint); font-size: 15px; }
.cfm-list .dt { font-size: 15.5px; color: var(--ink-soft); }
.cfm-list a { color: var(--walnut-deep); text-decoration: none; font-size: 18px; }
.cfm-list a:hover { color: var(--oxblood); text-decoration: underline; }
.cfm-list .soon { color: var(--ink-faint); font-size: 17px; }
@media (max-width: 640px) { .cfm-list li { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- printing a lesson ---------- */
@media print {
  @page { margin: 16mm 16mm 18mm; }
  body { background: #fff !important; color: #000; font-size: 12pt; }
  .topbar, .site-foot, .lesson-head, .lesson-form, .side, .follow, .answer-tools, .lesson-more, .closing-bar, .pop,
  .skip, #engineStatus { display: none !important; }
  .desk { padding: 0; }
  .desk-grid { display: block; }
  .paper { box-shadow: none !important; background: #fff !important; border: 0 !important; }
  .paper::before { display: none; }
  .answer { padding: 0; }
  .answer-body { font-size: 12pt; line-height: 1.45; }
  .answer-body > p:first-child::first-letter { float: none; font-size: inherit; color: inherit; padding: 0; }
  .answer-body h3 { break-after: avoid; font-size: 14pt; margin-top: 14pt; }
  .answer-body li { break-inside: avoid; }
  .cite { background: none !important; border: 0 !important; color: #000; padding: 0; }
  .cite::after { display: none; }
  .notice { display: none; }
  .print-passages { display: block; break-before: page; }
  .print-passages h2 { font-size: 15pt; font-weight: normal; margin: 0 0 10pt; }
  .print-passages .cfm-passage p { font-size: 11pt; }
  .ai-note { font-size: 9pt; margin-top: 18pt; }
  a { color: #000; text-decoration: none; }
}
.cfm-week .side .panel { max-height: calc(100vh - 110px); overflow-y: auto; }
@media (max-width: 980px) { .cfm-week .side .panel { max-height: none; } }


/* ---------- scripture cross-references ---------- */
.xref-src { border-left: 3px solid var(--oxblood); padding: 4px 0 4px 18px; margin: 4px 0 26px; }
.xref-src h2 { font-family: var(--display); font-weight: normal; font-size: clamp(28px, 3.4vw, 38px); margin: 0 0 6px; color: var(--walnut-deep); }
.xref-src p { margin: 0; font-size: 19px; line-height: 1.6; font-style: italic; }
.xref-src sup, .xref-list sup { font-family: var(--display); color: var(--oxblood); margin-right: 3px; font-style: normal; }
.xref-list { list-style: none; margin: 0; padding: 0; counter-reset: x; }
.xref-list > li { padding: 18px 0; border-top: 1px solid var(--edge); }
.xref-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.xref-head h3 { margin: 0; font-family: var(--display-sc); font-weight: normal; letter-spacing: .04em; font-size: 21px; }
.xref-head h3 a { color: var(--walnut-deep); text-decoration: none; }
.xref-head h3 a:hover { color: var(--oxblood); text-decoration: underline; }
.xref-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.xref-tags span { font-family: var(--display-sc); font-size: 12px; letter-spacing: .07em; padding: 2px 9px; border: 1px solid var(--edge); border-radius: 999px; color: var(--ink-soft); }
.xref-tags .strong { color: var(--ok); border-color: currentColor; }
.xref-expl { margin: 8px 0 6px; font-size: 18.5px; line-height: 1.6; }
.xref-why { margin: 0; font-size: 14.5px; color: var(--ink-faint); font-style: italic; }
.xref-list details { margin-top: 6px; }
.xref-list details summary { cursor: pointer; font-size: 15px; color: var(--oxblood); }
.xref-list details p { font-size: 16.5px; line-height: 1.55; margin: 6px 0 0; }
.xref-next { font-size: 15px; }
.vol-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 16px; }
.vol-list li { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--edge); padding: 3px 0; }
.vol-list li.none { color: var(--ink-faint); }
.pop .pop-more { margin: 10px 0 0; font-size: 15px; }


/* ---------- sacrament meeting talk builder ---------- */
.seg.seg5 { grid-template-columns: repeat(5, 1fr); }
.talk-page .lf-grid { grid-template-columns: 1.3fr 1fr 1fr; }
.talk-page .consent + .consent { margin-top: 10px; }
.talk-page .answer-body em { color: var(--oxblood-deep); }
@media (max-width: 860px) { .talk-page .lf-grid { grid-template-columns: 1fr; } }
@media print {
  .talk-page .answer-q, .talk-page .answer-meta { display: none; }
  .talk-page .answer-body { font-size: 15pt; line-height: 1.6; }  /* readable at the pulpit */
  .talk-page .answer-body h3 { font-size: 13pt; color: #555; }
}


/* ---------- mobile navigation menu (below 1100px the links move into a Menu dropdown) ---------- */
.nav-toggle { display: none; }
.nav a.nav-menu-only { display: none; }
.nav a { white-space: nowrap; }
@media (max-width: 1100px) {
  .topbar .wrap { position: relative; }
  .nav-toggle { all: unset; display: inline-flex; align-items: center; box-sizing: border-box; cursor: pointer;
    font-family: var(--display-sc); letter-spacing: .08em; font-size: 16px; color: #e9dcc0; padding: 10px 14px;
    min-height: 44px; border: 1px solid rgba(217, 188, 124, .45); border-radius: 2px; }
  .nav-toggle:focus-visible { outline: 2px solid var(--brass-light); outline-offset: 2px; }
  .nav-toggle[aria-expanded="true"] { background: rgba(217, 188, 124, .15); }
  .nav { display: none; }
  .nav.open { display: flex; flex-direction: column; align-items: stretch; gap: 0; position: absolute; right: 0;
    top: 100%; z-index: 60; min-width: 230px; padding: 6px 0; background: var(--walnut-deep, #2b1d13);
    border: 1px solid rgba(217, 188, 124, .35); box-shadow: 0 14px 30px rgba(0, 0, 0, .35); }
  .nav.open a, .nav.open a.hide-sm, .nav.open a.nav-menu-only { display: block; padding: 12px 18px; min-height: 44px;
    box-sizing: border-box; font-size: 17px; }
  .nav.open a + a { border-top: 1px solid rgba(217, 188, 124, .15); }
  .nav.open .account { padding: 10px 18px; }
  .cfm-nav a { display: inline-block; padding: 10px 0; }
}

.lesson-form + .lesson-form { margin-top: 22px; }
#confForm h2 { font-family: var(--display-sc); font-weight: normal; letter-spacing: .05em; font-size: 21px; margin: 0 0 6px; color: var(--walnut); }
.talk-link { font-size: 16px; margin: 14px 0 0; }

/* ---------- class handout (printed one page) ---------- */
#handoutSheet { display: none; }
@media print {
  body.printing-handout > *:not(#handoutSheet) { display: none !important; }
  body.printing-handout #handoutSheet { display: block; font-size: 12pt; line-height: 1.45; color: #000; }
  #handoutSheet h1 { font-size: 18pt; font-weight: normal; margin: 0 0 8pt; }
  #handoutSheet h2 { font-size: 13pt; margin: 12pt 0 6pt; font-weight: 600; }
  #handoutSheet .h-passage { margin: 0 0 6pt; break-inside: avoid; }
  #handoutSheet ol li { margin: 0 0 10pt; padding-bottom: 18pt; border-bottom: 1px solid #bbb; break-inside: avoid; }
  #handoutSheet .h-foot { font-size: 8.5pt; color: #444; margin-top: 14pt; }
}

/* ---------- editing and the notebook ---------- */
.edit-area { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; line-height: 1.55; padding: 12px;
  border: 1px solid var(--edge); background: rgba(255, 252, 242, .8); border-radius: 2px; color: var(--ink); }
.edit-area:focus { outline: 2px solid var(--brass); outline-offset: 1px; }
.nb-tools { margin-bottom: 18px; }
.nb-item { padding: 22px 26px; margin-bottom: 16px; }
.nb-item h2 { font-family: var(--display); font-weight: normal; font-size: 22px; margin: 0 0 4px; color: var(--walnut-deep); }
.nb-item h2 a { color: inherit; text-decoration: none; }
.nb-item h2 a:hover { text-decoration: underline; }
.nb-meta { font-size: 14px; color: var(--ink-faint); margin: 0 0 8px; }
.nb-body { font-size: 16.5px; line-height: 1.55; max-height: 9.5em; overflow: hidden; position: relative; margin: 0 0 10px; }
.nb-item textarea, .nb-item input { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 8px 10px;
  border: 1px solid var(--edge); background: rgba(255, 252, 242, .75); border-radius: 2px; margin-top: 6px; }
.nb-actions { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 8px; }

/* ---------- gifts ---------- */
.seg.seg2 { grid-template-columns: repeat(2, 1fr); }
.gift-grid { grid-template-columns: 1fr 1fr; }
@media (max-width: 860px) { .gift-grid { grid-template-columns: 1fr; } }

/* ---------- accuracy page ---------- */
.table-wrap { overflow-x: auto; }
.acc-table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; }
.acc-table th, .acc-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--edge); vertical-align: top; }
.acc-table th { font-weight: 600; }

/* ---------- v5: account allowances table ---------- */
.usage-table { display: grid; gap: 10px; margin: 14px 0 6px; }
.usage-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) minmax(0, 1fr); gap: 4px 14px; align-items: center; }
.usage-row .meter { grid-column: 1 / -1; margin: 0; }
.usage-row .u-label { font-weight: 600; }
.usage-row .u-reset { font-size: 14px; text-align: right; }
@media (max-width: 640px) { .usage-row { grid-template-columns: 1fr; } .usage-row .u-reset { text-align: left; } }
#lookupOut h3 { margin: 12px 0 4px; }

/* ---------- v5: operations console (parchment palette, denser) ---------- */
.admin { max-width: 1400px; }
.admin h1 { margin: 2px 0 10px; }
.adm-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.adm-status { font-size: 14px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-faint); vertical-align: middle; }
.dot.on { background: var(--ok, #2f5a1f); box-shadow: 0 0 0 3px rgba(47, 90, 31, .18); }
.adm-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--edge); margin: 10px 0 16px; }
.adm-tabs button { background: none; border: 1px solid transparent; border-bottom: none; padding: 8px 14px; font: inherit; font-size: 15px; cursor: pointer; color: var(--ink-soft); }
.adm-tabs button[aria-selected="true"] { background: var(--parchment); border-color: var(--edge); color: var(--walnut-deep); font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { background: var(--parchment); border: 1px solid var(--edge); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.kpi .k-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.kpi b { font-family: var(--display); font-size: 26px; font-weight: normal; color: var(--walnut-deep); }
.kpi .k-sub { font-size: 12.5px; color: var(--ink-soft); }
.adm-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.admin .paper.card { padding: 16px 18px; margin-bottom: 14px; }
.admin h3 { margin: 0 0 8px; font-size: 18px; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.adm-table th, .adm-table td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--edge); vertical-align: top; }
.adm-table th { font-weight: 600; background: rgba(184, 149, 90, .12); }
.adm-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.adm-row h3 { margin-right: auto; }
.st { font-family: Arial, sans-serif; font-size: 12px; padding: 1px 6px; border-radius: 3px; background: #eee; }
.st.queued { background: #eee; } .st.generating { background: #f6e6bf; } .st.verifying { background: #e3e9f6; }
.st.completed { background: #dbead2; color: #2f5a1f; } .st.failed { background: #f3d0cb; color: #8a1f14; }
.tag { font-size: 11px; background: var(--brass-light); padding: 0 5px; }
.feed { list-style: none; padding: 0; margin: 0; max-height: 560px; overflow: auto; font-size: 13.5px; }
.feed li { padding: 4px 0; border-bottom: 1px dotted var(--edge); }
.feed time { color: var(--ink-soft); font-family: Consolas, monospace; font-size: 12px; margin-right: 6px; }
.adm-alerts .alert { padding: 8px 12px; margin-bottom: 6px; border-left: 4px solid var(--brass); background: var(--parchment); font-size: 14px; }
.adm-alerts .alert.crit { border-color: var(--oxblood); background: #f7e3df; }
.adm-alerts .alert.info { border-color: var(--edge); }
.chart.tall svg { height: 190px; }
.legend-mini { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; margin-top: 4px; }
.legend-mini i { display: inline-block; width: 10px; height: 10px; margin-right: 4px; vertical-align: middle; }
.seg-mini button { border: 1px solid var(--edge); background: var(--parchment); padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.seg-mini button.on { background: var(--walnut); color: #fbefd8; }
.adm-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.adm-actions input, .adm-actions select { font: inherit; font-size: 14px; padding: 4px 6px; max-width: 220px; }
.defs { white-space: pre-wrap; font-size: 12.5px; }
.small { font-size: 13px; }
@media (max-width: 900px) { .adm-grid2 { grid-template-columns: 1fr; } .adm-table { display: block; overflow-x: auto; } }
