/* Avvanz — ledger / financial instrument. Single stylesheet for all pages. */

:root {
  --bg: #F6F6F1;
  --paper: #FCFCF8;
  --ink: #022F40;
  --ink-2: #063A4E;
  --orange: #F39404;
  --orange-hover: #F7A834;
  --orange-active: #DE8603;
  --teal: #02465F;   /* logo teal: accents and indices */
  --green: #1E5B33;  /* money gained only */
  --red: #B42318;
  --muted: #3E5058;
  --rule-soft: #CFD7D9;
  --on-dark: #F6F6F1;
  --on-dark-muted: #A9BCC4;
  --rule-dark: #1D4F63;

  --font-sans: "Archivo", "Helvetica Neue", Helvetica, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
  --fs-xl: clamp(1.75rem, 1.2rem + 2vw, 2.9rem);
  --fs-2xl: clamp(2.1rem, 1.2rem + 4.2vw, 4.4rem);
  --fs-num: clamp(2.5rem, 1.6rem + 3.5vw, 4rem);

  --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: 4.5rem;
  --s-section: clamp(3.5rem, 2rem + 6vw, 7rem);

  --r: 2px;
  --r-lg: 4px;
  --w: 1200px;
  --pad: clamp(1rem, 4vw, 2rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t: 180ms;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-stretch: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 800;
  font-stretch: 120%;
  line-height: 1.05;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); font-stretch: 112%; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }
th { font-weight: 600; text-align: left; }

.mono, .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-stretch: 100%;
  letter-spacing: 0;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: var(--r);
}
.on-dark :focus-visible,
.band-dark :focus-visible { outline-color: var(--orange); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--s-4);
  top: -4rem;
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--orange);
  color: var(--ink);
  border: 1px solid var(--ink);
  font-weight: 700;
  transition: top var(--t) var(--ease);
}
.skip:focus { top: var(--s-3); }

.wrap {
  width: 100%;
  max-width: var(--w);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* Reveal on scroll: hidden only when JS is running and motion is allowed */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal]:not(.is-in) {
    opacity: 0;
    transform: translateY(14px);
  }
  html.js [data-reveal] {
    transition: opacity 320ms var(--ease), transform 320ms var(--ease);
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: 0.7rem 1.25rem;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  font-stretch: 105%;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease), transform var(--t) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--orange { background: var(--orange); }
.btn--orange:hover { background: var(--orange-hover); }
.btn--orange:active { background: var(--orange-active); }
.btn--ink { background: var(--ink); color: var(--orange); }
.btn--ink:hover { background: var(--ink-2); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn--sm { min-height: 44px; padding: 0.55rem 1rem; font-size: var(--fs-sm); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--ink);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-3);
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  text-decoration: none;
}
.brand-logo { display: block; width: auto; height: 30px; }
.site-footer .brand-logo { height: 38px; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: 0 var(--s-3);
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: var(--bg);
  font-weight: 700;
  font-size: var(--fs-sm);
  cursor: pointer;
}
html.js .nav-toggle { display: inline-flex; }
.nav-toggle-bars,
.nav-toggle-bars::before {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  transition: transform var(--t) var(--ease);
}
.nav-toggle-bars { position: relative; margin-top: -6px; }
.nav-toggle-bars::before { content: ""; position: absolute; top: 6px; left: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { transform: translateY(3px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(-6px) rotate(-90deg); top: 6px; }

.nav { flex-basis: 100%; padding-bottom: var(--s-4); }
html.js .nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-basis: auto;
  padding: var(--s-3) var(--pad) var(--s-5);
  background: var(--bg);
  border-bottom: 1px solid var(--ink);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}
html.js .nav.is-open { display: block; }
.nav-list a {
  display: flex;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid var(--rule-soft);
  font-weight: 600;
  text-decoration: none;
}
.nav-list a:hover { text-decoration: underline; }
.nav-cta { margin-top: var(--s-4); width: 100%; }

@media (min-width: 62rem) {
  .header-inner { flex-wrap: nowrap; }
  html.js .nav-toggle { display: none; }
  .nav,
  html.js .nav,
  html.js .nav.is-open {
    display: flex;
    align-items: center;
    gap: var(--s-6);
    position: static;
    flex-basis: auto;
    padding: 0;
    border: 0;
    max-height: none;
    overflow: visible;
    background: transparent;
  }
  .nav-list { display: flex; gap: var(--s-5); }
  .nav-list a { min-height: 44px; border: 0; font-size: var(--fs-sm); }
  .nav-cta { margin: 0; width: auto; }
}

/* ---------- Shared section scaffolding ---------- */
.section { padding-block: var(--s-section); }
.section + .section { border-top: 1px solid var(--ink); }
.section-head { max-width: 46rem; margin-bottom: var(--s-7); }
.section-head p { margin-top: var(--s-4); font-size: var(--fs-md); color: var(--muted); max-width: 40rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--orange);
  border: 1px solid var(--ink);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.5;
}
.chip svg { width: 14px; height: 14px; }
.chip--ok { background: var(--orange); }

