/* STATE.REPORT V7 — "registry ledger" interface, light and dark.
   Paper ground, navy ink, the brand red used only as a position mark.
   Headings in Song/serif (the convention of official Chinese documents); body in system sans;
   registration numbers in tabular figures. No gradients-as-decoration, glows, glass or icon tiles.
   Every colour is a variable; html[data-theme="dark"] swaps the set. */

:root {
  color-scheme: light;
  --ink: #17263c;
  --ink-2: #364559;
  --muted: #5f6977;
  --faint: #8a919a;
  --paper: #f3f3ef;
  --sheet: #ffffff;
  --well: #f7f7f4;
  --hover: #fafaf8;
  --rule: #dcddd6;
  --rule-2: #c3c5bc;
  --accent: #c8233a;
  --accent-soft: rgba(200,35,58,.07);
  --good: #2d6a47;
  --warn: #8a5a0e;
  --bad: #a13a30;
  --bad-bg: #fbf1ef;
  --warn-bg: #faf4e8;
  --primary: #24406a;
  --primary-hover: #1b3255;
  --on-primary: #ffffff;
  --rail-bg: #17263c;
  --rail-ink: #b9c1cc;
  --rail-faint: #7f8a99;
  --rail-line: rgba(255,255,255,.08);
  --rail-hover: rgba(255,255,255,.045);
  --rail-active: rgba(255,255,255,.075);
  --night: #01021e;
  --shadow: rgba(23,38,60,.14);
  --scrim: rgba(23,38,60,.42);
  --tint: rgba(23,38,60,.06);
  --highlight: #f3e2b5;
  --r1: 2px;
  --r2: 4px;
  --r3: 6px;
  --rail: 216px;
  --context: 248px;
  --top: 60px;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "Noto Serif SC", Georgia, "Times New Roman", "SimSun", serif;
  --line: var(--rule);
  --font: var(--sans);
  --radius: var(--r3);
  --brass: var(--accent);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e6eaf0;
  --ink-2: #c1c9d4;
  --muted: #8f9bac;
  --faint: #6c7889;
  --paper: #0e1622;
  --sheet: #142030;
  --well: #182537;
  --hover: #172334;
  --rule: #233145;
  --rule-2: #34455d;
  --accent: #ee4a5e;
  --accent-soft: rgba(238,74,94,.1);
  --good: #6cbf92;
  --warn: #dfae57;
  --bad: #ec7c71;
  --bad-bg: rgba(236,124,113,.1);
  --warn-bg: rgba(223,174,87,.1);
  --primary: #e6eaf0;
  --primary-hover: #ffffff;
  --on-primary: #0e1622;
  --rail-bg: #0a1019;
  --rail-ink: #aab3c0;
  --rail-faint: #6c7889;
  --rail-line: rgba(255,255,255,.06);
  --night: #01021e;
  --shadow: rgba(0,0,0,.45);
  --scrim: rgba(2,6,12,.66);
  --tint: rgba(255,255,255,.06);
  --highlight: #5b4a1d;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: var(--sans); }
body { background: var(--paper); color: var(--ink); font-size: 14px; line-height: 1.7; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; opacity: .45; }
button svg { pointer-events: none; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
input, select, textarea { min-width: 0; }
a, button, input, select, summary { outline: none; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: var(--r1); }
.rail a:focus-visible, .rail button:focus-visible { outline-color: #fff; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.35; letter-spacing: 0; color: var(--ink); }
h1, h2 { font-family: var(--serif); font-weight: 700; }
h1 { font-size: 30px; }
h2 { font-size: 20px; }
h3 { font-size: 15px; font-weight: 600; }
p { margin-bottom: 14px; }
small { font-size: 12px; }
img { max-width: 100%; height: auto; }
figure { margin: 0; }
[hidden] { display: none !important; }
table, .entity-code, .order-id, .plan-price, .context-value, .quota-num, time { font-variant-numeric: tabular-nums; }
svg.icon { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
svg.icon.lg { width: 22px; height: 22px; }
/* Buttons and links say what they do; trailing arrows are noise. */
.btn .i-arrow, .text-btn .i-arrow, .state-card-foot .i-arrow { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip { position: fixed; top: -60px; left: 20px; z-index: 1000; background: var(--sheet); color: var(--ink); padding: 10px 14px; border: 1px solid var(--ink); }
.skip:focus { top: 10px; }
.eyebrow { display: none; }
.subtle, .muted { color: var(--muted); }
.attention { color: var(--warn); }

/* ---------- application frame ---------- */
.app { height: 100dvh; display: grid; grid-template-columns: var(--rail) minmax(0,1fr) var(--context); grid-template-rows: minmax(0,1fr) auto; background: var(--paper); overflow: hidden; }
.app.no-context { grid-template-columns: var(--rail) minmax(0,1fr); }
.app.no-context .context { display: none; }

/* rail */
.rail { grid-column: 1; grid-row: 1 / -1; min-height: 0; background: var(--rail-bg); color: var(--rail-ink); z-index: 30; display: flex; flex-direction: column; position: relative; overflow: visible; }
.brand { height: 76px; display: flex; align-items: center; padding: 0 22px; flex-shrink: 0; }
.brand-logo { display: block; height: 19px; width: auto; }
.brand-mark { display: none; width: 34px; height: 34px; border-radius: 9px; }
.nav-scroll { overflow-y: auto; overflow-x: hidden; padding: 6px 0 12px; flex: 1; scrollbar-width: none; }
.nav-group { margin: 22px 22px 6px; font-size: 12px; color: var(--rail-faint); white-space: nowrap; }
.nav-divider { height: 1px; margin: 10px 22px; background: var(--rail-line); }
.nav-group:first-child { margin-top: 6px; }
.nav-link { position: relative; display: flex; gap: 12px; align-items: center; width: 100%; min-height: 40px; padding: 8px 22px; color: var(--rail-ink); font-size: 14px; white-space: nowrap; text-align: left; transition: color .15s, background-color .15s; }
.nav-link svg { width: 17px; height: 17px; color: var(--rail-faint); transition: color .15s; }
.nav-link:hover { color: #fff; background: var(--rail-hover); }
.nav-link:hover svg { color: var(--rail-ink); }
.nav-link.active { color: #fff; background: var(--rail-active); }
.nav-link.active svg { color: #fff; }
.nav-link.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; background: var(--brass); }
.nav-label { overflow: hidden; text-overflow: ellipsis; }
.rail-bottom { padding: 12px 14px 14px; border-top: 1px solid var(--rail-line); }
.rail-controls { display: flex; justify-content: flex-end; align-items: center; }
.rail-collapse { width: 30px; height: 30px; display: grid; place-items: center; color: var(--rail-faint); border-radius: var(--r2); }
.rail-collapse:hover { color: #fff; background: var(--rail-active); }
.rail-collapse svg { width: 17px; height: 17px; }
.rail-promo, .rail-foot { display: none; }

/* viewport + topbar */
.viewport { grid-column: 2; grid-row: 1; min-width: 0; min-height: 0; overflow: auto; scrollbar-gutter: stable; position: relative; scroll-behavior: smooth; }
.topbar { position: sticky; top: 0; z-index: 15; height: var(--top); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 32px; background: var(--paper); border-bottom: 1px solid var(--rule); }
.breadcrumbs { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; min-width: 0; white-space: nowrap; overflow: hidden; }
.breadcrumbs a { display: inline-flex; color: var(--muted); }
.breadcrumbs a:hover { color: var(--ink); }
.breadcrumbs strong { color: var(--ink); font-weight: 500; max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.breadcrumbs .icon { width: 14px; height: 14px; color: var(--faint); }
.top-actions { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.top-actions > .text-btn { color: var(--ink-2); font-size: 13px; }
.lang-switch { display: inline-flex; align-items: center; height: 32px; padding: 2px; gap: 2px; border: 1px solid var(--rule-2); border-radius: 6px; background: var(--sheet); font-size: 13px; }
.lang-switch a { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 4px; color: var(--ink-2); line-height: 1; white-space: nowrap; transition: background-color .15s, color .15s; }
.lang-switch a:not(.active):hover { background: var(--tint); color: var(--ink); }
.lang-switch a.active { background: var(--primary); color: var(--on-primary); font-weight: 600; }
.lang-switch .lang-globe { width: 15px; height: 15px; margin: 0 2px 0 6px; color: var(--muted); }
.avatar { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-size: 13px; font-weight: 600; flex-shrink: 0; }
.user-trigger { display: flex; align-items: center; gap: 8px; font-size: 13px; max-width: 260px; color: var(--ink); padding: 4px 0; }
.user-trigger .user-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-trigger > svg { width: 15px; height: 15px; color: var(--muted); }
.menu-mobile, .icon-btn.menu-mobile, .top-logo, .rail .rail-close, .rail-theme { display: none; }
#user-menu { position: relative; }
.account-menu { position: absolute; z-index: 70; right: 0; top: calc(100% + 10px); min-width: 240px; max-width: calc(100vw - 32px); padding: 6px; background: var(--sheet); border: 1px solid var(--rule-2); border-radius: var(--r3); box-shadow: 0 12px 32px var(--shadow); }
.account-menu-email { padding: 10px 10px 12px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; border-bottom: 1px solid var(--rule); margin-bottom: 6px; }
.account-menu a, .account-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; font-size: 13px; text-align: left; border-radius: var(--r2); color: var(--ink); }
.account-menu a:hover, .account-menu button:hover { background: var(--well); }
.account-menu svg { width: 16px; height: 16px; color: var(--muted); }

/* page */
.page { padding: 36px 40px 56px; min-height: calc(100% - var(--top)); max-width: 1240px; margin: 0 auto; }
.page-title { margin-bottom: 6px; }
.page-deck { color: var(--muted); margin: 0; max-width: 680px; }
.stack { display: grid; gap: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; min-width: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.span-2 { grid-column: span 2; }
.mt { margin-top: 24px; }
.mb { margin-bottom: 24px; }
.hairline { height: 1px; background: var(--rule); margin: 20px 0; }
.tag-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-size: 13px; color: var(--muted); }

/* context column */
.context { grid-column: 3; grid-row: 1 / -1; overflow-y: auto; min-height: 0; border-left: 1px solid var(--rule); padding: 0 22px 24px; background: var(--paper); scrollbar-width: thin; }
.context:empty { display: none; }
.context-title { position: sticky; top: 0; display: flex; gap: 8px; align-items: center; height: var(--top); margin: 0 0 14px; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--paper); border-bottom: 1px solid var(--rule); }
.context-title .icon { width: 16px; height: 16px; color: var(--muted); }
.context-card { padding: 0 0 18px; margin-bottom: 18px; border-bottom: 1px solid var(--rule); }
.context-card:last-child { border-bottom: 0; }
.context-card h3 { font-size: 13px; margin: 0 0 10px; }
.context-card p { font-size: 13px; line-height: 1.75; color: var(--muted); margin: 0 0 10px; }
.context-card p:last-child { margin: 0; }
.context-card .btn { width: 100%; margin-top: 10px; }
.context-value { font-family: var(--serif); font-size: 28px; font-weight: 700; line-height: 1.2; }
.context-value small { font-family: var(--sans); color: var(--muted); font-size: 12px; font-weight: 400; }
.context-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; color: var(--muted); font-size: 13px; padding: 8px 0; }
.context-row strong { font-weight: 600; color: var(--ink); text-align: right; }
.context-row + .context-row { border-top: 1px solid var(--rule); }
.context-step { display: flex; gap: 10px; padding: 10px 0; align-items: flex-start; }
.context-step + .context-step { border-top: 1px solid var(--rule); }
.step-icon { color: var(--muted); flex-shrink: 0; padding-top: 2px; }
.step-icon .icon { width: 16px; height: 16px; }
.context-step strong { font-size: 13px; font-weight: 500; display: block; }
.context-step small { color: var(--muted); display: block; margin-top: 2px; }
.context-step:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.context-kicker { font-size: 12px; color: var(--muted); margin: 20px 0 8px; }
.context-cover { height: 96px; width: 100%; object-fit: cover; border-radius: var(--r2); margin-bottom: 12px; }
.context-empty { font-size: 13px; color: var(--muted); }
.context .context-close { display: none; }
.toc-list { display: flex; flex-direction: column; }
.toc-list a { display: flex; gap: 8px; padding: 6px 0 6px 12px; font-size: 13px; line-height: 1.6; color: var(--muted); border-left: 1px solid var(--rule); }
.toc-list a:hover { color: var(--ink); }
.toc-list a.active { color: var(--ink); }
.toc-no { font-size: 12px; color: var(--faint); min-width: 18px; font-variant-numeric: tabular-nums; }
.reading-progress { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 8px; }

/* footer */
.site-footer { grid-column: 2 / -1; grid-row: 2; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 40px; border-top: 1px solid var(--rule); background: var(--paper); font-size: 12px; line-height: 1.6; color: var(--muted); z-index: 10; }
.footer-left { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.footer-word { display: inline-flex; align-items: center; }
.footer-word img { height: 13px; width: auto; display: block; }
.logo-dark { display: none !important; }
html[data-theme="dark"] .logo-light { display: none !important; }
html[data-theme="dark"] .logo-dark { display: block !important; }
.footer-nav { display: flex; align-items: center; gap: 18px; white-space: nowrap; }
.footer-nav a, .footer-nav button { color: var(--muted); font-size: 12px; }
.footer-nav a:hover, .footer-nav button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-disclaimer { color: var(--ink-2); font-size: 14px; line-height: 1.9; }
.legal-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 40px; padding: 8px 18px; font-size: 14px; font-weight: 500; line-height: 1.4; white-space: nowrap; border: 1px solid var(--rule-2); border-radius: var(--r2); background: var(--sheet); color: var(--ink); transition: background-color .15s, border-color .15s, color .15s; }
.btn:hover:not(:disabled) { border-color: var(--ink); }
.btn .icon { width: 16px; height: 16px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.secondary { background: var(--sheet); color: var(--ink); }
.btn.soft { background: var(--well); color: var(--ink); border-color: var(--rule-2); }
.btn.sm { min-height: 32px; padding: 5px 12px; font-size: 13px; }
.text-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 4px; }
.text-btn:hover { text-decoration-color: var(--ink); }
.text-btn .icon { width: 14px; height: 14px; }
.icon-btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r2); color: var(--ink-2); }
.icon-btn:hover { background: var(--tint); color: var(--ink); }
.context-toggle { display: none !important; }
.no-context .context-toggle { display: none !important; }

/* status stamps */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 7px; font-size: 12px; line-height: 1.6; white-space: nowrap; color: var(--ink-2); border: 1px solid currentColor; border-radius: var(--r1); background: transparent; }
.badge.good { color: var(--good); }
.badge.warn { color: var(--warn); }
.badge.bad { color: var(--bad); }
.badge.neutral { color: var(--muted); }

/* sheets — the one surface type */
.panel, .paper { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r3); padding: 28px; min-width: 0; color: var(--ink); }
.panel > h2, .paper > h2 { font-size: 19px; margin-bottom: 14px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.section-head h2, .section-head h3 { margin: 0; }
.section-head small { color: var(--muted); font-size: 13px; }
.section-title { font-size: 19px; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field-inline label { font-size: 13px; color: var(--ink-2); }
.input, .field input, .field select, .field .select-button, .field-inline select { width: 100%; height: 44px; padding: 0 12px; background: var(--sheet); border: 1px solid var(--rule-2); border-radius: var(--r2); color: var(--ink); font-size: 14px; line-height: 1.5; transition: border-color .15s, box-shadow .15s; }
.field input::placeholder, .directory-search input::placeholder { color: var(--faint); }
.input:focus, .field input:focus, .field select:focus, .field-inline select:focus, .field .select-button:focus-visible { border-color: var(--control-focus); box-shadow: none; outline: none; }
.field .select-button { display: flex; align-items: center; gap: 8px; text-align: left; }
.field .select-button > span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field .select-button svg { width: 15px; height: 15px; color: var(--muted); }
.field-inline { display: flex; align-items: center; gap: 8px; }
.field-inline select { width: auto; height: 34px; padding: 0 8px; font-size: 13px; }
.form-help { display: flex; gap: 7px; align-items: flex-start; font-size: 13px; color: var(--muted); margin-top: 14px; line-height: 1.7; }
.form-help svg { width: 15px; height: 15px; margin-top: 3px; }
.form-help a { color: var(--ink); text-decoration: underline; }
.form-errors { margin-top: 14px; padding: 9px 12px; font-size: 13px; color: var(--bad); background: var(--bad-bg); border-left: 2px solid var(--bad); }
.checkbox-line { display: flex; align-items: flex-start; gap: 9px; color: var(--ink-2); font-size: 13px; margin-top: 14px; }
.checkbox-line input { margin-top: 4px; accent-color: var(--ink); }
.checkbox-line a { text-decoration: underline; }
.checkout-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checkout-field-grid .wide { grid-column: 1 / -1; }
.modal .checkout-field-grid .field { margin-bottom: 0; }
.segmented { display: inline-flex; gap: 22px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); }
.segmented button { position: relative; padding: 4px 0 10px; font-size: 14px; color: var(--muted); }
.segmented button:hover { color: var(--ink); }
.segmented button.active { color: var(--ink); font-weight: 600; }
.segmented button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }

/* ---------- home: a framed photograph, then the guides set on paper ---------- */
.page.home-page { padding-top: 32px; }
.home-plate { position: relative; display: flex; align-items: flex-start; min-height: clamp(320px, 36vw, 460px); overflow: hidden; color: var(--ink); background: var(--line) 62% 100% / cover no-repeat; border-bottom: 1px solid var(--ink); }
.home-plate-copy { position: relative; max-width: 620px; padding: clamp(28px, 3vw, 44px) 0; }
html[data-theme="dark"] .home-plate { background-image: var(--line-dark); }
.home-plate h1 { margin: 0 0 12px; font-size: clamp(32px, 3.4vw, 46px); line-height: 1.22; color: inherit; letter-spacing: .01em; }
.home-plate-copy p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--muted); }
.home-guides-wrap { margin-top: 40px; }
.home-guides-wrap > h2 { margin: 0; padding-bottom: 12px; font-size: 20px; border-bottom: 1px solid var(--ink); }
.home-guides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-guide { position: relative; display: flex; flex-direction: column; padding: 26px 32px 30px 0; color: var(--ink); }
.home-guide + .home-guide { padding-left: 32px; border-left: 1px solid var(--rule); }
.home-guide::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.home-guide:hover::before, .home-guide:focus-visible::before { transform: scaleX(1); }
.hg-fact { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.hg-fact b { font-family: var(--serif); font-size: 30px; line-height: 1; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.home-guide h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 22px; font-weight: 700; line-height: 1.35; }
.home-guide p { flex: 1; margin: 0 0 18px; font-size: 14px; line-height: 1.8; color: var(--muted); }
.hg-go { font-size: 13px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 4px; }

/* ---------- search: the core of the site ---------- */
.page.query-page { max-width: none; padding: 0; }
.qs-stage { position: relative; color: var(--ink); border-bottom: 1px solid var(--rule); }
.qs-inner { max-width: 1240px; margin: 0 auto; padding: 48px 40px 36px; }
.search-page-title { margin: 0 0 28px; }
.search-page-title h1 { margin: 0 0 10px; font-size: clamp(32px, 3vw, 42px); line-height: 1.25; color: var(--ink); }
.search-page-title p { margin: 0; max-width: 720px; font-size: 16px; line-height: 1.7; color: var(--muted); }
.qs-tabs.segmented { display: flex; gap: 30px; margin-bottom: 18px; border-bottom: 1px solid var(--rule); }
.qs-tabs.segmented button { padding: 0 0 12px; font-size: 15px; color: var(--muted); }
.qs-tabs.segmented button:hover { color: var(--ink); }
.qs-tabs.segmented button.active { color: var(--ink); font-weight: 600; }
.qs-tabs.segmented button.active::after { background: var(--ink); }

.qbar { display: flex; align-items: stretch; min-height: 84px; padding: 8px; background: var(--sheet); border: 1px solid var(--rule-2); border-radius: 12px; box-shadow: 0 14px 36px var(--tint), 0 2px 6px var(--tint); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.qbar:focus-within { border-color: var(--muted); }
.qseg { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; padding: 10px 22px; border-radius: 8px; cursor: text; transition: background-color .15s; }
.qseg + .qseg::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 1px; background: var(--rule); }
.qseg:hover, .qseg:focus-within { background: var(--well); }
.qseg:hover::before, .qseg:focus-within::before, .qseg:hover + .qseg::before, .qseg:focus-within + .qseg::before { opacity: 0; }
.qseg label { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--muted); cursor: inherit; }
.qseg input, .qseg select, .qseg .select-button { width: 100%; height: 32px; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 18px; line-height: 32px; outline: none; box-shadow: none !important; }
.qseg input::placeholder { color: var(--faint); font-size: 17px; }
.qseg select { font-size: 16px; cursor: pointer; }
.qseg-main { flex: 1 1 auto; }
.qseg-state { flex: 0 0 248px; cursor: pointer; }
.qseg-ein { flex: 0 0 230px; }
.qseg-match { flex: 0 0 200px; cursor: pointer; }
.qseg .select-button { display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; }
.qseg .select-button > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qseg .select-button > span.is-placeholder { color: var(--faint); font-size: 17px; }
.qseg .select-button svg { width: 17px; height: 17px; color: var(--muted); }
.qbar-submit.btn { flex: 0 0 auto; align-self: stretch; height: auto; min-width: 150px; margin-left: 8px; padding: 0 28px; font-size: 16px; font-weight: 600; border-radius: 8px; }
.qbar-submit.btn svg { width: 19px; height: 19px; }
.qs-stage .form-errors, .qs-stage .search-id-hint { margin-top: 14px; }
.qs-inline { margin-top: 14px; }
.qs-inline select { height: 36px; border-radius: 6px; padding: 0 10px; }
.qs-stage .form-bottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding: 0; border: 0; }
.qs-stage .form-bottom > small { font-size: 13px; color: var(--muted); }
.qs-below { max-width: 1240px; margin: 0 auto; padding: 8px 40px 64px; }
.qs-below .query-guide { margin-top: 36px; }
.qs-below .result-panel, .qs-below .results-summary { margin-top: 32px; }
.search-id-hint { margin-top: 16px; padding: 10px 14px; font-size: 13px; color: var(--warn); background: var(--warn-bg); border-left: 2px solid var(--warn); }
.empty-state { padding: 44px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.empty-orb { color: var(--faint); margin-bottom: 12px; }
.empty-orb svg { width: 26px; height: 26px; stroke-width: 1.3; }
.empty-state h2 { font-size: 18px; margin-bottom: 8px; }
.empty-state p { font-size: 14px; color: var(--muted); max-width: 480px; margin: 0 auto 16px; }
.empty-state p:empty { display: none; }

/* what a lookup returns — shown until results arrive */
.query-guide { display: grid; grid-template-columns: minmax(0,7fr) minmax(0,5fr); gap: 0 48px; margin-top: 44px; }
.query-guide h2 { grid-column: auto; font-size: 18px; margin: 0; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.qg-fields, .qg-tips { margin: 0; padding: 0; list-style: none; }
.qg-fields li { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0,1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.qg-fields b { font-weight: 600; color: var(--ink); }
.qg-fields span { color: var(--muted); }
.qg-tips li { position: relative; padding: 14px 0 14px 18px; border-bottom: 1px solid var(--rule); font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.qg-tips li::before { content: ""; position: absolute; left: 2px; top: 25px; width: 6px; height: 1px; background: var(--ink-2); }
.qg-coverage { grid-column: 1 / -1; margin-top: 44px; }
.qg-coverage h2 { display: flex; justify-content: space-between; align-items: baseline; }
.qg-coverage h2 small { font-family: var(--sans); font-size: 13px; font-weight: 400; color: var(--muted); }
.qg-states { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 24px; }
.qg-states button { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 0; font-size: 14px; color: var(--ink); text-align: left; border-bottom: 1px solid var(--rule); }
.qg-states button small { font-size: 12px; color: var(--faint); letter-spacing: .04em; }
.qg-states button:hover span { text-decoration: underline; text-underline-offset: 4px; }
.qg-states button.on span { font-weight: 600; }
.qg-states button.on small { color: var(--accent); }

/* results */
.result-panel { margin-top: 24px; padding: 0; overflow: hidden; }
.result-head { padding: 22px 28px 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.result-head h2 { font-size: 19px; margin: 0 0 4px; }
.result-head p { color: var(--muted); font-size: 13px; margin: 0; }
.results-summary { display: flex; gap: 10px; align-items: flex-start; margin-top: 24px; padding: 12px 16px; font-size: 13px; color: var(--ink-2); background: var(--well); border-left: 2px solid var(--brass); }
.results-summary .icon { width: 16px; height: 16px; margin-top: 3px; color: var(--brass); }
.receipt-note { color: var(--muted); font-size: 12px; margin-top: 12px; }
.loading { padding: 40px; display: flex; gap: 12px; align-items: center; justify-content: center; color: var(--muted); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--rule-2); border-top-color: var(--ink); animation: spin .7s linear infinite; }
.btn.primary .spinner { border-color: color-mix(in srgb, var(--on-primary) 35%, transparent); border-top-color: var(--on-primary); }
.skeleton { height: 44px; margin: 0 28px 10px; border-radius: var(--r2); background: var(--well); }
.skeleton:last-child { margin-bottom: 28px; }

/* tables — ledger rows */
.table-scroll { overflow: auto; max-width: 100%; min-width: 0; overscroll-behavior-inline: contain; }
table { border-collapse: collapse; width: 100%; font-size: 14px; text-align: left; }
th { padding: 10px 16px; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; background: var(--well); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule-2); }
td { padding: 14px 16px; border-bottom: 1px solid var(--rule); vertical-align: middle; color: var(--ink); }
th:first-child, td:first-child { padding-left: 28px; }
th:last-child, td:last-child { padding-right: 28px; }
td:last-child { text-align: right; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--hover); }
.panel .table-scroll, .paper .table-scroll { margin: 0 -28px; max-width: none; }
.result-panel .table-scroll { margin: 0; }
.result-table td { height: 64px; }
.entity-name { display: block; font-size: 14px; font-weight: 600; line-height: 1.5; color: var(--ink); word-break: break-word; }
.entity-code { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.state-mini { display: inline-grid; place-items: center; width: 30px; height: 22px; margin-right: 8px; font-size: 11px; font-weight: 600; border: 1px solid var(--rule-2); border-radius: var(--r1); color: var(--ink-2); }
.table-action { display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; font-size: 13px; color: var(--ink); white-space: nowrap; text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 4px; }
.table-action:hover { text-decoration-color: var(--ink); }
.table-action svg { width: 13px; height: 13px; }
.table-caption { font-size: 13px; margin: 14px 0 0; }
.dark-table th { background: var(--well); }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 28px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px; }
.paper > .pagination, .panel > .pagination, #full-history .pagination { margin: 0 -28px -28px; }
.result-panel > .pagination { margin: 0; }
.pagination-buttons { display: flex; gap: 6px; align-items: center; }
.page-button { min-width: 32px; height: 30px; padding: 0 9px; font-size: 13px; color: var(--ink); border: 1px solid var(--rule-2); border-radius: var(--r2); background: var(--sheet); }
.page-button:hover:not(:disabled) { border-color: var(--ink); }
.page-button.active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.page-button .icon { width: 14px; height: 14px; }
.filters { display: flex; gap: 4px 18px; align-items: center; flex-wrap: wrap; }
.filter { position: relative; padding: 4px 0; font-size: 13px; color: var(--muted); }
.filter:hover { color: var(--ink); }
.filter.active { color: var(--ink); font-weight: 600; }
.filter.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--ink); }

