/* Fyrtal landing page.
 * Exact palette and editorial grammar of the Fyrtal console:
 * warm paper in light mode, warm charcoal sky in dark mode, one golden accent. */

:root {
  --bg: #faf9f5;
  --surface: #f0eee6;
  --surface-2: #e8e6dc;
  --raised: #ffffff;
  --line: #e3e0d5;
  --text: #1a1915;
  --muted: #73726c;
  --accent: #e6b422;
  --accent-text: #1a1915;
  --accent-ink: #8f6b00;
  --accent-soft: #f6ecc4;
  --ok: #3d7a52;
  --ok-soft: #e0ecdf;
  --warn: #b0621a;
  --warn-soft: #f6e2d0;
  --bad: #b3402f;
  --idle: #b3b0a4;
  --radius: 3px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;

  /* Hero sky & clouds (warm daylight editorial paper) */
  --sky-glow-start: #f6ecc4;
  --sky-glow-mid: #f5f2e6;
  --cloud-fill: #ffffff;
  --cloud-ink: #b3ad98;
  --star-gold: #c9960c;
  --star-muted: #b39b54;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1f1e1c;
    --surface: #2a2926;
    --surface-2: #35332f;
    --raised: #302f2c;
    --line: #3b3935;
    --text: #f3f1ea;
    --muted: #a3a097;
    --accent: #f0c648;
    --accent-text: #1f1e1c;
    --accent-ink: #f0c648;
    --accent-soft: #453a1c;
    --ok: #86c098;
    --ok-soft: #2b3a2f;
    --warn: #e59b5e;
    --warn-soft: #45301f;
    --bad: #e88d7d;
    --idle: #6f6c65;

    /* Hero night sky & warm charcoal clouds */
    --sky-glow-start: #3c341f;
    --sky-glow-mid: #272522;
    --cloud-fill: #2a2926;
    --cloud-ink: #7a766c;
    --star-gold: #f0c648;
    --star-muted: #b8a774;
  }
}

:root[data-theme="dark"] {
  --bg: #1f1e1c;
  --surface: #2a2926;
  --surface-2: #35332f;
  --raised: #302f2c;
  --line: #3b3935;
  --text: #f3f1ea;
  --muted: #a3a097;
  --accent: #f0c648;
  --accent-text: #1f1e1c;
  --accent-ink: #f0c648;
  --accent-soft: #453a1c;
  --ok: #86c098;
  --ok-soft: #2b3a2f;
  --warn: #e59b5e;
  --warn-soft: #45301f;
  --bad: #e88d7d;
  --idle: #6f6c65;

  --sky-glow-start: #3c341f;
  --sky-glow-mid: #272522;
  --cloud-fill: #2a2926;
  --cloud-ink: #7a766c;
  --star-gold: #f0c648;
  --star-muted: #b8a774;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font: 500 clamp(38px, 6vw, 62px)/1.08 var(--serif); letter-spacing: -0.02em; }
h2 { font: 500 clamp(26px, 3.4vw, 36px)/1.18 var(--serif); letter-spacing: -0.015em; }
h3 { font: 500 19px/1.3 var(--serif); }
p { margin: 0; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--mono); font-size: 13px; }
code { background: var(--surface-2); padding: 1px 5px; border-radius: 2px; font-size: 12.5px; }
pre code { background: none; padding: 0; }

.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.ok-text { color: var(--ok); font-weight: 500; }
.small-note { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 58px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 20px/1 var(--serif);
  color: var(--text);
}
.brand:hover { text-decoration: none; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 6px 10px; border-radius: var(--radius); color: var(--muted); font-size: 14px; }
.nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav-drop { position: relative; }
.nav-drop summary {
  list-style: none;
  padding: 6px 10px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  user-select: none;
}
.nav-drop summary::-webkit-details-marker { display: none; }
.nav-drop summary:hover, .nav-drop[open] summary { color: var(--text); background: var(--surface); }
.nav-drop.active summary { color: var(--text); }
.nav-drop .caret { font-size: 11px; opacity: 0.7; }
.nav-drop-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 190px;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
  z-index: 40;
}
.nav-drop-menu a { padding: 7px 10px; white-space: nowrap; }
.nav-drop-menu a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* Mobile navigation drawer (shown <= 920px) */
.mobile-menu { display: none; position: relative; }
.mobile-menu summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  cursor: pointer;
  user-select: none;
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary:hover, .mobile-menu[open] summary { background: var(--surface); }
.mobile-menu-panel {
  position: fixed;
  top: 58px;
  left: 0;
  right: 0;
  max-height: calc(100dvh - 58px);
  overflow-y: auto;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.14);
  padding: 16px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 35;
}
.mobile-menu-group { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu-label {
  font: 600 11px/1.4 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 2px 8px;
}
.mobile-menu-panel a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
}
.mobile-menu-panel a:hover { background: var(--surface); text-decoration: none; }
.mobile-menu-panel a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; }
.mobile-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

