/* Lairhunt site — built on the Lairhunt design system.
   Rules: one page background for every section, header and footer; no dividers between sections;
   no gradients, no transparency, no shadows. Depth comes from filled surface steps and the notch. */

:root {
  --surface: #F6F5FB;
  --surface-raised: #FFFFFF;
  --surface-sunken: #ECE9F5;
  --line: #DCD8E8;
  --line-strong: #7A7494;
  --ink: #14102A;
  --ink-muted: #544E70;
  --brand: #6A2EE8;
  --brand-strong: #5420C4;
  --brand-soft: #EEE7FF;
  --on-brand: #FFFFFF;
  --link: #5420C4;
  --signal: #EC5A1C;
  --on-signal: #14102A;
  --threat: #B03A0A;
  --threat-soft: #FCE6DC;
  --contained: #0A6880;
  --contained-soft: #DBF0F5;

  --font-display: "Saira", "Arial Narrow", system-ui, sans-serif;
  --font-sans: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px;
  --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px; --space-16: 64px; --space-20: 80px;
  --radius-sm: 2px; --radius-md: 4px;
  --notch-sm: 6px; --notch-md: 12px; --notch-lg: 24px;
  --marker-sm: 8px; --marker-lg: 16px;
  --max: 1200px;
  color-scheme: light;
}
/* Light is the default. Dark is opt-in through the header toggle, which sets data-theme on <html>. */
:root[data-theme="dark"] {
  --surface: #100C22; --surface-raised: #191432; --surface-sunken: #0A0817;
  --line: #2B2450; --line-strong: #6F6893; --ink: #EDEAF8; --ink-muted: #A9A3C6;
  --brand: #A58BFF; --brand-strong: #C6B6FF; --brand-soft: #2A1C5C; --on-brand: #14102A; --link: #A58BFF;
  --signal: #FF7D45; --on-signal: #14102A;
  --threat: #FF9A6E; --threat-soft: #3B1607; --contained: #56C4DC; --contained-soft: #0B2C36;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--surface); color: var(--ink);
  font-family: var(--font-sans); font-size: 16px; line-height: 26px;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: var(--space-4); top: var(--space-4); z-index: 100; background: var(--brand); color: var(--on-brand); padding: var(--space-2) var(--space-4); }

