/* Keystorm website. Plain CSS, system fonts, no build step. Dark, liquid-glass surfaces. */

:root {
  color-scheme: dark;

  --bg: #161618;
  --bg-2: #1c1c1f;
  --text: #f5f5f7;
  --text-2: rgba(235, 235, 245, 0.72);
  --text-3: rgba(235, 235, 245, 0.58);
  --hair: rgba(255, 255, 255, 0.09);
  --accent: #5ac8e0;          /* from the app icon's teal */
  --accent-deep: #1f6f9f;
  --ok: #63d38e;
  --no: #ff7a6e;

  /* Liquid glass */
  --glass-fill: linear-gradient(165deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.035) 45%, rgba(255, 255, 255, 0.05) 100%);
  --glass-edge: rgba(255, 255, 255, 0.13);
  --glass-shine: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 1px 0 0 rgba(255, 255, 255, 0.06), inset 0 -1px 0 rgba(0, 0, 0, 0.4), inset 0 -18px 40px -24px rgba(255, 255, 255, 0.07);
  --glass-drop: 0 24px 60px -24px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.25);
  --blur: blur(30px) saturate(140%) brightness(1.04);

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

  --max: 1080px;
  --gutter: max(20px, env(safe-area-inset-left));
  --radius: 28px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html:focus-within { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 var(--font);
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
.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; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 12px; background: #fff; color: #000; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* Ambient light behind the glass. Muted icon colours, very low intensity. */
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: radial-gradient(120% 70% at 50% -8%, #26272c 0%, #1a1a1d 45%, var(--bg) 75%); }
.ambient::after { /* fine grain so gradients never band */
  content: ""; position: absolute; inset: 0; opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
/* Static, soft lights: no blur filter, no animation, so glass stays cheap to render. */
.light { position: absolute; border-radius: 50%; }
.light-a { width: 90vw; height: 52vw; left: 5vw; top: -30vw; background: radial-gradient(closest-side, rgba(190, 196, 206, 0.13), transparent); }
.light-b { width: 52vw; height: 52vw; right: -20vw; top: 30vh; background: radial-gradient(closest-side, rgba(38, 112, 140, 0.18), transparent); }

/* Glass primitives */
.glass, .glass-dark {
  position: relative;
  background: var(--glass-fill);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid transparent;
  box-shadow: var(--glass-shine), var(--glass-drop);
  border-radius: var(--radius);
  isolation: isolate;
}
.glass-dark { background: linear-gradient(180deg, rgba(30, 30, 34, 0.86), rgba(20, 20, 23, 0.9)); }
.glass::before, .glass-dark::before { /* specular rim that follows the pointer */
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; z-index: -1;
  background:
    radial-gradient(420px circle at var(--mx, 30%) var(--my, -10%), rgba(255, 255, 255, 0.28), transparent 45%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.06) 32%, rgba(255, 255, 255, 0.02) 62%, rgba(255, 255, 255, 0.16));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px;
}
.glass::after { /* curved top sheen, like light bending across a lens */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(120% 60% at 50% -18%, rgba(255, 255, 255, 0.11), transparent 60%);
}

/* Type */
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: 15px; font-weight: 600; letter-spacing: 0; }
.display, .headline, .card-title { font-family: var(--font-display); font-weight: 600; margin: 0; color: var(--text); text-wrap: balance; }
.lede, .sub, .mode-note, .card p { text-wrap: pretty; }
.display { font-size: clamp(52px, 7.6vw, 96px); line-height: 1.02; letter-spacing: -0.025em; }
.headline { font-size: clamp(34px, 5vw, 56px); line-height: 1.07; letter-spacing: -0.02em; }
.card-title { font-size: clamp(26px, 3.2vw, 34px); line-height: 1.1; letter-spacing: -0.015em; margin-bottom: 14px; }
.soft { color: rgba(245, 245, 247, 0.48); }
.lede { font-size: clamp(19px, 2vw, 23px); line-height: 1.42; color: var(--text-2); max-width: 30em; margin: 24px 0 0; letter-spacing: -0.016em; }
.sub { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: var(--text-2); max-width: 36em; margin: 18px 0 0; }
h3 { font-family: var(--font-display); font-size: 21px; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 8px; }
p { margin: 0; }
kbd {
  display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 10px;
  font: 600 19px/1 var(--font); color: var(--text);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 3px 0 rgba(0, 0, 0, 0.45), 0 8px 18px -8px rgba(0, 0, 0, 0.7);
}
kbd.inline { display: inline; min-width: 0; height: auto; padding: 1px 6px; font-size: 0.86em; border-radius: 7px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 1px 0 rgba(0, 0, 0, 0.4); white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 24px; border-radius: 999px; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; text-decoration: none !important; transition: transform 0.3s var(--ease), background 0.3s, box-shadow 0.3s; }
.btn:active { transform: scale(0.97); }
.btn-primary { color: #04131a; background: linear-gradient(180deg, #f2fcfe, #c9eef6); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(4, 19, 26, 0.12), 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 24px -12px rgba(0, 0, 0, 0.7); }
.btn-primary:hover { background: linear-gradient(180deg, #ffffff, #d8f3f9); }
.btn-glass { color: var(--text); background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14); }
.btn-glass:hover { background: rgba(255, 255, 255, 0.14); }
.btn-small { height: 34px; padding: 0 16px; font-size: 14px; }

/* Nav */
.nav-wrap { position: sticky; top: 0; z-index: 50; padding: 12px var(--gutter) 0; }
.nav { max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 18px; height: 56px; padding: 0 10px 0 16px; border-radius: 999px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 7px; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0 auto; padding: 0; }
.nav-links a { display: block; padding: 7px 12px; border-radius: 999px; color: var(--text-2); font-size: 14px; transition: color 0.2s, background 0.2s; }
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); text-decoration: none; }

/* Layout */
main { overflow: clip; }
.section { max-width: var(--max); margin: 0 auto; padding: clamp(80px, 10vw, 128px) var(--gutter) 0; }
.section-head { max-width: 780px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
.section-head .sub { margin-left: auto; margin-right: auto; }

/* Hero */
.hero { max-width: var(--max); margin: 0 auto; padding: clamp(40px, 6vw, 72px) var(--gutter) 0; display: grid; gap: clamp(44px, 5vw, 64px); }
.hero-copy { max-width: 820px; margin: 0 auto; text-align: center; display: grid; justify-items: center; }
.hero-copy .lede { margin-left: auto; margin-right: auto; }
.hero-icon { width: 88px; height: 88px; margin-bottom: 22px; filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.5)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4)); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px; margin-top: 32px; }
.status { display: inline-flex; align-items: center; gap: 9px; color: var(--text-2); font-size: 15px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #f5c451; box-shadow: 0 0 0 4px rgba(245, 196, 81, 0.15); }

.stage { position: relative; margin: 0; padding-bottom: 150px; }
.window { border-radius: 18px; overflow: hidden; max-width: 880px; margin: 0 auto; }
.titlebar { display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--hair); background: rgba(255, 255, 255, 0.02); }
.lights { display: inline-flex; gap: 8px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.titlebar-name { font-size: 13px; font-weight: 600; color: var(--text-3); }
.doc { padding: clamp(24px, 4vw, 40px) clamp(22px, 5vw, 48px) clamp(80px, 12vw, 130px); font-size: clamp(16px, 1.7vw, 19px); line-height: 1.62; color: rgba(245, 245, 247, 0.9); }
.doc p + p { margin-top: 12px; }
.doc-muted { color: var(--text-3); font-weight: 600; }
.caret { display: inline-block; width: 2px; height: 1.15em; margin-left: 2px; vertical-align: -0.2em; background: var(--accent); }
.js .stage.typing .caret { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hud {
  position: absolute; right: max(0px, calc(50% - 520px)); bottom: 0;
  width: min(420px, 88%); padding: 18px 20px 16px; border-radius: 24px;
  background: linear-gradient(180deg, rgba(58, 58, 64, 0.5), rgba(28, 28, 32, 0.55));
}
.hud-top { display: flex; align-items: center; gap: 12px; }
.hud-glyph { display: grid; place-items: center; width: 32px; height: 32px; color: var(--accent); }
.hud-title { display: flex; align-items: center; gap: 8px; }
.hud-chip { padding: 2px 8px; border-radius: 999px; font-size: 12px; color: var(--text-2); background: rgba(255, 255, 255, 0.1); }
.hud-titles { display: grid; line-height: 1.25; }
.hud-titles strong { font-size: 15px; }
.hud-titles span { font-size: 13px; color: var(--text-2); }
.hud-time { margin-left: auto; font: 500 15px/1 var(--font); font-variant-numeric: tabular-nums; color: var(--text-2); }
.hud-dest { margin: 10px 0 12px; font-size: 13px; color: var(--text-2); }
.hud-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.hud-spacer { flex: 1; }
.hbtn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text); background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14); }
.hbtn-icon { width: 28px; padding: 0; justify-content: center; color: var(--text-2); }
.hbtn-prominent { color: #fff; background: linear-gradient(180deg, #2a86b8, var(--accent-deep)); border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.hud-preview { font-size: 15px; line-height: 1.45; color: rgba(245, 245, 247, 0.9); }
.hud-note { margin-top: 6px; font-size: 12px; color: var(--text-2); }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { padding: 30px 28px 32px; }
.step h3 { margin-top: 28px; }
.step p { color: var(--text-2); font-size: 16px; }
.keys { display: flex; gap: 8px; }
.glyph { height: 46px; display: flex; align-items: center; color: var(--accent); }

/* Language chips */
.chips { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 900px; }
.chips li {
  padding: 9px 16px; border-radius: 999px; font-size: 15px; color: rgba(245, 245, 247, 0.86);
  background: rgba(255, 255, 255, 0.055); border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Modes */
.modes { padding: clamp(22px, 3.5vw, 40px); text-align: left; }
.modes .segmented { display: grid; width: fit-content; margin-left: auto; margin-right: auto; }
.segmented { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, 0.32); border: 1px solid rgba(255, 255, 255, 0.08); margin-bottom: clamp(28px, 4vw, 40px); max-width: 100%; }
.segmented button { position: relative; z-index: 1; appearance: none; border: 0; background: none; color: var(--text-2); font: 600 15px/1 var(--font); padding: 11px clamp(12px, 2.4vw, 22px); border-radius: 999px; cursor: pointer; transition: color 0.25s; }
.segmented button[aria-selected="true"] { color: var(--text); }
.seg-thumb { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: var(--tw, 25%); transform: translateX(var(--tx, 0)); border-radius: 999px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.09)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 4px 14px rgba(0, 0, 0, 0.4); transition: transform 0.5s var(--ease), width 0.5s var(--ease); }
.mode-panel { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 20px 28px; }
.mode-panel + .mode-panel { margin-top: 36px; }
.js .mode-panel + .mode-panel { margin-top: 0; }
.mode-panel[hidden] { display: none; }
.mode-panel:focus-visible { outline-offset: 8px; border-radius: 16px; }
.seg-thumb { display: none; }
.js .seg-thumb { display: block; }
.mode-panel.enter { animation: rise 0.6s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.label { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--text-3); }
.said p { font-size: clamp(18px, 2vw, 22px); line-height: 1.45; color: var(--text-3); font-style: normal; }
.typed-out p { font-size: clamp(18px, 2vw, 22px); line-height: 1.45; color: var(--text); }
.typed-out.email p + p { margin-top: 12px; }
.arrow { padding-top: 34px; font-size: 22px; color: var(--accent); }
.mode-note { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid var(--hair); color: var(--text-2); font-size: 15px; }
.fineprint { margin-top: 26px; font-size: 13px; line-height: 1.5; color: var(--text-3); }
.sub-link { margin-top: 22px; font-size: 17px; }
.sub-link a::after { content: " ›"; }

