/* Ref — site styles
   Paper, ink and one red. The red is the marker's (#FF3B30) and is used only
   where the app would use it: badges, frames, arrows. Everything else follows
   the system appearance. */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --bg-3: #ececef;
  --card: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #606065;
  --ink-3: #6a6a6f; /* tertiary text; ≥4.5:1 on every surface incl. --bg-3 and --red-tint */
  --hair: rgba(0, 0, 0, 0.08);
  --hair-2: rgba(0, 0, 0, 0.14);
  --red: #ff3b30;
  --red-text: #cc2b22; /* the marker red, darkened to read as text on paper (5.3:1) */
  --red-tint: rgba(255, 59, 48, 0.08);
  --orange: #ff9500;
  --blue: #007aff;
  --blue-fill: #0071e3; /* filled blue controls with white text (4.7:1); --blue stays for rings */
  --green: #34c759;
  --primary: #1d1d1f;
  --primary-ink: #ffffff;
  --primary-hover: #000000;
  --legend-bg: #1c1c1e;
  --legend-ink: #f5f5f7;
  --legend-ink-2: #a1a1a6;
  --header-bg: rgba(255, 255, 255, 0.72);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 16px 40px -12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.06), 0 40px 80px -24px rgba(0, 0, 0, 0.22);
  --kbd-bg: #ffffff;
  --kbd-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 1px 1px rgba(0, 0, 0, 0.06);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 20px;
  --w: 1200px;
  --w-wide: 1280px;
  --gutter: 24px;
  --section: 112px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161617;
    --bg-2: #1c1c1e;
    --bg-3: #2a2a2d;
    --card: #232325;
    --ink: #f5f5f7;
    --ink-2: #a1a1a6;
    --ink-3: #98989d;
    --hair: rgba(255, 255, 255, 0.1);
    --hair-2: rgba(255, 255, 255, 0.18);
    --red-tint: rgba(255, 69, 58, 0.14);
    --red: #ff453a;
    --red-text: #ff453a;
    --orange: #ff9f0a;
    --blue: #0a84ff;
    --green: #30d158;
    --primary: #f5f5f7;
    --primary-ink: #1d1d1f;
    --primary-hover: #ffffff;
    --header-bg: rgba(22, 22, 23, 0.72);
    --legend-bg: #0e0e10;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 40px 80px -24px rgba(0, 0, 0, 0.7);
    --kbd-bg: #2c2c2e;
    --kbd-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.5), 0 1px 1px rgba(0, 0, 0, 0.3);
  }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: 40px; line-height: 1.15; }