/* ---------- buttons & badges ---------- */

button, a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  padding: 9px 16px;
  border-radius: var(--radius);
  border: 0;
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  transition: filter 0.12s, background 0.12s;
}
button:hover, a.button:hover { filter: brightness(0.96); text-decoration: none; }
button.primary, a.button.primary { background: var(--accent); color: var(--accent-text); }
button.primary:hover, a.button.primary:hover { filter: brightness(1.05); }
button.quiet, a.button.quiet-btn { background: transparent; color: var(--muted); border: 1px solid var(--line); }
button.quiet:hover, a.button.quiet-btn:hover { color: var(--text); background: var(--surface); filter: none; }
button.small, a.button.small { padding: 5px 11px; font-size: 13px; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 500;
  background: var(--surface-2);
  color: var(--muted);
}
.badge.accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card.pad { padding: 24px; }

.eyebrow {
  display: inline-block;
  font: 600 11px/1.4 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 10px;
}

/* ---------- hero with clouds and stars ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 64px;
  min-height: 620px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.sky-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.sky-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Hand-drawn doodles: pen strokes with round ends, constant width at any scale */
.doodle {
  fill: none;
  stroke: var(--star-gold);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.doodle.muted { stroke: var(--star-muted); }
.doodle.filled { fill: var(--star-gold); fill-opacity: 0.22; }
.cloud-shape {
  fill: var(--cloud-fill);
  stroke: var(--cloud-ink);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cloud-detail {
  fill: none;
  stroke: var(--cloud-ink);
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0.7;
}
.cloud-far { opacity: 0.6; }

@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@keyframes driftSlow {
  0%, 100% { transform: translateX(0px); }
  50% { transform: translateX(18px); }
}
@keyframes driftMid {
  0%, 100% { transform: translateX(0px); }
  50% { transform: translateX(-14px); }
}

.twinkle-a { animation: twinkle 4.2s ease-in-out infinite; }
.twinkle-b { animation: twinkle 5.6s ease-in-out 1.4s infinite; }
.twinkle-c { animation: twinkle 6.8s ease-in-out 2.6s infinite; }
.cloud-slow { animation: driftSlow 26s ease-in-out infinite; }
.cloud-mid { animation: driftMid 20s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .twinkle-a, .twinkle-b, .twinkle-c, .cloud-slow, .cloud-mid { animation: none; }
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 22px;
}

.hero-eyebrow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.hero-lead {
  max-width: 66ch;
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
}
.hero-lead strong { color: var(--text); font-weight: 600; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.hero-strip {
  width: 100%;
  margin-top: 28px;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  text-align: left;
  background: color-mix(in srgb, var(--raised) 90%, transparent);
  backdrop-filter: blur(6px);
}
.strip-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 4px;
}
.strip-value { font-size: 14px; font-weight: 500; color: var(--text); }

.hero-shot {
  width: 100%;
  margin: 12px 0 0;
  overflow: hidden;
  text-align: left;
  background: var(--raised);
  box-shadow: 0 22px 54px rgba(26, 25, 21, 0.14), 0 2px 8px rgba(26, 25, 21, 0.06);
}
:root[data-theme="dark"] .hero-shot {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 2px 10px rgba(0, 0, 0, 0.25);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero-shot {
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 2px 10px rgba(0, 0, 0, 0.25);
  }
}
.hero-shot-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.hero-shot-caption { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-shot-nav { display: flex; align-items: center; gap: 8px; flex: none; }
.hero-shot-nav[hidden] { display: none; }
.hero-shot-nav button.small { padding: 2px 9px; line-height: 1.4; }
.hero-shot-dots { display: flex; align-items: center; }
.hero-shot-dots button {
  width: 18px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
}
.hero-shot-dots button::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--idle);
}
.hero-shot-dots button[aria-current="true"]::before { background: var(--accent-ink); }
/* A scroll-snap strip: swipes natively, and still scrolls if the script never runs. */
.hero-shot-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  background: #1f1e1c;
}
.hero-shot-track::-webkit-scrollbar { display: none; }
.hero-shot-track:focus-visible { outline-offset: -2px; }
.hero-shot-track img {
  display: block;
  flex: 0 0 100%;
  width: 100%;
  height: auto;
  scroll-snap-align: start;
}

