/* quantumdev.io — page styles on top of the Quantum Design System tokens.
   Every value is a token; the few literal numbers (icon sizes, the 2px underline
   offset, the circuit geometry) are the kit's own. */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body { min-height: 100vh; }

/* Utility roles from the website kit */
.mono { font: var(--type-mono-sm); color: var(--text-secondary); }
.eyebrow { font: var(--type-eyebrow); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-tertiary); }

/* The lockup — Jost 400, uppercase, +0.05em. Locked in the design system. */
.lock { margin: 0; font: 400 clamp(18px, 1.6vw, 24px)/1.2 var(--font-hero); letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-primary); }

/* Mark (assets/logo-currentColor.svg inlined): monochrome, axis-aligned, currentColor */
.mark { display: inline-flex; flex-shrink: 0; width: 20px; height: 20px; color: var(--text-primary); }
.mark svg { width: 100%; height: 100%; }

/* ---------- Nav: sticky 56px glass bar, hairline bottom ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-height);
  background: color-mix(in srgb, var(--bg-canvas) 80%, transparent);
  -webkit-backdrop-filter: var(--blur-nav); backdrop-filter: var(--blur-nav);
  border-bottom: var(--line-thin) solid var(--border-hairline);
}
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--space-8); }
.nav-home { display: inline-flex; align-items: center; color: var(--text-primary); border-radius: var(--radius-xs); }
.nav-home:hover { color: var(--text-primary); text-decoration: none; }
.nav-links { display: flex; gap: var(--space-8); margin-left: auto; }
.nav-links a {
  font: var(--type-label); color: var(--text-secondary); text-decoration: none;
  height: var(--nav-height); display: inline-flex; align-items: center;
  border-bottom: var(--line-thin) solid transparent; margin-bottom: -1px;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.nav-links a:hover { color: var(--text-primary); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--text-primary); border-bottom-color: var(--accent); }
.nav-signup {
  margin-left: var(--space-10); font: var(--type-label); color: var(--text-primary); text-decoration: none;
  border-bottom: var(--line-thin) solid var(--text-primary); padding-bottom: 2px;
}
.nav-signup:hover { color: var(--text-link-hover); border-bottom-color: var(--text-link-hover); text-decoration: none; }
.nav-theme { margin-left: var(--space-6); position: relative; display: inline-flex; }

/* IconButton, ghost, sm (28px) */
.icon-button {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: var(--control-h-sm); height: var(--control-h-sm); padding: 0; border-radius: var(--radius-md);
  background: transparent; color: var(--text-secondary); border: var(--line-thin) solid transparent; cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.icon-button:hover { background: var(--surface-accent-subtle); color: var(--text-primary); }
.icon-button:active { background: var(--surface-accent-muted); }
.icon-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-button .icon-sun { display: none; }
html:not([data-theme="light"]) .icon-button .icon-sun { display: block; }
html:not([data-theme="light"]) .icon-button .icon-moon { display: none; }

/* Tooltip: inverted, arrow-less, one short line */
.tooltip {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  z-index: 50; pointer-events: none; white-space: nowrap; padding: 5px 8px; border-radius: var(--radius-sm);
  background: var(--text-primary); color: var(--bg-canvas); font: var(--type-caption); font-weight: 500; line-height: 14px;
  opacity: 0; transition: opacity var(--dur-fast) var(--ease-out);
}
.nav-theme:hover .tooltip, .nav-theme:has(:focus-visible) .tooltip { opacity: 1; }
/* Dark only: the 80% glass over the matte-white mark body leaves nav items under 4.5:1; a denser mix passes (site addition). */
html:not([data-theme="light"]) .nav { background: color-mix(in srgb, var(--bg-canvas) 95%, transparent); }
/* Forced-colors mode drops box-shadow, so give the ring a transparent outline it can recolour. */
:focus-visible { outline: var(--line-bold) solid transparent; outline-offset: 2px; }
.tooltip-light { display: none; }
html:not([data-theme="light"]) .tooltip-light { display: inline; }
html:not([data-theme="light"]) .tooltip-dark { display: none; }

/* ---------- Hero: the mark is the only object ---------- */

.hero {
  position: relative; height: calc(100vh - var(--nav-height)); height: calc(100svh - var(--nav-height));
  min-height: 620px; background: var(--bg-canvas); overflow: hidden;
}
hero-glass-mark { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
hero-glass-mark:not(:defined) { visibility: hidden; }
.hero-mark-canvas { display: block; width: 100%; height: 100%; }
.hero-lockup {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: var(--space-8);
  padding: 0 var(--space-8) var(--space-10); pointer-events: none;
}
.hero-lockup h1 {
  margin: 0; font: 400 clamp(20px, 2.1vw, 30px)/1.15 var(--font-hero); letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-primary); white-space: nowrap; pointer-events: auto;
}
/* Pause control for the turning mark (WCAG 2.2.2): the system's plain text action, quiet at the hero's far edge. */
.hero-pause {
  margin-left: auto; pointer-events: auto; font: var(--type-label); color: var(--text-secondary);
  background: transparent; border: 0; border-bottom: var(--line-thin) solid transparent; border-radius: var(--radius-xs); padding: 0 0 2px; cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.hero-pause:hover { color: var(--text-primary); border-bottom-color: var(--text-primary); }
.hero-pause .when-paused { display: none; }
.hero-pause[aria-pressed="true"] .when-playing { display: none; }
.hero-pause[aria-pressed="true"] .when-paused { display: inline; }

/* ---------- The four products: lockup + one line on a hairline ---------- */

.states { padding: 0 var(--space-8); margin-top: var(--space-32); }

.states-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--space-8); align-items: end;
  margin-bottom: var(--space-12);
}
.states-title { display: grid; gap: var(--space-3); }
.states-title .lock { text-wrap: balance; }