/* ---------- record / detail ---------- */
.backline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.backline .text-btn { font-size: 13px; color: var(--muted); }
.detail-hero { display: flex; align-items: flex-start; gap: 20px; padding: 0 0 22px; margin-bottom: 26px; background: none; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; }
.detail-hero.panel, .detail-hero.paper { padding: 0 0 22px; border-radius: 0; }
.detail-hero .hero-copy { flex: 1; min-width: 0; }
.detail-hero h1 { font-size: 34px; line-height: 1.2; margin: 0 0 12px; word-break: break-word; }
.detail-hero .subtle { font-size: 13px; margin-top: 10px; }
.detail-hero .tag-line { color: var(--ink-2); font-size: 14px; gap: 8px 20px; }
.detail-hero .badge { font-size: 13px; padding: 1px 9px; letter-spacing: .02em; }
.entity-monogram { display: none; }
.detail-actions { display: flex; gap: 8px; flex-shrink: 0; }
.detail-grid { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); gap: 20px; }
.detail-grid h2 { font-size: 18px; }
.record-body { display: grid; gap: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r3); }
.record-body > .panel { border: 0; border-radius: 0; background: none; }
.record-body > .panel + .panel, .record-body > * + .panel { border-top: 1px solid var(--rule); }
.record-body > .record-summary-notice { background: var(--well); border-radius: var(--r3) var(--r3) 0 0; }
.record-section h2, .record-goods h2 { font-size: 19px; margin-bottom: 14px; }
.record-section h3 { font-size: 14px; margin-bottom: 6px; }
.definition { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin: 0; }
.definition > div { padding: 12px 0; border-bottom: 1px solid var(--rule); min-width: 0; display: grid; grid-template-columns: minmax(96px, 38%) minmax(0,1fr); gap: 12px; align-items: baseline; }
.definition dt { font-size: 13px; color: var(--muted); }
.definition dd { margin: 0; color: var(--ink); font-size: 14px; overflow-wrap: anywhere; white-space: pre-line; }
.definition.one { grid-template-columns: 1fr; }
.definition .wide { grid-column: 1 / -1; }
.preserve-lines { white-space: pre-line; }
.record-addresses { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 32px; }
.record-addresses article { padding: 14px 0; border-top: 1px solid var(--rule); }
.record-addresses article p { margin: 0 0 6px; }
.record-addresses article .subtle { color: var(--ink-2); }
.record-person { display: flex; gap: 30px; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--rule); }
.record-person h3 { margin: 0 0 2px; }
.record-person p { margin: 0; }
.record-owner { padding: 16px 0; margin-top: 0; border-top: 1px solid var(--rule); }
.record-owner h3 { margin: 10px 0 6px; }
.record-goods summary { cursor: pointer; display: flex; align-items: center; gap: 16px; list-style: none; }
.record-goods summary::-webkit-details-marker { display: none; }
.record-goods summary h2 { margin: 0; flex: 1; }
.goods-action { font-size: 13px; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.goods-body { padding-top: 18px; line-height: 1.9; }
.record-disclaimer { font-size: 13px; line-height: 1.8; color: var(--muted); padding: 22px 0; }
.record-disclaimer p { margin: 0 0 6px; }
.record-summary-notice { background: var(--well); }
.record-summary-notice p { margin-bottom: 0; }
.full-lookup { margin-top: 20px; }
.full-lookup p { font-size: 13px; margin-top: 10px; }
.record-timeline { max-height: 460px; overflow: auto; }
.record-toc { padding: 0; display: flex; flex-direction: column; }
.record-toc button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0 8px 12px; font-size: 13px; text-align: left; color: var(--ink-2); border-left: 1px solid var(--rule); }
.record-toc button:hover { color: var(--ink); border-left: 2px solid var(--brass); padding-left: 11px; }
.record-toc svg { display: none; }
.detail-tabs { display: flex; gap: 24px; margin: 24px 0 20px; border-bottom: 1px solid var(--rule); }
.detail-tabs button { padding: 10px 0; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.detail-tabs button.active { color: var(--ink); border-color: var(--ink); }
.event { position: relative; margin-left: 6px; padding: 0 0 20px 22px; border-left: 1px solid var(--rule-2); }
.event::before { content: ""; position: absolute; left: -4px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--sheet); border: 1px solid var(--ink); }
.event time { font-size: 13px; color: var(--muted); }
.event strong { display: block; font-size: 14px; font-weight: 500; margin-top: 2px; }
.event p { margin: 0; }
.event:last-child { padding-bottom: 0; border-left-color: transparent; }
.info-banner { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; font-size: 13px; line-height: 1.75; color: var(--ink-2); background: var(--well); border-left: 2px solid var(--rule-2); }
.info-banner .icon { margin-top: 3px; width: 16px; height: 16px; color: var(--muted); }
.info-banner a { text-decoration: underline; text-underline-offset: 3px; }

