/* nerdge.studio — the Instrument visual system (DESIGN.md 3) */

/* 3.1 Colour tokens */
:root {
  color-scheme: dark;
  --bg:         #04070E;
  --surface:    #0A101B;
  --raised:     #101A28;
  --line:       #17222F;
  --line-strong:#2A394B;
  --text:       #E6EEF6;
  --muted:      #9AAABB;
  --faint:      #74869A;
  --accent:     #1FE3FF;
  --accent-ink: #04070E;
  --accent-soft:rgba(31, 227, 255, 0.12);
  --hot:        #EBFFFF;
  --amber:      #FFC440;
  --amber-soft: rgba(255, 196, 64, 0.16);
  --danger:     #F15B56;
  --ok:         #66C3A9;
  --tick-minor: rgba(230, 238, 246, 0.26);
  --tick-major: rgba(31, 227, 255, 0.24);
  --scrim:      rgba(4, 7, 14, 0.92);
  --veil:       rgba(4, 7, 14, 0.72);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg:         #F4F7FA;
  --surface:    #FFFFFF;
  --raised:     #E8EEF4;
  --line:       #D5DEE7;
  --line-strong:#AAB8C7;
  --text:       #0A101B;
  --muted:      #465567;
  --faint:      #5C6B7D;
  --accent:     #006B7A;
  --accent-ink: #FFFFFF;
  --accent-soft:rgba(0, 107, 122, 0.10);
  --hot:        #0A101B;
  --amber:      #8A5A00;
  --amber-soft: rgba(138, 90, 0, 0.12);
  --danger:     #B42318;
  --ok:         #176B55;
  --tick-minor: rgba(10, 16, 27, 0.22);
  --tick-major: rgba(0, 107, 122, 0.30);
  --scrim:      rgba(244, 247, 250, 0.92);
  --veil:       rgba(10, 16, 27, 0.4);
}

/* 3.6 Motion tokens */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --t-hover: 90ms;  --t-press: 120ms;  --t-reveal: 160ms;  --t-stagger: 30ms;  --t-slide: 200ms;  --t-wash: 260ms;  --t-pop: 400ms;
}

/* 3.2 Fonts */
@font-face { font-family: "Big Shoulders Display"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/big-shoulders-display-700.woff2") format("woff2"); }
@font-face { font-family: "Big Shoulders Display"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/big-shoulders-display-800.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/geist-mono-400.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/geist-mono-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/barlow-600.woff2") format("woff2"); }

:root {
  --font-display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body:    "Barlow", "Segoe UI", system-ui, sans-serif;
  --font-mono:    "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

/* 3.3 Spacing scale */
:root {
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --gutter: 16px;
  --cut-s: 6px; --cut-m: 12px; --cut-l: 20px;
}
@media (min-width: 768px) { :root { --gutter: 24px; } }
@media (min-width: 1200px) { :root { --gutter: 32px; } }

/* Base */
*, *::before, *::after { box-sizing: border-box; border-radius: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1.125rem/1.6 var(--font-body);
  letter-spacing: 0.005em;
  color: var(--text);
  background: var(--bg);
}
img, svg { max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
main { display: block; }
code { font-family: var(--font-mono); }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
@media (hover: hover) { a:hover { text-decoration-thickness: 2px; } }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }

/* 3.2 Type roles */
.t-poster { font-family: var(--font-display); font-weight: 800; font-size: min(clamp(3.5rem, 1.6rem + 8vw, 8.5rem), 17vh); line-height: calc(0.88em + 18px); letter-spacing: -0.02em; text-transform: uppercase; }
.t-display-xl { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.5rem, 1.5rem + 4vw, 4.75rem); line-height: 0.92; letter-spacing: -0.012em; text-transform: uppercase; }
.t-display-l { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 1.5rem + 2vw, 2.875rem); line-height: 1; letter-spacing: 0.004em; text-transform: uppercase; }
.t-display-m { font-family: var(--font-body); font-weight: 600; font-size: 1.5rem; line-height: 1.2; letter-spacing: 0.014em; text-transform: uppercase; }
.t-display-s { font-family: var(--font-body); font-weight: 600; font-size: 0.875rem; line-height: 1.3; letter-spacing: 0.1em; text-transform: uppercase; }
.t-readout { font-family: var(--font-display); font-weight: 800; font-size: clamp(3rem, 2rem + 4vw, 4.75rem); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.t-lead { font-weight: 400; font-size: clamp(1.1875rem, 1.05rem + 0.5vw, 1.4375rem); line-height: 1.5; }
.t-body { font-weight: 400; font-size: 1.125rem; line-height: 1.6; }
.t-small { font-weight: 400; font-size: 1rem; line-height: 1.55; }
.t-data { font-family: var(--font-mono); font-weight: 400; font-size: 0.875rem; line-height: 1.5; letter-spacing: 0.035em; font-variant-numeric: tabular-nums; }
.t-micro { font-family: var(--font-mono); font-weight: 500; font-size: 0.75rem; line-height: 1.4; letter-spacing: 0.2em; text-transform: uppercase; }
.t-key { font-family: var(--font-mono); font-weight: 400; font-size: 0.875rem; line-height: 1; letter-spacing: 0.03em; }
h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.5rem, 1.5rem + 4vw, 4.75rem); line-height: 0.92; letter-spacing: -0.012em; text-transform: uppercase; color: var(--text); }
h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.5rem, 1.5rem + 4vw, 4.75rem); line-height: 0.92; letter-spacing: -0.012em; text-transform: uppercase; color: var(--text); }
h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.5rem; line-height: 1.2; letter-spacing: 0.014em; text-transform: uppercase; color: var(--text); }
h4 { font-family: var(--font-body); font-weight: 600; font-size: 0.875rem; line-height: 1.3; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); }
.t-lead, .t-body { max-width: 66ch; }
/* Russian has no Big Shoulders glyphs, so its caps fall back to a face 0.72 em a letter: the hero column (536 px) holds 3.9 em, and "ЛАЙНАП" alone is 4.7 em. 0.75 sets "Лайнап в точку." in two lines at every width from 1024 px
   (0.8 leaves 10 px of slack at 1440 x 900); check-lang.mjs holds the hero button above the fold. */
