/* OviStack design system
   Palette: ink #06070d, navy #0b1124, panel #111a33, line #1f2a4a, text #e9ecf5, muted #9ba5c2,
            violet #8a6bff (accent/text) / #6c47ff (button), teal #22d3c5, amber #f5b94a, red #ff7a7a
   Type:    Instrument Serif (display), Geist (UI/body), Geist Mono (prices + technical data only) */

@font-face { font-family: "Geist"; src: url("../fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --ink: #06070d;
  --navy: #0b1124;
  --panel: #111a33;
  --panel-2: #16203d;
  --line: #1f2a4a;
  --line-2: #2c3860;
  --text: #e9ecf5;
  --muted: #9ba5c2;
  --dim: #7d88a8;
  --violet: #8a6bff;
  --violet-btn: #6c47ff;
  --violet-btn-hover: #7d5cff;
  --teal: #22d3c5;
  --amber: #f5b94a;
  --red: #ff7a7a;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --sec: clamp(64px, 9vw, 120px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--ink); color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans); font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, var(--teal) 60%, transparent); text-underline-offset: .2em; }
a:hover { color: var(--teal); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--violet-btn); color: #fff; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
ul, ol { margin: 0; padding: 0; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--teal); color: var(--ink); padding: 8px 14px; z-index: 100; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type ---------- */
.display {
  font-family: var(--serif); font-weight: 400; letter-spacing: -.015em; line-height: .98;
  font-size: clamp(2.9rem, 7.2vw, 6.4rem);
}
.display--md { font-size: clamp(2.6rem, 5.4vw, 4.9rem); line-height: 1; }
.h1 { font-family: var(--serif); font-size: clamp(2.5rem, 5.4vw, 4.4rem); line-height: 1.02; letter-spacing: -.01em; }
.h2 { font-family: var(--serif); font-size: clamp(2rem, 3.8vw, 3.2rem); line-height: 1.05; letter-spacing: -.005em; }
.h3 { font: 600 1.25rem/1.3 var(--sans); letter-spacing: -.01em; }
.h4 { font: 600 1.05rem/1.35 var(--sans); }
.lead { font-size: clamp(1.125rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.mono { font-family: var(--mono); font-feature-settings: "zero"; }
.kicker { color: var(--teal); font-size: .95rem; font-weight: 500; margin-bottom: 18px; }
.measure { max-width: 68ch; }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--violet-btn);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border-radius: var(--r-sm); border: 1px solid transparent;
  font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--violet-btn); color: #fff; }
.btn--primary:hover { background: var(--violet-btn-hover); color: #fff; }
.btn--secondary { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn--secondary:hover { border-color: var(--teal); color: var(--teal); }
.btn--teal { background: var(--teal); color: #04201e; }
.btn--teal:hover { background: #4be0d4; color: #04201e; }
.btn--sm { padding: 10px 16px; font-size: .92rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-arrow { color: var(--teal); font-weight: 500; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--teal) 40%, transparent); padding-bottom: 2px; }
.link-arrow:hover { border-bottom-color: var(--teal); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Header ---------- */
.announce { background: var(--violet-btn); color: #fff; font-size: .92rem; padding: 8px 0; text-align: center; }
.site-head { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--ink) 88%, transparent); backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid var(--line); }
.site-head__inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand__word { font: 650 1.2rem/1 var(--sans); letter-spacing: -.02em; }
.site-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.site-nav ul { display: flex; gap: 26px; list-style: none; }
.site-nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: .97rem; padding: 6px 0; }
.site-nav a:not(.btn):hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--teal); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-2); color: var(--text); border-radius: var(--r-sm); padding: 9px 12px; font: 500 .92rem var(--sans); align-items: center; gap: 10px; cursor: pointer; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 16px; height: 1.5px; background: currentColor; position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -5px; } .nav-toggle__bars::after { top: 5px; }

@media (max-width: 960px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav { position: absolute; left: 0; right: 0; top: 68px; background: var(--navy); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; display: none; }
  .js .site-nav.is-open { display: flex; }
  .js .site-nav ul { flex-direction: column; gap: 0; }
  .js .site-nav ul a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .js .site-nav a[aria-current="page"] { box-shadow: none; color: var(--teal); }
  .js .site-nav__cta { margin-top: 16px; }
  html:not(.js) .site-head__inner { height: auto; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
  html:not(.js) .site-nav { width: 100%; overflow-x: auto; }
}

/* ---------- Sections ---------- */
.sec { padding: var(--sec) 0; }
.sec--tight { padding: clamp(48px, 6vw, 80px) 0; }
.sec--navy { background: var(--navy); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px 56px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.sec__head p { color: var(--muted); margin: 0; max-width: 52ch; }
@media (max-width: 860px) { .sec__head { grid-template-columns: 1fr; } }
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); }
.span-7 { grid-column: span 7; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; } .span-4 { grid-column: span 4; }
@media (max-width: 960px) { .grid-12 > [class*="span-"] { grid-column: 1 / -1; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 96px); overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: linear-gradient(180deg, #000 0%, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__copy .display { margin-bottom: 28px; max-width: 11ch; }
.hero__copy .lead { margin-bottom: 36px; }
.hero__meta { margin-top: 28px; color: var(--dim); font-size: .92rem; display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; }
.hero__meta li { display: flex; align-items: center; gap: 8px; }
.hero__meta li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
@media (max-width: 960px) { .hero__grid { grid-template-columns: 1fr; } }

/* Interactive stack visual */
.stack { position: relative; }
.stack__svg { width: 100%; max-width: 520px; margin: 0 auto; overflow: visible; }
.stack__layer { cursor: pointer; outline: none; }
.stack__layer .plate { fill: var(--navy); stroke: var(--line-2); stroke-width: 1.2; transition: fill .25s var(--ease), stroke .25s var(--ease); }
.stack__layer .edge { fill: #080c1b; stroke: var(--line-2); stroke-width: 1.2; }
.stack__layer .trace { stroke: var(--line-2); stroke-width: 1; fill: none; transition: stroke .25s var(--ease); }
.stack__layer .node { fill: var(--line-2); transition: fill .25s var(--ease); }
.stack__layer .tag { font: 500 11px var(--mono); fill: var(--dim); letter-spacing: .02em; transition: fill .25s var(--ease); }
.stack__layer .lbl { font: 600 15px var(--sans); fill: var(--muted); transition: fill .25s var(--ease); }
.stack__layer .lift { transition: transform .35s var(--ease); }
.stack__layer.is-active .lift, .stack__layer:hover .lift, .stack__layer:focus-visible .lift { transform: translateY(-10px); }
.stack__layer.is-active .plate { fill: var(--panel-2); }
.stack__layer[data-tone="teal"].is-active .plate, .stack__layer[data-tone="teal"]:hover .plate { stroke: var(--teal); }
.stack__layer[data-tone="violet"].is-active .plate, .stack__layer[data-tone="violet"]:hover .plate { stroke: var(--violet); }
.stack__layer[data-tone="white"].is-active .plate, .stack__layer[data-tone="white"]:hover .plate { stroke: var(--text); }
.stack__layer[data-tone="teal"].is-active .trace { stroke: color-mix(in srgb, var(--teal) 55%, transparent); }
.stack__layer[data-tone="violet"].is-active .trace { stroke: color-mix(in srgb, var(--violet) 60%, transparent); }
.stack__layer[data-tone="white"].is-active .trace { stroke: color-mix(in srgb, var(--text) 40%, transparent); }
.stack__layer[data-tone="teal"].is-active .node { fill: var(--teal); }
.stack__layer[data-tone="violet"].is-active .node { fill: var(--violet); }
.stack__layer[data-tone="white"].is-active .node { fill: var(--text); }
.stack__layer.is-active .lbl { fill: var(--text); }
.stack__layer.is-active .tag { fill: var(--muted); }
.stack__layer:focus-visible .plate { stroke: var(--teal); stroke-width: 2; }
.stack__panel { margin-top: 8px; border: 1px solid var(--line); background: color-mix(in srgb, var(--navy) 80%, transparent); border-radius: var(--r-md); padding: 22px 24px; }
.stack__panel[hidden] { display: none; }
.stack__panel h2 { font: 600 1.05rem/1.3 var(--sans); margin-bottom: 4px; }
.stack__panel p { color: var(--muted); font-size: .95rem; margin-bottom: 14px; }
.stack__hint { color: var(--dim); font-size: .85rem; text-align: center; margin: 4px 0 0; }
@media (prefers-reduced-motion: no-preference) {
  .js .stack__layer .rise { animation: rise .9s var(--ease) both; }
  .js .stack__layer:nth-of-type(2) .rise { animation-delay: .12s; }
  .js .stack__layer:nth-of-type(3) .rise { animation-delay: .24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
}

/* ---------- Price rows (used across site) ---------- */
.rows { list-style: none; border-top: 1px solid var(--line); }
.rows li { border-bottom: 1px solid var(--line); }
.row-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 14px 4px; text-decoration: none; color: var(--text); transition: background-color .15s var(--ease), padding .2s var(--ease); }
.row-link:hover { color: var(--text); background: color-mix(in srgb, var(--panel) 70%, transparent); padding-left: 12px; padding-right: 12px; }
.row-link__name { font-weight: 500; }
.row-link__sub { display: block; color: var(--muted); font-size: .9rem; font-weight: 400; margin-top: 2px; }
.price { font-family: var(--mono); font-feature-settings: "zero"; font-size: .95rem; color: var(--teal); white-space: nowrap; }
.price small { color: var(--dim); font-size: .8rem; }
.price-big { font: 500 clamp(2rem, 3.4vw, 2.6rem)/1 var(--mono); letter-spacing: -.03em; color: var(--text); }
.price-big span { font-size: .45em; color: var(--muted); letter-spacing: 0; margin-right: 6px; }

/* Price board on homepage */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 44px); }
.board__col h3 { display: flex; align-items: center; gap: 10px; font: 600 1.1rem/1.3 var(--sans); margin-bottom: 6px; }
.board__col h3 .dot { width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg); }
.board__col > p { color: var(--muted); font-size: .95rem; min-height: 3.2em; margin-bottom: 16px; }
.dot--teal { background: var(--teal); } .dot--violet { background: var(--violet); } .dot--white { background: var(--text); }
@media (max-width: 960px) { .board { grid-template-columns: 1fr; } .board__col > p { min-height: 0; } }

/* ---------- AI-built band ---------- */
.aib { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.aib__tools { color: var(--muted); margin: 18px 0 28px; }
.aib__tools strong { color: var(--text); font-weight: 500; }
.symptoms { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; border-top: 1px solid var(--line); }
.symptoms li { border-bottom: 1px solid var(--line); padding: 12px 0 12px 26px; position: relative; font-size: .98rem; }
.symptoms li::before { content: ""; position: absolute; left: 2px; top: 1.15em; width: 12px; height: 1.5px; background: var(--amber); }
@media (max-width: 960px) { .aib { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .symptoms { grid-template-columns: 1fr; } }
.offer { border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--ink); overflow: hidden; }
.offer__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 18px; padding: 20px 24px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.offer__row:hover { background: var(--panel); color: var(--text); }
.offer__row h3 { font: 600 1.05rem/1.3 var(--sans); }
.offer__row p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .93rem; }
.offer__foot { padding: 20px 24px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Feature split ---------- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.split--rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
@media (max-width: 960px) { .split, .split--rev { grid-template-columns: 1fr; } }
.ticks { list-style: none; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 11px; height: 6px; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); }
.ticks--2 { grid-template-columns: 1fr 1fr; gap: 10px 28px; }
@media (max-width: 640px) { .ticks--2 { grid-template-columns: 1fr; } }
.crosses { list-style: none; display: grid; gap: 8px; color: var(--muted); }
.crosses li { position: relative; padding-left: 26px; }
.crosses li::before, .crosses li::after { content: ""; position: absolute; left: 3px; top: .78em; width: 12px; height: 1.5px; background: var(--dim); transform: rotate(45deg); }
.crosses li::after { transform: rotate(-45deg); }

/* Inline header-check form (homepage + tools) */
.quickcheck { border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: clamp(22px, 3vw, 32px); background: linear-gradient(180deg, var(--panel), var(--navy)); }
.quickcheck h3 { font: 600 1.15rem/1.3 var(--sans); margin-bottom: 6px; }
.quickcheck p { color: var(--muted); font-size: .95rem; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form input { flex: 1 1 240px; }

/* Terminal-like spec block: used for real, verified measurements only */
.spec { border: 1px solid var(--line-2); border-radius: var(--r-md); background: #070a16; font-family: var(--mono); font-size: .88rem; overflow: hidden; }
.spec__top { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); color: var(--dim); font-size: .8rem; }
.spec dl { margin: 0; padding: 10px 16px 14px; display: grid; grid-template-columns: auto 1fr; gap: 7px 18px; }
.spec dt { color: var(--dim); }
.spec dd { margin: 0; color: var(--text); }
.spec dd.hl { color: var(--teal); }
.spec__foot { padding: 10px 16px; border-top: 1px solid var(--line); color: var(--dim); font-size: .78rem; font-family: var(--sans); }

/* Steps (genuinely sequential content) */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: step; border-top: 1px solid var(--line-2); }
.steps li { counter-increment: step; padding: 22px 22px 0 0; position: relative; }
.steps li::before { content: counter(step); display: block; font: 500 .85rem var(--mono); color: var(--teal); margin-bottom: 14px; }
.steps li::after { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; background: var(--teal); transform: rotate(45deg); }
.steps h3 { font: 600 1.05rem/1.3 var(--sans); margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: .95rem; margin: 0; }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr 1fr; gap: 28px 0; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Technology list */
.techlist { list-style: none; border-top: 1px solid var(--line); }
.techlist a { display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto; gap: 18px; align-items: baseline; padding: 16px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.techlist a:hover { background: color-mix(in srgb, var(--panel) 70%, transparent); color: var(--text); }
.techlist strong { font-weight: 600; }
.techlist span.tl { color: var(--muted); font-size: .95rem; }
@media (max-width: 640px) { .techlist a { grid-template-columns: 1fr auto; } .techlist span.tl { grid-column: 1 / -1; } }
.status { display: inline-flex; align-items: center; gap: 7px; font: 500 .78rem/1 var(--sans); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.status.is-live { color: var(--teal); border-color: color-mix(in srgb, var(--teal) 40%, transparent); } .status.is-live::before { background: var(--teal); }
.status.is-dev { color: var(--violet); border-color: color-mix(in srgb, var(--violet) 45%, transparent); } .status.is-dev::before { background: var(--violet); }
.status.is-exp { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, transparent); } .status.is-exp::before { background: var(--amber); }

/* Tools listing */
.toolcols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); }
@media (max-width: 860px) { .toolcols { grid-template-columns: 1fr; } }
.toolcols h3 { font: 600 1.05rem var(--sans); margin-bottom: 10px; color: var(--muted); }
.tag-live { font: 500 .75rem var(--mono); color: var(--teal); border: 1px solid color-mix(in srgb, var(--teal) 35%, transparent); padding: 3px 7px; border-radius: 4px; }
.tag-calc { font: 500 .75rem var(--mono); color: var(--violet); border: 1px solid color-mix(in srgb, var(--violet) 35%, transparent); padding: 3px 7px; border-radius: 4px; }
.tag-list { font: 500 .75rem var(--mono); color: var(--muted); border: 1px solid var(--line-2); padding: 3px 7px; border-radius: 4px; }