/* ---------- Hero ---------- */
.hero { padding-block: var(--s-7) var(--s-section); }
.hero-grid { display: grid; gap: var(--s-7); align-items: start; }
.hero h1 { max-width: 14ch; font-size: clamp(2.1rem, 1rem + 3.2vw, 3.7rem); }
.lede { margin-top: var(--s-5); max-width: 34rem; font-size: var(--fs-md); color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.cta-row .btn { flex: 1 1 11rem; }

.facts { margin: var(--s-7) 0 0; border-top: 1px solid var(--ink); }
.facts > div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: var(--s-3);
  align-items: baseline;
  padding-block: var(--s-3);
  border-bottom: 1px solid var(--rule-soft);
}
.facts dt { font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
.facts dd { margin: 0; font-size: var(--fs-sm); color: var(--muted); }

@media (min-width: 62rem) {
  .hero { padding-top: var(--s-8); }
  .hero-grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: var(--s-8); }
  .cta-row .btn { flex: 0 0 auto; }
}

/* ---------- Statement mockup ---------- */
.stmt {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: 5px 5px 0 var(--ink);
  font-size: var(--fs-sm);
}
.stmt-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-4);
  border-bottom: 1px solid var(--ink);
}
.stmt-kicker { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stmt-name { font-weight: 800; font-stretch: 112%; font-size: var(--fs-md); line-height: 1.2; }
.stmt-role { color: var(--muted); font-size: var(--fs-xs); }
.stmt-period { text-align: right; }
.stmt-period .mono { font-weight: 500; }
.stmt-period .chip { margin-top: var(--s-2); }

.stmt-attain { padding: var(--s-4); border-bottom: 1px solid var(--ink); }
.stmt-attain-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.stmt-attain-top .num { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.meter {
  position: relative;
  height: 16px;
  margin-top: var(--s-3);
  background: var(--bg);
  border: 1px solid var(--ink);
}
.meter-fill { display: block; height: 100%; background: var(--orange); border-right: 1px solid var(--ink); }
.meter-fill--stmt { width: 74.67%; }
.meter-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.meter-mark--stmt { left: 66.67%; }
.meter-scale {
  display: flex;
  justify-content: space-between;
  margin-top: var(--s-2);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted);
}

.tiers th, .tiers td, .lines th, .lines td { padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.tiers td:last-child, .lines td:last-child { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tiers { border-bottom: 1px solid var(--ink); }
.tiers th { font-weight: 500; }
.tiers .is-current th { font-weight: 700; }
.tiers .you { margin-left: var(--s-2); padding: 0.05rem 0.4rem; background: var(--orange); border: 1px solid var(--ink); font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; white-space: nowrap; }

.lines thead th { font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.lines thead th:not(:first-child) { text-align: right; }
.lines td:nth-child(2) { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.lines .sub { display: block; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.lines .is-plus td:last-child { color: var(--green); font-weight: 700; }
.lines .is-minus th, .lines .is-minus td:last-child { color: var(--red); }
.lines .is-minus td:last-child { font-weight: 700; }
.lines tr:last-child th, .lines tr:last-child td { border-bottom: 0; }

.stmt-total {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-4);
  border-top: 1px solid var(--ink);
  background: var(--bg);
}
.stmt-total .num { display: block; font-size: var(--fs-num); font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
@media (min-width: 48rem) {
  .tiers th, .tiers td, .lines th, .lines td { padding-inline: var(--s-4); }
}
.stmt-note { padding: var(--s-3) var(--s-4); border-top: 1px solid var(--rule-soft); font-size: var(--fs-xs); color: var(--muted); }

/* ---------- Ledger comparison (#how) ---------- */
.ledger-note { margin-top: var(--s-4); font-size: var(--fs-sm); color: var(--muted); max-width: 46rem; }
.scroll-x {
  position: relative;
  overflow-x: auto;
  border: 1px solid var(--ink);
  background: var(--paper);
  -webkit-overflow-scrolling: touch;
}
.scroll-x:focus-visible { outline-offset: 2px; }
.scroll-hint {
  display: none;
  margin-top: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.ledger { min-width: 640px; }
.ledger th, .ledger td { padding: var(--s-4); border-bottom: 1px solid var(--rule-soft); vertical-align: top; text-align: left; }
.ledger thead th {
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ledger thead th.is-new { background: var(--orange); }
.ledger tbody th { font-weight: 700; width: 28%; }
.ledger tbody td.is-new { background: #FEEFD6; }
.ledger .dur { display: block; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--fs-lg); font-weight: 700; line-height: 1.1; }
.ledger .dur-old { color: var(--red); }
.ledger .dur-new { color: var(--green); }
.ledger td small { display: block; margin-top: var(--s-1); font-size: var(--fs-sm); color: var(--muted); line-height: 1.45; }
.ledger tfoot th, .ledger tfoot td { border-top: 1px solid var(--ink); border-bottom: 0; background: var(--bg); }
@media (max-width: 47.99rem) {
  .scroll-hint { display: block; }
}

/* ---------- Calculator (dark band) ---------- */
.band-dark { background: var(--ink); color: var(--on-dark); border-top: 1px solid var(--ink); }
.band-dark .section-head p { color: var(--on-dark-muted); }
.band-dark .eyebrow::before { border-color: var(--orange); }
.calc { display: grid; gap: var(--s-6); }
.calc-panel { border: 1px solid var(--rule-dark); background: var(--ink-2); border-radius: var(--r-lg); }
.calc-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--rule-dark);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}
.tag-example { padding: 0.1rem 0.5rem; background: var(--orange); color: var(--ink); border-radius: var(--r); font-weight: 700; }
.calc-form { padding: var(--s-5); display: grid; gap: var(--s-5); border: 0; margin: 0; min-width: 0; }
.plan-rule { margin: 0; padding: var(--s-4); border: 1px solid var(--rule-dark); font-family: var(--font-mono); font-size: var(--fs-sm); line-height: 1.7; color: var(--on-dark-muted); }
.plan-rule b { color: var(--orange); font-weight: 500; }

.field-dark label { display: block; margin-bottom: var(--s-2); font-weight: 600; font-size: var(--fs-sm); }
.money { position: relative; }
.money::before {
  content: "$";
  position: absolute;
  left: var(--s-4);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  color: var(--on-dark-muted);
  pointer-events: none;
}
.money input {
  width: 100%;
  min-height: 52px;
  padding: 0.6rem var(--s-4) 0.6rem 2rem;
  background: var(--ink);
  border: 1px solid var(--on-dark-muted);
  border-radius: var(--r);
  color: var(--on-dark);
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  font-variant-numeric: tabular-nums;
}
.money input:hover { border-color: var(--on-dark); }
.money input:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.money input[aria-invalid="true"] { border-color: #FF8A80; }
.hint { margin-top: var(--s-2); font-size: var(--fs-xs); color: var(--on-dark-muted); }
.hint.is-error { color: #FFB4AB; }

.range-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.range-row output { font-family: var(--font-mono); font-size: var(--fs-lg); font-weight: 700; color: var(--orange); font-variant-numeric: tabular-nums; }
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  margin: var(--s-2) 0 0;
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track { height: 6px; background: var(--rule-dark); border: 1px solid var(--on-dark-muted); border-radius: 0; }
input[type="range"]::-moz-range-track { height: 6px; background: var(--rule-dark); border: 1px solid var(--on-dark-muted); border-radius: 0; }
input[type="range"]::-moz-range-progress { height: 6px; background: var(--orange); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 30px;
  margin-top: -13px;
  background: var(--orange);
  border: 2px solid var(--ink);
  outline: 1px solid var(--orange);
  border-radius: var(--r);
}
input[type="range"]::-moz-range-thumb { width: 18px; height: 28px; background: var(--orange); border: 2px solid var(--ink); outline: 1px solid var(--orange); border-radius: var(--r); }
input[type="range"]:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.range-scale { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--on-dark-muted); }

.calc-out { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-5); }
.formula { display: grid; border: 1px solid var(--rule-dark); }
.formula li {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-1);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--rule-dark);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-sm);
}
.formula li:last-child { border-bottom: 0; }
.formula .f-label { font-family: var(--font-sans); font-size: var(--fs-xs); color: var(--on-dark-muted); letter-spacing: 0.04em; }
.formula .f-expr { overflow-wrap: anywhere; }
.formula .f-expr .eq { color: var(--orange); font-weight: 700; }
.formula li.is-muted .f-expr { color: var(--on-dark-muted); }
.calc-total { padding-top: var(--s-4); border-top: 1px solid var(--orange); }
.calc-total-label { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-muted); }
.calc-total-num { display: block; margin-top: var(--s-2); font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: clamp(2.5rem, 1.5rem + 5vw, 4.5rem); font-weight: 700; line-height: 1; color: var(--orange); letter-spacing: -0.04em; overflow-wrap: anywhere; }
.calc-total-meta { margin-top: var(--s-3); font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--on-dark-muted); font-variant-numeric: tabular-nums; }
.calc-foot { font-size: var(--fs-xs); color: var(--on-dark-muted); }

@media (min-width: 48rem) {
  .formula li { grid-template-columns: 11rem 1fr; align-items: baseline; gap: var(--s-4); }
}
@media (min-width: 62rem) {
  .calc { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s-7); align-items: start; }
}

