/* Coppa website. A near-monochrome system with one accent (copper), SF Pro
   through the system font stack, and light and dark from the OS.
   See DESIGN.md for the reasoning. Swap the brand colour by changing the
   --accent tokens only. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;

  /* The accent. One colour, three strengths. */
  --accent: #a4532b;          /* copper, 5.4:1 on white */
  --accent-hover: #8a4421;
  --accent-soft: rgba(164, 83, 43, .1);

  /* Surfaces and ink */
  --bg: #ffffff;
  --surface: #fafafa;
  --surface-2: #f5f5f7;
  --raised: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;           /* 5.1:1 on white */
  --ink-3: #86868b;           /* meta text only */
  --line: rgba(0, 0, 0, .08);
  --line-strong: rgba(0, 0, 0, .14);
  --control: rgba(0, 0, 0, .05);
  --control-hover: rgba(0, 0, 0, .08);
  --link: var(--accent);

  /* Primary buttons are ink, not colour */
  --btn: #1d1d1f;
  --btn-ink: #ffffff;
  --btn-hover: #3a3a3c;

  --nav-bg: rgba(255, 255, 255, .8);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 2px 8px rgba(0, 0, 0, .04);
  --shadow-2: 0 1px 1px rgba(0, 0, 0, .03), 0 12px 32px -8px rgba(0, 0, 0, .12), 0 40px 80px -32px rgba(0, 0, 0, .16);
  --shadow-menu: 0 0 0 .5px rgba(0, 0, 0, .12), 0 12px 40px rgba(0, 0, 0, .14);

  /* Schematic, as the app draws it */
  --sch-canvas: #ffffff;
  --sch-ink: #1d1d1f;
  --sch-body: #ffffff;
  --sch-grid: rgba(0, 0, 0, .11);
  --sch-value: #2f5c9e;       /* the app's value ink, a muted blue */
  --sch-dim: #8e8e93;

  --radius: 18px;
  --radius-sm: 12px;
  --wrap: min(1120px, calc(100vw - 48px));
  --nav-h: 56px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #e3956a;
    --accent-hover: #efab85;
    --accent-soft: rgba(227, 149, 106, .14);
    --bg: #0b0b0c;
    --surface: #111113;
    --surface-2: #161618;
    --raised: #1c1c1e;
    --ink: #f5f5f7;
    --ink-2: #a1a1a6;
    --ink-3: #8e8e93;
    --line: rgba(255, 255, 255, .09);
    --line-strong: rgba(255, 255, 255, .16);
    --control: rgba(255, 255, 255, .08);
    --control-hover: rgba(255, 255, 255, .12);
    --btn: #f5f5f7;
    --btn-ink: #1d1d1f;
    --btn-hover: #ffffff;
    --nav-bg: rgba(11, 11, 12, .78);
    --shadow-1: 0 0 0 1px rgba(255, 255, 255, .04);
    --shadow-2: 0 0 0 1px rgba(255, 255, 255, .06), 0 40px 80px -32px rgba(0, 0, 0, .8);
    --shadow-menu: 0 0 0 1px rgba(255, 255, 255, .1), 0 16px 48px rgba(0, 0, 0, .5);
    --sch-canvas: #141416;
    --sch-ink: #e8e8ed;
    --sch-body: #1c1c1e;
    --sch-grid: rgba(255, 255, 255, .1);
    --sch-value: #8fb4ea;
    --sch-dim: #6e6e73;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 24px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.47 var(--font); letter-spacing: -.022em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }
.icon { width: 1.15em; height: 1.15em; flex: none; }
kbd {
  font: 500 .82em/1 var(--font); display: inline-block; min-width: 1.6em; text-align: center;
  padding: .28em .45em; border-radius: 6px; color: var(--ink);
  background: var(--raised); border: 1px solid var(--line-strong); box-shadow: 0 1px 0 var(--line-strong);
}
code { font: .86em var(--mono); background: var(--surface-2); border: 1px solid var(--line); padding: .1em .35em; border-radius: 5px; letter-spacing: 0; }
pre { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; overflow: auto; font-size: 14px; line-height: 1.55; }
pre code { background: none; border: 0; padding: 0; }
.sep { color: var(--ink-3); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--bg); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.wrap, .vs-container { width: var(--wrap); margin: 0 auto; }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.1; letter-spacing: -.02em; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: var(--nav-bg); backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px);
  box-shadow: 0 1px 0 transparent; transition: box-shadow .2s ease;
}
.nav.scrolled, .docs-page .nav { box-shadow: 0 1px 0 var(--line); }
.nav-inner { width: var(--wrap); height: 100%; margin: 0 auto; display: flex; align-items: center; gap: 28px; position: relative; }
.docs-page .nav-inner, .docs-page .announce-inner { width: auto; max-width: 1440px; padding: 0 24px; }
.brand { display: inline-flex; align-items: center; gap: 9px; height: 36px; color: var(--ink); font: 600 17px/1 var(--font-display); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 22px; height: 22px; border-radius: 5px; }
.nav-links { flex: 1; display: flex; align-items: center; gap: 26px; height: 36px; }
.nav-links a { color: var(--ink-2); font-size: 14px; font-weight: 400; letter-spacing: -.01em; transition: color .15s; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 500; }
.nav-search {
  margin-left: auto; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px;
  background: none; color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s;
}
.nav-search:hover { background: var(--control); color: var(--ink); }
.nav-search .icon { width: 16px; height: 16px; }
.nav-menu { display: none; margin-left: 0; }
.nav-actions { display: flex; align-items: center; gap: 6px; }

/* The download control: one ink capsule with a chevron segment for the menu. */
.download-control {
  position: relative; display: inline-flex; align-items: center; height: 32px; border-radius: 980px;
  background: var(--btn); color: var(--btn-ink); font-size: 13px; font-weight: 500; letter-spacing: -.01em;
}
.download-primary, .download-toggle {
  display: inline-flex; align-items: center; height: 32px; border: 0; color: inherit; background: none;
  font: inherit; cursor: pointer; transition: opacity .15s;
}
.download-primary { gap: 6px; padding: 0 6px 0 14px; white-space: nowrap; border-radius: 980px 0 0 980px; }
.download-toggle { width: 30px; justify-content: center; border-radius: 0 980px 980px 0; position: relative; }
.download-toggle::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 1px; background: currentColor; opacity: .25; }
.download-primary:hover, .download-toggle:hover, .download-control.open .download-toggle { opacity: .78; text-decoration: none; }
.download-primary .icon, .download-toggle .icon { width: 14px; height: 14px; }
.download-control.open .menu { opacity: 1; transform: none; pointer-events: auto; }

.menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 280px; padding: 6px;
  background: var(--raised); border-radius: 14px; font-weight: 400; letter-spacing: -.01em;
  box-shadow: var(--shadow-menu); opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top right;
  pointer-events: none; transition: opacity .16s ease, transform .16s ease;
}
.menu a { display: flex; align-items: flex-start; gap: 12px; padding: 9px 12px; border-radius: 9px; color: var(--ink); font-size: 14px; }
.menu a:hover, .menu a:focus-visible { background: var(--control); text-decoration: none; }
.menu .icon { margin-top: 2px; color: var(--ink-2); }
.menu strong { display: block; font-weight: 500; }
.menu small { display: block; color: var(--ink-2); font-size: 12px; }

/* ---------- announcement: one quiet centred line ---------- */
.announce { font-size: 13px; line-height: 1.4; color: var(--ink-2); background: var(--surface-2); border-bottom: 1px solid var(--line); }
html.show-announce .announce { display: block !important; }
.announce[hidden] { display: none; }
.announce-inner { width: var(--wrap); margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 40px; position: relative; padding: 0 36px; }
.announce p { margin: 8px 0; text-align: center; }
.announce a { color: var(--ink); }
.announce a::after { content: " ›"; color: var(--accent); }
.announce-dismiss { position: absolute; right: 0; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--ink-3); cursor: pointer; }
.announce-dismiss:hover { background: var(--control); color: var(--ink); }
.announce-dismiss .icon { width: 14px; height: 14px; }

/* ---------- buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px;
  font: 500 15px/1 var(--font); letter-spacing: -.01em; padding: 0 20px; border-radius: 980px; border: 0; cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--btn); color: var(--btn-ink); }
.btn-primary:hover { background: var(--btn-hover); }
.btn-secondary { background: var(--control); color: var(--ink); }
.btn-secondary:hover { background: var(--control-hover); }
.btn .icon { width: 17px; height: 17px; }
.btn-large { height: 50px; padding: 0 28px; font-size: 17px; }
.link-more, .spread-more, .more { color: var(--accent); font-weight: 400; font-size: 17px; }
.link-more::after { content: " ›"; }
.spread-more { display: inline-block; margin-top: 18px; }

/* ---------- home: hero ---------- */
.hero { padding: 88px 0 0; background: var(--surface-2); }
.hero h1 { margin: 0; font-size: 40px; font-weight: 600; letter-spacing: -.025em; line-height: 1.1; }
.hero-lede { max-width: 880px; margin: 14px 0 0; font: 500 clamp(24px, 2.6vw, 34px)/1.3 var(--font-display); letter-spacing: -.022em; color: var(--ink); text-wrap: pretty; }
.hero-lede a { color: var(--accent); font-weight: 600; }
.hero-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 32px; }
.hero-meta { margin: 12px 0 0; font-size: 13px; color: var(--ink-3); }
.hero-shot { width: var(--wrap); margin: 56px auto 0; }
.hero-shot img { display: block; width: 100%; height: auto; border-radius: 12px 12px 0 0; box-shadow: 0 0 0 1px var(--line), 0 24px 60px rgba(0, 0, 0, .12); }
.hero-window {
  margin: 72px auto 0; border-radius: 14px 14px 0 0; background: var(--sch-canvas); overflow: hidden;
  box-shadow: var(--shadow-2); border: 1px solid var(--line); border-bottom: 0;
}
.hw-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 44px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.hw-lights { display: flex; gap: 8px; }
.hw-lights i { width: 12px; height: 12px; border-radius: 50%; background: var(--line-strong); }
.hw-title { font-size: 13px; font-weight: 600; letter-spacing: -.01em; }
.hw-status { justify-self: end; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); }
.hw-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hw-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.hw-canvas { position: relative; container-type: inline-size; padding: 0; }
.hw-canvas .sch { display: block; width: 100%; height: auto; }