/* Commitments */
.commit { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-left: 1px solid var(--line); }
.commit > div { padding: 4px 24px 4px; border-right: 1px solid var(--line); }
.commit h3 { font: 600 1rem/1.35 var(--sans); margin-bottom: 8px; }
.commit p { color: var(--muted); font-size: .94rem; margin: 0; }
@media (max-width: 960px) { .commit { grid-template-columns: 1fr 1fr; gap: 28px 0; } }
@media (max-width: 560px) { .commit { grid-template-columns: 1fr; } }

/* Closing CTA */
.closer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; }
@media (max-width: 760px) { .closer { grid-template-columns: 1fr; } }

/* ---------- Page header ---------- */
.phead { padding: clamp(40px, 6vw, 80px) 0 clamp(36px, 5vw, 64px); border-bottom: 1px solid var(--line); position: relative; }
.phead .h1 { max-width: 18ch; margin-bottom: 20px; }
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; color: var(--dim); margin-bottom: 22px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--teal); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line-2); }

/* ---------- Service page ---------- */
.svc { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(32px, 5vw, 72px); align-items: start; }
.svc__aside { position: sticky; top: 92px; }
@media (max-width: 1020px) { .svc { grid-template-columns: 1fr; } .svc__aside { position: static; order: -1; } }
.pricebox { border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--navy); padding: 26px; }
.pricebox__label { color: var(--muted); font-size: .92rem; margin-bottom: 8px; }
.pricebox__fixed { margin: 18px 0 0; padding: 14px 16px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--teal) 9%, transparent); border: 1px solid color-mix(in srgb, var(--teal) 30%, transparent); font-size: .93rem; }
.pricebox .btn { margin-top: 20px; }
.pricebox__notes { margin-top: 18px; color: var(--muted); font-size: .9rem; }
.pricebox__notes p { margin-bottom: .6em; }
.block { padding: 36px 0; border-bottom: 1px solid var(--line); }
.block:first-child { padding-top: 0; }
.block:last-child { border-bottom: 0; }
.block > h2 { font: 600 1.3rem/1.3 var(--sans); letter-spacing: -.01em; margin-bottom: 18px; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 720px) { .cols-2 { grid-template-columns: 1fr; } }

