/* ==========================================================================
   Nexus · base.css
   Tokens, reset, type, layout, header, footer, components, utilities, motion.
   Owned by the foundation agent. Page styles live in assets/css/pages/<page>.css
   and must use the tokens below (never raw colors).
   Reference for every class: styleguide.html
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens (the only place raw colors are allowed)
   -------------------------------------------------------------------------- */
:root {
  color-scheme: dark;

  /* surfaces */
  --bg: #09090B;
  --bg-2: #0C0C0F;
  --panel: #121214;
  --raised: #1C1C1F;

  /* lines */
  --line: rgba(255, 255, 255, .07);
  --border: rgba(255, 255, 255, .10);
  --border-strong: rgba(255, 255, 255, .18);

  /* text */
  --text: #EDEDEF;
  --text-2: rgba(237, 237, 239, .62);
  --text-3: rgba(237, 237, 239, .42); /* decorative or large text only */

  /* accent + states */
  --accent: #66C7FA;
  --accent-ink: #041219;
  --accent-soft: rgba(102, 199, 250, .12);
  --ok: #3DD68C;
  --warn: #FFB547;
  --err: #FF5F57;
  --ok-soft: rgba(61, 214, 140, .12);
  --warn-soft: rgba(255, 181, 71, .12);
  --err-soft: rgba(255, 95, 87, .12);

  /* window dots (mac) */
  --dot-red: #FF5F57;
  --dot-yellow: #FEBC2E;
  --dot-green: #28C840;
  --dot-idle: rgba(255, 255, 255, .13);

  /* app mockups only */
  --app-blue: #4A90FF;
  --violet: #A08AF7;

  /* effects */
  --grid-line: rgba(255, 255, 255, .03);
  --highlight: rgba(255, 255, 255, .045);
  --glow: rgba(255, 255, 255, .035);
  --selection: rgba(102, 199, 250, .07);
  --scrim: rgba(9, 9, 11, .74);
  --shadow-deep: rgba(0, 0, 0, .55);

  /* type */
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --fs-display: clamp(40px, 6.2vw, 80px);
  --fs-h2: clamp(28px, 3.6vw, 46px);
  --fs-h3: 19px;
  --fs-lead: 17px;
  --fs-body: 15px;
  --fs-small: 13px;

  /* space */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  /* radii */
  --r-tag: 4px;
  --r-ctl: 6px;
  --r-card: 10px;
  --r-frame: 14px;

  /* motion */
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: 140ms;
  --t: 180ms;

  /* layout */
  --header-h: 64px;
  --gutter: 16px;
  --maxw: 1200px;
}
@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }

/* --------------------------------------------------------------------------
   2. Reset + base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  color: var(--text);
  scroll-padding-top: calc(var(--header-h) + 16px);
  scrollbar-color: var(--raised) var(--bg);
}
body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font: 400 var(--fs-body)/1.65 var(--mono);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
main { display: block; flex: 1 0 auto; }
img, svg, video, canvas, picture { display: block; max-width: 100%; }
img, video { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; border-radius: 0; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol, pre { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
:where(h1, h2, h3, h4) { font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; color: var(--text); text-wrap: balance; }
:where(h3) { font-size: var(--fs-h3); line-height: 1.3; letter-spacing: -0.015em; }
:where(p) { text-wrap: pretty; }
hr { border: 0; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--accent-ink); -webkit-text-fill-color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }

/* background: faint large-cell grid fading out from the top, plus whisper noise */
body::before,
body::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: min(1100px, 150vh);
  z-index: -1;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 0%, black 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 62% at 50% 0%, black 20%, transparent 78%);
}
body::before {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center -1px;
}
body::after {
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (max-width: 639px) { body::before { background-size: 56px 56px; } body::after { display: none; } }

/* symbol field (assets/js/symbolfield.js): interactive code-symbol background; replaces the grid lines */
.nx-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity .9s ease;
}
.nx-field.is-on { opacity: 1; }
html.has-field body::before { display: none; }
@media print { .nx-field { display: none; } }

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(760px + 2 * var(--gutter)); }
.container--wide { max-width: calc(1360px + 2 * var(--gutter)); }

