/* Keywhere website. Colours are the app's own tokens (crates/keywhere-app/src/theme.rs). */

@font-face {
  font-family: "Inter";
  src: url("./fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("./fonts/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("./fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("./fonts/Inter-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  /* light */
  --bg: #f3f6fb;
  --surface: #e8edf6;
  --panel: #ffffff;
  --raised: #e2e8f3;
  --border: #c5d0e4;
  --line: #d9e0ec;
  --text: #14213d;
  --text-soft: #2c3e63;
  --muted: #58698f;
  --dim: #7b8baa;
  --accent: #e39a1f;
  --accent-ink: #2a1a00;
  --accent-text: #8f5800; /* amber dark enough for small text on light backgrounds */
  --accent-display: #bc7508; /* large headings only: 3:1 on --bg and --surface */
  --focus: #2f6bea;
  --selection: #d3e0f8;
  --link: #2459c8;
  --ok: #1e9a60;
  --warn: #a86a12;
  --warn-text: #8a5508; /* AA for small text */
  --ok-text: #13774a;
  --danger: #c23a3a;
  --shadow: 0 1px 2px rgb(20 33 61 / 6%), 0 18px 50px -12px rgb(20 33 61 / 22%);
  --glow: rgb(227 154 31 / 22%);
  --map-dot: rgb(36 89 200 / 14%);
  --code-bg: #e2e8f3;

  --radius: 14px;
  --radius-sm: 9px;
  --wrap: 1140px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1631;
    --surface: #0f2042;
    --panel: #132852;
    --raised: #1a3464;
    --border: #23427a;
    --line: #1b3560;
    --text: #e7edf9;
    --text-soft: #c9d5ee;
    --muted: #8ea3cb;
    --dim: #6077a3;
    --accent: #f2b24c;
    --accent-text: #f2b24c;
    --accent-display: #f2b24c;
    --focus: #5b8cff;
    --selection: #244a8f;
    --link: #8fb2ff;
    --ok: #4fd69c;
    --warn: #f7c04a;
    --warn-text: #f7c04a;
    --ok-text: #4fd69c;
    --danger: #ff7a7a;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 24px 60px -16px rgb(2 8 24 / 70%);
    --glow: rgb(242 178 76 / 18%);
    --map-dot: rgb(143 178 255 / 13%);
    --code-bg: #0a1631;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1631;
  --surface: #0f2042;
  --panel: #132852;
  --raised: #1a3464;
  --border: #23427a;
  --line: #1b3560;
  --text: #e7edf9;
  --text-soft: #c9d5ee;
  --muted: #8ea3cb;
  --dim: #6077a3;
  --accent: #f2b24c;
  --accent-text: #f2b24c;
  --accent-display: #f2b24c;
  --focus: #5b8cff;
  --selection: #244a8f;
  --link: #8fb2ff;
  --ok: #4fd69c;
  --warn: #f7c04a;
  --warn-text: #f7c04a;
  --ok-text: #4fd69c;
  --danger: #ff7a7a;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 24px 60px -16px rgb(2 8 24 / 70%);
  --glow: rgb(242 178 76 / 18%);
  --map-dot: rgb(143 178 255 / 13%);
  --code-bg: #0a1631;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss01";
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0 0 1em;
}

code,
kbd,
pre {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  font-size: 0.86em;
}
code {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.05em 0.35em;
  overflow-wrap: anywhere;
}
kbd {
  display: inline-block;
  min-width: 1.7em;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 0.05em 0.4em;
  font-size: 0.8em;
  line-height: 1.5;
  color: var(--text-soft);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
}
.skip:focus {
  top: 12px;
}

/* Theme-specific images: only the matching one is displayed (and so loaded). */
.for-light {
  display: none;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .for-dark {
    display: none;
  }
  :root:not([data-theme]) .for-light {
    display: block;
  }
}
:root[data-theme="light"] .for-dark {
  display: none;
}
:root[data-theme="light"] .for-light {
  display: block;
}

/* ── Top bar ────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.wordmark {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
}
.wordmark span {
  color: var(--accent-text);
}
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--surface);
}
.nav-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-switch {
  display: flex;
  padding: 3px;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.theme-switch button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.theme-switch button:hover {
  color: var(--text);
}
.theme-switch button[aria-pressed="true"] {
  background: var(--panel);
  color: var(--accent-text);
  box-shadow: 0 1px 2px rgb(0 0 0 / 18%);
}
.theme-switch svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-gh {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-gh:hover {
  color: var(--text);
}
.nav-gh svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  padding-top: 72px;
  isolation: isolate;
}
/* "Where" — a quiet map grid behind the hero, fading out. */
.hero-map {
  position: absolute;
  inset: 0 0 30% 0;
  z-index: -1;
  background-image: radial-gradient(var(--map-dot) 1.2px, transparent 1.4px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, #000 30%, transparent 75%);
}
.hero-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px 5px 10px;
  margin-bottom: 26px;
}
.pin {
  width: 10px;
  height: 10px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--glow);
}
.hero h1 {
  font-size: clamp(2.4rem, 6.2vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  max-width: 15ch;
  text-wrap: balance;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent-display);
}
.lede {
  max-width: 40em;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--text-soft);
  margin: 22px 0 34px;
  text-wrap: pretty;
}
.lede code {
  font-size: 0.85em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  border-radius: 12px;
  padding: 12px 22px 12px 18px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-align: left;
}
.btn svg {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.btn-meta {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.78;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 28px -8px var(--glow), inset 0 -2px 0 rgb(0 0 0 / 12%);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 34px -8px var(--glow), inset 0 -2px 0 rgb(0 0 0 / 12%);
}
.btn-ghost {
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--raised);
}
.cta-status {
  min-height: 1.5em;
  margin: 14px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.facts {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  color: var(--muted);
  font-size: 0.9rem;
}
.facts li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.facts li::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: none;
  background: var(--ok);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.hero-shot {
  margin-top: 56px;
  position: relative;
}
.hero-shot::before {
  content: "";
  position: absolute;
  inset: 10% 12% -6%;
  z-index: -1;
  background: radial-gradient(ellipse at 50% 40%, var(--glow), transparent 70%);
  filter: blur(30px);
}

.window-frame {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--panel);
}
.window-frame img {
  width: 100%;
  height: auto;
}
.window-frame figcaption {
  padding: 12px 18px;
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.status-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  width: calc(100% - 48px);
  max-width: 900px;
  margin-top: 40px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--warn) 6%, var(--bg));
}
.status-note p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  padding: 14px 18px 14px 0;
}
.status-dot {
  flex: none;
  width: 10px;
  height: 10px;
  margin: 22px 0 0 18px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 20%, transparent);
}