/* ---------- sections ---------- */

.section { padding: 80px 0; }
.surface-band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.surface-band .card { background: var(--raised); }

.section-intro { max-width: 68ch; margin-bottom: 36px; display: flex; flex-direction: column; gap: 10px; }
.section-intro .lead { font-size: 16px; }

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

.feature-card { display: flex; flex-direction: column; gap: 12px; }
.feature-head { display: flex; align-items: baseline; gap: 10px; }
.feature-num { color: var(--accent-ink); font-weight: 600; }

.check-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}
.check-list li { position: relative; padding-left: 18px; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  background: var(--accent);
}

/* ---------- usual way vs Fyrtal ---------- */

.compare-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.compare-card { display: flex; flex-direction: column; gap: 14px; }
.compare-card .badge { align-self: flex-start; }
.compare-card.new-way { border-color: var(--accent); }
.layer-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}
.layer-list li::marker { color: var(--accent-ink); font-weight: 600; }
.layer-list strong { display: block; color: var(--text); }
.inline-spec {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.compare-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.idea-foot { margin-top: 20px; max-width: 78ch; font-size: 15px; }
.idea-foot a { white-space: nowrap; }
.compare-strip {
  margin-top: 18px;
  padding: 13px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 14px;
}
.compare-strip-label { color: var(--muted); font-weight: 500; }
.compare-strip-links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.compare-strip-links a { white-space: nowrap; font-weight: 500; }

/* ---------- managed or self-hosted ---------- */

.run-grid { margin-bottom: 40px; }
.run-card { display: flex; flex-direction: column; gap: 12px; }
.run-card .badge, .run-card .button { align-self: flex-start; }
.run-card .button { margin-top: auto; }
.run-card .check-list { margin-bottom: 8px; }
.run-price { font: 500 26px/1.2 var(--serif); letter-spacing: -0.01em; }
.run-price .muted { font: 400 15px/1.4 var(--sans); letter-spacing: 0; }
.calc-title { margin-bottom: 16px; scroll-margin-top: 80px; }

/* ---------- interactive spec & map demo ---------- */

.scenario-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pill {
  padding: 6px 13px;
  font-size: 13px;
  border-radius: var(--radius);
  background: var(--raised);
  border: 1px solid var(--line);
  color: var(--muted);
}
.pill.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 18px;
  align-items: stretch;
}
.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.code-block {
  margin: 0;
  padding: 16px;
  overflow: auto;
  line-height: 1.55;
  white-space: pre;
  color: var(--text);
}
.map-pane { display: flex; flex-direction: column; }
.demo-map-wrap {
  flex: 1;
  background: var(--bg);
  min-height: 290px;
  display: flex;
  align-items: center;
}
.demo-map-wrap svg { width: 100%; height: 100%; display: block; }
.demo-notes {
  border-top: 1px solid var(--line);
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--muted);
}

/* Map SVG elements matching Fyrtal console */
.m-edge { fill: none; stroke: var(--idle); stroke-width: 1.4; }
.m-edge.dashed { stroke-dasharray: 4 3; }
.m-head { fill: var(--idle); }
.m-port { font: 11px var(--mono); fill: var(--muted); }
.m-box { fill: var(--raised); stroke: var(--line); stroke-width: 1.25; }
.m-box.ingress { fill: transparent; stroke: var(--idle); stroke-dasharray: 3 3; }
.m-bar { fill: var(--ok); }
.m-bar.accent { fill: var(--accent); }
.m-kind { font: 600 9.5px var(--sans); fill: var(--muted); letter-spacing: 0.07em; text-transform: uppercase; }
.m-name { font: 500 14.5px var(--serif); fill: var(--text); }
.m-name.host { font: 500 12px var(--sans); }
.m-state { font: 11px var(--sans); fill: var(--muted); }