.wrap {
  width: 100%; max-width: calc(var(--max) + 48px); margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
@media (max-width: 640px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}

/* Notch: a square bite out of the top-right corner, the crook of the Cornered mark */
.notch-sm { clip-path: polygon(0 0, calc(100% - var(--notch-sm)) 0, calc(100% - var(--notch-sm)) var(--notch-sm), 100% var(--notch-sm), 100% 100%, 0 100%); }
.notch-md { clip-path: polygon(0 0, calc(100% - var(--notch-md)) 0, calc(100% - var(--notch-md)) var(--notch-md), 100% var(--notch-md), 100% 100%, 0 100%); }
.notch-lg { clip-path: polygon(0 0, calc(100% - var(--notch-lg)) 0, calc(100% - var(--notch-lg)) var(--notch-lg), 100% var(--notch-lg), 100% 100%, 0 100%); }
/* Marker: the threat square sitting in a notch-lg bite */
.marked { position: relative; min-width: 0; }
.marked::after { content: ""; position: absolute; top: 0; right: 0; width: var(--marker-lg); height: var(--marker-lg); background: var(--signal); }

/* ---------- Type ---------- */
.display-xl { font-family: var(--font-display); font-weight: 600; font-size: clamp(40px, 6vw, 64px); line-height: 1.02; letter-spacing: -0.015em; text-wrap: balance; }
.display { font-family: var(--font-display); font-weight: 600; font-size: clamp(32px, 4.4vw, 44px); line-height: 1.1; letter-spacing: -0.01em; text-wrap: balance; }
.h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(26px, 3vw, 32px); line-height: 1.2; text-wrap: balance; }
.h2 { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 28px; text-wrap: balance; }
.lead { font-size: 18px; line-height: 28px; color: var(--ink-muted); max-width: 62ch; }
.muted { color: var(--ink-muted); }
.small { font-size: 14px; line-height: 22px; }
.label { font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.eyebrow { color: var(--link); display: inline-flex; align-items: center; gap: var(--space-2); }
.eyebrow::before { content: ""; width: var(--marker-sm); height: var(--marker-sm); background: var(--brand); flex: none; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--surface); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--surface); }
.nav { display: flex; align-items: center; gap: var(--space-6); height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.brand svg { width: 28px; height: 28px; color: var(--brand); }
.brand span { font-family: var(--font-display); font-weight: 600; font-size: 24px; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.nav > nav { margin-left: auto; }
.nav-links { display: flex; align-items: center; gap: var(--space-1); }
.nav-links > li { position: relative; }
.nav-link, .nav-menu-btn {
  font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none;
  background: var(--surface); border: 0; cursor: pointer; padding: var(--space-2) var(--space-3);
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-link:hover, .nav-menu-btn:hover, .nav-menu-btn.is-active { color: var(--link); }
.nav-link[aria-current="page"] { color: var(--link); text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 2px; }
.nav-menu-btn svg { width: 10px; height: 10px; transition: transform 160ms ease-out; }
.nav-menu-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-menu {
  position: absolute; top: calc(100% + 8px); left: 0; width: 340px; background: var(--surface-raised);
  padding: var(--space-3); display: grid; gap: 2px; z-index: 70;
}
.nav-menu a { display: grid; gap: 2px; padding: var(--space-3); color: var(--ink); text-decoration: none; }
.nav-menu a:hover, .nav-menu a[aria-current="page"] { background: var(--brand-soft); }
.nav-menu a strong { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.nav-menu a span { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.nav-toggle { display: none; margin-left: auto; background: var(--surface-raised); color: var(--ink); border: 0; width: 44px; height: 44px; cursor: pointer; }
.nav-toggle svg { width: 20px; height: 20px; margin: auto; }
.theme-toggle { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0; cursor: pointer; background: var(--surface-raised); color: var(--ink); margin-left: var(--space-2); }
.theme-toggle:hover { background: var(--brand-soft); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
/* CTA visibility: these selectors are more specific than .btn so they win over its display rule */
.nav > .btn.nav-cta { margin-left: var(--space-3); }
.nav-links > li.nav-cta-item, .nav-links > li.nav-account-item { display: none; }
/* Account link: a quiet text link, not a button */
.nav-account { flex: none; font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none; padding: var(--space-2) var(--space-1); margin-left: var(--space-1); white-space: nowrap; }
.nav-account:hover, .nav-account[aria-current="page"] { color: var(--link); }
.nav-account[aria-current="page"] { text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 2px; }

.nav-link, .nav-menu-btn, .nav > .btn.nav-cta { white-space: nowrap; }
/* Mid widths: tighten the bar so the account link and primary button fit beside the nav */
@media (min-width: 1081px) and (max-width: 1279px) {
  .nav { gap: var(--space-3); }
  .nav-link, .nav-menu-btn { padding-inline: var(--space-2); font-size: 14px; }
  .nav-account { font-size: 14px; }
  .nav > .btn.nav-cta { margin-left: var(--space-1); }
}
@media (min-width: 1081px) and (max-width: 1159px) {
  .nav > .nav-account { display: none; }
}

@media (max-width: 1080px) {
  .nav-toggle { display: grid; margin-left: var(--space-2); }
  .theme-toggle { margin-left: auto; width: 44px; height: 44px; }
  .nav .nav-links, .nav > .btn.nav-cta, .nav > .nav-account { display: none; }
  .site-header.open .nav-links {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; left: 0; right: 0; top: 72px; background: var(--surface);
    padding: var(--space-2) max(16px, env(safe-area-inset-right, 0px)) var(--space-6) max(16px, env(safe-area-inset-left, 0px));
    max-height: calc(100dvh - 72px); overflow-y: auto;
  }
  .site-header.open .nav-link, .site-header.open .nav-menu-btn { width: 100%; padding: var(--space-3) 0; font-size: 17px; justify-content: space-between; }
  .site-header.open .nav-menu { position: static; width: 100%; margin-bottom: var(--space-2); }
  .site-header.open .nav-links > li.nav-cta-item, .site-header.open .nav-links > li.nav-account-item { display: block; }
  .site-header.open .nav-cta-item .btn { margin-top: var(--space-4); width: 100%; }
}

/* ---------- Buttons & tags ---------- */
.btn {
  font-family: var(--font-sans); font-size: 15px; line-height: 20px; font-weight: 600;
  height: 48px; padding: 0 var(--space-6); border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  text-decoration: none; transition: background-color 160ms ease-out, color 160ms ease-out;
  clip-path: polygon(0 0, calc(100% - var(--notch-sm)) 0, calc(100% - var(--notch-sm)) var(--notch-sm), 100% var(--notch-sm), 100% 100%, 0 100%);
}
.btn:focus-visible { clip-path: none; border-radius: var(--radius-sm); }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-strong); color: var(--on-brand); }
.btn-secondary { background: var(--brand-soft); color: var(--link); }
.btn-secondary:hover { background: var(--line); color: var(--ink); }
.btn-signal { background: var(--signal); color: var(--on-signal); }
.btn-signal:hover { background: var(--brand); color: var(--on-brand); }
.btn-ghost { background: var(--surface); color: var(--link); padding: 0 var(--space-2); clip-path: none; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.btn-ghost:hover { color: var(--ink); }
.btn-sm { height: 40px; padding: 0 var(--space-4); font-size: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

.tag {
  display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-3);
  font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--surface-sunken); color: var(--ink-muted);
  clip-path: polygon(0 0, calc(100% - var(--notch-sm)) 0, calc(100% - var(--notch-sm)) var(--notch-sm), 100% var(--notch-sm), 100% 100%, 0 100%);
}
.tag-threat { background: var(--threat-soft); color: var(--threat); }
.tag-contained { background: var(--contained-soft); color: var(--contained); }
.tag-hunting { background: var(--signal); color: var(--on-signal); }
.tag-brand { background: var(--brand-soft); color: var(--link); }
.tag-marker { width: 6px; height: 6px; background: currentColor; flex: none; }

/* ---------- Sections (one background, no dividers) ---------- */
main > section { padding-block: var(--space-20); }
main > section:first-child { padding-top: var(--space-12); }
@media (max-width: 640px) { main > section { padding-block: var(--space-12); } main > section:first-child { padding-top: var(--space-8); } }
.sec-head { display: grid; gap: var(--space-3); max-width: 760px; margin-bottom: var(--space-12); justify-items: start; }
.sec-head .lead { margin-top: var(--space-1); }

/* Hero */
/* Hero: headline across the top, lead and actions beside its foot, example band full width below */
.hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-12); row-gap: var(--space-12); align-items: end; }
.hero-head { grid-column: 1 / span 7; display: grid; gap: var(--space-6); justify-items: start; min-width: 0; }
.hero-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(44px, 7vw, 92px); line-height: 0.98; letter-spacing: -0.02em; text-wrap: balance; }
.hero-side { grid-column: 8 / -1; display: grid; gap: var(--space-6); justify-items: start; min-width: 0; position: relative; padding-top: var(--space-6); }
.hero-side::before { content: ""; position: absolute; top: 0; left: 0; width: var(--space-12); height: 4px; background: var(--brand); }
.hero-side .lead { font-size: 18px; line-height: 28px; }
.hero-note { font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.hero-band { grid-column: 1 / -1; min-width: 0; }
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-8); }
  .hero-head, .hero-side, .hero-band { grid-column: 1 / -1; }
}