@media (min-width: 1024px) { :lang(ru) .t-poster { font-size: calc(min(clamp(3.5rem, 1.6rem + 8vw, 8.5rem), 17vh) * 0.75); } }

/* 3.3 Layout */
.container { width: 100%; max-width: 1600px; margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 880px; }
.container--slim { max-width: 720px; }
.section { padding-block: clamp(64px, 10vw, 128px); border-top: 1px solid var(--line); }
main > .section:first-child { border-top: 0; }
.section--hero { padding-block: clamp(32px, min(8vw, 9vh), 112px); }
.grid-2 { display: grid; gap: var(--s6); }
.grid-3 { display: grid; gap: var(--s5); }
.split { display: grid; gap: var(--s8); align-items: center; }
/* A grid item never grows past its track for a long word (ONE-WORDS S4: a translated price card or title pushed a 390 px page sideways);
   the text inside wraps instead. */
.grid-2 > *, .grid-3 > *, .split > *, .notice > *, .sign-in > * { min-width: 0; }
.price-card, .sign-in, .dl-copy code { overflow-wrap: anywhere; }
h1, h2, h3 { overflow-wrap: break-word; }
:lang(ja) h1 { word-break: keep-all; }   /* a Japanese title breaks at its 、 not inside ユーティリティ */
@media (max-width: 479.98px) { .btn { white-space: normal; overflow-wrap: anywhere; text-align: center; } }
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
  .split { grid-template-columns: 5fr 7fr; }
  .split--flip { grid-template-columns: 7fr 5fr; }
  .split--flip > :first-child { grid-column: 2; grid-row: 1; }
  .split--flip > .split-art { grid-column: 1; grid-row: 1; }
  .split.hero { grid-template-columns: 6fr 6fr; }
  .hero .btn-row { flex-wrap: nowrap; }
}