/* Circuit motif — hairline wires with 24px gate boxes, the brand's section device */
.circuit { width: 100%; max-width: 520px; height: auto; display: block; justify-self: end; overflow: visible; }
.circuit .wire { stroke: var(--wire); stroke-width: 1; vector-effect: non-scaling-stroke; }
.circuit .gate { fill: var(--bg-canvas); stroke: var(--border-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.circuit .gate-label, .circuit .wire-label { font: var(--type-mono-sm); fill: var(--text-primary); }
.circuit .wire-label { fill: var(--text-secondary); }
.circuit .ctrl { fill: var(--text-primary); }
.circuit .target { fill: var(--bg-canvas); stroke: var(--text-primary); stroke-width: 1; vector-effect: non-scaling-stroke; }

.rows { display: grid; }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: var(--space-8); align-items: baseline;
  padding: var(--space-8) 0; border-top: var(--line-thin) solid var(--border-hairline);
  text-decoration: none; color: inherit;
  transition: background var(--dur-fast) var(--ease-out);
}
.row p { margin: 0; font: var(--type-body-sm); color: var(--text-tertiary); text-wrap: pretty; max-width: 36em; transition: color var(--dur-fast) var(--ease-out); }
.row .mono { justify-self: end; white-space: nowrap; }
a.row:hover { color: inherit; text-decoration: none; }
a.row:hover p { color: var(--text-secondary); }
a.row:hover .mono { color: var(--text-primary); }
/* Dark only: the system's dark tertiary tier is 3.07:1 on the canvas, under AA for 13px text; step the description one tier up there (site addition). */
html:not([data-theme="light"]) .row p { color: var(--text-secondary); }
html:not([data-theme="light"]) a.row:hover p { color: var(--text-primary); }
a.row:focus-visible { border-radius: var(--radius-xs); }
.rows-end { border-top: var(--line-thin) solid var(--border-hairline); }

/* Badge — outlined, uppercase, read-only status (neutral tone) */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 7px; border-radius: var(--radius-sm);
  border: var(--line-thin) solid var(--border-default); color: var(--text-secondary);
  font: var(--type-eyebrow); font-size: var(--text-2xs); letter-spacing: var(--tracking-wide); text-transform: uppercase; white-space: nowrap;
  justify-self: end; align-self: center;
}
.row.is-soon .lock { color: var(--text-secondary); }

