/* =====================================================================
   Charter · the style
   The official document, made friendly: Fraunces headlines with a soft
   italic for the plain fact, Libre Franklin for reading and DM Mono for
   field labels, on security paper with a drawn guilloche, one seal red,
   a document navy and a holographic foil seal.
   Signature pieces: the guilloche (.guilloche, drawn by charter.js), the
   specimen record (.record-card: a card that fills itself in, with a foil
   seal that follows the pointer), the route (.route: every step names
   who does it: you, the doctor or the state), rubber stamps (.stamp),
   the state chooser (.statepick) and microprint rules (.micro).
   Motion: html.calm stills everything (footer switch, remembered as
   "site-motion"; default from prefers-reduced-motion).
   ===================================================================== */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html:focus-within { scroll-behavior: smooth; }
html.calm:focus-within { scroll-behavior: auto; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--fs-body)/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--seal-soft); color: var(--ink); }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: var(--r-s); background: var(--ink); color: var(--paper); font-weight: 700; text-decoration: none; transition: top var(--d) var(--ease); }
.skip:focus { top: 12px; }

/* ---------- type ---------- */
.h1, .h2, .h3 { font-family: var(--display); color: var(--ink); text-wrap: balance; font-optical-sizing: auto; }
.h1 { font-size: var(--fs-h1); line-height: 1; font-weight: 600; letter-spacing: -0.03em; font-variation-settings: "SOFT" 30, "WONK" 0; }
.h2 { font-size: var(--fs-h2); line-height: 1.04; font-weight: 600; letter-spacing: -0.025em; font-variation-settings: "SOFT" 30; }
.h3 { font-size: var(--fs-h3); line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
.h1 em, .h2 em, .h3 em { font-style: italic; font-weight: 500; color: var(--seal); font-variation-settings: "SOFT" 100, "WONK" 1; }
.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--ink-2); max-width: 56ch; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-small); }
/* the eyebrow: a form number */
.tag { display: inline-flex; align-items: center; gap: 10px; font: 500 var(--fs-label)/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tag b { font-weight: 500; color: var(--seal); padding-right: 10px; border-right: 1px solid var(--line); }
.num, .code { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.prose p + p { margin-top: 1em; }
.prose a, .link { color: var(--seal); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose a:hover, .link:hover { color: var(--seal-2); }

/* microprint: a rule made of tiny repeated text */
.micro { min-width: 0; overflow: hidden; white-space: nowrap; font: 500 7px/1 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--guilloche); user-select: none; }
.micro::before { content: attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text) " " attr(data-text); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px; border-radius: var(--r-pill); border: 1.5px solid transparent; font: 600 16px/1 var(--body); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform var(--d-fast) var(--ease), background var(--d-fast), border-color var(--d-fast), color var(--d-fast), box-shadow var(--d-fast); }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform var(--d) var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn-seal { background: var(--seal); color: var(--on-seal); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 8px 18px -10px var(--seal); }
.btn-seal:hover { background: var(--seal-2); }
.btn-line { border-color: color-mix(in srgb, var(--ink) 35%, transparent); background: transparent; color: var(--ink); }
.btn-line:hover { border-color: var(--ink); background: var(--card); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14.5px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- the notice bar ---------- */
.noticebar { background: var(--navy); color: #eef0fa; }
.noticebar .wrap { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 38px; padding-block: 8px; text-align: center; font: 500 13.5px/1.4 var(--body); }
.noticebar b { font: 500 10.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: #c3cbff; }
:root[data-theme="dark"] .noticebar { background: #1f2650; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .noticebar { background: #1f2650; } }
.noticebar a { color: inherit; }
.noticebar :focus-visible { outline-color: #fff; }
@media (max-width: 560px) { .noticebar b { display: none; } }

/* ---------- header and phone menu ---------- */
.nav { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2); border-bottom: 1px solid var(--line); }
.nav-in { position: relative; display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
/* the mark: a little embossed seal */
.brand-mark { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, var(--seal) 0 7.5deg, var(--seal-2) 7.5deg 15deg); box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--seal); }
.brand-mark::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--on-seal) 70%, transparent); background: radial-gradient(circle at 35% 30%, color-mix(in srgb, #fff 35%, transparent), transparent 60%); }
.brand-word { font: 600 22px/1 var(--display); letter-spacing: -0.02em; font-variation-settings: "SOFT" 50; }
.brand-sub { display: block; font: 500 10.5px/1.2 var(--mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a { position: relative; padding: 10px 13px; text-decoration: none; font: 500 15.5px/1 var(--body); color: var(--ink-2); border-radius: var(--r-pill); transition: color var(--d-fast), background var(--d-fast); }
.nav-links a:hover { color: var(--ink); background: var(--well); }
.nav-links a[aria-current="page"] { color: var(--seal); }
.nav-links a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: currentColor; }
.menu-btn { display: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer; place-items: center; }
.menu-btn i, .menu-btn i::before, .menu-btn i::after { display: block; width: 18px; height: 1.8px; background: var(--ink); position: relative; transition: transform var(--d) var(--ease), background var(--d-fast); }
.menu-btn i::before, .menu-btn i::after { content: ""; position: absolute; left: 0; }
.menu-btn i::before { top: -6px; } .menu-btn i::after { top: 6px; }
.menu-btn[aria-expanded="true"] i { background: transparent; }
.menu-btn[aria-expanded="true"] i::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] i::after { transform: translateY(-6px) rotate(-45deg); }
/* the phone menu: a numbered form */
.site-menu { position: absolute; left: 0; right: 0; top: 100%; display: grid; padding: 12px var(--gutter) 22px; background: var(--card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-doc); animation: ch-unfold var(--d) var(--ease) both; transform-origin: 50% 0; }
.site-menu a { display: grid; grid-template-columns: 56px 1fr; align-items: baseline; gap: 8px; padding: 14px 0; border-bottom: 1px dashed var(--line); text-decoration: none; font: 600 25px/1.1 var(--display); letter-spacing: -0.02em; color: var(--ink); }
.site-menu a::before { content: attr(data-no); font: 500 11px/1 var(--mono); letter-spacing: 0.08em; color: var(--seal); }
.site-menu a[aria-current="page"] { color: var(--seal); }
.site-menu .btn { display: flex; margin-top: 18px; border-bottom: 0; font: 600 17px/1 var(--body); color: var(--on-seal); }
.site-menu .btn::before { display: none; }
@keyframes ch-unfold { from { opacity: 0; transform: perspective(800px) rotateX(-14deg); } }
html.calm .site-menu { animation: none; }
@media (max-width: 980px) { .nav-links { display: none; } .menu-btn { display: grid; } }
@media (max-width: 560px) { .nav .nav-cta { display: none; } }
@media (min-width: 981px) { .site-menu { display: none !important; } }

/* ---------- sections ---------- */
.section { position: relative; padding-block: clamp(64px, 9vw, 116px); }
.section.alt { background: var(--well); }
.section.alt::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: var(--line); }
.section-head { display: grid; gap: 16px; justify-items: start; max-width: 760px; margin-bottom: clamp(30px, 4.5vw, 56px); }
.section-head.center { margin-inline: auto; justify-items: center; text-align: center; }
.section-head.center .lead { margin-inline: auto; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 980px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.grid-2.lean { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 900px) { .grid-2.lean { grid-template-columns: 1fr; } }

/* ---------- the guilloche ---------- */
.guilloche { position: absolute; pointer-events: none; color: var(--guilloche); }
.guilloche svg { width: 100%; height: 100%; overflow: visible; }
.guilloche g { transform-origin: 50% 50%; transform-box: fill-box; }
html:not(.calm) .guilloche .g1 { animation: ch-turn 160s linear infinite; }
html:not(.calm) .guilloche .g2 { animation: ch-turn 220s linear infinite reverse; }
@keyframes ch-turn { to { transform: rotate(360deg); } }
.guilloche path { fill: none; stroke: currentColor; stroke-width: 0.7; vector-effect: non-scaling-stroke; }
.guilloche .g2 path { stroke: color-mix(in srgb, var(--seal) 30%, var(--guilloche)); opacity: 0.7; }

/* ---------- hero ---------- */
.hero { position: relative; padding-block: clamp(36px, 6vw, 88px) clamp(60px, 8vw, 110px); overflow-x: clip; }
.hero > .guilloche { width: min(860px, 120vw); aspect-ratio: 1; right: -18%; top: 50%; translate: 0 -50%; opacity: 0.9; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero-copy { display: grid; gap: 22px; justify-items: start; min-width: 0; }
.hero-facts { display: grid; gap: 8px; font: 400 14px/1.4 var(--mono); color: var(--ink-2); }
.hero-facts li { display: flex; gap: 10px; align-items: baseline; }
.hero-facts li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--seal); transform: translateY(-1px); }
@media (max-width: 1000px) { .hero-grid { grid-template-columns: 1fr; } .hero > .guilloche { right: -40%; top: 72%; } }

/* ---------- the specimen record (signature) ---------- */
.record-card { --rx: 0deg; --ry: 0deg; --fx: 30%; --fy: 25%; position: relative; justify-self: center; width: min(520px, 100%); aspect-ratio: 1.586; perspective: 1200px; }
.record-card .sheet { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; border-radius: var(--r-l); background: var(--card); box-shadow: var(--shadow-doc), 0 0 0 1px var(--line); overflow: hidden; transform: rotateX(var(--ry)) rotateY(var(--rx)); transition: transform 500ms var(--ease); }
html.calm .record-card .sheet { transform: none; transition: none; }
.record-card .sheet::before { content: ""; position: absolute; inset: 0; background: repeating-radial-gradient(circle at 110% 120%, transparent 0 9px, color-mix(in srgb, var(--guilloche) 45%, transparent) 9px 10px), repeating-radial-gradient(circle at -10% -20%, transparent 0 13px, color-mix(in srgb, var(--guilloche) 30%, transparent) 13px 14px); pointer-events: none; }
.record-head { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; background: var(--navy); color: #eef0fa; }
:root[data-theme="dark"] .record-head { background: #262f66; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .record-head { background: #262f66; } }
.record-head b { font: 600 17px/1.1 var(--display); letter-spacing: -0.01em; }
.record-head span { font: 500 10px/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: #c3cbff; text-align: right; }
.record-body { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 18px; padding: 18px 20px 6px; align-content: start; }
.record-body dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.record-body dl > div { min-width: 0; }
.record-body dl > .wide { grid-column: 1 / -1; }
.record-body dt { font: 500 9.5px/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.record-body dd { margin: 2px 0 0; min-height: 1.35em; font: 500 15px/1.35 var(--mono); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px dotted var(--line); }
.record-body dd.typing::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 1px; vertical-align: -2px; background: var(--seal); animation: ch-caret 700ms steps(1) infinite; }
@keyframes ch-caret { 50% { opacity: 0; } }
.record-foot { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 20px; height: 34px; border-top: 1px solid var(--line); }
.record-foot .micro { flex: 1; min-width: 0; }
.record-foot .code { flex: none; font-size: 11px; color: var(--muted); letter-spacing: 0.06em; }
/* the foil seal: shifts with the pointer */
.foil { position: relative; width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle at var(--fx) var(--fy), rgba(255, 255, 255, 0.95), transparent 38%), conic-gradient(from 40deg, var(--foil-1), var(--foil-2), var(--foil-3), var(--foil-1), var(--foil-2), var(--foil-3), var(--foil-1)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 2px 6px rgba(26, 33, 64, 0.25); -webkit-mask: repeating-conic-gradient(#000 0 6deg, rgba(0, 0, 0, 0.88) 6deg 12deg); mask: repeating-conic-gradient(#000 0 6deg, rgba(0, 0, 0, 0.88) 6deg 12deg); transition: background-position var(--d); }
.foil::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; border: 1px solid rgba(26, 33, 64, 0.35); background: repeating-radial-gradient(circle, transparent 0 3px, rgba(26, 33, 64, 0.12) 3px 4px); }
.foil::after { content: attr(data-mark); position: absolute; inset: 0; display: grid; place-items: center; font: 600 italic 22px/1 var(--display); color: rgba(26, 33, 64, 0.72); font-variation-settings: "SOFT" 100, "WONK" 1; }
/* the signature draws itself once the fields are in */
.sig { grid-column: 1 / -1; align-self: end; display: grid; gap: 4px; justify-items: start; }
.sig svg { width: 150px; height: 34px; overflow: visible; }
.sig path { fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 420; stroke-dashoffset: 0; }
.js .sig[data-after] path { stroke-dashoffset: 420; transition: stroke-dashoffset 1300ms var(--ease); }
.js .sig[data-after].entered path { stroke-dashoffset: 0; }
html.calm .sig path { stroke-dashoffset: 0 !important; transition: none !important; }
.sig span { padding-top: 4px; min-width: 200px; border-top: 1px solid var(--line); font: 500 9.5px/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
/* phones: the card grows to fit; the seal sits beside the signature */
@media (max-width: 560px) {
  .record-card { aspect-ratio: auto; }
  .record-card .sheet { position: relative; }
  .record-body { padding: 16px 16px 12px; }
  .record-body dl { grid-column: 1 / -1; }
  .record-body dd { font-size: 13.5px; }
  .sig { grid-column: 1; grid-row: 2; }
  .sig span { min-width: 0; }
  .foil { grid-column: 2; grid-row: 2; width: 64px; height: 64px; align-self: start; }
  .foil::before { inset: 6px; }
  .foil::after { font-size: 17px; }
  .record-card .specimen { right: 10px; bottom: 40px; font-size: 10.5px; padding: 5px 10px; }
  .record-head, .record-foot { padding-inline: 16px; }
}
/* the specimen overprint */
.record-card .specimen { position: absolute; right: 18px; bottom: 44px; z-index: 2; }

/* ---------- rubber stamps ---------- */
.stamp { --rot: -8deg; display: inline-grid; place-items: center; padding: 7px 14px; border: 2.5px solid currentColor; border-radius: 6px; color: var(--seal); font: 500 12.5px/1.1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; text-align: center; transform: rotate(var(--rot)); mix-blend-mode: multiply; opacity: 0.9; }
:root[data-theme="dark"] .stamp { mix-blend-mode: normal; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stamp { mix-blend-mode: normal; } }
.stamp.navy { color: var(--navy); }
.stamp.ok { color: var(--ok); }
.js .stamp[data-enter], .js .stamp[data-after] { opacity: 0; transform: rotate(var(--rot)) scale(1.08); transition: none; }
.js .stamp[data-enter].entered, .js .stamp[data-after].entered { animation: ch-thunk 420ms var(--stamp) both; }
@keyframes ch-thunk { 0% { opacity: 0; transform: rotate(var(--rot)) scale(1.08); } 60% { opacity: 0.95; transform: rotate(var(--rot)) scale(0.96); } 100% { opacity: 0.9; transform: rotate(var(--rot)) scale(1); } }
html.calm .stamp[data-enter], html.calm .stamp[data-after] { opacity: 0.9 !important; transform: rotate(var(--rot)) !important; animation: none !important; }

/* ---------- the route: who does each step ---------- */
.route { position: relative; display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.route::before { content: ""; position: absolute; left: 24px; right: 24px; top: 23px; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 11px); }
.route::after { content: ""; position: absolute; left: 24px; top: 23px; height: 2px; width: calc((100% - 48px) * var(--p, 0)); background: var(--seal); transition: width 1600ms var(--ease); }
html.calm .route::after { transition: none; }
.route > li { position: relative; display: grid; gap: 10px; align-content: start; counter-increment: step; }
.route > li::before { content: counter(step); position: relative; z-index: 1; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--line); font: 500 16px/1 var(--mono); color: var(--muted); transition: background var(--d) var(--ease), border-color var(--d), color var(--d), transform var(--d) var(--stamp); }
.route > li.done::before { background: var(--seal); border-color: var(--seal); color: var(--on-seal); transform: scale(1.06); }
.route h3 { font: 600 19px/1.25 var(--display); letter-spacing: -0.01em; margin-top: 4px; }
.route p { font-size: 15.5px; color: var(--ink-2); }
.who { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: var(--r-pill); font: 500 10.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; background: var(--well); color: var(--ink-2); border: 1px solid var(--line); }
.who::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.who.you { color: var(--ink-2); }
.who.pract { color: var(--seal); background: var(--seal-soft); border-color: transparent; }
.who.state { color: var(--navy); background: var(--navy-soft); border-color: transparent; }
@media (max-width: 900px) {
  .route { grid-template-columns: 1fr; gap: 0; }
  .route::before, .route::after { left: 23px; right: auto; top: 24px; bottom: 24px; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--line) 0 6px, transparent 6px 11px); }
  .route::after { background: var(--seal); height: calc((100% - 48px) * var(--p, 0)); bottom: auto; transition-property: height; }
  .route > li { grid-template-columns: 48px 1fr; column-gap: 18px; padding-bottom: 26px; }
  .route > li::before { grid-row: 1 / span 3; }
  .route > li > * { grid-column: 2; }
}

/* ---------- the state chooser ---------- */
.statepick { display: grid; gap: 18px; }
.statepick-tabs { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--line); justify-self: start; }
.statepick-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 0; border-radius: var(--r-pill); background: transparent; cursor: pointer; font: 600 15px/1 var(--body); color: var(--ink-2); transition: background var(--d-fast), color var(--d-fast); }
.statepick-tabs button b { font: 500 11px/1 var(--mono); letter-spacing: 0.08em; color: var(--muted); }
.statepick-tabs button:hover { background: var(--well); }
.statepick-tabs button[aria-pressed="true"] { background: var(--navy); color: #eef0fa; }
.statepick-tabs button[aria-pressed="true"] b { color: #c3cbff; }
:root[data-theme="dark"] .statepick-tabs button[aria-pressed="true"] { background: #2b3577; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .statepick-tabs button[aria-pressed="true"] { background: #2b3577; } }
@media (max-width: 520px) {
  .statepick-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); justify-self: stretch; border-radius: 20px; }
  .statepick-tabs button { justify-content: center; padding: 10px 4px; font-size: 14px; border-radius: 16px; }
  .statepick-tabs button b { display: none; }
}
[data-state-panel].in { animation: ch-rise 450ms var(--ease) both; }
@keyframes ch-rise { from { opacity: 0; transform: translateY(10px); } }
html.calm [data-state-panel].in { animation: none; }

/* ---------- document cards ---------- */
.doc { position: relative; display: grid; gap: 12px; align-content: start; padding: 26px 24px 24px; border-radius: var(--r-m); background: var(--card); box-shadow: var(--shadow-card), 0 0 0 1px var(--line); min-width: 0; }
.doc .no { font: 500 10.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--seal); }
.doc h3 { font: 600 21px/1.2 var(--display); letter-spacing: -0.01em; }
.doc p { color: var(--ink-2); font-size: 16px; }
.doc ul { display: grid; gap: 7px; font-size: 15.5px; color: var(--ink-2); }
.doc ul li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; }
.doc ul li::before { content: ""; width: 9px; height: 9px; margin-top: 8px; border-radius: 50%; border: 1.5px solid var(--seal); }
/* a perforated stub at the top */
.doc.stub { padding-top: 34px; }
.doc.stub::before { content: ""; position: absolute; left: 14px; right: 14px; top: 16px; height: 2px; background: radial-gradient(circle, var(--line) 1.2px, transparent 1.6px) 0 50% / 8px 2px repeat-x; }

/* ---------- the fee panel ---------- */
.fee { display: grid; gap: 4px; padding: 20px 22px; border-radius: var(--r-m); background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.fee .k { font: 500 10.5px/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.fee b { font: 600 38px/1.1 var(--display); letter-spacing: -0.02em; font-variant-numeric: lining-nums; }
.fee p { font-size: 15.5px; color: var(--ink-2); }
.fee.state { background: var(--navy-soft); box-shadow: none; }
.fee.state b { color: var(--navy); font-size: 26px; }

/* ---------- facts, notices ---------- */
.facts { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 0; border-radius: var(--r-m); background: var(--card); box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.facts > div { display: grid; gap: 6px; align-content: start; padding: 22px 22px; min-width: 0; }
.facts > div + div { border-left: 1px dashed var(--line); }
.facts .k { font: 500 10.5px/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--seal); }
.facts b { font: 600 22px/1.15 var(--display); letter-spacing: -0.015em; }
.facts p { font-size: 15.5px; color: var(--ink-2); }
@media (max-width: 900px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .facts > div:nth-child(3) { border-left: 0; } .facts > div:nth-child(n+3) { border-top: 1px dashed var(--line); } }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } .facts > div + div { border-left: 0; border-top: 1px dashed var(--line); } }
.notice { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; padding: 18px 20px; border-radius: var(--r-m); background: var(--navy-soft); font-size: 16px; color: var(--ink-2); }
.notice svg { width: 20px; height: 20px; color: var(--navy); margin-top: 3px; }
.notice b { color: var(--ink); }
.notice.seal { background: var(--seal-soft); }
.notice.seal svg { color: var(--seal); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 880px; }
.faq details { border-radius: var(--r-m); background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.faq summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 18px 22px; font: 600 19px/1.3 var(--display); letter-spacing: -0.01em; border-radius: var(--r-m); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); background: linear-gradient(var(--seal), var(--seal)) center / 10px 1.6px no-repeat, linear-gradient(var(--seal), var(--seal)) center / 1.6px 10px no-repeat; transition: transform var(--d) var(--ease); }
.faq details[open] summary::after { transform: rotate(135deg); }
.faq details > div { padding: 0 22px 20px; color: var(--ink-2); max-width: 72ch; }

/* ---------- closing ---------- */
.close { padding-block: clamp(56px, 8vw, 100px); }
.close-card { position: relative; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: 30px; align-items: end; padding: clamp(28px, 5vw, 60px); border-radius: var(--r-l); background: #1d2656; color: #eef0fa; overflow: hidden; isolation: isolate; }
.close-card > .guilloche { width: 620px; aspect-ratio: 1; right: -160px; top: -200px; color: #3b4796; z-index: -1; opacity: 0.85; }
.close-card > .guilloche .g2 path { stroke: #6a3f72; }
.close-card .h2 { color: #fff; }
.close-card .h2 em { color: var(--close-em, #ffb0bc); }
.close-card p { color: #c9cde2; max-width: 52ch; margin-top: 14px; }
.close-card .tag { color: #aab1d6; }
.close-card .tag b { color: var(--close-em, #ffb0bc); border-right-color: #3b4796; }
.close-card .btn-seal { background: #fff; color: #1d2656; box-shadow: none; }
.close-card .btn-seal:hover { background: #f6dfe4; }
.close-card .btn-line { border-color: rgba(238, 240, 250, 0.5); color: #eef0fa; }
.close-card .btn-line:hover { background: rgba(255, 255, 255, 0.08); border-color: #eef0fa; }
.close-card :focus-visible { outline-color: #fff; }
@media (max-width: 860px) { .close-card { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.foot { padding-block: 56px 30px; border-top: 1px solid var(--line); background: var(--well); }
.foot > .micro { margin-top: -56px; margin-bottom: 48px; padding-top: 6px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.foot h4 { font: 500 var(--fs-label)/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.foot ul { display: grid; gap: 9px; }
.foot a { text-decoration: none; color: var(--ink-2); }
.foot a:hover { color: var(--seal); }
.licence { margin-top: 28px; padding: 14px 16px; border-radius: var(--r-s); background: var(--card); box-shadow: 0 0 0 1px var(--line); font: 400 12px/1.7 var(--mono); color: var(--muted); }
.licence b { color: var(--ink); font-weight: 500; }
.foot-base { display: flex; flex-wrap: wrap; gap: 14px 24px; justify-content: space-between; align-items: center; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }
.foot-switches { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- switch ---------- */
.switch { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--card); cursor: pointer; font: 500 14.5px/1 var(--body); color: var(--ink-2); }
.switch .sw { position: relative; flex: none; width: 38px; height: 22px; border-radius: var(--r-pill); background: var(--well); box-shadow: inset 0 0 0 1px var(--line); transition: background var(--d-fast); }
.switch .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: transform var(--d) var(--ease); }
.switch[aria-checked="true"] .sw { background: var(--seal); box-shadow: none; }
.switch[aria-checked="true"] .sw::after { transform: translateX(16px); background: #fff; }

/* ---------- reveal on scroll ---------- */
.js [data-enter]:not(.stamp) { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.js [data-enter]:not(.stamp).entered { opacity: 1; transform: none; }
html.calm [data-enter] { opacity: 1 !important; transform: none !important; transition: none !important; }
html.calm .stamp[data-enter] { transform: rotate(var(--rot)) !important; }

/* =====================================================================
   Multi-page kit
   ===================================================================== */
.page-head { position: relative; padding-block: clamp(30px, 4.5vw, 64px) clamp(34px, 4.5vw, 60px); border-bottom: 1px solid var(--line); overflow: clip; }
.page-head > .guilloche { width: 520px; aspect-ratio: 1; right: -120px; top: -160px; opacity: 0.8; }
.page-head .wrap { position: relative; }
.page-head .h1 { font-size: clamp(38px, 5vw, 68px); margin-top: 16px; }
.page-head .lead { margin-top: 16px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font: 500 11.5px/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--seal); }
.crumbs span[aria-hidden] { opacity: 0.6; }

.field { display: grid; gap: 7px; min-width: 0; }
.field > span, .field-set > legend { font: 600 15.5px/1.25 var(--body); color: var(--ink); }
.field small, .field-set > legend small { color: var(--muted); font: 400 14px/1.35 var(--body); }
.field input, .field textarea, .field select { width: 100%; min-height: 50px; padding: 12px 15px; border-radius: var(--r-s); border: 1px solid color-mix(in srgb, var(--ink) 25%, var(--line)); background: var(--card); color: var(--ink); transition: box-shadow var(--d-fast), border-color var(--d-fast); }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
.field [aria-invalid="true"] { border-color: var(--seal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--seal) 20%, transparent); }
.field select { appearance: none; -webkit-appearance: none; padding-right: 44px; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(-45deg, transparent 50%, var(--ink) 50%); background-size: 6px 6px; background-position: right 22px center, right 16px center; background-repeat: no-repeat; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field-wide { grid-column: 1 / -1; }
@media (max-width: 620px) { .fields { grid-template-columns: 1fr; } }
fieldset.field-set { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 10px; }
fieldset.field-set > legend { padding: 0; margin-bottom: 10px; }
fieldset.field-set > .seg { justify-self: start; }
.form-card { display: grid; gap: 22px; padding: clamp(22px, 3.5vw, 38px); border-radius: var(--r-l); background: var(--card); box-shadow: var(--shadow-doc), 0 0 0 1px var(--line); }
.form-done { padding: 16px 18px; border-radius: var(--r-m); background: var(--navy-soft); color: var(--ink); font-weight: 600; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; color: var(--ink-2); cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--seal); }

.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.choice { position: relative; display: block; cursor: pointer; min-width: 0; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice > span { display: grid; gap: 3px; height: 100%; padding: 15px 17px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--card); transition: border-color var(--d-fast), background var(--d-fast), box-shadow var(--d-fast); }
.choice > span b { font: 600 17px/1.2 var(--display); }
.choice > span small { color: var(--muted); font-size: 14.5px; }
.choice:hover > span { border-color: color-mix(in srgb, var(--ink) 40%, var(--line)); }
.choice input:checked + span { border-color: var(--seal); box-shadow: 0 0 0 1px var(--seal); background: color-mix(in srgb, var(--seal-soft) 45%, var(--card)); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--card); }
.seg button, .seg label { position: relative; padding: 9px 15px; border: 0; border-radius: var(--r-pill); background: transparent; cursor: pointer; font: 500 14.5px/1 var(--body); color: var(--ink-2); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg button:hover, .seg label:hover { background: var(--well); }
.seg button[aria-pressed="true"], .seg label:has(input:checked) { background: var(--ink); color: var(--paper); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

input.range { --p: 50%; appearance: none; -webkit-appearance: none; width: 100%; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--seal) 0 var(--p), var(--line) var(--p) 100%); cursor: pointer; }
input.range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--card); border: 2px solid var(--seal); box-shadow: var(--shadow-card); }
input.range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--card); border: 2px solid var(--seal); }

.table { overflow-x: auto; border-radius: var(--r-m); background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.table table { width: 100%; border-collapse: collapse; font-size: 16px; }
.table caption { caption-side: bottom; text-align: left; padding: 12px 18px; font: 400 12px/1.5 var(--mono); color: var(--muted); }
.table th, .table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child > * { border-bottom: 0; }
.table thead th { font: 500 10.5px/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); background: var(--well); border-bottom: 1px solid var(--line); }
.table tbody th { font: 600 16.5px/1.35 var(--display); }
.table td { color: var(--ink-2); }
.table .r { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 680px) {
  .table.stack table, .table.stack tbody, .table.stack tr, .table.stack td, .table.stack th { display: block; }
  .table.stack table { display: flex; flex-direction: column; }
  .table.stack caption { display: block; order: 1; }
  .table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table.stack tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table.stack td, .table.stack th { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 12px; border: 0; padding: 4px 0; text-align: left !important; }
  .table.stack th[scope="row"] { display: block; }
  .table.stack td::before { content: attr(data-label); font: 500 10.5px/1.5 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
}

@media print { .nav, .foot-switches, .menu-btn, .site-menu, .guilloche { display: none !important; } body { background: #fff; } }
