/* Bitewing Academy
   Colour language borrowed from dental charting: red marks what needs work,
   blue marks what is sound or already done. Radiograph panels stay dark in both themes. */

:root {
  --paper: #f1f5f6;
  --card: #ffffff;
  --ink: #13202a;
  --ink-2: #44535c;
  --rule: #d2dce0;
  --rule-strong: #a9b8bf;
  --blue: #1f45a6;
  --blue-ink: #ffffff;
  --blue-soft: #e5ebf8;
  --red: #c22f2a;
  --red-soft: #fbe8e6;
  --film: #0b1115;
  --film-2: #16212a;
  --film-ink: #dde5e8;
  --film-muted: #8d9ca4;
  --focus: #1f45a6;
  --shadow: 0 1px 2px rgba(19, 32, 42, .06), 0 8px 24px rgba(19, 32, 42, .06);

  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: 16px;
  --max: 1120px;
  --radius: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b1115;
    --card: #121b21;
    --ink: #e3eaed;
    --ink-2: #9cabb3;
    --rule: #24323a;
    --rule-strong: #3a4b55;
    --blue: #93afff;
    --blue-ink: #0a1220;
    --blue-soft: #17223c;
    --red: #ff8b80;
    --red-soft: #3a1c1b;
    --film: #060a0d;
    --film-2: #121b21;
    --focus: #93afff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #0b1115;
  --card: #121b21;
  --ink: #e3eaed;
  --ink-2: #9cabb3;
  --rule: #24323a;
  --rule-strong: #3a4b55;
  --blue: #93afff;
  --blue-ink: #0a1220;
  --blue-soft: #17223c;
  --red: #ff8b80;
  --red-soft: #3a1c1b;
  --film: #060a0d;
  --film-2: #121b21;
  --focus: #93afff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--blue); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); font-stretch: 112%; color: var(--ink); margin: 0; }
h1 { font-weight: 800; font-size: clamp(2.35rem, 8.4vw, 4.4rem); line-height: .98; letter-spacing: -.025em; }
h2 { font-weight: 800; font-size: clamp(1.7rem, 5vw, 2.6rem); line-height: 1.05; letter-spacing: -.02em; }
h3 { font-weight: 700; font-size: clamp(1.2rem, 3.4vw, 1.45rem); line-height: 1.15; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 28px; } }