/* ── Sections ───────────────────────────────────────────── */
.section {
  padding-block: 104px;
}
.section-tint {
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.section-head {
  max-width: 46em;
  margin-bottom: 48px;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-text);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.section-head h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 700;
  text-wrap: balance;
}
.section-lede {
  margin: 16px 0 0;
  color: var(--text-soft);
  font-size: 1.08rem;
}

/* Pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.pillar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px 22px;
}
.pillar-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent-text);
  margin-bottom: 18px;
}
.pillar-icon svg,
.ficon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pillar h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.pillar p {
  color: var(--text-soft);
  font-size: 0.98rem;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.feature {
  background: var(--panel);
  padding: 24px 24px 10px;
}
.feature h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.04rem;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.ficon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--raised);
  color: var(--link);
}
.ficon svg {
  width: 19px;
  height: 19px;
}
.feature p {
  color: var(--text-soft);
  font-size: 0.95rem;
}

/* Gallery */
.gallery {
  margin-top: 72px;
}
.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 22px;
}
.gallery-tabs button {
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 7px 16px;
  cursor: pointer;
}
.gallery-tabs button:hover {
  color: var(--text);
  background: var(--panel);
}
.gallery-tabs button[aria-selected="true"] {
  color: var(--text);
  background: var(--panel);
  border-color: var(--border);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.gallery-note {
  text-align: center;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Story */
.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.story-text p {
  color: var(--text-soft);
  font-size: 1.06rem;
}
.story-text .story-lead {
  font-size: 1.35rem;
  line-height: 1.45;
  color: var(--text);
  letter-spacing: -0.01em;
}
.story-lead strong {
  color: var(--accent-text);
}
.story-sign {
  font-weight: 600;
  color: var(--muted) !important;
}
.story-side {
  position: sticky;
  top: 96px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.story-side h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}
.story-side p {
  color: var(--text-soft);
  font-size: 0.96rem;
}
.ticks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.ticks li {
  position: relative;
  padding-left: 28px;
  font-size: 0.94rem;
  color: var(--text-soft);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ok) 20%, transparent);
  box-shadow: inset 0 0 0 5px color-mix(in srgb, var(--ok) 0%, transparent);
}
.ticks li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: calc(0.3em + 5px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

/* Why GPUI */
.gpui-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.gpui-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  overflow: hidden;
}
.gpui-num {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-text);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.gpui-card h3 {
  font-size: 1.16rem;
  margin-bottom: 10px;
}
.gpui-card p {
  color: var(--text-soft);
  font-size: 0.97rem;
  margin: 0;
}
.tradeoffs {
  margin-top: 22px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 22px 26px 8px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 8px 26px;
}
.tradeoffs h3 {
  font-size: 1.05rem;
  padding-top: 2px;
}
.tradeoffs ul {
  margin: 0;
  padding: 0 0 0 1.1em;
  color: var(--text-soft);
  font-size: 0.97rem;
}
.tradeoffs li {
  margin-bottom: 10px;
}
.tradeoffs li::marker {
  color: var(--dim);
}

