/* Krishna Flow marketing site
   Design tokens, base styles and components. No framework, no build step. */

/* ---------- Tokens ---------- */
:root {
  /* Brand gradient (from Tools/icon.swift): deep indigo to violet */
  --indigo: #3B2FA3;
  --violet: #7B4DFF;
  --gradient-brand: linear-gradient(135deg, var(--indigo), var(--violet));
  /* Text/icon-safe accent: indigo reads at 9.2:1 on the light ground, a
     lifted violet at 6.9:1 on the dark ground. --violet itself stays for
     the gradient, buttons and tints, where it sits on its own background. */
  --accent-text: var(--indigo);

  /* Light surface */
  --ground: #F7F6FB;
  --surface: #FFFFFF;
  --surface-raised: #FFFFFF;
  --ink: #1C1A2E;
  --muted: #5F5B78;
  --border: rgba(28, 26, 46, 0.10);
  --border-strong: rgba(28, 26, 46, 0.16);

  --shadow-sm: 0 1px 2px rgba(28, 26, 46, 0.06), 0 1px 1px rgba(28, 26, 46, 0.04);
  --shadow-md: 0 12px 28px -16px rgba(59, 47, 163, 0.28), 0 2px 6px rgba(28, 26, 46, 0.06);
  --shadow-lg: 0 24px 48px -20px rgba(59, 47, 163, 0.32), 0 4px 10px rgba(28, 26, 46, 0.06);

  --focus-ring: 0 0 0 3px rgba(123, 77, 255, 0.45);

  /* Status colours: used sparingly, for form feedback only. */
  --danger: #C0392B;
  --success: #12805B;

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --container: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-pad: clamp(4rem, 9vw, 7.5rem);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #131220;
    --surface: #1A1830;
    --surface-raised: #201D3B;
    --ink: #F3F1FB;
    --muted: #A7A1C7;
    --border: rgba(243, 241, 251, 0.10);
    --border-strong: rgba(243, 241, 251, 0.18);
    --accent-text: #A88CFF;
    --danger: #FF8A75;
    --success: #7CF2C0;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 16px 32px -18px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 28px 56px -20px rgba(0, 0, 0, 0.65), 0 4px 12px rgba(0, 0, 0, 0.3);

    color-scheme: dark;
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select { font: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Base ---------- */
body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--violet); color: #fff; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { color: var(--muted); max-width: 62ch; }

:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 1rem;
  background: var(--ink);
  color: var(--ground);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  z-index: 100;
  transition: top 0.15s ease;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.skip-link:focus { top: 1rem; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { padding-block: var(--section-pad); }

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); margin-bottom: 0.85rem; }
.section-head p { font-size: clamp(1rem, 1.4vw, 1.15rem); }

.label-mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

kbd {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 0.12em 0.5em;
  color: var(--ink);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  border: 1px solid transparent;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: var(--accent-text); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}

.btn-disabled {
  background: var(--surface);
  color: var(--muted);
  border-color: var(--border);
  cursor: not-allowed;
  opacity: 0.75;
}

.btn-sm { padding: 0.6rem 1.15rem; font-size: 0.9rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
}
.logo-mark { width: 34px; height: 34px; border-radius: 22.5%; flex-shrink: 0; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
}
.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--ink); }

.nav-actions { display: flex; align-items: center; gap: 0.85rem; }

.nav-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 2px;
  background: var(--ink);
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle::before { transform: translate(-50%, calc(-50% - 6px)); }
.nav-toggle::after { transform: translate(-50%, calc(-50% + 6px)); }
.nav-toggle[aria-expanded="true"] span { opacity: 0; }
.nav-toggle[aria-expanded="true"]::before { transform: translate(-50%, -50%) rotate(45deg); }
.nav-toggle[aria-expanded="true"]::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(3.5rem, 8vw, 6rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
.hero-title {
  font-size: clamp(2.4rem, 5.4vw, 4rem);
  max-width: 16ch;
}
.hero-sub {
  margin-top: 1.35rem;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  max-width: 46ch;
  color: var(--muted);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.25rem;
}
.hero-note {
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.hero-note a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }

.hero-visual {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--gradient-brand);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  min-height: clamp(260px, 32vw, 380px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 20% 0%, rgba(255, 255, 255, 0.22), transparent 60%);
  pointer-events: none;
}

.hero-wave {
  position: relative;
  z-index: 1;
  width: 100%;
  height: clamp(120px, 16vw, 190px);
  display: flex;
  align-items: center;
  gap: clamp(4px, 0.9vw, 8px);
}
.hero-wave span {
  flex: 1 1 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.94);
  border-radius: var(--radius-pill);
  transform: scaleY(var(--base, 0.4));
  transform-origin: center;
  animation: wave-pulse 1.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