/* 3.4 Chamfer plate */
.plate { position: relative; isolation: isolate; --cut: var(--cut-m); }
.plate::before, .plate::after { content: ""; position: absolute; z-index: -1; clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
.plate::before { inset: 0; background: var(--plate-edge, var(--line)); }
.plate::after { inset: 1px; background: var(--plate-fill, var(--surface)); clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }

/* 3.4 Tick strip */
.ticks {
  height: 11px;
  background:
    repeating-linear-gradient(90deg, var(--tick-major) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, var(--tick-minor) 0 1px, transparent 1px 8px) 0 100% / 100% 5px no-repeat;
  -webkit-mask-image: linear-gradient(90deg, #000 62%, transparent 100%);
          mask-image: linear-gradient(90deg, #000 62%, transparent 100%);
}

/* 3.4 Eyebrow */
.eyebrow-row { margin-bottom: var(--s4); }
.eyebrow-row .ticks { width: 160px; margin-bottom: var(--s3); }
.eyebrow { color: var(--accent); font-size: 0.8125rem; }
.section-head .eyebrow, p.eyebrow + h1, p.eyebrow + h2 { margin-bottom: var(--s3); }

/* 3.4 Key cap */
.keycap { --cut: var(--cut-s); --plate-fill: var(--surface); --plate-edge: var(--line-strong); display: inline-flex; align-items: center; justify-content: center; min-width: 1.75rem; padding: 2px 8px; vertical-align: middle; }

/* 3.4 Readout */
.readout { border-top: 1px solid var(--line); padding-top: var(--s4); }
.readout .unit { color: var(--accent); margin-left: var(--s2); }
.readouts { display: grid; gap: var(--s6); grid-template-columns: 1fr 1fr; }
@media (min-width: 1024px) { .readouts { grid-template-columns: repeat(4, 1fr); } }
.readout .label { color: var(--muted); display: block; margin-top: var(--s2); }

/* 3.4 Chip */
/* TEXT-CENTRE (owner 2026-11-20): a chip's box is its letters' (text-box: the cap height to the baseline) and its padding, so the words sit in its middle;
   a line box set them high, every face's ascent being over its descent (0.7 px in Latin, 1.2 in Korean, measured at 1440). A block container: text-box trims
   no flex box. Without text-box (an older browser) it keeps the line box and 4 px of padding, as before. */
.chip { --cut: var(--cut-s); --plate-fill: var(--raised); --plate-edge: var(--raised); display: inline-block; padding: 4px 10px; color: var(--muted); }
@supports (text-box: trim-both cap alphabetic) { .chip { padding-block: 8px; text-box: trim-both cap alphabetic; } }
.chip--amber { --plate-fill: color-mix(in srgb, var(--amber) 16%, var(--surface)); --plate-edge: var(--amber); color: var(--amber); }
.chip--accent { --plate-fill: color-mix(in srgb, var(--accent) 12%, var(--surface)); --plate-edge: var(--accent); color: var(--accent); }

/* 3.5.1 Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s5); --cut: var(--cut-m);
  font-family: var(--font-body); font-weight: 600; font-size: 0.875rem; line-height: 1.3; letter-spacing: 0.1em; text-transform: uppercase;
  white-space: nowrap; border: 0; background: none; cursor: pointer; text-decoration: none;
  transition: transform var(--t-press) var(--ease-out);
}
.btn::before, .btn::after { transition: background var(--t-hover) linear; }
.btn--primary { --plate-fill: var(--accent); --plate-edge: var(--accent); color: var(--accent-ink); }
.btn--secondary { --plate-fill: var(--surface); --plate-edge: var(--line-strong); color: var(--text); }
.btn--ghost { --plate-fill: transparent; --plate-edge: transparent; color: var(--accent); }
@media (hover: hover) {
  .btn--primary:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]):hover { --plate-fill: var(--hot); }
  :root[data-theme="light"] .btn--primary:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]):hover { --plate-fill: #00535F; }
  .btn--secondary:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]):hover { --plate-edge: var(--accent); --plate-fill: var(--raised); }
  .btn--ghost:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]):hover { --plate-fill: var(--accent-soft); }
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn--lg { min-height: 56px; padding: 0 var(--s6); }
.btn:disabled, .btn[aria-disabled="true"], .btn[aria-busy="true"] { --plate-fill: var(--raised); --plate-edge: var(--line); color: var(--faint); cursor: not-allowed; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
@media (max-width: 479.98px) {
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row .btn { width: 100%; }
}

/* 3.5.2 Feature row */
.features { list-style: none; gap: var(--s5); }
.feature { border-top: 1px solid var(--line-strong); padding-top: var(--s5); }
.feature .icon { color: var(--accent); }
.feature h3 { margin-top: var(--s4); }
.feature p { color: var(--muted); margin-top: var(--s2); }

/* Checks list (3.5.3 item 4) */
.checks { list-style: none; display: grid; gap: var(--s3); }
.checks li { display: flex; gap: var(--s3); align-items: start; }
.checks .icon { color: var(--accent); flex-shrink: 0; margin-top: 0.2em; }

/* 3.5.3 Pricing card */
.price-card { --cut: var(--cut-l); --plate-fill: var(--surface); --plate-edge: var(--line-strong); padding: var(--s6); display: flex; flex-direction: column; gap: var(--s5); }
@media (max-width: 479.98px) { .price-card { padding: var(--s5); } }
.price-card header .who { color: var(--muted); margin-top: var(--s2); }
.price-card .price { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.price-card .price .period { color: var(--muted); }
.price-card .btn { width: 100%; margin-top: auto; }
.price-tax { color: var(--muted); margin-top: calc(var(--s3) * -1); }   /* under a price: the tax note (price.js swaps it with the currency) */
.price-soon { color: var(--muted); }   /* a paid plan while checkout is closed: Available soon in the button's place (price.js) */
.price-card .price-soon { margin-top: auto; min-height: 48px; display: flex; align-items: center; justify-content: center; }
.team-lead + .price-tax { margin-top: var(--s4); }
.price-card--featured { --plate-edge: var(--accent); }

/* 3.5.4 FAQ */
.faq { max-width: 800px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-item summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--s4); min-height: 56px; padding: var(--s4) 0; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .q { font-weight: 600; }
.faq-item summary .icon { color: var(--accent); flex-shrink: 0; transition: transform var(--t-slide) var(--ease-out); }
.faq-item[open] summary .icon { transform: rotate(45deg); }
@media (hover: hover) { .faq-item summary:hover .q { color: var(--accent); } }
.faq-body { padding: 0 0 var(--s5); color: var(--muted); max-width: 66ch; }
@keyframes faq-in { from { opacity: 0; } to { opacity: 1; } }
.faq-item[open] .faq-body { animation: faq-in var(--t-reveal) both; }

/* 3.5.5 Steps */
.steps { list-style: none; counter-reset: step; }
.step { border-top: 1px solid var(--line); padding-top: var(--s5); }
.step .step-icon { color: var(--accent); display: block; margin-bottom: var(--s4); }
.step .step-no { color: var(--faint); display: block; margin-bottom: var(--s2); }
.step h3 { margin-bottom: var(--s2); }
.step p { color: var(--muted); }
@media (min-width: 768px) { .steps--four { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .steps--four { grid-template-columns: repeat(4, 1fr); } }

/* 3.5.6 Form fields */
.field { display: block; }
.field > label { display: block; margin-bottom: var(--s2); }
.field > label .opt { color: var(--faint); }
.input { --cut: var(--cut-s); --plate-fill: var(--surface); --plate-edge: var(--line-strong); }
.input input, .input select, .input textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; background: transparent; border: 0;
  color: var(--text); font: 400 1rem/1.4 var(--font-body);
}
.input textarea { min-height: 128px; resize: vertical; }
.input select { appearance: none; -webkit-appearance: none; padding-right: 40px; }
.select { position: relative; }
.select .icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
@media (hover: hover) { .field:hover .input { --plate-edge: var(--muted); } }
.input:focus-within { --plate-edge: var(--accent); }
.input.is-invalid { --plate-edge: var(--danger); }
.hint { color: var(--faint); margin-top: var(--s2); }
.error { color: var(--danger); margin-top: var(--s2); display: flex; gap: var(--s2); align-items: start; }
.error .icon { flex-shrink: 0; margin-top: 0.15em; }
.field-row { display: grid; gap: var(--s5); }
@media (min-width: 768px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field--trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form { display: grid; gap: var(--s5); }
.form-privacy { color: var(--faint); }
@media (max-width: 767.98px) { .form .form-submit { width: 100%; } }
.form-panel { --cut: var(--cut-l); --plate-fill: var(--surface); --plate-edge: var(--line-strong); padding: var(--s6); }
@media (max-width: 479.98px) { .form-panel { padding: var(--s5); } }

/* 3.5.7 Notice */
.notice { --cut: var(--cut-m); padding: var(--s5); display: grid; grid-template-columns: auto 1fr; column-gap: var(--s4); row-gap: var(--s2); align-items: start; }
.notice > .icon { grid-column: 1; grid-row: 1; margin-top: 0.2em; }
.notice > h2, .notice > h3, .notice > p, .notice > .btn-row, .notice > ul, .notice > form, .notice > .sign-in { grid-column: 2; }
.notice--ok { --plate-edge: var(--ok); --plate-fill: var(--surface); }
.notice--ok > .icon { color: var(--ok); }
.notice--error { --plate-edge: var(--danger); --plate-fill: var(--surface); }
.notice--error > .icon { color: var(--danger); }
.notice--info { --plate-edge: var(--line-strong); --plate-fill: var(--surface); }
.notice--info > .icon { color: var(--accent); }
.notice ul { list-style: none; display: grid; gap: var(--s2); }

/* 3.5.9 Sign-in (LOGIN-REDESIGN): the Continue buttons (one per provider the server runs, equal weight and width) and their agreement line (signin.js). */
.sign-in { display: grid; gap: var(--s3); justify-items: start; margin-block: var(--s4); }
.sign-in-legal { color: var(--muted); }
.sign-in-legal a { color: var(--accent); text-decoration: underline; }
.sign-in-err { display: grid; gap: var(--s3); justify-items: start; }
.sign-in-err .status-msg { margin-top: 0; }
.g-mark { flex-shrink: 0; }
.sign-in-buttons { display: grid; gap: var(--s3); width: max-content; min-width: min(100%, 18rem); max-width: 100%; }
.sign-in-buttons .btn { width: 100%; justify-content: center; }

/* 4.4.1 Team lockup (WELCOME, D158): the mark + × + team plate row on a
   branded /i/ page. The plate's fill is FIXED per team choice — the same
   colours in both themes — and only the 2 px edge takes the team accent
   (set from i.js after it re-checks the #rrggbb). */
.notice > .brand-lockup, .notice > .brand-perks, .notice > .brand-step { grid-column: 2; }
.lockup-row { display: flex; align-items: center; gap: var(--s3); }
.lockup-x { color: var(--faint); }
.brand-plate { --cut: 12px; --plate-edge: var(--line-strong); width: 168px; height: 72px; display: inline-flex; align-items: center; justify-content: center; padding: 0 var(--s3); }
.brand-plate img { max-height: 56px; max-width: 100%; object-fit: contain; }
.brand-plate--light { --plate-fill: #F4F7FA; color: #0A101B; }
.brand-plate--dark { --plate-fill: #0A101B; color: #F4F7FA; }
.brand-line { color: var(--faint); }
.brand-perks ul { margin-top: var(--s2); }
.brand-step { color: var(--muted); }
/* M4 (review): on a branded page the H1 names the team and the greeting
   takes its own line — both get their spacing from the tokens. */
.i-brand #invite-title, .brand-greet { margin: 0 0 var(--s3); }
#ops-invites > .t-display-s { margin-top: var(--s4); }
#ops-invites > .t-display-s:first-child { margin-top: 0; }

/* 5.1 Skip link */
.skip-link { position: fixed; top: 16px; left: 16px; z-index: 100; --plate-fill: var(--accent); --plate-edge: var(--accent); color: var(--accent-ink); padding: 12px var(--s5); font-family: var(--font-body); font-weight: 600; font-size: 0.875rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; }
.skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* 4.6 Wordmark */
.wordmark { display: inline-flex; align-items: center; gap: var(--s2); text-decoration: none; color: var(--text); }
.wordmark { flex: none; }
.wordmark-name { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: 0.02em; line-height: 1; white-space: nowrap; }
.wordmark-studio { font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: 0.3em; color: var(--accent); align-self: flex-end; margin-bottom: 3px; margin-left: 6px; white-space: nowrap; }
@media (max-width: 479.98px) {
  .site-header .wordmark { display: inline-grid; grid-template-columns: auto auto; column-gap: var(--s2); row-gap: 2px; }
  .site-header .wordmark-mark { grid-row: 1 / 3; width: 36px; height: 36px; }
  .site-header .wordmark-name { font-size: 20px; align-self: end; }
  .site-header .wordmark-studio { grid-column: 2; margin: 0; align-self: start; font-size: 10px; letter-spacing: 0.25em; }
}

/* Sprite */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { flex-shrink: 0; }
.icon, .step-icon { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 4 shared SVG classes */
.svg-line   { stroke: var(--line-strong); }
.svg-faint  { fill: var(--faint); }
.svg-muted  { fill: var(--muted); }
.svg-text   { fill: var(--text); }
.svg-accent { stroke: var(--accent); }
.svg-accent-fill { fill: var(--accent); }
.svg-hot    { fill: var(--hot); }
.svg-amber  { stroke: var(--amber); }
.svg-amber-fill { fill: var(--amber); }
.svg-surface { fill: var(--surface); }
.svg-label  { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; }
.art { width: 100%; height: auto; display: block; }

/* 5.2 Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--scrim); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.nav { display: flex; align-items: center; }
.nav-menu { list-style: none; display: none; margin: 0; }
.nav-menu a:not(.btn) { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 12px 8px; color: var(--muted); text-decoration: none; font-family: var(--font-body); font-weight: 600; font-size: 0.875rem; line-height: 1.3; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; position: relative; }
@media (hover: hover) { .nav-menu a:not(.btn):hover { color: var(--text); } }
.nav-menu a:not(.btn)[aria-current="page"] { color: var(--text); }
.nav-menu a:not(.btn)[aria-current="page"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 6px; height: 2px; background: var(--accent); }
.nav-menu .btn { min-height: 44px; padding: 0 var(--s4); }
@media (max-width: 1279.98px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu.is-open { display: block; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: var(--s4) var(--gutter) var(--s5); }
  .nav-menu.is-open li:not(.nav-cta) { border-bottom: 1px solid var(--line); }
  .nav-menu.is-open li:not(.nav-cta) a { display: flex; align-items: center; min-height: 48px; }
  .nav-menu.is-open .nav-cta { margin-top: var(--s3); }
  .nav-menu.is-open .nav-cta .btn { width: 100%; }
}
@media (min-width: 1280px) {
  .nav-toggle { display: none; }
  .nav-menu { display: flex; align-items: center; gap: var(--s5); }
  .nav-cta { display: flex; gap: var(--s3); margin-left: var(--s3); }
}
/* DOWNLOAD-PATH: the header's one primary button is Download with the Windows mark (its accessible name the whole Download for Windows; the hero keeps the whole words; the hero's See plans link and the footer's plan links lead to the plans); beside the Menu toggle from 800 px, in the open menu below that.
   PLAY-ENTRY: html[data-play] (theme.js from the last answer, site.js from the live one) swaps that button for Play: in the nav's menu on a wide
   screen, beside the Menu toggle on a narrow one (never both, so the header holds one primary button), and the home hero's big button gives way. */
.nav-play, .nav-play-m, .nav-dl-m { display: none; }
.nav-play-m, .nav-dl-m { min-height: 44px; padding: 0 var(--s4); margin-right: var(--s2); }
html[data-play] .nav-cta:not(.nav-play), html[data-play] .hero-pro { display: none; }
/* The header's one sign-in control: Sign in, or Account once theme.js's signed-in hint (html[data-in]) says so. */
html[data-in] .nav-out, html:not([data-in]) .nav-in { display: none; }
@media (max-width: 1279.98px) { html[data-play] .nav-play-m { display: inline-flex; } }
@media (min-width: 800px) and (max-width: 1279.98px) { html:not([data-play]) .nav-dl-m { display: inline-flex; } html:not([data-play]) .nav-menu .nav-cta { display: none; } }
@media (min-width: 1280px) { html[data-play] .nav-play { display: flex; } }

/* 5.2b The language picker (LANG-PICK): a button at the header's end (flag, and from 1440 px the language's own name) opens a dialog of every language: its flag, its own
   name and its name in this page's language, the current one ticked. A centred plate of two columns, a bottom sheet of one below 640 px. The flags are the one place
   colour is not a token (DESIGN 3.1). Esc, the Close button and a press outside close it; the dialog is the browser's own modal (focus held inside, returned to the button). */
.header-inner > .nav { margin-left: auto; }
.lang { display: flex; margin-left: var(--s2); }
.flag { display: block; flex: none; outline: 1px solid var(--line-strong); outline-offset: -1px; }
.lang-globe { display: none; }
.lang-btn { min-height: 44px; padding: 0 var(--s3); gap: var(--s2); color: var(--text); }
.lang-now { display: none; font-family: var(--font-body); font-weight: 600; font-size: 0.875rem; letter-spacing: 0.02em; white-space: nowrap; }
@media (min-width: 1440px) { .lang-now { display: inline; } }
/* on a phone the header holds wordmark, Play, Menu and this button (the longest languages' Play): the flag and a globe (it says "language"; a chevron says only "menu"), and tighter plates */
@media (max-width: 479.98px) {
  .header-inner { gap: var(--s2); }
  .lang { margin-left: 0; }
  .lang-btn { gap: var(--s1); }
  .lang-chev { display: none; }
  .lang-globe { display: block; }
  .nav-toggle, .nav-play-m { padding: 0 var(--s3); }
  .nav-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }   /* the icon shows; the word stays its name */
}
.lang-dialog { padding: 0; border: 0; background: transparent; color: var(--text); overflow: visible; max-width: none; max-height: none; width: min(640px, calc(100vw - 2 * var(--gutter))); }
.lang-dialog::backdrop { background: var(--veil); }
.lang-panel { --cut: var(--cut-l); --plate-fill: var(--surface); --plate-edge: var(--line-strong); display: flex; flex-direction: column; max-height: calc(100dvh - 2 * var(--s5)); padding: var(--s3) var(--s3) var(--s4); }
.lang-head { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding-left: var(--s3); }
.lang-head p { color: var(--faint); }
.lang-close { min-width: 44px; min-height: 44px; padding: 0; }
.lang-list { list-style: none; margin: var(--s2) 0 0; overflow-y: auto; overscroll-behavior: contain; min-height: 0; display: grid; grid-template-columns: 1fr; }
.lang-opt { position: relative; display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: var(--s2) var(--s3); color: var(--text); text-decoration: none; }
.lang-opt:focus-visible { outline-offset: -2px; }
.lang-opt[aria-current] { background: var(--accent-soft); }
@media (hover: hover) { .lang-opt:hover:not([aria-current]) { background: var(--raised); } }
.lang-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.lang-own { font-weight: 600; font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
.lang-name { font-size: 0.8125rem; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.lang-check { color: var(--accent); }
@media (min-width: 640px) { .lang-list { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(8, auto); grid-auto-flow: column; column-gap: var(--s2); } }
@media (max-width: 639.98px) { .lang-dialog { width: 100%; margin: auto 0 0; } .lang-panel { --cut: 0px; max-height: 85dvh; } }
.lang-dialog[open] { animation: lang-in var(--t-slide) var(--ease-out); }
.lang-dialog[open]::backdrop { animation: lang-fade var(--t-reveal) linear; }
@keyframes lang-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes lang-fade { from { opacity: 0; } }
@media (max-width: 639.98px) { @keyframes lang-in { from { transform: translateY(100%); } } }

/* 5.3 Footer */
.site-footer { border-top: 1px solid var(--line); padding: var(--s8) 0 var(--s6); background: var(--bg); }
.footer-top { display: grid; gap: var(--s6); }
@media (min-width: 768px) { .footer-top { grid-template-columns: 2fr 1fr 1fr; } }
@media (min-width: 1024px) { .footer-top { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand .t-small { color: var(--muted); max-width: 36ch; margin-top: var(--s4); }
.footer-brand .wordmark { margin-bottom: calc(-1 * var(--s2)); }
.footer-nav h2 { color: var(--faint); }
.footer-nav ul { list-style: none; margin-top: var(--s3); }
.footer-nav li { padding-block: 0; }
.footer-nav a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; color: var(--muted); text-decoration: none; font-size: 0.9375rem; line-height: 1.55; }
.footer-brand .t-small a { display: inline-flex; align-items: center; min-height: 44px; }
@media (hover: hover) { .footer-nav a:hover { color: var(--text); text-decoration: underline; } }
.site-footer .ticks { margin-block: var(--s5); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s4); }
.footer-bottom .t-data { color: var(--faint); }
.legal { color: var(--faint); margin-top: var(--s4); max-width: 90ch; }

/* 5.4 Legal pages (D162): the Terms, Privacy and Riot notice long-form copy */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: var(--s4); }
.prose h2 { margin-top: var(--s7); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li, .prose td { color: var(--muted); }
.prose ul { list-style: disc; padding-inline-start: var(--s5); }
.prose li { margin-top: var(--s2); }
.prose table { width: 100%; border-collapse: collapse; margin-top: var(--s4); }
.prose th, .prose td { border: 1px solid var(--line); padding: var(--s2) var(--s3); text-align: left; vertical-align: top; }
.prose th { color: var(--faint); font-size: 0.8125rem; }
.prose td { font-size: 0.9375rem; line-height: 1.55; }
.prose code { font-family: var(--font-mono); font-size: 0.875em; color: var(--text); overflow-wrap: anywhere; }
.prose-toc { margin-top: var(--s5); margin-bottom: var(--s7); border-inline-start: 2px solid var(--line); padding-inline-start: var(--s4); }
.prose-toc ul { list-style: none; padding: 0; }
.prose-toc li { margin-top: var(--s2); }
/* the Effective line under the three legal pages' title (LEGAL fold-in L1) */
.eyebrow + .t-display-xl + .t-small { margin-top: var(--s4); }

/* Hero */
.hero-copy .eyebrow { margin-bottom: var(--s3); }
.hero-copy .t-lead { color: var(--muted); max-width: 56ch; margin-top: var(--s5); }
.hero-copy .btn-row { margin-top: var(--s6); }
.web-note { color: var(--muted); margin-top: var(--s2); max-width: 56ch; }   /* the desktop-first line under the download page's lead */
.hero-dl-note { color: var(--muted); margin-top: var(--s3); }
.hero .ticks { width: 100%; max-width: 420px; margin-top: var(--s6); }
.hero-meta { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s4); color: var(--faint); margin-top: var(--s4); }
.hero-meta li { white-space: nowrap; }
.hero-meta li:not(:last-child)::after { content: "·"; margin-left: var(--s4); color: var(--line-strong); }
/* 4 The app's own screens (SITE-REVAMP): a 16:9 frame on the surface with one etched edge; the picture or clip fills it. Its box is set before the bytes arrive (no shift),
   and without web/media the same box stands empty. Hover lifts the edge to the beam over --t-hover (pointer only). */
.shot { margin: 0; position: relative; aspect-ratio: 16 / 9; background: var(--surface); outline: 1px solid var(--line-strong); overflow: hidden; transition: outline-color var(--t-hover) linear; }
.shot picture, .shot img, .shot video, .shot-empty { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) { .shot:hover { outline-color: var(--accent); } }
.shot--wide { margin-top: var(--s8); }

/* Section heads */
.section-head .t-lead { color: var(--muted); margin-top: var(--s4); }
.section-head--wide .t-lead { max-width: 52ch; }
.section-head + *, h1 + .notice { margin-top: var(--s6); }
h1 + .t-lead { margin-top: var(--s5); }   /* the lead under a page title: /download/, /introducing/ and /cancel/ had none (text boxes 7 px into each other) */
.features, .readouts { margin-top: var(--s7); }

/* The feature blocks: copy beside a shot (library, finder, aim) */
.feature-copy .t-lead { color: var(--muted); margin-top: var(--s4); }
.feature-copy .checks { margin-top: var(--s6); gap: var(--s4); }
.feature-copy .checks .icon { margin-top: 0.3em; }
.feature-copy .btn-row { margin-top: var(--s6); }
.finder-note { color: var(--muted); margin-top: var(--s5); }
@media (min-width: 1680px) { .split.hero { grid-template-columns: 5fr 7fr; } }
@media (min-width: 1024px) { .split--wide { grid-template-columns: 4fr 7fr; } .split--wide.split--flip { grid-template-columns: 7fr 4fr; } }

/* Community and crosshairs: two shots, each with its words under it */
.duo { gap: var(--s7) var(--s6); }
.duo-item h3 { margin-top: var(--s5); }
.duo-item p { color: var(--muted); margin-top: var(--s3); max-width: 60ch; }

/* FAQ: the heading beside the questions on a wide screen */
.faq-layout .section-head + .faq { margin-top: var(--s6); }
@media (min-width: 1024px) {
  .faq-layout { display: grid; grid-template-columns: 4fr 8fr; gap: var(--s8); align-items: start; }
  .faq-layout .section-head { position: sticky; top: 96px; }
  .faq-layout .section-head + .faq { margin-top: 0; max-width: none; }
}

.team-features { margin-top: var(--s7); }
.teams-notice { margin-top: var(--s6); }

/* Performance */
.perf-note { color: var(--muted); margin-top: var(--s6); max-width: 80ch; }

/* Pricing */
.pricing-grid { display: grid; gap: var(--s5); margin-top: var(--s7); align-items: stretch; }
.pricing-grid > * { min-width: 0; }
@media (min-width: 768px) { .pricing-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1160px) { .pricing-grid { grid-template-columns: repeat(4, 1fr); } }   /* Free, Ranked, Premier, Pro */
.pricing-note { color: var(--muted); text-align: center; margin-top: var(--s5); }
.faq-wrap { margin-top: var(--s6); }

/* Aim trainer */
.aim-copy .t-lead { color: var(--muted); margin-top: var(--s4); max-width: 56ch; }
.aim-copy .btn-row { margin-top: var(--s6); }
.aim-play { display: none; }   /* PLAY-ENTRY: the app for a signed-in account, the sign-up link for everyone else (the app answers a visitor without an account with its sign-in page) */
html[data-play] .aim-play { display: inline-flex; }
html[data-play] .aim-signup { display: none; }

/* CTA band */
.cta-band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: clamp(64px, 9vw, 112px); }
.cta-band .ticks { margin-bottom: var(--s6); }
.cta-band h2 { max-width: 18ch; }
.cta-band .t-lead { color: var(--muted); margin-top: var(--s4); max-width: 52ch; }
.cta-band .btn-row { margin-top: var(--s6); }

/* Download */
.dl-copy .t-lead { color: var(--muted); }
.dl-copy .btn-row { margin-top: var(--s6); }
.dl-states h2 { margin-top: var(--s5); }
.dl-checking { color: var(--muted); margin-top: var(--s5); }
.dl-file { color: var(--faint); margin-top: var(--s3); }
.dl-fresh { color: var(--faint); margin-top: var(--s2); }
.reqs-aside { align-self: start; }   /* centred, its fonts arriving moved its top (CLS 0.13 on /download/) */
.reqs-aside { --cut: var(--cut-l); --plate-fill: var(--surface); --plate-edge: var(--line); padding: var(--s6); }
.reqs { margin-top: var(--s4); }
.reqs > div { display: grid; grid-template-columns: 120px 1fr; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.reqs dt { color: var(--faint); }
.reqs dd { margin: 0; }
@media (max-width: 479.98px) { .reqs > div { grid-template-columns: 1fr; } }
.install-steps { margin-top: var(--s7); }
.safe-notice { margin-top: 0; }

/* The tier pages (ranked, premier, pro) */
.team-lead { color: var(--muted); max-width: 50ch; margin-top: var(--s5); }
.team-includes-grid { margin-top: var(--s6); align-items: center; }
.team-includes-grid .checks { gap: var(--s4); }

/* Account */
.account-stack { display: grid; gap: var(--s6); }
.account-dl, .account-play { min-height: calc(var(--s5) * 3); }   /* the account's two big buttons (72 px) above the cards: the Windows download is the primary one, Play (PLAY-ENTRY) the web app beside it */
.account-dl { margin-top: var(--s4); }
.outage { display: flex; align-items: center; gap: var(--s3); margin-block: var(--s4); padding: 0 0 0 12px; max-width: 560px; border-left: 2px solid var(--danger); }
.outage > .icon { color: var(--danger); flex: none; }
.outage .outage-msg { color: var(--muted); }
.outage-retry { margin: 0; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: none; font: inherit; font-size: 0.9375rem; line-height: 1.55; color: var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.outage-close { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 4px; border: 0; background: none; color: var(--muted); cursor: pointer; }
@media (hover: hover) { .outage-close:hover { color: var(--text); } }
.account-card { --cut: var(--cut-l); --plate-fill: var(--surface); --plate-edge: var(--line); padding: var(--s6); display: grid; gap: var(--s4); }
.account-card > h2 { font-family: var(--font-body); font-weight: 600; font-size: 1.375rem; line-height: 1.2; letter-spacing: 0.014em; text-transform: uppercase; }
.signed-in-as { color: var(--faint); }
.plan-line { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.plan-sub { color: var(--muted); }
.plan-fallback { color: var(--muted); }
.portal-note { color: var(--faint); }
.owner-note { color: var(--muted); }
.devices-summary { color: var(--muted); }
.devices { list-style: none; }
.devices li { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.device-id { display: flex; align-items: baseline; gap: var(--s2); flex-wrap: wrap; }
.device-added { color: var(--faint); margin-top: var(--s1); }
.device-removed { color: var(--faint); }
.devices-note { color: var(--faint); }
.devices-empty { color: var(--muted); }
.devices-failed { color: var(--muted); }
.confirm-row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.confirm-row .ask { color: var(--text); }
.status-msg { margin-top: var(--s2); }
.status-msg--error { color: var(--danger); }
.team-role { color: var(--muted); margin-top: var(--s2); }
.team-dl { margin-top: var(--s4); }
.team-dl > div { display: grid; grid-template-columns: 120px 1fr; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.team-dl dt { color: var(--faint); }
.team-over, .over-seat { margin-top: var(--s4); color: var(--amber); }
.team-over > p + p { margin-top: var(--s2); }
.sign-out-row { margin-top: var(--s2); display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; }

/* 404 */
.error-code { color: var(--accent); }
.page-404 .ticks { width: 240px; margin: var(--s4) 0; }
.page-404 .t-lead { color: var(--muted); margin-top: var(--s4); }
.page-404 .btn-row { margin-top: var(--s6); }

/* 3.6 rule 2: reveal */
html.js [data-reveal], html.js [data-reveal-child] { opacity: 0; transform: translateY(8px); }
html.js .is-in[data-reveal], html.js .is-in[data-reveal-child], html.js .is-in [data-reveal-child] { opacity: 1; transform: none; }
[data-reveal], [data-reveal-child] { transition: opacity var(--t-reveal) var(--ease-out), transform var(--t-reveal) var(--ease-out); }

/* /introducing/'s clip (SITEVID): the media box reserves its space before the clip arrives */
.finder-video { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; background: var(--surface); border: 1px solid var(--line-strong); }

/* 3.6 rule 7: reduced motion */
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal], html.js [data-reveal-child] { opacity: 1; transform: none; transition: none; }
  .btn:active:not(:disabled) { transform: none; }
  .faq-item summary .icon { transition: none; }
  .lang-dialog[open] { animation: lang-fade var(--t-hover) linear; }
  .lang-dialog[open]::backdrop { animation: none; }
  .faq-item[open] .faq-body { animation: none; opacity: 1; }
  .shot { transition: none; }
  [data-reveal], [data-reveal-child] { transition: none; }
}

/* OPS (D195): the page's own styles live in ops.css (OPSX2). */
.muted{color:var(--muted)}
.confirm-row .ask{flex:1}
/* /device/ (ONE-WORDS S5): the code to compare with the app, large and spaced as the app shows it. */
.device-code{display:block;margin:var(--s2) 0;font-family:var(--font-mono);font-weight:600;font-size:1.8rem;line-height:1.2;letter-spacing:0.15em;color:var(--text);overflow-wrap:anywhere}