/* Security */
.sec-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.sec-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 30px;
}
.sec-list li {
  position: relative;
  padding-left: 18px;
  border-left: 2px solid var(--line);
  color: var(--text-soft);
  font-size: 0.95rem;
}
.sec-list li strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 4px;
}
.sec-list li:hover {
  border-left-color: var(--accent);
}
.sec-limits {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.sec-limits h3 {
  font-size: 1.08rem;
  margin-bottom: 14px;
}
.sec-limits ul {
  margin: 0 0 18px;
  padding-left: 1.1em;
  color: var(--text-soft);
  font-size: 0.95rem;
}
.sec-limits li {
  margin-bottom: 8px;
}
.sec-limits li::marker {
  color: var(--danger);
}
.sec-links {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* Download */
.dl-version {
  color: var(--accent-display);
}
.platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: start;
}
.platform {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.platform.is-yours {
  border-color: color-mix(in srgb, var(--accent) 65%, var(--line));
  box-shadow: 0 0 0 4px var(--glow);
}
.platform-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.os-icon {
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 11px;
  background: var(--raised);
  color: var(--text-soft);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  flex: none;
}
.platform h3 {
  font-size: 1.2rem;
}
.platform-sub {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
/* Sits on the card's top border, so it never changes the header's height and the three
   file lists stay level. Opaque, because the border runs behind it. */
.yours-badge {
  position: absolute;
  top: -11px;
  right: 18px;
  white-space: nowrap;
  background: color-mix(in srgb, var(--ok) 16%, var(--panel));
}
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 1px 8px;
  line-height: 1.6;
  vertical-align: 1px;
}
.tag-accent {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent-text);
}
.tag-warn {
  background: color-mix(in srgb, var(--warn) 16%, transparent);
  color: var(--warn-text);
}
.tag-ok {
  background: color-mix(in srgb, var(--ok) 16%, transparent);
  color: var(--ok-text);
}
.files {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.file-link {
  display: grid;
  gap: 2px;
  padding: 12px 14px 12px 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  text-decoration: none;
  color: var(--text);
  position: relative;
  transition: border-color 0.15s, background 0.15s;
}
.file-link::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 15px;
  width: 18px;
  height: 18px;
  background: var(--accent-text);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 3v10M5.5 9 10 13.5 14.5 9M4 16.5h12' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 3v10M5.5 9 10 13.5 14.5 9M4 16.5h12' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.file-link:hover {
  border-color: var(--accent);
  background: var(--panel);
}
.file-kind {
  font-weight: 600;
  font-size: 0.98rem;
}
.file-desc {
  font-size: 0.86rem;
  color: var(--text-soft);
}
.file-name {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 0.74rem;
  color: var(--muted);
  overflow-wrap: anywhere;
  margin-top: 3px;
}
.file-meta {
  font-size: 0.76rem;
  color: var(--muted);
}
.sums {
  margin: 0 0 12px;
  font-size: 0.86rem;
}
.sums summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 500;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sums summary::-webkit-details-marker {
  display: none;
}
.sums summary::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--dim);
  border-bottom: 2px solid var(--dim);
  transform: rotate(-45deg);
  transition: transform 0.2s;
}
.sums[open] summary::before {
  transform: rotate(45deg);
}
.sums summary:hover {
  color: var(--text);
}
.sums dl {
  margin: 8px 0 0;
  display: grid;
  gap: 8px;
}
.sums dt {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-soft);
}
.sums dd {
  margin: 0;
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--muted);
  overflow-wrap: anywhere;
  user-select: all;
}
.platform-note {
  font-size: 0.86rem;
  color: var(--warn-text);
  margin: 0 0 12px;
}

.howto {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-size: 0.92rem;
  color: var(--text-soft);
}
.howto summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.howto summary::-webkit-details-marker {
  display: none;
}
.howto summary::before,
.faq summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.2s;
  flex: none;
}
.howto[open] summary::before {
  transform: rotate(45deg);
}
.howto[open] summary {
  margin-bottom: 10px;
}
.howto p {
  margin: 10px 0 8px;
}

