/* mails.fit — hand-written CSS, no build step.
   Direction: "spec sheet". Ink on paper, hairlines, Geist Mono labels; Signal Red only for
   primary actions, focus and the brand dot. See docs/design-guidelines.md. */

@font-face { font-family: "Geist"; src: url("/assets/fonts/geist-variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/fonts/geist-mono-variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  /* color */
  --red: #e11d2e; --red-dark: #b81424; --red-soft: #fdecee;
  --ink: #0a0a0a; --paper: #fff;
  --g50: #f5f5f5; --g200: #e5e5e5; --g500: #737373; --g800: #262626;
  --g600: #5c5c5c; /* muted text on tinted (#f5f5f5) surfaces: 6.0:1 */
  --on-ink-muted: #a3a3a3;
  /* type */
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --fs-xs: 0.75rem; --fs-sm: 0.875rem; --fs-base: 1rem; --fs-md: 1.125rem; --fs-lg: 1.25rem;
  --fs-h3: 1.25rem; --fs-h2: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); --fs-h1: clamp(2.5rem, 1.4rem + 4.6vw, 4.75rem);
  /* space (4px base) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  /* shape + motion */
  --r-sm: 6px; --r: 10px; --line: 1px solid var(--g200);
  --t: 160ms cubic-bezier(.2, .7, .2, 1);
  --ease: cubic-bezier(.2, 0, 0, 1); /* signature curve for illustration loops */
  --wrap: 1200px; --gutter: 20px;
}
@media (min-width: 768px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: var(--fs-base); line-height: 1.6; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
h1 { font-size: var(--fs-h1); letter-spacing: -0.045em; line-height: 1.02; font-weight: 700; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.035em; }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 var(--s4); }
code, pre, .mono { font-family: var(--mono); font-feature-settings: "zero" 0; }
code { font-size: .9em; background: var(--g50); border: var(--line); border-radius: 4px; padding: 1px 5px; overflow-wrap: anywhere; }
.h-md { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); letter-spacing: -0.04em; line-height: 1.05; }
.h-sm { font-size: 1.5rem; margin: 0 0 var(--s4); }
.h-xs { font-size: 1.125rem; letter-spacing: -0.01em; }
.lead { font-size: var(--fs-md); color: var(--g800); max-width: 62ch; }
@media (min-width: 768px) { .lead { font-size: var(--fs-lg); } }
.muted { color: var(--g500); font-size: var(--fs-sm); }
.small { font-size: var(--fs-sm); }
.nowrap { white-space: nowrap; }
.eyebrow { font-family: var(--mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--g500); margin: 0 0 var(--s4); }
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--s4); top: -100px; z-index: 10; background: var(--ink); color: var(--paper); padding: var(--s2) var(--s4); border-radius: var(--r-sm); }
.skip:focus { top: var(--s4); }
.icon { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- buttons ---------- */
/* Primary red (darker on hover), secondary ink, tertiary line. Depth is a 1px inner highlight
   plus a soft drop shadow that flattens on press; focus is the red ring used site-wide. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s5); border: 1px solid transparent; border-radius: var(--r-sm); font: 600 var(--fs-base)/1 var(--sans); letter-spacing: -0.01em; text-decoration: none; cursor: pointer; transition: background var(--t), border-color var(--t), color var(--t), box-shadow var(--t), transform var(--t); white-space: nowrap; -webkit-user-select: none; user-select: none; }
.btn .icon { width: 18px; height: 18px; flex: none; }
.btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.btn-red { background: var(--red); color: #fff; border-color: var(--red-dark); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(184,20,36,.3), 0 2px 6px rgba(225,29,46,.18); }
.btn-red:hover { background: var(--red-dark); }
.btn-ink { background: var(--ink); color: var(--paper); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 1px 2px rgba(10,10,10,.24); }
.btn-ink:hover { background: var(--g800); }
.btn-line { background: var(--paper); color: var(--ink); border-color: #d4d4d4; box-shadow: 0 1px 2px rgba(10,10,10,.06); }
.btn-line:hover { border-color: var(--ink); background: #fafafa; }
.btn-outline-light { color: #fff; border-color: rgba(255,255,255,.35); }
.btn-outline-light:hover { border-color: #fff; }
.btn:active { transform: translateY(1px); box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .btn, .btn:active { transition: none; transform: none; } }
.btn-lg { min-height: 52px; padding: 0 var(--s6); font-size: var(--fs-md); }
.btn-block { width: 100%; }
.link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 24px; }
.more { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 600; text-decoration: none; }
.more .icon { transition: transform var(--t); }
.more:hover .icon { transform: translateX(3px); }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: baseline; padding: 11px 0; font-weight: 800; font-size: 22px; letter-spacing: -0.035em; text-decoration: none; line-height: 1; }
.logo .dot { width: 6px; height: 6px; background: var(--red); margin: 0 2px; }

/* ---------- public header ---------- */
.banner { background: var(--ink); color: var(--paper); font-size: var(--fs-sm); }
.banner p { max-width: var(--wrap); margin: 0 auto; padding: var(--s2) var(--gutter); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); }
.banner-tag { font-family: var(--mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; border: 1px solid rgba(255,255,255,.35); padding: 1px 6px; border-radius: 3px; }
.banner a { color: var(--paper); font-weight: 600; }
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: var(--line); }
.header-row { display: flex; align-items: center; gap: var(--s5); min-height: 64px; }
.nav-desktop { display: none; gap: var(--s5); }
.nav-desktop a, .nav-login { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--g800); padding: var(--s2) 0; }
.nav-desktop a:hover, .nav-login:hover { color: var(--ink); text-decoration: underline; }
.nav-account { margin-left: auto; display: flex; align-items: center; gap: var(--s4); }
.nav-account .nav-login { display: none; }
.nav-account .btn { min-height: 40px; padding: 0 var(--s4); font-size: 15px; }
.nav-mobile { position: relative; }
.nav-mobile summary { list-style: none; cursor: pointer; min-height: 40px; min-width: 44px; display: flex; align-items: center; padding: 0 var(--s3); border: var(--line); border-radius: var(--r-sm); font-weight: 600; font-size: 15px; }
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile[open] summary { border-color: var(--ink); }
.nav-mobile nav { position: absolute; right: 0; top: calc(100% + 8px); background: var(--paper); border: var(--line); border-radius: var(--r); box-shadow: 0 12px 32px rgba(10,10,10,.12); display: grid; min-width: 220px; padding: var(--s2); }
.nav-mobile nav a { padding: var(--s3) var(--s3); min-height: 44px; text-decoration: none; font-weight: 500; border-radius: var(--r-sm); }
.nav-mobile nav a:hover { background: var(--g50); }
@media (min-width: 960px) {
  .nav-desktop { display: flex; }
  .nav-mobile { display: none; }
  .nav-account .nav-login { display: inline; }
}

/* ---------- sections ---------- */
/* Hairline drawn inside the gutters so it lines up with the content edge. */
.section, .cta { background: linear-gradient(var(--g200), var(--g200)) center top / calc(100% - 2 * var(--gutter)) 1px no-repeat; }
.section { padding-top: var(--s8); padding-bottom: var(--s8); }
.section-tight { padding-top: var(--s5); padding-bottom: var(--s7); }
@media (min-width: 768px) { .section { padding-top: var(--s9); padding-bottom: var(--s9); } }
.section-head { max-width: 760px; margin-bottom: var(--s7); }
.section-head h2 { margin-bottom: var(--s4); }
.section-head .lead:empty { display: none; }
.page-head { padding-top: var(--s8); padding-bottom: var(--s7); }
.page-head h1 { max-width: 16ch; margin-bottom: var(--s5); }
@media (min-width: 768px) { .page-head { padding-top: var(--s9); } }
.narrow-section { max-width: 760px; padding-top: var(--s8); padding-bottom: var(--s9); }
.narrow-section h1 { margin-bottom: var(--s4); }
.narrow-section .h-sm { margin-top: var(--s7); }
.two-col { display: grid; gap: var(--s7); }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; align-items: start; } }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s7); padding-top: var(--s8); padding-bottom: var(--s8); align-items: center; }
.hero h1 { margin-bottom: var(--s5); }
.hero .lead { margin-bottom: var(--s6); }
@media (min-width: 1024px) { .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--s8); padding-top: var(--s10); padding-bottom: var(--s9); } }
.check-form { display: flex; flex-wrap: wrap; gap: var(--s2); max-width: 560px; }
.check-form input { flex: 1 1 240px; min-width: 0; }
.check-form .btn { flex: 1 0 auto; }
@media (min-width: 480px) { .check-form .btn { flex: 0 0 auto; } }
.check-meta { font-family: var(--mono); font-size: var(--fs-sm); color: var(--g500); margin-top: var(--s3); }