/* Privacy + details panels */
.privacy, .details { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 64px); padding: clamp(28px, 5vw, 56px); align-items: center; }
.specs { margin: 0; display: grid; gap: 0; }
.specs div { padding: 18px 0; border-top: 1px solid var(--hair); display: grid; grid-template-columns: 110px 1fr; gap: 16px; }
.specs div:first-child { border-top: 0; }
.specs dt { color: var(--text-3); font-size: 14px; font-weight: 600; padding-top: 2px; }
.specs dd { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.specs dd span { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; color: var(--text-2); letter-spacing: 0; }

/* Cards */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card { padding: clamp(26px, 3.6vw, 40px); }
.card > p:not(.eyebrow) { color: var(--text-2); }
.feature > p:not(.eyebrow) { font-size: 17px; }
.rows { list-style: none; margin: 14px 0 0; padding: 0; }
.rows li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 14px 0; border-top: 1px solid var(--hair); font-size: 16px; }
.rows li:first-child { border-top: 0; }
.pill { padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text-2); background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.08); }
.pill-ok { color: var(--ok); background: rgba(99, 211, 142, 0.1); border-color: rgba(99, 211, 142, 0.22); }
.pill-no { color: var(--no); background: rgba(255, 122, 110, 0.1); border-color: rgba(255, 122, 110, 0.22); }
.card-note { margin-top: 18px; font-size: 14px; color: var(--text-3) !important; }
.bullets { margin: 14px 0 0; padding: 0; list-style: none; }
.bullets li { position: relative; padding: 13px 0 13px 26px; border-top: 1px solid var(--hair); font-size: 16px; color: rgba(245, 245, 247, 0.88); }
.bullets li:first-child { border-top: 0; }
.bullets li::before { content: ""; position: absolute; left: 2px; top: 21px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(90, 200, 224, 0.14); }