.cmd {
  position: relative;
  margin: 0 0 8px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  font-size: 0.8rem;
  line-height: 1.55;
}
/* The code scrolls if it must, not the pre, so the copy button stays pinned to the right edge. */
.cmd code {
  display: block;
  overflow-x: auto;
  background: none;
  border: 0;
  margin-right: 40px; /* scroll area stops short of the copy button */
  padding: 10px 4px 10px 12px;
  font-size: inherit;
  /* Wrap, so every command shows its full file name (the Windows ones differ only at the end). */
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.copy-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
}
.copy-btn:hover {
  color: var(--text);
  border-color: var(--border);
}
.copy-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.copy-btn .icon-done,
.copy-btn.is-done .icon-copy {
  display: none;
}
.copy-btn.is-done .icon-done {
  display: block;
}
.copy-btn.is-done {
  color: var(--ok-text);
}

.verify {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 26px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
}
.verify h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}
.verify p {
  color: var(--text-soft);
  font-size: 0.95rem;
  margin-bottom: 12px;
}
.verify .cmd {
  margin: 0 0 10px;
}
.verify .cmd:last-child {
  margin-bottom: 0;
}
.verify-text > div[data-types]:not([hidden]) ~ div[data-types] {
  margin-top: 10px;
}
.verify .cmd-label {
  margin: 0 0 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}
.verify-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  font-weight: 500;
}
.verify-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.verify-links a::after {
  content: "→";
  transition: transform 0.15s;
}
.verify-links a:hover::after {
  transform: translateX(3px);
}
/* Files of a release that aren't downloads for people, plus any file type this page doesn't know yet. */
.other-files {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-size: 0.88rem;
}
.other-files summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 500;
}
.other-files summary:hover {
  color: var(--text);
}
.other-files ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.other-files a {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}
.other-desc {
  display: block;
  color: var(--muted);
}

/* Shortcuts */
.keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
}
.keys > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
}
.keys dt {
  font-size: 0.92rem;
  color: var(--muted);
}
.keys dd {
  margin: 0;
  font-weight: 500;
}

/* FAQ */
.faq-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 48px;
}
.faq {
  border-top: 1px solid var(--border);
}
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 20px 4px;
  font-weight: 600;
  font-size: 1.04rem;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  transform: rotate(45deg);
  margin-right: 6px;
}
.faq details[open] summary::after {
  transform: rotate(-135deg);
}
.faq summary:hover {
  color: var(--accent-text);
}
.faq details p {
  color: var(--text-soft);
  padding: 0 4px 10px;
  margin-top: -4px;
}

/* Footer */
.footer {
  padding: 56px 0 64px;
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px 40px;
  align-items: center;
}
.footer-brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.footer-sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  justify-content: flex-end;
  font-size: 0.92rem;
}
.footer-links a {
  color: var(--text-soft);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}
.footer-note {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}
.footer-note a {
  color: var(--muted);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 980px) {
  .nav-links {
    display: none;
  }
  .pillars,
  .gpui-grid,
  .platforms {
    grid-template-columns: 1fr;
  }
  .story-grid,
  .sec-grid,
  .faq-wrap,
  .verify {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .story-side {
    position: static;
  }
  .keys {
    grid-template-columns: repeat(2, 1fr);
  }
  .platforms {
    max-width: 620px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .wrap {
    padding-inline: 16px;
  }
  .nav {
    gap: 12px;
  }
  .nav-gh span {
    display: none;
  }
  .hero {
    padding-top: 44px;
  }
  .eyebrow {
    font-size: 0.8rem;
    text-align: left;
  }
  .cta-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .btn {
    justify-content: flex-start;
  }
  .facts {
    display: grid;
    justify-content: center;
    text-align: left;
  }
  .hero-shot {
    margin-top: 36px;
  }
  .section {
    padding-block: 72px;
  }
  .section-head {
    margin-bottom: 32px;
  }
  .sec-list {
    grid-template-columns: 1fr;
  }
  .tradeoffs {
    grid-template-columns: 1fr;
    padding: 20px 20px 6px;
  }
  .keys {
    grid-template-columns: 1fr;
  }
  .status-note {
    width: calc(100% - 32px);
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .footer-links {
    justify-content: flex-start;
  }
  .features {
    grid-template-columns: 1fr;
  }
}

/* Grid children may shrink below their content (long commands scroll inside their box). */
.verify > *,
.platforms > *,
.sec-grid > *,
.story-grid > *,
.faq-wrap > * {
  min-width: 0;
}