/* schematic drawing */
.sch .grid-dot { fill: var(--sch-grid); }
.sch .wire, .sch .ink, .sch .body, .sch .lead { fill: none; stroke: var(--sch-ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sch .body { fill: var(--sch-body); }
.sch .thin { stroke-width: 1.3; }
.sch .plate { stroke-width: 2.4; stroke-linecap: butt; }
.sch .junction { fill: var(--sch-ink); }
.sch .lead { stroke: var(--sch-dim); stroke-width: 1.2; }
.sch .lead-tip { fill: var(--accent); }
.sch .t-ref { font: 600 13px var(--font); fill: var(--sch-ink); letter-spacing: -.01em; }
.sch .t-val { font: 500 12px var(--font); fill: var(--sch-value); letter-spacing: -.005em; }
.sch .cpath { fill: none; stroke: none; }
.sch .cdot { fill: var(--accent); }

/* probe tag: a Liquid Glass capsule; the lead enters its left side */
.probe-tag {
  position: absolute; left: 84.25%; top: 34%; height: 3.6cqw; display: flex; align-items: center; gap: .55cqw;
  padding: 0 1.6cqw 0 1.25cqw; border-radius: 99px; font-size: 1.55cqw; letter-spacing: -.01em; white-space: nowrap;
  transform: translateY(-50%); color: var(--ink);
  background: color-mix(in srgb, var(--sch-canvas) 78%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px var(--line-strong), 0 1px 4px rgba(0, 0, 0, .06);
}
.probe-tag i { width: .8cqw; height: .8cqw; border-radius: 50%; background: var(--accent); }
.probe-tag b { font-weight: 600; }
.probe-tag span { font-family: var(--font); font-variant-numeric: tabular-nums; color: var(--ink-2); min-width: 5.4ch; text-align: right; }

/* oscilloscope panel beside the canvas */
.hw-scope { border-left: 1px solid var(--line); background: var(--surface); padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.scope-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.scope-head strong { font-weight: 600; }
.scope-head span { color: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.scope-screen { background: var(--sch-canvas); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.scope-screen svg { display: block; width: 100%; height: auto; }
.scope-grid path { stroke: var(--line); stroke-width: 1; fill: none; }
.scope-grid .axis { stroke: var(--line-strong); }
.tr { fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tr-in { stroke: var(--sch-dim); }
.tr-out { stroke: var(--accent); }
.tr.ghost { opacity: .28; }
.beam { fill: var(--accent); }
.scope-legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); }
.scope-legend span::before { content: ""; display: inline-block; width: 10px; height: 2px; border-radius: 1px; margin-right: 6px; vertical-align: middle; background: currentColor; }
.scope-legend .lg-in::before { background: var(--sch-dim); }
.scope-legend .lg-out::before { background: var(--accent); }
.scope-legend .lg-scale { margin-left: auto; }
.scope-legend .lg-scale::before { display: none; }
.readouts { margin: 0; background: var(--raised); border: 1px solid var(--line); border-radius: 10px; }
.readouts div { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 12px; }
.readouts div + div { border-top: 1px solid var(--line); }
.readouts dt { font-size: 13px; color: var(--ink-2); }
.readouts dd { margin: 0; font: 500 17px/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* hero motion: parts settle, wires draw in, then the circuit runs */
.js .draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset var(--t, .9s) var(--ease-io) var(--d, 0s); }
.js .play .draw { stroke-dashoffset: 0; }
.js .hero-window .part { opacity: 0; transform: translateY(4px); transition: opacity .5s var(--ease) var(--d, 0s), transform .5s var(--ease) var(--d, 0s); }
.js .hero-window.play .part { opacity: 1; transform: none; }
.js .hero-window .probe-tag, .js .hero-window .lead-tip { opacity: 0; transition: opacity .5s var(--ease) 1.4s, transform .5s var(--ease) 1.4s; }
.js .hero-window .probe-tag { transform: translateY(-50%) scale(.92); transform-origin: left center; }
.js .hero-window.play .probe-tag { opacity: 1; transform: translateY(-50%); }
.js .hero-window.play .lead-tip { opacity: 1; }
.js .hero-text > :nth-child(2) { animation-delay: .06s; }
.js .hero-text > :nth-child(3) { animation-delay: .12s; }
.js .hero-text > :nth-child(4) { animation-delay: .18s; }
.js .hero-text > :nth-child(5) { animation-delay: .22s; }
.js .hero-window { opacity: 0; transform: translateY(24px); animation: rise 1.1s var(--ease) .25s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- home: feature rows ---------- */
.row { padding: 128px 0 0; }
.row-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: center; }
.row.flip .row-text { order: 2; }
.row-text h2 { font-size: clamp(32px, 3.6vw, 48px); font-weight: 600; letter-spacing: -.025em; line-height: 1.08; margin: 0; }
.row-text p { font-size: 19px; line-height: 1.5; color: var(--ink-2); margin: 20px 0 0; letter-spacing: -.016em; }
.row-text .link-more { display: inline-block; margin-top: 18px; }

/* Figures sit straight on the page: no card, no window. A dot grid fades out
   from the middle, and the drawing is scrubbed by scroll (--q per element,
   set by home.js; 1 when Reduce Motion is on or scripts are off). */
.figure { position: relative; margin: 0; aspect-ratio: 14 / 10; isolation: isolate; }

.figure-diagram { display: grid; place-items: center; }
.figure-diagram svg { width: 100%; height: 100%; display: block; overflow: visible; }
.fade-x { -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }

.s-draw { stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--q, 1)); }
.s-fade { opacity: var(--q, 1); }
.s-rise { opacity: var(--q, 1); transform: translateY(calc((1 - var(--q, 1)) * 10px)); transform-box: fill-box; }
.s-pop { opacity: var(--q, 1); transform: scale(calc(.94 + var(--q, 1) * .06)); transform-box: fill-box; transform-origin: center; }

/* ---------- home: features, text left and the drawing beside it ---------- */
.feature { padding: clamp(96px, 11vw, 160px) 0; }
.feature.alt { background: var(--surface-2); --bg: var(--surface-2); }
.feature-inner { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.feature-text h2 { margin: 0; font-size: clamp(30px, 3vw, 40px); font-weight: 600; letter-spacing: -.025em; line-height: 1.12; }
.feature-text p { margin: 18px 0 0; font-size: 17px; line-height: 1.55; color: var(--ink-2); letter-spacing: -.012em; }
.feature-text .link-more { display: inline-block; margin-top: 16px; font-size: 17px; }
.art { position: relative; width: 100%; }
.art > svg { display: block; width: 100%; height: 100%; overflow: visible; }
.art-sch { aspect-ratio: 18 / 10; }
.art-sch .wire, .art-sch .ink, .art-sch .body, .art-sch .lead { stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.art-sch .plate { stroke-width: 2.2; }
.art-sch .t-ref { font-size: 9px; font-weight: 600; } .art-sch .t-val { font-size: 8.5px; }
.art-wide > svg { height: auto; }
.art-plot { height: clamp(240px, 24vw, 340px); }
.art-plot > svg { overflow: hidden; }
.a-ghost { fill: none; stroke: currentColor; stroke-width: 1; opacity: .14; }
.a-live, .a-bode { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.a-halo { display: none; }
.a-in { fill: none; stroke: var(--ink-3); stroke-width: 1.5; }
.a-rule { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.wash-a { stop-color: var(--accent); stop-opacity: .14; } .wash-b { stop-color: var(--accent); stop-opacity: 0; }
.a-axis text { font: 500 12px var(--font); fill: var(--ink-3); }
.a-mark circle { fill: var(--bg); stroke: var(--accent); stroke-width: 2; }
.a-mark-line { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 4; }
.a-mark text { font: 600 13px var(--font); fill: var(--ink); font-variant-numeric: tabular-nums; }
.stats { display: flex; flex-wrap: wrap; gap: 16px 48px; margin: 28px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); }
.stat dt { font-size: 13px; color: var(--ink-2); }
.stat dd { margin: 4px 0 0; font: 600 22px/1.1 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.js .cursor-read { opacity: 1; }
@media (max-width: 900px) { .feature-inner { grid-template-columns: 1fr; } }

.fig-chip {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 6px; align-items: center;
  height: 30px; padding: 0 14px; border-radius: 99px; font-size: 13px; color: var(--ink-2); white-space: nowrap;
  background: color-mix(in srgb, var(--raised) 75%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 0 .5px var(--line-strong), 0 2px 10px rgba(0, 0, 0, .08); transition: color .3s, box-shadow .3s;
}
.fig-chip strong { font-weight: 600; color: var(--ink); }
.fig-chip.pressed { box-shadow: 0 0 0 1.5px var(--accent), 0 2px 10px rgba(0, 0, 0, .08); }
.fig-replay {
  position: absolute; right: 14px; top: 14px; height: 26px; padding: 0 11px; border: 0; border-radius: 99px; cursor: pointer;
  font: 500 12px var(--font); color: var(--ink-2); background: var(--control); transition: background .15s, color .15s;
}
.fig-replay:hover { background: var(--control-hover); color: var(--ink); }

/* plots (Bode, logic, share) */
.plot text { font: 500 11px var(--font); fill: var(--ink-3); letter-spacing: 0; }
.plot-grid path, .lane-rule { stroke: var(--line); stroke-width: 1; fill: none; }
.curve-mag, .curve-phase { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.curve-mag { stroke: var(--accent); }
.curve-phase { stroke: var(--sch-dim); }
.plot-key path { stroke-width: 2; }
.plot-key text { fill: var(--ink-2); }
.marker-line { stroke: var(--sch-dim); stroke-width: 1; stroke-dasharray: 3 4; fill: none; }
.marker-dot { fill: var(--sch-canvas); stroke: var(--accent); stroke-width: 2; }
.marker-tag rect { fill: var(--raised); stroke: var(--line-strong); stroke-width: .75; }
.marker-tag text { fill: var(--ink); font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums; }
.js [data-fig] .marker { opacity: 0; transition: opacity .6s var(--ease) var(--d, 0s); }
.js [data-fig].play .marker { opacity: 1; }
.curve-phase { stroke-dasharray: 4 4; stroke-width: 1.6; }
.js [data-fig] .fade { opacity: 0; transition: opacity 1.2s var(--ease) .9s; }
.js [data-fig].play .fade { opacity: 1; }
.js [data-fig="logic"].play .sweep-cursor { opacity: 0; transition: opacity .3s ease 2.6s; }

.logic .lane-labels text { font: 600 11px var(--mono); fill: var(--ink-2); letter-spacing: .02em; }
.lane { fill: none; stroke: var(--sch-ink); stroke-width: 1.6; stroke-linejoin: miter; }
.lane-clk { stroke: var(--sch-dim); }
.bus { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.2; }
.bus-text text { font: 600 10px var(--mono); fill: var(--accent); text-anchor: middle; }
.sweep-cover { fill: var(--bg); }
.sweep-cursor { stroke: var(--accent); stroke-width: 1.5; }
.sweep { transform: translateX(460px); }
.js [data-fig="logic"] .sweep { transform: none; transition: transform 2.4s linear .2s; }
.js [data-fig="logic"].play .sweep { transform: translateX(460px); }
.cursor-line { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 3 3; }
.cursor-read rect { fill: var(--raised); stroke: var(--line-strong); stroke-width: .5; }
.cursor-read text { fill: var(--ink); font: 600 10.5px var(--font); font-variant-numeric: tabular-nums; }
.js .cursor-read { opacity: 0; transition: opacity .6s var(--ease) 2.7s; }
.js .play .cursor-read { opacity: 1; }

.share .link { fill: none; stroke: var(--line-strong); stroke-width: 1.4; }
.share .link.out { stroke: var(--accent); opacity: .7; }
.share .pill rect { fill: var(--raised); stroke: var(--line-strong); stroke-width: .75; }
.share .pill text { font: 500 12.5px var(--font); fill: var(--ink); text-anchor: middle; letter-spacing: -.01em; }
.share .doc-body { fill: var(--raised); stroke: var(--sch-ink); stroke-width: 1.5; stroke-linejoin: round; }
.share .doc-fold, .share .doc-sch { fill: none; stroke: var(--sch-ink); stroke-width: 1.3; stroke-linejoin: round; }
.share .doc-r { fill: var(--sch-body); stroke: var(--sch-ink); stroke-width: 1.3; }
.share .doc-name { font: 600 12px var(--font); fill: var(--ink); }
.js [data-fig="share"] .pill { opacity: 0; transition: opacity .5s var(--ease) var(--d, 0s); }
.js [data-fig="share"].play .pill { opacity: 1; }

/* ---------- bands ---------- */
.band { padding: 128px 0 0; }
.band-soft { margin-top: 128px; padding: 112px 0; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-soft + .band { padding-top: 112px; }
.band-title { font-size: clamp(32px, 3.6vw, 48px); font-weight: 600; letter-spacing: -.025em; line-height: 1.08; margin: 0; }
.band-lede { font-size: 19px; line-height: 1.5; color: var(--ink-2); margin: 18px 0 0; max-width: 40em; letter-spacing: -.016em; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 48px; margin-top: 48px; }
.grid-3 > div { padding: 24px 0 36px; border-top: 1px solid var(--line-strong); }
.grid-3 h3 { font-size: 19px; font-weight: 600; letter-spacing: -.018em; margin: 0 0 8px; line-height: 1.3; }
.grid-3 p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink-2); letter-spacing: -.01em; }
.price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 48px; max-width: 820px; }
.price-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; align-items: flex-start; background: var(--raised); }
.price-card h3 { font-size: 17px; font-weight: 600; margin: 0; letter-spacing: -.015em; color: var(--ink-2); }
.price-card .price-amount { font: 600 32px/1.15 var(--font-display); letter-spacing: -.025em; margin: 8px 0 12px; color: var(--ink); }
.price-card p { margin: 0 0 24px; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.price-card .btn { margin-top: auto; }
.cta-band { padding: 144px 0 136px; text-align: center; }
.cta-band img { margin: 0 auto 24px; width: 96px; height: 96px; }
.cta-band .band-lede { margin-left: auto; margin-right: auto; }
.cta-actions { margin-top: 32px; display: flex; gap: 28px; align-items: center; justify-content: center; flex-wrap: wrap; }

/* ---------- download page ---------- */
.dl-hero { padding: 96px 0 104px; text-align: center; }
.dl-hero img { width: 128px; height: 128px; margin: 0 auto 24px; }
.dl-hero h1 { font-size: clamp(40px, 5.6vw, 64px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; margin: 0; }
.dl-hero .dl-meta { margin: 14px 0 0; font-size: 17px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dl-hero .btn-large { margin-top: 36px; height: 56px; padding: 0 36px; font-size: 18px; }
.dl-hero .dl-fine { margin: 18px auto 0; font-size: 13px; color: var(--ink-3); max-width: 36em; }
.dl-hero .dl-fine a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.dl-hero .dl-links { margin-top: 22px; display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; }
.dl-section { border-top: 1px solid var(--line); padding: 72px 0; }
.dl-section h2 { font-size: 28px; font-weight: 600; letter-spacing: -.022em; margin: 0 0 36px; }
.install-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.install-steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 28px 30px; }
.install-steps li::before {
  content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--line-strong); font: 600 13px/1 var(--font); color: var(--ink); margin-bottom: 20px; background: var(--raised);
}
.install-steps h3 { font-size: 17px; font-weight: 600; letter-spacing: -.015em; margin: 0 0 6px; line-height: 1.3; }
.install-steps p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); letter-spacing: -.01em; }
.spec { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised); max-width: 820px; }
.spec div { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 16px 22px; }
.spec div + div { border-top: 1px solid var(--line); }
.spec dt { font-size: 15px; color: var(--ink-2); }
.spec dd { margin: 0; font-size: 15px; line-height: 1.5; }
.spec code { font-size: 12px; word-break: break-all; background: none; border: 0; padding: 0; color: var(--ink-2); }
.dl-section .link-more { display: inline-block; margin-top: 24px; font-size: 16px; }

/* ---------- screenshots (docs and features) ---------- */
.shot { margin: 0; }
.shot-frame { position: relative; border-radius: 12px; overflow: hidden; background: var(--raised); border: 1px solid var(--line); box-shadow: var(--shadow-1); max-width: 100%; }
.shot img { width: 100%; }
.shot figcaption { font-size: 14px; color: var(--ink-2); margin-top: 12px; text-align: center; letter-spacing: -.01em; }
.prose .shot { margin: 28px 0 32px; }
.prose .shot-plain img { max-width: min(100%, calc(var(--w) / 2)); --maxh: 720px; }
.placeholder { display: flex; flex-direction: column; background: var(--surface); width: 100%; min-height: 180px; }
.ph-chrome { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-bottom: 1px solid var(--line); background: var(--surface-2); flex: none; }
.ph-chrome span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.ph-chrome em { font-style: normal; font-size: 12px; color: var(--ink-3); margin: 0 auto; transform: translateX(-24px); }
.ph-body { flex: 1; display: grid; place-items: center; background-image: radial-gradient(circle, var(--sch-grid) 1px, transparent 1.2px); background-size: 20px 20px; }
.ph-label { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 16px 22px; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; max-width: 80%; }
.ph-label .icon { width: 24px; height: 24px; color: var(--ink-3); }
.ph-label strong { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.ph-label small { font-size: 12px; color: var(--ink-3); }
.shot-plain .shot-frame { width: fit-content; margin: 0 auto; background: #fff; }
.shot-plain img { width: auto; max-width: 100%; max-height: var(--maxh, 760px); margin: 0 auto; }
.shot-hero .shot-frame { width: 100%; }
.shot-hero img { width: 100%; max-height: none; }

/* ---------- page intros (Features, Resources, 404) ---------- */
.page-intro { padding: 96px 0 24px; }
.page-intro h1 { font-size: clamp(40px, 5.6vw, 64px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; margin: 0; }
.page-intro .sentence { margin: 20px 0 0; max-width: 30em; text-wrap: pretty; }
.page-intro-tall { padding-bottom: 24vh; }
.intro-actions { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }

/* feature spreads (Features page) */
.spread { padding: 112px 0 0; }
.spread-inner { width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; }
.spread-text h2 { font-size: clamp(28px, 3vw, 40px); font-weight: 600; letter-spacing: -.024em; line-height: 1.1; margin: 0; }
.spread-text p { font-size: 18px; line-height: 1.5; color: var(--ink-2); margin: 16px 0 0; letter-spacing: -.014em; }
.spread-shot { min-width: 0; }
.spread-shot .shot-frame { width: 100%; max-width: none; border-radius: var(--radius); aspect-ratio: 16 / 10; background: var(--surface-2); box-shadow: none; }
.spread-shot .shot-frame img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; }
.spread-shot .shot-crop .shot-frame img { object-fit: cover; object-position: top center; }
.spread-shot .placeholder { height: 100%; aspect-ratio: auto !important; }
.spread-shot .shot-plain .shot-frame { background: #fff; }
.spread-shot figcaption { display: none; }
.spread-shot.pair { display: grid; gap: 16px; }
.spread-shot.pair .shot-frame { aspect-ratio: auto; }
.spread-shot.pair .shot-frame img { height: auto; object-fit: contain; }
.spread-shot.pair figcaption { display: block; text-align: left; margin-top: 6px; font-size: 13px; }
.spread > .vs-container { margin-top: 48px; }
.spread > .vs-container:first-child { margin-top: 0; }
.spread > .vs-container .feature-list { margin-top: 0; }
.spread > .vs-container:first-child + .vs-container { margin-top: 36px; }

/* plain bands (Features, Resources) */
.plain-band { padding: 112px 0 0; }
.plain-title { font-size: clamp(28px, 3vw, 40px); font-weight: 600; letter-spacing: -.024em; line-height: 1.1; margin: 0; }
.plain-lede { font-size: 18px; line-height: 1.5; color: var(--ink-2); margin: 16px 0 0; max-width: 42em; letter-spacing: -.014em; }
.plain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 48px; margin-top: 40px; }
.plain-grid > div { padding: 22px 0 32px; border-top: 1px solid var(--line-strong); }
.plain-grid.two { grid-template-columns: repeat(2, 1fr); max-width: 760px; }
.plain-grid h3 { font-size: 18px; font-weight: 600; letter-spacing: -.016em; margin: 0 0 6px; line-height: 1.3; }
.plain-grid p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.plain-grid .btn { margin-top: 20px; }
.price-amount { font: 600 28px/1.2 var(--font-display); letter-spacing: -.02em; color: var(--ink); margin: 0 0 10px; }
.plain-band .feature-list { margin-top: 32px; }
.plain-band > .vs-container > .spread-more { margin-top: 28px; }
main > section:last-child:not(.cta-band):not(.dl-section):not(.hero) { padding-bottom: 128px; }
.feature-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; list-style: none; padding: 0; margin: 28px 0 0; }
.feature-list li { padding: 14px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.5; color: var(--ink-2); letter-spacing: -.01em; }
.feature-list li strong { display: block; color: var(--ink); font-weight: 600; font-size: 16px; margin-bottom: 2px; }
.feature-list a { color: inherit; display: block; }
.feature-list a:hover { text-decoration: none; }
.feature-list a:hover strong { color: var(--accent); }
.example-area { font-size: 18px; font-weight: 600; letter-spacing: -.016em; margin: 44px 0 0; }
.example-area span { font-weight: 400; color: var(--ink-3); margin-left: 6px; }
.example-area + .feature-list { margin-top: 12px; }
.cheat { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 40px; }
.cheat h3 { font-size: 17px; font-weight: 600; margin: 0 0 8px; letter-spacing: -.015em; }
.cheat table { font-size: 14px; }
.cheat td:last-child { text-align: right; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--ink-2); letter-spacing: -.005em; }
.footer-inner { width: var(--wrap); margin: 0 auto; padding: 48px 0 36px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.docs-page .footer-inner, .docs-page .footer-base { width: auto; max-width: 1440px; padding-left: 24px; padding-right: 24px; }
.footer-brand .brand { font-size: 15px; }
.footer-brand .brand img { width: 20px; height: 20px; }
.footer-brand p { margin: 8px 0 0; }
.footer h2 { font: 600 12px/1 var(--font); color: var(--ink); margin: 6px 0 14px; letter-spacing: 0; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer a { color: var(--ink-2); }
.footer a:hover { color: var(--ink); text-decoration: none; }
.footer-base { width: var(--wrap); margin: 0 auto; padding: 18px 0 28px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--ink-3); font-size: 12px; }
.footer-base p { margin: 0; }
.footer-base a { margin-left: 18px; color: var(--ink-3); }

/* ---------- docs ---------- */
.docs { max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: 264px minmax(0, 1fr) 220px; gap: 56px; padding: 0 24px; }
.docs-sidebar { position: sticky; top: var(--nav-h); align-self: start; height: calc(100vh - var(--nav-h)); overflow-y: auto; padding: 28px 12px 40px 0; border-right: 1px solid var(--line); scrollbar-width: thin; }
.docs-nav { font-size: 14px; letter-spacing: -.01em; }
.docs-nav-title { display: block; font-weight: 600; color: var(--ink); padding: 6px 10px; margin-bottom: 12px; border-radius: 7px; }
.docs-nav-title:hover { background: var(--control); text-decoration: none; }
.docs-nav-title.active { color: var(--accent); background: var(--accent-soft); }
.docs-nav details { margin-bottom: 4px; }
.docs-nav summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--ink-3);
  padding: 8px 10px 6px; border-radius: 7px; user-select: none;
}
.docs-nav summary::-webkit-details-marker { display: none; }
.docs-nav summary:hover { color: var(--ink); }
.docs-nav summary .icon { width: 12px; height: 12px; transition: transform .2s ease; }
.docs-nav details[open] summary .icon { transform: rotate(90deg); }
.docs-nav ul { list-style: none; margin: 0 0 10px; padding: 0; }
.docs-nav li + li { margin-top: 2px; }
.docs-nav li a { display: block; padding: 5px 10px; color: var(--ink-2); border-radius: 7px; line-height: 1.35; transition: color .12s, background-color .12s; }
.docs-nav li a:hover { color: var(--ink); background: color-mix(in srgb, var(--control) 60%, transparent); text-decoration: none; }
/* the page you're on: copper tint and copper text, so it never reads as a hover */
.docs-nav li a[aria-current="page"], .docs-nav li a[aria-current="page"]:hover { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.docs-nav .flat { margin-top: 0; }

.docs-content { padding: 44px 0 96px; min-width: 0; max-width: 760px; }
.docs-content > h1 { font-size: 40px; font-weight: 600; letter-spacing: -.028em; margin: 10px 0 12px; line-height: 1.1; }
.lede { font-size: 20px; color: var(--ink-2); margin: 0 0 36px; line-height: 1.45; letter-spacing: -.018em; }
.breadcrumb { font-size: 13px; color: var(--ink-3); display: flex; gap: 8px; }
.breadcrumb a { color: var(--ink-2); }
.prose { font-size: 17px; line-height: 1.6; letter-spacing: -.016em; }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose a.anchor { text-decoration: none; }
.prose h2 { font-size: 26px; font-weight: 600; letter-spacing: -.022em; margin: 56px 0 14px; padding-top: 4px; }
.prose h3 { font-size: 19px; font-weight: 600; margin: 34px 0 8px; letter-spacing: -.016em; }
.prose h4 { font-size: 17px; margin: 24px 0 6px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 18px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--ink-3); }
.prose ol.steps { list-style: none; counter-reset: step; padding-left: 0; }
.prose ol.steps > li { counter-increment: step; position: relative; padding-left: 40px; margin: 14px 0; }
.prose ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font: 600 13px/1 var(--font); color: var(--ink); background: var(--raised); border: 1px solid var(--line-strong);
}
.anchor { margin-left: 8px; color: var(--ink-3); opacity: 0; font-weight: 400; transition: opacity .15s; }
h2:hover .anchor, h3:hover .anchor { opacity: 1; text-decoration: none; }
.table-wrap { overflow-x: auto; margin: 8px 0 24px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { border-collapse: collapse; width: 100%; font-size: 15px; letter-spacing: -.01em; }
th { text-align: left; font-weight: 600; font-size: 13px; color: var(--ink-2); background: var(--surface); }
th, td { padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td kbd { white-space: nowrap; }
.callout { display: flex; gap: 14px; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); margin: 20px 0 24px; font-size: 15.5px; line-height: 1.55; }
.callout strong:first-child { font-weight: 600; margin-right: 2px; }
.callout-icon .icon { width: 19px; height: 19px; color: var(--ink-2); margin-top: 1px; }
.callout-tip .callout-icon .icon { color: var(--accent); }
.callout-important { background: color-mix(in srgb, #ff9500 6%, var(--surface)); }
.callout-important .callout-icon .icon { color: #c93400; }
.stub-note { margin-top: -8px; }
.related { margin-top: 56px; }
.related h2 { font-size: 20px; margin-bottom: 14px; letter-spacing: -.018em; }
.related-grid { display: block; border-top: 1px solid var(--line); }
.related-card { display: flex; align-items: baseline; gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--line); color: var(--ink); transition: color .15s; }
.related-card:hover { text-decoration: none; }
.related-card:hover strong { color: var(--accent); }
.related-card strong { font-weight: 600; font-size: 15px; white-space: nowrap; flex: none; }
.related-card span { font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.pager a { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); color: var(--ink); font-weight: 500; transition: border-color .15s, background .15s; }
.pager a:hover { background: var(--surface); border-color: var(--line-strong); text-decoration: none; }
.pager small { color: var(--ink-3); font-size: 12px; font-weight: 400; }
.pager-next { text-align: right; }
.updated { font-size: 13px; color: var(--ink-3); margin-top: 28px; }

.docs-toc { position: sticky; top: var(--nav-h); align-self: start; padding: 48px 0 40px; max-height: calc(100vh - var(--nav-h)); overflow-y: auto; font-size: 13px; letter-spacing: -.005em; }
.docs-toc h2 { font: 600 12px/1 var(--font); color: var(--ink); margin: 0 0 12px; letter-spacing: 0; }
.docs-toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.docs-toc li a { display: block; padding: 4px 0 4px 14px; margin-left: -1px; color: var(--ink-2); border-left: 1px solid transparent; line-height: 1.4; }
.docs-toc li.toc-3 a { padding-left: 26px; }
.docs-toc li a:hover { color: var(--ink); text-decoration: none; }
.docs-toc li a.active { color: var(--ink); font-weight: 500; border-left-color: var(--accent); }

/* docs home */
.docs-home .lede { margin-bottom: 36px; }
.hero-card { display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; align-items: center; padding: 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.hero-card:hover { text-decoration: none; border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.hero-card > div > small { font-size: 13px; font-weight: 600; color: var(--accent); }
.hero-card h2 { font-size: 28px; font-weight: 600; letter-spacing: -.024em; margin: 8px 0 10px; }
.hero-card p { margin: 0 0 14px; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.hero-card .more { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; }
.hero-card .more .icon { width: 14px; height: 14px; transition: transform .2s ease; }
.hero-card:hover .more .icon { transform: translateX(3px); }
.hero-card .shot-frame { box-shadow: var(--shadow-1); }
.block-title { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin: 56px 0 16px; }
.disclosure-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.dl-row { border-bottom: 1px solid var(--line); }
.dl-row h3 { margin: 0; font: inherit; }
.dl-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 4px;
  border: 0; background: none; cursor: pointer; text-align: left; font: 400 17px/1.45 var(--font); letter-spacing: -.016em; color: var(--ink-2);
  border-radius: 8px; transition: background .15s;
}
.dl-toggle:hover { background: var(--surface); }
.dl-toggle .hl { color: var(--ink); font-weight: 600; }
.dl-toggle .icon { width: 15px; height: 15px; color: var(--ink-3); flex: none; transition: transform .25s ease, color .15s; }
.dl-toggle:hover .icon { color: var(--ink); }
.dl-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.dl-panel { display: grid; grid-template-rows: 1fr; }
.js .dl-panel { grid-template-rows: 0fr; transition: grid-template-rows .28s var(--ease); }
.js .dl-row.open .dl-panel { grid-template-rows: 1fr; }
.dl-inner { overflow: hidden; min-height: 0; padding-left: 4px; }
.dl-inner p { margin: 0 0 8px; padding-right: 40px; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); max-width: 40em; }
.dl-inner a { display: inline-block; font-size: 15px; margin-bottom: 18px; }
.latest-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.latest-list li { border-bottom: 1px solid var(--line); }
.latest-list a { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 14px 4px; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.latest-list a:hover { text-decoration: none; color: var(--ink); }
.latest-list a:hover strong { color: var(--accent); }
.latest-list time { color: var(--ink-3); font-size: 14px; padding-top: 1px; font-variant-numeric: tabular-nums; }
.latest-list strong { color: var(--ink); font-weight: 600; }

/* release notes */
.release-notes .prose h2 { font-size: 30px; margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line); }
.release-notes .prose h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.release-notes .prose h2 + p em { color: var(--ink-3); font-style: normal; font-size: 14px; font-weight: 500; }

/* ---------- search ---------- */
.search[hidden] { display: none; }
.search { position: fixed; inset: 0; z-index: 100; display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; }
.search-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .2); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .16s ease; }
.search-panel { position: relative; width: min(640px, 100%); background: var(--raised); border-radius: 16px; box-shadow: var(--shadow-menu); overflow: hidden; animation: pop .18s ease; }
.search-field { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.search-field .icon { color: var(--ink-3); }
.search-field input { flex: 1; border: 0; outline: 0; background: none; color: var(--ink); font: 18px var(--font); letter-spacing: -.02em; padding: 18px 0; }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-results { list-style: none; margin: 0; padding: 6px; max-height: 56vh; overflow-y: auto; }
.search-results:empty { display: none; }
.search-results a { display: grid; gap: 2px; padding: 10px 14px; border-radius: 10px; color: var(--ink); }
.search-results a:hover, .search-results a[aria-selected="true"] { background: var(--control); text-decoration: none; }
.search-results small { color: var(--ink-3); font-size: 12px; }
.search-results strong { font-weight: 500; font-size: 15px; }
.search-results span { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-results mark { background: none; color: var(--accent); font-weight: 600; }
.search-empty { margin: 0; padding: 22px; color: var(--ink-3); font-size: 14px; text-align: center; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.985); } }

/* ---------- scroll reveals ---------- */
.js .reveal-off { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal-off.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal-off, .js .hero-text > *, .js .hero-window, .js .hero-shot,
  .js .hero-window .part, .js .hero-window .probe-tag, .js .hero-window .lead-tip,
  .js [data-fig] .marker, .js [data-fig="share"] .pill, .js .cursor-read { opacity: 1; transform: none; animation: none; }
  .js .hero-window .probe-tag { transform: translateY(-50%); }
  .js .draw { stroke-dashoffset: 0; }
  .js [data-fig] .fade { opacity: 1; }
  .js [data-fig="logic"] .sweep { transform: translateX(460px); }
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .docs { grid-template-columns: 240px minmax(0, 1fr); gap: 48px; }
  .docs-toc { display: none; }
}
@media (max-width: 960px) {
  .hw-body { grid-template-columns: 1fr; }
  .hw-scope { border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; gap: 12px 16px; }
  .scope-head { grid-column: 1 / -1; }
  .scope-screen { grid-row: 2 / span 2; }
  .row-inner, .row.flip .row-inner { grid-template-columns: 1fr; gap: 40px; }
  .row.flip .row-text { order: 0; }
  .row { padding-top: 96px; }
  .spread-inner { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-menu { display: grid; }
  .for-mac { display: none; }
  .download-primary { padding-right: 12px; }
  .nav.mobile-open .nav-links { display: flex; flex-direction: column; align-items: stretch; gap: 0; height: auto; position: absolute; top: var(--nav-h); left: -24px; right: -24px; padding: 8px 24px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.mobile-open .nav-links a { padding: 12px 0; font-size: 17px; color: var(--ink); border-bottom: 1px solid var(--line); }
  .nav.mobile-open .nav-links .nav-search { margin: 8px 0 0; }
  .grid-3, .plain-grid { grid-template-columns: 1fr 1fr; }
  .install-steps { grid-template-columns: 1fr; }
  .feature-list, .cheat { grid-template-columns: 1fr; }
  .docs { grid-template-columns: 1fr; gap: 0; padding: 0 20px; }
  .docs-sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 16px 0; }
  .docs-sidebar details:not([open]) { margin-bottom: 0; }
  .hero-card { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .latest-list a { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 640px) {
  :root { --wrap: calc(100vw - 40px); }
  body { font-size: 16px; }
  .hero { padding-top: 56px; }
  .hero-icon { width: 52px; height: 52px; }
  .hero h1 { font-size: 32px; }
  .hero-side { text-align: left; }
  .hero-actions { justify-content: flex-start; }
  .hero-shot { width: calc(100% - 20px); margin-top: 32px; }
  .hero-window { margin-top: 48px; border-radius: 12px 12px 0 0; }
  .hw-bar { grid-template-columns: auto 1fr; gap: 12px; height: 38px; }
  .hw-title { justify-self: start; }
  .hw-status { display: none; }
  .hw-scope { grid-template-columns: 1fr; }
  .scope-screen { grid-row: auto; }
  .readouts { display: none; }
  .announce { font-size: 12px; }
  .row { padding-top: 80px; }
  .row-text p, .band-lede { font-size: 17px; }
  .figure { aspect-ratio: 5 / 4; }
  .grid-3, .plain-grid, .plain-grid.two, .price-grid { grid-template-columns: 1fr; }
  .band-soft { margin-top: 96px; padding: 80px 0; }
  .band { padding-top: 96px; }
  .band-soft + .band { padding-top: 80px; }
  .cta-band { padding: 104px 0; }
  .cta-actions { flex-direction: column; gap: 18px; }
  .dl-hero { padding: 64px 0 72px; }
  .dl-hero img { width: 104px; height: 104px; }
  .dl-hero .btn-large { width: 100%; max-width: 340px; }
  .dl-section { padding: 56px 0; }
  .spec div { grid-template-columns: 1fr; gap: 2px; padding: 14px 18px; }
  .page-intro { padding-top: 64px; }
  .spread, .plain-band { padding-top: 80px; }
  .docs-content > h1 { font-size: 32px; }
  .pager { grid-template-columns: 1fr; }
  .footer-base a { margin: 0 18px 0 0; }
  .related-card { display: grid; gap: 2px; }
  .related-card strong { white-space: normal; }
}

/* Privacy and licence terms: one calm reading column. */
.legal { padding: 88px 0 96px; }
.legal article { max-width: 680px; margin: 0 auto; }
.legal h1 { font-size: clamp(36px, 5vw, 52px); font-weight: 600; letter-spacing: -.03em; line-height: 1.08; margin: 0; }
.legal-updated { color: var(--ink-2); margin: 12px 0 40px; font-size: 15px; }
.legal .prose h2 { margin-top: 44px; }
.legal .prose ul { padding-left: 1.2em; }

/* Licence page: "Send my key" */
.licence-resend { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 20px 0 8px; }
.licence-resend label { flex-basis: 100%; font-weight: 600; font-size: 15px; }
.licence-resend input { flex: 1 1 260px; font: inherit; font-size: 16px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: transparent; color: inherit; }
.licence-resend input:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.licence-resend button { font: inherit; font-size: 15px; font-weight: 600; padding: 9px 18px; border: 0; border-radius: 980px; background: var(--accent); color: #fff; cursor: pointer; }
.licence-resend button:hover { background: var(--accent-hover); }