.learn { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 26px; padding: 14px 16px; border-radius: 16px; background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(255, 255, 255, 0.07); font-size: 17px; }
.learn .from { color: var(--text-3); text-decoration: line-through; text-decoration-color: rgba(255, 122, 110, 0.6); }
.learn .to { font-weight: 600; }
.learn-actions { margin-left: auto; display: inline-flex; gap: 8px; }
.mini { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #04131a; background: linear-gradient(180deg, #e9fbff, #b9ebf5); }
.mini-plain { color: var(--text-2); background: rgba(255, 255, 255, 0.08); }
.timeline { display: flex; gap: 6px; height: 40px; margin-top: 26px; }
.timeline i { height: 100%; flex: 0 0 var(--w); border-radius: 10px; background: repeating-linear-gradient(90deg, rgba(90, 200, 224, 0.75) 0 2px, transparent 2px 5px); opacity: 0.8; mask: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent); }
.timeline i.gap { flex: 0 0 4px; background: rgba(255, 255, 255, 0.25); mask: none; border-radius: 2px; }

/* CTA + footer */
.cta { text-align: center; display: grid; justify-items: center; padding-bottom: clamp(100px, 14vw, 160px); }
.cta .sub { margin-left: auto; margin-right: auto; margin-bottom: 32px; }
.cta-icon { width: 80px; height: 80px; margin-bottom: 26px; filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.5)); }
.footer { border-top: 1px solid var(--hair); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter) 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; font-size: 13px; color: var(--text-3); }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 600; }
.footer-brand img { border-radius: 5px; }
.footer nav { display: flex; gap: 20px; }
.footer nav a { color: var(--text-2); }
.footer-fine { margin-left: auto; }