/* Example panels laid out as a wide console band inside the hero */
@media (min-width: 961px) {
  .hero-band .report { padding: var(--space-8); gap: var(--space-5); }
  .hero-band .report dl { grid-template-columns: none; grid-auto-flow: column; grid-template-rows: auto auto; grid-auto-columns: minmax(0, 1fr); }
  .hero-band .report dt { padding-bottom: 2px; }
  .hero-band .report dd { text-align: left; padding-top: 0; padding-bottom: var(--space-4); font-size: 16px; line-height: 24px; }
  /* Columns alternate fill, as table rows do */
  .hero-band .report dl > :nth-child(4n+1), .hero-band .report dl > :nth-child(4n+2) { background: var(--surface-sunken); }
  .hero-band .report dl > :nth-child(4n+3), .hero-band .report dl > :nth-child(4n+4) { background: var(--brand-soft); }
  .report-incident { grid-template-columns: minmax(0, 1fr) auto; }
  .report-incident > .report-head, .report-incident > dl, .report-incident > .timeline, .report-incident > .report-foot { grid-column: 1 / -1; }
  .report-incident > .report-title { grid-column: 1; grid-row: 2; align-self: center; }
  .report-incident > .report-action { grid-column: 2; grid-row: 2; }
  .hero-band .timeline { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-band .timeline li { grid-template-columns: minmax(0, 1fr); gap: var(--space-1); padding: var(--space-3) var(--space-4); }
  .hero-band .timeline li:last-child { background: var(--brand); color: var(--on-brand); }
  .hero-band .timeline li:last-child time { color: var(--on-brand); }
}

/* Example product panel (incident, status) */
.report { background: var(--surface-raised); padding: var(--space-6); display: grid; gap: var(--space-4); min-width: 0; }
.report-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; padding-right: var(--space-6); }
.report-title { font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 26px; }
.report dl { display: grid; grid-template-columns: auto 1fr; background: var(--surface-sunken); }
.report dt, .report dd { padding: 10px var(--space-4); font-size: 14px; line-height: 20px; min-width: 0; }
.report dt { color: var(--ink-muted); }
.report dd { font-family: var(--font-mono); text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.report dl > :nth-child(4n+3), .report dl > :nth-child(4n+4) { background: var(--surface-raised); }
@media (max-width: 520px) {
  .report { padding: var(--space-5) var(--space-4); }
  .report dl { grid-template-columns: minmax(0, 1fr); }
  .report dt { padding-bottom: 0; font-size: 13px; }
  .report dd { text-align: left; padding-top: 2px; }
}
.timeline { display: grid; gap: 2px; }
.timeline li { display: grid; grid-template-columns: 4.2em minmax(0, 1fr); gap: var(--space-3); padding: 8px var(--space-3); background: var(--surface-sunken); font-size: 13px; line-height: 19px; }
.timeline li:nth-child(even) { background: var(--surface); }
.timeline time { font-family: var(--font-mono); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.timeline code { font-family: var(--font-mono); font-size: 12px; }
.report-action { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; background: var(--brand-soft); padding: var(--space-3) var(--space-4); font-size: 14px; line-height: 20px; }
.report-action strong { color: var(--ink); }
.report-foot { font-size: 13px; line-height: 18px; color: var(--ink-muted); }

/* Grids & cards */
.grid { display: grid; gap: var(--space-6); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface-raised); padding: var(--space-8) var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.card p { color: var(--ink-muted); }
.card-sunken { background: var(--surface-sunken); }
.card ul.ticks { margin-top: var(--space-2); }
.card-link { text-decoration: none; color: inherit; transition: background-color 160ms ease-out; }
.card-link:hover { background: var(--brand-soft); color: inherit; }
.card-link:focus-visible { clip-path: none; }
.card-link .more { margin-top: auto; padding-top: var(--space-3); font-weight: 600; color: var(--link); }

.ticks { display: grid; gap: var(--space-2); }
.ticks li { position: relative; padding-left: 22px; color: var(--ink-muted); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 9px; width: var(--marker-sm); height: var(--marker-sm); background: var(--brand); }
.panel-brand .ticks li, .plan-featured .ticks li { color: var(--on-brand); }
.panel-brand .ticks li::before, .plan-featured .ticks li::before { background: var(--on-brand); }

/* Metrics */
.metric { background: var(--surface-raised); padding: var(--space-6); display: grid; gap: var(--space-2); align-content: start; min-width: 0; }
.metric-value { font-family: var(--font-display); font-weight: 500; font-size: 48px; line-height: 48px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.metric-value small { font-size: 22px; color: var(--ink-muted); margin-left: 4px; }
.metric .label { color: var(--ink-muted); }
.metric p { font-size: 14px; line-height: 22px; color: var(--ink-muted); }

/* Split */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-12); align-items: center; }
.split.flip > :first-child { order: 2; }
.split-copy { display: grid; gap: var(--space-4); min-width: 0; justify-items: start; }
.split-copy .ticks { margin-top: var(--space-2); }
.split-copy .btn-row { margin-top: var(--space-3); }
@media (max-width: 960px) { .split { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); } .split.flip > :first-child { order: 0; } }
.panel { background: var(--surface-raised); padding: var(--space-8); display: grid; gap: var(--space-4); min-width: 0; justify-items: start; }
.panel-sunken { background: var(--surface-sunken); }
.panel-brand { background: var(--brand); color: var(--on-brand); }
.panel-brand .label { color: var(--on-brand); }
.flow { display: grid; gap: 2px; width: 100%; }
.flow li { display: grid; grid-template-columns: 2.4em minmax(0, 1fr); gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--surface-raised); align-items: baseline; }
.flow li span { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }
.flow li.hit { background: var(--signal); color: var(--on-signal); }
.flow li.hit span { color: var(--on-signal); }