/* readout: the signature spec-sheet panel */
.readout { border: 1px solid var(--ink); border-radius: var(--r); background: var(--paper); box-shadow: 6px 6px 0 var(--ink); font-size: var(--fs-sm); }
.readout-head .muted { color: var(--g600); }
.readout-head { display: flex; justify-content: space-between; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--ink); background: var(--g50); border-radius: var(--r) var(--r) 0 0; }
.readout-block { padding: var(--s4); border-bottom: var(--line); }
.readout-block:last-child { border-bottom: 0; }
.readout-label { font-size: var(--fs-xs); color: var(--g500); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 var(--s3); }
.readout-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.readout-rows li { display: flex; align-items: baseline; gap: var(--s2); }
.leader { flex: 1; border-bottom: 1px dotted var(--g200); transform: translateY(-4px); }
.scale { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; font-family: var(--mono); font-size: var(--fs-xs); }
.band { padding: var(--s2); border-radius: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.band-low { background: var(--red-soft); color: #8a0f1a; }
.band-mid { background: var(--g50); color: var(--g800); border: 1px dashed var(--g500); }
.band-high { background: var(--ink); color: var(--paper); }

/* verdicts: shape + icon + word, never color alone */
.verdicts { display: flex; flex-wrap: wrap; gap: var(--s2); }
.verdict { display: inline-flex; align-items: center; gap: 6px; font: 500 var(--fs-sm)/1 var(--mono); padding: 6px 10px; border-radius: 999px; border: 1px solid transparent; }
.verdict .icon { width: 14px; height: 14px; }
.v-ok { background: var(--ink); color: var(--paper); }
.v-risky { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.v-bad { background: var(--red-soft); color: #8a0f1a; border-color: #f5b8bf; }
.v-unknown { background: var(--g50); color: var(--g800); border: 1px dashed var(--g500); }

/* status pills for feature availability */
.pill { display: inline-flex; align-items: center; gap: 6px; font: 500 var(--fs-xs)/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 5px 8px; border-radius: 4px; white-space: nowrap; margin: 0; }
.pill .icon { width: 13px; height: 13px; }
.pill-live { background: var(--ink); color: var(--paper); }
.pill-soon { background: var(--paper); color: var(--g800); border: 1px dashed var(--g500); }

/* ---------- home blocks ---------- */
.facts ul { list-style: none; margin: 0; padding: var(--s6) 0; display: grid; gap: var(--s5); border-top: var(--line); }
@media (min-width: 640px) { .facts ul { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .facts ul { grid-template-columns: repeat(4, 1fr); gap: var(--s6); } }
.facts h3 { font-size: var(--fs-base); margin-bottom: var(--s1); display: flex; align-items: center; gap: var(--s2); }
.facts h3::before { content: ""; width: 6px; height: 6px; background: var(--ink); flex: none; }
.facts p { color: var(--g500); font-size: var(--fs-sm); margin: 0; }

.signal-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--ink); }
@media (min-width: 640px) { .signal-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .signal-grid { grid-template-columns: repeat(4, 1fr); } }
.signal { padding: var(--s5) var(--s5) var(--s5) 0; border-bottom: var(--line); display: grid; align-content: start; gap: var(--s2); }
@media (min-width: 640px) { .signal { padding-left: var(--s5); border-left: var(--line); } .signal:nth-child(2n+1) { border-left: 0; padding-left: 0; } }
@media (min-width: 1024px) { .signal:nth-child(2n+1) { border-left: var(--line); padding-left: var(--s5); } .signal:nth-child(4n+1) { border-left: 0; padding-left: 0; } }
.signal-n { font-size: var(--fs-xs); color: var(--g500); }
.signal h3 { font-size: var(--fs-md); }
.signal p { color: var(--g800); font-size: var(--fs-sm); margin: 0; }
.signal code { justify-self: start; font-size: var(--fs-xs); }

.cases { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s5); }
@media (min-width: 900px) { .cases { grid-template-columns: repeat(3, 1fr); } }
.case { border: var(--line); border-radius: var(--r); padding: var(--s6); display: grid; gap: var(--s3); align-content: start; transition: border-color var(--t); }
.case:hover { border-color: var(--ink); }
.case p { color: var(--g800); margin: 0; }

.band-ink { background: var(--ink); color: var(--paper); padding: var(--s8) 0; }
@media (min-width: 768px) { .band-ink { padding: var(--s9) 0; } }
.band-ink .eyebrow { color: var(--on-ink-muted); }
.band-ink .lead { color: #d4d4d4; margin-bottom: var(--s6); }
.band-ink h2 { margin-bottom: var(--s4); }
.dev-grid { display: grid; gap: var(--s7); align-items: start; }
@media (min-width: 1024px) { .dev-grid { grid-template-columns: .8fr 1.2fr; } }

/* code tabs (radio driven, no JS) */
.tabs { min-width: 0; }
.tab-list { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tab-input { position: absolute; opacity: 0; pointer-events: none; }
.tab-label { flex: none; font: 500 var(--fs-sm)/1 var(--mono); padding: 12px 14px; min-height: 44px; display: inline-flex; align-items: center; cursor: pointer; border-radius: var(--r-sm) var(--r-sm) 0 0; color: var(--on-ink-muted); background: #171717; }
.tab-label:hover { color: #fff; }
.tab-input:checked + .tab-label { background: #1f1f1f; color: #fff; box-shadow: inset 0 2px 0 var(--red); }
.tab-input:focus-visible + .tab-label { outline: 2px solid var(--red); outline-offset: 2px; }
.tab-panels pre, .tabs pre { margin: 0; }
.tab-panel pre { background: #1f1f1f; color: #ededed; padding: var(--s5); border-radius: 0 var(--r) var(--r) var(--r); overflow-x: auto; font-size: 13.5px; line-height: 1.7; }
.tab-panel + .tab-panel { margin-top: var(--s3); }
@supports selector(:has(a)) {
  .tab-panel { display: none; }
  .tab-panel + .tab-panel { margin-top: 0; }
  .tabs:has(#tab-curl:checked) #panel-curl, .tabs:has(#tab-rust:checked) #panel-rust,
  .tabs:has(#tab-js:checked) #panel-js, .tabs:has(#tab-python:checked) #panel-python,
  .tabs:has(#tab-mcp:checked) #panel-mcp { display: block; }
}
.tab-panel code, .code-light code { background: none; border: 0; padding: 0; font-size: inherit; overflow-wrap: normal; }
.code-note { display: flex; gap: var(--s2); align-items: center; font-size: var(--fs-xs); font-family: var(--mono); color: var(--on-ink-muted); margin: var(--s3) 0 0; }
.section .code-note, .section-tight .code-note { color: var(--g500); }
.code-light { margin: 0; background: var(--g50); border: var(--line); border-radius: var(--r); padding: var(--s5); overflow-x: auto; font-size: 13.5px; line-height: 1.7; }

.family-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s5); }
@media (min-width: 640px) { .family-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .family-grid { grid-template-columns: repeat(4, 1fr); } }
.family-card { padding-top: 0; }
.family-card h3 a { text-decoration: none; }
.family-card h3 a::after { content: " →"; color: var(--g500); }
.family-card h3 a:hover { text-decoration: underline; }
.family-card > p { color: var(--g500); font-size: var(--fs-sm); margin: var(--s2) 0 var(--s4); }
.ticks { list-style: none; margin: 0 0 var(--s4); padding: 0; display: grid; gap: var(--s2); }
.ticks li { display: flex; gap: var(--s2); align-items: baseline; }
.ticks li .icon { transform: translateY(2px); }
.family-card .ticks li { font-size: var(--fs-sm); }
.family-card .ticks li::before { content: ""; width: 5px; height: 5px; background: var(--ink); flex: none; transform: translateY(-2px); }

.int-groups { display: grid; gap: var(--s5); margin-bottom: var(--s6); }
@media (min-width: 768px) { .int-groups { grid-template-columns: repeat(2, 1fr); } }
.int-group h3 { font-size: var(--fs-sm); font-family: var(--mono); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--g500); margin-bottom: var(--s3); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { border: var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 500; font-size: var(--fs-sm); }

/* pricing */
.plans { list-style: none; margin: 0 0 var(--s6); padding: 0; display: grid; gap: var(--s4); }
@media (min-width: 640px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .plans { grid-template-columns: repeat(4, 1fr); } }
.plan, .pack { position: relative; border: var(--line); border-radius: var(--r); padding: var(--s6) var(--s5) var(--s5); display: flex; flex-direction: column; }
.plan-featured { border: 1px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.plan-tag { position: absolute; top: -11px; left: var(--s5); background: var(--ink); color: var(--paper); font: 500 var(--fs-xs)/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 5px 8px; border-radius: 4px; }
.plan h3 { font-size: var(--fs-md); margin-bottom: var(--s3); }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin: 0 0 var(--s2); }
.plan-price span { font-size: 2.5rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.plan-price small { color: var(--g500); }
.plan-credits { font-weight: 600; margin: 0; }
.plan-per { font-size: var(--fs-sm); color: var(--g500); margin: var(--s1) 0 var(--s4); }
.plan-note { color: var(--g800); font-size: var(--fs-sm); flex: 1; }
.packs { list-style: none; margin: var(--s5) 0 0; padding: 0; display: grid; gap: var(--s4); }
@media (min-width: 480px) { .packs { grid-template-columns: 1fr 1fr; } }
.pack { padding: var(--s5); }
.pack h3 { font-size: var(--fs-base); margin-bottom: var(--s3); }

/* faq */
.faq { border-top: 1px solid var(--ink); max-width: 880px; }
.faq-item { border-bottom: var(--line); }
.faq-item summary { cursor: pointer; list-style: none; padding: var(--s5) var(--s7) var(--s5) 0; font-weight: 600; font-size: var(--fs-md); position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font: 400 24px/1 var(--mono); color: var(--g500); }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { color: var(--g800); max-width: 70ch; padding-bottom: var(--s5); margin: 0; }

.cta { text-align: center; padding-top: var(--s9); padding-bottom: var(--s9); display: grid; justify-items: center; }
.cta h2 { max-width: 18ch; margin-bottom: var(--s4); }
.cta .lead { margin-bottom: var(--s6); }

/* features pages */
.with-toc { display: grid; gap: var(--s6); padding-bottom: var(--s8); }
@media (min-width: 960px) { .with-toc { grid-template-columns: 220px 1fr; gap: var(--s8); } }
.toc { font-size: var(--fs-sm); }
@media (min-width: 960px) { .toc { position: sticky; top: 96px; align-self: start; } }
.toc ul { list-style: none; margin: var(--s2) 0 var(--s5); padding: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 6px 0; text-decoration: none; color: var(--g800); }
.toc a:hover, .toc a[aria-current] { color: var(--ink); text-decoration: underline; }
.toc a[aria-current] { font-weight: 600; }
.features { display: grid; }
.feature { padding: var(--s6) 0; border-top: var(--line); scroll-margin-top: 96px; }
.feature:first-child { border-top: 1px solid var(--ink); }
.feature-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.feature h2 { font-size: 1.625rem; }
.feature .lead { margin-bottom: var(--s4); }

/* tools */
.tool-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); }
@media (min-width: 640px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } }
.tool-card { border: var(--line); border-radius: var(--r); padding: var(--s5); transition: border-color var(--t); }
.tool-card:hover { border-color: var(--ink); }
.tool-card h2 a { text-decoration: none; }
.tool-card h2 a:hover { text-decoration: underline; }
.tool-card p { color: var(--g800); font-size: var(--fs-sm); margin: 0; }
.tool-form { display: grid; gap: var(--s3); margin: var(--s6) 0; padding: var(--s5); border: var(--line); border-radius: var(--r); background: var(--g50); }
@media (min-width: 640px) { .tool-form { grid-template-columns: 1fr auto; align-items: end; } }
.link-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }

/* check result */
.result-email { font-size: var(--fs-md); padding: var(--s3) var(--s4); border: 1px dashed var(--g500); border-radius: var(--r-sm); overflow-wrap: anywhere; display: inline-block; max-width: 100%; }
.locked-rows { list-style: none; margin: var(--s5) 0 var(--s6); padding: 0; border-top: 1px solid var(--ink); }
.locked-rows li { display: grid; grid-template-columns: 1fr auto auto; gap: var(--s4); align-items: center; padding: var(--s3) 0; border-bottom: var(--line); font-size: var(--fs-sm); }
.locked { display: inline-flex; align-items: center; gap: 6px; color: var(--g500); font-family: var(--mono); font-size: var(--fs-xs); }
@media (max-width: 480px) { .locked-rows li { grid-template-columns: 1fr auto; } .locked-rows .mono { display: none; } }
.row-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s4); }

/* prose (legal, probe) */
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.375rem; letter-spacing: -0.02em; margin: var(--s7) 0 var(--s3); }
.prose ol, .prose ul { padding-left: 1.25em; display: grid; gap: var(--s2); margin: 0 0 var(--s4); }
.legal { padding-top: var(--s8); padding-bottom: var(--s9); }
.entity { display: grid; grid-template-columns: max-content 1fr; gap: var(--s2) var(--s5); border: var(--line); border-radius: var(--r); padding: var(--s4) var(--s5); font-size: var(--fs-sm); margin: var(--s5) 0; }
.entity dt { font-weight: 600; }
.entity dd { margin: 0; }
.entity .blank { color: var(--g500); font-style: italic; }
.not-found h1 { margin-bottom: var(--s4); }

/* tables */
.table-wrap { overflow-x: auto; border: var(--line); border-radius: var(--r); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th { text-align: left; font: 500 var(--fs-xs)/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--g600); background: var(--g50); padding: var(--s3) var(--s4); border-bottom: var(--line); white-space: nowrap; }
.table td { padding: var(--s3) var(--s4); border-bottom: var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafafa; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .table th, .table td { padding: var(--s2) var(--s3); } .table td.nowrap { white-space: normal; } }
.neg { color: #8a0f1a; }
.method { font-size: var(--fs-xs); border: 1px solid var(--ink); padding: 2px 6px; border-radius: 4px; }
.detail-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s5) var(--s6); }
@media (min-width: 768px) { .detail-grid { grid-template-columns: 1fr 1fr; } }
.detail-grid h3 { font-size: var(--fs-base); margin-bottom: var(--s2); }
.detail-grid p { color: var(--g800); margin: 0; }

/* forms */
.stack { display: grid; gap: var(--s4); }
.field { display: grid; gap: 6px; font-weight: 500; font-size: var(--fs-sm); }
.hint { color: var(--g500); font-weight: 400; font-size: var(--fs-xs); }
input[type=email], input[type=text], input[type=password], input[type=search], input[type=number], input[type=url], textarea { font: 16px var(--sans); min-height: 44px; padding: 10px 12px; border: 1px solid #c7c7c7; border-radius: var(--r-sm); background: var(--paper); color: var(--ink); width: 100%; transition: border-color var(--t), box-shadow var(--t); }
input:hover { border-color: var(--g500); }
input:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(225,29,46,.22); }
input::placeholder { color: #8f8f8f; }
.form-narrow { max-width: 420px; }
.alert { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r-sm); margin: 0 0 var(--s5); font-size: var(--fs-sm); flex-wrap: wrap; }
.alert p { margin: 0; flex: 1; min-width: 0; }
.alert .icon { width: 18px; height: 18px; margin-top: 2px; }
.alert-error { background: var(--red-soft); border: 1px solid #f5b8bf; color: #6e0b15; }
.alert-ok { background: var(--g50); border: 1px solid var(--ink); }
.alert-info { background: var(--g50); border: 1px dashed var(--g500); }
.inline { display: inline; }
.links { display: flex; gap: var(--s4); flex-wrap: wrap; font-size: var(--fs-sm); margin: var(--s5) 0 0; }

/* plain pages (auth) */
.plain { background: var(--g50); min-height: 100vh; display: flex; flex-direction: column; }
.plain-header { padding: var(--s5) var(--gutter); }
.plain-main { flex: 1; display: grid; place-items: start center; padding: var(--s5) var(--gutter) var(--s8); }
.auth-card { width: 100%; max-width: 420px; background: var(--paper); border: var(--line); border-radius: var(--r); padding: var(--s6); }
@media (min-width: 480px) { .auth-card { padding: var(--s7) var(--s6); margin-top: var(--s7); } }
.auth-card h1 { font-size: 1.75rem; letter-spacing: -0.03em; margin-bottom: var(--s4); }
.perks { list-style: none; margin: 0 0 var(--s4); padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-size: var(--fs-sm); color: var(--g800); }
.perks li { display: inline-flex; align-items: center; gap: 6px; }
.fine { font-size: var(--fs-xs); color: var(--g500); margin: var(--s4) 0 0; }
.plain-footer { display: flex; gap: var(--s4); justify-content: center; padding: var(--s5); font-size: var(--fs-sm); color: var(--g500); }

/* auth shell: brand panel on ink with the animated "addresses getting checked" motif
   (/assets/img/auth-bg.svg) + the form column. Mobile: the panel is a 140px band on top. */
[hidden] { display: none !important; }
.auth { display: grid; grid-template-rows: 140px 1fr; min-height: 100vh; min-height: 100dvh; background: var(--paper); }
.auth-brand { position: relative; overflow: hidden; background: var(--ink); color: var(--paper); }
.auth-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-brand-inner { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: var(--s1); padding: var(--s4) var(--gutter); background: linear-gradient(90deg, rgba(10,10,10,.85), rgba(10,10,10,.35)); }
.auth-brand .logo { color: var(--paper); font-size: 26px; padding: 0; align-self: flex-start; }
.auth-brand .logo .dot { width: 7px; height: 7px; }
.auth-tag { margin: 0; color: #d4d4d4; font-size: var(--fs-md); }
.auth-proof { display: none; list-style: none; margin: var(--s6) 0 0; padding: 0; gap: var(--s3); font-size: var(--fs-md); }
.auth-proof li { display: flex; align-items: center; gap: var(--s3); }
.auth-proof .icon { width: 20px; height: 20px; color: var(--red); }
.auth-main { display: grid; grid-template-columns: minmax(0, 400px); justify-content: center; align-content: center; padding: var(--s6) var(--gutter) var(--s8); }
.auth .auth-card { max-width: 400px; border: 0; padding: 0; margin: 0; background: none; }
.auth .auth-card h1 { font-size: 2rem; margin: 0 0 var(--s5); }
.auth .field { font-size: var(--fs-base); }
.auth input[type=email], .auth input[type=text], .auth input[type=password] { min-height: 52px; font-size: 17px; padding: 12px 14px; }
.auth input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(225,29,46,.25); }
.auth .btn { min-height: 52px; }
.auth-social { display: grid; gap: var(--s2); }
.auth-or { display: flex; align-items: center; gap: var(--s3); margin: var(--s5) 0; color: var(--g500); font-size: var(--fs-sm); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: var(--line); }
.pk-msg { margin: var(--s2) 0 0; font-size: var(--fs-sm); color: #6e0b15; }
.pk-msg:not(:empty) { display: flex; gap: var(--s2); align-items: flex-start; padding: var(--s3) var(--s4); background: var(--red-soft); border: 1px solid #f5b8bf; border-radius: var(--r-sm); }
.pk-msg:not(:empty)::before { content: "!"; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--red); color: #fff; font: 700 12px/18px var(--sans); text-align: center; }
@media (min-width: 900px) {
  .auth { grid-template-columns: 55% 1fr; grid-template-rows: none; }
  .auth-brand-inner { justify-content: flex-end; gap: var(--s3); padding: var(--s9) clamp(32px, 6vw, 96px); background: linear-gradient(0deg, rgba(10,10,10,.96) 0%, rgba(10,10,10,.9) 38%, rgba(10,10,10,0) 72%); }
  .auth-brand .logo { font-size: 40px; }
  .auth-brand .logo .dot { width: 10px; height: 10px; }
  .auth-tag { font-size: 1.5rem; color: var(--paper); }
  .auth-proof { display: grid; }
  .auth-main { padding: var(--s8) var(--s6); }
}

/* public footer */
.site-footer { border-top: 1px solid var(--ink); margin-top: 0; font-size: var(--fs-sm); }
.foot-grid { display: grid; gap: var(--s6); padding-top: var(--s8); padding-bottom: var(--s7); grid-template-columns: 1fr 1fr; }
.foot-brand { grid-column: 1 / -1; }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 1.6fr repeat(4, 1fr); } .foot-brand { grid-column: auto; } }
.foot-brand p { margin: var(--s3) 0 0; }
.foot-col h2 { font: 500 var(--fs-xs)/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--g500); margin-bottom: var(--s3); }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.foot-col a { display: inline-block; padding: 5px 0; text-decoration: none; color: var(--g800); }
.foot-col a:hover { color: var(--ink); text-decoration: underline; }
.foot-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s3); padding-top: var(--s4); padding-bottom: var(--s5); border-top: var(--line); color: var(--g500); }
.foot-base p { margin: 0; }

