
:root {
  --bg: #f7f5f4;
  --surface: #ffffff;
  --surface-alt: #f1ebea;
  --border: #e3d8d7;
  --border-strong: #8c7d7f;
  --hairline: rgba(26, 17, 19, 0.12);
  --text: #1a1113;
  --text-muted: #5f4f51;
  --accent: #c0102a;
  --accent-hover: #9c0c22;
  --accent-soft: #f6dfe2;
  --on-accent: #ffffff;
  --focus: #1f5fbf;
  --success: #1d7a52;
  --header-bg: rgba(247, 245, 244, 0.9);
  --font-mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-body: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-h3: 1.375rem;
  --fs-h2: clamp(1.625rem, 1.2rem + 1.6vw, 2.25rem);
  --fs-h1: clamp(2rem, 1.3rem + 2.8vw, 3.25rem);
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --radius-sm: 6px;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(26, 17, 19, 0.06), 0 4px 16px rgba(26, 17, 19, 0.05);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 180ms;
  --container: 1160px;
  --gutter: 1rem;
  --header-h: 64px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0b0d;
  --surface: #131316;
  --surface-alt: #1a1a1e;
  --border: #2c2224;
  --border-strong: #7a6b6d;
  --hairline: rgba(240, 233, 234, 0.14);
  --text: #f0e9ea;
  --text-muted: #b3a3a5;
  --accent: #ff2a3a;
  --accent-hover: #ff5562;
  --accent-soft: #2e1013;
  --on-accent: #0b0b0d;
  --focus: #8ab4ff;
  --success: #3ed69b;
  --header-bg: rgba(11, 11, 13, 0.88);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}
@media (min-width: 720px) {
  :root { --gutter: 1.5rem; --header-h: 72px; }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  overflow-x: clip;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); color: var(--text); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 var(--s-4); font-weight: 700; text-wrap: balance; }
h1, h2 { font-family: var(--font-mono); letter-spacing: -0.01em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-lg); }
p { margin: 0 0 var(--s-4); text-wrap: pretty; }
ul, ol { margin: 0 0 var(--s-4); padding-left: 1.25rem; }
li + li { margin-top: var(--s-2); }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-7) 0; }
small, .small { font-size: var(--fs-sm); }
.muted { color: var(--text-muted); }
.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; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }
.section { padding-block: var(--s-8); }
.section--tight { padding-block: var(--s-6); }
.section--alt { background: var(--surface); border-block: 1px solid var(--border); }
.eyebrow {
  font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--accent); margin: 0 0 var(--s-3); font-weight: 600;
}
.lead { font-size: var(--fs-lg); color: var(--text-muted); max-width: 62ch; }
.skip-link { position: absolute; left: var(--s-4); top: -100px; z-index: 100; background: var(--text); color: var(--bg); padding: var(--s-2) var(--s-4); border-radius: var(--radius-sm); }
.skip-link:focus { top: var(--s-2); color: var(--bg); }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: var(--s-4); height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: var(--s-3); color: var(--text); text-decoration: none; font-family: var(--font-mono); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.02em; margin-right: auto; min-width: 0; }
.brand:hover { color: var(--text); }
.brand img { width: 36px; height: 36px; border-radius: 8px; flex: none; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-toggle {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }
.site-nav { display: none; }
.site-nav.is-open {
  display: block; position: absolute; left: 0; right: 0; top: var(--header-h);
  background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  max-height: calc(100svh - var(--header-h)); overflow-y: auto;
}
.nav-list { list-style: none; margin: 0; padding: var(--s-3) var(--gutter) var(--s-5); }
.nav-list li + li { margin-top: 0; }
.nav-link, .nav-sub a {
  display: flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; font-size: var(--fs-body);
}
.nav-link[aria-current="page"], .nav-sub a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.nav-sub { list-style: none; margin: 0 0 var(--s-2); padding: 0 0 0 var(--s-4); border-left: 2px solid var(--border); }
.nav-sub li + li { margin-top: 0; }
.nav-sub a { min-height: 40px; font-size: var(--fs-sm); color: var(--text-muted); }
.nav-group > .nav-link { font-weight: 600; }
.nav-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; padding-top: var(--s-4); }
.theme-toggle {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (min-width: 1080px) {
  .nav-toggle { display: none; }
  .site-nav { order: 1; }
  .theme-toggle { order: 2; }
  .site-nav, .site-nav.is-open { display: block; position: static; background: none; border: 0; box-shadow: none; max-height: none; overflow: visible; }
  .nav-list { display: flex; align-items: center; gap: var(--s-1); padding: 0; }
  .nav-link { padding-inline: var(--s-3); font-size: var(--fs-sm); min-height: 40px; border-radius: var(--radius-sm); }
  .nav-link:hover { background: var(--surface-alt); color: var(--text); }
  .nav-group { position: relative; }
  .nav-group > .nav-link { font-weight: 400; }
  .nav-group > .nav-link::after { content: ""; width: 7px; height: 7px; margin-left: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
  .nav-sub {
    position: absolute; top: 100%; left: 0; min-width: 260px; padding: var(--s-2); margin: 0;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
  }
  .nav-group:hover .nav-sub, .nav-group:focus-within .nav-sub { opacity: 1; visibility: visible; transform: none; }
  .nav-sub a { padding-inline: var(--s-3); border-radius: var(--radius-sm); color: var(--text); font-size: var(--fs-sm); }
  .nav-sub a:hover { background: var(--surface-alt); }
  .nav-actions { padding: 0 0 0 var(--s-3); flex-wrap: nowrap; gap: var(--s-2); }
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5); border-radius: var(--radius-sm);
  font: 600 var(--fs-sm)/1.2 var(--font-sans); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--text-muted); color: var(--text); }