h3 { font-size: 20px; line-height: 1.35; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
p a, li a, td a, .legend-card-note a { text-decoration: underline; text-decoration-color: var(--hair-2); text-underline-offset: 3px; }
p a:hover, li a:hover, td a:hover { text-decoration-color: currentColor; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code, kbd, pre, samp { font-family: var(--mono); font-size: 0.92em; }
pre { margin: 0; }
button { font: inherit; color: inherit; }
strong, b { font-weight: 600; }
blockquote { margin: 0; }
table { border-collapse: collapse; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--ink); color: var(--bg); font-weight: 600;
}
.skip:focus { top: 16px; }

.sr-live, .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container { width: 100%; max-width: calc(var(--w) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { width: 100%; max-width: calc(var(--w-wide) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow { max-width: calc(760px + var(--gutter) * 2); }

/* ---------- Controls ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px; border: 0; border-radius: 14px;
  font-size: 16px; font-weight: 600; letter-spacing: 0.005em; white-space: nowrap;
  cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn .i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn-primary {
  background: var(--primary); color: var(--primary-ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary {
  background: var(--card); color: var(--ink);
  box-shadow: 0 0 0 1px var(--hair-2), var(--shadow-sm);
}
.btn-secondary:hover { box-shadow: 0 0 0 1px var(--ink-3), var(--shadow-sm); }
.btn-contrast { background: #ffffff; color: #1d1d1f; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
.btn-contrast:hover { background: #f5f5f7; }
.btn-sm { height: 36px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 17px; border-radius: 15px; }

.copy { position: relative; }
.copy code { font-size: 15px; font-weight: 500; }
.copy .i-done { display: none; }
.copy.copied .i-copy { display: none; }
.copy.copied .i-done { display: block; color: var(--green); }

kbd {
  display: inline-block; min-width: 1.6em; padding: 0.05em 0.45em; margin: 0 0.05em;
  border-radius: 6px; background: var(--kbd-bg); box-shadow: 0 0 0 1px var(--hair-2), var(--kbd-shadow);
  font-family: var(--font); font-size: 0.86em; font-weight: 500; line-height: 1.5; text-align: center;
  font-variant-numeric: tabular-nums; color: var(--ink); vertical-align: 0.06em;
}
p code, td code, li code, h3 code { padding: 0.1em 0.4em; border-radius: 5px; background: var(--bg-3); white-space: nowrap; }

.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px 0 12px;
  border-radius: 999px; background: var(--card); box-shadow: 0 0 0 1px var(--hair-2), var(--shadow-sm);
  font-size: 13px; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums;
  transition: color 0.15s ease, box-shadow 0.15s ease;
}
.pill:hover { color: var(--ink); box-shadow: 0 0 0 1px var(--ink-3), var(--shadow-sm); }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.18); }
.pill-sep { color: var(--ink-3); }

.eyebrow, p.eyebrow { margin: 0 0 12px; font-size: 14px; font-weight: 600; letter-spacing: 0.02em; color: var(--red-text); }
.nowrap { white-space: nowrap; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.scrolled { border-bottom-color: var(--hair); }
.nav-bar { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-links a {
  padding: 8px 12px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--ink-2);
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--hair); }
.nav-links .nav-lang { display: none; }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-actions .nav-lang { padding: 8px 12px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.nav-actions .nav-lang:hover { color: var(--ink); background: var(--hair); }
.nav-toggle {
  display: none; position: relative; width: 40px; height: 40px; margin-right: -8px;
  border: 0; border-radius: 10px; background: transparent; cursor: pointer;
}
.nav-toggle span {
  position: absolute; left: 11px; width: 18px; height: 1.5px; border-radius: 1px; background: var(--ink);
  transition: transform 0.25s ease, top 0.25s ease;
}
.nav-toggle span:first-child { top: 15px; }
.nav-toggle span:last-child { top: 23px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 19px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */

.hero { padding: 72px 0 0; }
.hero-copy { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero h1 {
  margin: 28px 0 0; max-width: 20ch;
  font-size: 68px; line-height: 1.16; letter-spacing: -0.015em; font-weight: 600;
}
.mark {
  position: relative; display: inline-block; margin: 0 0.06em 0 0.14em; padding: 0 0.1em; line-height: 1.1;
  border: 0.045em solid var(--red); border-radius: 0.18em;
  background: var(--red-tint);
}
.mark .badge {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -42%);
  font: 600 0.25em/1 var(--font); font-variant-numeric: tabular-nums;
  width: 1.8em; height: 1.8em; border-radius: 50%;
  background: var(--red); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 0.1em 0.3em rgba(0, 0, 0, 0.25), inset 0 0.06em 0 rgba(255, 255, 255, 0.25);
  letter-spacing: 0;
}
.lede { margin: 28px 0 0; max-width: 46em; font-size: 19px; line-height: 1.65; color: var(--ink-2); text-wrap: pretty; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.fine { margin-top: 18px; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- Demo (the output image) ---------- */

.demo { container-type: inline-size; margin: 72px auto 0; max-width: var(--w-wide); }
.demo-frame {
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--hair);
  background: var(--legend-bg);
}
.demo-screen {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background:
    radial-gradient(120% 90% at 10% 0%, #d9e3f7 0%, transparent 55%),
    radial-gradient(90% 80% at 100% 100%, #f1d9e4 0%, transparent 55%),
    linear-gradient(160deg, #e6ebf5 0%, #dfe4ee 50%, #e9e2ec 100%);
  color: #1d1d1f; font-family: var(--font);
  font-size: 1.05cqw; line-height: 1.4;
  user-select: none; -webkit-user-select: none;
}

/* Menu bar */
.mbar {
  position: absolute; inset: 0 0 auto 0; height: 3.6%;
  display: flex; align-items: center; gap: 1.6cqw; padding: 0 1.4cqw;
  background: rgba(255, 255, 255, 0.55); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  font-size: 1cqw; color: #1d1d1f;
}
.mbar-apple { width: 1.1cqw; height: 1.3cqw; background: #1d1d1f; border-radius: 40% 40% 45% 45% / 50% 50% 40% 40%; }
.mbar b { font-weight: 700; }
.mbar-right { margin-left: auto; display: flex; align-items: center; gap: 1.2cqw; }
.mbar-glyph { width: 1.2cqw; height: 1cqw; border-radius: 0.2cqw; background: rgba(29, 29, 31, 0.75); }
.mbar-glyph.wide { width: 2cqw; border-radius: 0.3cqw; }
.mbar-ref {
  width: 1.15cqw; height: 1.15cqw; border-radius: 0.28cqw 0.28cqw 0.28cqw 0;
  border-top: 0.16cqw solid #1d1d1f; border-left: 0.16cqw solid #1d1d1f;
  background: linear-gradient(135deg, rgba(29, 29, 31, 0.34), rgba(29, 29, 31, 0.2));
}

/* Windows */
.win {
  position: absolute; display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border-radius: 1cqw;
  box-shadow: 0 0 0 0.08cqw rgba(0, 0, 0, 0.16), 0 2.2cqw 4cqw -1.5cqw rgba(0, 0, 0, 0.35);
}
.win-bar { display: flex; align-items: center; gap: 0.9cqw; height: 3.4cqw; padding: 0 1.1cqw; background: #f3f3f5; border-bottom: 1px solid rgba(0, 0, 0, 0.08); flex: none; }
.lights { display: inline-flex; gap: 0.55cqw; }
.lights i { width: 0.9cqw; height: 0.9cqw; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.win-title { position: absolute; left: 0; right: 0; text-align: center; font-weight: 600; font-size: 0.95cqw; color: #3a3a3c; pointer-events: none; }

.win-finder { left: 2.4%; top: 7.5%; width: 43%; height: 82%; }
.finder { display: flex; flex: 1; min-height: 0; }
.finder-side { width: 26%; padding: 0.8cqw 0.6cqw; background: #f3f3f5; border-right: 1px solid rgba(0, 0, 0, 0.08); font-size: 0.88cqw; color: #3a3a3c; }
.finder-side p { margin: 0.6cqw 0.6cqw 0.25cqw; font-size: 0.72cqw; font-weight: 600; color: #6e6e73; }
.finder-side span { display: flex; align-items: center; gap: 0.5cqw; padding: 0.28cqw 0.6cqw; border-radius: 0.4cqw; }
.finder-side span::before { content: ""; width: 1cqw; height: 0.9cqw; border-radius: 0.2cqw; background: #4a8fe7; opacity: 0.85; }
.finder-side span.tag::before { display: none; }
.finder-side .tag i { width: 0.8cqw; height: 0.8cqw; margin-right: 0.2cqw; border-radius: 50%; background: var(--c); }
.finder-list { flex: 1; min-width: 0; font-size: 0.9cqw; color: #1d1d1f; }
.finder-head, .finder-list .row { display: grid; grid-template-columns: 1.8cqw 1.5cqw 1fr 8cqw 4cqw; align-items: center; column-gap: 0.4cqw; padding: 0 0.8cqw; height: 2.1cqw; }
.finder-head { grid-template-columns: 1fr 8cqw 4cqw; height: 2cqw; font-size: 0.78cqw; color: #6e6e73; border-bottom: 1px solid rgba(0, 0, 0, 0.06); padding-left: 4.5cqw; }
.finder-list .row:nth-child(odd) { background: #f7f7f9; }
.finder-list .row span:nth-of-type(2), .finder-list .row span:nth-of-type(3) { color: #6e6e73; font-size: 0.82cqw; }
.finder-list .row span:nth-of-type(3) { text-align: right; }
.finder-list .row.deep { padding-left: 2.2cqw; grid-template-columns: 1.8cqw 1.5cqw 1fr 8cqw 4cqw; }
.tri { width: 0; height: 0; margin-left: 0.5cqw; border: 0.3cqw solid transparent; border-left: 0.42cqw solid #8e8e93; border-right: 0; }
.tri.open { transform: rotate(90deg); transform-origin: 40% 50%; }
.ico { width: 1.25cqw; height: 1cqw; border-radius: 0.15cqw 0.3cqw 0.25cqw 0.25cqw; background: linear-gradient(#78b5fb, #4a8fe7); }
.ico.file { width: 0.95cqw; height: 1.15cqw; border-radius: 0.12cqw; background: linear-gradient(#fff, #ececef); box-shadow: inset 0 0 0 0.06cqw rgba(0, 0, 0, 0.18); }
.finder-path { display: flex; gap: 1.2cqw; height: 2cqw; align-items: center; padding: 0 1cqw; border-top: 1px solid rgba(0, 0, 0, 0.08); background: #f7f7f9; font-size: 0.76cqw; color: #6e6e73; flex: none; }
.finder-path span + span::before { content: "›"; margin-right: 1.2cqw; color: #aeaeb2; }

.win-safari { left: 48.4%; top: 5%; width: 49.2%; height: 89%; }
.safari-bar { gap: 0.7cqw; }
.sf-btn { width: 1.6cqw; height: 1.2cqw; border-radius: 0.3cqw; background: rgba(0, 0, 0, 0.07); }
.url { flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.5cqw; height: 2.2cqw; margin: 0 0.6cqw; border-radius: 0.6cqw; background: #e9e9eb; font-size: 0.88cqw; color: #3a3a3c; }
.url i { width: 0.8cqw; height: 0.95cqw; border-radius: 0.15cqw 0.15cqw 0.3cqw 0.3cqw; background: #8e8e93; }
.page { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #fafafb; }
.page-nav { display: flex; align-items: center; gap: 1.6cqw; height: 3.6cqw; padding: 0 1.8cqw; background: #fff; border-bottom: 1px solid rgba(0, 0, 0, 0.07); font-size: 0.92cqw; color: #6e6e73; }
.page-nav b { font-size: 1.05cqw; color: #1d1d1f; margin-right: 0.6cqw; }
.page-nav .on { color: #1d1d1f; font-weight: 600; }
.page-btn { margin-left: auto; height: 2.1cqw; padding: 0 1cqw; display: inline-flex; align-items: center; border-radius: 0.5cqw; background: #0d44e8; color: #fff; font-size: 0.86cqw; font-weight: 600; }
.page-body { padding: 1.6cqw 1.8cqw; }
.page-h { display: flex; align-items: baseline; gap: 1cqw; margin-bottom: 1.2cqw; }
.page-h span { font-size: 1.5cqw; font-weight: 700; color: #1d1d1f; }
.page-h small { font-size: 0.85cqw; color: #6e6e73; }
.table { border-radius: 0.6cqw; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07); overflow: hidden; }
.th, .tr { display: grid; grid-template-columns: 1.1fr 1.2fr 1fr 0.9fr; align-items: center; height: 2.35cqw; padding: 0 1.2cqw; font-size: 0.86cqw; }
.th { height: 2.1cqw; font-size: 0.74cqw; color: #6e6e73; background: #fafafb; border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
.tr + .tr { border-top: 1px solid rgba(0, 0, 0, 0.05); }
.tr span:first-child { font-family: var(--mono); font-size: 0.8cqw; color: #3a3a3c; }
.st { justify-self: start; padding: 0.1cqw 0.6cqw; border-radius: 999px; background: #fff4d6; color: #855c00; font-size: 0.72cqw; font-weight: 600; }
.st.paid { background: #e3f6e8; color: #1f7a3a; }
.st.late { background: #fde2e0; color: #b3261e; }

/* Marks */
.mk { position: absolute; left: var(--x); top: var(--y); }
.mk b {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  width: 2.1cqw; height: 2.1cqw; border-radius: 50%;
  background: #ff3b30; color: #fff;
  font: 600 1.15cqw/1 var(--font); font-variant-numeric: tabular-nums;
  display: grid; place-items: center;
  box-shadow: 0 0.12cqw 0.3cqw rgba(0, 0, 0, 0.28), inset 0 0.08cqw 0 rgba(255, 255, 255, 0.25);
}
.mk-frame, .mk-region {
  width: var(--w); height: var(--h);
  border: 0.2cqw solid #ff3b30; border-radius: 0.55cqw;
  background: rgba(255, 59, 48, 0.08);
}
.mk-arrow { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.mk-arrow path { stroke-width: 3.2; }
.mk-badge-only { width: 0; height: 0; }
.mk-text {
  padding-left: 1.9cqw; color: #ff3b30; font-size: 1.35cqw; font-weight: 600; white-space: nowrap;
  text-shadow: 0 0 0.3cqw rgba(255, 255, 255, 0.9), 0 0 0.9cqw rgba(255, 255, 255, 0.9);
}
.mk-text b { left: 0; top: 50%; }

/* Legend band */
.demo-legend {
  padding: 2cqw 2.4cqw 2.2cqw; margin: 0;
  background: var(--legend-bg); color: var(--legend-ink);
  font: 500 clamp(10px, 1.08cqw, 15px)/1.6 var(--mono);
  white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2;
}
.demo-legend s, .legend s { text-decoration: none; color: var(--legend-ink-2); }
.demo-legend .ll { display: inline; }
.demo-legend .sig { color: var(--legend-ink-2); }
.demo-caption { margin: 0; padding: 18px 24px 0; text-align: center; font-size: 14px; color: var(--ink-3); text-wrap: pretty; }

/* One-shot reveal, in the order the marks were placed. */
.demo.animate .mk, .demo.animate .ll { opacity: 0; }
.demo.animate.play .mk, .demo.animate.play .ll { animation: mk-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.demo.animate.play .ll { animation-name: ll-in; animation-duration: 0.5s; }
.demo.animate.play .ll[data-n="0"] { animation-delay: 0.1s; }
.demo.animate.play [data-n="1"] { animation-delay: 0.5s; }
.demo.animate.play [data-n="2"] { animation-delay: 1.1s; }
.demo.animate.play [data-n="3"] { animation-delay: 1.7s; }
.demo.animate.play [data-n="4"] { animation-delay: 2.3s; }
.demo.animate.play [data-n="5"] { animation-delay: 2.9s; }
.demo.animate.play .ll[data-n="6"] { animation-delay: 3.4s; }
.demo.animate.play .mk-arrow path { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: draw 0.7s cubic-bezier(0.4, 0, 0.2, 1) 2.35s forwards; }
@keyframes mk-in { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }
@keyframes ll-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.demo.animate.play .mk-arrow { animation-name: ll-in; transform: none; }

/* ---------- Paste strip ---------- */

.paste { padding: 56px 0 0; text-align: center; }
.paste-title { font-size: 14px; font-weight: 500; color: var(--ink-3); }
.paste-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 36px; margin-top: 18px; }
.paste-list li { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink-3); }

/* ---------- Sections ---------- */

.section { padding: var(--section) 0; }
.section-alt { background: var(--bg-2); }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-lede { margin-top: 16px; font-size: 19px; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 64px; align-items: center; }
.split-text p + p { margin-top: 16px; }
.split-text h2 + p { margin-top: 20px; }
.split-text blockquote {
  margin: 20px 0; padding: 18px 22px; border-left: 3px solid var(--hair-2);
  color: var(--ink-2); font-size: 17px; line-height: 1.7; background: var(--bg-2); border-radius: 0 var(--r) var(--r) 0;
}
.section-alt .split-text blockquote { background: var(--card); }

.legend-card { padding: 20px; border-radius: var(--r-lg); background: var(--bg-2); }
.legend-card-title { margin: 0 4px 14px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.legend-card-note { margin: 14px 4px 0; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.legend {
  padding: 20px 22px; border-radius: var(--r);
  background: var(--legend-bg); color: var(--legend-ink);
  font: 500 13px/1.65 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere;
}
.legend-card .legend { font-size: 12.5px; padding: 18px 20px; }

.card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 28px; border-radius: var(--r-lg); background: var(--bg-2);
}
.section-alt .card { background: var(--card); box-shadow: 0 0 0 1px var(--hair); }
.card h3 { font-size: 19px; }
.card p { color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
.card-wide { grid-column: span 2; }
.card-visual { display: flex; align-items: center; justify-content: center; min-height: 150px; margin: -8px -8px 8px; padding: 16px; border-radius: 14px; }

.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

/* ---------- Steps ---------- */

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.step { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--r-lg); background: var(--card); box-shadow: 0 0 0 1px var(--hair); }
.step h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.step-n {
  flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--red); color: #fff;
  font-size: 13px; font-weight: 600; display: grid; place-items: center; font-variant-numeric: tabular-nums;
}
.step p { color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.step-visual { display: flex; align-items: center; justify-content: center; height: 184px; margin: -4px -4px 10px; padding: 12px; border-radius: 14px; background: var(--bg-2); overflow: hidden; }

.keycap {
  display: inline-grid; place-items: center; min-width: 56px; height: 56px; padding: 0 16px;
  border-radius: 12px; background: var(--kbd-bg); color: var(--ink);
  box-shadow: 0 0 0 1px var(--hair-2), inset 0 -2px 0 rgba(0, 0, 0, 0.12), 0 2px 3px rgba(0, 0, 0, 0.08);
  font-size: 20px; font-weight: 500; letter-spacing: 0.04em;
}
.keycap.big { min-width: 120px; height: 68px; font-size: 26px; border-radius: 16px; }
.keys { display: flex; align-items: center; gap: 12px; }
.keys-x { font-size: 20px; font-weight: 600; color: var(--ink-3); }

.hover-card {
  width: 100%; max-width: 280px; padding: 10px 12px; border-radius: 10px;
  background: var(--card); box-shadow: 0 0 0 0.5px var(--hair-2), var(--shadow);
  font-size: 12.5px; line-height: 1.45;
}
.hover-row { display: grid; grid-template-columns: 56px 1fr auto; align-items: baseline; gap: 10px; padding: 3px 6px; border-radius: 6px; }
.hover-row:first-child { grid-template-columns: 1fr auto; margin-bottom: 4px; padding-bottom: 6px; border-bottom: 1px solid var(--hair); }
.hover-row:first-child span { font-weight: 600; color: var(--ink); font-family: var(--mono); font-size: 12px; }
.hover-row em { font-style: normal; color: var(--ink-3); font-size: 11.5px; }
.hover-row > span { color: var(--ink-3); }
.hover-row b, .hover-row code { font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.hover-row code { font-size: 11.5px; }
.hover-row.copyable { background: var(--red-tint); }
.hover-row .cp { width: 12px; height: 12px; border-radius: 3px; box-shadow: inset 0 0 0 1.5px var(--ink-3); align-self: center; justify-self: end; position: relative; }
.hover-row .cp::before { content: ""; position: absolute; left: -3px; top: -3px; width: 10px; height: 10px; border-left: 1.5px solid var(--ink-3); border-top: 1.5px solid var(--ink-3); border-radius: 3px 0 0 0; }
.hover-card.small { max-width: 250px; }

.note-row {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center;
  width: 100%; max-width: 290px; padding: 12px 14px; border-radius: 12px;
  background: var(--card); box-shadow: 0 0 0 0.5px var(--hair-2), var(--shadow); font-size: 13px;
}
.note-badge { width: 20px; height: 20px; border-radius: 50%; background: var(--red); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.note-desc { font-family: var(--mono); font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-field {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 2px; height: 30px; padding: 0 8px;
  border-radius: 7px; background: var(--bg-2); color: var(--ink);
  box-shadow: 0 0 0 1px var(--blue), 0 0 0 3.5px rgba(10, 132, 255, 0.3);
}
.note-field kbd { margin-left: auto; font-size: 11px; color: var(--ink-3); background: transparent; box-shadow: none; }
.note-caret { width: 1.5px; height: 16px; background: var(--ink); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.toast {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px; border-radius: 999px;
  background: var(--card); box-shadow: 0 0 0 0.5px var(--hair-2), var(--shadow); font-size: 14px; font-weight: 500;
}
.toast i { width: 18px; height: 18px; border-radius: 50%; background: var(--green); position: relative; }
.toast i::after { content: ""; position: absolute; left: 6px; top: 3px; width: 4px; height: 8px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); }

.shot { margin: 64px 0 0; }
.shot img { border-radius: var(--r-lg); box-shadow: var(--shadow-lg), 0 0 0 1px var(--hair); }
.shot figcaption { margin-top: 16px; text-align: center; font-size: 14px; color: var(--ink-3); text-wrap: pretty; }
.shot-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 56px; }
.shot-pair .shot { margin: 0; }
.shot-pair img { border-radius: 16px; }

/* ---------- Reads ---------- */

.sample {
  margin-top: 6px; padding: 14px 16px; border-radius: 10px;
  background: var(--legend-bg); color: var(--legend-ink);
  font: 500 12.5px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere;
}
.sample.code { background: var(--legend-bg); }
.apps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.apps li { padding: 3px 9px; border-radius: 999px; background: var(--bg-3); font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.section-alt .apps li { background: var(--bg-2); }
.reads .card:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; column-gap: 32px; }
.reads .card:last-child h3 { grid-column: 1; }
.reads .card:last-child p { grid-column: 1; }
.reads .card:last-child .sample { grid-column: 2; grid-row: 1 / span 2; margin: 0; }

/* ---------- Details visuals ---------- */

.map { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.map-wire {
  position: relative; min-height: 130px; border-radius: 10px; background: var(--bg-3);
}
.map-wire .w { position: absolute; border: 1.5px solid var(--ink-3); border-radius: 3px; }
.map-wire .w1 { inset: 10% 8%; }
.map-wire .w2 { left: 12%; top: 22%; width: 58%; height: 60%; border-color: var(--ink-2); }
.map-wire .w3 { left: 16%; top: 48%; width: 50%; height: 11%; border-color: var(--red); background: var(--red-tint); }
.map-wire .w4 { left: 74%; top: 22%; width: 16%; height: 60%; border-style: dashed; opacity: 0.7; }
.map-wire .cross { position: absolute; left: 36%; top: 53%; width: 14px; height: 14px; transform: translate(-50%, -50%); }
.map-wire .cross::before, .map-wire .cross::after { content: ""; position: absolute; background: var(--ink); box-shadow: 0 0 0 1.5px var(--bg-3); }
.map-wire .cross::before { left: 6px; top: 0; width: 1.5px; height: 14px; }
.map-wire .cross::after { left: 0; top: 6px; width: 14px; height: 1.5px; }
.map-rows { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--card); box-shadow: 0 0 0 0.5px var(--hair-2), var(--shadow); font: 500 12px/1.5 var(--mono); }
.map-rows li { padding: 3px 8px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-rows li s { text-decoration: none; color: var(--ink-3); margin-left: 6px; font-family: var(--font); }
.map-rows .in1 { padding-left: 18px; } .map-rows .in2 { padding-left: 28px; } .map-rows .in3 { padding-left: 38px; }
.map-rows .sel { background: var(--red-tint); color: var(--ink); }
.map-rows .dim { color: var(--ink-3); }

.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg-3); font-size: 13px; font-weight: 500; }
.seg span { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; color: var(--ink-2); }
.seg span.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg kbd { margin-left: 2px; font-size: 10.5px; min-width: 0; padding: 0 5px; line-height: 1.5; color: var(--ink-3); }
.seg i { width: 14px; height: 14px; }
.t-frame { border: 1.5px solid currentColor; border-radius: 3px; }
.t-arrow { position: relative; }
.t-arrow::before { content: ""; position: absolute; left: 1px; bottom: 1px; width: 15px; height: 1.5px; background: currentColor; transform-origin: 0 50%; transform: rotate(-45deg); }
.t-arrow::after { content: ""; position: absolute; right: 1px; top: 1px; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; }
.t-text::before { content: "T"; font: 600 14px/1 var(--font); display: block; text-align: center; }

.send { position: relative; display: inline-flex; align-items: stretch; height: 34px; border-radius: 999px; background: var(--blue-fill); color: #fff; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-sm); }
.send-main { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px 0 16px; }
.send-main kbd { background: rgba(0, 0, 0, 0.18); box-shadow: none; color: inherit; font-size: 11px; min-width: 0; padding: 0 5px; }
.send-chev { width: 30px; border-left: 1px solid rgba(255, 255, 255, 0.2); position: relative; }
.send-chev::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translate(-50%, -70%) rotate(45deg); }
.send-list { position: absolute; left: 0; top: calc(100% + 6px); min-width: 170px; padding: 5px; border-radius: 10px; background: var(--card); color: var(--ink); font-weight: 500; box-shadow: 0 0 0 0.5px var(--hair-2), var(--shadow); }
.send-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 9px; border-radius: 6px; font-size: 12.5px; }
.send-list li:first-child { background: var(--red-tint); }
.send-list kbd { font-size: 10.5px; color: var(--ink-3); min-width: 0; padding: 0 5px; background: transparent; box-shadow: none; }
.details .card-visual:has(.send) { align-items: flex-start; padding-top: 22px; min-height: 248px; }

.displays { display: flex; align-items: flex-end; gap: 14px; }
.disp { position: relative; width: 120px; height: 76px; border-radius: 8px; background: var(--card); box-shadow: 0 0 0 1.5px var(--ink-3); }
.disp::after { content: ""; position: absolute; left: 50%; bottom: -14px; width: 34px; height: 12px; transform: translateX(-50%); border-radius: 0 0 4px 4px; background: var(--ink-3); opacity: 0.6; }
.disp.marked { box-shadow: 0 0 0 1.5px var(--ink); }
.disp:not(.marked) { opacity: 0.45; }
.disp b { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--red); color: #fff; font-size: 11px; display: grid; place-items: center; }
.disp b:first-child { left: 18px; top: 16px; }
.disp b:last-child { left: 64px; top: 40px; }
.disp.marked::before { content: ""; position: absolute; left: 26px; top: 24px; width: 40px; height: 16px; border: 1.5px solid var(--red); border-radius: 3px; background: var(--red-tint); }

/* ---------- Legend anatomy ---------- */

.anatomy { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.anatomy-legend { font-size: 14px; padding: 26px 28px; line-height: 1.75; }
.anatomy-legend .hl {
  position: relative; display: inline-block; width: calc(100% + 16px); padding: 0 44px 0 8px; margin-left: -8px;
  border-radius: 6px; background: rgba(255, 255, 255, 0.06); transition: background-color 0.15s ease;
}
.anatomy-legend .hl.active { background: rgba(255, 59, 48, 0.22); }
.anatomy-notes li { transition: color 0.15s ease; }
.anatomy-notes li.active { color: var(--ink); }
.anatomy-legend .hl::after {
  content: attr(data-hl); position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; border-radius: 50%; background: var(--red); color: #fff;
  font: 600 11px/18px var(--font); text-align: center;
}
.anatomy-notes { display: flex; flex-direction: column; gap: 18px; counter-reset: note; padding-top: 4px; }
.anatomy-notes li { position: relative; padding-left: 36px; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
.anatomy-notes li::before {
  counter-increment: note; content: counter(note);
  position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--red); color: #fff; font: 600 12px/22px var(--font); text-align: center;
}
.anatomy-notes b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 2px; }

.outputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 72px; padding-top: 48px; border-top: 1px solid var(--hair); }
.output h3 { font-size: 18px; margin-bottom: 8px; }
.output p { color: var(--ink-2); font-size: 15.5px; }

/* ---------- Permissions ---------- */

.perms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.perm { display: flex; flex-direction: column; gap: 8px; padding: 28px; border-radius: var(--r-lg); background: var(--card); box-shadow: 0 0 0 1px var(--hair); }
.perm h3 { font-size: 20px; }
.perm p { color: var(--ink-2); font-size: 15.5px; }
.perm-without { padding-top: 10px; margin-top: auto; border-top: 1px solid var(--hair); font-size: 14px; color: var(--ink-3); }
.level { align-self: flex-start; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 6px; }
.level.req { background: rgba(255, 149, 0, 0.14); color: #9e5300; }
.level.rec { background: rgba(0, 122, 255, 0.12); color: #0a5fcc; }
.level.opt { background: var(--bg-3); color: var(--ink-2); }
@media (prefers-color-scheme: dark) {
  .level.req { color: #ffb340; }
  .level.rec { color: #6cb2ff; }
}

.guide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; margin-top: 64px; padding-top: 56px; border-top: 1px solid var(--hair); }
.guide-text h3 { font-size: 24px; margin-bottom: 14px; }
.guide-text p { color: var(--ink-2); }
.guide-visual { display: flex; justify-content: center; }
.guide-panel { width: 100%; max-width: 340px; padding: 18px; border-radius: 14px; background: var(--card); box-shadow: 0 0 0 0.5px var(--hair-2), var(--shadow-lg); }
.guide-step { display: flex; align-items: center; gap: 12px; }
.guide-icon { flex: none; width: 40px; height: 40px; border-radius: 10px; background: url("img/icon-256.png") center / cover; }
.guide-step p { font-size: 15px; line-height: 1.45; }
.guide-switch { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); font-size: 14px; font-weight: 500; }
.sw { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--green); }
.sw i { position: absolute; top: 2px; left: 18px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.guide-ok { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13.5px; color: var(--ink-2); }
.guide-ok i { width: 16px; height: 16px; border-radius: 50%; background: var(--green); position: relative; }
.guide-ok i::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); }

/* ---------- Two-column prose ---------- */

.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; }
.two h2 { font-size: 32px; margin-bottom: 18px; }
.two p:not(.eyebrow) { color: var(--ink-2); }
.two p + p { margin-top: 14px; }

/* ---------- Shortcuts ---------- */

.keys-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; padding: 8px 32px; border-radius: var(--r-lg); background: var(--card); box-shadow: 0 0 0 1px var(--hair); }
.keys-table table { width: 100%; }
.keys-table tr { border-bottom: 1px solid var(--hair); }
.keys-table table:last-child tr:last-child { border-bottom: 0; }
.keys-table th, .keys-table td { padding: 14px 0; text-align: left; vertical-align: top; font-size: 15px; line-height: 1.55; }
.keys-table th { width: 32%; padding-right: 16px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.keys-table td { color: var(--ink-2); }
.keys-table kbd { font-size: 13px; }

/* ---------- Install ---------- */

.install { padding: 48px; border-radius: 28px; background: var(--bg-2); }
.install-head { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start; }
.install-head img { width: 96px; height: 96px; margin-top: -4px; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.12)); }
.install-head h2 { font-size: 34px; }
.install-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 44px; }
.way { display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: var(--r-lg); background: var(--card); box-shadow: 0 0 0 1px var(--hair); }
.way h3 { font-size: 18px; }
.way p { color: var(--ink-2); font-size: 15px; }
.way .btn { align-self: flex-start; margin-top: 4px; }
.way-meta { margin-top: auto; padding-top: 6px; font-size: 13px; color: var(--ink-3); }
.cmd {
  display: flex; align-items: center; gap: 12px; margin-top: 4px; padding: 13px 14px; min-height: 48px;
  border: 0; border-radius: 12px; background: var(--legend-bg); color: var(--legend-ink);
  text-align: left; cursor: pointer; transition: box-shadow 0.15s ease;
}
.cmd:hover { box-shadow: 0 0 0 2px var(--hair-2); }
.cmd code { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.5; font-weight: 500; overflow-wrap: anywhere; }
.cmd .prompt { color: var(--legend-ink-2); margin-right: 6px; }
.cmd .i { width: 18px; height: 18px; fill: none; stroke: var(--legend-ink-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.cmd.copied .i-done { stroke: var(--green); }

/* ---------- FAQ ---------- */

.faq details { border-top: 1px solid var(--hair); }
.faq details:last-child { border-bottom: 1px solid var(--hair); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 0; font-size: 18px; font-weight: 600; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 6px;
  border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2);
  transform: rotate(45deg); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { padding: 0 0 22px; color: var(--ink-2); max-width: 64ch; }

/* ---------- Footer ---------- */

.site-footer { color: var(--ink-2); }
.footer-cta {
  position: relative; overflow: hidden; padding: 104px 0; text-align: center;
  background: #0f0f12; color: #f5f5f7;
}
.footer-cta::before {
  content: ""; position: absolute; inset: -40% 0 auto; height: 120%; pointer-events: none;
  background: radial-gradient(50% 60% at 50% 40%, rgba(255, 59, 48, 0.28) 0%, rgba(255, 59, 48, 0) 70%);
}
.footer-cta .container { position: relative; display: flex; flex-direction: column; align-items: center; }
.footer-cta img { width: 80px; height: 80px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45)); }
.footer-cta h2 { margin-top: 28px; font-size: 40px; color: #fff; }
.footer-cta p { margin-top: 14px; font-size: 17px; color: rgba(255, 255, 255, 0.64); }
.footer-cta .cta { margin-top: 32px; }

.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding-top: 56px; padding-bottom: 40px; }
.footer-brand p { margin-top: 12px; font-size: 15px; }
.footer-brand .brand { color: var(--ink); }
.footer-grid nav { display: flex; flex-direction: column; gap: 10px; }
.footer-grid h3 { margin-bottom: 6px; font-size: 14px; color: var(--ink); }
.footer-grid nav a { font-size: 14.5px; color: var(--ink-2); }
.footer-grid nav a:hover { color: var(--ink); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--hair); font-size: 13px; color: var(--ink-3); }
.footer-langs { display: flex; gap: 16px; }
.footer-langs [aria-current] { color: var(--ink); font-weight: 500; }
.footer-langs a:hover { color: var(--ink); }

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

@media (max-width: 1100px) {
  :root { --section: 96px; }
  h2 { font-size: 36px; }
  .hero h1 { font-size: 58px; }
  .anatomy { grid-template-columns: 1fr; gap: 28px; }
  .outputs { gap: 28px; }
}

@media (max-width: 900px) {
  :root { --section: 80px; }
  .nav-bar { gap: 16px; }
  .nav-links {
    position: fixed; inset: 64px 0 auto; z-index: 40; flex-direction: column; align-items: stretch; gap: 2px;
    margin: 0; padding: 12px var(--gutter) 20px; background: var(--bg); border-bottom: 1px solid var(--hair);
    box-shadow: var(--shadow); transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s;
  }
  .nav-links.open { transform: none; opacity: 1; visibility: visible; }
  .nav-links a { padding: 12px 10px; font-size: 16px; }
  .nav-links .nav-lang { display: block; margin-top: 8px; border-top: 1px solid var(--hair); border-radius: 0; padding-top: 16px; }
  .nav-actions .nav-lang { display: none; }
  .nav-toggle { display: block; }
  .hero { padding-top: 56px; }
  .hero h1 { font-size: 48px; }
  .lede { font-size: 17px; }
  .demo { margin-top: 48px; border-radius: 16px; }
  .split, .two, .guide { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-wide { grid-column: span 2; }
  .reads .card:last-child { grid-template-columns: 1fr; }
  .reads .card:last-child .sample { grid-column: 1; grid-row: auto; margin-top: 6px; }
  .outputs { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 56px; }
  .perms { grid-template-columns: minmax(0, 1fr); }
  .keys-table { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .keys-table table:first-child tr:last-child { border-bottom: 1px solid var(--hair); }
  .install { padding: 32px; border-radius: 24px; }
  .install-head { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .install-head img { width: 72px; height: 72px; }
  .install-head h2 { font-size: 30px; }
  .install-ways { grid-template-columns: minmax(0, 1fr); margin-top: 32px; }
  .footer-cta { padding: 80px 0; }
  .footer-cta h2 { font-size: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  :root { --section: 64px; --gutter: 20px; }
  body { font-size: 16px; }
  h2 { font-size: 30px; }
  .hero h1 { font-size: 36px; letter-spacing: -0.01em; }
  .mark { border-width: 0.055em; }
  .cta { flex-direction: column; align-items: stretch; width: 100%; }
  .cta .btn { width: 100%; }
  .copy code { font-size: 14px; }
  .fine { line-height: 1.7; }
  .demo { margin-left: calc(var(--gutter) * -1 + 8px); margin-right: calc(var(--gutter) * -1 + 8px); border-radius: 12px; }
  .demo-caption { padding: 14px 16px 0; font-size: 13px; }
  .paste-list { gap: 6px 22px; }
  .paste-list li { font-size: 17px; }
  .section-head { margin-bottom: 36px; }
  .section-lede { font-size: 17px; }
  .steps, .bento, .shot-pair { grid-template-columns: minmax(0, 1fr); }
  .card-wide { grid-column: auto; }
  .card, .step, .perm, .way { padding: 22px; }
  .map { grid-template-columns: 1fr; }
  .anatomy-legend { font-size: 12.5px; padding: 18px 16px; }
  .anatomy-legend .hl { padding-right: 36px; }
  .legend { font-size: 12px; padding: 16px; }
  .keys-table { padding: 4px 20px; }
  .keys-table th { width: 38%; white-space: normal; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-cta h2 { font-size: 28px; }
  .footer-bottom { flex-direction: column; }
}

/* The narrowest phones (320–359px): let the few fixed-width pieces give way. */
@media (max-width: 359px) {
  .nowrap { white-space: normal; }
  .way .btn { align-self: stretch; height: auto; min-height: 48px; padding: 10px 16px; white-space: normal; text-align: center; }
  .hero h1 { font-size: 32px; }
  .copy code { font-size: 13px; }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0s !important; transition-duration: 0.001ms !important; }
  .demo.animate .mk, .demo.animate .ll { opacity: 1; }
  .demo.animate.play .mk-arrow path { stroke-dasharray: none; stroke-dashoffset: 0; }
  .note-caret { animation: none; }
}