/* ---------- app shell (dashboard + admin) ---------- */
.app-body { background: var(--g50); }
.app-body .muted, .app-body .empty-inline { color: var(--g600); }
.app { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); }
.sidebar { background: var(--paper); border-bottom: var(--line); padding: var(--s4) var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
.side-brand { display: flex; align-items: center; gap: var(--s3); }
.area-tag { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; background: var(--ink); color: var(--paper); padding: 3px 6px; border-radius: 3px; }
.side-nav { list-style: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); display: flex; gap: var(--s1); overflow-x: auto; scrollbar-width: none; }
.side-nav a { display: flex; align-items: center; min-height: 40px; padding: 0 var(--s3); border-radius: var(--r-sm); text-decoration: none; font-weight: 500; font-size: 15px; color: var(--g800); white-space: nowrap; }
.side-nav a:hover { background: var(--g50); color: var(--ink); }
.side-nav a[aria-current] { background: var(--ink); color: var(--paper); }
.side-foot { display: none; }
.app-content { padding: var(--s6) var(--gutter) var(--s8); max-width: 1120px; width: 100%; }
.app-title { font-size: 1.75rem; letter-spacing: -0.03em; margin-bottom: var(--s5); }
@media (min-width: 900px) {
  .app { grid-template-columns: 248px minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; height: 100vh; border-bottom: 0; border-right: var(--line); padding: var(--s5) var(--s4); grid-template-rows: auto 1fr auto; gap: var(--s6); }
  .side-brand { padding: 0 var(--s3); }
  .side-nav { flex-direction: column; margin: 0; padding: 0; overflow: visible; gap: 2px; }
  .side-foot { display: grid; gap: var(--s2); padding: var(--s4) var(--s3) 0; border-top: var(--line); font-size: var(--fs-sm); }
  .app-content { padding: var(--s7) var(--s7) var(--s9); }
}
.side-link { color: var(--g800); text-decoration: none; padding: 4px 0; }
.side-link:hover { text-decoration: underline; }
.side-user { margin: var(--s2) 0 0; color: var(--g500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot form { margin: 0; }

.kpis { display: grid; gap: var(--s4); margin-bottom: var(--s5); }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .kpis { grid-template-columns: repeat(3, 1fr); } .kpis-4 { grid-template-columns: repeat(3, 1fr); } }
.kpi, .panel { background: var(--paper); border: var(--line); border-radius: var(--r); padding: var(--s5); }
.panel { margin-bottom: var(--s5); }
.kpi-label, .panel-title { font: 500 var(--fs-xs)/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--g500); margin-bottom: var(--s3); }
.panel-title { margin-bottom: var(--s4); }
.kpi-value { font-size: 2.5rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 var(--s2); font-variant-numeric: tabular-nums; }
.kpi-text { font-weight: 600; overflow-wrap: anywhere; margin: 0 0 var(--s2); }
.kpi .muted { margin: 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); font-size: var(--fs-sm); }
.step { display: flex; gap: var(--s2); align-items: center; color: var(--g800); }
.step .icon { width: 16px; height: 16px; color: var(--g500); }
.step.done { color: var(--g500); }
.step.done a { text-decoration: line-through; text-decoration-color: var(--g500); }
.step.done .icon { color: var(--ink); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--s2) var(--s5); margin: 0; font-size: var(--fs-sm); }
.kv dt { color: var(--g500); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.empty { background: var(--paper); border: 1px dashed #c7c7c7; border-radius: var(--r); padding: var(--s8) var(--s5); text-align: center; display: grid; justify-items: center; gap: var(--s2); }
.empty h2 { font-size: 1.25rem; }
.empty p { max-width: 56ch; color: var(--g800); margin: 0; }
.empty .pill { margin: var(--s2) 0; white-space: normal; text-align: left; }
.empty-mark { width: 40px; height: 40px; border: 1px solid var(--ink); position: relative; margin-bottom: var(--s3); }
.empty-mark::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 10px; height: 10px; background: var(--red); }
.empty-inline { color: var(--g500); font-size: var(--fs-sm); margin: 0; }
.tag { display: inline-flex; align-items: center; gap: 4px; font: 500 var(--fs-xs)/1 var(--mono); padding: 4px 6px; border-radius: 4px; border: 1px dashed var(--g500); color: var(--g800); white-space: nowrap; }
.tag .icon { width: 12px; height: 12px; }
.tag-yes { border: 1px solid var(--ink); color: var(--ink); }
.tag-bad { background: var(--red-soft); border: 1px solid #f5b8bf; color: #6e0b15; }
.search { display: flex; gap: var(--s2); max-width: 520px; margin-bottom: var(--s3); }
.search input { flex: 1; min-width: 0; }
.pager { display: flex; gap: var(--s2); margin-top: var(--s4); }


/* ---------- icons, tiles, live badge ---------- */
.icon-tile { width: 40px; height: 40px; flex: none; display: inline-grid; place-items: center; border: 1px solid var(--ink); border-radius: 8px; background: var(--paper); }
.icon-tile .icon { width: 20px; height: 20px; stroke-width: 1.75; }
.icon-tile-ink { background: var(--ink); color: var(--paper); }
.live { display: inline-flex; align-items: center; gap: var(--s2); font: 500 var(--fs-xs)/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--g600); margin: 0; }
.live b { font-weight: 600; color: var(--ink); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); position: relative; flex: none; }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--ink); opacity: 0; }