@keyframes wave-pulse {
  0%, 100% { transform: scaleY(var(--base, 0.4)); }
  50% { transform: scaleY(calc(var(--base, 0.4) * 0.45 + 0.1)); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-wave span { animation: none; transform: scaleY(var(--base, 0.4)); }
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2rem);
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(1.5rem, 2.4vw, 2rem);
  box-shadow: var(--shadow-sm);
}
.step-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #fff;
  background: var(--gradient-brand);
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.step h3 { font-size: 1.2rem; margin-bottom: 0.55rem; }
.step p { font-size: 0.98rem; }

/* ---------- Features (bento grid) ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: clamp(1.25rem, 2.5vw, 1.5rem);
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(1.5rem, 2.6vw, 2.15rem);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.feature-card--wide { grid-column: span 2; }
.feature-icon {
  width: 2.6rem;
  height: 2.6rem;
  color: var(--accent-text);
}
.feature-icon svg { width: 100%; height: 100%; }
.feature-card h3 { font-size: 1.15rem; }
.feature-card p { font-size: 0.96rem; max-width: 42ch; }
.feature-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.feature-langs span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink);
  background: var(--ground);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.7rem;
}

/* ---------- See it ---------- */
.see-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}
.see-copy h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: 0.9rem; }
.see-copy p { font-size: 1.05rem; }

.pill-mock {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 0.85rem 1.35rem 0.85rem 1.1rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 1.5rem;
}
.pill-mock .pill-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  width: 64px;
}
.pill-mock .pill-wave span {
  flex: 1;
  background: linear-gradient(var(--violet), var(--indigo));
  border-radius: var(--radius-pill);
  height: 100%;
  transform: scaleY(var(--base, 0.5));
}
.pill-mock .pill-status {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.pill-mock .pill-check {
  width: 16px;
  height: 16px;
  color: #7CF2C0;
}

.transcript {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.transcript-row {
  padding: clamp(1.25rem, 2.5vw, 1.75rem) clamp(1.5rem, 3vw, 2rem);
}
.transcript-row + .transcript-row { border-top: 1px solid var(--border); }
.transcript-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 0.65rem;
}
.transcript-before {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted);
}
.transcript-after {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}
.transcript-after mark {
  background: transparent;
  color: var(--accent-text);
  font-weight: 700;
}

/* ---------- Platforms ---------- */
/* One divided strip rather than four repeated cards, so the page doesn't
   read as "card grid, card grid, card grid" three sections running. */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.platform {
  padding: clamp(1.75rem, 3vw, 2.25rem) 1.25rem;
  text-align: center;
  border-right: 1px solid var(--border);
}
.platform:last-child { border-right: none; }
.platform-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-inline: auto;
  margin-bottom: 1rem;
  color: var(--ink);
}
.platform-icon svg { width: 100%; height: 100%; }
.platform h3 { font-size: 1.02rem; margin-bottom: 0.3rem; }
.platform p { font-size: 0.86rem; margin-inline: auto; }
.badge-soon {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent-text);
  background: color-mix(in srgb, var(--violet) 14%, transparent);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.65rem;
}

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 3vw, 2rem);
  align-items: stretch;
}
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.price-card--featured {
  border-color: transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--gradient-brand) border-box;
  border: 2px solid transparent;
  box-shadow: var(--shadow-lg);
}
.price-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.price-name { font-size: 1.15rem; font-family: var(--font-display); font-weight: 700; }
.price-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent-text);
  background: color-mix(in srgb, var(--violet) 14%, transparent);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.6rem;
  white-space: nowrap;
}
.price-desc { font-size: 0.95rem; margin-bottom: 1.5rem; }
.price-amounts { margin-bottom: 1.5rem; }
.price-amount {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--ink);
}
.price-period { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); }
.price-or {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.4rem;
}
.price-features { margin-bottom: 1.75rem; display: flex; flex-direction: column; gap: 0.7rem; }
.price-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--ink);
}
.price-features svg { width: 1.1rem; height: 1.1rem; color: var(--accent-text); flex-shrink: 0; margin-top: 0.15rem; }
.price-cta { margin-top: auto; }
.price-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 1.25rem;
  text-align: center;
}

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; max-width: 52rem; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .faq-icon {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  color: var(--accent-text);
  transition: transform 0.2s ease;
}
.faq-item[open] summary .faq-icon { transform: rotate(45deg); }
.faq-item .faq-body {
  padding: 0 1.5rem 1.35rem;
  font-size: 0.98rem;
  color: var(--muted);
  max-width: 60ch;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2.5rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}
