/* Qubova site styles.
   Rules: one page background for every section, header and footer; no lines between sections;
   no gradients, no transparency, no shadows. Depth comes from solid surface steps only.
   Only form inputs carry a border. Table rows separate by alternating fills.
   Dark "10 mK" theme by default (the cold inside of a dilution refrigerator);
   light "300 K" (room temperature) via the cryostat toggle, [data-theme="light"]. */

:root {
  /* colour: 10 mK (dark, default) */
  --bg: #0C0D11;          /* page, header, footer, every section */
  --raised: #17191F;      /* cards, panels on --bg */
  --sunk: #060709;        /* wells, table stripes, chips on --bg */
  --sunk-2: #262932;      /* pressed chips, bar tracks (no small text on it) */
  --ink: #F2EFE6;         /* text on every surface */
  --ink-2: #C4C1B7;       /* secondary text on every surface */
  --ink-3: #9C998F;       /* captions, labels on every surface */
  --gold: #E0B04A;        /* chandelier gold: fills; readable as text on dark only */
  --gold-ink: #E0B04A;    /* gold used as text (links, figures) */
  --on-gold: #12141A;     /* text on --gold, in both themes */
  --gold-soft: #34290F;   /* tinted fill: highlight rows, active nav, example tags */
  --blue: #8EAEFF;        /* pass, validated, links */
  --blue-soft: #1A2346;   /* tinted fill for pass tags */
  --red: #FF9470;         /* fail, rejected, risk (always paired with a word) */
  --red-soft: #3E1D12;    /* tinted fill for risk tags */
  --field: #6F727B;       /* input borders on --raised (>= 3:1) */
  --go-bg: #E0B04A;       /* primary button: gold with an ink label */
  --go-ink: #12141A;
  --go-bg-h: #F2EFE6;
  --go-ink-h: #12141A;
  --night: #17191F;       /* CTA block and code blocks */
  --night-ink: #F2EFE6;   /* text on --night */
  --night-dim: #A3A096;   /* comments on --night */
  --focus: #8EAEFF;

  /* type */
  --f-display: "Gloock", "Georgia", "Times New Roman", serif;
  --f-text: "Readex Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-data: "Source Code Pro", ui-monospace, "SF Mono", Menlo, monospace;
  --t-hero: clamp(2.3rem, 1.5rem + 2.7vw, 3.7rem);
  --t-h1: clamp(2.15rem, 1.5rem + 2.6vw, 3.6rem);
  --t-h2: clamp(1.75rem, 1.35rem + 1.6vw, 2.6rem);
  --t-h3: 1.12rem;
  --t-big: clamp(1.25rem, 1.05rem + 0.8vw, 1.55rem);
  --t-lead: clamp(1.0625rem, 1rem + 0.3vw, 1.2rem);
  --t-body: 1rem;
  --t-sm: 0.875rem;
  --t-xs: 0.78rem;

  /* space (4px scale) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px;
  --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-20: 80px;
  --section-y: clamp(64px, 5vw + 40px, 120px);
  --gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
  --wrap: 1200px;

  /* shape: the die's small corner radius, scaled up; rectangles, not pills */
  --r-sm: 6px; --r: 12px; --r-lg: 20px;
  --dur: 200ms; --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  /* colour: 300 K (light) */
  --bg: #F3F3EF; --raised: #FFFFFF; --sunk: #E6E5DF; --sunk-2: #D5D4CD;
  --ink: #12141A; --ink-2: #40434B; --ink-3: #5B5E66;
  --gold: #C9962B; --gold-ink: #7C5A0E; --gold-soft: #F1E3BC;
  --blue: #2349B8; --blue-soft: #DEE5F7; --red: #AE3A12; --red-soft: #F7DFD4;
  --field: #7C7F86; --go-bg: #12141A; --go-ink: #E0B04A; --go-bg-h: #C9962B; --go-ink-h: #12141A;
  --night: #12141A; --night-ink: #F2EFE6; --night-dim: #A3A096; --focus: #2349B8;
  color-scheme: light;
}

/* ------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--t-body)/1.6 var(--f-text); overflow-x: hidden; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p a, .vis-cap a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.data { font-family: var(--f-data); font-size: var(--t-xs); font-weight: 500; letter-spacing: 0; font-feature-settings: "zero" 1; }
.sel { user-select: all; }
.skip { position: absolute; left: var(--gutter); top: -60px; background: var(--gold); color: var(--on-gold); padding: var(--s-2) var(--s-4); border-radius: var(--r-sm); z-index: 100; font-weight: 600; }
.skip:focus { top: var(--s-2); }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.h1, .h2, .brand span, .metric-v, .prow-name { font-family: var(--f-display); font-weight: 400; }
.h1 { font-size: var(--t-h1); line-height: 1.04; letter-spacing: -0.015em; }
.hero-h { font-size: var(--t-hero); }
.h1 em, .h2 em { font-style: normal; color: var(--gold-ink); }
.h2 { font-size: var(--t-h2); line-height: 1.1; letter-spacing: -0.01em; max-width: 24ch; }
.h3 { font-size: var(--t-h3); line-height: 1.3; font-weight: 600; letter-spacing: -0.005em; }
.lead { font-size: var(--t-lead); color: var(--ink-2); max-width: 60ch; font-weight: 300; }
.big { font-size: var(--t-big); line-height: 1.38; font-weight: 400; letter-spacing: -0.01em; margin-bottom: var(--s-5); }
.vis-cap { font-size: var(--t-sm); color: var(--ink-3); margin-top: var(--s-4); max-width: 75ch; }

/* ------------------------------------------------ the mark */
.mark { width: 30px; height: auto; flex: none; }
.mark .m-r { fill: currentColor; }
.mark .m-d { fill: var(--gold); }