/* ---------- illustrations: inline SVG from assets/img. The static frame is the complete picture;
   motion only replays how it is built, so reduced motion loses nothing. ---------- */
.ill svg { display: block; width: 100%; height: auto; }
.ill-frame { border: var(--line); border-radius: var(--r); background: var(--g50); padding: var(--s4); }
.a-pulse { opacity: 0; }

/* ---------- section divider: a measuring ruler ---------- */
.ruler { height: 12px; border-top: 1px solid var(--ink); background: repeating-linear-gradient(90deg, var(--g500) 0 1px, transparent 1px 8px) top left / 100% 5px no-repeat, repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 64px) top left / 100% 10px no-repeat; }

/* ---------- hero flow: how one check runs ---------- */
.flow { padding-bottom: var(--s8); }
.flow-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s2) var(--s5); margin-bottom: var(--s4); }
.flow-head .eyebrow { margin: 0; }
.flow-rail { display: none; position: relative; }
.flow-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s5); counter-reset: flow; }
.flow-step { position: relative; display: grid; gap: var(--s2); align-content: start; padding-left: var(--s5); border-left: 1px solid var(--ink); }
.flow-step::before { content: ""; position: absolute; left: -4px; top: 0; width: 7px; height: 7px; background: var(--ink); }
.flow-step h3 { font-size: var(--fs-md); display: flex; align-items: center; gap: var(--s2); }
.flow-step p { color: var(--g800); font-size: var(--fs-sm); margin: 0; }
.flow-step .ill { max-width: 320px; margin-bottom: var(--s2); }
@media (min-width: 640px) { .flow-steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .flow-rail { display: block; height: 9px; overflow: hidden; background: linear-gradient(var(--ink), var(--ink)) center / 100% 1px no-repeat; margin-bottom: var(--s5); }
  .flow-run { position: absolute; left: 0; top: 0; width: 100%; height: 9px; }
  .flow-run::after { content: ""; position: absolute; left: 0; top: 0; width: 9px; height: 9px; background: var(--red); }
  .flow-steps { grid-template-columns: repeat(4, 1fr); gap: 0; }
  .flow-step { border-left: 0; padding: 0 var(--s6) 0 0; }
  .flow-step::before { display: none; }
}