/* ---------- Footer: hairline top, mark, links, one mono line ---------- */

.footer { margin-top: var(--space-32); border-top: var(--line-thin) solid var(--border-hairline); padding: var(--space-10) var(--space-8); display: grid; gap: var(--space-16); }
.footer-top { display: flex; align-items: center; gap: var(--space-8); flex-wrap: wrap; }
.footer-links { display: flex; gap: var(--space-8); margin-left: auto; flex-wrap: wrap; }
.footer-links a { font: var(--type-label); color: var(--text-secondary); text-decoration: none; }
.footer-links a:hover { color: var(--text-primary); text-decoration: none; }
.footer-social { display: inline-flex; width: 16px; height: 16px; color: var(--text-secondary); border-radius: var(--radius-xs); }
.footer-social:hover { color: var(--text-primary); }
.footer-social svg { width: 100%; height: 100%; }
.footer-bottom { display: flex; align-items: baseline; gap: var(--space-4) var(--space-8); flex-wrap: wrap; }
.footer-legal { display: flex; gap: var(--space-6); }
.footer-legal a { font: var(--type-caption); color: var(--text-secondary); text-decoration: none; }
.footer-legal a:hover, .footer-legal a[aria-current="page"] { color: var(--text-primary); text-decoration: none; }
.footer-domain { margin-left: auto; }

/* ---------- Content pages (privacy/, terms/ as .legal; events/ as .page): the products layout, read as prose ----------
   Head: mono label, the hero-size lockup, a mono date, one lede. Then sections on hairlines in the
   rows' 1fr / 2fr grid: title left, text right, 40em measure. */

.legal, .page { padding: var(--space-24) var(--space-8) 0; }
.legal-head, .page-head { display: grid; gap: var(--space-4); padding-bottom: var(--space-16); }
.legal-head h1, .page-head h1 { margin: 0; font: 400 clamp(20px, 2.1vw, 30px)/1.15 var(--font-hero); letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-primary); }
.legal-head .lede, .page-head .lede { margin: var(--space-4) 0 0; font: var(--type-body-lg); color: var(--text-secondary); max-width: 36em; text-wrap: pretty; }
.legal-section, .page-section {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--space-8);
  padding: var(--space-8) 0; border-top: var(--line-thin) solid var(--border-hairline); scroll-margin-top: var(--nav-height);
}
.legal-section h2, .page-section h2 { margin: 0; font: var(--weight-medium) var(--text-md)/var(--leading-snug) var(--font-body); color: var(--text-primary); }
.legal-body, .page-body { max-width: 40em; font: var(--type-body); color: var(--text-secondary); text-wrap: pretty; }
.legal-body > *, .page-body > * { margin: 0; }
.legal-body > * + *, .page-body > * + * { margin-top: var(--space-4); }
.legal-body ul, .page-body ul { padding-left: 1.1em; }
.legal-body li + li, .page-body li + li { margin-top: var(--space-2); }
.legal-body li::marker, .page-body li::marker { color: var(--text-tertiary); }
.legal-body dt, .page-body dt { font-weight: var(--weight-medium); color: var(--text-primary); }
.legal-body dt:not(:first-child), .page-body dt:not(:first-child) { margin-top: var(--space-5); }
/* A linked term (the consent line links /privacy/#email-list) lands below the sticky nav. */
.legal-body dt[id] { scroll-margin-top: calc(var(--nav-height) + var(--space-6)); }
.legal-body dd, .page-body dd { margin: var(--space-1) 0 0; }
.legal-body strong, .page-body strong { font-weight: var(--weight-medium); color: var(--text-primary); }
.legal-body a, .page-body a, .legal-head a, .page-head a { color: var(--text-primary); text-decoration: underline; text-decoration-thickness: var(--line-thin); text-underline-offset: 2px; }
.legal-body a:hover, .page-body a:hover, .legal-head a:hover, .page-head a:hover { color: var(--text-link-hover); }
.legal-end, .page-end { border-top: var(--line-thin) solid var(--border-hairline); }