/* ---------- Product spec list ---------- */
.spec { border-top: 1px solid var(--ink); }
.spec-row {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: var(--s-2) var(--s-4);
  padding-block: var(--s-5);
  border-bottom: 1px solid var(--ink);
}
.spec-idx { font-family: var(--font-mono); font-size: var(--fs-md); font-weight: 700; color: var(--teal); font-variant-numeric: tabular-nums; line-height: 1.5; }
.spec-row h3, .spec-row p { grid-column: 2; }
.spec-row p { margin-top: var(--s-2); color: var(--muted); max-width: 38rem; }
.spec-tag { grid-column: 2; margin-top: var(--s-2); font-family: var(--font-mono); font-size: var(--fs-xs); }
@media (min-width: 48rem) {
  .spec-row { grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 1.3fr); padding-block: var(--s-6); }
  .spec-row p { grid-column: 3; margin-top: 0; }
  .spec-tag { grid-column: 2 / -1; }
}
@media (min-width: 62rem) {
  .spec-row { grid-template-columns: 5rem minmax(0, 0.9fr) minmax(0, 1.1fr) 11rem; align-items: baseline; }
  .spec-tag { grid-column: 4; margin-top: 0; text-align: right; }
}

/* ---------- Teams ---------- */
.teams { display: grid; border: 1px solid var(--ink); background: var(--paper); }
.team { padding: var(--s-6) var(--s-5); border-bottom: 1px solid var(--ink); }
.team:last-child { border-bottom: 0; }
.team-role { margin-bottom: var(--s-3); font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); }
.team h3 { margin-bottom: var(--s-4); }
.ticks li { position: relative; padding: var(--s-2) 0 var(--s-2) 1.75rem; border-top: 1px solid var(--rule-soft); font-size: var(--fs-sm); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.9rem; width: 10px; height: 6px; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); }
@media (min-width: 62rem) {
  .teams { grid-template-columns: repeat(3, 1fr); }
  .team { border-bottom: 0; border-right: 1px solid var(--ink); }
  .team:last-child { border-right: 0; }
}