/* ---------- live numbers strip ---------- */
.stats-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--s3) var(--s5); margin-bottom: var(--s5); }
.stats-head h2 { margin: 0; }
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { padding: var(--s5) var(--s4) var(--s5) 0; border-bottom: var(--line); display: grid; gap: var(--s1); align-content: start; }
.stat-value { font: 600 clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem)/1.05 var(--mono); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; margin: 0; }
.stat-label { font-weight: 600; font-size: var(--fs-sm); margin: 0; display: flex; align-items: center; gap: 6px; }
.stat-label .icon { color: var(--g500); }
.stat-note { font: 400 var(--fs-xs)/1.5 var(--mono); color: var(--g600); margin: 0; }
.stats-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .stats-compact { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.app-body .stats { background: var(--paper); border: var(--line); border-radius: var(--r); padding: 0 var(--s5); }
.app-body .stat:nth-last-child(-n+2) { border-bottom: 0; }
@media (min-width: 900px) { .app-body .stat { border-bottom: 0; } }

/* ---------- how it works ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s6); }
@media (min-width: 900px) { .timeline { grid-template-columns: repeat(4, 1fr); gap: var(--s5); } }
.tl-step { display: grid; gap: var(--s3); align-content: start; position: relative; }
.tl-top { display: flex; align-items: center; gap: var(--s3); }
.tl-top::after { content: ""; flex: 1; border-top: 1px dashed var(--g500); }
.timeline .tl-step:last-child .tl-top::after { display: none; }
.tl-step h3 { font-size: var(--fs-md); }
.tl-step p { color: var(--g800); font-size: var(--fs-sm); margin: 0; }

/* ---------- signals and cases with icons ---------- */
.signal-top { display: flex; align-items: center; justify-content: space-between; }
.signal-top .icon { width: 22px; height: 22px; stroke-width: 1.75; }
.case .icon-tile { margin-bottom: var(--s2); }
.facts h3 .icon { width: 18px; height: 18px; }
.facts.facts-icons h3::before { display: none; }

/* ---------- comparison ---------- */
.compare td:first-child { font-weight: 600; }
.compare td .icon { display: inline-block; vertical-align: -3px; margin-right: 6px; }
.compare .muted-cell { color: var(--g600); }
.table-note { margin-top: var(--s3); }

/* ---------- family cards and heads with art ---------- */
.family-card .ill { margin-bottom: var(--s4); }
.family-card h3 { display: flex; align-items: center; gap: var(--s2); }
.page-head-art { display: grid; gap: var(--s6); align-items: center; }
@media (min-width: 960px) { .page-head-art { grid-template-columns: 1.1fr .9fr; } }

/* ---------- pricing details ---------- */
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.plan-head h3 { margin: 0; }
.plan-head .icon { width: 20px; height: 20px; color: var(--g500); }
.plan-lines { list-style: none; margin: 0 0 var(--s4); padding: var(--s3) 0 0; border-top: var(--line); display: grid; gap: var(--s2); font-size: var(--fs-sm); }
.plan-lines li { display: flex; gap: var(--s2); align-items: center; }
.plan-lines .icon { color: var(--g500); }

/* ---------- probe network ---------- */
.net-art { margin: var(--s6) 0; }
.status-tag { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- nav and sidebar icons ---------- */
.nav-desktop a, .nav-mobile nav a { display: inline-flex; align-items: center; gap: 6px; }
.nav-desktop a .icon { width: 16px; height: 16px; color: var(--g500); }
.nav-desktop a:hover .icon { color: var(--ink); }
.side-nav a { gap: var(--s2); }
.side-nav a .icon { width: 18px; height: 18px; stroke-width: 1.75; }
.side-link { display: inline-flex; align-items: center; gap: var(--s2); }
.side-link .icon { width: 16px; height: 16px; }

/* ---------- empty states ---------- */
.empty-art { width: 200px; max-width: 70%; margin-bottom: var(--s3); }

/* ---------- footer additions ---------- */
.foot-status { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.foot-col h2 { display: flex; align-items: center; gap: 6px; }
.foot-col h2 .icon { width: 14px; height: 14px; }

/* ---------- motion: one signature curve, loops of 6–8 s, transform/opacity (plus stroke dashes) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .a-flow { animation: ill-flow 1.6s linear infinite; }
  .a-slow { animation-duration: 2.4s; }
  .a-seq { animation: ill-seq 6s var(--ease) infinite both; }
  .a-blink { animation: ill-blink 2.4s ease-in-out infinite both; }
  .a-pulse { transform-box: fill-box; transform-origin: center; animation: ill-pulse 3s var(--ease) infinite both; }
  .a-scan { animation: ill-scan 6s var(--ease) infinite; }
  .a-scan-y { animation: ill-scan-y 6s var(--ease) infinite; }
  .a-ring { animation: ill-ring 6s var(--ease) infinite; }
  .a-grow { transform-box: fill-box; transform-origin: left center; animation: ill-grow 6s var(--ease) infinite both; }
  .a-send { animation: ill-send 4s var(--ease) infinite; }
  .a-lens { animation: ill-lens 7s ease-in-out infinite; }
  .d1 { animation-delay: .3s; } .d2 { animation-delay: .6s; } .d3 { animation-delay: .9s; } .d4 { animation-delay: 1.2s; } .d5 { animation-delay: 1.5s; }
  .flow-run { animation: flow-run 8s var(--ease) infinite; }
  .live-dot::after { animation: live-ring 2.4s var(--ease) infinite; }
}
@keyframes ill-flow { to { stroke-dashoffset: -20; } }
@keyframes ill-seq { 0% { opacity: 0; transform: translateY(3px); } 8%, 82% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; } }
@keyframes ill-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes ill-pulse { 0% { opacity: .5; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.6); } }
@keyframes ill-scan { 0% { opacity: 0; transform: none; } 6% { opacity: 1; } 45% { opacity: 1; transform: translateX(134px); } 55%, 100% { opacity: 0; transform: translateX(134px); } }
@keyframes ill-scan-y { 0%, 18% { transform: none; } 25%, 43% { transform: translateY(40px); } 50%, 68% { transform: translateY(80px); } 75%, 93% { transform: translateY(120px); } 100% { transform: none; } }
@keyframes ill-ring { 0% { stroke-dashoffset: 263.9; } 30%, 100% { stroke-dashoffset: 21.1; } }
@keyframes ill-grow { 0% { transform: scaleX(0); } 30%, 100% { transform: scaleX(1); } }
@keyframes ill-send { 0% { opacity: 0; transform: none; } 10% { opacity: 1; transform: none; } 60% { opacity: 1; transform: translateX(132px); } 72%, 100% { opacity: 0; transform: translateX(132px); } }
@keyframes ill-lens { 0%, 100% { transform: none; } 30% { transform: translate(-20px, 40px); } 60% { transform: translate(-70px, 70px); } 80% { transform: translate(-110px, 100px); } }
@keyframes flow-run { 0%, 12% { transform: none; opacity: 1; } 25%, 37% { transform: translateX(25%); } 50%, 62% { transform: translateX(50%); } 75%, 92% { transform: translateX(75%); opacity: 1; } 97% { transform: translateX(75%); opacity: 0; } 100% { transform: none; opacity: 0; } }
@keyframes live-ring { 0% { opacity: .6; transform: scale(.6); } 80%, 100% { opacity: 0; transform: scale(1.4); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; scroll-behavior: auto !important; }
}

/* lists inside prose keep their own layout */
.prose .stats { padding: 0; gap: 0; margin: var(--s5) 0 var(--s3); }
.prose .live { margin-bottom: var(--s4); }
.service { margin-top: var(--s5); }
.tool-card .icon-tile { margin-bottom: var(--s3); }
@media (max-width: 639px) {
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare tr { display: grid; grid-template-columns: 1fr 1fr; border-bottom: var(--line); }
  .compare td { border-bottom: 0; }
  .compare td:first-child { grid-column: 1 / -1; padding-bottom: 0; }
  .compare td:not(:first-child)::before { display: block; font: 500 var(--fs-xs)/1.6 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--g600); }
  .compare td:nth-child(2)::before { content: "mails.fit"; }
  .compare td:nth-child(3)::before { content: "Typical"; }
}
.stat-label { align-items: flex-start; }
.stat-label .icon { margin-top: 3px; }

/* =====================================================================================
   APP — signed-in workspace (customer top bar + hero band) and admin console.
   Kit documented in docs/design-guidelines.md §9 "App components".
   Scale: 4/8px spacing (--s*), type 12/13/14/16/20/24/28/32, radius 6/10/12, hairlines,
   elevation: --e1 (cards in the band), --e2 (menus).
   ===================================================================================== */
:root {
  --band: #f7f7f8; --tint-red: #fff1f2; --line-strong: #d4d4d4;
  --r-lg: 12px;
  --e1: 0 1px 2px rgba(10,10,10,.04), 0 4px 16px rgba(10,10,10,.05);
  --e2: 0 2px 4px rgba(10,10,10,.06), 0 12px 32px rgba(10,10,10,.12);
  --fs-13: .8125rem; --fs-20: 1.25rem; --fs-24: 1.5rem; --fs-28: 1.75rem; --fs-32: 2rem;
  --ws: 1120px;
}
.ws-body { background: var(--paper); }
.ws-body .muted { color: var(--g600); }
.ws-wrap { max-width: var(--ws); margin: 0 auto; padding: 0 var(--gutter); }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); border-bottom: var(--line); }
.topbar-in { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); min-height: 60px; display: flex; align-items: center; gap: var(--s4); }
.topbar .logo { font-size: 20px; flex: none; }
.tabs-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s1); }
/* Only the tab list scrolls (narrow screens); the Tools menu sits outside it so its dropdown is not clipped. */
.tabs-scroll { min-width: 0; display: flex; align-items: center; gap: var(--s1); overflow-x: auto; scrollbar-width: none; }
.tabs-scroll::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--s3); border-radius: 999px; font-size: var(--fs-sm); font-weight: 500; color: var(--g800); text-decoration: none; white-space: nowrap; cursor: pointer; list-style: none; transition: background var(--t), color var(--t); }
.tab::-webkit-details-marker { display: none; }
.tab .icon { width: 16px; height: 16px; stroke-width: 1.75; }
.tab:hover { background: var(--g50); color: var(--ink); }
.tab[aria-current] { background: #ededed; color: var(--ink); font-weight: 600; }
.topbar-end { display: flex; align-items: center; gap: var(--s2); flex: none; }
.credit-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--s3) 0 var(--s2); border: var(--line); border-radius: 999px; font-size: var(--fs-sm); text-decoration: none; white-space: nowrap; transition: border-color var(--t); }
.credit-pill:hover { border-color: var(--ink); }
.credit-pill b { font-weight: 600; font-variant-numeric: tabular-nums; }
.credit-word { color: var(--g600); }
.meter-wrap, .meter { display: block; width: 18px; height: 18px; }
.meter-bg { stroke: var(--g200); }
.meter-fg { stroke: var(--ink); }
.meter-low .meter-fg { stroke: var(--red); }
.icon-btn, .avatar-btn { display: inline-flex; align-items: center; justify-content: center; gap: 2px; min-width: 40px; min-height: 40px; border-radius: 999px; cursor: pointer; list-style: none; position: relative; color: var(--g800); }
.icon-btn::-webkit-details-marker, .avatar-btn::-webkit-details-marker { display: none; }
.icon-btn:hover, .avatar-btn:hover { background: var(--g50); }
.icon-btn .icon { width: 20px; height: 20px; stroke-width: 1.75; }
.avatar-btn { padding: 0 6px 0 4px; }
.avatar-btn > .icon { width: 14px; height: 14px; }
.bell-dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--paper); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--paper); display: inline-grid; place-items: center; font: 600 var(--fs-13)/1 var(--sans); }
/* menus (<details>) */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 220px; background: var(--paper); border: var(--line); border-radius: var(--r); box-shadow: var(--e2); padding: var(--s2); display: grid; gap: 2px; }
.menu-pop-right, .menu-bell .menu-pop { left: auto; right: 0; }
.menu-pop-wide { width: min(360px, calc(100vw - 24px)); }
.menu-pop a, .menu-btn { display: flex; align-items: center; gap: var(--s2); min-height: 40px; padding: 0 var(--s3); border-radius: var(--r-sm); font-size: var(--fs-sm); color: var(--g800); text-decoration: none; background: none; border: 0; width: 100%; cursor: pointer; font-family: inherit; text-align: left; }
.menu-pop a:hover, .menu-btn:hover { background: var(--g50); color: var(--ink); }
.menu-pop a[aria-current] { background: var(--g50); color: var(--ink); font-weight: 600; }
.menu-pop .icon { width: 16px; height: 16px; stroke-width: 1.75; color: var(--g600); }
.menu-pop form { margin: 0; border-top: var(--line); padding-top: 4px; margin-top: 4px; }
.menu-email { margin: 0 0 4px; padding: var(--s2) var(--s3) var(--s3); border-bottom: var(--line); font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.menu-email .muted { font-weight: 400; font-size: var(--fs-xs); }
.menu-head { display: flex; justify-content: space-between; align-items: center; padding: var(--s2) var(--s3); border-bottom: var(--line); margin-bottom: 4px; font-size: var(--fs-sm); }
.menu-head a { min-height: 0; padding: 0; width: auto; text-decoration: underline; }
.menu-empty { margin: 0; padding: var(--s3); font-size: var(--fs-sm); color: var(--g600); }
.menu-pop form:has(.notif) { border-top: 0; padding-top: 0; margin-top: 0; }
.notif { display: grid !important; gap: 2px; padding: var(--s2) var(--s3) !important; align-content: center; width: 100%; min-height: 44px; background: none; border: 0; border-radius: var(--r-sm); text-align: left; font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.notif:hover { background: var(--g50); }
.notif-title { color: var(--g800); line-height: 1.35; }
.notif.unread .notif-title { color: var(--ink); font-weight: 600; }
.notif.unread .notif-title::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red); margin-right: 6px; vertical-align: middle; }
.notif .when { font-size: var(--fs-xs); color: var(--g600); }
@media (max-width: 720px) {
  .topbar-in { flex-wrap: wrap; gap: 0 var(--s2); padding-top: var(--s2); }
  .topbar .logo { order: 1; }
  .topbar-end { order: 2; margin-left: auto; }
  .tabs-main { order: 3; flex-basis: 100%; padding: var(--s2) 0; }
  .credit-word { display: none; }
  .menu-tools { margin-left: auto; }
  .menu-tools .menu-pop { left: auto; right: 0; }
}
@media (pointer: coarse) { .tab { min-height: 44px; } .icon-btn, .avatar-btn, .credit-pill { min-height: 44px; } }

/* hero band + page header */
/* Accent: a faint red glow top-right and a fine dot grid fading out downwards. Static (no motion);
   text sits on --band-level contrast because the dots are 7% ink. */