.mono { font-family: var(--mono); }
.label {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 20px;
  font: 700 1rem/1.2 var(--body);
  color: var(--blue-ink); background: var(--blue);
  border: 2px solid var(--blue); border-radius: 8px;
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background-color .12s ease;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--blue); }
.btn-ghost:hover { background: var(--blue-soft); filter: none; }
.btn-small { min-height: 40px; padding: 8px 14px; font-size: .92rem; }
.btn-block { width: 100%; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-mark { width: 28px; height: 20px; flex: none; }
.brand-name { font-family: var(--display); font-stretch: 112%; font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; }
.brand-name span { font-weight: 700; color: var(--ink-2); }
.nav-links { display: none; gap: 22px; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: .95rem; }
.nav-links a:hover { color: var(--blue); text-decoration: underline; }
@media (min-width: 900px) { .nav-links { display: flex; } }
.theme-toggle {
  width: 40px; height: 40px; display: inline-grid; place-items: center;
  border: 1px solid var(--rule-strong); border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer;
}
.theme-toggle svg { width: 18px; height: 18px; }

/* Hero */
.hero { padding-block: 36px 28px; }
.hero .wrap { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) {
  .hero { padding-block: 72px 48px; }
  .hero .wrap { grid-template-columns: 1.05fr 1fr; gap: 56px; }
}
.hero .label { margin-bottom: 16px; color: var(--blue); }
.hero h1 span { display: block; color: var(--ink-2); }
.lede { font-size: clamp(1.08rem, 2.6vw, 1.22rem); margin-top: 20px; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-actions .btn { flex: 1 1 200px; }
@media (min-width: 560px) { .hero-actions .btn { flex: 0 0 auto; } }
.hero-note { margin-top: 16px; font-size: .95rem; color: var(--ink-2); }

.film { margin: 0; }
.film-frame {
  background: var(--film); border-radius: 22px; padding: 0; box-shadow: var(--shadow);
  outline: 1px solid color-mix(in srgb, var(--rule-strong) 60%, transparent); outline-offset: 6px;
}
.film-svg { display: block; width: 100%; height: auto; }
.film figcaption { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 18px; font-size: .9rem; color: var(--ink-2); }
.key { display: inline-flex; align-items: center; gap: 7px; }
.key-red, .key-blue { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.key-red { border: 2.5px solid var(--red); }
.key-blue { background: var(--blue); border-radius: 3px; }

.r-base { fill: #0a1013; }
.r-bone { fill: #3b474e; }
.r-enamel { fill: #e6edef; }
.r-dentin { fill: #9eabb1; }
.r-pulp { fill: #2b363c; }
.r-resto { fill: #ffffff; }
.r-lesion { fill: #2f3a40; }
.r-frame { fill: none; stroke: #2a363d; stroke-width: 2; }
.r-dot { fill: #1b252b; stroke: #56656d; stroke-width: 1.5; }
.mark-red { fill: none; stroke: #ff5a4e; stroke-width: 3; }
.mark-red-line { stroke: #ff5a4e; stroke-width: 2; }
.mark-blue-line { stroke: #7f9cff; stroke-width: 2; }
.tag rect { stroke-width: 0; }
.tag text { font: 600 12.5px var(--mono); text-anchor: middle; letter-spacing: .04em; }
.tag-red rect { fill: #ff5a4e; }
.tag-red text { fill: #1a0605; }
.tag-blue rect { fill: #7f9cff; }
.tag-blue text { fill: #07102a; }

@media (prefers-reduced-motion: no-preference) {
  .r-teeth, .r-bone-wrap { animation: develop 1.6s cubic-bezier(.2, .7, .2, 1) both; }
  .r-bone-wrap { animation-duration: 1.1s; }
  .mark-red, .mark-red-line, .tag-red, .mark-blue-line, .tag-blue { animation: mark-in .5s ease-out 1.3s both; }
}
@keyframes develop { from { opacity: 0; } 40% { opacity: .35; } to { opacity: 1; } }
@keyframes mark-in { from { opacity: 0; } to { opacity: 1; } }

.disclaimer-strip { border-block: 1px solid var(--rule); background: var(--card); }
.disclaimer-strip p { margin: 0; padding-block: 12px; font-size: .9rem; color: var(--ink-2); }

/* Sections */
.section { padding-block: clamp(56px, 9vw, 104px); border-bottom: 1px solid var(--rule); }
.section-head { max-width: 44em; margin-bottom: clamp(28px, 5vw, 48px); }
.section-head p { margin-top: 14px; color: var(--ink-2); }

/* How it works */
.how-row { display: grid; gap: 22px; padding-block: 28px; border-top: 1px solid var(--rule); }
.how-row:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 900px) {
  .how-row { grid-template-columns: 5fr 7fr; gap: 56px; padding-block: 44px; align-items: start; }
}
.how-row .label { display: block; margin-bottom: 10px; }
.how-row h3 { margin-bottom: 12px; }

.case-demo { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.case-demo .vignette { font-size: .98rem; padding-bottom: 14px; border-bottom: 1px dashed var(--rule-strong); margin-bottom: 6px; }
.case-demo ol { list-style: none; margin: 0; padding: 0; position: relative; }
.case-demo ol::before { content: ""; position: absolute; left: 15px; top: 14px; bottom: 14px; width: 2px; background: var(--rule-strong); }
.case-demo li { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; padding-block: 8px; font-size: .96rem; }
.case-demo .qn {
  position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--card); border: 2px solid var(--blue);
  font: 600 .78rem var(--mono); color: var(--blue);
}
.case-demo .warn { display: block; margin-top: 4px; font-size: .86rem; color: var(--red); }
.case-demo .warn::before { content: ""; display: inline-block; width: 10px; height: 10px; border: 2px solid var(--red); border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.case-demo .timing { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: .88rem; color: var(--ink-2); }

.report { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.report-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.report-row { padding-block: 10px; border-top: 1px solid var(--rule); }
.report-row:first-of-type { border-top: 0; }
.report-meta { display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; }
.report-meta strong { font-weight: 700; }
.report-meta .w { color: var(--ink-2); font-family: var(--mono); font-size: .8rem; white-space: nowrap; }
.bar { position: relative; height: 12px; margin-top: 8px; background: var(--paper); border-radius: 3px; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--blue); }
.bar.below i { background: var(--red); }
.bar::after { content: ""; position: absolute; top: -5px; bottom: -5px; left: 60%; width: 2px; background: var(--ink); }
.c1 i { width: 54%; } .c2 i { width: 71%; } .c3 i { width: 66%; } .c4 i { width: 63%; }
.score { font-family: var(--mono); font-weight: 600; }
.below-text { color: var(--red); }
.report-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: .92rem; }
.report-foot .small { display: block; margin-top: 6px; color: var(--ink-2); font-size: .84rem; }

.stamp {
  border: 2px solid var(--blue); border-radius: 8px; padding: 16px 18px; color: var(--ink);
  background: var(--card); max-width: 30rem; font-family: var(--mono); font-size: .88rem; line-height: 1.5;
}
.stamp .label { color: var(--blue); display: block; margin-bottom: 8px; }
.stamp ul { margin: 0 0 12px; padding-left: 1.1em; }
.stamp li { margin-bottom: 4px; }
.stamp .date { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px dashed var(--rule-strong); padding-top: 10px; }

.rules { margin-top: 36px; display: grid; gap: 14px; padding: 0; list-style: none; }
@media (min-width: 900px) { .rules { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.rules li { border-left: 3px solid var(--blue); padding: 2px 0 2px 14px; font-size: .97rem; }
.rules strong { display: block; font-family: var(--display); font-stretch: 112%; font-size: 1.02rem; margin-bottom: 2px; }

/* Sample case */
.case-card {
  position: relative; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 22px 18px 18px; box-shadow: var(--shadow); margin-bottom: 22px;
}
.case-card::before {
  content: ""; position: absolute; top: 12px; left: 12px; width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid var(--rule-strong);
}
.case-card .label { display: block; margin: 0 0 6px 10px; }
.case-card h3 { margin-bottom: 12px; }
.case-scenario p { margin-bottom: .8em; }

.quiz { display: grid; gap: 18px; }
.q { margin: 0; padding: 18px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); min-width: 0; }
.q legend { padding: 0; margin-bottom: 12px; float: left; width: 100%; }
.q legend + * { clear: both; }
.q-num { display: block; font-family: var(--mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 4px; }
.q-stem { display: block; font-weight: 700; font-size: 1.05rem; }
.opts { display: grid; gap: 8px; }
.opt {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start;
  padding: 12px 14px; border: 1.5px solid var(--rule); border-radius: 8px; cursor: pointer; background: var(--card);
}
.opt:hover { border-color: var(--rule-strong); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt-letter {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--rule-strong); font: 600 .82rem var(--mono); color: var(--ink-2);
}
.opt:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.opt:has(input:checked) .opt-letter { background: var(--blue); border-color: var(--blue); color: var(--blue-ink); }
.opt:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.opt.is-locked { cursor: default; }
/* Locked (checked) states must beat the :has(input:checked) selection styles above. */
.opt.is-locked.is-correct { border-color: var(--blue); background: var(--blue-soft); }
.opt.is-locked.is-correct .opt-letter { background: var(--blue); border-color: var(--blue); color: var(--blue-ink); }
.opt.is-locked.is-wrong { border-color: var(--red); background: var(--red-soft); }
.opt.is-locked.is-wrong .opt-letter { background: transparent; border: 2.5px solid var(--red); color: var(--red); }
.opt-tag { grid-column: 2; font-family: var(--mono); font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; }
.is-correct .opt-tag { color: var(--blue); }
.is-wrong .opt-tag { color: var(--red); }

.q-feedback { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--rule-strong); font-size: .98rem; }
.fb-verdict { font-weight: 700; }
.fb-verdict.ok { color: var(--blue); }
.fb-verdict.no { color: var(--red); }
.fb-near { margin: 12px 0; padding: 12px 14px; background: var(--paper); border-radius: 8px; }
.fb-near h4 { margin: 0 0 4px; font-size: .95rem; }
.fb-ref { font-family: var(--mono); font-size: .84rem; color: var(--ink-2); }
.fb-ref span { text-transform: uppercase; letter-spacing: .06em; margin-right: 6px; }

.quiz-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.quiz-status { margin: 0; color: var(--ink-2); font-size: .95rem; }
.quiz-status.is-error { color: var(--red); }

.quiz-result {
  margin-bottom: 22px; padding: 20px 18px; border: 2px solid var(--blue); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow);
}
.quiz-result:focus { outline: none; }
.result-score { font-family: var(--display); font-stretch: 112%; font-weight: 800; font-size: clamp(1.6rem, 6vw, 2.2rem); line-height: 1.1; margin-bottom: 10px; }
.pips { display: flex; gap: 8px; margin-bottom: 14px; list-style: none; padding: 0; }
.pips li { width: 22px; height: 22px; border-radius: 50%; }
.pips .ok { background: var(--blue); }
.pips .no { border: 3px solid var(--red); }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* Pricing */
.price-top { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 28px; }
.price-top .section-head { margin-bottom: 0; }
.currency { display: inline-flex; border: 1.5px solid var(--rule-strong); border-radius: 9px; padding: 3px; background: var(--card); }
.currency label { position: relative; }
.currency input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.currency span { display: block; min-width: 64px; padding: 9px 12px; text-align: center; border-radius: 6px; font: 600 .9rem var(--mono); color: var(--ink-2); }
.currency input:checked + span { background: var(--ink); color: var(--paper); }
.currency input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }

.tiers { display: grid; gap: 16px; }
@media (min-width: 680px) { .tiers { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .tiers { grid-template-columns: repeat(4, 1fr); } }
.tier { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px 18px; box-shadow: var(--shadow); }
.tier .label { margin-bottom: 8px; }
.tier h3 { margin-bottom: 12px; }
.price { font-family: var(--display); font-stretch: 112%; font-weight: 800; font-size: 2.1rem; line-height: 1; letter-spacing: -.02em; }
.price-note { min-height: 1.4em; margin: 6px 0 0; font-size: .88rem; color: var(--blue); font-weight: 700; }
.tier ul { margin: 16px 0 20px; padding: 0; list-style: none; flex: 1; }
.tier li { position: relative; padding-left: 20px; margin-bottom: 8px; font-size: .96rem; }
.tier li::before { content: ""; position: absolute; left: 0; top: .5em; width: 9px; height: 9px; background: var(--blue); border-radius: 2px; }
.tier .when { margin: -6px 0 16px; font-size: .9rem; color: var(--ink-2); }
.price-small { margin-top: 22px; font-size: .92rem; color: var(--ink-2); max-width: 52em; }

/* Dates */
.dates { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.dates li { display: grid; grid-template-columns: 1fr; gap: 2px 24px; padding-block: 16px; border-bottom: 1px solid var(--rule); }
@media (min-width: 680px) { .dates li { grid-template-columns: 14rem 1fr auto; align-items: baseline; } }
.dates time { font-family: var(--mono); font-weight: 600; font-size: 1rem; }
.dates .what { font-size: 1rem; }
.dates .sitting { color: var(--ink-2); font-size: .92rem; }
.date-status { justify-self: start; font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; }
.date-status.next { background: var(--blue); color: var(--blue-ink); }
.date-status.now { background: var(--red); color: #fff; }
.dates li.is-past { color: var(--ink-2); }
.dates li.is-past time { text-decoration: line-through; text-decoration-thickness: 1px; }
.dates-note { margin-top: 16px; font-size: .92rem; color: var(--ink-2); }

/* FAQ */
.faq { border-top: 1px solid var(--rule); max-width: 50rem; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative;
  font-family: var(--display); font-stretch: 112%; font-weight: 700; font-size: 1.08rem; line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform .15s;
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq .answer { padding-bottom: 18px; }

/* Register band */
.register-band { padding-block: clamp(48px, 8vw, 88px); }
.register-band .wrap { display: grid; gap: 18px; align-items: center; }
@media (min-width: 900px) { .register-band .wrap { grid-template-columns: 1fr auto; } }
.register-band p { color: var(--ink-2); margin-top: 10px; }

/* Dialog + form */
dialog.sheet {
  width: min(600px, 100%); max-height: calc(100dvh - 16px); padding: 0; border: 0; border-radius: 14px;
  background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
dialog.sheet::backdrop { background: rgba(6, 10, 13, .6); }
@media (max-width: 599px) {
  dialog.sheet { margin: auto 0 0; max-width: 100%; width: 100%; border-radius: 14px 14px 0 0; max-height: 94dvh; }
}
.sheet-inner { padding: 20px 18px 24px; }
@media (min-width: 600px) { .sheet-inner { padding: 28px; } }
.sheet-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.sheet-head p { margin: 6px 0 0; color: var(--ink-2); font-size: .95rem; }
.sheet-close { flex: none; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--rule-strong); background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.sheet-close svg { width: 16px; height: 16px; }

.field { margin-bottom: 16px; }
.field > label, .field legend { display: block; font-weight: 700; font-size: .96rem; margin-bottom: 6px; padding: 0; }
.field .opt-l { font-weight: 400; color: var(--ink-2); }
.hint { display: block; font-size: .86rem; color: var(--ink-2); margin-top: 4px; }
fieldset.field { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.input, .select {
  width: 100%; min-height: 48px; padding: 11px 12px; font: 400 1rem var(--body); color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--rule-strong); border-radius: 8px; appearance: none;
}
.select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px;
}
.input:focus, .select:focus { border-color: var(--blue); outline: 3px solid color-mix(in srgb, var(--blue) 30%, transparent); outline-offset: 0; }
.field.has-error .input, .field.has-error .select { border-color: var(--red); }
.field-error { display: block; color: var(--red); font-size: .88rem; margin-top: 5px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: block; padding: 10px 14px; min-height: 44px; border: 1.5px solid var(--rule-strong); border-radius: 8px; font-size: .95rem; background: var(--paper); }
.chip input:checked + span { border-color: var(--blue); background: var(--blue-soft); color: var(--ink); font-weight: 700; box-shadow: inset 0 0 0 1px var(--blue); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.field.has-error .chip span { border-color: var(--red); }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; margin-bottom: 12px; font-size: .96rem; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--blue); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-small { font-size: .86rem; color: var(--ink-2); margin: 14px 0 16px; }
.form-status { margin-top: 12px; font-size: .95rem; }
.form-status.is-error { color: var(--red); font-weight: 700; }
.success h2 { margin-bottom: 12px; }
.success .mono { font-size: .9rem; }

/* Footer */
.site-footer { background: var(--film); color: var(--film-ink); padding-block: 48px 40px; }
.site-footer a { color: #b7c8ff; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr; gap: 56px; } }
.site-footer .brand { color: var(--film-ink); margin-bottom: 14px; }
.site-footer .brand-name span { color: var(--film-muted); }
.footer-disclaimer { font-size: .9rem; color: var(--film-muted); max-width: 46em; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .95rem; }
.footer-base { margin-top: 32px; padding-top: 18px; border-top: 1px solid #23313a; font-size: .85rem; color: var(--film-muted); }

/* Document pages (ledger, privacy, terms) */
.doc-hero { padding-block: 44px 28px; border-bottom: 1px solid var(--rule); }
.doc-hero .label { display: block; margin-bottom: 12px; color: var(--blue); }
.doc-hero p { margin-top: 16px; max-width: 46em; font-size: 1.08rem; }
.doc { padding-block: 36px 72px; }
.doc .wrap > * { max-width: 46em; }
.doc h2 { font-size: clamp(1.35rem, 4vw, 1.7rem); margin: 36px 0 12px; }
.doc h2:first-child { margin-top: 0; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 6px; }
.updated { font-family: var(--mono); font-size: .86rem; color: var(--ink-2); }

.ledger { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); max-width: none !important; }
.ledger > li { display: grid; gap: 8px 32px; padding-block: 22px; border-bottom: 1px solid var(--rule); }
@media (min-width: 900px) { .ledger > li { grid-template-columns: 15rem 1fr 9rem; } }
.ledger .when { font-family: var(--mono); font-weight: 600; }
.ledger .src { display: block; font-family: var(--display); font-stretch: 112%; font-weight: 700; font-size: 1.1rem; line-height: 1.25; margin-bottom: 6px; }
.ledger .change ul { margin: 6px 0 8px; }
.ledger .cite { font-size: .9rem; }
.ledger .checked { font-family: var(--mono); font-size: .84rem; color: var(--ink-2); }
.ledger .status { display: inline-block; margin-bottom: 4px; padding: 2px 8px; border-radius: 4px; background: var(--blue-soft); color: var(--blue); font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; }
.ledger .status.watch { background: var(--red-soft); color: var(--red); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* Brand mark: a film with an occlusal line */
.bm-film { fill: currentColor; }
.bm-line { fill: none; stroke: var(--paper); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.bm-dot { fill: var(--paper); }
.site-footer .bm-line { stroke: var(--film); }
.site-footer .bm-dot { fill: var(--film); }

/* Small phones: keep the header on one line */
.brand-name, .btn-small { white-space: nowrap; }
@media (max-width: 419px) {
  .site-header .wrap { gap: 8px; }
  .site-header .brand-name span { display: none; }
}
.price-note:empty { display: none; }
dialog.sheet.is-done .sheet-head > div { visibility: hidden; }
h1, h2, h3, .faq summary { text-wrap: balance; }
.doc-hero p.updated { font-size: .86rem; margin-top: 12px; }