/* ------------------------------------------------ header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); }
.bar { display: flex; align-items: center; gap: var(--s-6); min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.7rem; letter-spacing: -0.01em; line-height: 1; }
.brand-mark { width: 32px; }
.brand span { padding-bottom: 4px; }
.nav-main { flex: 1; }
.nav-links { display: flex; align-items: center; gap: var(--s-1); }
.nav-link, .nav-menu-btn { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--r-sm); font-size: 0.9rem; font-weight: 400; color: var(--ink-2); background: transparent; border: 0; }
.nav-link:hover, .nav-menu-btn:hover, .nav-menu-btn[aria-expanded="true"] { background: var(--raised); color: var(--ink); }
.nav-link[aria-current="page"], .nav-menu-btn.is-active { color: var(--ink); background: var(--gold-soft); }
.nav-menu-btn svg { width: 11px; height: 11px; transition: transform var(--dur) var(--ease); }
.nav-menu-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.has-menu { position: relative; }
.nav-menu { position: absolute; top: calc(100% + 10px); left: 0; width: 480px; background: var(--raised); border-radius: var(--r); padding: var(--s-2); z-index: 60; outline: 2px solid var(--sunk-2); }
.nav-menu[hidden] { display: none; }
.menu-item { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-3); align-items: center; padding: 10px 12px; border-radius: var(--r-sm); }
.menu-item:hover, .menu-item[aria-current="page"] { background: var(--bg); }
.menu-item strong { display: block; font-weight: 600; }
.menu-item small { display: block; color: var(--ink-3); font-size: var(--t-sm); line-height: 1.35; }
.menu-st { color: var(--ink-3); }
.menu-foot { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s-1); padding: 12px; border-radius: var(--r-sm); background: var(--bg); font-weight: 500; font-size: var(--t-sm); }
.menu-foot:hover { background: var(--gold-soft); }
.nav-tools { display: flex; align-items: center; gap: var(--s-3); margin-left: auto; flex: none; }
.nav-account { font-size: 0.9rem; color: var(--ink-2); padding: 8px 6px; white-space: nowrap; }
.nav-account:hover, .nav-account[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.icon-btn { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border: 0; border-radius: var(--r-sm); background: var(--raised); }
.icon-btn svg { width: 22px; height: 22px; }
.nav-toggle .i-close { display: none; }
.nav-toggle[aria-expanded="true"] .i-open { display: none; }
.nav-toggle[aria-expanded="true"] .i-close { display: inline; }
.panel-only { display: none; }
.glyph { display: inline-flex; width: 36px; height: 36px; border-radius: 8px; background: var(--sunk); align-items: center; justify-content: center; color: var(--ink); flex: none; }
.glyph svg { width: 20px; height: 20px; }
.glyph .ga { fill: var(--gold); }
.glyph-lg { width: 44px; height: 44px; border-radius: 10px; }
.glyph-lg svg { width: 24px; height: 24px; }
.glyph-xl { width: 64px; height: 64px; border-radius: var(--r); }
.glyph-xl svg { width: 36px; height: 36px; }

/* ------------------------------------------------ buttons, chips, tags */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: var(--r-sm); border: 0; font-weight: 500; font-size: 1rem; line-height: 1.1; transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease); white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 40px; padding: 9px 16px; font-size: 0.9375rem; }
.btn-go { background: var(--go-bg); color: var(--go-ink); }
.btn-go:hover { background: var(--go-bg-h); color: var(--go-ink-h); }
.btn-soft { background: var(--raised); color: var(--ink); }
.btn-soft:hover { background: var(--sunk-2); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-8); }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: var(--r-sm); background: var(--raised); color: var(--ink-2); margin-bottom: var(--s-6); }
.chip-dot { width: 10px; height: 10px; background: var(--gold); border-radius: 2px; }
.chip .chip-g { width: 24px; height: 24px; background: var(--bg); border-radius: 5px; }
.chip .chip-g svg { width: 14px; height: 14px; }
.tag { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 4px; font: 600 var(--t-xs)/1.3 var(--f-data); white-space: nowrap; }
.tag-ex { background: var(--gold-soft); color: var(--ink); }
.tag-risk { background: var(--red-soft); color: var(--red); }
.tag-plan { background: var(--sunk-2); color: var(--ink); }
.tag-hold { background: var(--blue-soft); color: var(--blue); }
.more { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; margin-top: var(--s-5); color: var(--ink); }
.more .arr, .menu-foot .arr { width: 14px; height: 14px; transition: transform var(--dur) var(--ease); }
.more:hover .arr { transform: translateX(3px); }
.more:hover { color: var(--gold-ink); }

