/* Guppy AI: a satire site. Plain CSS, no build step. */

:root {
  --ink: #0B2545;
  --ink-soft: #3A5170;
  --blue: #1B6CA8;
  --blue-light: #D6EAF8;
  --bg: #F4F9FD;
  --tint: #E6F1FA;
  --orange: #FF7A1A;
  --orange-deep: #B84A09; /* orange for text: AA on light backgrounds */
  --orange-soft: #FFE3CC;
  --terminal: #0E1E33;
  --terminal-text: #D6EAF8;
  --terminal-dim: #8FA9C4;
  --green: #2FA36B;
  --white: #FFFFFF;
  --line: rgba(11, 37, 69, 0.28);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --radius: 10px;
  --container: 1120px;
  --header-h: 64px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
code, .mono { font-family: var(--font-mono); }
h1, h2, h3 { line-height: 1.15; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px; top: -48px;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: 8px 14px;
  border-radius: 6px;
}
.skip-link:focus { top: 12px; color: var(--white); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 10px 18px;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-orange { background: var(--orange); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.btn-orange:hover { background: #FF8C3A; color: var(--ink); }
.btn-outline { background: var(--white); color: var(--ink); }
.btn-outline:hover { background: var(--orange-soft); color: var(--ink); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 249, 253, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px dashed var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.wordmark { font-weight: 800; font-size: 22px; letter-spacing: -0.03em; }
.wordmark span { color: var(--orange-deep); }

.nav-menu { display: flex; align-items: center; gap: 22px; }
.nav-menu a:not(.btn) {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.nav-menu a:not(.btn):hover { color: var(--blue); text-decoration: underline; }
.nav-menu .nav-pill {
  border: 1.5px dashed var(--orange-deep);
  color: var(--orange-deep);
  padding: 5px 10px;
  border-radius: 4px;
  transform: rotate(-1.5deg);
  display: inline-block;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s ease;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 64px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(214, 234, 248, 0.9), transparent 60%),
    var(--bg);
}
.hero-inner { position: relative; z-index: 1; max-width: 1240px; }

.hero-title {
  font-size: clamp(30px, 4.3vw, 56px);
  font-weight: 800;
  text-wrap: balance;
  letter-spacing: -0.035em;
  line-height: 1.12;
}
.hero-title .line { display: block; }
.hero-title .line-orange { color: var(--orange-deep); }
.hero-title em { font-style: italic; text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 6px; }
.hero-code {
  font-size: 0.82em;
  font-weight: 700;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 0 0.2em;
  box-shadow: 3px 3px 0 var(--orange);
}

.hero-sub { margin: 22px auto 0; max-width: 620px; color: var(--ink-soft); font-size: 18px; }
.hero-sub strong { color: var(--blue); }

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 780px;
  margin: 28px auto 0;
}
.chips li {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--white);
  border: 1.5px dashed var(--line);
  border-radius: 999px;
  padding: 5px 14px;
}
.chips li::before { content: "●"; color: var(--orange); margin-right: 8px; font-size: 9px; vertical-align: 2px; }

.install {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  margin: 36px auto 0;
}
.install-note {
  position: absolute;
  left: calc(50% - 400px);
  top: -22px;
  color: var(--orange-deep);
  font-size: 15px;
  font-style: italic;
  transform: rotate(-10deg);
}
.install-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--terminal);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 8px 8px 8px 18px;
  box-shadow: 4px 4px 0 var(--orange);
  max-width: 100%;
}
.install-box code {
  color: var(--terminal-text);
  font-size: 15px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.install-box .prompt { color: var(--orange); }
.btn-copy { background: var(--orange-soft); color: var(--ink); border-color: var(--orange-soft); padding: 6px 12px; font-size: 12px; flex-shrink: 0; }
.btn-copy:hover { background: var(--orange); }

.hero-mascot { margin: 24px auto 0; font-size: 15px; color: var(--ink-soft); max-width: 560px; }

.swims-with {
  margin: 40px auto 0;
  max-width: 640px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  padding: 20px 24px 24px;
}
.label-sm { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.swims-with ul { display: flex; justify-content: space-around; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.swims-with li { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.swims-with svg { width: 48px; height: 48px; }

/* Bubbles */
.bubbles { position: absolute; inset: 0; pointer-events: none; }
.bubbles span {
  position: absolute;
  bottom: -30px;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  border: 1.5px solid rgba(27, 108, 168, 0.45);
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(214, 234, 248, 0.3));
  animation: rise var(--d) linear var(--delay) infinite;
  opacity: 0;
}
@keyframes rise {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 0.9; }
  50% { transform: translate(12px, -45vh); }
  90% { opacity: 0.7; }
  100% { transform: translate(-8px, -90vh); opacity: 0; }
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-tint { background: var(--tint); }
.eyebrow {
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--blue);
  margin-bottom: 12px;
}
.section-title {
  text-align: center;
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.section-lead { text-align: center; margin: 16px auto 0; max-width: 640px; color: var(--ink-soft); font-size: 17px; }
.section-lead code { background: var(--white); border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px; color: var(--ink); }
.underline { text-decoration: underline wavy var(--orange); text-underline-offset: 5px; color: var(--orange-deep); font-weight: 600; }
.caption { text-align: center; margin-top: 20px; color: var(--ink-soft); font-size: 15px; }

/* Wave dividers */
.wave { color: var(--tint); background: var(--bg); line-height: 0; margin-bottom: -1px; }
.wave svg { width: 100%; height: 48px; }
.wave-flip { transform: rotate(180deg); margin: -1px 0 0; }

/* ---------- Terminal demo ---------- */
.demo-frame {
  position: relative;
  margin-top: 40px;
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  padding: 20px;
  background: linear-gradient(135deg, #1B6CA8 0%, #0E3A63 55%, #FF7A1A 140%);
}
.terminal {
  background: var(--terminal);
  border-radius: 10px;
  border: 1px solid #22385A;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(11, 37, 69, 0.35);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #13294A;
  border-bottom: 1px solid #22385A;
}
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #FF5F57; }
.dots i:nth-child(2) { background: #FEBC2E; }
.dots i:nth-child(3) { background: #28C840; }
.terminal-title { color: var(--terminal-dim); font-size: 12px; margin: 0 auto; }
.terminal-body { display: grid; grid-template-columns: 1fr 280px; min-height: 360px; }
.term-main { padding: 18px 20px; color: var(--terminal-text); font-size: 14px; line-height: 1.7; }
.term-log { border-left: 1px solid #22385A; padding: 18px 16px; font-size: 12.5px; color: var(--terminal-dim); }
.term-log-title { color: var(--orange); font-weight: 700; margin-bottom: 10px; }
.term-log .swimming { color: #6EE7A8; }
.term-line { white-space: pre-wrap; word-break: break-word; min-height: 1.7em; }
.term-line .c-user { color: #FFB27A; }
.term-line .c-guppy { color: #7CC4F5; }
.term-line .c-dim, pre .c-dim { color: var(--terminal-dim); }
.term-line .c-o, pre .c-o { color: var(--orange); }
.term-line .c-g, pre .c-g { color: #6EE7A8; }
.term-line .c-hl { background: var(--orange); color: var(--terminal); padding: 1px 6px; border-radius: 3px; font-weight: 700; }
.term-log .log-row { padding: 6px 8px; border-radius: 4px; margin-bottom: 6px; background: rgba(214, 234, 248, 0.05); }
.term-log .log-row b { color: #6EE7A8; font-weight: 700; }
.term-log .log-row.warn b { color: var(--orange); }
.term-bar { display: inline-block; height: 10px; width: 0; background: var(--orange); border-radius: 2px; vertical-align: middle; transition: width 1.4s ease-out; }
.cursor { display: inline-block; width: 8px; height: 1.1em; background: var(--terminal-text); vertical-align: -3px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.terminal-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 10px 16px;
  border-top: 1px solid #22385A;
  color: var(--terminal-dim);
  font-size: 12px;
}
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.dot-green { background: #3DDC84; }
.dot-orange { background: var(--orange); }
.dot-blue { background: #7CC4F5; }
.btn-replay {
  position: absolute;
  right: 32px;
  bottom: 32px;
  background: var(--ink);
  color: var(--white);
  border-color: #31507A;
  font-size: 12px;
  padding: 7px 12px;
}
.btn-replay:hover { background: var(--blue); color: var(--white); }

/* ---------- Diagnosis ---------- */
.problems { margin-top: 44px; border-top: 1.5px dashed var(--line); }
.problem {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  border-bottom: 1.5px dashed var(--line);
  background: var(--white);
}
.problem:nth-child(even) { background: #FBFDFF; }
.problem-q { display: flex; gap: 22px; padding: 28px 28px; border-right: 1.5px dashed var(--line); }
.problem-num { font-size: 30px; font-weight: 700; color: var(--blue); opacity: 0.55; line-height: 1; }
.problem h3 { font-size: 20px; font-weight: 700; }
.problem h3 code {
  font-size: 0.85em;
  color: var(--orange-deep);
  background: var(--orange-soft);
  border: 1px solid #F3B98C;
  padding: 0 6px;
  border-radius: 4px;
}
.problem-sub { margin-top: 6px; color: var(--orange-deep); font-style: italic; font-size: 15px; }
.problem-a { padding: 24px 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.problem-a p { color: var(--ink-soft); font-size: 15px; }

.stamp {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--orange-deep);
  border: 2.5px solid var(--orange);
  border-radius: 4px;
  padding: 3px 10px;
  transform: rotate(-4deg);
  box-shadow: inset 0 0 0 1.5px rgba(255, 122, 26, 0.25);
  background: rgba(255, 227, 204, 0.4);
  -webkit-mask-image: radial-gradient(circle at 20% 30%, #000 60%, rgba(0,0,0,0.75) 61%, #000 70%);
          mask-image: radial-gradient(circle at 20% 30%, #000 60%, rgba(0,0,0,0.75) 61%, #000 70%);
}
.problem:nth-child(2) .stamp { transform: rotate(3deg); }
.problem:nth-child(3) .stamp { transform: rotate(-2deg); }
.problem:nth-child(4) .stamp { transform: rotate(5deg); }
.stamp-solid { background: var(--orange); color: var(--ink); border-color: var(--ink); font-size: 15px; transform: rotate(-6deg); }

.tag {
  font-size: 12px;
  color: var(--blue);
  border: 1.5px solid var(--blue);
  border-radius: 4px;
  padding: 2px 8px;
  background: var(--white);
}
.kicker {
  text-align: center;
  margin: 36px auto 0;
  max-width: 700px;
  font-size: 18px;
  font-weight: 700;
}

/* ---------- Flow ---------- */
.flow { display: grid; grid-template-columns: 1fr 56px 1fr 56px 1fr; align-items: start; margin-top: 48px; }
.flow-label { font-size: 14px; font-weight: 700; margin-bottom: 12px; display: flex; gap: 10px; align-items: center; }
.flow-tag {
  color: var(--orange-deep);
  border: 1.5px solid var(--orange);
  background: var(--orange-soft);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.06em;
}
.mini-term { border: 1.5px dashed var(--line); border-radius: 8px; background: var(--white); overflow: hidden; }
.mini-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--ink-soft);
  padding: 8px 12px;
  border-bottom: 1.5px dashed var(--line);
  background: #F7FAFD;
}
.mini-bar .dots i { width: 8px; height: 8px; background: #B9C7D6; }
.mini-term pre {
  margin: 0;
  padding: 14px 14px 16px;
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  color: var(--ink);
}
.mini-term pre .c-dim { color: #56708F; }
.mini-term pre .c-o { color: var(--orange-deep); font-weight: 700; }
.mini-term pre .c-g { color: #1C7A4C; font-weight: 700; }
.mini-term-verdict { background: #FFF6EE; border-color: #F3B98C; }
.verdict { padding: 18px 14px 0; }
.verdict pre { padding: 14px 0 16px; }
.flow-cap { margin-top: 14px; color: var(--ink-soft); font-size: 15px; }
.flow-cap b { color: var(--orange-deep); }
.flow-arrow { color: var(--blue); padding-top: 110px; display: flex; justify-content: center; }
.flow-arrow svg { width: 50px; }

/* ---------- Compare table ---------- */
.table-wrap {
  margin-top: 44px;
  overflow-x: auto;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.compare { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 15px; }
.compare th, .compare td { padding: 16px 18px; text-align: left; border-bottom: 1.5px dashed var(--line); vertical-align: top; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare td + td, .compare th + th, .compare th + td { border-left: 1.5px dashed var(--line); }
.compare thead th {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 700;
}
.compare tbody th { font-family: var(--font-mono); font-size: 13px; font-weight: 700; width: 18%; }
.compare td { color: var(--ink-soft); }
.compare .col-guppy { background: var(--orange-soft); color: var(--ink); font-weight: 700; }
.compare thead .col-guppy { color: var(--ink); }
.compare thead .col-guppy img { display: inline-block; vertical-align: -4px; margin-right: 4px; }

/* ---------- Defaults ---------- */
.defaults { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 44px; }
.defaults-col {
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 26px 28px;
}
.defaults-col h3 { font-size: 19px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.count {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 14px;
}
.defaults-col li { padding: 12px 0; border-top: 1px dashed var(--line); color: var(--ink-soft); font-size: 15px; }
.defaults-col li code { display: block; color: var(--orange-deep); font-weight: 700; font-size: 14px; margin-bottom: 2px; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 44px; align-items: stretch; }
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 28px 26px;
}
.plan-featured { border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--orange); }
.plan-badge {
  position: absolute;
  top: -14px;
  right: 18px;
  background: var(--orange);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 4px;
  transform: rotate(3deg);
}
.plan-name { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }
.plan-price { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; margin-top: 8px; }
.plan-price span { display: block; font-size: 14px; font-weight: 500; color: var(--ink-soft); letter-spacing: 0; }
.plan-desc { margin-top: 10px; font-weight: 600; }
.plan ul { margin: 18px 0 24px; flex: 1; }
.plan li { padding: 8px 0 8px 26px; position: relative; color: var(--ink-soft); font-size: 15px; border-top: 1px dashed var(--line); }
.plan li::before { content: "~"; position: absolute; left: 4px; color: var(--orange-deep); font-family: var(--font-mono); font-weight: 700; }
.plan-btn { width: 100%; }

/* ---------- Roadmap ---------- */
.center { text-align: center; }
.roadmap { position: relative; margin-top: 44px; padding-left: 52px; }
.roadmap::before {
  content: "";
  position: absolute;
  left: 15px; top: 12px; bottom: 12px;
  border-left: 2px dashed var(--line);
}
.roadmap li {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  border: 1.5px dashed var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.roadmap li::before {
  content: "";
  position: absolute;
  left: -52px;
  top: 16px;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 2px dashed var(--ink-soft);
}
.roadmap li.shipped::before {
  content: "✓";
  background: var(--blue);
  border: 2px solid var(--blue);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
}
.roadmap h3 { font-size: 17px; font-weight: 700; }
.roadmap p { margin-top: 4px; color: var(--ink-soft); font-size: 15px; }
.status {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 3px 8px;
  border: 1.5px solid var(--ink-soft);
  color: var(--ink-soft);
}
.shipped .status { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }
.planned { border-style: dotted; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--blue-light); padding: 56px 0 28px; }
.footer .brand, .footer .wordmark { color: var(--white); }
.footer .wordmark span { color: var(--orange); }
.footer .brand img { background: var(--white); border-radius: 50%; padding: 3px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { margin-top: 12px; }
.footer .label-sm { color: #9FB6CF; }
.footer h2 { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); margin-bottom: 14px; }
.footer li { margin-bottom: 8px; }
.footer a, .linkish { color: var(--blue-light); text-decoration: none; font-size: 15px; }
.footer a:hover, .linkish:hover { color: var(--white); text-decoration: underline; }
.linkish { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px dashed rgba(214, 234, 248, 0.3); display: grid; gap: 12px; }
.disclaimer {
  font-size: 14px;
  border: 1.5px dashed var(--orange);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--white);
}
.disclaimer strong { color: var(--orange); }
.coffee { font-size: 15px; }
.footer .coffee a { color: var(--orange); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.footer .coffee a:hover { color: var(--white); }

/* ---------- Chat ---------- */
.chat-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  background: var(--white);
  box-shadow: 3px 3px 0 var(--orange), 0 10px 24px rgba(11, 37, 69, 0.25);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.chat-launcher:hover { transform: translateY(-2px) rotate(-6deg); }
.chat-launcher img { width: 42px; height: 42px; }
.chat-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid var(--white);
}
.chat-launcher.seen .chat-dot { display: none; }

.chat-panel {
  position: fixed;
  right: 22px;
  bottom: 100px;
  z-index: 70;
  width: 370px;
  height: min(560px, calc(100vh - 130px));
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: 6px 6px 0 var(--orange), 0 24px 48px rgba(11, 37, 69, 0.3);
  overflow: hidden;
  animation: pop 0.2s ease-out;
}
.chat-panel[hidden] { display: none; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }

.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--ink); color: var(--white); }
.chat-head img { background: var(--white); border-radius: 50%; padding: 3px; }
.chat-head h2 { font-size: 17px; font-weight: 700; }
.chat-status { font-size: 12px; color: #A7F3C9; }
.chat-close {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: var(--white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.chat-close:hover { background: rgba(255, 255, 255, 0.12); }

.chat-messages { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-width: 85%; padding: 10px 13px; border-radius: 12px; font-size: 14.5px; line-height: 1.45; word-wrap: break-word; }
.msg-bot { align-self: flex-start; background: var(--white); border: 1.5px solid var(--blue-light); border-bottom-left-radius: 4px; }
.msg-user { align-self: flex-end; background: var(--blue); color: var(--white); border-bottom-right-radius: 4px; }
.msg-typing { align-self: flex-start; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.typing-dots { display: inline-flex; gap: 3px; }
.typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); animation: bob 1s ease-in-out infinite; }
.typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.typing-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bob { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(-4px); opacity: 1; } }

.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 0; background: var(--white); border-top: 1px dashed var(--line); }
.chip-btn {
  font-family: var(--font-sans);
  font-size: 13px;
  background: var(--orange-soft);
  color: var(--ink);
  border: 1.5px solid #F3B98C;
  border-radius: 999px;
  padding: 5px 11px;
  cursor: pointer;
}
.chip-btn:hover { background: var(--orange); }
.chat-form { display: flex; gap: 8px; padding: 10px 12px 12px; background: var(--white); }
.chat-form input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--white);
}
.chat-form input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-light); }

/* ---------- Toasts ---------- */
.toast-region {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}
.toast {
  background: var(--ink);
  color: var(--white);
  border: 2px solid var(--orange);
  border-radius: 8px;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  box-shadow: 4px 4px 0 var(--orange);
  animation: toast-in 0.25s ease-out;
  text-align: center;
}
.toast.leaving { opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 404 ---------- */
.lost {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 64px 24px;
  position: relative;
  overflow: hidden;
}
.lost-inner { position: relative; z-index: 1; max-width: 560px; }
.lost-code { font-size: clamp(64px, 14vw, 128px); font-weight: 800; letter-spacing: -0.05em; color: var(--blue); line-height: 1; }
.lost h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 800; letter-spacing: -0.03em; margin-top: 12px; }
.lost p { margin-top: 14px; color: var(--ink-soft); font-size: 17px; }
.lost .btn { margin-top: 28px; }
.lost-fish { width: 120px; margin: 0 auto 8px; animation: swim-away 4s ease-in-out infinite; }
@keyframes swim-away { 0%, 100% { transform: translateX(-10px) rotate(-3deg); } 50% { transform: translateX(10px) rotate(3deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .flow { grid-template-columns: 1fr; gap: 12px; }
  .flow-arrow { padding: 0; transform: rotate(90deg); height: 40px; align-items: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .terminal-body { grid-template-columns: 1fr; }
  .term-log { border-left: 0; border-top: 1px solid #22385A; }
  .install-note { display: none; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 2px solid var(--ink);
    padding: 8px 24px 20px;
    box-shadow: 0 12px 24px rgba(11, 37, 69, 0.12);
  }
  .nav-menu.open { display: flex; }
  .nav-menu li { border-bottom: 1px dashed var(--line); }
  .nav-menu li:last-child { border-bottom: 0; padding-top: 14px; }
  .nav-menu a:not(.btn) { display: block; padding: 14px 0; font-size: 14px; }
  .nav-menu .nav-pill { display: inline-block; margin: 10px 0; padding: 6px 10px; }
  .nav-menu .btn { width: 100%; }
  .problem { grid-template-columns: 1fr; }
  .problem-q { border-right: 0; border-bottom: 1px dashed var(--line); }
  .defaults, .pricing { grid-template-columns: 1fr; }
  .pricing { max-width: 460px; margin-left: auto; margin-right: auto; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .section { padding: 64px 0; }
  .hero { padding: 48px 0 48px; }
  .hero-sub { font-size: 16px; }
  .install-box { width: 100%; padding-left: 12px; gap: 8px; }
  .install-box code { font-size: 12.5px; flex: 1; min-width: 0; white-space: normal; overflow-wrap: anywhere; text-align: left; }
  .install > .btn-outline { width: 100%; }
  .demo-frame { padding: 8px; }
  .term-main { font-size: 12.5px; padding: 14px; }
  .terminal-body { min-height: 420px; }
  .btn-replay { right: 16px; bottom: 16px; }
  .problem-q { padding: 22px 18px; gap: 14px; }
  .problem-a { padding: 20px 18px; }
  .problem-num { font-size: 22px; }
  .problem h3 { font-size: 18px; }
  .roadmap { padding-left: 40px; }
  .roadmap li { flex-direction: column; gap: 8px; }
  .roadmap li::before { left: -40px; width: 26px; height: 26px; }
  .roadmap::before { left: 12px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .terminal-foot { gap: 10px; }
}

@media (max-width: 480px) {
  .chat-panel {
    right: 8px;
    left: 8px;
    bottom: 8px;
    top: 8px;
    width: auto;
    height: auto;
    border-radius: 12px;
  }
  .chat-launcher { right: 14px; bottom: 14px; width: 58px; height: 58px; }
  .chat-launcher img { width: 38px; height: 38px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@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;
  }
  .bubbles { display: none; }
  .cursor { animation: none; }
}