/* Privacy page */
.article { max-width: 720px; margin: 0 auto; padding: clamp(64px, 9vw, 110px) var(--gutter) clamp(90px, 12vw, 140px); }
.article h1 { font-family: var(--font-display); font-size: clamp(40px, 6vw, 64px); line-height: 1.04; letter-spacing: -0.04em; margin: 0 0 18px; }
.article h2 { font-family: var(--font-display); font-size: 24px; letter-spacing: -0.02em; margin: 44px 0 10px; }
.article p, .article li { color: var(--text-2); font-size: 17px; }
.article p + p { margin-top: 12px; }
.article ul { padding-left: 20px; margin: 10px 0 0; }
.article li + li { margin-top: 8px; }
.article strong { color: var(--text); font-weight: 600; }
.article code { font: 0.9em var(--mono); color: var(--text); background: rgba(255, 255, 255, 0.07); padding: 1px 6px; border-radius: 6px; }
.article .updated { color: var(--text-3); font-size: 14px; }

/* Scroll reveal */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .privacy, .details { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav { justify-content: space-between; }
  .hud { position: relative; right: auto; width: auto; margin: -64px 14px 0; }
  .stage { padding-bottom: 0; }
  .mode-panel { grid-template-columns: 1fr; gap: 14px; }
  .arrow { padding-top: 0; transform: rotate(90deg); justify-self: start; }
  .modes .segmented { display: grid; width: 100%; }
  .segmented button { padding: 11px 6px; font-size: 14px; }
  .specs div { grid-template-columns: 92px 1fr; }
  .footer-fine { margin-left: 0; width: 100%; }
}
@media (max-width: 420px) {
  kbd { min-width: 40px; height: 40px; font-size: 17px; }
  .learn-actions { margin-left: 0; }
  .specs div { grid-template-columns: 1fr; gap: 4px; padding: 14px 0; }
}
@media (max-width: 360px) {
  .segmented button { padding: 10px 2px; font-size: 13px; }
  .modes { padding: 18px 14px; }
}

/* Motion and transparency preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .glass, .glass-dark, .chips li { -webkit-backdrop-filter: none; backdrop-filter: none; background: #1c1c1f; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .chips li { background: rgba(28, 28, 31, 0.94); }
}

/* Print: show everything, drop decoration. */
@media print {
  .ambient, .nav-wrap, .skip-link, .stage { display: none !important; }
  body { background: #fff; color: #000; }
  .glass, .glass-dark { background: none; box-shadow: none; border: 1px solid #ccc; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .js .reveal { opacity: 1; transform: none; }
  .mode-panel[hidden] { display: grid !important; }
  .soft, .sub, .lede, .card > p, .mode-note, .fineprint, .specs dd span { color: #333 !important; }
}