/* ------------------------------------------------ the ket eyebrow: sections count up in binary */
.kb { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: var(--s-4); font-size: var(--t-sm); font-weight: 500; color: var(--ink-2); }
.kb-c { display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px 3px 6px; background: var(--raised); color: var(--ink); border-radius: var(--r-sm); font-size: var(--t-sm); }
.kb-c i { width: 10px; height: 10px; background: var(--gold); border-radius: 2px; }

/* ------------------------------------------------ sections */
.section { padding: var(--section-y) 0; }
.section + .section { padding-top: 0; }
.sec-head { display: grid; gap: var(--s-4); margin-bottom: var(--s-10); }
.sec-head .lead { margin-top: var(--s-1); }
.sec-aside { margin-top: calc(-1 * var(--s-2)); }
.sec-aside .more { margin-top: 0; }
.grid { display: grid; gap: var(--s-4); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.split > div { min-width: 0; }
.split-alt > div:first-child { order: 2; }

/* hero */
.hero { padding-top: clamp(32px, 4vw, 64px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr); gap: clamp(32px, 4vw, 64px); align-items: center; }
.hero-copy .lead { margin-top: var(--s-6); }
.page-hero { padding-top: clamp(40px, 5vw, 88px); }
.ph { display: grid; gap: clamp(32px, 4vw, 64px); }
.page-hero.has-side .ph { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; }
.ph-main .lead { margin-top: var(--s-6); }

/* run panel: example output under a run ID bar */
.vp { background: var(--raised); border-radius: var(--r); padding: var(--s-2); }
.vp-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px 10px; color: var(--ink-3); }
.vp-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--gold); flex: none; }
.vp-in { background: var(--bg); border-radius: 8px; padding: var(--s-5); }