/* ---------- The list sign-up (capture.js): one dialog, drawn as a one-qubit circuit ----------
   The address is the state, written as a ket |you@example.com⟩ whose closing bracket follows the text; a 1px wire
   runs from it into the Join button, the measurement. Submitting runs the circuit once: the wire draws in ink and
   the meter's needle swings back and forth. Above 720px it is a modal over the nav's glass; below, a sheet at the
   foot of the screen. No shadow: the backdrop's blur and a default border separate it, as the nav's glass does.
   The invitation (.capture-invite) is the small first surface for phones and search arrivals. */

.capture {
  width: min(560px, calc(100vw - 2 * var(--space-5))); max-width: none; max-height: calc(100dvh - 2 * var(--space-5));
  margin: auto; padding: 0; overflow: auto; overscroll-behavior: contain;
  color: var(--text-body); background: var(--bg-canvas);
  border: var(--line-thin) solid var(--border-default); border-radius: var(--radius-lg);
  opacity: 1;
  transition: opacity var(--dur-base) var(--ease-out), overlay var(--dur-base) allow-discrete, display var(--dur-base) allow-discrete;
}
.capture:not([open]) { opacity: 0; }
@starting-style { .capture[open] { opacity: 0; } }
.capture::backdrop {
  overflow: hidden; overscroll-behavior: contain;
  background: color-mix(in srgb, var(--bg-canvas) 72%, transparent);
  -webkit-backdrop-filter: var(--blur-nav); backdrop-filter: var(--blur-nav);
  opacity: 1;
  transition: opacity var(--dur-slow) var(--ease-out), overlay var(--dur-slow) allow-discrete, display var(--dur-slow) allow-discrete;
}
.capture:not([open])::backdrop { opacity: 0; }
@starting-style { .capture[open]::backdrop { opacity: 0; } }

.capture-bar {
  display: flex; align-items: center; gap: var(--space-3); height: 48px;
  padding: 0 var(--space-3) 0 var(--space-8); border-bottom: var(--line-thin) solid var(--border-hairline);
}
.capture-close { margin-left: auto; }

.capture-step { padding: var(--space-8) var(--space-8) var(--space-8); }
.capture-step[hidden] { display: none; }
.capture-title {
  margin: 0; max-width: 15em; font: 400 clamp(22px, 2.2vw, 28px)/1.15 var(--font-hero); letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--text-primary); text-wrap: balance;
}
.capture-title:focus { outline: none; box-shadow: none; }
.capture-lede { margin: var(--space-4) 0 0; max-width: 34em; font: var(--type-body); color: var(--text-secondary); text-wrap: pretty; }

.capture-form { margin-top: var(--space-8); }
.capture-label { display: block; margin-bottom: var(--space-2); font: var(--type-label); color: var(--text-primary); }
.capture-circuit { display: flex; align-items: center; }

/* The ket. Its bars are the field's edges, in secondary ink at rest (over 3:1 for a control's boundary) and ink in focus. */
.ket { --ket-x: 0px; --ket-ink: var(--text-secondary); position: relative; flex: 1; min-width: 0; height: var(--control-h-lg); border-radius: var(--radius-xs); }
.ket::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: var(--line-thin); background: var(--ket-ink); }
/* The field's box ends 22px short of the ket's right edge: a long address scrolls inside it and never runs under the bracket,
   which sits in that strip once the text reaches it. */