/* Prose (markdown + legal) */
.prose { max-width: 70ch; }
.prose h2 { font: 600 1.4rem/1.3 var(--sans); margin: 1.8em 0 .6em; letter-spacing: -.01em; }
.prose h3 { font: 600 1.15rem/1.35 var(--sans); margin: 1.6em 0 .5em; }
.prose h4 { font: 600 1rem/1.4 var(--sans); margin: 1.4em 0 .4em; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--teal); }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--panel); padding: .12em .38em; border-radius: 4px; }
.prose pre { background: #070a16; border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 1.2em 0; padding-left: 18px; border-left: 2px solid var(--violet); color: var(--muted); }
.prose strong { font-weight: 600; color: #fff; }
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: var(--r-md); }
.table-wrap table, table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table-wrap th, .table-wrap td, table.data th, table.data td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap th, table.data th { color: var(--muted); font-weight: 500; background: var(--navy); }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td:last-child { font-family: var(--mono); font-size: .9rem; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; border-right: 1.5px solid var(--teal); border-bottom: 1.5px solid var(--teal); transform: translateY(-70%) rotate(45deg); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > div { padding: 0 0 20px; color: var(--muted); max-width: 70ch; }

/* ---------- Notices ---------- */
.notice { border: 1px solid var(--line-2); border-left: 3px solid var(--teal); background: var(--navy); border-radius: var(--r-sm); padding: 14px 18px; margin: 0 0 20px; font-size: .96rem; }
.notice p:last-child { margin: 0; }
.notice--warn { border-left-color: var(--amber); }
.notice--error { border-left-color: var(--red); }
.notice--violet { border-left-color: var(--violet); }
.notice strong { font-weight: 600; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 22px; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 22px; }
.form legend { font: 600 1.15rem/1.3 var(--sans); margin-bottom: 4px; padding: 0; }
.form__section { padding: 28px 0; border-top: 1px solid var(--line); }
.form__section:first-child { border-top: 0; padding-top: 0; }
.field { display: grid; gap: 7px; }
.field > label, .field > .label { font-weight: 500; font-size: .96rem; }
.field .opt { color: var(--dim); font-weight: 400; }
.help { color: var(--dim); font-size: .87rem; margin: 0; }
.err { color: var(--red); font-size: .9rem; margin: 0; }
input:not([type]), input[type="text"], input[type="email"], input[type="url"], input[type="tel"], input[type="password"], input[type="number"], input[type="search"], select, textarea {
  width: 100%; background: #0a1022; color: var(--text); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 12px 14px; font: 400 1rem/1.4 var(--sans); transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 20%, transparent); }
.has-err input, .has-err select, .has-err textarea { border-color: var(--red); }
textarea { min-height: 150px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.choices { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: var(--r-sm); cursor: pointer; font-size: .95rem; background: #0a1022; }
.choice:hover { border-color: var(--dim); }
.choice input { margin-top: 3px; accent-color: var(--teal); flex: none; width: 16px; height: 16px; }
.choice:has(input:checked) { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 7%, #0a1022); }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; }
.consent input { margin-top: 4px; accent-color: var(--teal); width: 17px; height: 17px; flex: none; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 640px) { .row-2 { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 1020px) { .form-layout { grid-template-columns: 1fr; } }
.sidecard { border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; background: var(--navy); font-size: .95rem; }
.sidecard + .sidecard { margin-top: 16px; }
.sidecard h2 { font: 600 1rem/1.3 var(--sans); margin-bottom: 10px; }
.sidecard p { color: var(--muted); }
.sidecard p:last-child { margin: 0; }

/* Reference display */
.ref { font: 500 clamp(1.6rem, 3vw, 2.2rem)/1 var(--mono); letter-spacing: .02em; color: var(--teal); }
.kv { display: grid; grid-template-columns: minmax(auto, 14rem) 1fr; gap: 10px 22px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* ---------- Tool results ---------- */
.summary-bar { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 22px; }
.summary-bar span { font: 500 .85rem var(--mono); padding: 6px 10px; border-radius: 4px; border: 1px solid var(--line-2); }
.s-pass { color: var(--teal); } .s-warn { color: var(--amber); } .s-fail { color: var(--red); } .s-info { color: var(--muted); }
.findings { list-style: none; border-top: 1px solid var(--line); }
.findings li { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.badge { font: 600 .72rem/1 var(--mono); padding: 6px 0; text-align: center; border-radius: 4px; border: 1px solid currentColor; height: fit-content; text-transform: lowercase; }
.findings h3 { font: 600 1rem/1.35 var(--sans); margin-bottom: 4px; }
.findings code { display: block; font: .82rem/1.5 var(--mono); color: var(--muted); word-break: break-all; margin: 4px 0 6px; }
.findings p { color: var(--muted); margin: 0; font-size: .94rem; }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 1020px) { .tool-layout { grid-template-columns: 1fr; } }
.calc { border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--navy); padding: clamp(20px, 3vw, 30px); }
.calc .row-2, .calc .row-3 { gap: 18px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 720px) { .row-3 { grid-template-columns: 1fr; } }
.out { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 22px; }
.out__big { font: 500 clamp(2rem, 4vw, 3rem)/1 var(--mono); letter-spacing: -.03em; }
.out__big small { font-size: .4em; color: var(--muted); letter-spacing: 0; }
.bars { display: grid; gap: 8px; margin-top: 18px; }
.bar { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) 5.5rem; gap: 12px; align-items: center; font-size: .88rem; }
.bar__track { height: 10px; background: #0a1022; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.bar__fill { height: 100%; width: 0; background: var(--violet); transition: width .3s var(--ease); }
.bar__fill.t { background: var(--teal); } .bar__fill.a { background: var(--amber); }
.bar span:last-child { font-family: var(--mono); text-align: right; color: var(--muted); }
.fit { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--line); }
.fit li { display: grid; grid-template-columns: minmax(0, 1fr) repeat(4, 5.2rem); gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9rem; align-items: center; }
.fit li.head { color: var(--dim); font-size: .8rem; }
.c { display: inline-block; min-width: 3.4rem; text-align: center; font: 500 .78rem var(--mono); padding: 5px 0; border-radius: 4px; }
.c.ok { color: var(--teal); background: color-mix(in srgb, var(--teal) 10%, transparent); }
.c.tight { color: var(--amber); background: color-mix(in srgb, var(--amber) 10%, transparent); }
.c.no { color: var(--dim); background: #0a1022; }
@media (max-width: 640px) { .fit li { grid-template-columns: minmax(0, 1fr) repeat(4, 3.6rem); font-size: .82rem; } }
.checklist { list-style: none; }
.checklist h3 { font: 600 1.1rem var(--sans); margin: 28px 0 10px; }
.checklist label { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.checklist input { accent-color: var(--teal); width: 18px; height: 18px; margin-top: 3px; }
.checklist label span strong { display: block; font-weight: 500; }
.checklist label span em { font-style: normal; color: var(--muted); font-size: .92rem; }
.checklist input:checked + span strong { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--teal); }
.progress { position: sticky; top: 80px; z-index: 5; background: var(--ink); padding: 10px 0; display: flex; align-items: center; gap: 14px; font: .9rem var(--mono); }
.progress__track { flex: 1; height: 6px; background: var(--panel); border-radius: 3px; overflow: hidden; }
.progress__fill { height: 100%; width: 0; background: var(--teal); transition: width .25s var(--ease); }
pre.output { background: #070a16; border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; font: .85rem/1.55 var(--mono); white-space: pre-wrap; max-height: 520px; overflow: auto; }

/* ---------- Labs ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters a { text-decoration: none; padding: 7px 13px; border: 1px solid var(--line-2); border-radius: 999px; font-size: .88rem; color: var(--muted); }
.filters a[aria-current="true"] { border-color: var(--teal); color: var(--teal); }
.posts { list-style: none; border-top: 1px solid var(--line); }
.posts a { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.posts a:hover h2 { color: var(--teal); }
.posts time, .posts .cat { color: var(--dim); font-size: .88rem; display: block; }
.posts h2 { font: 600 1.25rem/1.3 var(--sans); margin-bottom: 6px; transition: color .15s; }
.posts p { color: var(--muted); margin: 0; }
@media (max-width: 640px) { .posts a { grid-template-columns: 1fr; gap: 6px; } }
.verify { display: flex; gap: 12px; align-items: flex-start; border: 1px solid color-mix(in srgb, var(--teal) 30%, transparent); background: color-mix(in srgb, var(--teal) 6%, transparent); border-radius: var(--r-sm); padding: 14px 16px; font-size: .92rem; margin-bottom: 32px; }

/* ---------- Tech page ---------- */
.ach { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 8px 0 36px; }
.ach > div { border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; }
.ach h2 { font: 600 1rem var(--sans); margin-bottom: 12px; }
.ach .ach__done { border-color: color-mix(in srgb, var(--teal) 35%, transparent); }
@media (max-width: 720px) { .ach { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line); background: var(--navy); padding: clamp(48px, 6vw, 80px) 0 32px; margin-top: 0; }
.site-foot__cta { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-bottom: 40px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
.site-foot__line { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.1; margin: 0; max-width: 24ch; }
.site-foot__grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.site-foot__brand p { color: var(--muted); font-size: .93rem; margin-top: 16px; max-width: 34ch; }
.site-foot__h { font: 600 .95rem var(--sans); margin-bottom: 12px; }
.site-foot ul { list-style: none; display: grid; gap: 8px; }
.site-foot ul a { color: var(--muted); text-decoration: none; font-size: .93rem; }
.site-foot ul a:hover { color: var(--teal); }
.site-foot__legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.site-foot__legal-links { display: flex !important; flex-wrap: wrap; gap: 8px 22px !important; }
.site-foot__co { color: var(--dim); font-size: .85rem; margin: 0; }
@media (max-width: 960px) { .site-foot__grid { grid-template-columns: 1fr 1fr; } .site-foot__brand { grid-column: 1 / -1; } }

/* Legal */
.legal { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.legal nav { position: sticky; top: 92px; }
.legal nav ul { list-style: none; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.legal nav a { display: block; padding: 7px 14px; color: var(--muted); text-decoration: none; font-size: .93rem; margin-left: -1px; border-left: 1px solid transparent; }
.legal nav a[aria-current="page"] { color: var(--text); border-left-color: var(--teal); }
@media (max-width: 860px) { .legal { grid-template-columns: 1fr; } .legal nav { position: static; } }

/* Error page */
.err-page { padding: clamp(80px, 12vw, 160px) 0; }
.err-page .code { font: 500 1rem var(--mono); color: var(--teal); margin-bottom: 16px; }

/* Utilities */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 12px; } .mt-2 { margin-top: 24px; } .mt-3 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 12px; } .mb-2 { margin-bottom: 24px; } .mb-3 { margin-bottom: 40px; }
.center { text-align: center; }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-head, .site-foot, .nav-toggle, .btn, .progress { display: none !important; }
  body { background: #fff; color: #000; }
  .checklist label { border-color: #ccc; }
}

.cookie-consent { position: fixed; z-index: 1000; inset: auto 20px 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1120px; margin-inline: auto; padding: 20px 24px; color: var(--text, #f5f5f7); background: #101321; border: 1px solid #555d78; border-radius: 16px; box-shadow: 0 16px 48px #0009; }
.cookie-consent__copy { max-width: 600px; }
.cookie-consent__copy p { margin: 6px 0; color: #c3c8da; }
.cookie-consent__copy a { color: #a99bff; }
.cookie-consent__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-settings { padding: 0; border: 0; color: inherit; background: transparent; font: inherit; text-decoration: underline; cursor: pointer; }
@media (max-width: 700px) {
  .cookie-consent { inset: auto 10px 10px; display: block; padding: 16px; }
  .cookie-consent__actions { margin-top: 14px; }
}