.section { padding-block: var(--s-8); }
.section--tight { padding-block: var(--s-7); }
.section--lg { padding-block: var(--s-9); }
.section--line { border-top: 1px solid var(--line); }
@media (min-width: 820px) {
  .section { padding-block: var(--s-9); }
  .section--tight { padding-block: var(--s-8); }
  .section--lg { padding-block: var(--s-10); }
}
.section__head { max-width: 760px; margin-bottom: var(--s-7); }
.section__head > * + * { margin-top: var(--s-4); }
.section__head > .eyebrow + * { margin-top: 0; }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center .lead { margin-inline: auto; }

.grid-2, .grid-3 { display: grid; gap: var(--s-5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6); } }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6) var(--s-5); } }

.stack > * + * { margin-top: var(--stack, var(--s-4)); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster, var(--s-3)); }

/* --------------------------------------------------------------------------
   4. Typography
   -------------------------------------------------------------------------- */
.display {
  font-size: var(--fs-display);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.035em;
  color: var(--text);
  text-wrap: balance;
}
.title {
  font-size: var(--fs-h2);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text);
  text-wrap: balance;
}
.h3 { font-size: var(--fs-h3); line-height: 1.3; font-weight: 500; letter-spacing: -0.015em; color: var(--text); }
.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--text-2); max-width: 62ch; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: var(--fs-small); line-height: 1.55; }
.text-accent { color: var(--accent); }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }
.text-err { color: var(--err); }
.sans { font-family: var(--sans); }

.eyebrow {
  display: block;
  margin-bottom: var(--s-4);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text-2);
  overflow-wrap: anywhere;
}
.ps1 { color: var(--ok); }
.eyebrow .flag { color: var(--accent); }

code, .code {
  font-family: var(--mono);
  font-size: .9em;
  padding: .12em .42em;
  border-radius: var(--r-tag);
  background: var(--raised);
  border: 1px solid var(--line);
  color: var(--text);
}
pre code { padding: 0; border: 0; background: none; }

/* inline text links: faint underline, draws an accent line from the left on hover */
.link,
:where(.prose, .lead, .muted, .faq__body, .field__hint, .table) a:not([class]) {
  color: var(--text);
  background:
    linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat,
    linear-gradient(var(--border-strong), var(--border-strong)) 0 100% / 100% 1px no-repeat;
  padding-bottom: 1px;
  transition: background-size .28s var(--ease-out), color var(--t-fast) ease-out;
}
.link:hover,
:where(.prose, .lead, .muted, .faq__body, .field__hint, .table) a:not([class]):hover {
  color: var(--accent);
  background-size: 100% 1px, 100% 1px;
}

.prose { font-family: var(--sans); font-size: 16px; line-height: 1.75; color: var(--text-2); max-width: 70ch; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-family: var(--mono); font-size: 22px; margin-top: 2.2em; color: var(--text); }
.prose h3 { font-family: var(--mono); font-size: 17px; margin-top: 1.8em; color: var(--text); }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }

/* --------------------------------------------------------------------------
   5. Buttons
   .btn + .btn--primary | --secondary | --ghost, sizes --sm | --lg,
   inner .btn__label (+ optional .btn__arrow), optional .btn--bracket on primary
   -------------------------------------------------------------------------- */
.btn {
  --h: 40px;
  --px: 18px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--h);
  padding: 0 var(--px);
  border: 1px solid transparent;
  border-radius: var(--r-ctl);
  font: 500 14px/1 var(--mono);
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  isolation: isolate;
  transition:
    transform 240ms var(--spring),
    color var(--t) ease-out,
    border-color var(--t) ease-out,
    background-color var(--t) ease-out,
    background-size 300ms var(--ease-out),
    box-shadow var(--t) ease-out;
}
.btn--sm { --h: 34px; --px: 14px; font-size: 13px; }
.btn--lg { --h: 52px; --px: 26px; font-size: 15px; }
.btn--block { display: flex; width: 100%; }
.btn__label { position: relative; display: inline-block; transition: transform 220ms var(--ease-out); }
.btn__arrow { display: inline-block; transition: transform 220ms var(--spring); }
.btn:hover .btn__arrow, .btn.is-hover .btn__arrow { transform: translateX(3px); }
.btn:active, .btn.is-active { transform: translateY(1px) scale(.98); transition-duration: 70ms; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }

