/* Rigbison site: one shared stylesheet. Tokens come from packs/exam-prep/kit/DESIGN.md.
   Fonts are self-hosted (SIL OFL 1.1, licence texts in /assets/fonts/). No JS, no third-party calls. */

@font-face { font-family: "Bricolage Grotesque"; src: url(/assets/fonts/bricolage-800.woff2) format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(/assets/fonts/atkinson-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(/assets/fonts/atkinson-700.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --paper: #FBF7EF;
  --surface: #FFFFFF;
  --surface-2: #FAF6EE;
  --cream: #F9E5C8;
  --bison: #6F2C13;
  --meadow: #88AA7B;
  --ink: #1E1A17;
  --muted: #5A5149;
  --line: rgba(30, 26, 23, 0.11);
  --ring: 0 0 0 1px var(--line);
  --lift: 0 1px 2px rgba(30, 26, 23, 0.04), 0 12px 28px -14px rgba(30, 26, 23, 0.12);
  --on-ink-muted: #E4DACB;
  --r-sm: 8px;
  --r-md: 16px;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --text: "Atkinson Hyperlegible", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.125rem/1.6 var(--text); text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
code { font: 0.9em ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--surface-2); box-shadow: var(--ring); border-radius: 4px; padding: 0.1em 0.35em; }
[id] { scroll-margin-top: 96px; }

.wrap { max-width: 1120px; margin-inline: auto; padding-inline: 24px; }
@media (max-width: 480px) { .wrap { padding-inline: 20px; } }

/* Links */
a { color: var(--bison); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: color-mix(in srgb, var(--bison) 45%, transparent); touch-action: manipulation; }
@media (hover: hover) { a:hover { text-decoration-thickness: 2px; text-decoration-color: currentColor; } }
:focus-visible { outline: 3px solid var(--bison); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 50; background: var(--bison); color: var(--paper); padding: 12px 18px; border-radius: var(--r-sm); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* Type */
h1, h2 { font-family: var(--display); font-weight: 800; color: var(--bison); letter-spacing: -0.01em; line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.125rem, 1.4rem + 3.2vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); letter-spacing: 0.005em; }
li { text-wrap: pretty; }
h3 { font: 700 1.125rem/1.3 var(--text); color: var(--ink); margin: 0 0 6px; }
p { margin: 0 0 1em; text-wrap: pretty; }
.muted { color: var(--muted); }
.small { font-size: 0.9375rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: var(--r-sm); background: var(--bison); color: var(--paper); font: 700 1rem/1.2 var(--text); text-decoration: none; border: 0; cursor: pointer; touch-action: manipulation; transition: background-color 0.15s; }
.btn-ghost { background: var(--cream); color: var(--bison); box-shadow: inset 0 0 0 1px rgba(111, 44, 19, 0.28); }
.btn-on-brown { background: var(--cream); color: var(--bison); }
@media (hover: hover) {
  .btn:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
}
.btn:focus-visible { border-radius: var(--r-sm); }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 16px; padding-block: 8px 0; }
.brand { order: 1; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--bison); text-decoration: none; font: 800 1.375rem/1 var(--display); letter-spacing: -0.01em; white-space: nowrap; }
.brand img { width: 36px; height: 36px; border-radius: 22%; flex: none; }
.pill { order: 2; display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border-radius: var(--r-sm); background: var(--bison); color: var(--paper); font: 700 0.9375rem/1 var(--text); text-decoration: none; white-space: nowrap; touch-action: manipulation; transition: background-color 0.15s; }
@media (hover: hover) { .pill:hover { background: var(--ink); text-decoration: none; } }
.nav-links { order: 3; flex: 0 0 100%; display: flex; justify-content: space-between; margin-top: 6px; border-top: 1px solid var(--line); }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font: 700 0.9375rem/1.2 var(--text); text-decoration: none; white-space: nowrap; }
.nav-links a[aria-current="page"] { color: var(--bison); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
@media (hover: hover) { .nav-links a:hover { color: var(--bison); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; } }
@media (min-width: 760px) {
  .site-header { position: sticky; top: 0; z-index: 20; }
  .bar { flex-wrap: nowrap; padding-block: 10px; }
  .nav-links { order: 2; flex: 0 1 auto; margin: 0 20px 0 auto; border: 0; gap: 28px; }
  .pill { order: 3; }
}

/* Hero (home) */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 40px 64px; align-items: center; padding-block: 72px 56px; }
.hero h1 { margin-bottom: 20px; }
.eyebrow { margin: 0 0 14px; color: var(--muted); font-weight: 700; font-size: 1rem; }
.lead { max-width: 34rem; font-size: 1.1875rem; margin-bottom: 28px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 6px; }
.quiet { margin: 0 0 14px; }
.quiet a { display: inline-block; padding: 12px 0; color: var(--muted); font-size: 0.9375rem; font-weight: 700; }
.note { color: var(--muted); font-size: 0.9375rem; max-width: 34rem; margin: 0; }
.device { margin: 0; justify-self: end; width: 100%; max-width: 332px; }
.bezel { background: var(--ink); padding: 8px; border-radius: 40px; box-shadow: 0 1px 2px rgba(30, 26, 23, 0.1), 0 28px 56px -22px rgba(30, 26, 23, 0.3); }
.bezel img { width: 100%; border-radius: 32px; background: var(--paper); }
.device figcaption { margin-top: 14px; color: var(--muted); font-size: 0.9375rem; }
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-block: 36px 28px; }
  .device { justify-self: center; max-width: 300px; }
}
@media (max-width: 480px) { .cta-row .btn { flex: 1 1 100%; } }