/* ------------------------------------------------ the 3-qubit console */
.console { background: var(--raised); border-radius: var(--r-lg); padding: var(--s-3); }
.con-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) var(--s-3) var(--s-3); color: var(--ink-2); }
.con-bar > .data { display: inline-flex; align-items: center; gap: 8px; }
.con-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-3); }
.con-main, .con-side { display: flex; flex-direction: column; gap: var(--s-3); background: var(--bg); border-radius: var(--r); padding: var(--s-4); min-width: 0; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--sunk); border-radius: var(--r-sm); }
.con-main .seg { display: grid; grid-template-columns: repeat(4, 1fr); }
.seg-b { border: 0; background: transparent; padding: 8px 12px; border-radius: 4px; font-size: var(--t-sm); font-weight: 500; color: var(--ink-2); }
.con-main .seg-b { padding: 7px 4px; font-size: var(--t-xs); }
.seg-b:hover { color: var(--ink); background: var(--sunk-2); }
.seg-b[aria-pressed="true"] { background: var(--gold); color: var(--on-gold); }
.con-circ { background: var(--sunk); border-radius: var(--r-sm); padding: 6px 4px; }
.circ { width: 100%; height: auto; }
.cw { stroke: var(--ink-3); stroke-width: 1.5; fill: none; }
.cw-l { fill: var(--ink-3); font: 500 12px var(--f-data); }
.cg-b { fill: var(--gold); }
.cg-n { fill: var(--on-gold); font: 700 13px var(--f-data); }
.cg-l { stroke: var(--ink); stroke-width: 2; }
.cg-c { fill: var(--ink); }
.cg-t { fill: var(--sunk); stroke: var(--ink); stroke-width: 2; }
.cg-x { stroke: var(--ink); stroke-width: 2; }
.pal { display: grid; grid-template-columns: 28px repeat(4, minmax(0, 1fr)); gap: 4px; align-items: center; }
.pal-q { color: var(--ink-3); }
.pal-b { border: 0; background: var(--raised); color: var(--ink); border-radius: 4px; padding: 7px 0; font: 600 var(--t-xs) var(--f-data); }
.pal-b:hover { background: var(--gold-soft); }
.pal-b:disabled { color: var(--ink-3); cursor: not-allowed; background: var(--sunk); }
.pal-cx { grid-column: span 1; }
.pal > .pal-cx:last-child { grid-column: span 2; }
.pal-act { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.pal-n { color: var(--ink-3); margin-left: auto; }
.con-h { color: var(--ink-3); }
.amps { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.amp { display: grid; gap: 4px; justify-items: center; }
.amp-bar { display: flex; align-items: flex-end; width: 100%; height: 120px; background: var(--sunk); border-radius: 4px; overflow: hidden; }
.amp-bar i { display: block; width: 100%; height: 100%; background: var(--gold); transform-origin: bottom; transform: scaleY(var(--p)); transition: transform 320ms var(--ease); }
.amp-ph { position: relative; width: 20px; height: 20px; border-radius: 50%; background: var(--sunk); }
.amp-ph i { position: absolute; left: 50%; top: 50%; width: 9px; height: 2px; margin-top: -1px; background: var(--ink); border-radius: 1px; transform-origin: left center; transform: rotate(calc(-1 * var(--a))); transition: transform 320ms var(--ease); }
.amp-ph i[hidden] { display: none; }
.amp-k { color: var(--ink-2); font-size: 0.7rem; }
.amp-v { color: var(--ink); font-size: 0.7rem; }
.amp-c { color: var(--blue); font-size: 0.7rem; }
.con-state { font-size: var(--t-sm); font-weight: 500; min-height: 3em; }
.con-shots { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.con-shots .data { color: var(--ink-3); }
.ro { display: grid; gap: 4px; }
.ro > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); padding: 8px 10px; background: var(--raised); border-radius: 4px; }
.ro dt { font-size: var(--t-sm); color: var(--ink-2); }
.ro dd { font-size: 0.9375rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.con-side .ro dd { font-size: var(--t-xs); }
.console figcaption { font-size: var(--t-sm); color: var(--ink-3); padding: var(--s-3) var(--s-3) var(--s-1); }

/* ------------------------------------------------ cards, metrics */
.card { position: relative; background: var(--raised); border-radius: var(--r); padding: var(--s-6); display: flex; flex-direction: column; gap: var(--s-3); transition: background var(--dur) var(--ease); }
.card p { color: var(--ink-2); }
.card-k { color: var(--ink-3); }
.card-link:hover { background: var(--gold-soft); }
.card-link:hover .card-k { color: var(--ink); }
.stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.metric { background: var(--raised); border-radius: var(--r); padding: var(--s-6); display: flex; flex-direction: column; gap: var(--s-2); }
.metric-v { font-size: clamp(1.9rem, 1.45rem + 1.5vw, 2.6rem); line-height: 1.02; letter-spacing: -0.01em; }
.metric-l { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.4; }
.metric-n { color: var(--ink-3); margin-top: auto; padding-top: var(--s-2); }
.metric-hl { background: var(--gold); }
.metric-hl .metric-l, .metric-hl .metric-n, .metric-hl .metric-v, .metric-hl b { color: var(--on-gold); }

/* ticks */
.ticks { display: grid; gap: var(--s-3); }
.ticks li { display: grid; grid-template-columns: 20px 1fr; gap: var(--s-3); align-items: start; }
.ck { width: 20px; height: 20px; margin-top: 2px; }
.ck rect { fill: var(--gold); }
.ck .ck-m { fill: var(--on-gold); }

/* product rows */
.prows { display: grid; gap: 4px; }
.prow { display: grid; grid-template-columns: 40px auto 150px 110px 1fr 24px; gap: var(--s-4); align-items: center; padding: var(--s-4) var(--s-5); background: var(--raised); border-radius: var(--r); transition: background var(--dur) var(--ease); }
.prow:hover { background: var(--gold); }
.prow:hover .glyph { background: var(--raised); }
.prow:hover .prow-n, .prow:hover .prow-verb, .prow:hover .prow-line, .prow:hover .prow-name, .prow:hover .prow-go { color: var(--on-gold); }
.prow-n, .prow-verb { color: var(--ink-3); }
.prow-name { font-size: 1.6rem; }
.prow-line { color: var(--ink-2); }
.prow-go .arr { width: 16px; height: 16px; transition: transform var(--dur) var(--ease); }
.prow:hover .prow-go .arr { transform: translateX(4px); }

/* steps: gates along a wire */
.steps { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: var(--s-3); }
.step { background: var(--raised); border-radius: var(--r); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); }
.step p:last-child { color: var(--ink-2); font-size: 0.9375rem; }
.step-t { display: flex; justify-content: space-between; align-items: center; color: var(--ink-3); }
.step-n { display: inline-flex; padding: 2px 8px; border-radius: 4px; background: var(--gold); color: var(--on-gold); font-weight: 600; }

/* code */
.code { background: var(--night); color: var(--night-ink); border-radius: var(--r); overflow: hidden; }
:root:not([data-theme="light"]) .code { background: var(--sunk); }
.code-bar { display: flex; align-items: center; gap: var(--s-3); padding: 10px 12px 10px 16px; color: var(--night-dim); }
.code-bar .data:first-child { margin-right: auto; }
.copy { border: 0; background: var(--gold); color: var(--on-gold); font: 600 var(--t-xs) var(--f-data); padding: 6px 12px; border-radius: 4px; }
.copy:hover { background: var(--night-ink); }
.code pre { margin: 0; padding: 4px 16px 20px; overflow-x: auto; font: 400 0.8125rem/1.7 var(--f-data); }
.code .c { color: var(--night-dim); }

/* tables */
.table-wrap { overflow-x: auto; border-radius: var(--r); background: var(--raised); }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; min-width: 560px; }
caption { text-align: left; padding: var(--s-4) var(--s-5) var(--s-2); font: 600 var(--t-xs) var(--f-data); color: var(--ink-3); }
thead th { background: var(--sunk-2); color: var(--ink); font-weight: 600; text-align: left; padding: 12px 20px; font-size: var(--t-sm); }
tbody th, tbody td { text-align: left; padding: 12px 20px; vertical-align: top; }
tbody th { font-weight: 600; }
tbody td { color: var(--ink-2); }
tbody tr:nth-child(even) { background: var(--bg); }