.ket input {
  display: block; width: calc(100% - 22px); height: 100%; margin: 0; padding: 0 2px 0 10px; border: 0; border-radius: var(--radius-xs);
  background: transparent; color: var(--text-primary); caret-color: var(--text-primary);
  font: 400 15px/1 var(--font-mono); letter-spacing: 0; outline: none;
}
.ket input::placeholder { color: var(--text-tertiary); opacity: 1; }
/* Dark only: the dark tertiary grey is 3.07:1 on the dialog, under 4.5:1 for the placeholder (site addition, as on the rows). */
html:not([data-theme="light"]) .ket input::placeholder { color: var(--text-secondary); }
.ket::after {
  content: ""; position: absolute; top: 10px; left: 0; width: 8px; height: calc(100% - 20px);
  transform: translateX(calc(var(--ket-x) + 2px)); transition: transform var(--dur-fast) var(--ease-out);
  background: var(--ket-ink); pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 24' preserveAspectRatio='none'%3E%3Cpath d='M.6.3 7.4 12 .6 23.7' fill='none' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 24' preserveAspectRatio='none'%3E%3Cpath d='M.6.3 7.4 12 .6 23.7' fill='none' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.ket-wire {
  position: absolute; top: 50%; right: 0; left: calc(var(--ket-x) + 16px); height: var(--line-thin);
  background: var(--wire); pointer-events: none; transition: left var(--dur-fast) var(--ease-out);
}
.ket-wire::after {
  content: ""; position: absolute; inset: 0; background: var(--text-primary);
  transform: scaleX(0); transform-origin: left; transition: transform var(--dur-slow) var(--ease-out);
}
/* Focus and error darken the bars to ink and double the opening bar, instead of boxing the field in the offset ring:
   the ket keeps its shape, and the caret, the ink bars and the 2px bar mark where typing goes (site addition). */
.ket:focus-within, .ket.is-invalid { --ket-ink: var(--text-primary); }
.ket:focus-within::before, .ket.is-invalid::before { width: var(--line-bold); }
.ket input:focus-visible { box-shadow: none; }
.ket.is-running .ket-wire::after, .ket.is-measured .ket-wire::after { transform: scaleX(1); }

/* Join: the measurement gate. The system's satin primary at 44px, gate-box corners. */
.capture-button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); flex-shrink: 0;
  height: var(--control-h-lg); padding: 0 var(--space-5); border: 0; border-radius: var(--radius-xs);
  background: var(--accent); color: var(--text-on-accent); font: var(--type-label); cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
.capture-button:hover { background: var(--accent-hover); }
.capture-button:active { background: var(--accent-active); }
.capture-button:focus-visible { box-shadow: var(--shadow-focus); }
.capture-submit { padding-left: var(--space-4); }
.capture-submit:disabled { cursor: progress; }
.capture-submit .meter { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; overflow: visible; }
.capture-submit .needle { transform-box: view-box; transform-origin: 12px 18px; transform: rotate(40deg); transition: transform var(--dur-slow) var(--ease-out); }
.capture-submit[aria-busy="true"] .needle { transform: rotate(-40deg); }
.capture-submit.is-measured .needle { transform: rotate(40deg); }

.capture-error { margin: var(--space-3) 0 0; font: var(--type-body-sm); color: var(--text-primary); }
.capture-error:empty { display: none; }
.capture-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.capture-fine { margin: var(--space-6) 0 0; max-width: 40em; font: var(--type-caption); color: var(--text-tertiary); text-wrap: pretty; }
.capture-fine a { color: var(--text-secondary); text-decoration: underline; text-decoration-thickness: var(--line-thin); text-underline-offset: 2px; }
.capture-fine a:hover { color: var(--text-primary); }
/* Dark only: the dark tertiary grey is under 4.5:1 for 12px text, as on the rows (site addition). */
html:not([data-theme="light"]) .capture-fine { color: var(--text-secondary); }