/* primary: inverse-video block, accent wipe on hover, caret after label */
.btn--primary {
  color: var(--bg);
  background: linear-gradient(var(--accent), var(--accent)) 100% 0 / 0 100% no-repeat var(--text);
}
.btn--primary:hover, .btn--primary.is-hover {
  color: var(--accent-ink);
  background-position: 0 0;
  background-size: 100% 100%;
}
.btn--primary .btn__label:last-child::after {
  content: "";
  position: absolute;
  left: calc(100% + 3px);
  top: 50%;
  width: .58em;
  height: 1.15em;
  transform: translateY(-52%);
  background: currentColor;
  opacity: 0;
}
.btn--primary:hover .btn__label:last-child,
.btn--primary.is-hover .btn__label:last-child { transform: translateX(-.36em); }
.btn--primary:hover .btn__label:last-child::after,
.btn--primary.is-hover .btn__label:last-child::after { opacity: 1; animation: nx-blink 1s steps(1, end) infinite; }
.btn--primary:active, .btn--primary.is-active { animation: nx-flash-inverse 130ms steps(1, end); }

/* bracket framing: [ Download for Mac ] with brackets sliding outward */
.btn--bracket { gap: 12px; }
.btn--bracket::before, .btn--bracket::after {
  font-weight: 400;
  opacity: .55;
  transition: transform 260ms var(--spring), opacity var(--t) ease-out;
}
.btn--bracket::before { content: "["; content: "[" / ""; }
.btn--bracket::after { content: "]"; content: "]" / ""; }
.btn--bracket:hover::before, .btn--bracket.is-hover::before { transform: translateX(-4px); opacity: 1; }
.btn--bracket:hover::after, .btn--bracket.is-hover::after { transform: translateX(4px); opacity: 1; }

/* secondary: hairline, surface fill on hover, ">" prefix slides in */
.btn--secondary {
  color: var(--text);
  border-color: var(--border);
  background-color: transparent;
}
.btn--secondary::before {
  content: ">";
  content: ">" / "";
  position: absolute;
  left: calc(var(--px) - 6px);
  top: 50%;
  color: var(--accent);
  opacity: 0;
  transform: translate(-4px, -50%);
  transition: opacity var(--t) ease-out, transform 240ms var(--spring);
}
.btn--secondary:hover, .btn--secondary.is-hover {
  border-color: var(--border-strong);
  background-color: var(--raised);
}
.btn--secondary:hover::before, .btn--secondary.is-hover::before { opacity: 1; transform: translate(0, -50%); }
.btn--secondary:hover .btn__label, .btn--secondary.is-hover .btn__label { transform: translateX(6px); }
.btn--secondary:hover .btn__label + .btn__arrow, .btn--secondary.is-hover .btn__label + .btn__arrow { transform: translateX(9px); }
.btn--secondary:active, .btn--secondary.is-active { animation: nx-flash-soft 130ms steps(1, end); }

/* ghost: text button, underline draws from the left, arrow nudges */
.btn--ghost {
  --px: 2px;
  color: var(--text);
  height: auto;
  min-height: 32px;
}
.btn--ghost .btn__label {
  padding-bottom: 3px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 280ms var(--ease-out);
}
.btn--ghost .btn__arrow { color: var(--accent); }
.btn--ghost:hover .btn__label, .btn--ghost.is-hover .btn__label { background-size: 100% 1px; }
.btn--ghost:active, .btn--ghost.is-active { transform: translateY(1px); }

/* --------------------------------------------------------------------------
   6. Surfaces: window, card, tag, status, kbd, cmd
   -------------------------------------------------------------------------- */