/* Home sections */
.section { padding-block: 56px; }
.section.tight { padding-top: 0; }
.split { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 24px 64px; align-items: start; }
.split > .lede { position: sticky; top: 96px; }
.split > .lede p { margin: 14px 0 0; color: var(--muted); font-size: 1rem; }
.point { padding-block: 24px; border-top: 1px solid var(--line); }
.point:first-child { padding-top: 0; border-top: 0; }
.point:last-child { padding-bottom: 0; }
.point h3 { font: 800 1.375rem/1.2 var(--display); color: var(--bison); letter-spacing: -0.01em; margin-bottom: 8px; }
.point p { margin: 0; }
@media (max-width: 860px) {
  .section { padding-block: 40px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .split > .lede { position: static; }
}

/* Sample questions */
.q { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--ring), var(--lift); padding: 24px 28px; }
.q + .q { margin-top: 16px; }
.tag { display: inline-block; margin: 0 0 12px; padding: 4px 12px; border-radius: 999px; background: var(--meadow); color: var(--ink); font: 700 0.875rem/1.3 var(--text); }
.stem { margin: 0 0 14px; }
.opts { list-style: upper-alpha; margin: 0 0 14px; padding-left: 1.8em; }
.opts li { margin: 6px 0; padding-left: 4px; }
.opts li::marker { color: var(--bison); font-weight: 700; }
summary { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 16px; border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px rgba(111, 44, 19, 0.3); color: var(--bison); font-weight: 700; cursor: pointer; list-style: none; touch-action: manipulation; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; width: 0.5em; height: 0.5em; margin: -0.25em 0 0 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
details[open] > summary::after { margin-top: 0.15em; transform: rotate(225deg); }
@media (hover: hover) { summary:hover { background: var(--cream); } }
summary:focus-visible { border-radius: var(--r-sm); }
.reveal { margin-top: 12px; padding: 14px 18px; background: var(--surface-2); border-radius: var(--r-sm); box-shadow: var(--ring); }
.reveal p { margin: 0; }
.reveal .cite { margin-top: 6px; color: var(--muted); font-size: 0.9375rem; }

/* Bridge + closing strip */
.bridge { border-top: 1px solid var(--line); padding-top: 48px; }
.bridge h2 { font-size: 1.5rem; }
.bridge p { margin: 0; max-width: 40rem; }
.strip { margin-block: 56px 72px; padding: 48px 40px; background: var(--cream); border-radius: var(--r-md); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.strip h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); margin-bottom: 8px; }
.strip p { margin: 0; max-width: 34rem; }
@media (max-width: 860px) { .strip { padding: 32px 24px; margin-block: 36px 48px; } .bridge { padding-top: 36px; } }
@media (max-width: 480px) { .strip .btn { width: 100%; } .q { padding: 20px; } summary { padding: 8px 12px; font-size: 0.9375rem; gap: 8px; } }