/* ---------- Works with ---------- */
.works { border-top: 1px solid var(--ink); }
.works-row { display: grid; gap: var(--s-3); padding-block: var(--s-5); border-bottom: 1px solid var(--ink); }
.works-label { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tag { padding: 0.45rem 0.9rem; border: 1px solid var(--ink); border-radius: var(--r); background: var(--paper); font-weight: 600; font-stretch: 105%; }
.works-note { margin-top: var(--s-4); max-width: 44rem; font-size: var(--fs-sm); color: var(--muted); }
@media (min-width: 48rem) {
  .works-row { grid-template-columns: 12rem 1fr; align-items: center; }
}

/* ---------- Security ---------- */
.sec { display: grid; gap: var(--s-6); }
.sec-list { border-top: 1px solid var(--ink); }
.sec-list li { display: grid; grid-template-columns: 3rem 1fr; gap: var(--s-4); padding-block: var(--s-4); border-bottom: 1px solid var(--rule-soft); }
.sec-list .mono { font-size: var(--fs-sm); font-weight: 700; color: var(--teal); line-height: 1.8; }
.sec-list strong { display: block; font-weight: 700; }
.sec-list .d { display: block; font-size: var(--fs-sm); color: var(--muted); }
.sec-note { margin-top: var(--s-5); padding: var(--s-4); border: 1px solid var(--ink); background: var(--paper); font-size: var(--fs-sm); color: var(--muted); }
@media (min-width: 62rem) {
  .sec { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--s-8); }
}