.window {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: inset 0 1px 0 var(--highlight), 0 30px 60px -30px var(--shadow-deep);
  overflow: hidden;
  isolation: isolate;
  transition: border-color var(--t) ease-out;
}
.window--frame { border-radius: var(--r-frame); }
.window__bar {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.window__dots { display: flex; gap: 7px; }
.window__dots i, .window__dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot-idle);
  transition: background-color 220ms ease-out;
}
.window:hover .window__dots > :nth-child(1), .window.is-hover .window__dots > :nth-child(1) { background: var(--dot-red); }
.window:hover .window__dots > :nth-child(2), .window.is-hover .window__dots > :nth-child(2) { background: var(--dot-yellow); transition-delay: 40ms; }
.window:hover .window__dots > :nth-child(3), .window.is-hover .window__dots > :nth-child(3) { background: var(--dot-green); transition-delay: 80ms; }
.window__title {
  grid-column: 2;
  text-align: center;
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.window__actions { grid-column: 3; justify-self: end; display: flex; gap: 6px; font-size: 12px; color: var(--text-3); }
.window__body { padding: var(--s-5); }

/* CTA band: the framed terminal window that closes a page. The title bar is drawn
   in CSS so any block can opt in with one class (pricing uses a real .window--frame). */
.cta-band {
  position: relative;
  display: grid;
  gap: var(--s-6);
  padding: calc(36px + var(--s-6)) var(--s-5) var(--s-6);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-frame);
  box-shadow: inset 0 1px 0 var(--highlight), 0 30px 60px -30px var(--shadow-deep);
  overflow: hidden;
}
.cta-band::before {
  content: "~ \00B7 zsh";
  content: "~ \00B7 zsh" / "";
  position: absolute;
  inset: 0 0 auto;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--text-2);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(5px circle at 17px 50%, var(--cta-d1, var(--dot-idle)) 4.5px, transparent 5px),
    radial-gradient(5px circle at 34px 50%, var(--cta-d2, var(--dot-idle)) 4.5px, transparent 5px),
    radial-gradient(5px circle at 51px 50%, var(--cta-d3, var(--dot-idle)) 4.5px, transparent 5px),
    var(--bg-2);
}
.cta-band:hover { --cta-d1: var(--dot-red); --cta-d2: var(--dot-yellow); --cta-d3: var(--dot-green); }
.cta-band .title { font-size: clamp(28px, 3.2vw, 40px); }
@media (min-width: 900px) {
  .cta-band { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--s-8); padding: calc(36px + var(--s-7)) var(--s-7) var(--s-7); }
}
@media (max-width: 479px) { .cta-band .btn--primary { width: 100%; justify-content: center; } }

/* hero rhythm: a display heading always sits 24px above its lead */
.section__head > .display + .lead { margin-top: var(--s-5); }

/* press feedback for text links, footer links, tabs and disclosure rows */
.link:active, .site-footer__links a:active,
:where(.prose, .lead, .muted, .faq__body, .field__hint, .table) a:not([class]):active { color: var(--accent); opacity: .7; transition-duration: 60ms; }
details.faq > summary:active { background: var(--accent-soft); transition-duration: 60ms; }
[role="tab"]:active { transform: scale(.97); transition-duration: 70ms; }

.card {
  position: relative;
  padding: var(--s-5);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: inset 0 1px 0 var(--highlight);
  transition: border-color var(--t) ease-out, background-color var(--t) ease-out;
}
.card > * + * { margin-top: var(--s-3); }
.card__title { font-size: var(--fs-h3); line-height: 1.3; font-weight: 500; letter-spacing: -0.015em; color: var(--text); }
.card__meta { font-size: 12px; color: var(--text-2); }

.window--interactive:hover, .window--interactive.is-hover,
.card--interactive:hover, .card--interactive.is-hover { border-color: var(--border-strong); }
.window--interactive::after, .card--interactive::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(440px circle at var(--mx, 50%) var(--my, 0%), var(--glow), transparent 65%);
  opacity: 0;
  transition: opacity 300ms ease-out;
}
.window--interactive:hover::after, .card--interactive:hover::after,
.window--interactive.is-hover::after, .card--interactive.is-hover::after { opacity: 1; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-tag);
  background: var(--bg-2);
  font: 500 12px/1 var(--mono);
  color: var(--text-2);
  white-space: nowrap;
  vertical-align: middle;
}
.tag--accent { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.tag--ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.tag--warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.tag--err { color: var(--err); background: var(--err-soft); border-color: transparent; }
.tag--solid { color: var(--bg); background: var(--text); border-color: transparent; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-2);
}
.status::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-3);
}
.status--ok::before { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.status--warn::before { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.status--err::before { background: var(--err); box-shadow: 0 0 0 3px var(--err-soft); }
.status--idle::before { background: transparent; box-shadow: inset 0 0 0 1px var(--text-3); }
.status--pulse::before { animation: nx-pulse 2.4s ease-out infinite; }

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--raised);
  font: 500 12px/1 var(--mono);
  color: var(--text);
  vertical-align: middle;
}