/* EIN verdict — a stamped result line */
.ein-verdict { display: flex; align-items: flex-start; gap: 18px; padding: 24px 0; margin-bottom: 24px; border-top: 2px solid var(--good); border-bottom: 1px solid var(--rule); }
.ein-verdict.warn { border-top-color: var(--warn); }
.ein-verdict.bad { border-top-color: var(--bad); }
.ein-status-icon { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid currentColor; color: var(--good); background: none; }
.ein-status-icon .icon { width: 22px; height: 22px; stroke-width: 2; }
.ein-verdict.warn .ein-status-icon { color: var(--warn); }
.ein-verdict.bad .ein-status-icon { color: var(--bad); }
.ein-verdict h2 { font-size: 26px; margin: 0 0 6px; }
.ein-verdict p { font-size: 14px; color: var(--ink-2); margin: 0; }
.ein-verdict .result-time { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* errors */
.error-card { max-width: 600px; margin: 56px auto; padding: 48px; text-align: center; }
.error-number { font-family: var(--serif); font-size: 64px; line-height: 1; font-weight: 700; color: var(--rule-2); margin: 0 0 18px; }
.error-number svg { width: 48px; height: 48px; stroke-width: 1.2; color: var(--ink); }
.error-card p { color: var(--muted); }
.hero-buttons { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.error-card .hero-buttons { justify-content: center; }
.no-results { grid-column: 1 / -1; text-align: center; padding: 40px; color: var(--muted); }

/* ---------- account ---------- */
.account-page { max-width: 1240px; }
.account-guest { max-width: 640px; padding: 36px; }
.account-guest p { color: var(--muted); margin: 14px 0 22px; }
.account-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 0 0 20px; margin-bottom: 24px; background: none; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; }
.account-hero.panel { padding: 0 0 20px; }
.account-hero h1 { font-size: 30px; line-height: 1.3; margin: 0; overflow-wrap: anywhere; }
.account-identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.account-identity .avatar { display: none; }
.account-top { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; margin: 0 0 20px; }
.quota-layout { display: grid; grid-template-columns: 132px minmax(0,1fr); gap: 28px; align-items: center; }
.quota-circle { position: relative; width: 132px; height: 132px; display: grid; place-items: center; }
.quota-circle svg { position: absolute; inset: 0; width: 132px; height: 132px; transform: rotate(-90deg); }
.quota-circle .track { fill: none; stroke: var(--rule); stroke-width: 6; }
.quota-circle .value { fill: none; stroke: var(--ink); stroke-width: 6; stroke-linecap: butt; transition: stroke-dashoffset .4s; }
.quota-num { text-align: center; line-height: 1.1; }
.quota-num strong { font-family: var(--serif); font-size: 36px; }
.quota-num span { font-size: 13px; color: var(--muted); }
.quota-num small { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.quota-list .context-row strong { font-size: 13px !important; }
.usage-bars { display: grid; gap: 14px; }
.usage-row .label { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.usage-row .label > span { display: inline-flex; align-items: center; }
.usage-row .label strong { color: var(--ink); font-weight: 600; }
.usage-row .label small { color: var(--muted) !important; font-weight: 400; }
.usage-row .icon { width: 15px; height: 15px; margin-right: 7px; color: var(--muted); }
.progress { height: 4px; background: var(--rule); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--ink) !important; transition: width .4s; }
.account-body { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); gap: 20px; }
.account-body .wide { grid-column: 1 / -1; }
.plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin: 18px 0 20px; }
.plan { position: relative; display: block; padding: 16px 16px 14px; text-align: left; background: var(--sheet); border: 1px solid var(--rule-2); border-radius: var(--r3); transition: border-color .15s; }
.plan:hover { border-color: var(--ink); }
.plan.selected { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.plan .radio-dot { display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border: 1px solid var(--rule-2); border-radius: 50%; background: var(--sheet); }
.plan.selected .radio-dot { border: 4px solid var(--ink); }
.plan-name { display: block; font-size: 13px; font-weight: 500; line-height: 1.6; white-space: normal; color: var(--ink-2); }
.plan-price { display: block; margin: 14px 0 2px; font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--ink); }
.plan-cost { font-size:12px; color:var(--muted); }
.plan-saving { color:var(--primary); font-weight:600; font-variant-numeric:tabular-nums; }
#purchase>.section-head>small { line-height:1.7; }
.plan-tag { position: absolute; top: -9px; right: 12px; padding: 0 6px; font-size: 11px; color: var(--brass); background: var(--sheet); border: 1px solid var(--brass); border-radius: var(--r1); }
.plan-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 18px; border-top: 1px solid var(--rule); }
.plan-summary p { font-size: 14px; color: var(--ink-2); margin: 0; }
.plan-summary strong { color: var(--ink); }
.plan-summary small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.plan-summary .btn { min-width: 168px; }
.ledger { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.ledger:last-child { border: 0; }
.ledger-icon { color: var(--muted); flex-shrink: 0; display: grid; place-items: center; }
.ledger-icon svg { width: 17px; height: 17px; }
.ledger-body { flex: 1; min-width: 0; }
.ledger-body strong { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ledger-body small { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.account-pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 12px; color: var(--muted); }
.account-pagination button { font-size: 12px; padding: 4px 10px; border: 1px solid var(--rule-2); border-radius: var(--r2); color: var(--ink); background: var(--sheet); }
#order-filters { margin-bottom: 4px; }
.order-record { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; text-align: left; border-bottom: 1px solid var(--rule); }
.order-record:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.order-record strong { font-size: 14px; font-weight: 600; }
.order-record small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.order-record .align-right { text-align: right; }
.order-id { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.order-amount { font-size: 14px; font-weight: 600; color: var(--ink); }
.order-state { text-align: center; padding: 6px 0 20px; }
.order-state .ein-status-icon { margin: 0 auto 14px; }
.order-state .ein-status-icon.is-bad { color: var(--bad); }
.order-state h2 { margin-bottom: 6px; }
.order-state p { color: var(--muted); font-size: 14px; margin: 0; }
.order-details { margin: 0; }
.order-details > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; font-size: 14px; border-bottom: 1px solid var(--rule); }
.order-details dt { color: var(--muted); }
.order-details dd { margin: 0; text-align: right; color: var(--ink); }
.order-details .total { border-bottom: 0; border-top: 1px solid var(--ink); }
.order-details .total dd { font-family: var(--serif); font-size: 22px; font-weight: 700; }

/* ---------- directory (map) ---------- */
.directory-header { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; margin-bottom: 24px; }
.directory-header h1 { font-size: 32px; margin-bottom: 8px; }
.directory-header p { font-size: 14px; color: var(--muted); margin-bottom: 0; max-width: 640px; }
.directory-toolbar { display: flex; gap: 14px 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 0; margin: 24px 0 20px; background: none; border: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); border-radius: 0; }
.directory-search { display: flex; align-items: center; gap: 9px; height: 40px; min-width: 220px; max-width: 340px; flex: 1; padding: 0 12px; background: var(--sheet); border: 1px solid var(--rule-2); border-radius: var(--r2); }
.directory-search:focus-within { border-color: var(--control-focus); box-shadow: none; outline: none; }
.directory-search .icon { width: 16px; height: 16px; color: var(--muted); }
.directory-search input { height: 100%; width: 100%; background: none; border: 0; outline: none; color: var(--ink); font-size: 14px; padding: 0; box-shadow: none !important; }
.directory-count { color: var(--muted); font-size: 13px; white-space: nowrap; }
.state-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 32px 24px; }
.state-card { min-width: 0; background: none; border: 0; }
.state-card > a { display: block; overflow: hidden; border-radius: var(--r2); }
.state-photo { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; background: var(--rule); transition: opacity .2s; }
.state-card > a:hover .state-photo { opacity: .88; }
.state-card-body { padding: 12px 0 0; }
.state-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.state-card h2 { font-size: 18px; margin: 0; }
.state-card-top:hover h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.state-card .code { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.state-card .en-name { display: block; font-size: 12px; color: var(--muted); }
.state-card p { margin: 8px 0 0; font-size: 13px; line-height: 1.75; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.state-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 13px; color: var(--muted); }
.state-card-foot a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 4px; }
.state-card-foot a:hover { text-decoration-color: var(--ink); }
.state-card-foot [data-add-compare] { font-size: 13px; color: var(--muted); }
.state-card-foot [data-add-compare].on { color: var(--ink); font-weight: 600; }
.business-card { padding: 18px 0 0; border-top: 1px solid var(--rule); }
.business-card .code { float: right; }
.business-card p { -webkit-line-clamp: 2; }
.business-card .fee-pair { display: flex; gap: 20px; margin-top: 14px; padding-top: 10px; border-top: 1px dotted var(--rule-2); font-size: 12px; color: var(--muted); }
.fee-pair strong { display: block; margin-top: 2px; font-size: 14px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.map-panel { position: relative; overflow: hidden; display: grid; place-items: center; min-height: 340px; padding: 20px 24px 56px; background: var(--night); border: 0; border-radius: var(--r3); color: #e6ebf2; }
.us-map { display: block; width: 100%; height: auto; max-height: 420px; overflow: visible; }
.us-map image { opacity: 1; }
.us-map .state-shape { fill: rgba(255,255,255,0); stroke: rgba(255,255,255,.22); stroke-width: .8; cursor: pointer; transition: fill .15s; }
.us-map .state-shape:hover, .us-map .state-shape:focus, .us-map .state-shape.chosen { fill: rgba(238,74,94,.32); stroke: #ffd9de; stroke-width: 1.4; outline: none; }
.us-map text { fill: #dfe5ee; font-size: 11px; pointer-events: none; }
.map-caption { position: absolute; bottom: 16px; left: 20px; color: #aeb8c5; font-size: 13px; pointer-events: none; }
.map-tooltip { position: absolute; top: 20px; right: 24px; min-width: 140px; max-width: 240px; padding: 10px 14px; font-family: var(--serif); font-size: 17px; font-weight: 700; line-height: 1.4; color: #fff; background: rgba(1,2,30,.7); border-left: 2px solid var(--accent); pointer-events: none; }
.map-tooltip small { display: block; margin-top: 2px; font-family: var(--sans); font-weight: 400; font-size: 12px; color: #aeb8c5; }
.map-panel #map-label-toggle { background: transparent; color: #e6ebf2; border-color: rgba(255,255,255,.35); }
.map-panel #map-label-toggle:hover { border-color: #fff; }
.directory-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; margin-bottom: 8px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.directory-summary .panel { padding: 18px 20px 18px 0; background: none; border: 0; border-radius: 0; }
.directory-summary .panel + .panel { padding-left: 20px; border-left: 1px solid var(--rule); }
.directory-summary strong { display: block; font-family: var(--serif); font-size: 26px; }
.directory-summary small { color: var(--muted); font-size: 13px; }
.directory-section { margin: 32px 0 14px; font-size: 18px; }

/* ---------- readers (letter, terms, privacy, inherited content) ---------- */
.state-hero { position: relative; display: flex; align-items: flex-end; min-height: 280px; padding: 32px; margin-bottom: 24px; overflow: hidden; border-radius: var(--r3); background: var(--rail-bg); color: #fff; }
.state-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.state-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(14,24,38,.82), rgba(14,24,38,0) 70%); }
.state-hero-copy { position: relative; z-index: 1; max-width: 660px; }
.state-hero h1 { font-size: 40px; margin: 0 0 10px; color: #fff; }
.state-hero p { font-size: 14px; line-height: 1.85; color: #e5e9ef; margin: 0; }
.dash-hero { position: relative; padding: 8px 0 26px; margin-bottom: 24px; border-bottom: 1px solid var(--ink); }
.dash-hero h1 { font-size: 36px; margin: 0 0 10px; }
.dash-hero p { color: var(--muted); margin-bottom: 14px; }
.dash-hero .hero-bg, .hero-logo-detail { display: none; }
.reader-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.reader-toolbar .reading-meta { color: var(--muted); font-size: 13px; }
.reader-document { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.reader-section { min-width: 0; padding: 0; background: none; border: 0; border-top: 1px solid var(--rule); border-radius: 0; scroll-margin-top: 80px; }
.reader-section:first-child { border-top: 0; }
.reader-section-body { padding: 32px 0; min-width: 0; }
.reader-section.with-photos .reader-section-body { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(200px,.85fr); gap: 36px; align-items: start; }
.reader-section:nth-child(even).with-photos .reader-copy { order: 2; }
.reader-section:nth-child(even).with-photos .reader-media { order: 1; }
.reader-section .reader-copy { min-width: 0; max-width: 46em; font-size: 15px; line-height: 1.95; color: var(--ink-2); overflow-wrap: break-word; }
.reader-copy h2 { font-size: 24px; line-height: 1.45; margin: 0 0 16px; color: var(--ink); }
.reader-copy h3 { font-size: 17px; line-height: 1.6; margin: 26px 0 10px; color: var(--ink); }
.reader-copy h4 { font-size: 15px; margin: 20px 0 8px; color: var(--ink); }
.reader-copy p { margin: 0 0 16px; }
.reader-copy strong { color: var(--ink); font-weight: 600; }
.reader-copy small { font-size: 12px; line-height: 1.8; color: var(--muted); }
.reader-copy a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 4px; }
.reader-copy a:hover { text-decoration-color: var(--ink); }
.reader-copy > div > span:first-child, .reader-copy > .doc-kicker { font-size: 13px; color: var(--muted); }
.reader-copy li { margin: 6px 0; }
.reader-copy ul, .reader-copy ol { padding-left: 22px; }
.reader-copy svg { max-width: 100%; height: auto; }
.reader-copy svg[aria-hidden="true"] { width: 18px; height: 18px; fill: none; stroke: currentColor; }
.reader-media { display: flex; flex-direction: column; gap: 18px; min-width: 0; position: sticky; top: 80px; }
.reader-figure { margin: 0; }
.reader-figure button { padding: 0; display: block; width: 100%; cursor: zoom-in; }
.reader-figure img { display: block; width: 100%; min-height: 180px; max-height: 420px; object-fit: cover; border-radius: var(--r2); background: var(--rule); }
.reader-figure figcaption, .reader-figure .figure-note { font-size: 12px; line-height: 1.75; color: var(--muted); margin-top: 8px; padding: 0; border: 0; }
.reader-section.read-intro .reader-section-body { padding: 8px 0 28px; }
.reader-copy .doc-kicker { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.reader-copy .doc-lead { font-size: 16px; line-height: 1.9; color: var(--ink-2); }
.reader-copy .doc-note { margin: 20px 0; padding: 14px 18px; font-size: 14px; color: var(--ink-2); background: var(--well); border-left: 2px solid var(--brass); }
.reader-copy .doc-note p:last-child { margin: 0; }
.reader-copy .doc-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 28px; margin: 20px 0; }
.reader-copy .doc-grid > article, .reader-copy .doc-grid > div { padding: 14px 0; border-top: 1px solid var(--rule); min-width: 0; }
.reader-copy .doc-grid h3 { margin: 0 0 6px; font-size: 15px; }
.reader-copy .doc-grid p { font-size: 14px; margin: 0; }
.reader-copy .doc-item { border-top: 1px solid var(--rule); padding-top: 22px; margin-top: 24px; scroll-margin-top: 80px; }
.reader-copy .doc-item:first-child { margin-top: 0; }
.reader-copy .doc-item-heading { display: flex; align-items: flex-start; gap: 14px; }
.reader-copy .doc-item-heading > span { flex-shrink: 0; font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--brass); line-height: 1.5; min-width: 28px; }
.reader-copy .doc-item-heading h3 { margin: 0 0 6px; font-size: 18px; }
.reader-copy .doc-item-heading p { font-size: 14px; color: var(--muted); }
.reader-copy .doc-heading { margin-bottom: 20px; }
.reader-copy .doc-footnote { font-size: 12px; color: var(--muted); line-height: 1.8; margin-top: 14px; }
.reader-copy .doc-citations { display: inline-flex; gap: 6px; font-size: 12px; margin: 0 4px; }
.reader-copy .doc-sources { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; }
.reader-copy .doc-sources a { font-size: 14px; }
.reader-copy .doc-sources p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.reader-copy details { margin: 20px 0; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 14px; }
.reader-copy summary { cursor: pointer; color: var(--ink); font-size: 14px; margin-bottom: 10px; }
.reader-copy .doc-fee-table { margin: 22px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.reader-copy .doc-fee-row { display: grid; grid-template-columns: 1.15fr 1fr 1fr; border-bottom: 1px solid var(--rule); }
.reader-copy .doc-fee-row:last-child { border: 0; }
.reader-copy .doc-fee-row > * { padding: 10px 12px 10px 0; font-size: 14px; line-height: 1.75; }
.reader-copy .doc-fee-head { color: var(--muted); font-size: 13px; }
.reader-copy .table-scroll { margin: 18px 0; border-top: 1px solid var(--ink); }
.reader-copy table { min-width: 420px; font-size: 14px; }
.reader-copy th { white-space: normal; background: none; border-top: 0; }
.reader-copy th:first-child, .reader-copy td:first-child { padding-left: 0; }
.reader-copy td { line-height: 1.8; text-align: left; }
.reader-copy td:last-child { text-align: left; }
.reader-copy caption { text-align: left; font-size: 12px; color: var(--muted); padding: 10px 0; }
.reader-copy .doc-facts { display: flex; flex-wrap: wrap; gap: 0; margin: 22px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.reader-copy .doc-facts > div { flex: 1; min-width: 140px; padding: 14px 18px 14px 0; }
.reader-copy .doc-facts dt { font-size: 13px; color: var(--muted); }
.reader-copy .doc-facts dd { margin: 2px 0 0; font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--ink); }
.reader-copy .doc-signoff { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--rule); }
.reader-copy .doc-signoff img { width: 140px; margin-bottom: 10px; }
.reader-copy .doc-signoff p { font-family: var(--serif); font-size: 18px; margin-bottom: 4px; }
.reader-copy .doc-letter-aside { display: block; margin: 0 0 22px; padding: 12px 18px; color: var(--ink-2); background: var(--well); border-left: 2px solid var(--brass); }
.reader-copy .doc-letter-aside p { margin: 0 0 6px; }
.reader-copy .doc-letter-aside span { font-size: 13px; }
.reader-copy .doc-emphasis { margin: 26px 0; padding: 4px 0 4px 20px; font-family: var(--serif); font-size: 22px; line-height: 1.6; color: var(--ink); border-left: 2px solid var(--brass); }
.reader-copy .doc-signature { padding-top: 14px; font-size: 13px; color: var(--muted); }
.reader-copy .doc-sectors { display: grid; gap: 0; margin: 18px 0; border-top: 1px solid var(--rule); }
.reader-copy .doc-sectors > div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.reader-copy .doc-sectors span { font-size: 13px; }
.reader-copy .doc-sectors strong { font-size: 14px; }
.reader-copy .doc-calculator { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; margin: 24px 0; padding: 22px; background: var(--well); border: 1px solid var(--rule); border-radius: var(--r3); }
.reader-copy .doc-calculator h3 { margin-top: 0; }
.reader-copy .doc-calculator label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--ink-2); }
.reader-copy .doc-calculator input[type="number"], .reader-copy .doc-calculator select { width: 100%; height: 38px; margin-bottom: 12px; padding: 0 10px; font-size: 14px; color: var(--ink); background: var(--sheet); border: 1px solid var(--rule-2); border-radius: var(--r2); }
.reader-copy .doc-calculator input[type="checkbox"] { accent-color: var(--ink); }
.reader-copy .doc-calculation { align-self: center; }
.reader-copy .doc-calculation output { display: block; margin: 8px 0; font-family: var(--serif); font-size: 40px; font-weight: 700; color: var(--ink); }
.reader-copy .doc-calculation p { font-size: 13px; color: var(--muted); }
.reader-copy .doc-scenarios { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.reader-copy .doc-scenarios button { padding: 6px 10px; font-size: 13px; color: var(--ink-2); border: 1px solid var(--rule-2); border-radius: var(--r2); }
.reader-copy .doc-scenarios button[aria-pressed="true"] { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }
.reader-copy .doc-scenario { padding: 18px; background: var(--well); border-radius: var(--r3); }
.reader-copy .doc-scenario h3 { margin-top: 0; }
.protected-gate { margin: 24px 0; padding: 32px; text-align: center; background: var(--sheet); border: 1px solid var(--rule); border-top: 2px solid var(--brass); border-radius: var(--r3); }
.protected-gate > svg { width: 24px; height: 24px; color: var(--brass); margin-bottom: 12px; }
.protected-gate h2 { font-size: 20px; margin-bottom: 8px; }
.protected-gate p { color: var(--muted); font-size: 14px; max-width: 540px; margin: 0 auto 20px; }
.protected-index { display: grid; grid-template-columns: repeat(3,1fr); gap: 0 20px; margin-bottom: 22px; text-align: left; }
.protected-index div { padding: 8px 0; font-size: 13px; color: var(--ink-2); border-bottom: 1px solid var(--rule); }
.protected-index span { margin-right: 6px; color: var(--faint); }
.reader-end { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0 0; border-top: 1px solid var(--ink); }
.reader-end h3 { font-family: var(--serif); font-size: 18px; margin-bottom: 4px; }
.reader-end p { font-size: 14px; color: var(--muted); margin: 0; }
.legal-page .reader-section-body { max-width: 820px; }
.legal-page .reader-copy { font-size: 15px; line-height: 2; }
.legal-page .reader-copy h2 { font-size: 20px; }
.legal-page .reader-section.read-intro .reader-copy h2 { font-size: 30px; }
/* terms & privacy: one readable column; rules, text and toolbar share its width */
.legal-page > .directory-header, .legal-page > .reader-end { display: none !important; }
#toc-search { display: none; }
.legal-page .reader-toolbar, .legal-page .reader-document, .legal-page .reader-end { max-width: 820px; margin-left: auto; margin-right: auto; }
.legal-page .reader-section .reader-copy { max-width: none; }
.legal-page .reader-section-body { max-width: none; padding: 28px 0; }
.legal-page .reader-section.read-intro .reader-section-body { padding-top: 4px; }
.legal-page #chapter-1 { font-size: 0; line-height: 0; }
.legal-page #chapter-1 > * { font-size: 15px; line-height: 2; }
.legal-page #chapter-1 > h2 { font-size: 36px; line-height: 1.3; margin: 8px 0 12px; }
.legal-page #chapter-1 > .doc-footnote { font-size: 13px; }
.legal-page .reader-section.read-intro .reader-copy h2 { font-size: 34px; line-height: 1.3; margin: 0 0 12px; }
.reader-copy h2 > span:first-child { display: inline-block; min-width: 2.1em; color: var(--faint); font-weight: 400; font-variant-numeric: tabular-nums; }
.chapter-jump { display: flex; gap: 6px; flex-wrap: wrap; }
.chapter-jump button { padding: 5px 10px; font-size: 13px; color: var(--ink-2); border: 1px solid var(--rule-2); border-radius: var(--r2); background: var(--sheet); }
.chapter-jump button:hover { border-color: var(--ink); color: var(--ink); }
.document-search { width: 100%; margin-bottom: 14px; padding: 8px 11px; font-size: 13px; color: var(--ink); background: var(--sheet); border: 1px solid var(--rule-2); border-radius: var(--r2); }
.find-highlight { background: var(--highlight); color: var(--ink); }
.reader-info { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.onpage-toc { display: none; }
.read-mode-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 18px 0; padding: 12px 16px; }
.read-mode-bar p { font-size: 13px; color: var(--muted); margin: 0; }

/* editorial topic pages keep their own composition */
.editorial-page { padding: 0 !important; max-width: none; }
.editorial-page sr-feature { display: block; width: 100%; min-width: 0; overflow: clip; }
.app.editorial-layout .page { padding-top: 0; }


/* ---------- theme switch ---------- */
.theme-toggle { width: 32px; height: 32px; color: var(--ink-2); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .i-moon { display: block; }
.theme-toggle .i-sun { display: none; }
html[data-theme="dark"] .theme-toggle .i-moon { display: none; }
html[data-theme="dark"] .theme-toggle .i-sun { display: block; }

/* ---------- section outline: follows the reader ---------- */
.spy { position: relative; }
.spy-marker { position: absolute; left: 0; top: 0; width: 2px; height: 0; background: var(--accent); opacity: 0; transition: transform .32s cubic-bezier(.2,.7,.2,1), height .32s cubic-bezier(.2,.7,.2,1), opacity .2s; pointer-events: none; }
.spy.has-active .spy-marker { opacity: 1; }
.record-toc button, .toc-list a { transition: color .2s, background-color .2s; }
.record-toc button.active, .toc-list a.active { color: var(--ink); font-weight: 600; background: linear-gradient(90deg, var(--accent-soft), transparent 80%); }
.record-toc button.active::after { content: ""; }
.record-section { scroll-margin-top: 84px; }
.record-section.is-current > h2 { color: var(--ink); }

/* ---------- founder letter: the original letter design (assets/app/letter/letter.css) ---------- */
.page.letter-host { max-width: none; padding: 0; }
.letter-host .founder-letter .letter-page { min-height: 100%; }
/* the letter sits on the site's own paper: original fonts and layout, site colours */
.letter-host .founder-letter .letter-page { min-height: 100%; padding: 56px clamp(28px, 5vw, 64px) 72px; background: none !important; box-shadow: none !important; color: var(--ink); }
.letter-host .founder-letter .letter-page::before { display: none !important; }
.letter-host .letter { width: min(100%, 1120px); }
.letter-host .letter-page h1, .letter-host .letter-page h1 span { color: var(--ink); }
.letter-host .letter-opening { border-bottom-color: var(--rule-2) !important; }
.letter-host .letter-margin { color: var(--muted); }
.letter-host .margin-line { background: var(--accent) !important; }
.letter-host .margin-name, .letter-host .signature-role { color: var(--muted); }
.letter-host .letter-body { color: var(--ink-2) !important; }
.letter-host .letter-page .letter-body .salutation, .letter-host .letter-page .letter-body .closing { color: var(--ink); }
.letter-host .letter-page .letter-body .letter-emphasis { color: var(--ink) !important; }
.letter-host .letter-emphasis::after { background: var(--accent) !important; opacity: .5; }
.letter-host .letter-signoff p { color: var(--ink); }
.letter-host .letter-end { color: var(--faint); }
.letter-host .letter-signoff img { mix-blend-mode: normal !important; }
html[data-theme="dark"] .letter-host .letter-signoff img { filter: invert(1) brightness(1.15); }

/* ---------- modal ---------- */
.modal { position: fixed; width: min(500px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto; padding: 0; color: var(--ink); background: var(--sheet); border: 1px solid var(--rule-2); border-radius: var(--r3); box-shadow: 0 24px 64px var(--shadow); }
.modal::backdrop { background: var(--scrim); }
.modal.wide { width: min(800px, calc(100vw - 32px)); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 28px 0; }
.modal-head h2 { font-size: 21px; margin: 0; }
.modal-head .icon-btn { width: 30px; height: 30px; flex-shrink: 0; margin: -3px -6px 0 0; }
.modal-head .icon-btn svg { width: 17px; height: 17px; }
.modal-body { padding: 16px 28px 26px; }
.modal-body > p, .modal-body form > p { font-size: 14px; color: var(--ink-2); line-height: 1.8; }
.modal-body p a, .modal a[style] { color: var(--ink) !important; text-decoration: underline; }
.modal .field { margin-bottom: 14px; }
.modal form .btn.primary[type="submit"] { margin-top: 4px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.modal-actions .btn { min-width: 104px; }
.modal-notice { margin-top: 16px; font-size: 12px; line-height: 1.8; color: var(--muted); }
.modal-notice a { color: var(--ink); text-decoration: underline; }
.modal-name { margin: 14px 0; padding: 12px 14px; font-size: 16px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; background: var(--well); border-left: 2px solid var(--ink); }
.modal-code { height: 52px !important; font-size: 24px !important; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }
.auth-icon { display: none; }
.auth-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.auth-actions button { font-size: 13px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 4px; }
.dark-fields .field label { color: var(--ink-2); }
.state-picker-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 0 18px; max-height: 400px; overflow: auto; margin-top: 14px; }
.state-picker-list button { display: grid; grid-template-columns: 30px minmax(0,1fr); grid-template-rows: auto auto; column-gap: 8px; align-items: baseline; min-width: 0; padding: 9px 6px; text-align: left; line-height: 1.5; border-bottom: 1px solid var(--rule); border-radius: 0; }
.state-picker-list button:hover { background: var(--well); }
.state-picker-list button.selected { background: var(--well); box-shadow: inset 2px 0 0 var(--ink); }
.state-picker-list b { grid-row: 1 / 3; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.state-picker-list span { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state-picker-list small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-modal { width: min(1160px, 94vw); }
.image-modal img { width: 100%; max-height: 72vh; object-fit: contain; margin-top: 12px; }
.image-modal p { text-align: center; color: var(--muted); font-size: 13px; padding: 0 22px 16px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 72px; z-index: 110; max-width: min(500px, 90vw); padding: 10px 16px; font-size: 13px; color: var(--on-primary); background: var(--primary); border-radius: var(--r2); box-shadow: 0 8px 24px var(--shadow); opacity: 0; transform: translateX(-50%) translateY(8px); transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- rail states ---------- */
.focus-mode.app { grid-template-columns: 64px minmax(0,1fr); }
.focus-mode .context { display: none; }
.focus-mode .page { max-width: 960px; }
:where(html:not([data-b-rail-expanded="true"])) .app.collapsed { --rail: 64px; }
:where(html:not([data-b-rail-expanded="true"])) .app.collapsed .rail .brand-logo, :where(html:not([data-b-rail-expanded="true"])) .app.collapsed .rail .nav-label, :where(html:not([data-b-rail-expanded="true"])) .app.collapsed .rail .nav-group,
.focus-mode .rail .brand-logo, .focus-mode .rail .nav-label, .focus-mode .rail .nav-group { display: none; }
:where(html:not([data-b-rail-expanded="true"])) .app.collapsed .rail .brand-mark, .focus-mode .rail .brand-mark { display: block; }
:where(html:not([data-b-rail-expanded="true"])) .app.collapsed .rail .nav-divider, .focus-mode .rail .nav-divider { margin: 10px 14px; }
:where(html:not([data-b-rail-expanded="true"])) .app.collapsed .rail .brand, .focus-mode .rail .brand { padding: 0; justify-content: center; }
:where(html:not([data-b-rail-expanded="true"])) .app.collapsed .rail .nav-link, .focus-mode .rail .nav-link { justify-content: center; padding: 8px 0; }
:where(html:not([data-b-rail-expanded="true"])) .app.collapsed .rail .nav-link.active::before { top: 6px; bottom: 6px; }

/* menu toggle: always visible, says what it will do */
.rail-bottom { padding: 14px 12px 16px; }
.rail-toggle { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; height: 40px; padding: 0 12px; color: #e9edf2; font-size: 13px; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; background: rgba(255,255,255,.04); transition: background-color .15s, border-color .15s; }
.rail-toggle:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.38); }
.rail-toggle svg { width: 18px; height: 18px; }
.rail-toggle .i-expand { display: none; }
.rail-toggle-label::after { content: attr(data-open); }
:where(html:not([data-b-rail-expanded="true"])) .app.collapsed .rail-toggle { justify-content: center; width: 40px; padding: 0; margin: 0 auto; }
:where(html:not([data-b-rail-expanded="true"])) .app.collapsed .rail-toggle .i-expand { display: block; }
:where(html:not([data-b-rail-expanded="true"])) .app.collapsed .rail-toggle .i-collapse, :where(html:not([data-b-rail-expanded="true"])) .app.collapsed .rail-toggle-label { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- responsive ---------- */
@media (min-width: 1680px) {
  :root { --rail: 232px; --context: 272px; }
  .page { max-width: 1320px; }
}
@media (max-width: 1180px) {
  :root { --context: 224px; }
  .page { padding: 30px 28px 48px; }
  .topbar { padding: 0 28px; }
  .site-footer { padding: 12px 28px; }
  .context { padding: 0 16px 20px; }
  .form-line, .home-search .form-line { grid-template-columns: minmax(150px, 190px) minmax(0,1fr); }
  .form-line .btn { grid-column: 1 / -1; justify-self: end; min-width: 160px; }
  .home-guide { padding-right: 22px; }
  .home-guide + .home-guide { padding-left: 22px; }
  .query-guide { gap: 0 32px; }
  .form-line.ein { grid-template-columns: minmax(0,1fr) 190px; }
  .detail-grid { grid-template-columns: 1fr; }
  .definition { grid-template-columns: 1fr; }
  .plan-grid { gap: 10px; }
  .plan-price { font-size: 22px; }
  .state-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .reader-section.with-photos .reader-section-body { display: flex; flex-direction: column; }
  .reader-section.with-photos .reader-copy { order: 1 !important; }
  .reader-section.with-photos .reader-media { order: 2 !important; position: static; width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); }
}
@media (max-width: 1100px) {
  .account-top { grid-template-columns: 1fr; }
  .account-body { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 990px) {
  :root { --context: 0px; }
  .app { grid-template-columns: var(--rail) minmax(0,1fr); }
  .context { display: none; }
  .context-toggle { display: inline-flex !important; }
  .no-context .context-toggle { display: none !important; }
  .app.context-open .context { display: block; position: fixed; top: 0; right: 0; bottom: 0; width: 292px; z-index: 65; padding: 0 20px 24px; background: var(--paper); border-left: 1px solid var(--rule-2); box-shadow: -16px 0 40px var(--shadow); }
  .context .context-close { display: inline-flex; margin-left: auto; }
  .onpage-toc { display: block; margin-bottom: 18px; }
  .onpage-toc summary { cursor: pointer; padding: 10px 0; font-size: 14px; color: var(--ink); border-bottom: 1px solid var(--rule); }
  .onpage-toc > div { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 12px 0; }
  .onpage-toc a { font-size: 13px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 3px; }
}
@media (max-width: 760px) {
  :root { --top: 56px; }
  /* phones and small tablets: the menu becomes a drawer opened from the top bar */
  .app, :where(html:not([data-b-rail-expanded="true"])) .app.collapsed, .app.no-context { --rail: 0px; grid-template-columns: minmax(0,1fr); }
  .rail { display: none; }
  .viewport { grid-column: 1; }
  .site-footer { grid-column: 1; }
  .icon-btn.menu-mobile, .menu-mobile { display: inline-flex; margin-left: -8px; color: var(--ink); }
  .top-logo { display: inline-flex; align-items: center; margin-right: auto; }
  .top-logo img { height: 14px; width: auto; }
  .breadcrumbs { display: none; }
  .app.nav-open::after { content: ""; position: fixed; inset: 0; z-index: 79; background: var(--scrim); }
  .app.nav-open .rail { display: flex; position: fixed; inset: 0 auto 0 0; z-index: 80; width: min(300px, 86vw); box-shadow: 16px 0 48px var(--shadow); }
  .app.nav-open .rail .brand { justify-content: space-between; padding: 0 12px 0 22px; height: 64px; }
  .app.nav-open .rail .brand-logo { display: block; height: 17px; }
  .app.nav-open .rail .brand-mark { display: none; }
  .app.nav-open .rail .nav-label, .app.nav-open .rail .nav-group { display: block; }
  .app.nav-open .rail .nav-link { justify-content: flex-start; min-height: 48px; padding: 10px 22px; font-size: 15px; }
  .app.nav-open .rail .nav-divider { margin: 10px 22px; }
  .app.nav-open .rail .brand { padding-right: 56px; }
  .app.nav-open .rail .rail-close { display: inline-flex; position: absolute; top: 14px; right: 12px; width: 36px; height: 36px; color: #e9edf2; }
  .app.nav-open .rail-bottom { display: block; }
  .app.nav-open .rail-toggle { display: none; }
  .app.nav-open .rail-theme { display: flex; align-items: center; gap: 12px; width: 100%; height: 44px; padding: 0 12px; color: #e9edf2; font-size: 14px; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; }
  .rail-theme svg { width: 18px; height: 18px; }
  .rail-theme .i-sun, html[data-theme="dark"] .rail-theme .i-moon { display: none; }
  html[data-theme="dark"] .rail-theme .i-sun { display: block; }
  .rail-theme span::after { content: attr(data-light); }
  html[data-theme="dark"] .rail-theme span::after { content: attr(data-dark); }
  .rail-close:hover { background: rgba(255,255,255,.08); color: #fff; }
  .rail-bottom { display: none; }
  .top-logo { flex-shrink: 0; }
  .top-logo img { flex-shrink: 0; max-width: none; }
  .top-actions .btn.sm { padding: 5px 10px; }
  .page { padding: 24px 16px 40px; }
  .topbar { padding: 0 16px; gap: 10px; }
  .top-actions { gap: 12px; }
  .top-actions > .text-btn { display: none; }
  .top-actions .user-email { display: none; }
  .site-footer { padding: 10px 16px; gap: 8px; flex-wrap: wrap; }
  .footer-note { display: none; }
  .footer-nav .optional-mobile { display: none; }
  h1 { font-size: 26px; }
  .home-head h1 { font-size: 30px; }
  .home-head p { font-size: 15px; }
  .home-search { padding: 20px 18px 18px; }
  .form-line, .home-search .form-line, .form-line.ein { grid-template-columns: 1fr; }
  .form-line .btn { grid-column: auto; justify-self: stretch; width: 100%; }
  .form-line[style] { grid-template-columns: 1fr !important; }
  .home-guides { grid-template-columns: 1fr; }
  .home-guide, .home-guide + .home-guide { padding: 18px 0; border-left: 0; }
  .home-guide + .home-guide { border-top: 1px solid var(--rule); }
  .panel, .paper { padding: 20px 18px; }
  .panel .table-scroll, .paper .table-scroll { margin: 0 -18px; }
  .paper > .pagination, .panel > .pagination, #full-history .pagination { margin: 0 -18px -20px; }
  .result-panel > .pagination { margin: 0; }
  th:first-child, td:first-child { padding-left: 18px; }
  th:last-child, td:last-child { padding-right: 18px; }
  .search-form { padding: 18px; }
  .search-page-title h1 { font-size: 26px; }
  .search-page-title { flex-wrap: wrap; }
  .form-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .result-head { padding: 18px; }
  .result-table { min-width: 560px; }
  .page.home-page { padding-top: 16px; }
  .home-plate { min-height: 300px; background-position: 70% 50%; }
  .home-plate-copy { padding: 28px 22px; }
  .home-plate h1 { font-size: 30px; }
  .home-plate-copy p { font-size: 15px; }
  .home-guides-wrap { margin-top: 36px; }
  .home-guides { grid-template-columns: 1fr; }
  .home-guide, .home-guide + .home-guide { padding: 22px 0 24px; border-left: 0; }
  .home-guide + .home-guide { border-top: 1px solid var(--rule); }
  .search-page-title h1 { font-size: 28px; }
  .qs-inner { padding: 32px 18px 26px; }
  .search-page-title { margin-bottom: 22px; }
  .qbar { flex-direction: column; min-height: 0; padding: 6px; }
  .qseg { flex: 0 0 auto !important; padding: 12px 14px; }
  .qseg + .qseg::before { left: 14px; right: 14px; top: 0; bottom: auto; width: auto; height: 1px; }
  .qbar-submit.btn { margin: 6px 0 0; height: 52px; min-width: 0; }
  .qs-stage .form-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
  .qs-below { padding: 0 16px 48px; }
  .query-guide { grid-template-columns: 1fr; gap: 36px; margin-top: 32px; }
  .qg-coverage { margin-top: 0; }
  .qg-fields li { grid-template-columns: 1fr; gap: 2px; }
  .history-table, .history-table tbody { display: block; width: 100%; }
  .history-table thead { display: none; }
  .history-table tr { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 2px 12px; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
  .history-table tbody tr:last-child { border-bottom: 0; }
  .history-table td { padding: 0 !important; border: 0; height: auto; }
  .history-table td:nth-child(3) { grid-column: 1 / 3; grid-row: 1; }
  .history-table td:nth-child(4) { grid-column: 3; grid-row: 1; }
  .history-table td:nth-child(1), .history-table td:nth-child(2) { grid-row: 2; font-size: 12px; color: var(--muted); }
  .history-table td:nth-child(2) { grid-column: 2; }
  .home-history .table-scroll { margin: 0 -16px; }
  .pagination { padding: 12px 18px; }
  .detail-hero { flex-direction: column; }
  .detail-hero h1 { font-size: 26px; }
  .detail-actions { width: 100%; }
  .record-addresses { grid-template-columns: 1fr; }
  .record-person { display: block; }
  .definition > div { grid-template-columns: 1fr; gap: 2px; }
  .ein-verdict { gap: 14px; }
  .ein-verdict h2 { font-size: 22px; }
  .grid-2 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .account-hero { flex-direction: column; align-items: flex-start; }
  .account-hero h1 { font-size: 24px; }
  .quota-layout { grid-template-columns: 1fr; justify-items: start; gap: 16px; }
  .quota-list { width: 100%; }
  .plan-summary { flex-direction: column; align-items: stretch; }
  .plan-summary .btn { width: 100%; }
  .directory-header { display: block; }
  .directory-header h1 { font-size: 26px; }
  .directory-header .btn { margin-top: 14px; }
  .directory-search { max-width: none; min-width: 0; width: 100%; }
  .state-grid { grid-template-columns: 1fr 1fr; gap: 24px 14px; }
  .state-card h2 { font-size: 16px; }
  .state-card p { font-size: 12px; }
  .directory-summary { grid-template-columns: 1fr 1fr 1fr; }
  .directory-summary .panel { padding: 14px 10px 14px 0; }
  .directory-summary .panel + .panel { padding-left: 10px; }
  .directory-summary strong { font-size: 20px; }
  .map-panel { min-height: 240px; padding: 16px 8px 52px; }
  .state-hero { min-height: 220px; padding: 22px; }
  .state-hero h1 { font-size: 30px; }
  .reader-section.with-photos .reader-section-body { display: flex; flex-direction: column; }
  .reader-section .reader-copy { font-size: 15px; }
  .reader-copy .doc-grid, .reader-copy .doc-sources, .reader-copy .doc-calculator { grid-template-columns: 1fr; }
  .protected-index { grid-template-columns: 1fr 1fr; }
  .protected-gate { padding: 22px 18px; }
  .reader-end { flex-direction: column; align-items: flex-start; }
  .state-picker-list { grid-template-columns: 1fr 1fr; }
  .modal-head { padding: 20px 20px 0; }
  .modal-body { padding: 14px 20px 22px; }
  .checkout-field-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 430px) {
  .topbar { gap: 8px; padding: 0 12px; }
  .top-logo img { height: 12px; }
  .theme-toggle { display: none; }
  .lang-switch .lang-globe { display: none; }
  .lang-switch a { padding: 0 8px; }
  .top-actions { gap: 8px; }
  .top-actions [data-action="login"] { font-size: 0; gap: 0; width: 34px; padding: 0; }
  .top-actions [data-action="login"] svg { width: 18px; height: 18px; }
  .user-trigger > svg { display: none; }
  .app, .app.no-context { grid-template-columns: minmax(0,1fr); }
  .viewport { grid-column: 1; }
  .top-actions { margin-left: auto; }
  .plan-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .plan { padding: 14px 12px 12px; }
  .state-grid { grid-template-columns: 1fr; }
  .directory-summary small { font-size: 12px; }
  .footer-nav { gap: 14px; }
  .modal-actions .btn { min-width: 96px; }
  .account-menu { right: -4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
@media print {
  .rail, .context, .site-footer, .topbar, .reader-toolbar, .reader-end, .modal, .toast { display: none !important; }
  .app { display: block; height: auto; overflow: visible; background: #fff; }
  .viewport { overflow: visible; }
  .page { padding: 0; max-width: none; }
  .panel, .paper { border: 0; padding: 0; }
  .reader-section { break-inside: avoid; }
}

/* ---------- refinement of the supplied Claude composition ----------
   Retain the existing palette, typography, illustrations and article layouts. */
.viewport { overscroll-behavior-y: contain; scroll-padding-top: calc(var(--top) + 18px); }
.context { overscroll-behavior-y: contain; }
.home-plate-copy h1, .home-guide h3, .search-page-title h1 { text-wrap: balance; }
.home-guide:focus-visible { outline-offset: 6px; }
.home-guide .hg-go { text-underline-offset: 4px; }
.breadcrumbs a { min-width: 24px; min-height: 28px; align-items: center; justify-content: center; }
.nav-link { min-height: 42px; }
.nav-tip { position: fixed; z-index: 90; max-width: 250px; padding: 7px 11px; color: var(--ink); background: var(--sheet); border: 1px solid var(--rule-2); border-radius: var(--r2); box-shadow: 0 3px 12px var(--tint); font-size: 13px; line-height: 1.5; pointer-events: none; }
.query-page .search-form { padding: 0; }
.qbar { box-shadow: 0 9px 24px var(--tint), 0 1px 3px var(--tint); }
.qseg { padding-inline: 20px; }
.qseg:has(:focus-visible) { background: var(--well); box-shadow: none; }
.qseg:has(:focus-visible)::before, .qseg:has(:focus-visible) + .qseg::before { opacity: 0; }
.qseg .select-button:focus-visible, .qseg input:focus-visible, .qseg select:focus-visible { outline: none; }
.qseg.has-error { background: var(--bad-bg); box-shadow: inset 0 -2px 0 var(--bad); }
.qseg.has-error label { color: var(--bad); }
.qseg.has-error::before, .qseg.has-error + .qseg::before { opacity: 0; }
.qs-inline:has([aria-invalid="true"]) { outline: 1px solid var(--bad); outline-offset: 5px; }
.qbar [disabled] { cursor: wait; }
.qs-tabs button:focus-visible { outline-offset: 5px; }
.qs-stage .form-bottom > small { flex: 1; min-width: 0; }
.qs-stage .form-bottom > .text-btn { flex: 0 0 auto; }
.result-head > div, .section-head > :first-child { min-width: 0; }
.result-head p, .entity-name, .detail-hero h1 { overflow-wrap: anywhere; }
.pagination-buttons { flex-shrink: 0; }
.table-action { min-height: 38px; }
.record-body [id], .record-disclaimer { scroll-margin-top: 18px; }
.record-toc button { text-align: left; }
.account-page .section-head { flex-wrap: wrap; row-gap: 8px; }
.account-page .section-head .badge { font-size: 11px; }
.quota-circle { height: 158px; align-self: center; }
.quota-num { position: absolute; top: 66px; left: 0; width: 132px; transform: translateY(-50%); white-space: nowrap; }
.quota-caption { position: absolute; top: 134px; left: 0; width: 132px; text-align: center; font-size: 12px; line-height: 1.55; color: var(--muted); }
.quota-list .context-row strong { overflow-wrap: anywhere; }
.plan { display: flex; flex-direction: column; }
.plan-name { display: flex; align-items: flex-start; }
.plan .radio-dot { flex: 0 0 14px; margin-top: 3px; }
.plan-price { margin-top: auto; padding-top: 14px; }
.order-record > span:first-child, .ledger-body { min-width: 0; }
.order-record small { overflow-wrap: anywhere; }
.modal[open] { display: flex; flex-direction: column; overflow: hidden; max-height: calc(100dvh - 40px); }
.modal-head { flex: 0 0 auto; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.modal-body { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding-top: 20px; }
.modal-body:focus { outline: none; }
.modal .modal-head .icon-btn { width: 36px; height: 36px; margin-top: -6px; }
.modal .modal-head h2 { padding-top: 1px; }
.modal .field:has(input:focus-visible) > label { color: var(--ink); }
.modal input:focus-visible { outline: none; box-shadow: none; }
.state-picker-list { grid-template-columns: repeat(3,minmax(0,1fr)); align-content: start; padding: 2px; scrollbar-width: thin; }
.state-picker-list button { align-content: center; min-height: 61px; }
.state-picker-list span, .state-picker-list small { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
.state-picker-list button.selected { box-shadow: inset 2px 0 0 var(--accent); }
.state-picker-list button.selected b { color: var(--accent); }
.state-picker-list button.selected span { font-weight: 600; }
.state-picker-list button:focus-visible { outline: 1px solid var(--ink); outline-offset: -1px; background: var(--well); }
.state-picker-list .no-results { grid-column: 1/-1; margin: 20px 0; }
.modal-code { letter-spacing: .38em; padding-left: calc(12px + .38em); }
.account-menu { max-height: min(420px,calc(100dvh - 120px)); overflow-y: auto; }
@media (min-width:761px) and (max-width:1180px) {
  .qs-inner { padding-inline: 28px; }
  .qs-below { padding-inline: 28px; }
  .qseg { padding-inline: 14px; }
  .qseg-state { flex-basis: 205px; }
  .qseg-match { flex-basis: 172px; }
  .qseg-ein { flex-basis: 170px; }
  .qbar-submit.btn { min-width: 120px; padding-inline: 18px; }
  .qseg input, .qseg .select-button { font-size: 16px; }
  .qseg input::placeholder, .qseg .select-button > span.is-placeholder { font-size: 15px; }
}
@media (max-width:990px) {
  .app.context-open::after { content: ""; position: fixed; inset: 0; z-index: 64; background: var(--scrim); }
  .app.context-open .context { width: min(312px,88vw); }
}
@media (max-width:760px) {
  .topbar { padding-left: max(16px,env(safe-area-inset-left)); padding-right: max(16px,env(safe-area-inset-right)); }
  .site-footer { padding-bottom: max(10px,env(safe-area-inset-bottom)); }
  .app.nav-open .rail-bottom { padding-bottom: max(14px,env(safe-area-inset-bottom)); }
  .app.nav-open .rail .rail-close { width: 44px; height: 44px; top: 10px; right: 8px; }
  .menu-mobile.icon-btn, .context-toggle.icon-btn, .context-close.icon-btn { min-width: 40px; min-height: 40px; }
  .user-trigger { min-height: 40px; }
  .qs-inner { padding: 28px 18px 26px; }
  .qs-below { padding-inline: 18px; }
  .search-page-title { margin-bottom: 24px; }
  .query-page .search-form { padding: 0; }
  .qbar { box-shadow: 0 4px 16px var(--tint); }
  .qseg { padding: 12px 14px; }
  .qseg input, .qseg select, .qseg .select-button { font-size: 16px; }
  .qs-tabs.segmented { gap: 24px; }
  .qbar-submit.btn { min-height: 48px; }
  .qg-fields li { padding-block: 13px; }
  .qg-states button { min-height: 44px; }
  .query-guide { row-gap: 30px; }
  .result-head { align-items: flex-start; }
  .table-action { min-height: 44px; }
  .plan-summary .btn { min-height: 44px; }
  .modal[open] { max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); width: calc(100vw - 24px); }
  .modal-head { padding: 20px 20px 12px; }
  .modal-head h2 { font-size: 20px; }
  .modal-body { padding: 18px 20px 22px; }
  .modal .modal-head .icon-btn { width: 40px; height: 40px; margin: -7px -9px 0 0; }
  .state-picker-modal .modal-body { display: flex; flex-direction: column; }
  .state-picker-modal .directory-search { flex: 0 0 auto; }
  .state-picker-list { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 12px; max-height: 52dvh; min-height: 80px; }
  .state-picker-list button { padding-inline: 6px; column-gap: 4px; grid-template-columns: 26px minmax(0,1fr); }
  .state-picker-list span { font-size: 13px; }
  .state-picker-list small { font-size: 11px; }
  .modal input { font-size: 16px; }
  .modal-actions .btn { min-height: 44px; }
  .auth-actions button { min-height: 44px; }
  .order-details dd { overflow-wrap: anywhere; }
  .nav-tip { display: none; }
}
@media (prefers-reduced-motion:reduce) {
  .viewport { scroll-behavior: auto; }
  .qbar, .qseg, .plan, .quota-circle .value { transition: none; }
}
/* Keep the mobile allowance summary compact instead of stacking an empty half-card. */
@media (min-width:360px) and (max-width:760px) {
  .quota-layout { grid-template-columns: 100px minmax(0,1fr); gap: 18px; align-items: start; }
  .quota-circle { width: 100px; height: 130px; align-self: start; }
  .quota-circle svg { width: 100px; height: 100px; }
  .quota-num { top: 50px; width: 100px; }
  .quota-num strong { font-size: 31px; }
  .quota-num span { font-size: 12px; }
  .quota-caption { top: 104px; width: 100px; font-size: 11px; }
  .quota-list { width: 100%; }
  .quota-list .context-row { gap: 8px; padding-block: 8px; align-items: flex-start; font-size: 12px; }
  .quota-list .context-row > span { flex: 0 1 auto; }
  .quota-list .context-row strong { max-width: 68%; font-size: 12px !important; }
  .quota-list .receipt-note { margin: 9px 0 0; line-height: 1.65; }
}
/* The chapter-outline control gets real space on small screens; never push it off-canvas. */
@media (max-width:430px) {
  .app:not(.no-context) .top-logo img { display: none !important; }
  .app:not(.no-context) .top-logo::before { content: ""; display: block; width: 26px; height: 26px; background: url('../favicons/brand-mark-v2.png') center/contain no-repeat; }
}
@media (max-width:359px) {
  .top-logo img { display: none !important; }
  .top-logo::before { content: ""; display: block; width: 26px; height: 26px; background: url('../favicons/brand-mark-v2.png') center/contain no-repeat; }
  .topbar { gap: 6px; padding-inline: 12px; }
  .top-actions { gap: 6px; }
  .quota-layout { justify-items: center; }
}

/* Architectural watermark: keep Claude's original view, soften its gritty
   raster-edge treatment, and isolate decoration from form controls. */
.home-plate, html[data-theme="dark"] .home-plate { background: none; isolation: isolate; }
.home-plate::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--line) 62% 100% / cover no-repeat; filter: url("#sr-capitol-clean"); opacity: .92; }
html[data-theme="dark"] .home-plate::before { background-image: var(--line-dark); opacity: .86; }
.home-plate-copy { z-index: 1; }
.qs-stage { isolation: isolate; }
.qs-stage::before { content: ""; position: absolute; z-index: -1; pointer-events: none; inset: 0 0 0 auto; width: min(100%,1240px); background: var(--capitol-line) 62% 60% / cover no-repeat; opacity: .23; filter: url("#sr-capitol-clean"); -webkit-mask-image: linear-gradient(90deg,transparent 12%,#000 68%); mask-image: linear-gradient(90deg,transparent 12%,#000 68%); }
html[data-theme="dark"] .qs-stage::before { background-image: var(--capitol-line-dark); opacity: .18; }
.qs-inner { position: relative; z-index: 1; }
.qbar { background: var(--sheet); }
/* This explanatory page is a typeset document, not another set of promo cards. */
.page.data-note-page { max-width: 1160px; padding-top: 52px; padding-bottom: 72px; }
.data-note-header { padding-bottom: 30px; }
.data-note-header h1 { margin: 0; font-family: var(--serif); font-size: clamp(30px,3vw,40px); line-height: 1.3; text-wrap: balance; }
.data-note { border-bottom: 1px solid var(--rule); }
.data-note-section { display: grid; grid-template-columns: minmax(180px,24%) minmax(0,1fr); gap: 38px; padding: 28px 0 30px; border-top: 1px solid var(--rule); align-items: start; }
.data-note-section:first-child { border-top-color: var(--ink); }
.data-note-section h2 { margin: 0; padding-top: 3px; font: 600 20px/1.55 var(--serif); color: var(--ink); text-wrap: balance; }
.data-note-section p { margin: 0; font-size: 15px; line-height: 1.95; color: var(--ink-2); }
.data-note-section p + p { margin-top: 12px; }
.data-note-link { display: inline-block; margin-top: 14px; font-size: 13px; text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 4px; }
.data-note-link:hover { text-decoration-color: var(--ink); }
@media (max-width:760px) {
  .home-plate::before { background-position: 70% 50%; opacity: .8; }
  .qs-stage::before { width: 100%; background-size: auto 390px; background-position: 72% top; opacity: .18; -webkit-mask-image: linear-gradient(90deg,transparent 7%,#000 90%); mask-image: linear-gradient(90deg,transparent 7%,#000 90%); }
  html[data-theme="dark"] .qs-stage::before { opacity: .15; }
  .page.data-note-page { padding-top: 26px; padding-bottom: 44px; }
  .data-note-header { padding-bottom: 24px; }
  .data-note-section { display: block; padding: 24px 0; }
  .data-note-section h2 { font-size: 20px; margin-bottom: 10px; }
  .data-note-section p { font-size: 14px; line-height: 1.95; }
}
.lang-short { display: none; }
@media (max-width:359px) {
  .app .topbar .top-logo img { display: none !important; }
  .lang-switch .lang-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .lang-switch .lang-short { display: inline; font-size: 12px; }
  .lang-switch a { padding-inline: 7px; }
}

/* Shared control states. A field or its compound container owns the border, never both. */
:root { --control-focus: #496991; }
html[data-theme="dark"] { --control-focus: #a0bddf; }
.qbar:focus-within { border-color: var(--control-focus); }
.qbar .qseg:focus-within, .qbar .qseg:has(:focus-visible) { box-shadow: none; }
.qbar input:focus, .qbar select:focus, .qbar .select-button:focus-visible,
.modal .directory-search input:focus, .modal .directory-search input:focus-visible { border: 0; outline: none; box-shadow: none !important; }
.modal .directory-search:focus-within { border-color: var(--control-focus); outline: none; box-shadow: none; }
.modal :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select):focus { outline: none; box-shadow: none; border-color: var(--control-focus); }
.modal .directory-search input:focus { border: 0; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--bad) !important; background: var(--bad-bg); }
.qbar .qseg.has-error { outline: 1px solid var(--bad); outline-offset: -1px; box-shadow: none; }
.input:disabled, .field input:disabled, .field select:disabled, .qbar input:disabled { color: var(--muted); cursor: not-allowed; opacity: .7; }
.auth-dialog .field input { min-height: 48px; font-size: 16px; }
.auth-dialog .modal-code { height: 52px !important; font-size: 24px !important; letter-spacing: .28em; padding: 0 12px 0 calc(12px + .28em); text-align: center; }
.auth-dialog .form-errors { margin-top: 12px; }
.auth-dialog .btn[type="submit"] { min-height: 46px; }
.auth-dialog .auth-actions { flex-wrap: wrap; }
.auth-dialog .auth-actions button { min-height: 40px; }
.auth-dialog .modal-notice { overflow-wrap: anywhere; }
.preview-credit-recovery { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:22px; padding-top:14px; border-top:1px solid var(--rule); }
.preview-credit-recovery small { color:var(--muted); }
.preview-credit-recovery button { min-height:40px; }
.account-menu { min-width: 180px; }
.account-menu a,.account-menu button { min-height:44px; }
.footer-copyright { white-space:nowrap; }
.top-links { display:flex; align-items:center; flex:0 0 auto; gap:18px; margin-left:auto; }
.top-links a { font-size:13px; white-space:nowrap; color:var(--ink-2); }
.mobile-primary,.mobile-extra-links { display:none; }
@media (max-width:760px) {
 :root { --top:88px; }
 .app,:where(html:not([data-b-rail-expanded="true"])) .app.collapsed,.app.no-context { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) auto auto; }
 .app>.viewport { grid-row:1; grid-column:1; scrollbar-gutter:auto; }
 .app>.site-footer { grid-row:2; grid-column:1; min-height:28px; padding:4px 12px; justify-content:center; }
 .site-footer .footer-nav { display:none; }
 .footer-copyright { font-size:10px; line-height:18px; }
 .topbar { display:grid; grid-template-columns:minmax(0,1fr) auto 32px; grid-template-rows:48px 39px; height:var(--top); min-height:var(--top); gap:0 8px; padding:0 14px; }
 .topbar>.breadcrumbs { display:none !important; }
 .topbar>.top-logo { grid-column:1; grid-row:1; min-width:0; margin:0; }
 .topbar>.top-logo img { height:13px; max-width:125px; width:auto; }
 .topbar>.top-links { grid-row:2; grid-column:1; min-width:0; width:auto; margin:0; height:39px; gap:18px; border:0; }
 .top-links a { display:inline-flex; align-items:center; height:38px; font-size:12px; text-decoration:none; transition:color .15s; }
 .top-links a:hover,.top-links a[aria-current="page"] { color:var(--primary); }
 .topbar>.top-actions { display:contents; }
 .top-actions>.theme-toggle { display:inline-flex; grid-row:1; grid-column:2; justify-self:end; }
 .top-actions>#user-menu { grid-row:1; grid-column:3; justify-self:end; }
 .top-actions:has(#user-menu[hidden])>.theme-toggle { grid-column:3; }
 .top-actions>.lang-switch { grid-row:2; grid-column:2/4; justify-self:end; }
 .top-actions>.context-toggle { grid-row:1; grid-column:1; justify-self:end; }
 .app .topbar .top-logo::before { display:none; }
 .app .topbar .top-logo img.logo-light { display:block!important; }
 .app .topbar .top-logo img.logo-dark { display:none!important; }
 html[data-theme="dark"] .app .topbar .top-logo img.logo-light { display:none!important; }
 html[data-theme="dark"] .app .topbar .top-logo img.logo-dark { display:block!important; }
 .top-actions .lang-switch { height:30px; padding:1px; gap:0; font-size:12px; }
 .lang-switch .lang-globe { display:none; }
 .lang-switch .lang-full { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
 .lang-switch .lang-short { display:inline; font-size:12px; }
 .lang-switch a { height:26px; padding:0 7px; }
 .top-actions .icon-btn,.top-actions .user-trigger { width:30px; min-width:30px; height:36px; padding:0; gap:0; justify-content:center; }
 .top-actions .user-trigger .i-down { display:none; }
 .top-actions .avatar { width:28px; height:28px; font-size:12px; }
 .top-actions [data-action="login"] { width:32px; min-width:32px; height:36px; padding:0 !important; font-size:0; gap:0; border:0; background:transparent; }
 .top-actions [data-action="login"] .icon { width:19px; height:19px; }
 .mobile-primary { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); grid-column:1; grid-row:3; position:relative; z-index:25; padding:4px max(4px,env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left)); background:var(--sheet); border-top:1px solid var(--rule); }
 .mobile-primary a,.mobile-primary button.menu-mobile { display:flex; position:relative; flex-direction:column; align-items:center; justify-content:center; min-width:0; width:100%; min-height:54px; gap:4px; margin:0; padding:5px 0; font-size:11px; line-height:1.3; color:var(--muted); border-radius:4px; white-space:nowrap; }
 .mobile-primary .icon { width:21px; height:21px; stroke-width:1.6; }
 .mobile-primary [aria-current="page"] { color:var(--primary); font-weight:600; background:var(--well); }
 .mobile-primary [aria-current="page"]::before { content:""; position:absolute; top:-4px; width:25px; height:2px; background:var(--accent); }
 .mobile-primary a:focus-visible,.mobile-primary button:focus-visible { outline:1px solid var(--control-focus); outline-offset:-3px; }
 .app.nav-open .rail { padding-bottom:env(safe-area-inset-bottom); }
 .app.nav-open .rail .nav-link[data-mobile-query],.app.nav-open .rail .nav-divider { display:none; }
 .app.nav-open .rail .mobile-extra-links { display:block; border-top:1px solid var(--rail-line); padding-top:8px; margin-top:8px; }
 .app.nav-open .rail .mobile-extra-links .nav-link { min-height:44px; }
 .keyboard-open .app>.site-footer,.keyboard-open .mobile-primary { display:none; }
 .keyboard-open .app { grid-template-rows:minmax(0,1fr); }
 .keyboard-open .topbar { grid-template-rows:48px; height:48px; min-height:48px; }
 .keyboard-open .topbar .top-links { display:none; }
 .keyboard-open .topbar .lang-switch { display:none; }
 .keyboard-open .topbar.has-path>.breadcrumbs { display:none!important; }
 .keyboard-open .topbar.has-path { grid-template-rows:48px; height:48px; min-height:48px; }
 .keyboard-open { --top:48px; }
}
@media (max-width:359px) {
 .mobile-primary a,.mobile-primary button.menu-mobile { font-size:10px; }
}
@media print { .mobile-primary { display:none !important; } }

/* The map, not its border, uses the available width. State feature pages are unaffected. */
.page.map-dir-page { max-width:1360px; }
.map-panel.map-workbench { display:block; place-items:normal; min-height:0; padding:0; border:1px solid var(--rule); background:var(--sheet); color:var(--ink); }
.map-toolbar,.map-bottom { width:100%; display:flex; gap:16px; align-items:center; justify-content:space-between; padding:12px 18px; background:var(--sheet); }
.map-toolbar { border-bottom:1px solid var(--rule); }
.map-toolbar .map-tooltip { position:static; min-width:140px; max-width:none; padding:0 0 0 12px; background:transparent; color:var(--ink); font-size:18px; border-left:2px solid var(--accent); }
.map-tooltip small { color:var(--muted); font-size:12px; }
.map-actions { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.map-zoom { display:flex; align-items:center; border:1px solid var(--rule-2); border-radius:4px; background:var(--sheet); }
.map-zoom button { min-width:40px; min-height:40px; padding:4px 9px; color:var(--ink); font-size:17px; }
.map-zoom button[data-map-zoom="fit"] { font-size:12px; border-left:1px solid var(--rule); }
.map-zoom button:hover { background:var(--well); }
.map-zoom output { min-width:46px; text-align:center; font-size:12px; font-variant-numeric:tabular-nums; color:var(--muted); }
.map-actions>.btn { min-height:42px; }
.map-viewport { width:100%; overflow:auto; background:var(--well); scrollbar-width:thin; scrollbar-color:var(--rule-2) transparent; scroll-behavior:auto; }
.map-viewport:focus-visible { outline:1px solid var(--control-focus); outline-offset:-2px; }
.map-canvas { width:100%; min-width:0; }
.map-workbench .us-map { display:block; width:100%; height:auto; max-height:none; overflow:hidden; }
.map-workbench[data-zoomed="true"] .map-viewport { cursor:grab; }
.map-workbench[data-zoomed="true"] .map-viewport:active { cursor:grabbing; }
.map-workbench .map-bottom { border-top:1px solid var(--rule); }
.map-workbench .map-caption { position:static; font-size:12px; color:var(--muted); }
.map-workbench #map-label-toggle { min-height:40px; background:transparent; border-color:var(--rule-2); color:var(--ink); }
.map-workbench #map-label-toggle:hover { border-color:var(--control-focus); }
.map-short-labels { display:none; }
.map-workbench[data-labels="false"] :is(.map-labels,.map-short-labels) { display:none !important; }
@media(max-width:760px) {
 .map-dir-page .directory-header { align-items:flex-start; flex-direction:column; gap:14px; }
 .map-toolbar { flex-wrap:wrap; padding:12px; gap:12px; }
 .map-actions { width:100%; justify-content:space-between; gap:8px; }
 .map-zoom button { min-width:38px; min-height:44px; }
 .map-zoom output { min-width:42px; }
 .map-actions>.btn { min-height:44px; }
 .map-workbench .map-bottom { padding:10px 12px; gap:10px; }
 .map-bottom .map-caption { max-width:56%; font-size:11px; }
 .map-workbench #map-label-toggle { font-size:12px; min-height:44px; white-space:nowrap; padding-inline:10px; }
 .map-workbench .map-labels { display:none; }
 .map-workbench .map-short-labels { display:block; }
 .map-workbench .map-short-labels text { font-size:22px; font-weight:500; }
}
/* October 3 detail pass: shared form geometry, compact guides, readable overlays. */
#user-menu[hidden] { display:none!important; }
.brand-mark { border-radius:0; background:none; object-fit:contain; }

/* A number type belongs to the registration-number search, not a second form. */
.qbar-with-type { display:grid; grid-template-columns:minmax(155px,1fr) minmax(155px,.95fr) minmax(220px,2.4fr) auto; align-items:stretch; }
.qbar-with-type .qseg { min-width:0; }
.qseg-type { min-width:0; }
.qseg-select { display:flex; align-items:center; gap:10px; min-width:0; height:32px; }
.qseg-select>.icon { width:18px; height:18px; color:var(--muted); flex:0 0 18px; }
.qseg-select .i-down { position:absolute; right:0; width:15px; height:15px; pointer-events:none; }
.qseg-select { position:relative; }
.qseg-select select { width:100%; min-width:0; height:100%; border:0; background:transparent; padding:0 23px 0 0; appearance:none; -webkit-appearance:none; cursor:pointer; border-radius:0; font-size:18px; line-height:1.4; box-shadow:none; outline:none; }
.qseg-select select:has(option:checked[value=""]) { color:var(--faint); }
.qseg-select option { background:var(--sheet); color:var(--ink); }
.qbar-with-type .qbar-submit { margin:0; min-width:112px; }
.qbar-with-type .qseg-state .select-button { font-size:18px; }

/* Three complete guide links, with a single deliberate interaction on the card. */
.home-guides-wrap>h2 { border-bottom:0; margin-bottom:18px; padding:0; }
.home-guides { gap:16px; }
.home-guide,.home-guide+.home-guide { min-width:0; padding:25px 26px 27px; border:1px solid var(--rule); border-radius:12px; background:var(--sheet); text-decoration:none; overflow:hidden; transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease,background-color .22s ease; }
.home-guide::before { height:2px; top:0; left:25px; right:25px; background:var(--primary); opacity:.75; }
.home-guide:hover,.home-guide:focus-visible { border-color:var(--rule-2); background:var(--hover); box-shadow:0 10px 26px -15px var(--shadow); transform:translateY(-3px); text-decoration:none; }
.home-guide:hover h3,.home-guide:focus-visible h3 { text-decoration:none; }
.home-guide h3 { font-size:21px; line-height:1.45; padding-right:12px; }
.home-guide p { margin:0; padding-right:12px; font-size:13px; line-height:1.85; }
.home-guide .hg-fact { display:flex; align-items:baseline; gap:8px; font-size:12px; margin:0 0 22px; color:var(--muted); padding-right:22px; }
.home-guide .hg-fact b { font-size:29px; line-height:1; color:var(--ink); }
.hg-arrow { position:absolute; top:25px; right:22px; display:grid; place-items:center; width:26px; height:26px; color:var(--muted); transition:transform .22s ease,color .22s ease; }
.hg-arrow .icon { display:block; width:19px; height:19px; }
.home-guide:hover .hg-arrow,.home-guide:focus-visible .hg-arrow { transform:translateX(4px); color:var(--ink); }

/* The two lines under the allowance diagram share an actual grid row. */
.account-page .quota-layout { grid-template-columns:132px minmax(0,1fr); gap:18px 28px; align-items:center; }
.account-page .quota-circle { grid-area:1/1; width:132px; height:132px; }
.account-page .quota-circle svg { width:132px; height:132px; }
.account-page .quota-num { top:66px; width:132px; }
.account-page .quota-list { grid-area:1/2; width:100%; min-width:0; }
.account-page .quota-caption { position:static; grid-area:2/1; display:block; width:auto; margin:0; transform:none; text-align:center; font-size:12px; line-height:1.75; align-self:baseline; }
.account-page .quota-note { grid-area:2/2; margin:0; padding:0; line-height:1.75; align-self:baseline; font-size:12px; }
.account-guest-page { display:grid; align-content:start; justify-items:center; padding-top:clamp(42px,8vh,80px); width:100%; }
.account-page .account-guest { width:min(100%,680px); max-width:680px; margin:0 auto; padding:clamp(28px,4.5vw,48px); border-radius:12px; }
.account-guest h1 { margin:0 0 20px; font-size:30px; line-height:1.4; }
.account-guest p { margin:0 0 28px; max-width:none; font-size:14px; line-height:1.9; }
.account-guest .btn { min-width:124px; min-height:46px; }
.checkbox-line { align-items:flex-start; }
.checkbox-line input { flex:0 0 auto; margin-top:4px; }
.checkbox-line a { color:var(--ink); text-decoration:underline; text-decoration-color:var(--rule-2); text-underline-offset:3px; }
.checkbox-line a:hover { text-decoration-color:var(--ink); }

/* One report action, aligned with the verification time rather than floating by the title. */
.ein-verdict-copy { flex:1; min-width:0; }
.ein-verdict-footer { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:14px 24px; margin-top:20px; padding-top:16px; border-top:1px solid var(--rule); }
.ein-verdict-footer .result-time { margin:0; }
.ein-export.btn { min-height:42px; padding:9px 16px; white-space:nowrap; font-size:13px; background:var(--sheet); color:var(--ink); border:1px solid var(--rule-2); }
.ein-export .icon { width:16px; height:16px; }
.ein-site-history .receipt-note { margin:14px 0 0; }
.ein-result-note { margin:20px 0; padding:0 2px; color:var(--muted); font-size:13px; }
.ein-result-note h2 { font-family:var(--sans); font-size:14px; margin:0 0 8px; }
.ein-result-note p { margin:0 0 7px; line-height:1.8; }

/* Original map geometry and lights, with separate paper/day and night treatments. */
.map-dir-page .directory-header { display:block; }
.map-dir-page .directory-header>div { width:100%; min-width:0; }
.map-dir-page .directory-header p { max-width:none; width:100%; text-wrap:pretty; }
.map-dir-page .directory-header>.btn { margin-top:18px; }
.map-workbench .map-viewport { background:var(--paper); }
html[data-theme="dark"] .map-workbench .map-viewport { background:#01021d; }
.map-workbench .us-map image { display:inline!important; opacity:1; animation:sr-map-lights 2.6s cubic-bezier(.2,.6,.2,1) both; }
.map-workbench .us-map .state-shape { fill:transparent!important; stroke:none!important; }
.map-workbench .us-map .state-shape path { fill:#01021d; fill-opacity:0; pointer-events:all; stroke:#fff; stroke-opacity:.2; stroke-width:.7; vector-effect:non-scaling-stroke; stroke-linejoin:round; transition:fill-opacity .25s,stroke-opacity .25s; }
.map-workbench .us-map .state-shape.inset path { fill:#0c1540; fill-opacity:1; stroke-opacity:.35; }
.map-workbench .us-map:hover .state-shape path { stroke-opacity:.42; }
.map-workbench .us-map.has-focus .state-shape:not(.is-hovered) path { fill-opacity:.5; }
.map-workbench .us-map.has-focus .state-shape.inset:not(.is-hovered) path { fill:#0b0f38; fill-opacity:1; }
.map-workbench .us-map .state-shape:is(.is-hovered,:focus-visible,.chosen) path { fill:#ffd98a; fill-opacity:.1; stroke:#ffd98a; stroke-opacity:1; stroke-width:1.6; filter:drop-shadow(0 0 5px #ffc45ccc); }
.map-workbench .us-map .state-shape.inset:is(.is-hovered,:focus-visible) path { fill:#6d5a3a; fill-opacity:1; }
.map-workbench .us-map text { fill:#e6ebf2!important; stroke:#01021d!important; stroke-width:2.4; paint-order:stroke fill; stroke-linejoin:round; }
.map-workbench .map-short-labels { pointer-events:none; }
.map-workbench .map-day-image { display:block; }
.map-workbench .us-map image.map-night-image { display:none!important; }
html[data-theme="dark"] .map-workbench .map-day-image { display:none; }
html[data-theme="dark"] .map-workbench .us-map image.map-night-image { display:inline!important; }
html:not([data-theme="dark"]) .map-workbench .us-map .state-shape path { fill:#243b55; fill-opacity:0; stroke:#62768b; stroke-opacity:.48; stroke-width:.75; }
html:not([data-theme="dark"]) .map-workbench .us-map .state-shape.inset path { fill:#c8d2da; fill-opacity:1; stroke-opacity:.6; }
html:not([data-theme="dark"]) .map-workbench .us-map:hover .state-shape path { stroke-opacity:.65; }
html:not([data-theme="dark"]) .map-workbench .us-map.has-focus .state-shape:not(.is-hovered) path { fill-opacity:.09; }
html:not([data-theme="dark"]) .map-workbench .us-map.has-focus .state-shape.inset:not(.is-hovered) path { fill:#c0cbd5; fill-opacity:1; }
html:not([data-theme="dark"]) .map-workbench .us-map .state-shape:is(.is-hovered,:focus-visible,.chosen) path { fill:#ffe0a3; fill-opacity:.16; stroke:#a67524; stroke-opacity:1; stroke-width:1.8; filter:drop-shadow(0 0 5px #bd873780); }
html:not([data-theme="dark"]) .map-workbench .us-map .state-shape.inset:is(.is-hovered,:focus-visible,.chosen) path { fill:#ead4a8; fill-opacity:1; }
html:not([data-theme="dark"]) .map-workbench .us-map text { fill:#263c51!important; stroke:#f3f3ef!important; stroke-width:2.8; }
html:not([data-theme="dark"]) .map-workbench .us-map .state-shape polygon { fill:#b28642; stroke:#f3f3ef; }
html:not([data-theme="dark"]) .map-workbench .us-map .state-shape line { stroke:#62768b; }

.map-viewport { overscroll-behavior-x:contain; overscroll-behavior-y:auto; -webkit-overflow-scrolling:touch; }
@keyframes sr-map-lights { from{opacity:0}to{opacity:1} }

/* A quiet, compact legal note; all original wording is retained. */
.disclaimer-dialog { width:min(660px,calc(100vw - 40px)); padding:0; border:1px solid var(--rule); border-radius:16px; background:var(--sheet); box-shadow:0 24px 80px -20px var(--shadow); }
.disclaimer-dialog .modal-head { align-items:center; padding:28px 30px 22px; border:0; background:transparent; }
.disclaimer-dialog .modal-head h2 { margin:0; font-size:25px; line-height:1.35; letter-spacing:0; }
.disclaimer-dialog .modal-head .icon-btn { width:38px; height:38px; padding:0; margin:0; border:1px solid var(--rule); border-radius:50%; color:var(--muted); background:var(--well); }
.disclaimer-dialog .modal-head .icon-btn:hover { color:var(--ink); border-color:var(--rule-2); }
.disclaimer-dialog .modal-body { padding:0 30px 28px; }
.disclaimer-copy { font-size:14px; line-height:1.95; color:var(--ink-2); }
.disclaimer-copy p { margin:0 0 14px; }
.disclaimer-copy p:first-child { color:var(--ink); }
.disclaimer-copy p:last-child { margin-bottom:0; }

/* Keep a single vertical scroll owner for the frame and all editorial content. */
.viewport { -webkit-overflow-scrolling:touch; overscroll-behavior-y:auto; }
.editorial-page sr-feature { overflow:visible; height:auto; min-height:0; }
.breadcrumbs { gap:7px; }
.breadcrumb-separator { display:inline-flex; flex:0 0 auto; }
.breadcrumbs a { flex:0 0 auto; min-height:32px; align-items:center; }
.breadcrumbs strong { min-width:0; }
.breadcrumbs a:hover { text-decoration:none; }

/* Letter: keep the supplied typefaces; only reduce outsized display elements. */
.letter-host .founder-letter .letter-page { padding-top:38px; }
.letter-host .founder-letter .letter-page h1 { font-size:clamp(44px,5.4vw,82px); line-height:1.3; }
.letter-host .founder-letter.letter-english .letter-page h1 { font-size:clamp(56px,6.6vw,102px); line-height:1.14; }
.letter-host .founder-letter .letter-opening { padding:20px 0 38px; }
.letter-host .founder-letter .letter-layout { padding-top:42px; }
.letter-host .founder-letter .letter-signoff { width:280px; max-width:68%; }

@media(min-width:761px) and (max-width:1050px) {
 .qbar-with-type { grid-template-columns:minmax(130px,1fr) minmax(130px,1fr) minmax(150px,1.4fr) auto; }
 .qbar-with-type .qseg { padding:12px 14px; }
 .qbar-with-type .qseg-state .select-button,.qseg-select select,.qbar-with-type #query-term { font-size:16px; }
 .qbar-with-type .qbar-submit { min-width:88px; padding-inline:12px; }
 .qbar-with-type .select-button { gap:7px; }
 .home-guide,.home-guide+.home-guide { padding:22px 20px; }
 .home-guide h3 { font-size:19px; }
}
@media(max-width:760px) {
 .viewport { overflow-x:hidden; overflow-y:auto; touch-action:pan-y pinch-zoom; min-height:0; }
 .app>.viewport { height:100%; }
 .page.home-page { padding-bottom:28px; }
 .home-guides-wrap { margin-top:28px; }
 .home-guides-wrap>h2 { font-size:19px; margin-bottom:14px; }
 .home-guides { grid-template-columns:minmax(0,1fr); gap:12px; }
 .home-guide,.home-guide+.home-guide { display:grid!important; grid-template-columns:minmax(0,1fr) 24px; grid-template-rows:auto auto auto; padding:18px 20px; border:1px solid var(--rule); border-radius:10px; }
 .home-guide .hg-fact { grid-area:1/1; gap:7px; margin:0 0 7px; padding:0; font-size:11px; line-height:1.4; }
 .home-guide .hg-fact b { font-size:22px; }
 .home-guide h3 { grid-area:2/1; font-size:20px; padding:0; margin:0 0 6px; }
 .home-guide p { grid-area:3/1; font-size:12px; padding:0; margin:0; line-height:1.8; }
 .hg-arrow { position:static; grid-area:1/2/4/3; align-self:center; justify-self:end; }
 .home-guide:hover { transform:none; }
 .qbar-with-type { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:0; }
 .qbar-with-type .qseg { padding:12px; }
 .qbar-with-type .qseg-state { grid-area:1/1; }
 .qbar-with-type .qseg-type { grid-area:1/2; }
 .qbar-with-type .qseg-main { grid-area:2/1/3/3; }
 .qbar-with-type .qbar-submit { grid-area:3/1/4/3; margin-top:6px; min-height:50px; }
 .qbar-with-type .qseg-state .select-button,.qbar-with-type .qseg-select select { font-size:15px; }
 .qbar-with-type .qseg-select { gap:7px; }
 .qbar-with-type .qseg-type::before { top:14px; bottom:14px; left:0; right:auto; height:auto; width:1px; }
 .qbar-with-type .qseg-main::before { left:12px; right:12px; top:0; bottom:auto; height:1px; width:auto; }
 .qbar-with-type .select-button { gap:6px; }
 .qseg-state .select-button .icon,.qseg-select>.icon { width:16px; height:16px; flex-basis:16px; }
 .account-page .quota-layout { grid-template-columns:96px minmax(0,1fr); gap:14px 16px; }
 .account-page .quota-circle { width:96px; height:96px; align-self:center; }
 .account-page .quota-circle svg { width:96px; height:96px; }
 .account-page .quota-num { top:48px; width:96px; }
 .account-page .quota-num strong { font-size:30px; }
 .account-page .quota-caption,.account-page .quota-note { font-size:11px; line-height:1.75; }
 .account-page .quota-list .context-row { font-size:12px; gap:10px; padding-block:7px; }
 .account-page .quota-list .context-row strong { font-size:12px!important; }
 .account-guest-page { padding-top:30px; }
 .account-page .account-guest { padding:26px 24px; }
 .account-guest h1 { font-size:27px; }
 .account-guest p { font-size:14px; margin-bottom:24px; }
 .ein-verdict-footer { align-items:flex-start; margin-top:16px; gap:12px; }
 .ein-verdict-footer .result-time { width:100%; font-size:12px; }
 .ein-export.btn { min-height:44px; }
 .ein-result-page .ein-verdict { gap:14px; }
 .ein-result-page .ein-verdict h2 { font-size:20px; }
 .disclaimer-dialog { width:calc(100vw - 24px); border-radius:14px; }
 .disclaimer-dialog .modal-head { padding:22px 22px 18px; }
 .disclaimer-dialog .modal-head h2 { font-size:22px; }
 .disclaimer-dialog .modal-body { padding:0 22px 22px; }
 .disclaimer-copy { font-size:13px; line-height:1.9; }
 .topbar.has-path { grid-template-rows:48px 39px 38px; height:125px; min-height:125px; }
 .topbar.has-path>.breadcrumbs { display:flex!important; grid-column:1/-1; grid-row:3; align-items:center; height:38px; min-width:0; font-size:11px; border-top:1px solid var(--rule); }
 .topbar.has-path>.breadcrumbs a { min-height:32px; }
 .topbar.has-path>.breadcrumbs .icon { width:12px; height:12px; }
 .letter-host .founder-letter .letter-page { padding:22px 24px 40px; }
 .letter-host .founder-letter .letter-page h1 { font-size:clamp(32px,8.4vw,48px); line-height:1.4; }
 .letter-host .founder-letter.letter-english .letter-page h1 { font-size:clamp(46px,11vw,66px); }
 .letter-host .founder-letter .letter-opening { padding:15px 0 26px; }
 .letter-host .founder-letter .letter-layout { padding-top:28px; }
 .letter-host .founder-letter .letter-signoff { width:210px; max-width:68%; }
}
@media(prefers-reduced-motion:reduce) {
 .home-guide,.hg-arrow,.home-guide::before { transition:none; }
 .map-workbench .us-map image { animation:none; }
 .map-workbench .us-map .state-shape path { transition:none; }
}
/* Compact key/value rows keep timestamps together in both EIN cards. */
.ein-result-page .detail-grid .definition { grid-template-columns:minmax(0,1fr); gap:0; }
.ein-result-page .detail-grid .definition>div { grid-template-columns:minmax(110px,.65fr) minmax(0,1.35fr); }
.ein-result-page .detail-grid .definition dd { overflow-wrap:anywhere; }
@media(max-width:760px) {
 .ein-result-page .detail-grid .definition>div { grid-template-columns:minmax(90px,.7fr) minmax(0,1.3fr); }
}