.ws-band { position: relative; isolation: isolate; background: radial-gradient(70% 140% at 100% 0%, rgba(225,29,46,.09), rgba(225,29,46,0) 60%), var(--band); border-bottom: var(--line); padding: var(--s6) 0 var(--s7); }
.ws-band::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: radial-gradient(rgba(10,10,10,.07) 1px, transparent 1.2px); background-size: 16px 16px; -webkit-mask-image: linear-gradient(to bottom, #000, transparent 80%); mask-image: linear-gradient(to bottom, #000, transparent 80%); }
.page-head-app { display: flex; align-items: flex-start; gap: var(--s4); margin-bottom: var(--s5); }
.page-head-app h1 { font-size: var(--fs-28); font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; }
.page-head-app .sub { margin: 4px 0 0; color: var(--g600); font-size: var(--fs-sm); }
.tile { flex: none; width: 40px; height: 40px; border-radius: var(--r); background: var(--tint-red); border: 1px solid #fbd0d5; color: var(--red); display: inline-grid; place-items: center; box-shadow: 0 1px 2px rgba(225,29,46,.12); }
.tile .icon { width: 20px; height: 20px; stroke-width: 1.75; }
.tile-sm { width: 32px; height: 32px; border-radius: var(--r-sm); }
.tile-sm .icon { width: 16px; height: 16px; }
.crumbs { font-size: var(--fs-13); color: var(--g600); margin-bottom: var(--s3); }
.crumbs a { color: var(--g800); }
.page-body { padding-top: var(--s6); padding-bottom: var(--s9); }
.page-body > * + * { margin-top: var(--s5); }
@media (min-width: 900px) { .ws-band { padding: var(--s7) 0 var(--s8); } }

/* cards */
.card { background: var(--paper); border: var(--line); border-radius: var(--r-lg); }
.card-lead { box-shadow: var(--e1); padding: var(--s5); }
.card-title { font-size: var(--fs-sm); font-weight: 600; margin: 0 0 var(--s3); letter-spacing: 0; }
.card-tabs { padding: 0; overflow: hidden; }
.card-form, .ws-body .stack, .admin-body .stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
.card-tabs .card-form { padding: var(--s5); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin: var(--s2) calc(var(--s5) * -1) calc(var(--s5) * -1); padding: var(--s3) var(--s5); background: #fafafa; border-top: var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.card-foot .hint { margin: 0; font-size: var(--fs-13); color: var(--g600); }
.card-lead > .hint { margin: var(--s3) 0 0; font-size: var(--fs-13); color: var(--g600); }
.field-label { font-size: var(--fs-sm); font-weight: 500; color: var(--g800); margin: 0; }
.field-row { display: grid; gap: var(--s3); }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field-inline { max-width: 360px; }
textarea { min-height: 160px; resize: vertical; font-family: var(--mono); font-size: var(--fs-sm); line-height: 1.6; }
select { font: 16px var(--sans); min-height: 44px; padding: 0 36px 0 12px; border: 1px solid #c7c7c7; border-radius: var(--r-sm); background: var(--paper); color: var(--ink); width: 100%; }
select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(225,29,46,.22); }
.check { display: flex; align-items: center; gap: var(--s2); font-weight: 400; min-height: 32px; }
.scopes { border: 0; padding: 0; margin: 0; }
.scopes legend { padding: 0; margin-bottom: 6px; }
.more-opts summary { cursor: pointer; font-size: var(--fs-sm); color: var(--g800); min-height: 32px; display: inline-flex; align-items: center; }
.more-opts[open] summary { margin-bottom: var(--s2); }
.btn-sm { min-height: 32px; padding: 0 var(--s3); font-size: var(--fs-13); gap: 6px; }
.btn-sm .icon { width: 14px; height: 14px; }
.btn-ghost { background: none; color: var(--g800); }
.btn-ghost:hover { background: var(--g50); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; list-style: none; padding: 0; margin: 0; }
.btn-row form { margin: 0; }
@media (pointer: coarse) { .btn-sm { min-height: 44px; } }

/* big single-line input with inline action (Single, Finder, Home) */
.bigsearch { display: flex; align-items: center; gap: var(--s2); border: 1px solid #c7c7c7; border-radius: var(--r); background: var(--paper); padding: 6px 6px 6px var(--s3); transition: border-color var(--t), box-shadow var(--t); }
.bigsearch:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(225,29,46,.22); }
.bigsearch-icon { color: var(--g500); display: inline-flex; }
.bigsearch-icon .icon { width: 20px; height: 20px; stroke-width: 1.75; }
.bigsearch input { border: 0; box-shadow: none !important; min-height: 44px; padding: 0 var(--s2); font-size: 17px; flex: 1; min-width: 0; }
.bigsearch input:focus { outline: none; }
.bigsearch .btn { flex: none; }
.bigsearch:has(input:invalid) .btn { opacity: .45; }
.bigsearch-split input + input { border-left: var(--line) !important; border-radius: 0; }
@media (max-width: 640px) {
  .bigsearch { flex-wrap: wrap; padding: var(--s2); }
  .bigsearch-icon { display: none; }
  .bigsearch .btn { width: 100%; }
  .bigsearch-split input { flex-basis: 100%; }
  .bigsearch-split input + input { border-left: 0 !important; border-top: var(--line) !important; }
}
.chips { margin-top: var(--s4); }
.chips-label { font-size: var(--fs-xs); font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--g600); margin: 0 0 var(--s2); }
.chips ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.chips form { margin: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 var(--s3); border: var(--line); border-radius: 999px; background: var(--paper); font: 400 var(--fs-13) var(--mono); color: var(--g800); cursor: pointer; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip .icon { width: 13px; height: 13px; color: var(--g500); }
.chip-sm { display: inline-block; font: 500 var(--fs-xs)/1 var(--mono); padding: 4px 8px; border: var(--line); border-radius: 999px; background: var(--paper); color: var(--g800); }

/* radio tabs (card tabs, code tabs): input, label, panel in source order */
.tabset { display: flex; flex-wrap: wrap; }
.ts-input { position: absolute; opacity: 0; pointer-events: none; }
.ts-label { order: 0; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--s4); font-size: var(--fs-sm); font-weight: 500; color: var(--g600); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.ts-label .icon { width: 16px; height: 16px; stroke-width: 1.75; }
.ts-label:hover { color: var(--ink); }
.ts-panel { order: 1; flex: 0 0 100%; max-width: 100%; min-width: 0; display: none; }
.ts-input:checked + .ts-label { color: var(--ink); border-bottom-color: var(--red); }
.ts-input:checked + .ts-label + .ts-panel { display: block; }
.ts-input:focus-visible + .ts-label { outline: 2px solid var(--red); outline-offset: -2px; border-radius: 4px; }
.card-tabs > .tabset { overflow-x: auto; }
.card-tabs > .tabset::before { content: ""; order: 0; flex-basis: 100%; height: 0; }
.card-tabs > .tabset > .ts-label { margin-top: 0; }
.card-tabs > .tabset > .ts-panel { border-top: var(--line); }
.card-tabs > .tabset > .ts-label:first-of-type { margin-left: var(--s2); }
.code-tabs .tabset { border: var(--line); border-radius: var(--r); overflow: hidden; background: #fafafa; }
.code-tabs .ts-label { min-height: 40px; padding: 0 var(--s3); font-size: var(--fs-13); }
.code-tabs .ts-panel { border-top: var(--line); }
.code-tabs .codeblock pre { border-radius: 0; }

/* code block and copyable values */
.codeblock { position: relative; }
.codeblock pre { margin: 0; background: #141414; color: #ededed; padding: var(--s4) var(--s5); border-radius: var(--r); overflow-x: auto; font-size: var(--fs-13); line-height: 1.7; }
.codeblock code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; overflow-wrap: normal; }
.codeblock-copy { position: absolute; top: var(--s2); right: var(--s2); background: #2a2a2a; color: #ededed; border-color: #3a3a3a; }
.codeblock-copy:hover { background: #3a3a3a; }
.copyable { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.copyable code { padding: 8px 12px; font-size: var(--fs-13); background: var(--g50); border-radius: var(--r-sm); }
.grow { flex: 1; min-width: 0; display: grid; gap: var(--s2); }
.grow p { margin: 0; }

/* drop zone */
.dropzone { display: grid; justify-items: center; gap: var(--s2); text-align: center; padding: var(--s6) var(--s4); border: 1.5px dashed var(--line-strong); border-radius: var(--r); background: #fcfcfc; cursor: pointer; position: relative; transition: border-color var(--t), background var(--t); }
.dropzone:hover, .dropzone.is-over, .dropzone:focus-within { border-color: var(--ink); background: var(--paper); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dz-title { font-weight: 600; font-size: var(--fs-base); }
.dz-chips { display: flex; gap: 6px; }
.dz-file:empty { display: none; }

/* choices (connected CRMs) */
.choices { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.choice { display: flex; align-items: center; gap: var(--s3); min-height: 52px; padding: 0 var(--s4); border: var(--line); border-radius: var(--r); text-decoration: none; font-weight: 600; }
.choice .muted { margin-left: auto; font-weight: 400; font-size: var(--fs-sm); }
.choice:hover { border-color: var(--ink); }

/* badges: shape + icon + word */
.badge { display: inline-flex; align-items: center; gap: 4px; font: 500 var(--fs-xs)/1 var(--sans); padding: 4px 8px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; vertical-align: middle; }
.badge .icon { width: 12px; height: 12px; }
.b-ok { background: var(--ink); color: var(--paper); }
.b-warn { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.b-bad { background: var(--red-soft); color: #6e0b15; border-color: #f5b8bf; }
.b-muted { background: var(--g50); color: var(--g800); border: 1px dashed var(--g500); }
.b-live { background: var(--tint-red); color: #8a0f1a; border-color: #fbd0d5; }
.badges { display: inline-flex; gap: 4px; flex-wrap: wrap; }

/* stat cards */
.stat-grid { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stat-card { background: var(--paper); border: var(--line); border-radius: var(--r); padding: var(--s4) var(--s5); min-width: 0; }
.stat-card-label { font: 500 var(--fs-13)/1.4 var(--sans); color: var(--g600); margin: 0 0 var(--s2); letter-spacing: 0; }
.stat-card-value { font: 600 var(--fs-28)/1.15 var(--mono); letter-spacing: -0.02em; margin: 0 0 var(--s2); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-card-value:empty { display: none; }
.stat-card-note { margin: 0; font-size: var(--fs-13); color: var(--g600); }
.stat-card-note a { color: var(--ink); }
.admin-body .stat-grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* panels and sections inside the workspace */
.ws-body .panel { border-radius: var(--r); padding: var(--s5); margin-bottom: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.panel-head .panel-title { margin: 0; }
.ws-body .panel-title, .admin-body .panel-title { font: 600 var(--fs-sm)/1.4 var(--sans); text-transform: none; letter-spacing: 0; color: var(--ink); }
.h-section { font-size: var(--fs-20); font-weight: 600; letter-spacing: -0.015em; margin: 0 0 var(--s3); }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.section-row .h-section { margin: 0; }
.split { display: grid; gap: var(--s5); }
@media (min-width: 1000px) { .split { grid-template-columns: 1fr 1fr; } .split.split-email { grid-template-columns: 1fr; } }
.chart svg { width: 100%; height: auto; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.toolbar .search { margin: 0; flex: 1; min-width: 240px; }
.strong { font-weight: 600; }
.break { overflow-wrap: anywhere; }
.icon-link { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; font-size: var(--fs-13); }
.icon-link .icon { width: 16px; height: 16px; }
@media (max-width: 640px) { .hide-sm { display: none; } }

/* tables: sticky head, row hover, right-aligned numbers */
.table-sticky thead th { position: sticky; top: 0; z-index: 1; }
.table td.num, .table th.num { text-align: right; }
.table .path { white-space: nowrap; }
.split > *, .page-body > *, .stat-card, .panel { min-width: 0; }
.stat-card-value.is-text { font-family: var(--sans); font-size: var(--fs-24); letter-spacing: -0.02em; }
.table tbody tr { transition: background var(--t); }
.ws-body .table-wrap, .admin-body .table-wrap { background: var(--paper); }
.when { white-space: nowrap; font-size: var(--fs-13); color: var(--g800); text-decoration: underline dotted var(--g500); text-underline-offset: 3px; }
.progress-cell { white-space: nowrap; display: flex; align-items: center; gap: var(--s2); min-width: 120px; }
progress.bar { appearance: none; -webkit-appearance: none; width: 100%; height: 6px; border: 0; border-radius: 999px; background: var(--g200); overflow: hidden; display: block; }
progress.bar::-webkit-progress-bar { background: var(--g200); border-radius: 999px; }
progress.bar::-webkit-progress-value { background: var(--ink); border-radius: 999px; }
progress.bar::-moz-progress-bar { background: var(--ink); border-radius: 999px; }
.progress-cell progress.bar { width: 72px; }

/* segmented filter and pagination */
.segmented { display: inline-flex; gap: 2px; padding: 3px; background: var(--g50); border: var(--line); border-radius: var(--r-sm); flex-wrap: wrap; }
.segmented a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 var(--s3); border-radius: 4px; font-size: var(--fs-13); font-weight: 500; color: var(--g800); text-decoration: none; }
.segmented a:hover { color: var(--ink); }
.segmented a[aria-current] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(10,10,10,.08); font-weight: 600; }
@media (pointer: coarse) { .segmented a { min-height: 44px; } }
.pager { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s4); }
.pager p { margin: 0; }
.pager-links { display: flex; gap: var(--s2); }

/* checklist (Home) */
.check-steps { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; gap: var(--s3); }
@media (min-width: 900px) { .check-steps { grid-template-columns: repeat(4, 1fr); } }
.check-step { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3); border: var(--line); border-radius: var(--r); }
.check-step a { font-weight: 600; text-decoration: none; }
.check-step a:hover { text-decoration: underline; }
.check-step p { margin: 2px 0 0; font-size: var(--fs-13); }
.check-mark { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1.5px dashed var(--g500); display: grid; place-items: center; color: var(--g600); }
.check-mark .icon { width: 13px; height: 13px; }
.check-step.done .check-mark { background: var(--ink); border: 0; color: var(--paper); }
.check-step.done a { color: var(--g600); text-decoration: line-through; }

/* Single result */
.result { padding: var(--s5); display: grid; gap: var(--s4); }
.result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s4); flex-wrap: wrap; }
.result .result-email { font-size: var(--fs-20); font-weight: 600; margin: 0 0 var(--s2); overflow-wrap: anywhere; padding: 0; border: 0; display: block; }
.verdicts { display: flex; align-items: center; gap: var(--s3); margin: 0; flex-wrap: wrap; }
.score { display: flex; align-items: center; gap: var(--s2); }
.score p { margin: 0; font-size: var(--fs-20); }
.ring { width: 48px; height: 48px; display: block; }
.ring-bg { stroke: var(--g200); }
.ring-ok .ring-fg { stroke: var(--ink); }
.ring-warn .ring-fg { stroke: var(--g500); }
.ring-bad .ring-fg { stroke: var(--red); }
.signals { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.sig { display: flex; gap: var(--s3); padding: var(--s3); border: var(--line); border-radius: var(--r); align-items: flex-start; }
.sig p { margin: 0; }
.sig-icon { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.sig-icon .icon { width: 13px; height: 13px; }
.sig-ok .sig-icon { background: var(--ink); color: var(--paper); }
.sig-bad .sig-icon { background: var(--red-soft); color: #8a0f1a; border: 1px solid #f5b8bf; }
.sig-unknown .sig-icon { border: 1px dashed var(--g500); color: var(--g600); }
.sig-label { font-weight: 600; font-size: var(--fs-sm); }
.sig-detail { font-size: var(--fs-13); color: var(--g600); overflow-wrap: anywhere; }
.result-foot { padding-top: var(--s3); border-top: var(--line); }

/* API onboarding stepper */
.stepper { list-style: none; margin: 0 0 var(--s5); padding: 0 0 var(--s4); display: flex; gap: var(--s5); border-bottom: var(--line); flex-wrap: wrap; }
.stepper-item { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-sm); color: var(--g600); }
.stepper-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 600 var(--fs-xs)/1 var(--mono); border: 1px solid var(--line-strong); }
.stepper-num .icon { width: 13px; height: 13px; }
.s-current { color: var(--ink); font-weight: 600; }
.s-current .stepper-num { background: var(--red); border-color: var(--red); color: #fff; }
.s-done .stepper-num { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.stepper-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
.stepper-body p { margin: 0; }
.stepper-body .btn { justify-self: start; }
.listen { padding: var(--s5); border: 1px dashed var(--line-strong); border-radius: var(--r); background: #fcfcfc; display: grid; gap: var(--s2); }
.listen p { margin: 0; }
.listen-wait, .listen-ok { display: flex; align-items: center; gap: var(--s3); font-weight: 600; }
.listen-ok .icon { width: 18px; height: 18px; }
.listen-ok[hidden], .listen-wait[hidden] { display: none; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--red); flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .pulse { animation: mf-pulse 1.6s var(--ease) infinite; }
  @keyframes mf-pulse { 0% { box-shadow: 0 0 0 0 rgba(225,29,46,.45); } 100% { box-shadow: 0 0 0 12px rgba(225,29,46,0); } }
}

/* notifications */
.nlist { list-style: none; margin: 0; padding: 0; border: var(--line); border-radius: var(--r); background: var(--paper); }
.nitem { display: flex; gap: var(--s3); padding: var(--s4); border-bottom: var(--line); }
.nitem:last-child { border-bottom: 0; }
.nitem.unread { background: #fffafa; }
.nitem-main { min-width: 0; display: grid; gap: 4px; }
.nitem-meta { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin: 0; }
.eyebrow-sm { font: 500 var(--fs-xs)/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--g600); margin: 0; }
.nitem-main form { margin: 0; }
.nitem-title { font: 600 var(--fs-base)/1.4 var(--sans); background: none; border: 0; padding: 0; color: var(--ink); text-align: left; cursor: pointer; min-height: 24px; }
.nitem-title:hover { text-decoration: underline; }
.nitem-body { margin: 0; font-size: var(--fs-sm); color: var(--g800); white-space: pre-line; }
.prefs { list-style: none; margin: 0; padding: 0; }
.pref { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) 0; border-bottom: var(--line); }
.pref:last-child { border-bottom: 0; }
.pref input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--ink); }
.pref label { display: grid; gap: 2px; font-size: var(--fs-sm); cursor: pointer; }

/* finder and admin template cards */
.run-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.run-card { display: flex; gap: var(--s3); padding: var(--s4); border: var(--line); border-radius: var(--r); background: var(--paper); }
.run-card p { margin: 4px 0 0; }
.hint .link { font-size: inherit; }
form.hint { margin: var(--s3) 0 0; font-size: var(--fs-13); color: var(--g600); }
.card-lead .segmented { margin-bottom: var(--s4); }

/* confirm pages, email preview, admin */
.confirm { max-width: 640px; }
.confirm p { color: var(--g800); }
.inline-top { margin: var(--s3) 0 var(--s4); }
.email-frame { width: 100%; max-width: 680px; display: block; height: 720px; border: var(--line); border-radius: var(--r-sm); background: var(--g50); }
.email-text { white-space: pre-wrap; font-size: var(--fs-13); background: var(--g50); border: var(--line); border-radius: var(--r-sm); padding: var(--s4); margin: 0; max-height: 720px; overflow: auto; }
.kv-inline { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s5); flex-wrap: wrap; }
.kv-inline li { display: grid; gap: 2px; font-size: var(--fs-13); }
.kv-inline b { font-size: var(--fs-20); }
/* Admin tables are wide: the console uses the whole screen. */
.admin-body .app-content { max-width: none; }
.admin-body .app-content > * + * { margin-top: var(--s5); }
.admin-body .app-title { margin-bottom: 0; }
.admin-body .crumbs + .app-title { margin-top: 0; }
.ws-body .empty { border-radius: var(--r-lg); padding: var(--s7) var(--s5); }
.ws-body .alert { margin: 0; }

/* ---------- developer docs, status, compare ---------- */
.hero-code pre { margin: 0; overflow-x: auto; font-size: 12.5px; line-height: 1.65; white-space: pre; }
.hero-code code { background: none; border: 0; padding: 0; overflow-wrap: normal; }
.hero .row-actions { margin-bottom: var(--s3); }
@media (min-width: 900px) { .timeline-3 { grid-template-columns: repeat(3, 1fr); } }
.row-links { display: flex; flex-wrap: wrap; gap: var(--s5); margin-top: var(--s4); }

.docs-layout { display: grid; gap: var(--s6); padding-top: var(--s7); padding-bottom: var(--s8); }
@media (min-width: 960px) { .docs-layout { grid-template-columns: 220px minmax(0, 1fr); gap: var(--s8); } }
.docs-nav { font-size: var(--fs-sm); }
@media (min-width: 960px) { .docs-nav { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; } }
.docs-nav ul { list-style: none; margin: var(--s2) 0 var(--s5); padding: 0; display: grid; gap: 2px; }
.docs-nav a { display: block; padding: 6px 0; text-decoration: none; color: var(--g800); }
.docs-nav a:hover { color: var(--ink); text-decoration: underline; }
.docs-nav a[aria-current] { color: var(--ink); font-weight: 600; box-shadow: inset 2px 0 0 var(--red); padding-left: var(--s3); }
.docs-body { min-width: 0; max-width: 80ch; }
.docs-body h1 { margin-bottom: var(--s4); }
.docs-ai { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s6); }
.docs-ai .chip { display: inline-flex; align-items: center; gap: var(--s2); text-decoration: none; font-size: var(--fs-sm); }
.docs-ai .chip:hover { border-color: var(--ink); }
.docs-prose h2 { font-size: 1.5rem; margin: var(--s7) 0 var(--s4); scroll-margin-top: 96px; }
.docs-prose h3 { font-size: 1.125rem; margin: var(--s6) 0 var(--s3); scroll-margin-top: 96px; }
.docs-prose ul, .docs-prose ol { padding-left: 1.25em; display: grid; gap: var(--s2); margin: 0 0 var(--s4); }
.docs-prose pre { margin: 0 0 var(--s5); }
.docs-prose .table-wrap { margin: 0 0 var(--s5); }
.docs-prose .table th { white-space: normal; }
.doc-note { border-left: 2px solid var(--ink); background: var(--g50); padding: var(--s3) var(--s4); border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* docs code tabs: radio inputs, labels, then panels; the n-th checked input shows the n-th panel */
.dtabs { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 var(--s5); }
.dtab-label { flex: none; font: 500 var(--fs-sm)/1 var(--mono); padding: 12px 14px; min-height: 44px; display: inline-flex; align-items: center; cursor: pointer; border-radius: var(--r-sm) var(--r-sm) 0 0; color: var(--on-ink-muted); background: #171717; }
.dtab-label:hover { color: #fff; }
.tab-input:checked + .dtab-label { background: #1f1f1f; color: #fff; box-shadow: inset 0 2px 0 var(--red); }
.tab-input:focus-visible + .dtab-label { outline: 2px solid var(--red); outline-offset: 2px; }
.dtab-panel { display: none; flex-basis: 100%; min-width: 0; }
.dtab-panel pre { margin: 0; background: #1f1f1f; color: #ededed; padding: var(--s5); border-radius: 0 var(--r) var(--r) var(--r); overflow-x: auto; font-size: 13.5px; line-height: 1.7; }
.dtab-panel code { background: none; border: 0; padding: 0; font-size: inherit; overflow-wrap: normal; color: inherit; }
.dtabs > input:nth-of-type(1):checked ~ div:nth-of-type(1),
.dtabs > input:nth-of-type(2):checked ~ div:nth-of-type(2),
.dtabs > input:nth-of-type(3):checked ~ div:nth-of-type(3),
.dtabs > input:nth-of-type(4):checked ~ div:nth-of-type(4),
.dtabs > input:nth-of-type(5):checked ~ div:nth-of-type(5),
.dtabs > input:nth-of-type(6):checked ~ div:nth-of-type(6),
.dtabs > input:nth-of-type(7):checked ~ div:nth-of-type(7),
.dtabs > input:nth-of-type(8):checked ~ div:nth-of-type(8) { display: block; }

/* ---------- status page ---------- */
/* Green, amber and red only here: the universal status colours, next to the brand's ink. */
.status-page { --ok: #15803d; --ok-soft: #dcfce7; --warn: #b45309; --warn-soft: #fef3c7; --down: var(--red-dark); --down-soft: var(--red-soft);
  max-width: 880px; padding-top: var(--s8); padding-bottom: var(--s9); display: grid; gap: var(--s5); }
.status-head h1 { margin-bottom: var(--s2); }
.status-updated { color: var(--g600); font-size: var(--fs-sm); margin: 0; }
.status-banner { display: flex; gap: var(--s4); align-items: flex-start; border-radius: var(--r); padding: var(--s5); color: var(--paper); background: var(--ok); }
.status-banner .icon { width: 28px; height: 28px; margin-top: 2px; flex: none; }
.status-banner p { margin: 0; }
.status-word { font-size: var(--fs-lg); font-weight: 650; letter-spacing: -0.01em; }
.status-degraded { background: var(--warn); }
.status-down { background: var(--down); }
.status-card { border: var(--line); border-radius: var(--r); background: var(--paper); padding: var(--s5); }
.status-card-title { font-size: var(--fs-md); font-weight: 650; margin: 0 0 var(--s4); }
.status-card-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.status-figure { font-weight: 600; }
.components { list-style: none; margin: 0; padding: 0; }
.component { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); padding: var(--s3) 0; border-top: var(--line); }
.component:first-child { border-top: 0; padding-top: 0; }
.component p { margin: 0; }
.component-name { font-weight: 600; }
.component-note { color: var(--g600); font-size: var(--fs-sm); }
.pill { flex: none; font-size: var(--fs-xs); font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-down { background: var(--down-soft); color: var(--down); }
.uptime-bars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 2px; height: 36px; }
.day { display: inline-block; border-radius: 2px; background: var(--g200); }
.uptime-bars .day { height: 100%; }
.uptime-bars .day:hover { opacity: .7; }
.day-ok { background: var(--ok); }
.day-minor { background: #f59e0b; }
.day-major { background: var(--down); }
.uptime-axis { display: flex; justify-content: space-between; color: var(--g600); font-size: var(--fs-xs); margin-top: var(--s2); }
.uptime-legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-size: var(--fs-xs); color: var(--g600); margin: var(--s3) 0 0; }
.uptime-legend span { display: inline-flex; align-items: center; gap: 6px; }
.uptime-legend .day { width: 10px; height: 10px; }
.uptime-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); margin: var(--s5) 0 0; padding-top: var(--s4); border-top: var(--line); }
.uptime-stats dt { font-size: var(--fs-xs); color: var(--g600); }
.uptime-stats dd { margin: 2px 0 0; font-size: var(--fs-lg); font-weight: 600; }
.incidents { list-style: none; margin: 0; padding: 0; }
.incident { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); padding: var(--s3) 0; border-top: var(--line); }
.incident:first-child { border-top: 0; padding-top: 0; }
.incident-time { font-size: var(--fs-sm); min-width: 17ch; }
.incident-len { color: var(--g600); font-size: var(--fs-sm); }
.incident-none { display: flex; align-items: center; gap: var(--s2); margin: 0; color: var(--g800); }
.incident-none .icon { width: 18px; height: 18px; color: var(--ok); }
.status-foot { font-size: var(--fs-sm); max-width: 80ch; margin: 0; }
@media (max-width: 480px) {
  .uptime-bars { gap: 1px; height: 30px; }
  .uptime-stats dd { font-size: var(--fs-md); }
}

.compare-table tbody th { font: 600 var(--fs-sm)/1.4 var(--sans); text-transform: none; letter-spacing: 0; color: var(--ink); background: none; white-space: nowrap; border-bottom: var(--line); padding: var(--s3) var(--s4); text-align: left; }
.compare-table thead a { text-decoration: none; color: inherit; }
.compare-table thead a:hover { text-decoration: underline; }
.compare-table td { min-width: 140px; }
.compare-table .row-self { background: var(--g50); }
.compare-table .row-self th { box-shadow: inset 3px 0 0 var(--red); }
.compare-notes { margin-top: var(--s4); max-width: 80ch; }
.compare-links { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2) var(--s5); }
@media (min-width: 640px) { .compare-links { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .compare-links { grid-template-columns: repeat(3, 1fr); } }
.compare-sources { padding-left: 1.25em; overflow-wrap: anywhere; font-size: var(--fs-sm); }
.compare-table .muted-cell { color: var(--g600); }

/* ---------- navigation: no jank between dashboard pages ---------- */
/* Cross-document view transitions: a short fade of the page while the top bar stays put. */
@view-transition { navigation: auto; }
.topbar { view-transition-name: topbar; }
::view-transition-old(topbar), ::view-transition-new(topbar) { animation: none; }
::view-transition-group(topbar) { animation-duration: 0s; }
::view-transition-old(root) { animation: 90ms ease-out both vt-fade-out; }
::view-transition-new(root) { animation: 140ms ease-out both vt-fade-in; }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
/* The scrollbar gutter is always reserved, so short and long pages line up. */
html:has(> body.ws-body) { scrollbar-gutter: stable; }

/* ---------- modal dialog (Buy credits) ---------- */
.modal { padding: 0; border: var(--line); border-radius: var(--r-lg); width: min(580px, calc(100vw - 24px)); max-height: calc(100dvh - 48px); background: var(--paper); color: var(--ink); box-shadow: var(--e2); }
.modal::backdrop { background: rgba(10,10,10,.45); }
html:has(dialog.modal[open]) { overflow: hidden; }
.modal-in { padding: var(--s5); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); margin-bottom: var(--s2); }
.modal-head form { margin: 0; }
.modal-head p { margin: 4px 0 0; }
.modal-head .icon-btn { border: 0; background: none; font: inherit; }
.modal-title { font-size: var(--fs-20); letter-spacing: -0.02em; }
.modal-sub { font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0; margin: var(--s4) 0 var(--s2); }
.modal-sub .muted { font-weight: 400; }
.modal .alert { margin: var(--s3) 0 0; }
.modal-foot { margin: var(--s4) 0 0; }
.buy-list { list-style: none; margin: 0; padding: 0; border: var(--line); border-radius: var(--r); }
.buy-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); }
.buy-item + .buy-item { border-top: var(--line); }
.buy-item form { margin: 0; }
.buy-name { display: grid; gap: 2px; min-width: 0; }
.buy-name .muted { font-size: var(--fs-13); }
.buy-price { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.buy-price small { font-weight: 400; color: var(--g600); }
@media (max-width: 480px) {
  .buy-item { grid-template-columns: minmax(0, 1fr) auto; }
  .buy-item > :last-child { grid-column: 1 / -1; justify-self: start; }
}
@media (prefers-reduced-motion: no-preference) {
  .modal[open] { animation: modal-in 160ms var(--ease); }
  .modal[open]::backdrop { animation: backdrop-in 160ms ease-out; }
}
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes backdrop-in { from { opacity: 0; } }

/* ---------- API key IP allowlist ---------- */
.ip-list { font-size: var(--fs-13); overflow-wrap: anywhere; }
.ip-edit { margin-top: 4px; }
.ip-edit textarea { min-height: 88px; width: min(320px, 70vw); }

/* ---------- Support tickets ---------- */
.thread { display: grid; gap: var(--s3); margin-bottom: var(--s5); }
.msg { background: var(--paper); border: var(--line); border-radius: var(--r); padding: var(--s4) var(--s5); }
.msg-staff { border-left: 3px solid var(--ink); }
.msg-internal { background: var(--g50); border: 1px dashed var(--g500); }
.msg-head { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; font-size: var(--fs-sm); color: var(--g800); margin-bottom: var(--s2); }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
textarea.msg-input { font-family: var(--sans); font-size: var(--fs-base); }
.ticket-row.unread a { font-weight: 700; }
.ticket-row.unread td:first-child::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red); margin-right: 6px; vertical-align: middle; }
.tickets .ticket-subject a { margin-right: var(--s2); }
.ticket-id { font-size: var(--fs-xs); color: var(--g500); }
/* Full-width customer pages (support): the content uses the whole screen like the admin console. */
.ws-wrap.ws-wide { max-width: none; }
.page-head-app { flex-wrap: wrap; }
.page-head-action { margin-left: auto; align-self: center; }
@media (max-width: 560px) { .page-head-action { margin-left: 0; width: 100%; } .page-head-action .btn { width: 100%; justify-content: center; } }
.support-empty b { color: var(--ink); }
/* New-ticket dialog and form */
.modal-lg { width: min(720px, calc(100vw - 24px)); overflow: auto; }
.support-form { gap: var(--s4); }
.support-notice p { font-size: var(--fs-sm); }
.step-label { display: inline-flex; align-items: center; gap: var(--s2); flex-wrap: wrap; font-weight: 600; }
.step-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: var(--fs-xs); }
.help-bullets { margin: 0; padding-left: var(--s5); color: var(--g600); font-size: var(--fs-sm); font-weight: 400; }
.counter.is-ok { color: var(--ink); }
.field-error { display: flex; align-items: center; gap: 6px; color: #8A0F1A; font-size: var(--fs-xs); font-weight: 500; }
.field-error .icon { width: 14px; height: 14px; flex: none; }
.field-error[hidden] { display: none; }
.support-form [aria-invalid="true"] { border-color: var(--red); }
.form-actions { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.form-actions .btn:disabled { opacity: .5; cursor: not-allowed; }
.dropzone-files { padding: var(--s5) var(--s4); font-weight: 400; }
.dropzone-files .icon { width: 22px; height: 22px; color: var(--g600); }
.link-like { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.file-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.file-chips:empty { display: none; }
.file-chip { display: inline-flex; align-items: center; gap: var(--s2); min-height: 32px; padding: 0 4px 0 var(--s3); border: var(--line); border-radius: 999px; font-size: var(--fs-13); max-width: 100%; }
.file-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 28ch; }
.file-chip-size { color: var(--g500); font-family: var(--mono); font-size: var(--fs-xs); }
.file-chip-x { border: 0; background: none; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; color: var(--g600); font: inherit; font-size: 16px; line-height: 1; }
.file-chip-x:hover { background: var(--g50); color: var(--ink); }
/* Ticket thread: messages on the left, facts on the right from 1024px. */
.ticket-layout { display: grid; gap: var(--s5); }
.ticket-side .kv { margin-bottom: var(--s4); }
@media (min-width: 1024px) {
  .ticket-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .ticket-side { position: sticky; top: var(--s5); }
}
.att-list { list-style: none; margin: var(--s3) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.att { display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); border: var(--line); border-radius: var(--r-sm); color: var(--g800); text-decoration: none; font-size: var(--fs-13); max-width: 100%; }
.att:hover { border-color: var(--ink); color: var(--ink); }
.att .icon { width: 16px; height: 16px; flex: none; }
.att-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 32ch; }
.att-size { color: var(--g500); font-size: var(--fs-xs); }
.att-expired, .att-expired:hover { color: var(--g500); border-style: dashed; border-color: var(--g200); }
.att-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; border: var(--line); background: var(--g50); flex: none; }

/* Create-key form: show only the fields of the chosen key type (without :has() both stay visible). */
.key-kind { display: grid; gap: var(--s1); }
.card-form:has(input[name="kind"][value="public"]:checked) .only-private,
.card-form:has(input[name="kind"][value="private"]:checked) .only-public { display: none; }

/* Account limits: label and help on the left, value on the right; stacks on phones. */
.limits { margin: var(--s4) 0 0; }
.limit-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s1); padding: var(--s3) 0; border-top: var(--line); }
.limit-row:first-child { border-top: 0; }
.limit-row dt { font-weight: 600; display: grid; gap: 2px; }
.limit-row dt .hint { font-weight: 400; color: var(--g600); }
.limit-row dd { margin: 0; display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; color: var(--g800); }
@media (min-width: 640px) {
  .limit-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s5); }
  .limit-row dd { justify-content: flex-end; text-align: right; }
}