/* Steps (real sequences only) */
.steps { counter-reset: step; }
.step { background: var(--surface-raised); padding: var(--space-8) var(--space-6); display: grid; gap: var(--space-3); align-content: start; counter-increment: step; min-width: 0; }
.step::before {
  content: counter(step, decimal-leading-zero); font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: 0.08em;
  color: var(--on-brand); background: var(--brand); width: 40px; height: 28px; display: grid; place-items: center;
  clip-path: polygon(0 0, calc(100% - var(--notch-sm)) 0, calc(100% - var(--notch-sm)) var(--notch-sm), 100% var(--notch-sm), 100% 100%, 0 100%);
}
.step p { color: var(--ink-muted); }
.step .label { color: var(--link); }

/* Loop diagram */
.loop { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-3); }
.loop-item { background: var(--surface-raised); padding: var(--space-6) var(--space-4); display: grid; gap: var(--space-2); align-content: start; text-decoration: none; color: var(--ink); min-width: 0; transition: background-color 160ms ease-out; }
.loop-item:hover, .loop-item.is-active { background: var(--brand-soft); color: var(--ink); }
.loop-item:focus-visible { clip-path: none; }
.loop-item .label { color: var(--link); }
.loop-item strong { font-family: var(--font-display); font-size: 22px; line-height: 26px; font-weight: 600; }
.loop-item p { font-size: 14px; line-height: 21px; color: var(--ink-muted); }
.loop-return { margin-top: var(--space-3); background: var(--brand); color: var(--on-brand); padding: var(--space-3) var(--space-6); display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; font-size: 14px; line-height: 20px; }
.loop-return .label { color: var(--on-brand); }
@media (max-width: 1024px) { .loop { grid-template-columns: repeat(2, minmax(0, 1fr)); } .loop-item:last-child { grid-column: span 2; } }
@media (max-width: 560px) { .loop { grid-template-columns: minmax(0, 1fr); } .loop-item:last-child { grid-column: auto; } }

