/* Built for SaaS — Identity guidelines v1.0.0
   Tokens → base → components → chapters → applications → responsive */

:root {
  --carbon-950: #0C0D0E; --carbon-900: #141618; --carbon-850: #1A1D20; --carbon-800: #23272B; --carbon-700: #30353A;
  --steel-500: #5E6369; --steel-400: #8C9197; --steel-300: #AEB2B5;
  --concrete-200: #CDCFCE; --concrete-100: #DFE0DE; --concrete-50: #EBEBE8; --concrete-0: #F7F7F5;
  --signal: #0058F6; --signal-600: #004AD1; --signal-700: #003AA9; --signal-400: #71A3FF; --on-signal: #FFFFFF;

  --font: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 32px; --s6: 48px; --s7: 64px; --s8: 96px; --s9: 128px;
  --chamfer: 8px;
  --gap: 11.31px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 240ms;
  --wrap: 1360px;
  --pad: clamp(20px, 4vw, 48px);
  --bar-h: 56px;

  /* semantic, light */
  --bg: var(--concrete-50);
  --surface: var(--concrete-0);
  --surface-2: var(--concrete-100);
  --fg: var(--carbon-950);
  --fg-2: #3A3F44;
  --muted: var(--steel-500);
  --line: rgba(12, 13, 14, .12);
  --line-2: rgba(12, 13, 14, .22);
  --grid-line: rgba(12, 13, 14, .07);
  --invert-bg: var(--carbon-950);
  --invert-fg: var(--concrete-50);
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: var(--carbon-950);
  --surface: var(--carbon-900);
  --surface-2: var(--carbon-850);
  --fg: var(--concrete-50);
  --fg-2: #C4C7C8;
  --muted: var(--steel-400);
  --line: rgba(235, 235, 232, .1);
  --line-2: rgba(235, 235, 232, .2);
  --grid-line: rgba(235, 235, 232, .05);
  --invert-bg: var(--concrete-50);
  --invert-fg: var(--carbon-950);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 16px); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 1rem; line-height: 1.6; font-weight: 400; overflow-x: clip; text-rendering: optimizeLegibility; transition: background-color .3s var(--ease), color .3s var(--ease); }
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: from-font; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
code, kbd, .mono { font-family: var(--mono); font-size: .75rem; font-weight: 400; letter-spacing: 0; }
kbd { display: inline-grid; place-items: center; min-width: 1.6em; padding: 0 .35em; border: 1px solid var(--line-2); border-radius: 4px; font-size: .75em; line-height: 1.5; }
::selection { background: var(--signal); color: var(--on-signal); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--fg); color: var(--bg); padding: 8px 14px; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad); }
.muted { color: var(--muted); }
.sig { fill: var(--signal); }
.h3 { font-size: 1.375rem; line-height: 1.3; letter-spacing: -.01em; font-weight: 600; }
.h4 { font-size: 1.0625rem; line-height: 1.35; letter-spacing: -.005em; font-weight: 600; }
.sub { margin: var(--s8) 0 var(--s4); }

/* ---------- buttons ---------- */
.btn { --h: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 20px; font-size: .9375rem; font-weight: 500; letter-spacing: -.005em; text-decoration: none; white-space: nowrap; border: 1px solid transparent; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.btn--sm { --h: 36px; padding: 0 14px; font-size: .875rem; }
.btn--primary { background: var(--fg); color: var(--bg); clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%); }
.btn--signal { background: var(--signal); color: var(--on-signal); clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%); }
.btn--ghost { border-color: var(--line-2); color: var(--fg); }
@media (hover: hover) {
  .btn--primary:hover { background: var(--fg-2); }
  .btn--signal:hover { background: var(--signal-600); }
  .btn--ghost:hover { border-color: var(--fg); }
}
.link-btn { font-size: .8125rem; font-weight: 500; color: inherit; opacity: .8; }
.link-btn:hover { opacity: 1; text-decoration: underline; }

/* segmented control (used on light page and inside dark artifacts) */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 8px; background: rgba(127, 127, 127, .14); }
.seg button { height: 28px; padding: 0 12px; border-radius: 6px; font-size: .8125rem; font-weight: 500; color: inherit; opacity: .7; white-space: nowrap; transition: background-color var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.seg button[aria-pressed="true"] { opacity: 1; background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.artifact--light .seg button[aria-pressed="true"], .seg--pat button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.08), inset 0 0 0 1px var(--line); }
@media (hover: hover) { .seg button:hover { opacity: 1; } }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: color-mix(in srgb, currentColor 35%, transparent); }
input[type="range"]::-moz-range-track { height: 2px; background: color-mix(in srgb, currentColor 35%, transparent); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -6px; background: var(--signal); border: 0; border-radius: 0; clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 4px, 100% 100%, 0 100%); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; background: var(--signal); border: 0; border-radius: 0; }
output { font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */
.bar { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--bar-h); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.bar__in { height: 100%; display: flex; align-items: center; gap: 24px; max-width: calc(var(--wrap) + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad); }
.bar__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: .9375rem; letter-spacing: -.01em; white-space: nowrap; }
.bar__mark { width: 20px; height: 20px; fill: currentColor; }
.bar__ver { font-weight: 400; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--line-2); }
.bar__toc { position: relative; margin-left: 8px; }
.bar__toc summary { list-style: none; display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 12px; border-radius: 8px; font-size: .875rem; font-weight: 500; cursor: pointer; white-space: nowrap; }
.bar__toc summary::-webkit-details-marker { display: none; }
.bar__toc summary svg { width: 12px; height: 12px; color: var(--muted); transition: transform var(--dur) var(--ease); }
.bar__toc[open] summary svg { transform: rotate(180deg); }
@media (hover: hover) { .bar__toc summary:hover { background: rgba(127,127,127,.1); } }
.bar__num { font-family: var(--mono); font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar__toc nav { position: absolute; top: calc(100% + 8px); left: 0; width: 260px; padding: 6px; background: var(--carbon-900); color: var(--concrete-50); border-radius: 10px; box-shadow: 0 20px 50px -12px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.06); }
.bar__toc nav a { display: flex; gap: 14px; align-items: baseline; padding: 8px 10px; border-radius: 6px; text-decoration: none; font-size: .875rem; }
.bar__toc nav a span { font-family: var(--mono); font-size: .6875rem; color: var(--steel-400); }
.bar__toc nav a:hover, .bar__toc nav a[aria-current="true"] { background: rgba(255,255,255,.07); }
.bar__toc nav a[aria-current="true"] span { color: var(--signal); }
.bar__end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.theme { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border-radius: 8px; font-size: .8125rem; font-weight: 500; color: var(--muted); }
.theme__dot { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
@media (hover: hover) { .theme:hover { color: var(--fg); } }
.bar__track { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; }
.bar__track i { display: block; height: 100%; width: 100%; background: var(--fg); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- cover ---------- */
.cover { position: relative; height: calc(100vh + 45vh); height: calc(100svh + 45vh); }
.cover__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; padding-top: var(--bar-h); overflow: hidden; }
.cover__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--s6); align-items: center; }
.meta { display: grid; grid-template-columns: repeat(4, auto); gap: 8px 32px; justify-content: start; padding-bottom: 20px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
.meta dt { font-size: .75rem; color: var(--muted); }
.meta dd { font-size: .8125rem; font-weight: 500; white-space: nowrap; }
.cover__title { font-size: clamp(2.75rem, 6vw, 5.5rem); line-height: 1; letter-spacing: -.04em; font-weight: 600; text-wrap: balance; }
.cover__lede { margin-top: 28px; max-width: 34em; font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); line-height: 1.55; color: var(--fg-2); text-wrap: pretty; }
.cover__cta { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.cover__stage { justify-self: end; width: min(100%, 600px); }
.cover__frame { position: relative; aspect-ratio: 1; background: var(--surface); border: 1px solid var(--line); }
.cut { width: 100%; height: 100%; overflow: visible; }
.cut__grid path { stroke: var(--grid-line); stroke-width: .35; fill: none; }
.cut__grid .major { stroke: var(--line); }
.cut__solid, .cut__waste path, .cut__mark path { fill: var(--fg); }
.cut__solid, .cut__waste, .cut__lines { display: none; }
html.js .cut__solid, html.js .cut__waste, html.js .cut__lines { display: inline; }
.cut__lines path { fill: none; stroke: var(--signal); stroke-width: .6; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.cut__dims text { font-family: var(--mono); font-size: 5.5px; fill: var(--muted); }
.cut__dims { opacity: 1; }
html.js .cut__dims { opacity: 0; }
.cover__cap { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; font-size: .8125rem; color: var(--muted); }
.cover__cap #cutState { color: var(--fg); font-weight: 500; }
.cover__hint { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.cover__hint::before { content: ""; width: 6px; height: 6px; background: var(--signal); }
.contents { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--line); position: relative; z-index: 1; }
.contents li { border-bottom: 1px solid var(--line); }
.contents a { display: flex; gap: 12px; align-items: baseline; padding: 16px 16px 16px 0; text-decoration: none; font-size: .9375rem; font-weight: 500; transition: color var(--dur) var(--ease); }
.contents b { font-family: var(--mono); font-size: .6875rem; font-weight: 400; color: var(--muted); }
@media (hover: hover) { .contents a:hover { color: var(--signal-700); } html[data-theme="dark"] .contents a:hover { color: var(--signal-400); } }

/* ---------- chapters ---------- */
.chapter { padding-block: clamp(80px, 10vw, 144px); border-top: 1px solid var(--line); }
.toc-strip + .chapter { border-top: 0; }
.toc-strip { position: relative; z-index: 2; background: var(--bg); }
.ch-head { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 6fr) minmax(0, 4fr); gap: var(--s4) var(--s6); align-items: start; margin-bottom: clamp(48px, 6vw, 80px); }
.ch-num { font-family: var(--mono); font-size: .75rem; color: var(--muted); padding-top: .9em; display: flex; align-items: center; gap: 10px; }
.ch-num::after { content: ""; flex: 0 0 24px; height: 1px; background: var(--line-2); }
.ch-head h2 { font-size: clamp(2rem, 4.2vw, 3.5rem); line-height: 1.06; letter-spacing: -.035em; font-weight: 600; text-wrap: balance; }
.ch-intro { font-size: 1.0625rem; line-height: 1.6; color: var(--fg-2); text-wrap: pretty; padding-top: .5em; }

/* artifacts: dark tools living on the paper */
.artifact { position: relative; background: var(--carbon-900); color: var(--concrete-50); border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px rgba(12,13,14,.9), 0 30px 60px -30px rgba(12,13,14,.35); }
html[data-theme="dark"] .artifact { box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 30px 60px -30px rgba(0,0,0,.6); }
.artifact__bar { display: flex; align-items: center; gap: 16px; min-height: 48px; padding: 8px 12px 8px 16px; border-bottom: 1px solid rgba(255,255,255,.07); font-size: .8125rem; color: var(--steel-300); flex-wrap: wrap; }
.artifact--light { background: var(--surface); color: var(--fg); box-shadow: 0 0 0 1px var(--line); }
.artifact--light .artifact__bar { border-color: var(--line); color: var(--muted); }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--carbon-700); }
.panel-h { font-size: .75rem; font-weight: 600; color: var(--steel-300); margin-bottom: 12px; }