/* faq */
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); align-items: start; }
.qa { background: var(--raised); border-radius: var(--r); }
.qa summary { display: flex; justify-content: space-between; gap: var(--s-4); align-items: center; padding: var(--s-5); font-weight: 500; cursor: pointer; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary i { position: relative; width: 22px; height: 22px; flex: none; border-radius: 4px; background: var(--sunk-2); }
.qa summary i::before, .qa summary i::after { content: ""; position: absolute; background: var(--ink); border-radius: 1px; }
.qa summary i::before { left: 6px; top: 10px; width: 10px; height: 2px; }
.qa summary i::after { left: 10px; top: 6px; width: 2px; height: 10px; transition: transform var(--dur) var(--ease); }
.qa[open] summary i { background: var(--gold); }
.qa[open] summary i::before { background: var(--on-gold); }
.qa[open] summary i::after { transform: scaleY(0); }
.qa[open] summary { padding-bottom: var(--s-2); }
.qa p { padding: 0 var(--s-5) var(--s-5); color: var(--ink-2); }

/* cta */
.cta-block { display: grid; grid-template-columns: 1fr auto; gap: var(--s-8); align-items: center; background: var(--night); color: var(--night-ink); border-radius: var(--r-lg); padding: clamp(32px, 5vw, 72px); }
.cta-block .kb { color: var(--night-ink); }
.cta-block .kb-c { background: var(--gold); color: var(--on-gold); }
.cta-block .kb-c i { background: var(--on-gold); }
.cta-block .h2 { color: var(--night-ink); }
.cta-copy > p:not(.kb) { margin-top: var(--s-4); max-width: 60ch; color: var(--night-ink); }
.cta-block .btn-go { background: var(--gold); color: var(--on-gold); }
.cta-block .btn-go:hover { background: var(--night-ink); color: var(--night); }
.cta-block .btn-soft { background: var(--night-ink); color: var(--night); }
.cta-block .btn-soft:hover { background: var(--gold); color: var(--on-gold); }
.cta-mark { width: clamp(100px, 11vw, 160px); color: var(--night-ink); }
.cta-mark .m-d { fill: var(--gold); }

/* loop strip: five gates on one wire, results measured back */
.loop { background: var(--raised); border-radius: var(--r); padding: var(--s-4); }
.loop-l { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.loop-l a { display: grid; gap: 6px; padding: var(--s-4); border-radius: var(--r-sm); background: var(--bg); height: 100%; }
.loop-l a:hover { background: var(--gold-soft); }
.loop-l .is-on a { background: var(--gold); color: var(--on-gold); }
.loop-l .is-on .glyph { background: var(--raised); color: var(--ink); }
.loop-l .data { color: var(--ink-3); }
.loop-l .is-on .data { color: var(--on-gold); }
.loop-back { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-2) var(--s-1); color: var(--ink-2); }
.loop-ret { flex: 1; height: 4px; min-width: 24px; position: relative; }
.loop-ret svg { width: 100%; height: 4px; }
.loop-ret line { stroke: var(--ink-3); stroke-width: 4; }
.loop-ret::before { content: ""; position: absolute; left: -4px; top: -4px; width: 12px; height: 12px; border-radius: 2px; background: var(--gold); }

/* stack */
.stack { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.stack li { display: grid; gap: 4px; background: var(--raised); border-radius: var(--r-sm); padding: var(--s-4) var(--s-5); }
.stack strong { font-family: var(--f-data); font-size: var(--t-sm); font-weight: 600; }
.stack span { color: var(--ink-2); font-size: var(--t-sm); }

/* chart bits */
.ch-axis { fill: none; stroke: var(--ink-3); stroke-width: 1.5; }
.ch-txt { fill: var(--ink-3); font: 500 11px var(--f-data); }

/* the exponential wall */
.wl-svg { width: 100%; height: auto; }
.wall { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--s-6); align-items: center; }
.wl-cap { stroke: var(--sunk-2); stroke-width: 2; stroke-dasharray: 4 5; fill: none; }
.wl-line { fill: none; stroke: var(--gold); stroke-width: 3.5; stroke-linejoin: round; }
.wl-dot { fill: var(--ink); }
.wl-n { fill: var(--bg); font: 700 12px var(--f-data); }
.wl-leg { display: grid; gap: 4px; }
.wl-leg li { display: grid; grid-template-columns: 28px 1fr auto; gap: var(--s-3); align-items: center; padding: 10px 12px; background: var(--raised); border-radius: 4px; font-size: 0.9375rem; }
.wl-b { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--bg); font-weight: 700; }
.wl-leg b { color: var(--gold-ink); font-size: var(--t-sm); }