/* Tables: rows separate by alternating fills, never by lines */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 15px; line-height: 22px; }
caption { text-align: left; padding-bottom: var(--space-3); color: var(--ink-muted); }
th, td { text-align: left; padding: 14px var(--space-4); vertical-align: top; }
thead th { background: var(--brand); color: var(--on-brand); font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
tbody tr { background: var(--surface-raised); }
tbody tr:nth-child(even) { background: var(--surface-sunken); }
tbody th { font-weight: 600; }
td { color: var(--ink-muted); }
.yes { color: var(--contained); font-weight: 600; }
.no { color: var(--ink-muted); }

/* Code */
.code { background: var(--surface-sunken); padding: var(--space-6); font-family: var(--font-mono); font-size: 14px; line-height: 22px; min-width: 0; width: 100%; }
.code pre { margin: 0; white-space: pre; overflow-x: auto; }
.code .c { color: var(--ink-muted); }
.code .k { color: var(--link); }
.code .s { color: var(--contained); }
.code-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.copy-btn { font: inherit; font-family: var(--font-sans); font-size: 13px; font-weight: 600; background: var(--surface-raised); color: var(--ink); border: 0; padding: 6px 12px; cursor: pointer; }
.copy-btn:hover { background: var(--brand-soft); }

/* FAQ */
.faq { display: grid; gap: var(--space-2); max-width: 880px; }
.faq details { background: var(--surface-raised); }
.faq summary { cursor: pointer; list-style: none; padding: var(--space-6); display: flex; justify-content: space-between; gap: var(--space-4); font-family: var(--font-display); font-weight: 600; font-size: 19px; line-height: 26px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--link); font-size: 22px; flex: none; }
.faq details[open] summary::after { content: "\2013"; }
.faq details > div { padding: 0 var(--space-6) var(--space-6); color: var(--ink-muted); max-width: 70ch; }