/* ---------- 01 story ---------- */
.statement { margin-bottom: var(--s8); }
.statement p { max-width: 21em; }
.statement p { font-size: clamp(1.75rem, 3.4vw, 3rem); line-height: 1.12; letter-spacing: -.03em; font-weight: 500; text-wrap: balance; }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--fg); margin-bottom: var(--s8); }
.principle { padding: 28px 32px 8px 0; }
.principle + .principle { padding-left: 32px; border-left: 1px solid var(--line); }
.principle svg { width: 48px; height: 48px; margin-bottom: 28px; fill: var(--fg); }
.principle svg .sig { fill: var(--signal); }
.pr-grid path { stroke: var(--line-2); stroke-width: .5; fill: none; }
.principle h3 { font-size: 1.25rem; letter-spacing: -.015em; font-weight: 600; margin-bottom: 8px; }
.principle p { color: var(--fg-2); max-width: 30em; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s6) clamp(32px, 5vw, 80px); align-items: start; }
.split__copy p { color: var(--fg-2); margin-top: 12px; max-width: 34em; }
.split__copy .h3 + p { margin-top: 12px; }
.split__copy .h3:not(:first-child) { margin-top: 48px; }
.rules { margin-top: 16px; display: grid; gap: 0; }
.rules li { padding: 14px 0; border-top: 1px solid var(--line); color: var(--fg-2); }
.rules li b { color: var(--fg); font-weight: 600; margin-right: 4px; }
.rules--cols { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; margin-top: 48px; }
.rules--cols li { border-top: 1px solid var(--fg); padding-top: 16px; }
.rules--cols li b { display: block; margin-bottom: 4px; }