/* Reading layout (legal, guide, support, pricing body) */
.read { max-width: 740px; margin-inline: auto; padding-block: 56px 80px; }
.read.wide { max-width: 980px; }
.read.wide :is(p, li, h3) { max-width: 44rem; }
.read.wide .keypoints li { max-width: none; }
.read h1 { font-size: clamp(2rem, 1.5rem + 2.2vw, 2.75rem); margin-bottom: 16px; }
.read h2 { margin: 52px 0 14px; }
.read h3 { margin: 24px 0 4px; }
.read ul, .read ol { margin: 0 0 1em; padding-left: 1.4em; }
.read li { margin: 0.35em 0; padding-left: 0.2em; }
.read li::marker { color: var(--bison); }
.read .links, .read .sources { list-style: none; padding-left: 0; }
.read .links li, .read .sources li { margin: 0; padding: 0; }
.read .links a, .read .sources a { display: inline-block; padding: 9px 0; }
.read .sources { font-size: 1rem; }
.breadcrumb { margin: 0 0 10px; color: var(--muted); font-size: 0.9375rem; }
.breadcrumb a { display: inline-block; padding: 10px 0; }
.keypoints { background: color-mix(in srgb, var(--cream) 38%, var(--paper)); border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px 28px; margin: 32px 0; }
.keypoints h2 { margin: 0 0 12px; font-size: 1.375rem; }
.keypoints > :last-child { margin-bottom: 0; }
.read.top { padding-bottom: 0; }
.read.after { padding-top: 8px; }
.read .note { max-width: none; margin-top: 32px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 20px 0 28px; background: var(--surface); border-radius: 12px; box-shadow: var(--ring); }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
tbody tr:last-child > * { border-bottom: 0; }
thead th { background: var(--surface-2); color: var(--bison); font-weight: 700; font-size: 0.9375rem; }
tbody th { font-weight: 700; color: var(--ink); }
table:has(thead th:nth-child(4)) { min-width: 540px; }
@media (max-width: 600px) {
  table { font-size: 0.9375rem; }
  th, td { padding: 10px 8px; }
  .table-wrap:has(thead th:nth-child(4)) {
    background: linear-gradient(to right, var(--surface) 30%, transparent) left / 24px 100% no-repeat local, linear-gradient(to left, rgba(30, 26, 23, 0.22), transparent) right / 18px 100% no-repeat scroll, var(--surface);
  }
  .table-wrap:has(thead th:nth-child(4))::before { content: "Swipe left/right to see all states \2192"; display: block; position: sticky; left: 0; padding: 8px 10px; background: var(--cream); color: var(--ink); font-size: 0.875rem; font-weight: 700; }
}
.read .cta-strip { margin: 44px 0 0; padding: 28px; background: var(--cream); border-radius: var(--r-md); }
.read .cta-strip h2 { margin: 0 0 10px; font-size: 1.5rem; }
.read .cta-strip .btn { margin-top: 4px; }
@media (max-width: 480px) { .read { padding-block: 36px 56px; } .keypoints { padding: 20px; } .read .cta-strip .btn { width: 100%; } }

/* Pricing plans */
.plans { max-width: 980px; margin: 36px auto 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; padding: 32px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--ring), var(--lift); }
.plan h2 { margin: 0 0 14px; font-size: 1.5rem; }
.plan-price { margin: 0 0 4px; font: 800 2.5rem/1.05 var(--display); letter-spacing: -0.01em; color: var(--ink); }
.plan-price small { font: 700 1rem/1.3 var(--text); letter-spacing: 0; color: var(--muted); }
.plan-sub { margin: 0 0 18px; color: var(--muted); }
.plan ul { margin: 0 0 28px; padding-left: 1.2em; flex: 1; }
.plan li { margin: 0.45em 0; }
.plan .btn { align-self: flex-start; }
.plan-rec { background: var(--bison); color: var(--paper); box-shadow: 0 20px 40px -20px rgba(111, 44, 19, 0.45); }
.plan-rec h2, .plan-rec .plan-price { color: var(--cream); }
.plan-rec .plan-price small, .plan-rec .plan-sub { color: var(--cream); }
.plan-rec li::marker { color: var(--cream); }
.plan .btn-ghost { background: transparent; }
.badge { position: absolute; top: 32px; right: 32px; margin: 0; padding: 4px 12px; border-radius: 999px; background: var(--cream); color: var(--ink); font: 700 0.875rem/1.3 var(--text); }
@media (hover: hover) { .plan-rec .btn:hover { background: var(--paper); color: var(--bison); } .plan .btn-ghost:hover { background: var(--ink); } }
@media (max-width: 760px) { .plans { grid-template-columns: minmax(0, 1fr); } .plan { padding: 24px; } .badge { top: 24px; right: 24px; } .plan .btn { align-self: stretch; } }

/* 404 */
.lost { padding-block: 72px 96px; max-width: 640px; }
.lost h1 { margin-bottom: 16px; }
.lost .cta-row { margin-top: 28px; }
@media (max-width: 480px) { .lost { padding-block: 40px 64px; } }

/* Footer */
.site-footer { background: var(--ink); color: var(--paper); padding-block: 56px 40px; font-size: 1rem; }
.site-footer a { color: var(--paper); text-decoration-color: rgba(251, 247, 239, 0.4); }
.site-footer :focus-visible { outline-color: var(--cream); }
.foot { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, max-content); gap: 32px 72px; }
.foot li a { text-decoration: none; }
@media (hover: hover) { .foot li a:hover { text-decoration: underline; } }
.foot .fbrand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font: 800 1.25rem/1 var(--display); text-decoration: none; letter-spacing: -0.01em; }
.foot .fbrand img { width: 32px; height: 32px; border-radius: 22%; }
.foot p { margin: 8px 0 0; color: var(--on-ink-muted); font-size: 0.9375rem; max-width: 34rem; }
.foot h2 { font: 700 0.9375rem/1.3 var(--text); color: var(--on-ink-muted); letter-spacing: 0; margin: 0 0 4px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li a { display: inline-block; padding: 10px 0; }
@media (max-width: 860px) { .foot { grid-template-columns: repeat(3, max-content); gap: 24px 48px; } .foot > :first-child { grid-column: 1 / -1; } }
@media (max-width: 560px) { .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot > :last-child { grid-column: 1 / -1; } }