/* Noisica noise bars */
.noise-in { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); background: var(--raised); border-radius: var(--r); padding: var(--s-5); margin-bottom: var(--s-4); }
.nb-row { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 4px; align-items: end; height: 200px; }
.nb { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; gap: 6px; }
.nb i { display: block; width: 100%; height: 100%; background: var(--ink-3); border-radius: 3px 3px 1px 1px; transform-origin: bottom; transform: scaleY(var(--v, 0.02)); transition: transform 320ms var(--ease); }
.nb-hi i { background: var(--gold); }
.nb b { color: var(--ink-3); font-size: 0.62rem; text-align: center; writing-mode: vertical-rl; transform: rotate(180deg); height: 34px; flex: none; }
.noise .ro-row { margin-top: var(--s-4); }

/* Correxa table */
.qec { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--s-4); align-items: start; }
.qec .vis-cap { grid-column: 1 / -1; margin-top: 0; }
.qec-sum { font-size: var(--t-sm); color: var(--ink-2); }
.qec-sum b { color: var(--ink); font-size: 1rem; }
.qec-t { min-width: 440px; }
.qec-t tbody th, .qec-t tbody td { padding: 7px 16px; }
.qec-t tr.is-min { background: var(--gold); }
.qec-t tr.is-min th, .qec-t tr.is-min td { color: var(--on-gold); }
.qec-t td[data-ok] { font-size: var(--t-sm); }

/* filters and lists */
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s-4); }
.fchip { border: 0; background: var(--raised); color: var(--ink-2); font-weight: 500; font-size: var(--t-sm); padding: 8px 14px; border-radius: var(--r-sm); }
.fchip:hover { background: var(--sunk-2); color: var(--ink); }
.fchip[aria-pressed="true"] { background: var(--gold); color: var(--on-gold); }
.q-list { display: grid; gap: 4px; }
.q-row { display: grid; grid-template-columns: 80px minmax(0, 1.2fr) 130px minmax(0, 1fr) 64px; gap: var(--s-4); align-items: center; padding: 14px var(--s-5); background: var(--raised); border-radius: var(--r-sm); font-size: 0.9375rem; }
.q-lb .q-row { grid-template-columns: 80px minmax(0, 1fr) 110px minmax(0, 1.2fr) 84px; }
.q-row[hidden] { display: none; }
.q-id, .q-c { color: var(--ink-3); }
.q-c { text-align: right; }
.q-loc { color: var(--ink-2); font-size: var(--t-sm); }

/* calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--s-4); }
.calc-in { background: var(--raised); border-radius: var(--r); padding: var(--s-6); display: grid; gap: var(--s-5); align-content: start; }
.calc-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); align-items: start; }
.calc .vis-cap { grid-column: 1 / -1; margin-top: 0; }
.calc label, .noise label, .qec label { display: flex; justify-content: space-between; gap: var(--s-3); }
.calc output, .noise output, .qec output { color: var(--ink); font-weight: 600; font-size: var(--t-sm); }
input[type="range"] { width: 100%; accent-color: var(--gold); height: 28px; }

/* ladder, roadmap, roles */
.ladder { display: grid; gap: 4px; }
.ladder li { display: grid; grid-template-columns: 44px 1fr; gap: 4px var(--s-3); padding: var(--s-4) var(--s-5); background: var(--raised); border-radius: var(--r-sm); }
.ladder li .data { grid-row: span 2; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 28px; border-radius: 4px; background: var(--sunk-2); color: var(--ink-2); font-weight: 600; }
.ladder li p { color: var(--ink-2); font-size: 0.9375rem; }
.ladder .is-on { background: var(--gold-soft); }
.ladder .is-on .data { background: var(--gold); color: var(--on-gold); }
.roadmap { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-3); }
.roadmap li { background: var(--raised); border-radius: var(--r); padding: var(--s-5); display: grid; gap: var(--s-2); align-content: start; }
.roadmap li > .data { color: var(--ink-3); }
.roadmap li p { color: var(--ink-2); font-size: 0.9375rem; }
.roadmap .is-now { background: var(--gold); }
.roadmap .is-now > .data, .roadmap .is-now p, .roadmap .is-now .h3 { color: var(--on-gold); }
.roles { display: grid; gap: 4px; }
.role { display: grid; grid-template-columns: 1fr 110px 180px; gap: var(--s-4); align-items: center; padding: var(--s-4) var(--s-5); background: var(--raised); border-radius: var(--r-sm); }
.role .data { color: var(--ink-3); }
.role span:last-child { color: var(--ink-2); font-size: var(--t-sm); }