/* CTA */
.cta { background: var(--brand); color: var(--on-brand); padding: var(--space-12) var(--space-8); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-8); align-items: center; }
.cta p { color: var(--on-brand); max-width: 60ch; margin-top: var(--space-3); }
.cta .btn-primary { background: var(--on-brand); color: var(--brand-strong); }
.cta .btn-primary:hover { background: var(--signal); color: var(--on-signal); }
.cta .btn-ghost { background: var(--brand); color: var(--on-brand); }
@media (max-width: 800px) { .cta { grid-template-columns: minmax(0, 1fr); padding: var(--space-8) var(--space-6); } }

/* Filters & chips */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-6); }
.chip { font: inherit; font-size: 14px; font-weight: 600; background: var(--surface-raised); color: var(--ink); border: 0; padding: 8px 14px; cursor: pointer; clip-path: polygon(0 0, calc(100% - var(--notch-sm)) 0, calc(100% - var(--notch-sm)) var(--notch-sm), 100% var(--notch-sm), 100% 100%, 0 100%); }
.chip:hover { background: var(--brand-soft); }
.chip[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.chip:focus-visible { clip-path: none; }
.count-note { font-size: 14px; color: var(--ink-muted); margin-bottom: var(--space-4); }
.tech-id { font-family: var(--font-mono); font-size: 13px; color: var(--link); }

/* Forms (the only bordered elements) */
.form { display: grid; gap: var(--space-4); background: var(--surface-raised); padding: var(--space-8); min-width: 0; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
@media (max-width: 640px) { .form-row { grid-template-columns: minmax(0, 1fr); } .form { padding: var(--space-6); } }
.field { display: grid; gap: var(--space-2); min-width: 0; }
.field label { font-size: 14px; line-height: 20px; font-weight: 600; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 16px; width: 100%; min-height: 48px; padding: 10px var(--space-3);
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.field .hint { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--threat); }
.field.invalid .hint { color: var(--threat); }
.check { display: flex; gap: var(--space-3); align-items: flex-start; font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--brand); flex: none; }
.check.invalid { color: var(--threat); }
.form-status { padding: var(--space-4); background: var(--contained-soft); color: var(--contained); font-weight: 600; }
.form-status.err { background: var(--threat-soft); color: var(--threat); }

/* Estimator */
.estimator { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-6); }
@media (max-width: 900px) { .estimator { grid-template-columns: minmax(0, 1fr); } }
.range-field { display: grid; gap: var(--space-2); }
.range-field .range-top { display: flex; justify-content: space-between; gap: var(--space-3); font-size: 14px; font-weight: 600; }
.range-field output { font-family: var(--font-mono); color: var(--link); }
.range-field input[type="range"] { width: 100%; accent-color: var(--brand); }
.est-out { background: var(--brand); color: var(--on-brand); padding: var(--space-8); display: grid; gap: var(--space-4); align-content: start; min-width: 0; }
.est-out .label { color: var(--on-brand); }
.est-big { font-family: var(--font-display); font-size: clamp(40px, 6vw, 56px); line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.est-out dl { display: grid; grid-template-columns: 1fr auto; gap: var(--space-2) var(--space-4); font-size: 14px; }
.est-out dd { font-family: var(--font-mono); text-align: right; }
.est-out .btn { justify-self: start; background: var(--on-brand); color: var(--brand-strong); }

/* Plans */
.plan { background: var(--surface-raised); padding: var(--space-8) var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; align-items: flex-start; }
.plan-featured { background: var(--brand); color: var(--on-brand); }
.plan-featured p, .plan-featured .label { color: var(--on-brand); }
.plan-featured .btn-primary { background: var(--on-brand); color: var(--brand-strong); }
.plan-price { font-family: var(--font-display); font-weight: 600; font-size: 28px; line-height: 32px; }
.plan .btn { margin-top: auto; }

/* Stack strip */
.stack { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); }
.stack-item { background: var(--surface-raised); padding: var(--space-4) var(--space-6); display: grid; gap: 2px; min-width: 0; }
.stack-item strong { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.stack-item span { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
@media (max-width: 1024px) { .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .stack { grid-template-columns: minmax(0, 1fr); } }

/* Autonomy levels */
.levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.level { background: var(--surface-raised); padding: var(--space-6); display: grid; gap: var(--space-3); align-content: start; min-width: 0; }
.level p { color: var(--ink-muted); }
.level-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.level-bar i { height: 8px; background: var(--surface-sunken); }
.level-bar i.on { background: var(--brand); }
@media (max-width: 800px) { .levels { grid-template-columns: minmax(0, 1fr); } }

/* Roles */
.roles { display: grid; gap: var(--space-2); }
.role { background: var(--surface-raised); padding: var(--space-6); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-4); align-items: center; }
.role p { color: var(--ink-muted); font-size: 15px; }
@media (max-width: 640px) { .role { grid-template-columns: minmax(0, 1fr); justify-items: start; } }

/* Contact details */
.contact-list { display: grid; gap: var(--space-4); }
.contact-list div { display: grid; gap: 2px; }
.contact-list .label { color: var(--ink-muted); }
.contact-list .val { font-family: var(--font-mono); font-size: 16px; user-select: all; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.site-footer { padding-block: var(--space-20) var(--space-12); }
.foot { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: var(--space-8); }
.foot-brand { display: grid; gap: var(--space-4); align-content: start; justify-items: start; }
.foot-brand p { color: var(--ink-muted); font-size: 15px; max-width: 34ch; }
.foot h2 { font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--space-4); }
.foot ul { display: grid; gap: var(--space-2); }
.foot a { color: var(--ink); text-decoration: none; font-size: 15px; }
.foot a:hover { color: var(--link); text-decoration: underline; }
.foot-base { margin-top: var(--space-12); display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; font-size: 14px; color: var(--ink-muted); }
@media (max-width: 960px) { .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-brand { grid-column: 1 / -1; } }

/* Utilities */
.mt-8 { margin-top: var(--space-8); }
[hidden] { display: none !important; }

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