/* ---------- Pricing ---------- */
.price-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); margin-bottom: var(--s-6); }
.switch-wrap { display: none; align-items: center; gap: var(--s-3); }
html.js .switch-wrap { display: inline-flex; }
.switch-label { font-weight: 600; }
.switch { position: relative; width: 56px; height: 44px; padding: 0; background: transparent; border: 0; cursor: pointer; }
.switch::before { content: ""; position: absolute; inset: 8px 0; background: var(--paper); border: 1px solid var(--ink); border-radius: var(--r); transition: background-color var(--t) var(--ease); }
.switch::after { content: ""; position: absolute; top: 12px; left: 4px; width: 20px; height: 20px; background: var(--ink); border-radius: 1px; transition: transform var(--t) var(--ease); }
.switch[aria-checked="true"]::before { background: var(--orange); }
.switch[aria-checked="true"]::after { transform: translateX(28px); }
.save-chip { padding: 0.15rem 0.5rem; background: var(--orange); border: 1px solid var(--ink); border-radius: var(--r); font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; }

.plans { display: grid; border: 1px solid var(--ink); background: var(--paper); }
.plan { position: relative; display: flex; flex-direction: column; padding: var(--s-6) var(--s-5); border-bottom: 1px solid var(--ink); }
.plan:last-child { border-bottom: 0; }
.plan--featured { background: var(--bg); }
.plan--featured::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--orange); border-bottom: 1px solid var(--ink); }
.plan-name { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); font-weight: 800; font-stretch: 118%; font-size: var(--fs-lg); }
.plan-for { margin-top: var(--s-2); font-size: var(--fs-sm); color: var(--muted); }
.plan-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-5); }
.plan-price .num { font-size: var(--fs-num); font-weight: 700; line-height: 1; letter-spacing: -0.04em; }
.plan-price .per { font-size: var(--fs-sm); color: var(--muted); }
.plan-billing { margin-top: var(--s-2); min-height: 1.6em; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); }
.plan .ticks { margin: var(--s-5) 0; flex: 1; }
.plan .btn { width: 100%; }
.price-foot { margin-top: var(--s-4); max-width: 46rem; font-size: var(--fs-sm); color: var(--muted); }
@media (min-width: 62rem) {
  .plans { grid-template-columns: repeat(3, 1fr); }
  .plan { border-bottom: 0; border-right: 1px solid var(--ink); }
  .plan:last-child { border-right: 0; }
}