.diff { position: sticky; top: calc(var(--bar-h) + 24px); }
.diff__file { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .75rem; color: var(--concrete-50); }
.diff__file svg { width: 14px; fill: none; stroke: var(--steel-400); }
.diff__stat { font-family: var(--mono); font-size: .75rem; }
.diff__stat i { font-style: normal; }
.plus { color: #5BC37E; } .minus { color: #F07A5A; }
.diff .seg { margin-left: auto; }
.diff__body { font-size: .9375rem; }
.hunk__h { padding: 8px 16px; font-family: var(--mono); font-size: .6875rem; color: var(--steel-400); background: rgba(255,255,255,.03); border-block: 1px solid rgba(255,255,255,.05); }
.hunk:first-child .hunk__h { border-top: 0; }
.diff__body p { display: grid; grid-template-columns: 32px 1fr; padding: 10px 16px 10px 0; line-height: 1.5; }
.diff__body p span { text-align: center; font-family: var(--mono); font-size: .8125rem; opacity: .8; }
.del { background: rgba(240, 122, 90, .08); color: #C9CBCC; }
.del span { color: #F07A5A; }
.del { text-decoration: line-through; text-decoration-color: rgba(240,122,90,.55); text-decoration-thickness: 1px; }
.add { background: rgba(91, 195, 126, .09); color: var(--concrete-0); }
.add span { color: #5BC37E; }
.diff__body[data-view="split"] .hunk { display: grid; grid-template-columns: 1fr 1fr; }
.diff__body[data-view="split"] .hunk__h { grid-column: 1 / -1; }
.diff__body[data-view="split"] .add { border-left: 1px solid rgba(255,255,255,.06); }
.diff__foot { display: flex; align-items: center; gap: 12px; padding: 14px 16px; font-size: .8125rem; color: var(--steel-300); border-top: 1px solid rgba(255,255,255,.07); }
.avatar-mark { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--signal); }
.avatar-mark svg { width: 12px; height: 12px; fill: var(--carbon-950); }

/* ---------- 02 logo: inspector ---------- */
.inspector__file { font-size: .8125rem; color: var(--concrete-50); font-weight: 500; }
.seg--tools { margin-left: auto; }
.inspector__body { display: grid; grid-template-columns: 220px minmax(0, 1fr) 280px; min-height: 560px; }
.layers, .props { padding: 20px 16px; font-size: .8125rem; }
.layers { border-right: 1px solid rgba(255,255,255,.07); }
.props { border-left: 1px solid rgba(255,255,255,.07); }
.layers__frame { display: flex; align-items: center; gap: 8px; padding: 6px 8px; color: var(--steel-300); }
.layers__frame svg { width: 14px; height: 14px; color: var(--steel-400); }
.layers__frame span { margin-left: auto; font-family: var(--mono); font-size: .6875rem; color: var(--steel-400); }
.layers ul { margin: 4px 0 0 12px; }
.layers li button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; text-align: left; color: var(--steel-300); transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.layers li button[aria-pressed="true"] { background: rgba(0,88,246,.14); color: var(--concrete-0); }
@media (hover: hover) { .layers li button:hover { color: var(--concrete-0); background: rgba(255,255,255,.05); } .layers li button[aria-pressed="true"]:hover { background: rgba(0,88,246,.18); } }
.layers kbd { margin-left: auto; border-color: rgba(255,255,255,.15); color: var(--steel-400); }
.lyr-ic { width: 12px; height: 12px; border: 1.5px solid currentColor; clip-path: polygon(0 0, 100% 0, 50% 50%, 0 50%); background: currentColor; }
li:nth-child(2) .lyr-ic { clip-path: polygon(70% 0, 100% 0, 100% 100%, 0 100%); }
li:nth-child(3) .lyr-ic { clip-path: polygon(0 0, 100% 0, 0 100%); }
.layers__note { margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.07); color: var(--steel-400); line-height: 1.5; }
.canvas { position: relative; display: grid; place-items: center; padding: 32px; background: var(--carbon-950); background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 16px 16px; }
#insSvg { width: min(100%, 520px); height: auto; aspect-ratio: 1; overflow: visible; }
.ins-grid path { stroke: rgba(255,255,255,.08); stroke-width: .3; fill: none; }
.ins-grid .major { stroke: rgba(255,255,255,.16); }
.ins-grid text { font-family: var(--mono); font-size: 3.6px; fill: var(--steel-400); }
.ins-keys path { stroke: var(--signal); stroke-width: .45; fill: none; stroke-dasharray: 2 1.5; opacity: .9; }
.ins-keys text { font-family: var(--mono); font-size: 4px; fill: var(--signal); }
.ins-clear rect { fill: rgba(0,88,246,.08); stroke: var(--signal); stroke-width: .4; stroke-dasharray: 1.5 1.5; }
.ins-clear text { font-family: var(--mono); font-size: 4.5px; fill: var(--signal); }
.ins-grid, .ins-keys, .ins-clear { transition: opacity .25s var(--ease); }
.ins-pieces path { fill: var(--concrete-50); cursor: pointer; transition: fill .25s var(--ease), opacity .25s var(--ease); }
.ins-pieces.has-sel path { opacity: .55; }
.ins-pieces.has-sel path.on { opacity: 1; }
.ins-sel path, .ins-sel rect { fill: none; stroke: #4C9BFF; stroke-width: .5; vector-effect: non-scaling-stroke; }
.ins-sel path { stroke-width: 1.5px; }
.ins-sel .h { fill: #fff; stroke: #4C9BFF; stroke-width: 1px; }
.ins-sel text { font-family: var(--mono); font-size: 4px; fill: #fff; }
.ins-sel .lbl { fill: #4C9BFF; stroke: none; }
.ins-pixel { position: absolute; right: 20px; bottom: 20px; width: 128px; height: 128px; image-rendering: pixelated; background: var(--carbon-950); box-shadow: 0 0 0 1px rgba(255,255,255,.15); opacity: 0; transform: translateY(8px); transition: opacity .25s var(--ease), transform .35s var(--ease); pointer-events: none; }
.inspector.show-pixel .ins-pixel { opacity: 1; transform: none; }
.inspector:not(.show-grid) .ins-grid, .inspector:not(.show-keys) .ins-keys, .inspector:not(.show-clear) .ins-clear { opacity: 0; }
.props__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.props__grid label { display: flex; justify-content: space-between; align-items: center; height: 32px; padding: 0 10px; border-radius: 6px; background: rgba(255,255,255,.05); color: var(--steel-400); font-size: .75rem; }
.props__grid output { font-family: var(--mono); color: var(--concrete-0); font-size: .75rem; }
.props__row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-top: 1px solid rgba(255,255,255,.06); color: var(--steel-400); }
.props__row b { font-weight: 500; color: var(--concrete-0); display: inline-flex; gap: 8px; align-items: center; }
.chip { width: 12px; height: 12px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.props .chip { background: var(--concrete-50) !important; }
.props__mean { margin: 12px 0 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.06); color: var(--steel-300); line-height: 1.55; font-size: .875rem; min-height: 7.5em; }
.props__path { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 6px; background: rgba(255,255,255,.05); text-align: left; }
.props__path code { flex: 1; min-width: 0; font-size: .6875rem; color: var(--steel-300); overflow-wrap: anywhere; line-height: 1.5; }
.props__path span { font-size: .75rem; font-weight: 500; color: var(--signal); }

/* logo specs */
.logo-specs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); margin-top: var(--s4); }
.spec { background: var(--surface); border: 1px solid var(--line); padding: 24px; }
.spec__vis { aspect-ratio: 16 / 9; display: grid; place-items: center; margin-bottom: 24px; background: var(--bg); border: 1px solid var(--line); }
.spec__vis--clear svg { height: 80%; width: auto; overflow: visible; }
.cs-out { fill: none; stroke: var(--signal); stroke-width: .8; stroke-dasharray: 3 2; }
.cs-in { fill: none; stroke: var(--line-2); stroke-width: .6; }
.cs-mark { fill: var(--fg); }
.cs-x path { stroke: var(--signal); stroke-width: .8; fill: none; }
.cs-x text { font-family: var(--mono); font-size: 7px; fill: var(--signal); }
.spec p { color: var(--fg-2); margin-top: 8px; max-width: 36em; }
.spec__vis--size { grid-template-columns: 1fr 1fr; gap: 24px; padding: 24px; place-items: center stretch; }
.sizer { display: grid; place-items: center; height: 100%; min-height: 160px; }
.sizer svg { fill: var(--fg); width: 32px; height: 32px; }
.sizer__ctl label { display: flex; justify-content: space-between; font-size: .8125rem; color: var(--muted); }
.sizer__ctl output { font-family: var(--mono); font-size: .75rem; color: var(--fg); }
.sizer__ctl input { color: var(--fg); margin-top: 8px; }
.sizer__verdict { margin-top: 12px; font-size: .875rem; font-weight: 500; display: flex; gap: 8px; align-items: center; }
.sizer__verdict::before { content: ""; width: 8px; height: 8px; flex: none; background: #2E9E5B; }
.sizer__verdict.bad::before { background: var(--signal); }

/* lockups */
.lockups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.lockup { background: var(--surface); display: flex; flex-direction: column; }
.lockup__vis { aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 24px; }
.lk { display: inline-flex; align-items: center; color: var(--fg); }
.lk svg { fill: currentColor; }
.lk--h { gap: 12px; } .lk--h .lk__m { width: 40px; height: 40px; } .lk--h .lk__w { width: 74px; height: 40px; }
.lk--s { flex-direction: column; gap: 14px; } .lk--s .lk__m { width: 56px; height: 56px; } .lk--s .lk__w { width: 56px; height: 30px; }
.lk--n { gap: 12px; font-weight: 600; font-size: 1.25rem; letter-spacing: -.02em; white-space: nowrap; } .lk--n .lk__m { width: 32px; height: 32px; }
.lk--d { gap: 16px; } .lk--d .lk__m { width: 36px; height: 36px; } .lk--d i { width: 4px; height: 36px; background: var(--line-2); } .lk--d .lk__w { width: 66px; height: 36px; opacity: .45; }
.lockup figcaption { padding: 16px 20px 20px; border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); line-height: 1.5; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.lockup figcaption b { color: var(--fg); font-weight: 600; font-size: .9375rem; }
.dl { align-self: flex-start; margin-top: 8px; font-family: var(--mono); font-size: .6875rem; color: var(--fg); text-decoration: none; padding: 3px 8px; border: 1px solid var(--line-2); }
.dl::before { content: "↓ "; }
@media (hover: hover) { .dl:hover { border-color: var(--fg); } }

/* colourways */
.ways { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s3); }
.way { display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 4 / 5; padding: 20px; }
.way svg { width: 48px; height: 48px; margin: auto; }
.way p { font-size: .875rem; font-weight: 500; display: flex; flex-direction: column; }
.way p span { font-weight: 400; font-size: .8125rem; opacity: .72; }
.way--carbon { background: var(--carbon-950); color: var(--concrete-50); fill: var(--concrete-50); }
.way--concrete { background: var(--concrete-0); color: var(--carbon-950); fill: var(--carbon-950); box-shadow: inset 0 0 0 1px var(--line); }
.way--signal { background: var(--signal); color: var(--on-signal); fill: var(--on-signal); }
.way--sigdark { background: var(--carbon-950); color: var(--concrete-50); fill: var(--signal); }
.way--no { background: var(--concrete-50); color: var(--carbon-950); fill: var(--signal); box-shadow: inset 0 0 0 1px var(--line); position: relative; }
.way--no::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top right, transparent calc(50% - 1px), var(--signal-700) calc(50% - 1px), var(--signal-700) calc(50% + 1px), transparent calc(50% + 1px)); opacity: .5; pointer-events: none; }
.way--no span { color: var(--signal-700); opacity: 1 !important; font-weight: 500 !important; }

/* lint (misuse) */
.lint .artifact__bar { justify-content: space-between; }
.term-prompt { font-family: var(--mono); font-size: .75rem; color: var(--concrete-50); }
.lint__count { font-size: .75rem; font-weight: 500; color: #F07A5A; }
.lint__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lint__list li { padding: 20px; border-right: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); }
.lint__list li:nth-child(4n) { border-right: 0; }
.lint__list li:nth-last-child(-n+4) { border-bottom: 0; }
.lint__vis { position: relative; aspect-ratio: 3 / 2; display: grid; place-items: center; background: var(--carbon-950); margin-bottom: 16px; overflow: hidden; }
.lint__vis::after { content: "error"; position: absolute; right: 8px; top: 8px; padding: 1px 6px; font-family: var(--mono); font-size: .625rem; color: #F07A5A; background: rgba(240,122,90,.12); border-radius: 3px; }
.lint__vis svg { width: 64px; height: 64px; fill: var(--concrete-50); overflow: visible; }
.lint__list p { font-size: .875rem; color: var(--steel-300); line-height: 1.5; }
.lint__list code { display: block; margin-bottom: 6px; color: #F07A5A; font-size: .75rem; }
.mis-rotate svg { transform: rotate(-90deg) scaleX(-1); }
.mis-stretch svg { width: 104px; height: 52px; }
.mis-recolor .sig { fill: var(--signal); }
.mis-outline svg { fill: none; stroke: var(--concrete-50); stroke-width: 3; }
.mis-effect svg { fill: #E9E2FF; filter: drop-shadow(0 0 10px rgba(170,130,255,.95)) drop-shadow(0 10px 8px rgba(0,0,0,.7)); }
.mis-effect { background: linear-gradient(135deg, #3A2A6A, #0C0D0E) !important; }
.mis-round svg { stroke: var(--concrete-50); stroke-width: 14; stroke-linejoin: round; }
.mis-contrast { background: var(--carbon-850) !important; }
.mis-contrast svg { fill: var(--carbon-700); }

/* ---------- 03 colour ---------- */
.swatches { display: grid; grid-template-columns: 4fr 4fr 2.4fr 2fr; gap: var(--s3); }
.sw { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-height: 360px; padding: 24px; text-align: left; transition: transform .45s var(--ease); }
.sw__name { font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; }
.sw__role { font-size: .875rem; opacity: .75; margin-top: 2px; }
.sw__vals { margin-top: auto; display: flex; flex-direction: column; gap: 2px; font-family: var(--mono); font-size: .75rem; }
.sw__vals b { font-weight: 500; font-size: .8125rem; }
.sw__vals i { font-style: normal; opacity: .72; }
.sw::after { content: "Copy"; position: absolute; right: 20px; top: 24px; font-size: .75rem; font-weight: 500; opacity: 0; transition: opacity var(--dur) var(--ease); }
@media (hover: hover) { .sw:hover::after { opacity: .8; } }
.sw.copied::after { content: "Copied"; opacity: 1; }
.sw--carbon { background: var(--carbon-950); color: var(--concrete-50); }
.sw--concrete { background: var(--concrete-50); color: var(--carbon-950); box-shadow: inset 0 0 0 1px var(--line-2); }
html[data-theme="light"] .sw--concrete { background: var(--concrete-0); }
.sw--steel { background: var(--steel-500); color: var(--concrete-0); }
.sw--signal { background: var(--signal); color: var(--on-signal); }
.ratio { display: flex; height: 40px; margin-top: var(--s3); font-size: .75rem; font-weight: 500; }
.ratio span { display: flex; align-items: center; padding: 0 12px; white-space: nowrap; overflow: hidden; }
.ratio span:nth-child(1) { background: var(--carbon-950); color: var(--concrete-50); }
.ratio span:nth-child(2) { background: var(--concrete-0); color: var(--carbon-950); box-shadow: inset 0 0 0 1px var(--line); }
.ratio span:nth-child(3) { background: var(--steel-500); color: var(--concrete-0); }
.ratio__sig { background: var(--signal); padding: 0 !important; position: relative; overflow: visible !important; }
.ratio__sig em { position: absolute; right: 0; top: calc(100% + 6px); font-style: normal; font-family: var(--mono); color: var(--signal-700); }
html[data-theme="dark"] .ratio__sig em { color: var(--signal-400); }
.colour-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s6); margin-top: var(--s8); align-items: start; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs button { height: 32px; padding: 0 12px; border-radius: 6px; font-family: var(--mono); font-size: .75rem; color: var(--steel-400); white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--concrete-0); background: rgba(255,255,255,.08); }
.code__pre { margin: 0; padding: 20px 20px 24px; height: 440px; overflow: auto; font-family: var(--mono); font-size: .78rem; line-height: 1.7; color: var(--steel-300); tab-size: 2; }
.code__pre code { font-size: inherit; }
.code__pre .k { color: #E8E9E6; }
.code__pre .s { color: #9DC3A8; }
.code__pre .n { color: #E8C07D; }
.code__pre .c { color: var(--steel-500); }
.code__pre .hex { cursor: copy; border-radius: 3px; padding: 0 2px; margin: 0 -2px; }
.code__pre .hex:hover { background: rgba(255,255,255,.08); }
.code__pre .hex i { display: inline-block; width: .8em; height: .8em; margin-right: 6px; vertical-align: -.05em; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.contrast .muted { margin: 8px 0 20px; max-width: 34em; }
.matrix { display: grid; grid-template-columns: 1.2fr repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); font-size: .8125rem; }
.matrix [role="row"] > div { min-height: 64px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.matrix [role="row"]:first-child > div { min-height: 40px; }
.matrix .cell { border-bottom-color: rgba(128,128,128,.18) !important; }
.matrix .mh { color: var(--muted); font-size: .75rem; }
.matrix .cell { align-items: center; font-family: var(--mono); font-size: .75rem; font-variant-numeric: tabular-nums; text-align: center; }
.matrix .cell b { font-weight: 500; font-family: var(--font); font-size: .9375rem; }
.matrix .cell small { font-family: var(--font); font-size: .6875rem; font-weight: 500; opacity: .75; white-space: nowrap; }
.note { margin-top: 20px; padding: 16px; background: var(--surface); border-left: 2px solid var(--signal); font-size: .9375rem; color: var(--fg-2); }
.note b { color: var(--fg); font-weight: 600; }

/* ---------- 04 type ---------- */
.specimen { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.specimen > div { background: var(--surface); padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.specimen__main { flex-direction: row !important; align-items: flex-end; }
.specimen__aa { font-size: clamp(7rem, 15vw, 14rem); line-height: .8; letter-spacing: -.05em; font-weight: 600; }
.specimen__aa--mono { font-family: var(--mono); font-size: clamp(4rem, 7vw, 6rem); letter-spacing: -.04em; font-weight: 400; color: var(--muted); }
.specimen__name { font-size: 1.375rem; font-weight: 600; letter-spacing: -.015em; }
.specimen .muted { margin-top: 4px; font-size: .9375rem; max-width: 30em; }
.specimen__set { margin-top: 20px; font-size: 1.0625rem; line-height: 1.5; color: var(--fg-2); overflow-wrap: anywhere; }
.specimen__set.mono { font-size: .8125rem; }
.tester { margin-top: var(--s4); }
.tester .artifact__bar { justify-content: space-between; }
.tester__ctl { display: flex; gap: 24px; flex-wrap: wrap; }
.tester__ctl label { display: flex; align-items: center; gap: 10px; font-size: .75rem; }
.tester__ctl input { width: 120px; color: var(--fg); }
.tester__ctl output { font-family: var(--mono); font-size: .75rem; min-width: 3ch; color: var(--fg); }
.tester__text { padding: 40px 32px 48px; font-size: 72px; line-height: 1.05; letter-spacing: -.035em; font-weight: 560; outline: none; min-height: 2.4em; overflow-wrap: anywhere; text-wrap: balance; }
.tester__text:focus-visible { box-shadow: inset 0 0 0 2px var(--signal); }
.scale { margin-top: var(--s8); border-top: 1px solid var(--fg); }
.scale__row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 220px; gap: 24px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--line); }
.scale__row > code { color: var(--muted); }
.scale__row > span { font-family: var(--mono); font-size: .6875rem; color: var(--muted); text-align: right; }
.scale__row p { min-width: 0; }
.t-display { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.04; letter-spacing: -.035em; font-weight: 600; }
.t-h1 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.08; letter-spacing: -.03em; font-weight: 600; }
.t-h2 { font-size: 2rem; line-height: 1.15; letter-spacing: -.02em; font-weight: 600; }
.t-h3 { font-size: 1.375rem; line-height: 1.3; letter-spacing: -.01em; font-weight: 600; }
.t-bodyl { font-size: 1.1875rem; line-height: 1.55; }
.t-body { font-size: 1rem; line-height: 1.6; max-width: 40em; }
.t-cap { font-size: .8125rem; line-height: 1.45; letter-spacing: .005em; font-weight: 500; color: var(--muted); }
.t-mono { font-family: var(--mono); font-size: .75rem; }

/* ---------- 05 patterns ---------- */
.chapter--patterns { padding-bottom: clamp(80px, 10vw, 144px); }
.pat { position: relative; }
.pat__field { position: relative; height: clamp(420px, 72vh, 760px); background: var(--carbon-950); overflow: hidden; touch-action: pan-y; }
.pat__field canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pat__dock { position: relative; z-index: 2; margin-top: -56px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 20px 28px; padding: 20px 24px; background: var(--surface); color: var(--fg); box-shadow: 0 0 0 1px var(--line), 0 24px 48px -24px rgba(12,13,14,.35); }
.pat__group { display: flex; flex-direction: column; gap: 8px; }
.pat__label { font-size: .75rem; font-weight: 500; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; }
.pat__label output { font-family: var(--mono); color: var(--fg); }
.pat__group--range { width: 160px; }
.pat__group--range input { color: var(--fg); }
.pat__actions { flex-direction: row; margin-left: auto; gap: 8px; }
.parts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; margin-top: var(--s8); background: var(--line); border: 1px solid var(--line); }
.parts figure { background: var(--surface); padding: 20px; }
.parts svg { width: 100%; aspect-ratio: 1; fill: var(--fg); }
.parts .ghost { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 3; }
.parts .sig { fill: var(--signal); }
.parts figure:nth-child(n+4) svg path { fill: var(--steel-300); }
html[data-theme="dark"] .parts figure:nth-child(n+4) svg path { fill: var(--steel-500); }
.parts figcaption { margin-top: 12px; font-size: .875rem; font-weight: 500; display: flex; justify-content: space-between; gap: 8px; }
.parts figcaption span { font-family: var(--mono); font-size: .6875rem; font-weight: 400; color: var(--muted); }
.systems { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: var(--s6); }
.systems article { border-top: 1px solid var(--fg); padding-top: 16px; }
.systems p { margin-top: 6px; color: var(--fg-2); font-size: .9375rem; }
.dodont { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); margin-top: var(--s7); }
.dd { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-top: 2px solid; }
.dd--do { border-top-color: #2E9E5B; }
.dd--dont { border-top-color: var(--signal); }
.dd h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.dd ul li { position: relative; padding: 10px 0 10px 24px; border-top: 1px solid var(--line); color: var(--fg-2); font-size: .9375rem; }
.dd ul li:first-child { border-top: 0; }
.dd ul li::before { position: absolute; left: 0; top: 10px; font-family: var(--mono); font-size: .8125rem; }
.dd--do li::before { content: "+"; color: #2E9E5B; }
.dd--dont li::before { content: "−"; color: var(--signal-700); }
html[data-theme="dark"] .dd--dont li::before { color: var(--signal-400); }

/* ---------- 06 icons & elements ---------- */
.icons { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s4); align-items: stretch; }
.icons__big .artifact__bar { justify-content: space-between; }
#icName { font-family: var(--mono); font-size: .75rem; color: var(--concrete-50); }
.icons__stage { display: grid; place-items: center; aspect-ratio: 1; max-height: 460px; width: 100%; padding: 40px; }
#icBig { width: 100%; height: 100%; max-width: 360px; overflow: visible; }
#icBig .g path { stroke: rgba(255,255,255,.08); stroke-width: .04; fill: none; }
#icBig .g .live { stroke: rgba(0,88,246,.45); stroke-dasharray: .2 .2; }
#icBig .ic { fill: var(--concrete-50); }
#icBig .ic .sig { fill: var(--signal); }
.icons__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); align-content: start; }
.icons__grid button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; aspect-ratio: 1; background: var(--surface); font-family: var(--mono); font-size: .6875rem; color: var(--muted); transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.icons__grid button svg { width: 32px; height: 32px; fill: var(--fg); }
.icons__grid button .sig { fill: var(--signal); }
.icons__grid button[aria-selected="true"] { background: var(--carbon-950); color: var(--concrete-50); }
.icons__grid button[aria-selected="true"] svg { fill: var(--concrete-50); }
html[data-theme="dark"] .icons__grid button[aria-selected="true"] { background: var(--concrete-50); color: var(--carbon-950); }
html[data-theme="dark"] .icons__grid button[aria-selected="true"] svg { fill: var(--carbon-950); }
@media (hover: hover) { .icons__grid button:hover { color: var(--fg); } }
.elements { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
.el__vis { aspect-ratio: 3 / 2; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--line); margin-bottom: 14px; padding: 16px; }
.el figcaption { font-size: .875rem; color: var(--muted); line-height: 1.5; display: flex; flex-direction: column; gap: 2px; }
.el figcaption b { color: var(--fg); font-weight: 600; font-size: .9375rem; }
.el-chamfer { display: inline-flex; align-items: center; height: 44px; padding: 0 20px; background: var(--fg); color: var(--bg); font-weight: 500; font-size: .9375rem; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%); white-space: nowrap; }
.el-measure { width: 100%; }
.el-measure path { stroke: var(--signal); stroke-width: 1.5; fill: none; }
.el-measure .thick { stroke: var(--fg); stroke-width: 8; stroke-linejoin: miter; }
.el-measure rect { fill: var(--surface); }
.el-measure text { font-family: var(--mono); font-size: 12px; fill: var(--signal-700); }
html[data-theme="dark"] .el-measure text { fill: var(--signal-400); }
.el-seam { width: 100%; fill: var(--fg); }
.el-tag { display: inline-flex; align-items: center; gap: 8px; height: 24px; padding: 0 8px; background: var(--surface-2); border: 1px solid var(--line); font-size: .75rem; font-weight: 500; white-space: nowrap; }
.el-tag i { width: 6px; height: 6px; background: var(--signal); }
.el-tag--dark { background: var(--carbon-950); color: var(--concrete-50); border-color: var(--carbon-950); font-family: var(--mono); font-weight: 400; }

/* ---------- 07 imagery ---------- */
.iso .artifact__bar { gap: 20px; }
.iso__depth, .iso__sig { display: flex; align-items: center; gap: 10px; font-size: .8125rem; }
.iso__depth { margin-left: auto; }
.iso__stage { position: relative; }
.iso__stage svg { position: absolute; inset: 4%; width: 92%; height: 92%; max-width: none; }
.iso__depth input { width: 140px; color: var(--concrete-50); }
.iso__depth output { font-family: var(--mono); font-size: .75rem; color: var(--concrete-50); min-width: 2ch; }
.iso__sig input { accent-color: var(--signal); width: 16px; height: 16px; margin: 0; }
.iso__stage { aspect-ratio: 16 / 9; display: grid; place-items: center; padding: 24px; background: #DCDDDA; background-image: linear-gradient(30deg, rgba(12,13,14,.05) 1px, transparent 1px), linear-gradient(150deg, rgba(12,13,14,.05) 1px, transparent 1px); background-size: 27.7px 16px; }
#isoSvg { width: 100%; height: 100%; overflow: visible; }
#isoSvg path { stroke-linejoin: round; }
#isoSvg .ui { font-family: var(--font); }
.tones { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s3); margin-top: var(--s3); }
.tone { display: flex; flex-direction: column; gap: 2px; padding: 12px 0 0; border-top: 24px solid var(--c); font-size: .875rem; }
.tone b { font-weight: 500; }
.tone code { color: var(--muted); }

/* ---------- 08 motion ---------- */
.motion { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--s4); }
.player .seg button { opacity: .8; }
.player__t { margin-left: auto; color: var(--steel-400); }
.player__stage { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--carbon-950); }
#plSvg { width: 52%; overflow: visible; }
#plSvg path, #plSvg rect { fill: var(--concrete-50); }
#plSvg path[data-p="2"].lit { fill: var(--signal); }
#plWaste path { fill: var(--steel-500); }
.curve { display: flex; flex-direction: column; }
.curve .artifact__bar { justify-content: space-between; }
.curve__key { display: flex; align-items: center; gap: 8px; font-size: .75rem; flex-wrap: wrap; }
.curve__key i { width: 16px; height: 2px; }
.curve__key .k1 { background: var(--signal); }
.curve__key .k2 { background: var(--steel-300); margin-left: 8px; }
#curve { flex: 1; width: 100%; min-height: 280px; }
.mtokens { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: var(--s6); }
.mtokens > div { border-top: 1px solid var(--fg); padding-top: 16px; }
.mtokens code { color: var(--muted); }
.mtokens b { display: block; margin: 6px 0 4px; font-weight: 600; }
.mtokens p { color: var(--fg-2); font-size: .9375rem; }

/* ---------- 09 layout ---------- */
.layout { display: grid; grid-template-columns: 6fr 3.4fr 1.8fr; gap: var(--s4); align-items: end; }
.bp p { margin-top: 14px; display: flex; flex-direction: column; gap: 2px; font-size: .9375rem; }
.bp p b { font-weight: 600; }
.bp p .mono { color: var(--muted); }
.bp__vis { position: relative; background: var(--surface); border: 1px solid var(--line); padding: 16px; display: grid; }
.bp__vis--d { aspect-ratio: 16 / 10; }
.bp__vis--t { aspect-ratio: 3 / 4; padding: 12px; }
.bp__vis--m { aspect-ratio: 9 / 19; padding: 8px; }
.bp__cols, .bp__blocks { grid-area: 1 / 1; display: grid; grid-template-columns: repeat(var(--n, 12), minmax(0, 1fr)); gap: 6px; }
.bp__cols { background: none; }
.bp__cols::before { content: ""; grid-column: 1 / -1; background: repeating-linear-gradient(90deg, rgba(0,88,246,.08) 0 calc((100% - (var(--n) - 1) * 6px) / var(--n)), transparent 0 calc((100% - (var(--n) - 1) * 6px) / var(--n) + 6px)); }
.bp__blocks { align-content: start; grid-auto-rows: minmax(24px, auto); padding-top: 8%; }
.bp__blocks i { height: 100%; min-height: 24px; background: var(--fg); opacity: .85; }
.bp__blocks i:first-child { min-height: 56px; }
.bp__vis--m .bp__blocks i:first-child { min-height: 64px; }
.bp__blocks i:nth-child(n+2) { opacity: .18; min-height: 40px; }
.space { margin-top: var(--s8); }
.space__row { display: flex; align-items: flex-end; gap: 24px; margin: 24px 0 16px; flex-wrap: wrap; }
.space__row div { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.space__row i { display: block; background: var(--signal); opacity: .9; }
.space__row span { font-family: var(--mono); font-size: .6875rem; color: var(--muted); }

/* ---------- 10 applications: a Figma-like board ---------- */
.chapter--apps { padding-bottom: 0; }
.board { background: var(--carbon-950); color: var(--concrete-50); padding-block: clamp(56px, 7vw, 112px); background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px); background-size: 24px 24px; }
.board__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 56px 24px; align-items: start; }
.frame { min-width: 0; container-type: inline-size; }
.f-web { grid-column: span 8; } .f-avatars { grid-column: span 4; }
.f-banner { grid-column: span 12; }
.f-deck { grid-column: span 7; } .f-invoice { grid-column: span 5; }
.f-figma { grid-column: span 7; } .f-loom { grid-column: span 5; }
.f-linear { grid-column: span 5; } .f-card { grid-column: span 3; } .f-mail { grid-column: span 4; }
.frame__name { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: .75rem; font-weight: 500; color: var(--steel-300); white-space: nowrap; }
.frame__name span { font-family: var(--mono); font-size: .6875rem; font-weight: 400; color: var(--steel-500); overflow: hidden; text-overflow: ellipsis; }
.frame__body { position: relative; container-type: inline-size; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.frame__body svg { fill: currentColor; }
.pat-mini { position: absolute; inset: 0; width: 100%; height: 100%; }
.mock-note { font-size: .75rem; color: var(--steel-400); }

/* website header */
.mock-web { aspect-ratio: 16 / 9.4; background: var(--concrete-0); color: var(--carbon-950); display: flex; flex-direction: column; }
.mw__chrome { display: flex; align-items: center; gap: .6cqw; height: 4.4cqw; padding: 0 1.6cqw; background: var(--concrete-100); }
.mw__chrome i { width: 1cqw; height: 1cqw; border-radius: 50%; background: var(--concrete-200); }
.mw__chrome span { margin: 0 auto; padding: .3cqw 6cqw; background: var(--concrete-0); border-radius: .6cqw; font-size: 1.15cqw; color: var(--steel-500); }
.mw__nav { display: flex; align-items: center; gap: 3cqw; padding: 2.4cqw 4cqw; border-bottom: 1px solid var(--line); font-size: 1.4cqw; }
.mw__brand { display: flex; align-items: center; gap: 1cqw; font-weight: 600; letter-spacing: -.01em; }
.mw__brand svg { width: 2.2cqw; height: 2.2cqw; }
.mw__links { display: flex; gap: 2.6cqw; color: var(--steel-500); }
.mw__links i { font-style: normal; }
.mw__cta { margin-left: auto; padding: 1cqw 1.8cqw; background: var(--carbon-950); color: var(--concrete-0); font-weight: 500; clip-path: polygon(0 0, calc(100% - .8cqw) 0, 100% .8cqw, 100% 100%, 0 100%); }
.mw__hero { flex: 1; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 2cqw; padding: 0 4cqw; }
.mw__tag { display: inline-flex; align-items: center; gap: .8cqw; padding: .5cqw 1cqw; border: 1px solid var(--line); font-size: 1.15cqw; font-weight: 500; }
.mw__tag i { width: .8cqw; height: .8cqw; background: var(--signal); }
.mw__h { margin-top: 2cqw; font-size: 4.4cqw; line-height: 1.04; letter-spacing: -.04em; font-weight: 600; }
.mw__p { margin-top: 1.6cqw; font-size: 1.5cqw; color: var(--steel-500); }
.mw__art { width: 100%; height: auto; }

/* avatars */
.mock-av { aspect-ratio: 8 / 9.4; background: var(--carbon-900); display: grid; grid-template-columns: repeat(3, 1fr); align-content: center; gap: 6cqw 4cqw; padding: 8cqw 6cqw; }
.av { display: flex; flex-direction: column; align-items: center; gap: 4cqw; text-align: center; }
.av__c { flex: none; width: 24cqw; height: 24cqw; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; }
.av__c svg { width: 56%; height: 56%; }
.av__c--carbon { background: var(--carbon-950); color: var(--concrete-50); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.av__c--signal { background: var(--signal); color: var(--on-signal); }
.av__c--sq { border-radius: 22%; background: var(--concrete-50); color: var(--carbon-950); }
.av p { font-size: 3.6cqw; font-weight: 500; display: flex; flex-direction: column; line-height: 1.35; }
.av p span { color: var(--steel-400); font-weight: 400; }
.mock-av .mock-note { grid-column: 1 / -1; font-size: 3.4cqw; text-align: center; max-width: 30em; margin: 0 auto; }

/* LinkedIn banner */
.mock-banner { aspect-ratio: 1584 / 396; background: var(--carbon-950); display: flex; align-items: center; justify-content: flex-end; padding: 0 5cqw; }
.mb__copy { position: relative; text-align: right; }
.mb__copy p { font-size: 2.8cqw; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.mb__copy span { display: block; margin-top: .8cqw; font-size: 1.25cqw; color: var(--steel-300); }
.mb__av { position: absolute; left: 4cqw; top: 50%; transform: translateY(-50%); width: 13cqw; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--signal); color: var(--on-signal); box-shadow: 0 0 0 .5cqw var(--carbon-950), 0 0 0 calc(.5cqw + 1px) rgba(255,255,255,.18); }
.mb__av svg { width: 56%; height: 56%; }

/* deck */
.mock-deck { aspect-ratio: 16 / 9; background: var(--carbon-950); padding: 5cqw; display: flex; flex-direction: column; }
.md__top { display: flex; align-items: center; gap: 1.6cqw; font-size: 1.5cqw; color: var(--steel-400); }
.md__top svg { width: 2.4cqw; height: 2.4cqw; color: var(--concrete-50); }
.md__top span:last-child { margin-left: auto; font-family: var(--mono); }
.md__h { margin-top: auto; font-size: 5.2cqw; line-height: 1.04; letter-spacing: -.04em; font-weight: 600; max-width: 13em; }
.md__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3cqw; margin-top: 5cqw; padding-top: 2cqw; border-top: 1px solid rgba(255,255,255,.14); }
.md__stats b { display: block; font-size: 5cqw; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.md__stats div:first-child b { color: var(--signal); }
.md__stats span { display: block; margin-top: .8cqw; font-size: 1.4cqw; color: var(--steel-400); }

/* invoice */
.mock-inv { aspect-ratio: 5 / 5.25; background: var(--concrete-0); color: var(--carbon-950); padding: 7cqw; display: flex; flex-direction: column; font-size: 2.6cqw; }
.mi__head { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 5cqw; border-bottom: 2px solid var(--carbon-950); }
.mi__brand { display: flex; align-items: center; gap: 2cqw; font-weight: 600; font-size: 3.2cqw; }
.mi__brand svg { width: 5cqw; height: 5cqw; }
.mi__no { text-align: right; color: var(--steel-500); display: flex; flex-direction: column; }
.mi__no b { font-family: var(--mono); font-weight: 500; color: var(--carbon-950); font-size: 2.4cqw; }
.mi__meta { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 3cqw; padding: 4cqw 0; }
.mi__meta span { display: block; color: var(--steel-500); font-size: 2.2cqw; }
.mi__table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.mi__table th { text-align: left; font-weight: 500; color: var(--steel-500); font-size: 2.2cqw; padding: 1.6cqw 0; border-bottom: 1px solid var(--line); }
.mi__table td { padding: 2.4cqw 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.mi__table th:last-child, .mi__table td:last-child { text-align: right; }
.mi__table small { display: block; font-size: 2.2cqw; color: var(--steel-500); }
.mi__table tfoot td { border: 0; padding-top: 3cqw; font-weight: 600; font-size: 3.6cqw; letter-spacing: -.02em; }
.mi__foot { margin-top: auto; display: flex; align-items: center; gap: 1.6cqw; font-size: 2.2cqw; color: var(--steel-500); }
.mi__foot::before { content: ""; width: 1.6cqw; height: 1.6cqw; background: var(--signal); flex: none; }

/* figma cover */
.mock-fig { aspect-ratio: 2 / 1.05; background: var(--carbon-950); display: flex; align-items: center; padding: 0 5cqw; }
.mf__card { position: relative; width: 44cqw; padding: 3.6cqw; background: var(--concrete-0); color: var(--carbon-950); clip-path: polygon(0 0, calc(100% - 2cqw) 0, 100% 2cqw, 100% 100%, 0 100%); }
.mf__status { display: inline-flex; align-items: center; gap: .9cqw; padding: .4cqw 1.1cqw; background: #DDF1E4; color: #1D6B3D; font-size: 1.5cqw; font-weight: 600; }
.mf__status i { width: .9cqw; height: .9cqw; border-radius: 50%; background: #2E9E5B; }
.mf__t { margin-top: 3cqw; font-size: 4.4cqw; font-weight: 600; letter-spacing: -.035em; line-height: 1.05; }
.mf__s { margin-top: .8cqw; font-size: 1.8cqw; color: var(--steel-500); }
.mf__by { display: flex; align-items: center; gap: 1cqw; margin-top: 4cqw; padding-top: 2cqw; border-top: 1px solid var(--line); font-size: 1.5cqw; font-weight: 500; }
.mf__by svg { width: 2cqw; height: 2cqw; }

/* loom */
.mock-loom { aspect-ratio: 5 / 3.95; background: #1F2225; display: flex; flex-direction: column; }
.ml__screen { flex: 1; padding: 5cqw 5cqw 0; }
.ml__page { height: 100%; background: var(--concrete-0); padding: 5cqw; display: flex; flex-direction: column; gap: 2.4cqw; }
.ml__page i { height: 2.4cqw; background: var(--concrete-200); }
.ml__page i:nth-child(1) { width: 70%; height: 4.4cqw; background: var(--carbon-950); }
.ml__page i:nth-child(2) { width: 52%; } .ml__page i:nth-child(3) { width: 60%; }
.ml__page b { flex: 1; margin-top: 2cqw; background: #D6D7D4; }
.ml__wm { position: absolute; right: 7cqw; bottom: 15cqw; width: 9cqw; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--carbon-950); color: var(--concrete-50); box-shadow: 0 .6cqw 2cqw rgba(0,0,0,.25); }
.ml__wm svg { width: 54%; height: 54%; }
.ml__bar { display: flex; align-items: center; gap: 3cqw; height: 10cqw; padding: 0 5cqw; color: var(--steel-300); }
.ml__bar .mono { font-size: 2.4cqw; }
.ml__play { width: 0; height: 0; border-left: 3cqw solid var(--concrete-50); border-block: 1.8cqw solid transparent; }
.ml__prog { flex: 1; height: .8cqw; background: rgba(255,255,255,.15); }
.ml__prog i { display: block; width: 34%; height: 100%; background: var(--signal); }

/* linear */
.mock-lin { aspect-ratio: 5 / 4.4; background: #0F1012; display: grid; grid-template-columns: 38% 1fr; font-size: 2.9cqw; }
.ln__side { padding: 5cqw 3cqw; border-right: 1px solid rgba(255,255,255,.06); background: #131416; color: var(--steel-400); }
.ln__side p { padding: 1.4cqw 2cqw; border-radius: 1cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ln__side p.on { background: rgba(255,255,255,.06); color: var(--concrete-50); }
.ln__ws { display: flex; align-items: center; gap: 2cqw; padding: 0 2cqw 4cqw; font-weight: 600; color: var(--concrete-50); white-space: nowrap; }
.ln__icon { flex: none; width: 6cqw; aspect-ratio: 1; border-radius: 1.4cqw; display: grid; place-items: center; background: var(--signal); color: var(--on-signal); }
.ln__icon svg { width: 60%; height: 60%; }
.ln__main { padding: 5cqw 0; }
.ln__issue { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 1.2cqw 2.4cqw; padding: 2.6cqw 4cqw; border-bottom: 1px solid rgba(255,255,255,.05); }
.ln__id { font-family: var(--mono); font-size: 2.3cqw; color: var(--steel-500); }
.ln__st { width: 3cqw; height: 3cqw; border-radius: 50%; border: .5cqw solid #E8C07D; background: conic-gradient(#E8C07D 0 60%, transparent 0); background-clip: content-box; padding: .3cqw; }
.ln__st--done { border-color: #6E79D6; background: #6E79D6; }
.ln__issue p { color: var(--concrete-50); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ln__date { grid-column: 3; font-size: 2.4cqw; color: var(--steel-500); }

/* business card */
.mock-card { aspect-ratio: 3 / 4.75; background: #DADBD8 linear-gradient(135deg, transparent 49.8%, rgba(12,13,14,.06) 50%); display: grid; place-items: center; padding: 8cqw; perspective: 900px; }
.bc { --flip: 0; position: relative; width: 100%; aspect-ratio: 55 / 85; transform-style: preserve-3d; transform: rotateY(calc(var(--flip) * 180deg)); }
.bc__face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; box-shadow: 0 2cqw 5cqw -2cqw rgba(12,13,14,.45); }
.bc__front { background: var(--carbon-950); color: var(--concrete-50); align-items: center; justify-content: center; }
.bc__front svg { width: 34%; height: auto; aspect-ratio: 1; }
.bc__front::after { content: "builtforsaas.com"; position: absolute; left: 0; right: 0; bottom: 9cqw; text-align: center; font-size: 4cqw; color: var(--steel-400); letter-spacing: .01em; }
.bc__front::before { content: ""; position: absolute; right: 0; top: 0; width: 14cqw; height: 14cqw; background: var(--signal); clip-path: polygon(0 0, 100% 0, 100% 100%); }
.bc__back { transform: rotateY(180deg); background: var(--concrete-0); color: var(--carbon-950); padding: 10cqw; text-align: left; }
.bc__name { font-weight: 600; font-size: 6cqw; letter-spacing: -.02em; line-height: 1.15; }
.bc__l { margin-top: auto; font-size: 4.2cqw; color: var(--steel-500); line-height: 1.5; }
.bc__back svg { position: absolute; right: 10cqw; top: 10cqw; width: 8cqw; height: 8cqw; }
.bc__back::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3cqw; background: var(--signal); }

/* email signature */
.mock-mail { aspect-ratio: 4 / 4.75; background: #FFFFFF; color: #202124; padding: 7cqw; display: flex; flex-direction: column; font-family: Arial, Helvetica, sans-serif; font-size: 4cqw; line-height: 1.5; }
.mm__body { color: #3C4043; }
.mm__sig { margin-top: auto; display: flex; gap: 4cqw; padding-top: 5cqw; border-top: 1px solid #E3E3E3; }
.mm__mark { flex: none; width: 11cqw; height: 11cqw; display: grid; place-items: center; background: var(--carbon-950); color: var(--concrete-50); }
.mm__mark svg { width: 56%; height: 56%; }
.mm__sig b { display: block; font-size: 4cqw; }
.mm__sig span { display: block; font-size: 3.4cqw; color: #5F6368; }
.mm__links { color: #202124 !important; margin-top: 1cqw; }

/* ---------- 11 downloads ---------- */
.term__body { padding: 24px; font-family: var(--mono); font-size: .8125rem; }
.term__cmd { color: var(--concrete-0); }
.term__p { color: var(--signal); margin-right: 6px; }
.term__out { color: var(--steel-400); margin: 6px 0 16px; }
.term__ok { color: #5BC37E; margin: 16px 0 0; }
.files { border-top: 1px solid rgba(255,255,255,.07); }
.files a { display: grid; grid-template-columns: 32px minmax(0, 1.2fr) minmax(0, 1.4fr) auto; gap: 16px; align-items: center; padding: 10px 8px; border-bottom: 1px solid rgba(255,255,255,.05); text-decoration: none; transition: background-color var(--dur) var(--ease); }
@media (hover: hover) { .files a:hover { background: rgba(255,255,255,.04); } .files a:hover .f__s { color: var(--on-signal); background: var(--signal); } }
.f__ic { width: 32px; height: 32px; display: grid; place-items: center; background: var(--carbon-950); color: var(--concrete-50); font-size: .625rem; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.f__ic svg { width: 16px; height: 16px; fill: currentColor; }
.f__ic--carbon { background: var(--concrete-0); color: var(--carbon-950); }
.f__ic--concrete { background: var(--carbon-950); color: var(--concrete-50); }
.f__ic--signal { color: var(--signal); }
.f__ic--app { border-radius: 8px; }
.f__ic--txt { color: var(--steel-300); }
.f__wm { width: 22px !important; }
.f__n { color: var(--concrete-0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f__d { font-family: var(--font); font-size: .8125rem; color: var(--steel-400); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f__s { font-size: .6875rem; padding: 2px 8px; color: var(--steel-300); border: 1px solid rgba(255,255,255,.12); transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.changelog { margin-top: var(--s8); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s6); }
.changelog li { display: grid; grid-template-columns: 80px 120px minmax(0, 1fr); gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); align-items: baseline; }
.changelog li:first-child { border-top-color: var(--fg); }
.changelog li > span:nth-child(2) { font-size: .875rem; color: var(--muted); }
.changelog li .mono { font-weight: 500; }
.changelog li:first-child .mono { color: var(--signal-700); }
html[data-theme="dark"] .changelog li:first-child .mono { color: var(--signal-400); }
.changelog p { color: var(--fg-2); max-width: 44em; }

/* ---------- footer, toast, grid overlay ---------- */
.foot { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: .875rem; }
.foot__in { display: flex; gap: 16px 40px; align-items: center; flex-wrap: wrap; }
.foot__brand { display: inline-flex; gap: 10px; align-items: center; font-weight: 600; }
.foot__brand svg { width: 18px; height: 18px; fill: currentColor; }
.foot p:last-child { margin-left: auto; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; padding: 10px 16px; background: var(--carbon-950); color: var(--concrete-50); font-size: .875rem; font-weight: 500; box-shadow: 0 12px 30px -10px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.08); transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .35s var(--ease); display: flex; gap: 10px; align-items: center; }
.toast::before { content: ""; width: 8px; height: 8px; background: var(--signal); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.gridov { position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0; transition: opacity .25s var(--ease); }
.gridov.on { opacity: 1; }
.gridov .wrap { height: 100%; }
.gridov__cols { height: 100%; display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.gridov__cols i { background: rgba(0,88,246,.07); box-shadow: inset 1px 0 rgba(0,88,246,.25), inset -1px 0 rgba(0,88,246,.25); }

/* scroll reveal (only when JS runs and motion is allowed) */
html.js.can-move .rv { opacity: 0; transform: translateY(24px); }
html.js.can-move .rv.in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .inspector__body { grid-template-columns: 190px minmax(0, 1fr) 240px; }
  .lint__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lint__list li:nth-child(4n) { border-right: 1px solid rgba(255,255,255,.06); }
  .lint__list li:nth-child(2n) { border-right: 0; }
  .lint__list li:nth-last-child(-n+4) { border-bottom: 1px solid rgba(255,255,255,.06); }
  .lint__list li:nth-last-child(-n+2) { border-bottom: 0; }
  .ways { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .elements, .systems, .mtokens, .rules--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f-linear, .f-card, .f-mail { grid-column: span 4; }
}
@media (max-width: 960px) {
  :root { --bar-h: 52px; }
  .bar__ver { display: none; }
  .cover { height: auto; }
  .cover__sticky { position: relative; height: auto; min-height: 0; padding-top: calc(var(--bar-h) + 40px); padding-bottom: 48px; }
  .cover__grid { grid-template-columns: 1fr; gap: 40px; }
  .cover__stage { justify-self: stretch; width: 100%; max-width: 560px; }
  .meta { grid-template-columns: repeat(2, auto); }
  .contents { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ch-head { grid-template-columns: 1fr; gap: 16px; }
  .ch-num { padding-top: 0; }
  .ch-intro { padding-top: 0; max-width: 40em; }
  .principles { grid-template-columns: 1fr; }
  .principle, .principle + .principle { padding: 24px 0; border-left: 0; border-top: 1px solid var(--line); }
  .principle:first-child { border-top: 0; }
  .split, .colour-grid, .icons, .motion, .changelog { grid-template-columns: 1fr; }
  .diff { position: relative; top: 0; }
  .inspector__body { grid-template-columns: 1fr; }
  .layers { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.07); }
  .layers ul { display: flex; gap: 4px; margin: 4px 0 0; flex-wrap: wrap; }
  .layers li button { width: auto; }
  .layers__note, .layers .panel-h, .layers__frame { display: none; }
  .props { border-left: 0; border-top: 1px solid rgba(255,255,255,.07); }
  .props__mean { min-height: 0; }
  .canvas { padding: 20px; }
  .logo-specs { grid-template-columns: 1fr; }
  .lockups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .swatches { grid-template-columns: 1fr 1fr; }
  .sw { min-height: 220px; }
  .specimen { grid-template-columns: 1fr; }
  .scale__row { grid-template-columns: 1fr; gap: 6px; }
  .scale__row > span { text-align: left; }
  .parts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dodont { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 2fr 1.2fr 0.7fr; gap: 16px; }
  .board__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 16px; }
  .board__grid > .frame { grid-column: span 2; }
  .f-card, .f-mail, .f-avatars, .f-invoice, .f-loom, .f-linear { grid-column: span 1 !important; }
  .tones { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .sm-hide { display: none; }
  .bar__in { gap: 8px; }
  .bar__brand > span:not(.bar__ver) { display: none; }
  .bar__toc { margin-left: 0; }
  .bar__toc nav { position: fixed; left: 12px; right: 12px; width: auto; top: calc(var(--bar-h) + 6px); }
  .theme__txt { display: none; }
  .bar__end { gap: 4px; }
  .meta { gap: 8px 20px; margin-bottom: 28px; }
  .cover__cap { flex-direction: column; gap: 4px; }
  .contents { grid-template-columns: 1fr; }
  .statement { margin-bottom: var(--s7); }
  .diff .seg { margin-left: 0; }
  .diff__body[data-view="split"] .hunk { grid-template-columns: 1fr; }
  .seg--tools { margin-left: 0; overflow-x: auto; max-width: 100%; }
  .lint__list { grid-template-columns: 1fr; }
  .lint__list li { border-right: 0 !important; border-bottom: 1px solid rgba(255,255,255,.06) !important; }
  .lint__list li:last-child { border-bottom: 0 !important; }
  .lint__vis { aspect-ratio: 5 / 2; }
  .lockups { grid-template-columns: 1fr; }
  .ways { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .way { aspect-ratio: auto; min-height: 180px; }
  .spec__vis--size { grid-template-columns: 1fr; aspect-ratio: auto; }
  .swatches { grid-template-columns: 1fr; }
  .sw { min-height: 168px; }
  .ratio span { font-size: 0; padding: 0; }
  .matrix { font-size: .75rem; }
  .matrix .cell b { font-size: .8125rem; }
  .code__pre { height: 360px; font-size: .72rem; }
  .specimen > div { padding: 24px 20px; }
  .specimen__main { flex-direction: column !important; align-items: flex-start; }
  .tester__ctl { gap: 8px 16px; }
  .tester__ctl input { width: 88px; }
  .tester__text { padding: 28px 20px 36px; }
  .pat__field { height: 64vh; min-height: 380px; }
  .pat__dock { margin-top: -32px; padding: 16px; gap: 16px; }
  .pat__group, .pat__group--range { width: 100%; }
  .seg--pat { width: 100%; }
  .seg--pat button { flex: 1; padding: 0 6px; }
  .pat__actions { margin-left: 0; }
  .pat__actions .btn { flex: 1; }
  .parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .elements, .systems, .mtokens, .rules--cols { grid-template-columns: 1fr; }
  .icons__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .icons__stage { padding: 24px; max-height: 320px; }
  .iso .artifact__bar { gap: 10px 16px; }
  .iso__depth { margin-left: 0; }
  .iso__stage { aspect-ratio: 1; }
  .tones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .player__t { margin-left: 0; }
  .layout { grid-template-columns: 1fr; }
  .bp__vis--t { max-width: 60%; }
  .bp__vis--m { max-width: 36%; }
  .board__grid > .frame { grid-column: 1 / -1 !important; }
  .files a { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .f__d { display: none; }
  .term__body { padding: 16px; }
  .changelog li { grid-template-columns: 64px 1fr; }
  .changelog li p { grid-column: 1 / -1; }
  .foot p:last-child { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .16s !important; animation: none !important; scroll-behavior: auto !important; }
  .toast { transform: translate(-50%, 0) !important; }
}