.footer-brand .logo { margin-bottom: 0.9rem; }
.footer-brand p { font-size: 0.92rem; max-width: 34ch; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 1rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col a { font-size: 0.93rem; color: var(--ink); }
.footer-col a:hover { color: var(--accent-text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-bottom .made-in { font-family: var(--font-mono); font-size: 0.78rem; }
.footer-bottom .made-in a { text-decoration: underline; text-underline-offset: 2px; }
.footer-bottom .made-in a:hover { color: var(--accent-text); }

/* ---------- Legal / plain pages ---------- */
.prose-page { padding-top: clamp(3rem, 6vw, 4.5rem); }
.prose-page .container { max-width: 44rem; }
.prose-header { margin-bottom: 2.5rem; }
.prose-header h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: 0.6rem; }
.prose-header .updated { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); }
.prose-page h2 {
  font-size: 1.3rem;
  margin-top: 2.5rem;
  margin-bottom: 0.85rem;
}
.prose-page p, .prose-page li {
  color: var(--muted);
  font-size: 1rem;
  max-width: 68ch;
  margin-bottom: 1rem;
}
.prose-page ul { padding-left: 1.25rem; list-style: disc; }
.prose-page li { margin-bottom: 0.5rem; }
.prose-page a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.prose-page strong { color: var(--ink); }

/* Downloads page */
.download-list { display: flex; flex-direction: column; gap: 1.25rem; margin: 2rem 0; }
.download-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.download-card--recommended {
  border-color: transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--gradient-brand) border-box;
  border: 2px solid transparent;
  box-shadow: var(--shadow-lg);
}
.recommended-ribbon {
  flex-basis: 100%;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  background: var(--gradient-brand);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.7rem;
  width: fit-content;
}
.download-main { display: flex; align-items: flex-start; gap: 1rem; flex: 1 1 320px; min-width: 0; }
.download-icon { width: 2.4rem; height: 2.4rem; flex-shrink: 0; color: var(--accent-text); }
.download-icon svg { width: 100%; height: 100%; }
.download-title-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.download-title-row .badge-soon,
.download-title-row .chip { margin-top: 0; }
.download-info h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.download-info p { font-size: 0.88rem; margin-bottom: 0; }
.download-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
.download-hint {
  flex-basis: 100%;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}
.download-hint a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.download-hash {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  word-break: break-all;
  display: block;
  margin-top: 0.5rem;
  max-width: 40ch;
}

/* Small pill tag: same recipe as .badge-soon and .price-tag, for other
   short inline states (eg. "Test build"). */
.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent-text);
  background: color-mix(in srgb, var(--violet) 14%, transparent);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.65rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.data-table th,
.data-table td {
  text-align: left;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.data-table th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--ground);
}
.data-table td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: none; }

.callout {
  background: color-mix(in srgb, var(--violet) 6%, var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.callout p { margin-bottom: 0; font-size: 0.94rem; }
.callout p:first-child {
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* ---------- Account page ---------- */
.form-status {
  min-height: 1.4em;
  font-size: 0.92rem;
  margin: -0.5rem 0 1.5rem;
}
.form-status--error { color: var(--danger); }
.form-status--success { color: var(--success); }

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  box-shadow: var(--shadow-sm);
}
.auth-card-lede { font-size: 0.98rem; margin-bottom: 1.5rem; }
.auth-card-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.field-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.field-input {
  flex: 1 1 220px;
  min-width: 0;
  background: var(--ground);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
}
.field-input:focus-visible { box-shadow: var(--focus-ring); }
.field-input--code {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  letter-spacing: 0.4em;
  text-align: center;
  max-width: 11rem;
  flex: 0 0 auto;
}
.field-hint { font-size: 0.85rem; margin: 0.65rem 0 0; }

.account-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.account-email {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 0.25rem;
}

.account-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  background: var(--ground);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 2rem;
}
.account-stat dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.account-stat dd {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.account-download-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 2rem;
}
.account-download-links a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink);
  background: var(--ground);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.9rem;
}
.account-download-links a:hover { border-color: var(--accent-text); color: var(--accent-text); }

.session-list { display: flex; flex-direction: column; gap: 0.75rem; }
.session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--ground);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}
.session-info { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.session-device {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.98rem;
}
.session-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .see-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; row-gap: 2rem; }
}

@media (max-width: 780px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-block; }
  .site-header[data-open="true"] .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--ground);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem var(--gutter) 1.25rem;
  }
  .site-header[data-open="true"] .nav-links a {
    width: 100%;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
  }
  .steps { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature-card--wide { grid-column: span 2; }
  .platform-grid { grid-template-columns: 1fr 1fr; }
  .platform { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .platform:nth-child(2n) { border-right: none; }
  .platform:nth-child(3), .platform:nth-child(4) { border-bottom: none; }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card--wide { grid-column: span 1; }
  .footer-top { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 auto; }
  .download-card { flex-direction: column; align-items: flex-start; }
  .download-actions { align-items: stretch; width: 100%; }
  .download-actions .btn { width: 100%; }
  .account-stats { grid-template-columns: 1fr; }
  .field-input--code { max-width: none; }
  .session-row { flex-direction: column; align-items: flex-start; }
  .session-row .session-signout { align-self: stretch; }
}
