/* Gosshed landing page.
   The look is the app's own "Velvet" theme: slate faceplates, raised panels,
   sunken sockets, one orange. Tokens below mirror mobile/lib/ui/theme and
   frontend/src/index.css, so the page and the app read as one object. */

/* optional, not swap: a late font swap re-wraps the headline and shoves the
   demo window down (a layout shift). The faces used above the fold are
   preloaded in index.html, so they normally arrive before first paint. */
@font-face { font-family: Cabin; font-weight: 600; font-display: optional; src: url(assets/fonts/Cabin-600.woff2) format("woff2"); }
@font-face { font-family: Cabin; font-weight: 700; font-display: optional; src: url(assets/fonts/Cabin-700.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 400; font-display: optional; src: url(assets/fonts/Inter-400.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 500; font-display: optional; src: url(assets/fonts/Inter-500.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 600; font-display: optional; src: url(assets/fonts/Inter-600.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 700; font-display: optional; src: url(assets/fonts/Inter-700.woff2) format("woff2"); }

:root {
  --page: #23272d;
  --sunken: #1d2025;
  --panel-top: #363b43;
  --panel-bot: #2f343b;
  --edge: #1b1e23;
  --line: #454b54;
  --text: #dee2e6;
  --muted: #a3abb4;
  --dim: #9ba3ad; /* 4.5:1 or better as small text on every surface it sits on */
  --orange: #de682d;
  --orange-hi: #ef7d40;
  --orange-edge: #a8461a;
  --green: #2ecc71;
  --red: #e74c3c;

  --display: Cabin, "Trebuchet MS", system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --raised: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 0 0 1px var(--edge), 0 14px 28px -16px rgba(0, 0, 0, 0.9);
  --socket: inset 0 2px 5px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.05);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--page) var(--grain);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--orange-hi); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--orange); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 16px; }

h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.12; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 700; max-width: 16ch; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 700; max-width: 22ch; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0; }

/* ── Buttons: the app's raised keys ─────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px; border-radius: 10px;
  font: 600 1rem var(--body); text-decoration: none; white-space: nowrap;
  transition: filter 120ms, transform 120ms;
}
.btn:active { transform: translateY(1px); }
.btn-orange {
  color: #fff;
  background: linear-gradient(#e7743b, #d6612a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 0 0 1px var(--orange-edge), 0 8px 18px -8px rgba(222, 104, 45, 0.7);
}
.btn-slate {
  color: var(--text);
  background: linear-gradient(#474d55, #3e434a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 0 1px var(--edge);
}
.btn:hover { filter: brightness(1.08); }
.btn-small { padding: 9px 16px; font-size: 0.92rem; }
.btn[aria-disabled="true"] { filter: saturate(0.2) brightness(0.8); cursor: default; pointer-events: none; }

/* ── Nav ────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(#363b43, #2d3138);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 1px 0 var(--edge), 0 8px 16px -10px rgba(0, 0, 0, 0.8);
}
.nav-row { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.15rem var(--display); }
.nav nav { display: flex; gap: 24px; margin-left: auto; }
.nav nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.nav nav a:hover { color: var(--text); }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(56px, 9vw, 104px) 0 clamp(64px, 8vw, 104px);
  background:
    radial-gradient(ellipse 60% 50% at 62% 46%, rgba(222, 104, 45, 0.1), transparent 70%),
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(54, 59, 67, 0.9), transparent 70%);
}
/* The drifting network from the app's unlock screen, fading out before the
   demo window so it never competes with the terminal. */
.hero-net {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 55%, transparent 92%); mask-image: linear-gradient(#000 55%, transparent 92%);
}
.hero .wrap { position: relative; }
/* The phone app beside the headline, its foot resting on the window. The
   image is a finished mockup: frame, screen and shadow are all in it. */