/* ---------- audience & honesty ---------- */

.audience-card { display: flex; flex-direction: column; gap: 12px; }
.audience-card .badge { align-self: flex-start; }
.audience-win {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.honesty-box {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.5fr);
  gap: 24px;
  align-items: start;
}
.honesty-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}
.honesty-list strong { color: var(--text); }

/* ---------- pricing calculator ---------- */

.pricing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 18px;
  align-items: start;
}
.slider-row { display: flex; flex-direction: column; gap: 6px; }
.slider-row label { font-weight: 500; font-size: 14px; }
input[type="range"] {
  width: 100%;
  accent-color: var(--accent-ink);
  cursor: pointer;
}

.pricing-summary { display: flex; flex-direction: column; gap: 10px; }
.big-price { font: 500 44px/1.05 var(--serif); letter-spacing: -0.02em; }
.kv {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  margin: 12px 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* ---------- architecture page ---------- */

.arch-hero { padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.arch-hero h1 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 16px; }
.arch-hero .hero-lead { max-width: 62ch; }
.arch-toc {
  margin: 28px 0 0;
  padding-left: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 32px;
  max-width: 820px;
  font-size: 15px;
}
.arch-toc li::marker { color: var(--accent-ink); font-weight: 600; }
.arch-toc a { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.arch-section { scroll-margin-top: 58px; }
.section-intro .badge { align-self: flex-start; }

.arch-fig { margin: 0; display: flex; flex-direction: column; overflow: hidden; }
.arch-fig.new-way { border-color: var(--accent); }
.arch-fig figcaption {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
}
.arch-spec { margin-top: 18px; overflow: hidden; }
.arch-spec .code-block { background: var(--bg); }
.arch-spec-note { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.diagram-wrap { background: var(--bg); padding: 16px; overflow-x: auto; flex: 1; }
.diagram { display: block; width: 100%; height: auto; min-width: 440px; }
.diagram-wrap.wide .diagram { min-width: 860px; }
.diagram-defs { position: absolute; }

.table-wrap { overflow-x: auto; }
.cmp-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.cmp-table th, .cmp-table td { padding: 11px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.cmp-table thead th { font: 600 11px/1.4 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cmp-table thead th:last-child { color: var(--accent-ink); }
.cmp-table tbody th { width: 26%; font-weight: 500; color: var(--text); }
.cmp-table td { width: 37%; color: var(--muted); }
.cmp-table tbody tr:last-child th, .cmp-table tbody tr:last-child td { border-bottom: 0; }

.d-box { fill: var(--raised); stroke: var(--idle); stroke-width: 1.25; }
.d-box.soft { fill: var(--surface); }
.d-box.old { fill: var(--surface-2); stroke: var(--line); }
.d-box.hot { fill: var(--accent-soft); stroke: var(--accent); }
.d-host { fill: none; stroke: var(--idle); stroke-width: 1.25; stroke-dasharray: 5 4; }
.d-layer { stroke: var(--idle); stroke-width: 1; }
.d-layer.a { fill: var(--surface); }
.d-layer.b { fill: var(--surface-2); }
.d-t { font: 500 13.5px var(--sans); fill: var(--text); }
.d-t.big { font: 500 19px var(--serif); }
.d-s { font: 12px var(--sans); fill: var(--muted); }
.d-m { font: 12.5px var(--mono); fill: var(--text); }
.d-k { font: 600 10.5px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; fill: var(--muted); }
.d-tag { font: 600 12px var(--sans); fill: var(--accent-ink); }
.d-badtext { font: 500 12px var(--sans); fill: var(--bad); }
.d-line { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.d-dash { fill: none; stroke: var(--muted); stroke-width: 1.25; stroke-dasharray: 3 3; }
.d-tls { fill: none; stroke: var(--accent-ink); stroke-width: 2.5; }
.d-bad { fill: none; stroke: var(--bad); stroke-width: 1.5; stroke-dasharray: 5 4; }
.d-head { fill: var(--muted); }
.d-head.tls { fill: var(--accent-ink); }
.d-head.bad { fill: var(--bad); }

/* ---------- 404 page ---------- */

.not-found-hero {
  min-height: calc(100dvh - 150px);
  padding: 72px 0 64px;
}
.not-found-links {
  width: min(820px, 100%);
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 24px;
  text-align: left;
  background: color-mix(in srgb, var(--raised) 92%, transparent);
  backdrop-filter: blur(6px);
}
.nf-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}
.nf-col li a { font-weight: 500; }
.nf-cmp-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px !important;
}

/* ---------- CTA snippet & footer ---------- */

.cta-card { max-width: 780px; margin: 0 auto; }
.snippet {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.snippet pre { margin: 0; padding-right: 72px; white-space: pre-wrap; overflow-wrap: anywhere; }
.snippet .copy-btn { position: absolute; top: 10px; right: 10px; }

.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13.5px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-note { margin-top: 18px; max-width: 86ch; font-size: 12.5px; line-height: 1.55; }
.arch-hero .hero-lead + .hero-lead { margin-top: 12px; }
.brand-foot { display: inline-flex; align-items: center; gap: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }

/* ---------- real CLI & Console preview ---------- */

.product-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 18px;
  align-items: stretch;
}
.preview-pane { display: flex; flex-direction: column; overflow: hidden; }
.preview-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.preview-tabs .pill { padding: 4px 10px; font-size: 12.5px; }
.term-body {
  flex: 1;
  background: #1b1a18;
  color: #ece9df;
  padding: 16px 18px;
  margin: 0;
  overflow-x: auto;
  font: 12.5px/1.62 var(--mono);
  white-space: pre;
  min-height: 280px;
}
.term-prompt { color: #f0c648; font-weight: 600; }
.term-ok { color: #86c098; }
.term-dim { color: #9c988e; }
.term-url { color: #f0c648; text-decoration: underline; }
.preview-foot {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.console-frame {
  flex: 1;
  background: var(--bg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 280px;
}
.console-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}
.diff-box {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font: 12px/1.6 var(--mono);
  overflow-x: auto;
}
.diff-line { display: block; white-space: pre; padding: 0 4px; border-radius: 2px; }
.diff-del { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.diff-add { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.rollout-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.rollout-step {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 12.5px;
}
.rollout-step b { display: block; color: var(--ok); font-weight: 600; font-size: 12px; }
.log-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.log-filter {
  flex: 1;
  min-width: 150px;
  font: 12.5px var(--mono);
  padding: 5px 9px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--text);
}
.log-stream {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font: 12px/1.65 var(--mono);
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-x: auto;
}
.log-row { white-space: pre; }
.log-pod { color: var(--accent-ink); font-weight: 600; }
.log-ts { color: var(--muted); }
.log-err { color: var(--bad); }
.snap-list { display: flex; flex-direction: column; gap: 8px; }
.snap-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 13px;
}

/* ---------- responsive ---------- */

@media (max-width: 920px) {
  .hero-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-3, .demo-grid, .product-grid, .pricing-grid, .honesty-box, .compare-grid, .not-found-links { grid-template-columns: 1fr; }
  .nav { display: none; }
  .mobile-menu { display: block; }
}

@media (max-width: 540px) {
  .hero { padding: 56px 0 48px; }
  .hero-strip { grid-template-columns: 1fr; }
  .arch-toc { grid-template-columns: 1fr; }
  .rollout-steps { grid-template-columns: 1fr; }
  .topbar-actions .button.primary { display: none; }
  .mobile-menu-grid { grid-template-columns: 1fr; }
}

/* ---------- GitHub link ---------- */

a.button.icon-btn { padding: 5px 7px; line-height: 0; }
.gh-icon { display: block; flex: none; }
.footer-links a.gh-link { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- keyboard focus & screen-reader helpers ---------- */

/* One consistent ring for every interactive element, shown only for keyboard focus. */
:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
  border-radius: var(--radius);
}
/* Text inputs show focus even on click, since the caret alone is easy to miss. */
.log-filter:focus { outline: 2px solid var(--accent-ink); outline-offset: 0; border-color: var(--accent-ink); }
/* Scrollable code panes are focusable so keyboard users can scroll them. */
pre[tabindex]:focus-visible, .console-frame:focus-visible { outline-offset: -2px; }

.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: -100px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  border-radius: var(--radius);
}
.skip-link:focus { top: 12px; text-decoration: none; }
.calc-title .badge { font-family: var(--sans); vertical-align: middle; margin-left: 6px; }