/* leaders */
.leaders { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.leader { flex-direction: row; gap: var(--s-5); align-items: flex-start; }
.avatar { width: 96px; height: 96px; border-radius: var(--r); background: var(--sunk-2); color: var(--ink-3); overflow: hidden; flex: none; display: flex; align-items: flex-end; justify-content: center; }
.avatar svg { width: 84px; height: 84px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.leader > div:last-child { display: grid; gap: var(--s-2); }
.leader-vision { background: var(--bg); border-radius: var(--r-sm); padding: var(--s-3) var(--s-4); }
.leader-links { display: flex; gap: var(--s-2); }
.icon-link { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: var(--r-sm); background: var(--sunk-2); color: var(--ink); }
.icon-link:hover { background: var(--gold); color: var(--on-gold); }
.icon-link svg { width: 18px; height: 18px; }

/* forms */
.form { display: grid; gap: var(--s-4); background: var(--raised); border-radius: var(--r); padding: var(--s-6); }
.form .btn { justify-self: start; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.field { display: grid; gap: 6px; align-content: start; }
.field label { font-weight: 500; font-size: 0.9375rem; }
.opt { font-weight: 400; color: var(--ink-3); font-size: var(--t-sm); }
.field input:not([type="range"]), .field select, .field textarea { width: 100%; min-height: 46px; padding: 10px 14px; background: var(--raised); border: 1.5px solid var(--field); border-radius: var(--r-sm); }
.field textarea { resize: vertical; min-height: 110px; }
.field input:not([type="range"]):hover, .field select:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--ink); }
.hint { font-size: var(--t-sm); color: var(--ink-3); }
.err { font-size: var(--t-sm); color: var(--red); font-weight: 600; }
.err:empty { display: none; }
.has-err input, .has-err select, .has-err textarea { border-color: var(--red) !important; }
.form-ok { padding: var(--s-4); border-radius: var(--r-sm); background: var(--gold-soft); font-weight: 500; }
.mails { display: grid; gap: 4px; }
.mails li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2); padding: var(--s-4) var(--s-5); background: var(--raised); border-radius: var(--r-sm); }
.mails .data { font-size: var(--t-sm); }
.signin .form { max-width: 460px; margin-left: auto; }

/* plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); align-items: stretch; }
.plan { background: var(--raised); border-radius: var(--r); padding: var(--s-6); display: flex; flex-direction: column; gap: var(--s-4); }
.plan > p:not(.card-k) { color: var(--ink-2); }
.plan .btn { margin-top: auto; align-self: flex-start; }
.plan .ticks { font-size: 0.9375rem; }
.plan-hl { background: var(--gold-soft); }
.plan-hl .btn-go { background: var(--gold); color: var(--on-gold); }
.plan-hl .btn-go:hover { background: var(--ink); color: var(--bg); }

/* mini panels and segment cards */
.mini { display: grid; gap: 4px; }
.mini-r { display: grid; grid-template-columns: 76px 1fr auto; gap: var(--s-3); align-items: center; padding: 10px 12px; background: var(--raised); border-radius: 4px; font-size: 0.9375rem; }
.mini-r > .data:first-child { color: var(--ink-3); }
.mini-r b { font-weight: 600; color: var(--gold-ink); }
.mini-s { color: var(--ink-3); font-size: var(--t-sm); }
.mini .vis-cap { margin-top: var(--s-3); }
.seg-vp .vp-in { padding: var(--s-8); }
.seg-card { display: grid; gap: var(--s-2); justify-items: start; }
.seg-card .glyph-xl { margin-bottom: var(--s-3); background: var(--raised); }
.seg-card .data { color: var(--ink-3); }
.seg-card p:last-child { color: var(--ink-2); }
.chat { max-width: 760px; }
.split .chat, .ph-side .chat { margin-top: 0; }

/* ------------------------------------------------ footer */
.site-footer { background: var(--bg); padding: var(--s-16) 0 var(--s-10); }
.foot { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: var(--s-8); }
.foot-brand p { color: var(--ink-2); margin-top: var(--s-4); max-width: 30ch; }
.foot-mail { display: flex; align-items: center; gap: 8px; }
.foot-mail svg { width: 18px; height: 18px; color: var(--ink); }
.foot-mail .data { font-size: var(--t-sm); color: var(--ink); }
.foot-col h2 { font: 600 var(--t-xs) var(--f-data); color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: var(--s-4); }
.foot-col ul { display: grid; gap: 10px; }
.foot-col a { color: var(--ink-2); font-size: 0.9375rem; }
.foot-col a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.foot-word { margin: var(--s-12) 0 var(--s-6); }
.foot-word svg { width: 100%; height: auto; }
.foot-word .fw { font-family: var(--f-display); font-weight: 400; letter-spacing: -4px; fill: var(--ink); }
.foot-word .mw-hi { fill: var(--gold); transform-box: fill-box; transform-origin: bottom; }
.foot-word .mw-lo { fill: var(--sunk-2); }
.foot-base { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); color: var(--ink-3); font-size: var(--t-sm); }