/* one-line command with copy button */
.cmd {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  max-width: 100%;
  padding: 5px 5px 5px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-2);
  font-size: 14px;
}
.cmd code {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.cmd .btn { flex: none; }

/* --------------------------------------------------------------------------
   7. Lists, rule, table
   -------------------------------------------------------------------------- */
.list-check, .list-term { list-style: none; padding: 0; margin: 0; }
.list-check > li, .list-term > li { position: relative; padding-left: 1.7em; }
.list-check > li + li, .list-term > li + li { margin-top: 10px; }
.list-check > li::before, .list-term > li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 500;
}
.list-check > li::before { content: "+"; content: "+" / ""; color: var(--ok); }
.list-term > li::before { content: "\203A"; content: "\203A" / ""; color: var(--accent); }
.list-check > li.is-off { color: var(--text-3); }
.list-check > li.is-off::before { content: "-"; content: "-" / ""; color: var(--text-3); }

.rule {
  display: block;
  height: 1px;
  margin-block: var(--s-7);
  border: 0;
  background: linear-gradient(90deg, var(--border-strong) 50%, transparent 0) 0 0 / 6px 1px repeat-x;
}
.rule--label {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  height: auto;
  background: none;
  font-size: 12px;
  line-height: 1;
  color: var(--text-2);
}
.rule--label::before, .rule--label::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, var(--border-strong) 50%, transparent 0) 0 0 / 6px 1px repeat-x;
}
.rule--label::before { flex: 0 0 24px; }
.rule--label::after { flex: 1; }

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--panel);
}
.table { width: 100%; font-size: 14px; line-height: 1.5; }
.table th, .table td { padding: 12px 16px; text-align: left; vertical-align: top; }
.table thead th {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table tbody th { font-weight: 500; color: var(--text); }
.table tbody td { color: var(--text-2); }
.table tbody tr + tr > * { border-top: 1px solid var(--line); }
.table tbody tr { transition: background-color var(--t-fast) ease-out; }
.table tbody tr:hover { background: var(--selection); }
.table .yes { color: var(--ok); }
.table .no { color: var(--text-3); }

/* --------------------------------------------------------------------------
   8. Forms
   -------------------------------------------------------------------------- */
.field { display: grid; gap: 8px; }
.field + .field { margin-top: var(--s-5); }
.label { font-size: 13px; font-weight: 500; color: var(--text); }
.label .opt { color: var(--text-2); font-weight: 400; }
.field__hint { font-size: 12px; color: var(--text-2); }
.field__error { font-size: 12px; color: var(--err); }
.field__error::before { content: "! "; content: "! " / ""; }

.input, .textarea, .select {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-ctl);
  background: var(--bg-2);
  color: var(--text);
  font: 400 14px/1.4 var(--mono);
  transition: border-color var(--t) ease-out, background-color var(--t) ease-out, box-shadow var(--t) ease-out;
  -webkit-appearance: none;
  appearance: none;
}
.textarea { min-height: 128px; resize: vertical; line-height: 1.6; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .textarea:hover, .select:hover,
.input.is-hover, .textarea.is-hover, .select.is-hover { border-color: var(--border-strong); }
.input:focus, .textarea:focus, .select:focus,
.input.is-focus, .textarea.is-focus, .select.is-focus {
  border-color: var(--accent);
  background-color: var(--panel);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input:focus-visible, .textarea:focus-visible, .select:focus-visible { outline: none; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--err); }
.input[aria-invalid="true"]:focus, .textarea[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--err-soft); }
.input:disabled, .textarea:disabled, .select:disabled { opacity: .45; cursor: not-allowed; }
.select {
  padding-right: 40px;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-2) 50%),
    linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.select option { background: var(--panel); color: var(--text); }

.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.check input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--bg-2);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--t-fast) ease-out, background-color var(--t-fast) ease-out, box-shadow var(--t-fast) ease-out, transform 200ms var(--spring);
}
.check input[type="radio"] { border-radius: 50%; }
.check:hover input { border-color: var(--text-2); }
.check input:active { transform: scale(.88); }
.check input:checked { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--bg-2); }
.check input:disabled { opacity: .45; cursor: not-allowed; }
.check input:disabled + * { color: var(--text-3); }

/* --------------------------------------------------------------------------
   9. Segmented control + tabs  (JS adds .segmented__thumb and .is-ready)
   -------------------------------------------------------------------------- */