.hero-phone { position: absolute; right: -4%; top: -78px; z-index: 2; width: 440px; transform: rotate(3deg); transform-origin: 50% 100%; }
.hero-phone::before { content: ""; position: absolute; inset: 12% 8%; border-radius: 50%; background: radial-gradient(closest-side, rgba(222, 104, 45, 0.28), transparent); filter: blur(30px); }
.hero-phone img { position: relative; width: 100%; height: auto; }
.lede { margin-top: 22px; max-width: 58ch; font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { margin-top: 14px; font-size: 0.9rem; color: var(--dim); }

/* The demo window: the page's one loud thing. It follows the real window:
   icon rail with the wordmark, session tabs, view toolbar, terminal, status
   bar. */
.app {
  display: grid; grid-template-columns: 92px 1fr;
  margin-top: clamp(40px, 6vw, 68px);
  border-radius: 14px; overflow: hidden;
  background: var(--page);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px var(--edge), 0 -46px 130px -34px rgba(222, 104, 45, 0.5), 0 -8px 30px -12px rgba(222, 104, 45, 0.25), 0 44px 70px -24px #000;
}
.rail {
  display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 16px 0 14px;
  background: linear-gradient(90deg, #30353c, #2b2f35);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04), 4px 0 12px -6px rgba(0, 0, 0, 0.7);
}
.lights { display: inline-flex; gap: 7px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.25); }
.lights i:nth-child(1) { background: #fe5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.rail-nav { display: grid; gap: 4px; width: 100%; padding: 12px 8px 14px; border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge); }
.rail-nav span, .rail-lock { display: grid; place-items: center; height: 31px; border-radius: 7px; color: var(--dim); }
.rail svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rail-nav .on { color: #fff; background: linear-gradient(#e7743b, #d6612a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 0 0 1px var(--orange-edge); }
/* The wordmark exactly as the app draws it in its collapsed sidebar (see
   .rail-wordmark in frontend/src/index.css): Inter bold reading bottom to
   top, sized from the rail it sits in, orange at the foot warming to gold. */
.wordmark { flex: 1; min-height: 0; width: 100%; container-type: size; }
.wordmark div { display: flex; height: 100%; flex-direction: column; align-items: center; justify-content: center; }
.wordmark span {
  display: block; writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--body); font-weight: 700; font-size: calc(min(88cqw, 17.5cqh) * 0.85);
  text-box: trim-both cap alphabetic; padding-block: 0.12em;
  letter-spacing: 0.04em; padding-inline-start: 0.04em;
  background: linear-gradient(to bottom, #ff6b35, #ff8a5f 50%, #ffd08a); -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0.5; user-select: none;
}
.rail-lock { width: calc(100% - 16px); color: #fff; background: linear-gradient(#cc4a41, #b23a31); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 0 1px #6e1d17; }

.app-main { display: grid; grid-template-rows: auto auto 1fr auto; min-width: 0; background: var(--sunken); }
.tabs { display: flex; align-items: flex-end; gap: 8px; padding: 6px 12px 0 6px; background: #262a30; }
.tab-list { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  padding: 8px 14px; border: 0; border-radius: 8px 8px 0 0; cursor: pointer;
  font: 500 0.86rem var(--body); color: var(--dim); background: transparent;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); background: linear-gradient(#3b4048, #363b43); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07); }
.tab-add { margin-left: auto; padding: 0 4px 6px; color: var(--dim); font-size: 1.1rem; }

.toolbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: linear-gradient(#363b43, #2f343b); box-shadow: 0 1px 0 var(--edge); font-size: 0.82rem; }
.seg { display: inline-flex; border-radius: 7px; box-shadow: 0 0 0 1px var(--edge); overflow: hidden; }
.seg span, .key { padding: 6px 13px; color: var(--text); background: linear-gradient(#474d55, #3e434a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset -1px 0 0 var(--edge); }
.seg .on { color: #fff; background: linear-gradient(#e7743b, #d6612a); }
.toolbar-host { margin-left: auto; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.key { border-radius: 7px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 0 1px var(--edge); }
.key.rec::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--red); }

.led {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: #4a5058; box-shadow: var(--socket);
}
.led.on { background: var(--green); box-shadow: 0 0 8px rgba(46, 204, 113, 0.75), inset 0 1px 1px rgba(255, 255, 255, 0.4); }
.led.off { background: var(--red); box-shadow: 0 0 8px rgba(231, 76, 60, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.3); }
.led.busy { background: var(--orange-hi); animation: blink 0.9s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.35; } }

.term {
  margin: 0; padding: 18px 20px; min-height: 500px; overflow: auto;
  font: 0.86rem/1.65 var(--mono); color: #d6dbe0; white-space: pre-wrap; word-break: break-word;
}
.term .dim { color: var(--dim); }
.term .ok { color: #7ee2a8; }
.term .bad { color: #ff7b6b; }
.term .cursor { display: inline-block; width: 0.6em; height: 1.1em; vertical-align: text-bottom; background: #e8743a; animation: blink 1.1s steps(2) infinite; }
.term-status {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 14px;
  font: 0.72rem var(--mono); color: var(--dim); background: #262a30; box-shadow: 0 -1px 0 var(--edge);
}
.rates { display: inline-flex; gap: 14px; }
.rates b { font-weight: 400; }
.rates .down { color: #5fd08d; }
.rates .up { color: #6ea8e8; }
.rates .down::before { content: "\2193  "; }
.rates .up::before { content: "\2191  "; }
.traffic { display: inline-flex; align-items: flex-end; gap: 8px; font-size: 0.6rem; }
.traffic i { font-style: normal; }
.traffic u { width: 64px; height: 2px; text-decoration: none; }
.traffic .in { background: #5fd08d; }
.traffic .out { background: #6ea8e8; }

/* ── Bands ──────────────────────────────────────────────────── */
.band { padding: clamp(72px, 10vw, 128px) 0; }
/* The hero already leaves room under the window for its shadow. */
.hero + .band { padding-top: clamp(16px, 3vw, 40px); }
.band-sunken { background: var(--sunken) var(--grain); box-shadow: inset 0 1px 0 var(--edge), inset 0 12px 24px -16px #000, inset 0 -1px 0 rgba(255, 255, 255, 0.04); }
.section-lede { margin-top: 16px; max-width: 60ch; color: var(--muted); font-size: 1.08rem; }

/* ── Feature tiles ──────────────────────────────────────────── */
.tiles { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; margin-top: 48px; }
.tile {
  grid-column: span 12; padding: 26px; border-radius: 14px;
  background: linear-gradient(var(--panel-top), var(--panel-bot)); box-shadow: var(--raised);
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.tile > p, .tile > div > p { color: var(--muted); font-size: 0.97rem; max-width: 52ch; }
.tile > :last-child { margin-top: auto; }
.tile-sftp { grid-column: span 7; }
.tile-monitor { grid-column: span 5; }
.tile-third { grid-column: span 4; }
.tile-wide { flex-direction: row; align-items: center; gap: 36px; }
.tile-wide > div:first-child { flex: 1 1 45%; display: grid; gap: 10px; }
.tile-wide > .player { flex: 1 1 55%; margin-top: 0; }

/* Shared look of the small demos: a socket cut into the tile. */
.sftp, .monitor, .forwards, .chain, .snippet, .player {
  margin: 14px 0 0; border-radius: 10px; background: var(--sunken); box-shadow: var(--socket);
  font: 0.8rem var(--mono); color: #c6ccd3;
}

.sftp { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--edge); overflow: hidden; }
.pane { background: var(--sunken); min-width: 0; }
.pane-path { padding: 8px 12px; color: var(--dim); background: #262a30; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane ul { list-style: none; margin: 0; padding: 6px; }
.pane li { position: relative; display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 6px; overflow: hidden; }
.pane li span { color: var(--dim); }
.pane li.dir { color: var(--text); }
.pane li.dir::before { content: ""; width: 12px; height: 9px; margin-right: 8px; border-radius: 2px; background: var(--orange); flex: none; align-self: center; }
.pane li.dir { justify-content: flex-start; }
.pane li.sel { background: rgba(222, 104, 45, 0.18); color: var(--text); }
.pane li.xfer { color: var(--text); }
.pane li.xfer b { position: absolute; left: 0; bottom: 0; height: 2px; width: var(--p); background: var(--orange-hi); }

.monitor { padding: 14px; }
.monitor-head { display: flex; justify-content: space-between; align-items: baseline; }
.monitor-head strong { font: 700 1.3rem var(--display); color: var(--text); }
#cpu-chart { display: block; width: 100%; height: 90px; margin: 8px 0 12px; }
#cpu-chart .area { fill: rgba(222, 104, 45, 0.18); }
#cpu-chart .line { fill: none; stroke: var(--orange-hi); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.meters { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.meters div { display: grid; gap: 6px; }
.meters i { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--orange) var(--p), #33383f var(--p)); }

.forwards, .chain { list-style: none; padding: 10px; }
.forwards li { display: flex; align-items: center; gap: 10px; padding: 7px 6px; }
.forwards code { color: var(--orange-hi); font: inherit; }

.chain { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 16px 12px; }
.chain li { padding: 6px 10px; border-radius: 7px; background: #2f343b; box-shadow: 0 0 0 1px var(--edge), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.chain li + li { margin-left: 26px; position: relative; }
.chain li + li::before { content: ""; position: absolute; left: -24px; top: 50%; width: 16px; height: 2px; background: var(--orange); }

.snippet { padding: 14px; line-height: 1.7; white-space: pre-wrap; }
.snippet mark { background: rgba(222, 104, 45, 0.2); color: var(--orange-hi); border-radius: 4px; padding: 1px 3px; }

.player { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.play { width: 12px; height: 16px; background: var(--orange-hi); clip-path: polygon(0 0, 100% 50%, 0 100%); flex: none; }
.scrub { flex: 1; height: 6px; border-radius: 3px; background: #33383f; }
.scrub i { display: block; width: 37%; height: 100%; border-radius: 3px; background: var(--orange); }
.time { color: var(--dim); white-space: nowrap; }
.speeds { display: inline-flex; gap: 4px; }
.speeds b { font-weight: 400; padding: 3px 7px; border-radius: 6px; color: var(--dim); }
.speeds b.on { background: #b94f1c; color: #fff; } /* darker than the brand orange: small white text needs 4.5:1 */

/* ── Screenshots ────────────────────────────────────────────── */
.shots { margin-top: 40px; }
.shot-tabs { display: inline-flex; flex-wrap: wrap; border-radius: 9px; box-shadow: 0 0 0 1px var(--edge); overflow: hidden; }
.shot-tabs button {
  padding: 10px 18px; border: 0; cursor: pointer; font: 500 0.93rem var(--body); color: var(--text);
  background: linear-gradient(#474d55, #3e434a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset -1px 0 0 var(--edge);
}
.shot-tabs button:hover { filter: brightness(1.1); }
.shot-tabs button[aria-selected="true"] { color: #fff; background: linear-gradient(#e7743b, #d6612a); }
.shots figure { margin: 26px 0 0; }
/* A box shadow, not a drop-shadow filter: the filter was painted unreliably
   while the image was still loading or being swapped. The radius follows the
   window corners baked into the screenshots. */
.shots img { display: block; width: 100%; height: auto; border-radius: clamp(4px, 0.7vw, 8px); box-shadow: 0 0 0 1px var(--edge), 0 34px 60px -18px rgba(0, 0, 0, 0.85); }
.shots figcaption { margin-top: 18px; color: var(--muted); font-size: 0.97rem; max-width: 62ch; }

/* ── Sync ───────────────────────────────────────────────────── */
.sync { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.steps { margin: 30px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 18px; max-width: 52ch; }
.steps li { counter-increment: step; position: relative; padding-left: 50px; min-height: 34px; color: var(--muted); }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -3px;
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  font: 700 0.95rem var(--display); color: var(--orange-hi); background: var(--page); box-shadow: var(--socket);
}
.steps strong { color: var(--text); font-weight: 600; }

.sync-art { position: relative; min-height: 570px; }
.offer {
  display: flex; gap: 18px; align-items: center; padding: 18px; border-radius: 14px; max-width: 400px;
  background: linear-gradient(var(--panel-top), var(--panel-bot)); box-shadow: var(--raised);
}
.qr { flex: none; width: 138px; height: 138px; padding: 9px; border-radius: 9px; background: #fff; display: grid; }
.qr i { background: #111; }
.offer-text { display: grid; gap: 3px; min-width: 0; font-size: 0.78rem; color: var(--dim); }
.offer-text code { font: 0.86rem var(--mono); color: var(--text); margin-bottom: 8px; }
.offer-text strong { font: 700 1.25rem var(--mono); letter-spacing: 0.08em; color: var(--orange-hi); }
.phone {
  position: absolute; right: 6%; top: 196px; width: 182px; aspect-ratio: 9 / 18.5; padding: 8px; border-radius: 30px;
  background: linear-gradient(#474d55, #2f343b); box-shadow: var(--raised), 0 30px 50px -20px #000;
}
.phone-screen { height: 100%; border-radius: 24px; background: #0f1114; display: grid; grid-template-rows: 1fr auto; overflow: hidden; }
.finder { display: grid; place-items: center; }
.finder i {
  width: 62%; aspect-ratio: 1; border-radius: 14px;
  background:
    linear-gradient(var(--orange-hi), var(--orange-hi)) 0 0 / 26px 3px, linear-gradient(var(--orange-hi), var(--orange-hi)) 0 0 / 3px 26px,
    linear-gradient(var(--orange-hi), var(--orange-hi)) 100% 0 / 26px 3px, linear-gradient(var(--orange-hi), var(--orange-hi)) 100% 0 / 3px 26px,
    linear-gradient(var(--orange-hi), var(--orange-hi)) 0 100% / 26px 3px, linear-gradient(var(--orange-hi), var(--orange-hi)) 0 100% / 3px 26px,
    linear-gradient(var(--orange-hi), var(--orange-hi)) 100% 100% / 26px 3px, linear-gradient(var(--orange-hi), var(--orange-hi)) 100% 100% / 3px 26px;
  background-repeat: no-repeat;
}
.phone-screen p { padding: 12px 14px 18px; font-size: 0.7rem; line-height: 1.45; text-align: center; color: #cfd4da; background: rgba(0, 0, 0, 0.6); }

/* ── Security: a spec sheet, not a pitch ────────────────────── */
.specs { margin: 48px 0 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(28px, 5vw, 72px); }
.specs div { display: grid; grid-template-columns: 11.5rem 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.specs dt { font: 600 1rem var(--display); color: var(--text); }
.specs dd { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* ── Download ───────────────────────────────────────────────── */
.mirror { margin-top: 36px; }
.mirror > p { font-size: 0.93rem; color: var(--muted); }
.mirror-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mirror-list button {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 9px 14px; border: 0; border-radius: 9px; cursor: pointer;
  font: 500 0.93rem var(--body); color: var(--text);
  background: linear-gradient(#474d55, #3e434a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 0 1px var(--edge);
}
.mirror-list button small { font: 0.74rem var(--mono); color: var(--dim); }
.mirror-list button:hover { filter: brightness(1.1); }
.mirror-list button[aria-checked="true"] { color: #fff; background: linear-gradient(#e7743b, #d6612a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 0 0 1px var(--orange-edge); }
.mirror-list button[aria-checked="true"] small { color: rgba(255, 255, 255, 0.8); }

.mirror-note { margin-top: 10px; font-size: 0.88rem; color: var(--dim); }
.section-lede a { color: var(--orange-hi); text-underline-offset: 3px; }

.downloads { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.downloads li {
  display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 14px;
  background: linear-gradient(var(--panel-top), var(--panel-bot)); box-shadow: var(--raised);
}
/* The visitor's own platform: the same orange ring a selected item gets in the app. */
.downloads li.own { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 0 0 1px var(--orange-edge), 0 0 0 4px rgba(222, 104, 45, 0.22), 0 14px 28px -16px rgba(0, 0, 0, 0.9); }
.dl-head { display: flex; align-items: center; gap: 14px; }
/* The platform mark in a sunken socket, like a host's icon in the app. */
.dl-mark { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 12px; background: var(--sunken); box-shadow: var(--socket); color: var(--text); }
.dl-mark svg { width: 26px; height: 26px; fill: currentColor; }
.downloads li.own .dl-mark { color: var(--orange-hi); }
.downloads b { display: block; font: 700 1.45rem/1.1 var(--display); }
.downloads em { display: block; margin-top: 4px; font: 500 0.78rem var(--body); color: var(--orange-hi); }
.downloads p { color: var(--muted); font-size: 0.9rem; line-height: 1.45; min-height: 2.9em; margin-bottom: 4px; }
/* One button per build: its name on the left, the file type on the right. */
.downloads .btn { justify-content: space-between; gap: 12px; padding: 12px 16px; font-size: 0.95rem; }
.downloads .btn small { font: 0.74rem var(--mono); opacity: 0.8; }

/* A note under the downloads: what to do when macOS refuses to open the app. */
.notice {
  display: flex; gap: 16px; align-items: flex-start; margin-top: 22px; padding: 20px 22px; border-radius: 14px;
  background: linear-gradient(var(--panel-top), var(--panel-bot)); box-shadow: var(--raised);
}
.notice-mark { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 11px; background: var(--sunken); box-shadow: var(--socket); color: #f1c40f; }
.notice-mark svg, .copy svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notice-body { min-width: 0; flex: 1; }
.notice h3 { font-size: 1.1rem; }
.notice p { margin-top: 4px; color: var(--muted); font-size: 0.95rem; max-width: 68ch; }
/* The command in a socket, with the copy key at its end. */
.command { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 12px; max-width: 520px; padding: 6px 6px 6px 14px; border-radius: 10px; background: var(--sunken); box-shadow: var(--socket); }
.command code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font: 0.9rem var(--mono); color: var(--text); padding: 6px 0; }
.copy {
  display: grid; place-items: center; width: 38px; height: 36px; flex: none; border: 0; border-radius: 8px; cursor: pointer; color: var(--text);
  background: linear-gradient(#474d55, #3e434a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 0 1px var(--edge);
}
.copy:hover { filter: brightness(1.12); }
.copy svg { width: 18px; height: 18px; }
.copy .icon-done { display: none; color: var(--green); }
.copy.done .icon-copy { display: none; }
.copy.done .icon-done { display: block; }
.copy-status { position: absolute; right: 54px; top: 50%; transform: translateY(-50%); padding: 2px 8px; border-radius: 6px; font-size: 0.8rem; color: var(--green); background: var(--sunken); }
.copy-status:empty { display: none; }

/* ── Changelog ──────────────────────────────────────────────── */
.changelog-layout { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.changelog-head { position: sticky; top: 92px; }
.changelog { border-bottom: 1px solid var(--line); }
.changelog details { border-top: 1px solid var(--line); }
.changelog summary {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; padding: 18px 0; cursor: pointer; list-style: none;
}
.changelog summary::-webkit-details-marker { display: none; }
.changelog summary::after { content: "+"; margin-left: 14px; width: 1ch; color: var(--orange-hi); font: 600 1.2rem var(--display); }
.changelog details[open] > summary::after { content: "\2212"; }
.changelog .ver { font: 700 1.3rem var(--display); }
.changelog .ver-note { color: var(--dim); font-size: 0.9rem; }
.changelog time { margin-left: auto; color: var(--dim); font-size: 0.9rem; }
.changelog ul { margin: 0; padding: 0 0 22px; list-style: none; display: grid; gap: 10px; }
.changelog li { color: var(--muted); font-size: 0.96rem; max-width: 76ch; }
.changelog li b { margin-right: 6px; color: var(--orange-hi); font-weight: 600; }

/* ── Footer ─────────────────────────────────────────────────── */
.footer { padding: 28px 0; box-shadow: inset 0 1px 0 var(--edge); }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer p { color: var(--dim); font-size: 0.88rem; }
.footer .brand { font-size: 1rem; }

/* ── Narrow screens ─────────────────────────────────────────── */
@media (max-width: 1040px) {
  .hero-phone { display: none; }
}
@media (max-width: 900px) {
  .tile-sftp, .tile-monitor, .tile-third { grid-column: span 12; }
  .tile-wide { flex-direction: column; align-items: stretch; gap: 10px; }
  .sync { grid-template-columns: 1fr; }
  .specs { grid-template-columns: 1fr; }
  .downloads { grid-template-columns: repeat(2, 1fr); }
  .changelog-layout { grid-template-columns: 1fr; }
  .changelog-head { position: static; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .nav nav { display: none; }
  .nav-row { justify-content: space-between; }
  .app { grid-template-columns: 1fr; }
  .rail, .toolbar-host, .key, .traffic { display: none; }
  .term { min-height: 300px; font-size: 0.78rem; }
  .specs div { grid-template-columns: 1fr; gap: 4px; }
  .sync-art { min-height: 0; display: grid; gap: 20px; justify-items: center; }
  .phone { position: static; }
  .player { flex-wrap: wrap; }
  .chain { flex-wrap: nowrap; overflow-x: auto; }
  .chain li + li { margin-left: 20px; }
  .chain li + li::before { left: -19px; width: 12px; }
  .pane li:not(.xfer) span { display: none; }
  .scrub { flex-basis: 100%; order: 3; }
  .downloads { grid-template-columns: 1fr; }
  .notice { padding: 18px; gap: 12px; }
  .notice-mark { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