/* ---------- FAQ ---------- */
.faq { max-width: 56rem; border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--ink); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 64px; padding-block: var(--s-4); font-weight: 700; font-stretch: 108%; font-size: var(--fs-md); line-height: 1.3; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--paper); }
.faq-mark { position: relative; flex: none; width: 28px; height: 28px; border: 1px solid var(--ink); border-radius: var(--r); }
.faq-mark::before, .faq-mark::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; background: var(--ink); transform: translate(-50%, -50%); transition: transform var(--t) var(--ease); }
.faq-mark::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq details[open] .faq-mark { background: var(--orange); }
.faq details[open] .faq-mark::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-body { max-width: 46rem; padding: 0 var(--s-6) var(--s-5) 0; color: var(--muted); }
.faq-body p + p { margin-top: var(--s-3); }

/* ---------- Demo form ---------- */
.demo { display: grid; gap: var(--s-7); }
.demo-steps { margin-top: var(--s-6); border-top: 1px solid var(--ink); }
.demo-steps li { display: grid; grid-template-columns: 3rem 1fr; gap: var(--s-3); padding-block: var(--s-3); border-bottom: 1px solid var(--rule-soft); font-size: var(--fs-sm); }
.demo-steps .mono { font-weight: 700; color: var(--teal); }
.form { display: grid; gap: var(--s-5); padding: var(--s-5); background: var(--paper); border: 1px solid var(--ink); border-radius: var(--r-lg); box-shadow: 5px 5px 0 var(--ink); }
.field label { display: block; margin-bottom: var(--s-2); font-weight: 600; font-size: var(--fs-sm); }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 0.65rem var(--s-3); background: var(--bg); border: 1px solid var(--ink); border-radius: var(--r); transition: background-color var(--t) var(--ease); }
.field textarea { min-height: 120px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { background: #fff; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; background: #fff; }
.field [aria-invalid="true"] { border-color: var(--red); border-width: 2px; }
.field-error { margin-top: var(--s-2); color: var(--red); font-size: var(--fs-sm); font-weight: 600; }
.field-error:empty { display: none; }
.field-row { display: grid; gap: var(--s-5); }
.form-note { font-size: var(--fs-xs); color: var(--muted); }
.form-status { padding: var(--s-4); background: var(--orange); border: 1px solid var(--ink); font-size: var(--fs-sm); font-weight: 600; }
.form-status:empty { display: none; }
@media (min-width: 40rem) {
  .field-row { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 62rem) {
  .demo { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--s-8); align-items: start; }
  .form { padding: var(--s-6); }
}

/* ---------- Footer ---------- */
.site-footer { padding-block: var(--s-7) var(--s-6); background: var(--ink); color: var(--on-dark); }
.site-footer a { color: var(--on-dark); }
.site-footer :focus-visible { outline-color: var(--orange); }
.footer-grid { display: grid; gap: var(--s-6); }
.footer-brand p { max-width: 24rem; margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--on-dark-muted); }
.footer-col h2 { margin-bottom: var(--s-2); font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; font-stretch: 100%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-muted); }
.footer-col a { display: flex; align-items: center; min-height: 44px; font-size: var(--fs-sm); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--rule-dark); font-size: var(--fs-xs); color: var(--on-dark-muted); }
@media (min-width: 48rem) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

/* ---------- Legal + 404 ---------- */
.legal { padding-block: var(--s-7) var(--s-section); }
.legal-inner { max-width: 70ch; }
.legal h1 { font-size: var(--fs-xl); }
.legal .updated { margin-top: var(--s-3); font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--muted); }
.legal h2 { margin-top: var(--s-7); padding-top: var(--s-4); border-top: 1px solid var(--ink); font-size: var(--fs-lg); font-stretch: 112%; }
.legal p, .legal li { margin-top: var(--s-3); }
.legal ul { padding-left: 1.25rem; list-style: disc; }
.legal li::marker { color: var(--teal); }
.legal a { font-weight: 600; }

.nf { display: grid; align-items: center; min-height: 60vh; padding-block: var(--s-8); }
.nf-code { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: clamp(5rem, 3rem + 14vw, 12rem); font-weight: 700; line-height: 0.9; letter-spacing: -0.06em; }
.nf-code span { padding-inline: 0.05em; background: var(--orange); }
.nf h1 { margin-top: var(--s-5); font-size: var(--fs-xl); }
.nf p { max-width: 32rem; margin-top: var(--s-4); color: var(--muted); }
.nf .cta-row .btn { flex: 0 0 auto; }