.segmented {
  position: relative;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-2);
  max-width: 100%;
}
.segmented [role="tab"] {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  font: 500 13px/1 var(--mono);
  color: var(--text-2);
  white-space: nowrap;
  transition: color var(--t) ease-out, transform 220ms var(--spring);
}
.segmented [role="tab"]:hover { color: var(--text); }
.segmented [role="tab"]:active { transform: scale(.96); transition-duration: 70ms; }
.segmented [role="tab"][aria-selected="true"] { color: var(--bg); background: var(--text); }
.segmented.is-ready [role="tab"][aria-selected="true"] { background: transparent; }
.segmented [role="tab"]:focus-visible { outline-offset: 1px; }
.segmented [aria-selected="true"] .tag { color: var(--accent-ink); background: var(--accent); }
.segmented__thumb {
  position: absolute;
  z-index: 0;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: var(--w, 0);
  border-radius: 999px;
  background: var(--text);
  transform: translateX(var(--x, 0));
  transition: transform 340ms var(--spring), width 340ms var(--spring);
}
.segmented:not(.is-ready) .segmented__thumb { opacity: 0; transition: none; }
.segmented--sm [role="tab"] { height: 28px; padding: 0 12px; font-size: 12px; }

.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs [role="tab"] {
  position: relative;
  flex: none;
  height: 42px;
  padding: 0 14px;
  font: 500 13px/1 var(--mono);
  color: var(--text-2);
  transition: color var(--t) ease-out;
}
.tabs [role="tab"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms var(--ease-out);
}
.tabs [role="tab"]:hover { color: var(--text); }
.tabs [role="tab"][aria-selected="true"] { color: var(--text); }
.tabs [role="tab"][aria-selected="true"]::after { transform: scaleX(1); }
.tabs [role="tab"]:focus-visible { outline-offset: -2px; }
[role="tabpanel"]:focus-visible { outline-offset: 6px; }
.tabs__panel { padding-top: var(--s-5); }

/* --------------------------------------------------------------------------
   10. FAQ (details.faq > summary + .faq__body)
   -------------------------------------------------------------------------- */
.faq { border-bottom: 1px solid var(--line); }
.faq-list { border-top: 1px solid var(--line); }
.faq > summary {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 -12px;
  padding: 18px 12px;
  border-radius: var(--r-ctl);
  list-style: none;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
  cursor: pointer;
  transition: background-color var(--t-fast) ease-out;
}
.faq > summary::-webkit-details-marker { display: none; }
.faq > summary::before {
  content: "[+]";
  content: "[+]" / "";
  flex: none;
  font-weight: 400;
  color: var(--accent);
}
.faq[open] > summary::before { content: "[-]"; content: "[-]" / ""; }
.faq > summary:hover, .faq > summary.is-hover { background: var(--selection); }
.faq > summary:focus-visible { outline-offset: -2px; }
.faq__body { color: var(--text-2); }
.faq__body > * { padding-left: calc(3ch + 14px); }
.faq__body > *:last-child { padding-bottom: 22px; }
.faq__body > * + * { padding-top: .8em; }