/* ------------------------------------------------ reveal (transform only; content is always visible) */
@media (prefers-reduced-motion: no-preference) {
  .js .rv { transform: translateY(18px); transition: transform 600ms var(--ease); }
  .js .rv.is-in { transform: none; }
  .foot-word .mw-hi { animation: measure 4.8s var(--ease) infinite; }
  .foot-word .mw-hi:last-of-type { animation-delay: 2.4s; }
}
@keyframes measure { 0%, 40%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.62); } 60% { transform: scaleY(1.08); } 70% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------ responsive */
@media (max-width: 1480px) {
  .theme-t { display: none; }
  .theme { padding: 0 10px; }
}
@media (max-width: 1180px) {
  .prow { grid-template-columns: 32px auto 1fr 100px 24px; }
  .prow-line { display: none; }
  .q-row, .q-lb .q-row { grid-template-columns: 80px minmax(0, 1fr) 120px 64px; }
  .q-row .q-loc { display: none; }
}
@media (max-width: 1200px) {
  .icon-btn { display: inline-flex; }
  .nav-main { position: fixed; inset: 72px 0 0 0; background: var(--bg); padding: var(--s-4) var(--gutter) var(--s-10); overflow-y: auto; display: none; z-index: 49; }
  .nav-main.is-open { display: block; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link, .nav-menu-btn { width: 100%; justify-content: space-between; padding: 14px 14px; font-size: 1.0625rem; border-radius: var(--r-sm); }
  .nav-menu { position: static; width: auto; outline: 0; background: var(--raised); margin: 4px 0 8px; }
  .panel-only { display: block; }
  .panel-only .btn { width: 100%; margin-top: var(--s-3); }
  .site-header .nav-tools .nav-account, .site-header .nav-tools .nav-cta { display: none; }
  .hero-grid, .page-hero.has-side .ph { grid-template-columns: 1fr; }
  .g-4, .stack { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .foot { grid-template-columns: repeat(2, 1fr); }
  .foot-brand { grid-column: 1 / -1; }
  .loop-l { grid-template-columns: repeat(3, 1fr); }
  .calc, .qec, .wall { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .g-3, .plans, .leaders, .faq, .split { grid-template-columns: 1fr; }
  .split-alt > div:first-child { order: 0; }
  .cta-block { grid-template-columns: 1fr; }
  .cta-mark { width: 80px; }
  .con-body { grid-template-columns: 1fr; }
  .role { grid-template-columns: 1fr auto; }
  .role span:last-child { grid-column: 1 / -1; }
  .foot-base { grid-template-columns: 1fr; }
  .calc-out { grid-template-columns: 1fr; }
  .noise-in { grid-template-columns: 1fr; }
  .signin .form { margin-left: 0; }
  .nb-row { height: 160px; gap: 2px; }
}
@media (max-width: 640px) {
  .g-2, .g-4, .stack, .steps, .form-2, .loop-l { grid-template-columns: 1fr; }
  .prow { grid-template-columns: auto 1fr 24px; padding: var(--s-4); }
  .prow-n, .prow-verb { display: none; }
  .q-row, .q-lb .q-row { grid-template-columns: 1fr auto; gap: var(--s-2) var(--s-3); }
  .q-row .q-sig { grid-column: 1 / -1; grid-row: 2; }
  .q-row .q-c { display: none; }
  .theme-t { display: none; }
  .theme { padding: 0 10px; }
  .bar { gap: var(--s-3); }
  .ro-row { grid-auto-flow: row; }
  .mini-r { grid-template-columns: 1fr auto; }
  .mini-r > :first-child { grid-column: 1 / -1; }
  .vp-in { padding: var(--s-3); }
  .foot { grid-template-columns: 1fr 1fr; gap: var(--s-6); }
  .leader { flex-direction: column; }
  .btn-row .btn { flex: 1 1 auto; }
  .amp-bar { height: 90px; }
  .amp-ph { width: 16px; height: 16px; }
  .amp-ph i { width: 7px; }
  .nb b { display: none; }
  .con-main, .con-side { padding: var(--s-3); }
}
.ro-row { grid-auto-flow: column; }

/* ================================================ brand icons + theme toggle (Qubova) */
/* Icons: cryostat-stage menu (three plates, each narrower), sideways-ket caret, envelope with a die stamp,
   "in" knocked out of a qubit disc with a die at its corner, avatar with a ring head and die shoulders.
   All carry data-icon and inherit currentColor. */
[data-icon] { flex: none; }
[data-icon="menu"] { width: 22px; height: 22px; }
[data-icon="caret"] { width: 11px; height: 11px; }
[data-icon="mail"], [data-icon="linkedin"] { width: 18px; height: 18px; }

/* Theme toggle: a tiny cryostat. 300 K = room temperature, the stages sit unlit.
   10 mK = cold: the mixing chamber and its plate glow gold. */
.theme { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 10px; border: 0; border-radius: var(--r-sm); background: var(--raised); color: var(--ink); font: 600 var(--t-xs) var(--f-data); white-space: nowrap; }
.theme:hover { background: var(--sunk-2); }
.theme-k { display: inline-flex; flex: none; }
.theme-k svg { width: 20px; height: 22px; }
.theme-k .tk-s { fill: var(--ink); }
.theme-k .tk-c, .theme-k .tk-b { fill: var(--ink-3); transition: fill var(--dur) var(--ease); }
.theme-t .t-d { display: none; }
.theme[aria-pressed="true"] .tk-c, .theme[aria-pressed="true"] .tk-b { fill: var(--gold); }
.theme[aria-pressed="true"] .t-l { display: none; }
.theme[aria-pressed="true"] .t-d { display: inline; }
/* soft buttons sitting on a raised surface step down to the track colour */
.plan .btn-soft, .card .btn-soft, .form .btn-soft, .con-side .btn-soft { background: var(--sunk-2); }
.plan .btn-soft:hover, .card .btn-soft:hover { background: var(--gold-soft); }