/* After joining: the address, written back as the ket it was entered in. */
.capture-ket { margin-left: 2px; padding-left: 4px; border-left: var(--line-thin) solid currentColor; font: 400 0.94em/1 var(--font-mono); color: var(--text-primary); overflow-wrap: anywhere; }
.capture-ket::after {
  content: ""; display: inline-block; width: 6px; height: 1.1em; margin-left: 3px; vertical-align: -0.2em; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 24' preserveAspectRatio='none'%3E%3Cpath d='M.6.3 7.4 12 .6 23.7' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 24' preserveAspectRatio='none'%3E%3Cpath d='M.6.3 7.4 12 .6 23.7' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.capture-interest { margin: var(--space-8) 0 0; padding: 0; border: 0; min-width: 0; }
.capture-interest legend { padding: 0; margin-bottom: var(--space-3); font: var(--type-label); line-height: var(--leading-normal); color: var(--text-primary); }
.capture-interest legend span { font-weight: var(--weight-regular); color: var(--text-secondary); }
.capture-choices { display: flex; flex-wrap: wrap; gap: var(--space-2); }
/* The tools question: two even columns, so eight names read as one set (choose all that apply). */
.capture-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.capture-grid .capture-choice { width: 100%; height: auto; min-height: var(--control-h-md); padding-block: var(--space-2); line-height: 1.3; text-align: left; }
.capture-interest + .capture-interest { margin-top: var(--space-6); }
.capture-choice {
  height: var(--control-h-md); padding: 0 var(--space-3); border: var(--line-thin) solid var(--border-strong); border-radius: var(--radius-xs);
  background: transparent; color: var(--text-secondary); font: var(--type-body-sm); cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.capture-choice:hover { color: var(--text-primary); background: var(--surface-accent-subtle); }
.capture-choice[aria-pressed="true"] { color: var(--text-on-accent); background: var(--accent); border-color: var(--accent); }
.capture-choice:focus-visible { box-shadow: var(--shadow-focus); }
.capture-done { margin-top: var(--space-8); }

/* "Join the list" in the nav and on Events: the system's plain text action, as a button that opens the dialog. */
.text-action {
  padding: 0 0 2px; border: 0; border-bottom: var(--line-thin) solid currentColor; border-radius: 0; background: transparent;
  font: var(--type-label); color: var(--text-primary); cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out);
}
.text-action:hover { color: var(--text-link-hover); }
/* padding-top matches the underline's padding and border below, so the label sits on the same line as Shop and Events. */
.nav-join { margin-left: var(--space-10); padding-top: 3px; }

/* The invitation: one line on the bottom edge (a corner panel above 720px). It covers no content the visitor came for. */
.capture-invite {
  position: fixed; z-index: 60; right: var(--space-6); bottom: var(--space-6); width: min(440px, calc(100vw - 2 * var(--space-6)));
  display: flex; align-items: center; gap: var(--space-4); padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5);
  background: var(--bg-canvas); color: var(--text-body);
  border: var(--line-thin) solid var(--border-default); border-radius: var(--radius-lg);
  animation: capture-in var(--dur-base) var(--ease-out);
}
.capture-invite-text { flex: 1; margin: 0; font: var(--type-body-sm); color: var(--text-primary); text-wrap: pretty; }
.capture-invite .capture-button { height: var(--control-h-md); padding: 0 var(--space-4); }
@keyframes capture-in { from { opacity: 0; } }
/* On the home page it floats above the hero's bottom row, so the QDEV lockup and the Pause motion control stay visible. */
body:has(.hero) .capture-invite { bottom: 92px; }