.btn-small { min-height: 40px; padding: 0 var(--s-4); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.hero { padding-block: var(--s-7) var(--s-6); }
.hero h1 { max-width: 26ch; font-size: clamp(1.875rem, 1.2rem + 2.4vw, 2.875rem); letter-spacing: -0.02em; }
.hero .lead { margin-bottom: 0; }
@media (min-width: 900px) { .hero { padding-block: var(--s-9) var(--s-7); } }
.answer {
  margin-top: var(--s-6); padding: var(--s-5); border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent);
  max-width: 820px;
}
.answer p:last-child { margin-bottom: 0; }
.answer .eyebrow { margin-bottom: var(--s-2); }
.facts { display: grid; gap: var(--s-2) var(--s-5); margin: var(--s-4) 0 0; font-size: var(--fs-sm); }
.facts div { display: grid; grid-template-columns: 6.5rem 1fr; gap: var(--s-3); }
.facts dt { color: var(--text-muted); }
.facts dd { margin: 0; }
@media (min-width: 720px) { .facts { grid-template-columns: 1fr 1fr; } }
.grid { display: grid; gap: var(--s-5); }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--s-5); display: flex; flex-direction: column;
}
.card h3 { font-size: var(--fs-lg); margin-bottom: var(--s-2); }
.card p { color: var(--text-muted); }
.card > :last-child { margin-bottom: 0; }
.card-link { margin-top: auto; padding-top: var(--s-3); font-weight: 600; text-decoration: none; }
.card-link::after { content: " \2192"; }
.card--service { position: relative; transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.card--service:hover { border-color: var(--accent); transform: translateY(-2px); }
.card--service .card-link::before { content: ""; position: absolute; inset: 0; }
.card--key { border-top: 4px solid var(--accent); }
.tag { display: inline-block; font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: var(--s-2); }
.feature-list { list-style: none; padding: 0; display: grid; gap: var(--s-4); }
.feature-list li { padding-left: 1.75rem; position: relative; margin: 0; }
.feature-list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 10px; height: 10px; border-radius: 2px; background: var(--accent); }
.feature-list strong { display: block; }
.steps { list-style: none; padding: 0; counter-reset: s; display: grid; gap: var(--s-4); }
.steps li { counter-increment: s; position: relative; padding-left: 3rem; margin: 0; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -0.1em; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; font: 700 var(--fs-sm) var(--font-mono); background: var(--accent-soft); color: var(--accent); }
.split { display: grid; gap: var(--s-6); }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; align-items: start; } }
.quote {
  margin: 0; padding: var(--s-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.quote blockquote { margin: 0 0 var(--s-4); font-size: var(--fs-lg); line-height: 1.55; }
.quote blockquote p:last-child { margin-bottom: 0; }
.quote figcaption { font-size: var(--fs-sm); color: var(--text-muted); }
.quote figcaption strong { color: var(--text); }
.stars { color: var(--accent); letter-spacing: 0.1em; font-size: var(--fs-sm); margin-bottom: var(--s-2); }
.note { font-size: var(--fs-sm); color: var(--text-muted); }
.faq { display: grid; gap: var(--s-3); }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.faq summary { cursor: pointer; padding: var(--s-4) var(--s-5); font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: var(--s-4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--accent); }
.faq details[open] summary::after { content: "\2212"; }
.faq .faq-a { padding: 0 var(--s-5) var(--s-4); }
.faq .faq-a > :last-child { margin-bottom: 0; }
.cta-band { padding: var(--s-7) var(--s-5); border-radius: var(--radius); background: var(--text); color: var(--bg); text-align: center; }
.cta-band h2 { color: var(--bg); }
.cta-band p { color: var(--bg); opacity: 0.85; max-width: 60ch; margin-inline: auto; }
.cta-band .btn-row { justify-content: center; }
.cta-band .btn-secondary { background: transparent; color: var(--bg); border-color: currentColor; }
:root[data-theme="dark"] .cta-band { background: var(--surface-alt); color: var(--text); border: 1px solid var(--border); }
:root[data-theme="dark"] .cta-band h2, :root[data-theme="dark"] .cta-band p { color: var(--text); }
:root[data-theme="dark"] .cta-band .btn-secondary { color: var(--text); }
.breadcrumb { font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: var(--s-4); }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: var(--s-2); color: var(--border); }
.breadcrumb a { color: var(--text-muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
th, td { text-align: left; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 600; background: var(--surface-alt); }
tr:last-child td { border-bottom: 0; }
.gallery { display: grid; gap: var(--s-4); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { padding: var(--s-2) var(--s-3); font-size: var(--fs-sm); }
.work-card { padding: 0; overflow: hidden; }
.work-card img { display: block; width: 100%; height: auto; aspect-ratio: 12 / 5; object-fit: cover; object-position: top; border-bottom: 1px solid var(--border); }
.work-card .work-body { padding: var(--s-5); display: flex; flex-direction: column; flex: 1; }
.form-panel { max-width: 640px; text-align: left; }
.form-row { display: grid; gap: var(--s-2); margin-bottom: var(--s-4); }
.form-row label { font-weight: 600; font-size: var(--fs-sm); }
input[type="text"], input[type="email"], input[type="url"], input[type="file"], select, textarea {
  width: 100%; min-height: 48px; padding: var(--s-3); font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
}
textarea { min-height: 96px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--focus); }
.checkbox-label { display: flex; gap: var(--s-3); align-items: flex-start; font-weight: 400 !important; }
.checkbox-label input { width: 20px; height: 20px; margin-top: 0.2em; flex: none; accent-color: var(--accent); }
.form-note { font-size: var(--fs-sm); color: var(--text-muted); }
.form-status { font-size: var(--fs-sm); min-height: 1.5em; }
.form-status.error { color: var(--accent); }
.form-status.success { color: var(--success); }
.prose { max-width: 70ch; }
.prose h2 { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); margin-top: var(--s-7); }
.prose h3 { margin-top: var(--s-6); }
.prose img { border-radius: var(--radius); }
.prose blockquote { margin: var(--s-5) 0; padding-left: var(--s-5); border-left: 3px solid var(--accent); color: var(--text-muted); }
.prose table { margin-bottom: var(--s-5); }
.prose pre, .prose code { font-family: var(--font-mono); font-size: 0.9em; }
.prose pre { overflow-x: auto; background: var(--surface-alt); padding: var(--s-4); border-radius: var(--radius-sm); }
.post-meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: var(--s-3); }
.post-tag { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.post-standfirst { font-size: var(--fs-lg); color: var(--text-muted); }
.byline { font-size: var(--fs-sm); color: var(--text-muted); }
.related { margin-top: var(--s-8); padding-top: var(--s-6); border-top: 1px solid var(--border); }
.related ul { padding-left: 1.1rem; }
.filters { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-6); }
.filter-btn { min-height: 40px; padding: 0 var(--s-4); border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.filter-btn[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.post-card time { font-size: var(--fs-sm); color: var(--text-muted); }
.cluster + .cluster { margin-top: var(--s-8); }
[hidden] { display: none !important; }
.portrait { border-radius: var(--radius); border: 1px solid var(--border); width: 100%; max-width: 420px; height: auto; display: block; }
.timeline { list-style: none; padding: 0; border-left: 2px solid var(--border); margin-left: 0.4rem; }
.timeline li { position: relative; padding: 0 0 var(--s-5) var(--s-5); margin: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 0.45em; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.timeline h3 { font-size: var(--fs-body); margin-bottom: var(--s-1); }
.site-footer { margin-top: var(--s-8); padding-block: var(--s-7) var(--s-5); background: var(--surface); border-top: 1px solid var(--border); font-size: var(--fs-sm); }
.footer-grid { display: grid; gap: var(--s-6); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer h2 { font-size: var(--fs-sm); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--s-3); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 36px; color: var(--text); text-decoration: none; }
.site-footer li a:hover { color: var(--accent); text-decoration: underline; }
.site-footer address { font-style: normal; color: var(--text-muted); }
.site-footer address a { color: var(--text); }
.social { display: flex; gap: var(--s-2); margin-top: var(--s-4); }
.social a { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); }
.social a:hover { color: var(--accent); border-color: var(--accent); }
.social svg { width: 20px; height: 20px; }
.legal-line { margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--border); color: var(--text-muted); display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); justify-content: space-between; }
.legal-line p { margin: 0; }
[data-auth="in"] { display: none !important; }
.is-signed-in [data-auth="in"] { display: inline-flex !important; }
.is-signed-in [data-auth="out"] { display: none !important; }
.is-signed-in .nav-account { display: block !important; }
.nav-sub-btn {
  display: flex; align-items: center; width: 100%; min-height: 40px; padding: 0; border: 0; background: none;
  font: inherit; font-size: var(--fs-sm); color: var(--text-muted); cursor: pointer; text-align: left;
}
.nav-account-btn { display: none; }
@media (min-width: 1080px) {
  .nav-account-btn { display: inline-flex; }
  .nav-account-btn::after { content: ""; width: 6px; height: 6px; margin-left: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
  .nav-account .nav-sub { left: auto; right: 0; min-width: 200px; }
  .nav-sub-btn { padding-inline: var(--s-3); border-radius: var(--radius-sm); color: var(--text); }
  .nav-sub-btn:hover { background: var(--surface-alt); }
}
.nav-link, .btn { white-space: nowrap; }
@media (min-width: 1080px) { .brand { flex-shrink: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .scene-canvas, .btn-row, .cta-band { display: none !important; }
  body { background: #fff; color: #000; }
}
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--text-muted); color: var(--text); }
.btn-sm { min-height: 36px; padding: 0 var(--s-3); font-size: var(--fs-xs); }
.section-title { margin-bottom: var(--s-5); }
.section-intro { color: var(--text-muted); }
.section-prose { max-width: 70ch; }
.legal-copy h2 { font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.5rem); margin-top: var(--s-6); }
.hidden-field { position: absolute !important; left: -9999px !important; }
.form-row-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.contact-fallback { font-size: var(--fs-sm); color: var(--text-muted); margin-top: var(--s-5); }
.portal-grid { display: grid; gap: var(--s-6); margin-top: var(--s-5); }
@media (min-width: 900px) { .portal-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.upload-form-wrap, .upload-list-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-5); }
.upload-form-wrap h2, .upload-list-wrap h2 { font-size: var(--fs-lg); }
.dropzone { position: relative; border: 2px dashed var(--border); border-radius: var(--radius); padding: var(--s-5); text-align: center; background: var(--bg); transition: border-color var(--dur) var(--ease); }
.dropzone.is-dragover { border-color: var(--accent); }
.dropzone-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.dropzone-label { display: grid; gap: var(--s-1); pointer-events: none; }
.dropzone-hint, .dropzone-filename { font-size: var(--fs-sm); color: var(--text-muted); }
.form-progress { height: 6px; border-radius: 3px; background: var(--surface-alt); overflow: hidden; margin-top: var(--s-3); }
.form-progress-fill { height: 100%; width: 0; background: var(--accent); transition: width 200ms linear; }
.upload-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3); }
.upload-list li { margin: 0; }
.upload-item { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--s-3) var(--s-4); background: var(--bg); }
.upload-item-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2); }
.upload-item-date, .upload-list-empty { font-size: var(--fs-sm); color: var(--text-muted); }
.upload-item-note { margin: var(--s-2) 0 0; }
.upload-item-file { display: flex; gap: var(--s-2); align-items: center; margin-top: var(--s-2); font-size: var(--fs-sm); }
.dashboard-list { list-style: none; padding: 0; }
@media (min-width: 1080px) {
  .hero > .container:has(> .answer) { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: var(--s-7); align-items: start; }
  .hero > .container:has(> .answer) > * { grid-column: 1; }
  .hero > .container:has(> .answer) > .answer { grid-column: 2; grid-row: 1 / span 8; align-self: center; margin-top: 0; }
  .hero .answer .facts { grid-template-columns: 1fr; }
}
@media (min-width: 1080px) and (max-width: 1279px) {
  .nav-link { padding-inline: var(--s-2); }
  .nav-actions { padding-left: var(--s-2); }
}
.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.backdrop-gl { display: block; width: 100%; height: 100%; }
.has-backdrop .site-header { z-index: 50; }
.has-backdrop main, .has-backdrop .site-footer { position: relative; z-index: 1; }
.has-backdrop { --veil: color-mix(in srgb, var(--bg) 90%, transparent); --veil-alt: color-mix(in srgb, var(--surface) 92%, transparent); }
.backdrop-live .has-backdrop main > section { background: linear-gradient(180deg, transparent 0, var(--veil) 2rem, var(--veil) calc(100% - 2rem), transparent 100%); }
.backdrop-live .has-backdrop main > section.section--alt { background: linear-gradient(180deg, transparent 0, var(--veil-alt) 2rem, var(--veil-alt) calc(100% - 2rem), transparent 100%); border-color: transparent; }
.backdrop-live .has-backdrop main > section.hero,
.backdrop-live .has-backdrop main > section.interlude { background: transparent; }
.has-backdrop .hero > .container { display: block; }
.has-backdrop .hero .answer { max-width: 760px; }
.backdrop-live .has-backdrop .hero { min-height: calc(100svh - var(--header-h)); display: flex; align-items: center; }
.backdrop-live .has-backdrop .hero > .container { position: relative; }
.backdrop-live .has-backdrop .hero > .container > :not(.answer) { max-width: 40rem; }
.backdrop-live .has-backdrop .hero > .container::before {
  content: ""; position: absolute; z-index: -1; inset: -3rem -40vw -3rem -40vw;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 94%, transparent) 0%, color-mix(in srgb, var(--bg) 88%, transparent) 42%, color-mix(in srgb, var(--bg) 0%, transparent) 72%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 3rem, #000 calc(100% - 3rem), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 3rem, #000 calc(100% - 3rem), transparent 100%);
  pointer-events: none;
}
@media (max-width: 899px) {
  .backdrop-live .has-backdrop .hero > .container::before {
    inset: -2rem -1rem; background: color-mix(in srgb, var(--bg) 84%, transparent);
  }
}
.interlude { padding-block: var(--s-8); }
.interlude-head { max-width: 40rem; margin-bottom: var(--s-6); }
.interlude-body { display: grid; gap: var(--s-6); align-items: start; }
.interlude-figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-5); }
.interlude-figure svg { display: block; width: 100%; height: auto; }
@media (min-width: 900px) { .interlude-body { grid-template-columns: 1fr 1fr; } }
.story { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); counter-reset: story; }
.story-step {
  counter-increment: story; margin: 0; position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--s-5) var(--s-5) var(--s-5) 4rem; box-shadow: var(--shadow);
}
.story-step::before {
  content: counter(story, decimal-leading-zero); position: absolute; left: var(--s-5); top: var(--s-5);
  font: 700 var(--fs-sm)/1.6 var(--font-mono); color: var(--accent);
}
.story-step h3 { font-size: var(--fs-lg); margin-bottom: var(--s-2); }
.story-step p { margin: 0; color: var(--text-muted); }
.backdrop-live .interlude { padding-block: 35vh 45vh; }
.backdrop-live .interlude-head {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--s-5); box-shadow: var(--shadow); margin-bottom: 40vh;
}
.backdrop-live .interlude-figure { display: none; }
.backdrop-live .interlude-body { display: block; }
.backdrop-live .story { gap: 80vh; max-width: 30rem; }
@media (max-width: 899px) {
  .backdrop-live .interlude { padding-block: 25vh 35vh; }
  .backdrop-live .story { gap: 70vh; max-width: none; }
}
@media print {
  .backdrop { display: none !important; }
}
.has-backdrop .hero > .container > .answer { margin-top: var(--s-6); grid-row: auto; }
@media (min-width: 720px) { .has-backdrop .hero .answer .facts { grid-template-columns: 1fr 1fr; } }
.dashboard-analytics { margin-top: var(--s-8); }
.dashboard-analytics > h2 { margin-bottom: var(--s-2); }
.dashboard-analytics-intro { color: var(--text-muted); max-width: 62ch; }
.an-status { font-size: var(--fs-sm); color: var(--text-muted); min-height: 1.5em; margin-bottom: var(--s-2); }
.an-status.is-error { color: var(--accent); }
.an { display: grid; gap: var(--s-5); transition: opacity var(--dur) var(--ease); }
.an.is-loading { opacity: 0.6; }
.an p { margin: 0; }
.an-controls { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-3) var(--s-5); }
.an-picker { display: grid; gap: var(--s-1); flex: 1 1 16rem; max-width: 28rem; }
.an-picker label { font-weight: 600; font-size: var(--fs-sm); }
.an-site { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s-3); }
.an-site strong { font-size: var(--fs-lg); }
.an-site-host { color: var(--text-muted); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.an-toggle { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.an-toggle-btn {
  min-height: 44px; padding: 0 var(--s-4); border: 0; background: transparent; color: var(--text);
  font: 600 var(--fs-sm)/1.2 var(--font-sans); cursor: pointer; white-space: nowrap;
}
.an-toggle-btn + .an-toggle-btn { border-left: 1px solid var(--border-strong); }
.an-toggle-btn:hover { background: var(--surface-alt); }
.an-toggle-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.an-toggle-btn:focus-visible { outline-offset: -3px; }
.an-toggle-btn[disabled] { cursor: progress; }
.an-paused { font-size: var(--fs-sm); color: var(--text-muted); border-left: 3px solid var(--border-strong); padding-left: var(--s-3); }
.an-empty { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-5); display: grid; gap: var(--s-2); }
.an-empty p { max-width: 62ch; }
.an-empty-title { font-weight: 700; }
.an-empty a { overflow-wrap: anywhere; }
.an-figures { display: grid; gap: var(--s-3); margin: 0; }
@media (min-width: 640px) { .an-figures { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); } }
.an-figure { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-4) var(--s-5); display: flex; flex-direction: column; }
.an-figure dt { font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); order: 0; }
.an-figure dd { margin: 0; }
.an-figure-value { font-family: var(--font-mono); font-weight: 700; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); line-height: 1.2; margin-top: var(--s-1) !important; font-variant-numeric: tabular-nums; }
.an-figure-hint { font-size: var(--fs-xs); color: var(--text-muted); margin-top: var(--s-2) !important; line-height: 1.5; }
.an-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-4); min-width: 0; }
@media (min-width: 640px) { .an-panel { padding: var(--s-5); } }
.an-panel h3 { font-size: var(--fs-lg); margin-bottom: var(--s-4); }
.an-muted { color: var(--text-muted); font-size: var(--fs-sm); }
.an-explain { margin-top: var(--s-3) !important; }
.an-plot { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: var(--s-2); }
.an-yaxis { position: relative; min-width: 1.75rem; height: 160px; font-size: var(--fs-xs); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.an-yaxis span { position: absolute; right: 0; transform: translateY(-50%); line-height: 1; white-space: nowrap; }
.an-y-top { top: 0; }
.an-y-mid { top: 50%; }
.an-y-base { top: 100%; }
.an-bars { min-width: 0; }
.an-bars svg { display: block; width: 100%; height: 160px; overflow: visible; }
@media (min-width: 640px) {
  .an-yaxis, .an-bars svg { height: 200px; }
}
.an-grid { stroke: var(--hairline); stroke-width: 1; }
.an-hit { fill: transparent; }
.an-bar { fill: var(--accent); }
.an-slot:hover .an-bar { fill: var(--accent-hover); }
.an-slot.is-today .an-bar { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; }
.an-slot.is-today:hover .an-bar { fill: var(--accent-soft); stroke: var(--accent-hover); }
.an-xaxis { grid-column: 2; display: flex; justify-content: space-between; gap: var(--s-2); margin-top: var(--s-2); font-size: var(--fs-xs); color: var(--text-muted); }
.an-xaxis span { white-space: nowrap; }
.an-numbers { margin-top: var(--s-4); }
.an-numbers summary { cursor: pointer; font-size: var(--fs-sm); font-weight: 600; color: var(--accent); width: fit-content; }
.an-numbers summary:hover { color: var(--accent-hover); }
.an-numbers[open] summary { margin-bottom: var(--s-3); }
.an-numbers .an-table-wrap { max-height: 22rem; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.an-numbers th { position: sticky; top: 0; }
.an-tables { display: grid; gap: var(--s-5); }
@media (min-width: 900px) { .an-tables { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.an-table-wrap { overflow-x: auto; }
.an table { font-size: var(--fs-sm); }
.an th, .an td { padding: var(--s-2) var(--s-3); }
.an-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.an-label { overflow-wrap: anywhere; }
.an-share { display: inline-block; min-width: 3.25em; margin-left: var(--s-2); color: var(--text-muted); font-size: var(--fs-xs); }
.an-note { font-size: var(--fs-sm); color: var(--text-muted); max-width: 70ch; }
.an-gate { margin: var(--s-3) 0; padding: var(--s-3) var(--s-4); border-left: 3px solid var(--border-strong); background: var(--surface); font-size: var(--fs-sm); }
.an-gate p, .an-gate ul { margin: 0 0 var(--s-2); max-width: 70ch; }
@media print {
  .an-controls, .an-numbers summary { display: none; }
  .an-numbers .an-table-wrap { max-height: none; overflow: visible; }
}