/* --------------------------------------------------------------------------
   11. Toast (JS creates one .toast, role=status)
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--raised);
  box-shadow: 0 16px 40px -16px var(--shadow-deep);
  font: 500 13px/1.3 var(--mono);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 200ms ease-out, transform 320ms var(--spring);
}
.toast:empty { display: none; }
.toast::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------------------------------------------------------
   12. Header + mobile menu
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -80px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: var(--r-ctl);
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 500;
  transition: top var(--t) ease-out;
}
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: var(--scrim);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  transition: border-color 240ms ease-out;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--s-4);
  height: 100%;
}
.site-header__actions { justify-self: end; display: flex; align-items: center; gap: var(--s-2); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  min-height: 44px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand__icon { width: 22px; height: 22px; border-radius: 6px; transition: transform 300ms var(--spring); }
.brand:hover .brand__icon { transform: rotate(-8deg) scale(1.06); }
.brand__cursor { color: var(--accent); animation: nx-blink 1.1s steps(1, end) infinite; }

.nav__list { display: flex; align-items: center; gap: 2px; }
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px 0 16px;
  border-radius: var(--r-ctl);
  font-size: 14px;
  color: var(--text-2);
  transition: color var(--t) ease-out;
}
.nav__caret {
  position: absolute;
  left: 4px;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--t) ease-out, transform 240ms var(--spring);
}
.nav__label { display: block; transition: transform 240ms var(--spring); }
.nav__link:hover, .nav__link.is-hover, .nav__link[aria-current="page"] { color: var(--text); }
.nav__link:hover .nav__caret, .nav__link.is-hover .nav__caret, .nav__link[aria-current="page"] .nav__caret { opacity: 1; transform: none; }
.nav__link:hover .nav__label, .nav__link.is-hover .nav__label, .nav__link[aria-current="page"] .nav__label { transform: translateX(4px); }
.nav__link:active .nav__label { transform: translateX(4px) translateY(1px); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 4px;
  height: 44px;
  padding: 0 6px;
  font: 500 14px/1 var(--mono);
  color: var(--text);
  transition: transform 200ms var(--spring);
}
.menu-toggle__b { color: var(--text-3); transition: transform 240ms var(--spring), color var(--t) ease-out; }
.menu-toggle__label { display: inline-block; min-width: 5ch; text-align: center; }
.menu-toggle:hover .menu-toggle__b:first-child { transform: translateX(-3px); color: var(--accent); }
.menu-toggle:hover .menu-toggle__b:last-child { transform: translateX(3px); color: var(--accent); }
.menu-toggle:active { transform: scale(.96); }
.menu-toggle[aria-expanded="true"] .menu-toggle__b { color: var(--accent); }

.menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  padding: calc(var(--header-h) + var(--s-5)) var(--gutter) max(var(--s-6), env(safe-area-inset-bottom));
  background: var(--bg);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  transition: opacity 180ms ease-out;
}
.menu.is-open { opacity: 1; }
.menu__prompt { margin-bottom: var(--s-4); font-size: 13px; color: var(--text-2); }
.menu__list { border-top: 1px solid var(--line); }
.menu__link {
  display: flex;
  align-items: baseline;
  gap: var(--s-4);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(28px, 8.4vw, 40px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
  transition: color var(--t-fast) ease-out;
}
.menu__idx { flex: none; width: 2.6ch; font-size: 12px; letter-spacing: 0; color: var(--text-3); }
.menu__label { transition: transform 240ms var(--spring); }
.menu__link:hover .menu__label, .menu__link:focus-visible .menu__label { transform: translateX(6px); }
.menu__link:hover, .menu__link[aria-current="page"] { color: var(--accent); }
.menu__link:focus-visible { outline-offset: -2px; }
.menu__foot { display: grid; gap: var(--s-4); margin-top: auto; padding-top: var(--s-6); }
.menu__sub { display: flex; flex-wrap: wrap; gap: 4px var(--s-5); font-size: 14px; color: var(--text-2); }
.menu__sub a { display: inline-flex; align-items: center; min-height: 44px; }
.menu__sub a:hover { color: var(--text); }
html.menu-open, html.menu-open body { overflow: hidden; }

@media (max-width: 819px) {
  .site-header__inner { grid-template-columns: 1fr auto; }
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 399px) { .site-header__actions .btn { display: none; } }
@media (min-width: 820px) { .menu { display: none !important; } }

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  padding-top: var(--s-8);
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-2);
}
.site-footer__grid { display: grid; gap: var(--s-6) var(--s-5); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.site-footer__brand { grid-column: 1 / -1; max-width: 340px; }
.site-footer__brand > * + * { margin-top: var(--s-3); }
.site-footer__desc { color: var(--text-2); }
.site-footer__version { font-size: 12px; color: var(--text-2); }
.site-footer__heading { margin-bottom: var(--s-3); font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--text); }
.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--text-2);
  transition: color var(--t-fast) ease-out, transform 220ms var(--spring);
}
.site-footer__links a:hover { color: var(--text); transform: translateX(3px); }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-3) var(--s-6);
  margin-top: var(--s-8);
  padding-block: var(--s-5) var(--s-6);
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.6;
}
.site-footer__legal { flex: 1 1 360px; max-width: 62ch; }
.site-footer__status { white-space: nowrap; }
.site-footer__status .dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); vertical-align: 1px; }
@media (max-width: 819px) { .site-footer__links a { min-height: 44px; } }
@media (min-width: 820px) {
  .site-footer__grid { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); }
  .site-footer__brand { grid-column: auto; }
}

/* --------------------------------------------------------------------------
   14. Typing engine, reveal, page transitions (driven by site.js)
   Pending text is hidden only when JS runs and motion is allowed.
   The real element keeps its text (transparent) for screen readers; an
   aria-hidden .tclone overlay types on top, then is removed.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-type]:not(.is-typed),
  .js .is-typing { -webkit-text-fill-color: transparent; text-shadow: none; }
  .js :is([data-type]:not(.is-typed), .is-typing) :not(.tclone, .tclone *) {
    -webkit-text-fill-color: transparent !important;
    text-decoration-color: transparent !important;
    text-shadow: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
  }
  .js :is([data-type]:not(.is-typed), .is-typing) :is(img, svg, video, canvas):not(.tclone *) { opacity: 0 !important; }
  .js [data-type]:not(.is-typed)::before,
  .js .is-typing::before { -webkit-text-fill-color: currentColor; }
}
.tclone {
  position: absolute;
  inset: 0;
  z-index: 1;
  box-sizing: border-box;
  margin: 0;
  padding: inherit;
  border: 0;
  background: none;
  overflow: visible;
  pointer-events: none;
  display: inherit;
  gap: inherit;
  flex-direction: inherit;
  flex-wrap: inherit;
  align-items: inherit;
  justify-content: inherit;
  align-content: inherit;
  grid-template-columns: inherit;
  grid-auto-flow: inherit;
}
.tclone, .tclone *, .tclone *::before, .tclone *::after { -webkit-text-fill-color: currentColor; }
.tclone .tc-h, .tclone .tc-rest, .tclone .tc-pad { visibility: hidden; }
.tc-pad { display: inline-block; width: .5em; height: .82em; margin-left: .12em; }
.tcaret { position: relative; visibility: visible; }
.tcaret::after {
  content: "";
  position: absolute;
  left: 1px;
  top: .08em;
  bottom: .04em;
  width: .56em;
  background: var(--accent);
}
[data-caret]::after {
  content: "";
  display: inline-block;
  width: .5em;
  height: .82em;
  margin-left: .12em;
  vertical-align: -.04em;
  background: var(--accent);
  animation: nx-blink 1.1s steps(1, end) infinite;
}
.js [data-caret]:not(.is-typed)::after, .js [data-caret].is-typing::after { opacity: 0; animation: none; }

.js [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-revealed { opacity: 1; transform: none; }
.is-instant [data-reveal] { opacity: 1; transform: none; transition: none; }

main, .site-footer { transition: opacity 140ms ease-out; }
.is-leaving main, .is-leaving .site-footer { opacity: 0; }

@media print {
  .tclone { display: none; }
  [data-type] { -webkit-text-fill-color: currentColor !important; }
  .site-header, .menu, .toast { display: none; }
}

/* --------------------------------------------------------------------------
   15. Utilities
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: var(--s-2) !important; }
.mt-16 { margin-top: var(--s-4) !important; }
.mt-24 { margin-top: var(--s-5) !important; }
.mt-32 { margin-top: var(--s-6) !important; }
.mt-48 { margin-top: var(--s-7) !important; }
.mt-64 { margin-top: var(--s-8) !important; }
@media (max-width: 819px) { .hide-sm { display: none !important; } }
@media (min-width: 820px) { .show-sm { display: none !important; } }

/* touch targets on small screens */
@media (max-width: 819px) {
  .btn { min-height: 44px; }
  .btn--ghost { min-height: 44px; }
  .segmented [role="tab"], .tabs [role="tab"] { min-height: 44px; }
  .check { min-height: 44px; }
}

/* --------------------------------------------------------------------------
   16. Keyframes + reduced motion
   -------------------------------------------------------------------------- */
@keyframes nx-blink { 50% { opacity: 0; } }
@keyframes nx-flash-inverse {
  0% { color: var(--text); box-shadow: inset 0 0 0 100vmax var(--bg), 0 0 0 1px var(--text); }
}
@keyframes nx-flash-soft {
  0% { background-color: var(--border-strong); border-color: var(--text-2); }
}
@keyframes nx-pulse {
  0% { box-shadow: 0 0 0 0 var(--ok-soft), 0 0 0 3px var(--ok-soft); }
  70% { box-shadow: 0 0 0 8px transparent, 0 0 0 3px var(--ok-soft); }
  100% { box-shadow: 0 0 0 0 transparent, 0 0 0 3px var(--ok-soft); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
}