/* Below 720px: the dialog is a sheet on the bottom edge, and the invitation a full-width bar. */
.capture.is-sheet {
  position: fixed; inset: auto 0 0 0; width: 100%; max-height: 88dvh; margin: 0;
  border-width: var(--line-thin) 0 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.capture.is-sheet .capture-bar { height: 44px; padding-left: var(--space-5); }
.capture.is-sheet .capture-step { padding: var(--space-5) var(--space-5) var(--space-6); }
.capture.is-sheet .capture-title { font-size: 20px; }
.capture.is-sheet .capture-lede { margin-top: var(--space-3); font: var(--type-body-sm); }
.capture.is-sheet .capture-form { margin-top: var(--space-5); }
.capture.is-sheet .ket input { font-size: 16px; } /* 16px stops iOS zooming into the field */
.capture.is-sheet .capture-fine { margin-top: var(--space-4); }
.capture.is-sheet .capture-interest, .capture.is-sheet .capture-done { margin-top: var(--space-6); }
.capture.is-sheet .capture-interest + .capture-interest { margin-top: var(--space-5); }

/* ---------- Confirmation page (confirm/, confirm.js): the list's circuit, measured ----------
   |0⟩, an X gate and a measurement on the site's circuit device. Confirming draws the wire after X in ink, swings the needle and
   sets the readout to 1: the result shows only once the server has recorded it. */

.confirm { display: grid; gap: var(--space-8); justify-items: start; padding: var(--space-10) 0; border-top: var(--line-thin) solid var(--border-hairline); }
.confirm-circuit { justify-self: start; max-width: 400px; }
.confirm-circuit .ket-stroke { fill: none; stroke: var(--text-secondary); stroke-width: 1; vector-effect: non-scaling-stroke; }
.confirm-circuit .ket-label, .confirm-circuit .readout { font: 400 15px/1 var(--font-mono); fill: var(--text-secondary); }
.confirm-circuit .meter, .confirm-circuit .needle { fill: none; stroke: var(--text-primary); stroke-width: 1.25; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.confirm-circuit .needle { transform-box: view-box; transform-origin: 250px 34px; transform: rotate(40deg); transition: transform var(--dur-slow) var(--ease-out); }
.confirm-circuit .classical { stroke: var(--wire); stroke-width: 1; vector-effect: non-scaling-stroke; }
.confirm-circuit .confirm-wire { transition: stroke var(--dur-slow) var(--ease-out); }
.confirm.is-running .needle { transform: rotate(-40deg); }
.confirm.is-measured .confirm-wire, .confirm.is-measured .classical { stroke: var(--text-primary); }
.confirm.is-measured .readout, .confirm.is-measured .ket-label { fill: var(--text-primary); }
.confirm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-6); }
.confirm-actions [hidden] { display: none; }

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .nav-inner, .hero-lockup, .states, .footer { padding-left: var(--space-5); padding-right: var(--space-5); }
  .nav-links { gap: var(--space-5); }
  .nav-signup, .nav-join { margin-left: var(--space-5); }
  .capture-invite { right: var(--space-3); bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px)); width: calc(100vw - 2 * var(--space-3)); gap: var(--space-3); padding: var(--space-3) var(--space-2) var(--space-3) var(--space-4); }
  body:has(.hero) .capture-invite { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .nav-theme { margin-left: var(--space-3); }
  .tooltip { left: auto; right: 0; transform: none; }
  .hero { min-height: 0; height: calc(100svh - var(--nav-height)); }
  .states-head { grid-template-columns: 1fr; gap: var(--space-10); }
  .circuit { justify-self: start; max-width: 100%; }
  .row { grid-template-columns: 1fr; gap: var(--space-3); padding: var(--space-6) 0; }
  .row .mono, .badge { justify-self: start; }
  .row p { max-width: none; }
  .footer-links { margin-left: 0; }
  .legal, .page { padding: var(--space-16) var(--space-5) 0; }
  .legal-section, .page-section { grid-template-columns: 1fr; gap: var(--space-3); padding: var(--space-6) 0; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .capture::backdrop { transition-duration: 0.01ms !important; } /* ::backdrop is not matched by the rule above */
}
