/* Kepler landing page. Dark only; tokens mirror the app's dark theme in
   src/ui/index.css. The bare oklch triplets (--ink, --brand, --surface-*,
   --status-warning) are what kep.css reads; the page wraps them itself. */

:root {
  color-scheme: dark;

  /* Triplets, shared with kep.css. */
  --surface-sunken: 0.145 0.006 264;
  --surface-canvas: 0.17 0.006 264;
  --ink: 0.965 0.004 264;
  --brand: 0.66 0.099 178.8;
  --status-warning: 0.72 0.155 82;
  --ai-triplet: 0.7 0.185 285;

  /* Surfaces */
  --bg-sunken: #090a0d;
  --bg: #0e0f12;
  --bg-raised: #141619;
  --bg-overlay: #1b1c20;

  /* Ink at four alphas */
  --c-ink: oklch(var(--ink));
  --c-content: oklch(var(--ink) / 0.85);
  --c-muted: oklch(var(--ink) / 0.65);
  --c-subtle: oklch(var(--ink) / 0.5);

  /* Edges */
  --edge-1: oklch(var(--ink) / 0.08);
  --edge-2: oklch(var(--ink) / 0.14);
  --edge-3: oklch(var(--ink) / 0.35);

  /* Brand teal; ink on teal is near-black. */
  --teal: oklch(var(--brand));
  --teal-hover: oklch(0.71 0.106 178.8);
  --teal-soft: oklch(var(--brand) / 0.14);
  --on-teal: #090a0d;

  /* AI purple only ever marks an agent. */
  --ai: #968dfe;
  --success: #4fbf6e;
  --info: #04b4ec;
  --warning: #d29a08;
  --attention: #f08440;
  --danger: #f67878;
  --merged: #b48cf6;

  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  --container: 1200px;
  --gutter: 16px;
  --radius: 14px;

  /* Kep's clocks and curve, as the app sets them. */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-kep-orbit: 16s;
  --duration-kep-beat: 4.6s;
  --duration-kep-alert-period: 12s;
  --duration-kep-dream: 9s;
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--c-content);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

b,
strong {
  font-weight: 600;
}

img,
svg {
  display: block;
}

button {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--teal);
  color: var(--on-teal);
  font-weight: 600;
  border-radius: 8px;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

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

.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s var(--ease-out);
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  background: var(--teal);
  color: var(--on-teal);
}

.button-primary:hover {
  background: var(--teal-hover);
}

.button-ghost {
  background: oklch(var(--ink) / 0.06);
  border-color: var(--edge-2);
  color: var(--c-ink);
}

.button-ghost:hover {
  background: oklch(var(--ink) / 0.1);
  border-color: var(--edge-3);
}

.button-outline {
  border-color: var(--edge-3);
  color: var(--c-ink);
}

.button-small {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 8px;
}

/* Header */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  padding-block: 18px;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  font-weight: 600;
  font-size: 17px;
  color: var(--c-ink);
  letter-spacing: -0.01em;
}

.brand-mark {
  border-radius: 7px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-nav-note {
  font-size: 14px;
  color: var(--c-muted);
}

.site-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--edge-2);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-ink);
  background: oklch(var(--ink) / 0.04);
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease;
}

.site-nav-link:hover {
  border-color: var(--edge-3);
  background: oklch(var(--ink) / 0.08);
}

@media (max-width: 767px) {
  .site-nav-note {
    display: none;
  }
}

/* ── Sky ──────────────────────────────────────────────────────────────────
   Kepler's own backdrop: a near-black ground with fine grain, a dim starfield
   in two layers that twinkle against each other, soft nebulae and one wide,
   thin orbit with a point lapping it. Everything that moves is keyed on
   `.sky-live`, which main.js adds only when motion is allowed. */

.sky {
  --sky-ground: color-mix(in oklab, var(--bg), black 45%);
  --sky-glow: var(--brand);
  --sky-glow-alpha: 0.14;
  --sky-nebula-b: oklch(var(--ai-triplet) / 0.06);
  --sky-orbit-alpha: 0.5;
  --sky-orbit-x: -520px;
  --sky-orbit-y: 120px;
  --sky-orbit-turn: -12deg;
  --sky-glow-at: 72% 30%;
  --sky-glow-size: 760px 520px;
  --sky-nebula-b-at: 8% 100%;

  position: relative;
  isolation: isolate;
  background: var(--sky-ground);
}

.sky-field {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .032 -.012'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E"),
    radial-gradient(
      var(--sky-glow-size) at var(--sky-glow-at),
      oklch(var(--sky-glow) / var(--sky-glow-alpha)) 0%,
      oklch(var(--sky-glow) / calc(var(--sky-glow-alpha) * 0.6)) 25%,
      oklch(var(--sky-glow) / calc(var(--sky-glow-alpha) * 0.28)) 50%,
      oklch(var(--sky-glow) / calc(var(--sky-glow-alpha) * 0.08)) 75%,
      transparent 100%
    ),
    radial-gradient(
      640px 420px at var(--sky-nebula-b-at),
      var(--sky-nebula-b) 0%,
      color-mix(in oklab, var(--sky-nebula-b), transparent 60%) 45%,
      transparent 100%
    );
}

.sky-stars,
.sky-stars-b {
  position: absolute;
  inset: 0;
  opacity: 0.55;
}

.sky-stars {
  background:
    radial-gradient(1.3px 1.3px at 6% 12%, oklch(var(--ink) / 0.85), transparent),
    radial-gradient(1px 1px at 18% 64%, oklch(var(--ink) / 0.7), transparent),
    radial-gradient(1.6px 1.6px at 27% 31%, oklch(var(--ink) / 0.9), transparent),
    radial-gradient(1px 1px at 39% 86%, oklch(var(--ink) / 0.6), transparent),
    radial-gradient(1.2px 1.2px at 48% 9%, oklch(var(--ink) / 0.8), transparent),
    radial-gradient(1px 1px at 58% 47%, oklch(var(--ink) / 0.5), transparent),
    radial-gradient(1.5px 1.5px at 69% 22%, oklch(var(--ink) / 0.85), transparent),
    radial-gradient(1px 1px at 77% 71%, oklch(var(--ink) / 0.6), transparent),
    radial-gradient(1.3px 1.3px at 88% 14%, oklch(var(--ink) / 0.8), transparent),
    radial-gradient(1px 1px at 95% 52%, oklch(var(--ink) / 0.6), transparent),
    radial-gradient(1.1px 1.1px at 12% 92%, oklch(var(--ink) / 0.6), transparent),
    radial-gradient(1.4px 1.4px at 84% 90%, oklch(var(--ink) / 0.75), transparent);
}

.sky-stars-b {
  background:
    radial-gradient(1px 1px at 3% 41%, oklch(var(--ink) / 0.6), transparent),
    radial-gradient(1.2px 1.2px at 15% 5%, oklch(var(--ink) / 0.7), transparent),
    radial-gradient(1px 1px at 33% 58%, oklch(var(--ink) / 0.5), transparent),
    radial-gradient(1.4px 1.4px at 44% 74%, oklch(var(--ink) / 0.8), transparent),
    radial-gradient(1px 1px at 53% 28%, oklch(var(--ink) / 0.55), transparent),
    radial-gradient(1.2px 1.2px at 64% 94%, oklch(var(--ink) / 0.7), transparent),
    radial-gradient(1px 1px at 73% 6%, oklch(var(--ink) / 0.6), transparent),
    radial-gradient(1.5px 1.5px at 81% 39%, oklch(var(--ink) / 0.85), transparent),
    radial-gradient(1px 1px at 92% 78%, oklch(var(--ink) / 0.55), transparent),
    radial-gradient(1.2px 1.2px at 98% 26%, oklch(var(--ink) / 0.7), transparent),
    radial-gradient(1.1px 1.1px at 36% 18%, oklch(var(--ink) / 0.6), transparent),
    radial-gradient(1px 1px at 61% 66%, oklch(var(--ink) / 0.5), transparent);
}

.sky-live .sky-stars {
  animation: sky-twinkle calc(var(--duration-kep-beat) * 1.2) ease-in-out infinite alternate;
}

.sky-live .sky-stars-b {
  animation: sky-twinkle calc(var(--duration-kep-beat) * 1.5) ease-in-out infinite alternate-reverse;
}

@keyframes sky-twinkle {
  from {
    opacity: 0.2;
  }
  to {
    opacity: 0.55;
  }
}

/* One wide ellipse, placed never scaled, so the on-screen arc is the same at
   every width; the point's path is the ring's own ellipse. */
.sky-orbit {
  position: absolute;
  left: var(--sky-orbit-x);
  top: var(--sky-orbit-y);
  width: 1400px;
  height: 440px;
  rotate: var(--sky-orbit-turn);
  opacity: var(--sky-orbit-alpha);
}

.sky-orbit svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sky-orbit ellipse {
  fill: none;
  stroke: oklch(var(--sky-glow) / 0.6);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.sky-point {
  position: absolute;
  top: 0;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: color-mix(in oklab, oklch(var(--sky-glow)), white 60%);
  box-shadow: 0 0 10px 3px oklch(var(--sky-glow) / 0.45);
  offset-path: path('M 0 220 a 700 220 0 1 0 1400 0 a 700 220 0 1 0 -1400 0');
  offset-rotate: 0deg;
  offset-distance: 18%;
}

.sky-live .sky-point {
  animation: sky-lap calc(var(--duration-kep-orbit) * 4) linear infinite;
}

@keyframes sky-lap {
  from {
    offset-distance: 0%;
  }
  to {
    offset-distance: 100%;
  }
}

/* The sky warms when something needs you. */
.sky-warm {
  --sky-glow: 0.72 0.155 50;
  --sky-glow-alpha: 0.12;
  --sky-glow-at: 22% 42%;
  --sky-glow-size: 760px 560px;
  --sky-nebula-b: oklch(var(--brand) / 0.06);
  --sky-nebula-b-at: 92% 100%;
  --sky-orbit-x: -700px;
  --sky-orbit-y: 180px;
  --sky-orbit-turn: 10deg;
  --sky-orbit-alpha: 0.35;
}

/* Deeper night for the walk-away: a dream-purple nebula over the phone. */
.sky-night {
  --sky-ground: color-mix(in oklab, var(--bg), black 62%);
  --sky-glow: var(--ai-triplet);
  --sky-glow-alpha: 0.1;
  --sky-glow-at: 76% 26%;
  --sky-glow-size: 720px 520px;
  --sky-nebula-b: oklch(var(--brand) / 0.05);
  --sky-nebula-b-at: 4% 90%;
  --sky-orbit-x: -300px;
  --sky-orbit-y: -160px;
  --sky-orbit-turn: 8deg;
  --sky-orbit-alpha: 0.3;
}

/* Dawn for the download: a brand horizon rising behind Kep. */
.sky-dawn {
  --sky-glow: var(--brand);
  --sky-glow-alpha: 0.2;
  --sky-glow-at: 50% 38%;
  --sky-glow-size: 900px 560px;
  --sky-nebula-b: oklch(var(--ai-triplet) / 0.05);
  --sky-nebula-b-at: 96% 10%;
  --sky-orbit-x: calc(50% - 700px);
  --sky-orbit-y: 110px;
  --sky-orbit-turn: -6deg;
  --sky-orbit-alpha: 0.5;
}

/* ── Kep on the page ──────────────────────────────────────────────────── */

.kep-slot {
  position: relative;
  width: var(--kep-size);
  height: var(--kep-size);
  flex: none;
}

.kep-slot .kep {
  width: 100%;
  height: 100%;
}

/* Off-screen, in a hidden tab or while the visitor has pressed Pause, the
   loops hold where they are, so coming back does not restart the moon mid-lap. */
.is-paused .kep *,
.is-paused .sky-stars,
.is-paused .sky-stars-b,
.is-paused .sky-point,
html.is-hidden .kep *,
html.is-hidden .sky-stars,
html.is-hidden .sky-stars-b,
html.is-hidden .sky-point,
html.is-still .kep *,
html.is-still .sky-stars,
html.is-still .sky-stars-b,
html.is-still .sky-point {
  animation-play-state: paused !important;
}

/* Kep's speech card, in the app's colours: a fill and hairline tinted with
   his teal and a tail pointing at him. The text stays neutral. */
.kep-card {
  --kep-card-fill: color-mix(
    in oklab,
    color-mix(in oklab, var(--sky-ground, var(--bg)), oklch(var(--brand)) 11%),
    oklch(var(--ink)) 6%
  );
  --kep-card-edge: oklch(var(--brand) / 0.34);

  position: relative;
  max-width: 300px;
  padding: 12px 14px;
  border: 1px solid var(--kep-card-edge);
  border-radius: 14px;
  background: var(--kep-card-fill);
  filter: drop-shadow(0 8px 12px oklch(0 0 0 / 0.35));
  font-size: 15px;
  line-height: 1.4;
  color: var(--c-content);
}

.sky-warm .kep-card {
  --kep-card-fill: color-mix(
    in oklab,
    var(--sky-ground, var(--bg)),
    oklch(var(--status-warning)) 9%
  );
  --kep-card-edge: oklch(var(--status-warning) / 0.3);
}

.kep-card-lead {
  margin-bottom: 2px;
  font-weight: 600;
  color: var(--c-ink);
}

.kep-card-line {
  transition: opacity 0.25s ease;
}

.kep-card-line.is-fading {
  opacity: 0;
}

.kep-card-tail {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--kep-card-fill);
  border: 0 solid var(--kep-card-edge);
  rotate: 45deg;
}

.kep-card[data-tail='up'] .kep-card-tail {
  top: -7.5px;
  left: calc(50% - 7px);
  border-top-width: 1px;
  border-left-width: 1px;
  clip-path: polygon(0 0, 100% 0, 100% 22%, 22% 100%, 0 100%);
}

.kep-card[data-tail='right'] .kep-card-tail {
  right: -7.5px;
  top: calc(50% - 7px);
  border-top-width: 1px;
  border-right-width: 1px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 78% 100%, 0 22%);
}

.kep-card[data-tail='left'] .kep-card-tail {
  left: -7.5px;
  top: calc(50% - 7px);
  border-left-width: 1px;
  border-bottom-width: 1px;
  clip-path: polygon(0 0, 22% 0, 100% 78%, 100% 100%, 0 100%);
}

/* ── Hero ───────────────────────────────────────────────────────────────
   The copy is kept short enough that the Dashboard, with the request waiting
   on you, sits inside the first viewport on a laptop and on a phone. */

.hero {
  padding-top: 84px;
  overflow: hidden;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 32px;
  align-items: end;
}

.hero-text {
  max-width: 740px;
}

/* Two lines at every width: the size follows the viewport until the longer
   line fits the container. */
.hero-title {
  font-size: clamp(1.5rem, 7vw, 3.25rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.038em;
  color: var(--c-ink);
}

.hero-lede {
  margin-top: 14px;
  font-size: clamp(1.02rem, 0.94rem + 0.4vw, 1.2rem);
  line-height: 1.45;
  color: var(--c-content);
  text-wrap: pretty;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 20px;
}

.cta-row-center {
  justify-content: center;
}

.cta-alt,
.cta-other {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
  color: var(--c-muted);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: var(--edge-3);
  transition: color 0.18s ease;
}

.cta-alt:hover,
.cta-other:hover {
  color: var(--c-ink);
}

.cta-note {
  margin-top: 8px;
  font-size: 14px;
  color: var(--c-subtle);
  text-wrap: pretty;
}

.section-download .cta-note {
  margin-top: 16px;
}

/* Kep sits on the top edge of the Dashboard he is watching, his card beside
   him. */
.hero-kep {
  --kep-size: clamp(150px, 13vw, 184px);

  position: relative;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 4px;
  margin-bottom: -46px;
}

.hero-kep .kep-card {
  max-width: 250px;
  margin-bottom: 26px;
}

/* Below a wide window the card goes and Kep moves out of the grid to the end
   of the download row, so the headline keeps the full width. */
@media (max-width: 1199px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-text {
    max-width: none;
  }

  .hero-lede {
    max-width: min(740px, 100% - 150px);
  }

  .hero-kep {
    --kep-size: 132px;

    position: absolute;
    right: var(--gutter);
    bottom: -38px;
    margin: 0;
  }

  .hero-kep .kep-card {
    display: none;
  }

  /* Out of the grid, the corners of his box lie over the download row; only
     Kep himself takes the pointer. */
  .hero-kep {
    pointer-events: none;
  }

  .hero-kep .kep-hit {
    pointer-events: auto;
  }
}

/* Too narrow for the second link beside him; the header's Download link and
   the button's own section still lead to every installer. */
@media (max-width: 719px) {
  .hero .cta-other {
    display: none;
  }
}

@media (max-width: 559px) {
  .hero {
    padding-top: 72px;
  }

  .hero-lede {
    max-width: none;
    margin-top: 10px;
    font-size: 1rem;
  }

  .cta-row {
    margin-top: 14px;
  }

  .hero .cta-note {
    max-width: calc(100% - 104px);
  }

  .hero-kep {
    --kep-size: 104px;

    right: calc(var(--gutter) - 6px);
    bottom: -34px;
  }
}

/* ── The loop band ────────────────────────────────────────────────────── */

.band {
  position: relative;
  padding-block: 88px 96px;
  background: var(--bg);
  border-top: 1px solid var(--edge-1);
  border-bottom: 1px solid var(--edge-1);
}

/* The agents, named in one strip under the Dashboard. */
.band-slim {
  padding-block: 22px;
  border-top: 0;
}

.band-slim-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
}

.band-slim-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--c-content);
}

.band-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 40px;
}

.band-title {
  font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.05;
  color: var(--c-ink);
  text-wrap: balance;
}

.band-note {
  font-size: 16px;
  color: var(--c-muted);
  max-width: 420px;
  text-wrap: pretty;
}

/* The loop strip */
.strip {
  display: grid;
  gap: 18px;
  margin-top: 40px;
}

.strip-row {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 10px 32px;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid var(--edge-1);
}

.strip-row dt {
  font-size: 15px;
  font-weight: 500;
  color: var(--c-content);
}

.strip-row .chips {
  margin-top: 0;
}

@media (max-width: 767px) {
  .strip-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Plain chips for sources; AI purple only ever marks an agent. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chips li {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--edge-2);
  background: oklch(var(--ink) / 0.04);
  font-size: 13px;
  font-weight: 500;
  color: var(--c-content);
}

.chips-ai li {
  border-color: oklch(var(--ai-triplet) / 0.3);
  background: oklch(var(--ai-triplet) / 0.1);
  color: var(--ai);
}

/* 01 Agents that start agents */
.chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
}

.chat .pv-msg {
  font-size: 13.5px;
}

.approved-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid oklch(0.72 0.155 150 / 0.3);
  font-size: 12.5px;
  color: var(--c-content);
}

.approved-mark {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--success);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8'/%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4.5 8.5l2.5 2.5 4.5-5.5'/%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%3Ccircle cx='8' cy='8' r='8'/%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4.5 8.5l2.5 2.5 4.5-5.5'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.subagents {
  display: grid;
  gap: 8px;
}

.subagent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 2px 10px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid var(--edge-2);
  border-radius: 10px;
  background: oklch(var(--ink) / 0.03);
  font-size: 13px;
}

.subagent-kind {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ai);
}

.subagent-name {
  min-width: 0;
  color: var(--c-ink);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subagent-status {
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
}

.subagent-status.is-done {
  color: var(--c-muted);
}

.subagent-line {
  grid-column: 1 / -1;
  font-size: 12.5px;
  color: var(--c-muted);
  text-wrap: pretty;
}

.reports-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 10px 12px;
  border: 1px solid oklch(0.72 0.155 50 / 0.4);
  border-radius: 10px;
  background: oklch(0.72 0.155 50 / 0.07);
  font-size: 13px;
  color: var(--c-ink);
}

.fleet-stage[data-state='read'] .reports-strip {
  border-color: var(--edge-2);
  background: transparent;
  color: var(--c-muted);
}

.fleet-stage[data-state='read'] [data-reports-read] {
  display: none;
}

.chat-after {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.4s ease,
    transform 0.4s var(--ease-out);
}

.fleet-stage:not([data-state='read']) .chat-after {
  display: none;
}

.chat-after.is-shown {
  opacity: 1;
  transform: none;
}

.family {
  padding: 12px 16px 14px;
  border-top: 1px solid var(--edge-1);
}

.family-label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-subtle);
}

.family-list {
  display: grid;
  gap: 2px;
}

.family-list li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 28px;
  font-size: 13px;
}

.family-rel {
  font-size: 11.5px;
  color: var(--c-subtle);
}

.family-name {
  min-width: 0;
  color: var(--c-content);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.family-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.fleet-stage:not([data-state='read']) .family-foot {
  display: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--teal);
}

.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--teal);
  opacity: 0.7;
}

/* ── Sections ─────────────────────────────────────────────────────────── */

.section {
  padding-block: 120px;
}

.section-title {
  font-size: clamp(2.25rem, 1.4rem + 3vw, 3.75rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--c-ink);
  text-wrap: balance;
}

.section-title em {
  font-style: normal;
  color: var(--attention);
}

.section-sub {
  margin-top: 14px;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--c-muted);
}

.section-text {
  margin-top: 20px;
  max-width: 620px;
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  line-height: 1.5;
  color: var(--c-content);
  text-wrap: pretty;
}

.section-text .quiet {
  color: var(--c-muted);
}

@media (max-width: 767px) {
  .section {
    padding-block: 80px;
  }
}

/* ── What Kepler handles: four moments, each with a button ────────────── */

.needs-head {
  max-width: 900px;
}

.needs-head .section-title {
  font-size: clamp(2rem, 1.3rem + 2.4vw, 3rem);
}

.needs-head .section-text {
  margin-top: 14px;
  max-width: none;
}

#handles {
  padding-top: 72px;
}

.moments {
  display: flex;
  flex-direction: column;
  gap: 104px;
  margin-top: 56px;
}

.moment {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 40px 72px;
  align-items: center;
}

.moment:nth-child(even) .moment-copy {
  order: 2;
}

.moment-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--attention);
}

.moment-title {
  margin-top: 12px;
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--c-ink);
  text-wrap: balance;
}

.moment-text {
  margin-top: 14px;
  max-width: 480px;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--c-content);
  text-wrap: pretty;
}

.moment-fine {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--c-subtle);
}

.moment-kep {
  --kep-size: clamp(130px, 13vw, 180px);

  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  margin-left: -14px;
}

.moment-kep .kep-card {
  max-width: 250px;
  padding: 10px 12px;
  font-size: 14px;
}

.moment-visual {
  min-width: 0;
}

.moment-hint {
  margin-top: 14px;
  font-size: 13px;
  color: var(--c-subtle);
  text-wrap: pretty;
}

.handles-foot {
  margin-top: 88px;
  padding-top: 28px;
  border-top: 1px solid var(--edge-1);
  font-size: 15px;
  color: var(--c-muted);
  text-wrap: pretty;
}

/* A panel: the shared frame of the sync, usage and review cards */
.panel {
  background: var(--bg-raised);
  border: 1px solid var(--edge-2);
  border-radius: 16px;
  box-shadow:
    0 -1px 0 oklch(var(--ink) / 0.08) inset,
    0 30px 80px oklch(0 0 0 / 0.55);
  font-size: 14px;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--edge-1);
}

.panel-title {
  min-width: 0;
  color: var(--c-ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.panel-sub {
  flex: none;
  color: var(--c-muted);
  font-size: 13px;
}

/* 01 The approval card (interactive) */
.approval-card {
  position: relative;
  padding: 24px 28px 26px;
  background: var(--bg-raised);
  border: 1px solid var(--edge-2);
  border-radius: 16px;
  box-shadow:
    0 -1px 0 oklch(var(--ink) / 0.08) inset,
    0 30px 80px oklch(0 0 0 / 0.55);
  transition:
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}

.approval-stage[data-state='pending'] .approval-card {
  border-color: oklch(0.72 0.155 50 / 0.45);
  box-shadow:
    0 -1px 0 oklch(var(--ink) / 0.08) inset,
    0 30px 80px oklch(0 0 0 / 0.55),
    0 0 90px oklch(0.72 0.155 50 / 0.16);
}

.approval-stage[data-state='approved'] .approval-card {
  border-color: oklch(0.72 0.155 150 / 0.4);
}

.approval-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
}

.approval-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--attention);
  font-weight: 600;
}

.approval-stage[data-state='approved'] .approval-kicker,
.approval-stage[data-state='approved'] .pv-shield {
  color: var(--success);
}

.approval-stage[data-state='denied'] .approval-kicker,
.approval-stage[data-state='denied'] .pv-shield {
  color: var(--c-muted);
}

.approval-head .pv-shield {
  color: var(--attention);
  transition: color 0.4s ease;
}

.approval-task {
  color: var(--c-subtle);
}

.approval-task::before {
  content: '';
  display: inline-block;
  width: 1px;
  height: 12px;
  margin-right: 8px;
  background: var(--edge-3);
  vertical-align: -1px;
}

.approval-title {
  margin-top: 14px;
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--c-ink);
  text-wrap: pretty;
}

.approval-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, auto));
  gap: 12px 28px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--edge-1);
  font-size: 14px;
}

.approval-meta dt {
  margin-bottom: 2px;
  color: var(--c-subtle);
  font-size: 12.5px;
}

.approval-meta dd {
  color: var(--c-content);
}

.approval-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.approval-actions .button {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
  white-space: normal;
  text-align: left;
}

.approval-deny {
  margin-left: auto;
  color: var(--c-muted);
  background: transparent;
}

.approval-note {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--c-subtle);
}

.approval-stage:not([data-state='pending']) .approval-actions,
.approval-stage:not([data-state='pending']) .approval-note,
.approval-stage[data-state='pending'] .approval-result {
  display: none;
}

.approval-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-top: 22px;
}

.approval-outcome {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  color: var(--c-content);
  text-wrap: pretty;
}

.approval-outcome b {
  color: var(--c-ink);
}

.outcome-mark {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
}

.outcome-mark svg {
  width: 12px;
  height: 12px;
  stroke: var(--on-teal);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.approval-stage[data-state='approved'] .outcome-mark {
  background: var(--success);
}

.approval-stage[data-state='denied'] .outcome-mark {
  background: var(--c-subtle);
}

.approval-stage[data-state='approved'] .outcome-denied,
.approval-stage[data-state='denied'] .outcome-approved {
  display: none;
}

.approval-replay {
  margin-left: auto;
}

/* 02 The sync panel */
.sync-files {
  padding: 4px 0;
}

.sync-file {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--edge-1);
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.4s ease,
    transform 0.4s var(--ease-out);
}

.sync-file.is-shown {
  opacity: 1;
  transform: none;
}

.sync-path {
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--c-ink);
  overflow-wrap: anywhere;
}

.sync-method {
  padding: 2px 8px;
  border: 1px solid var(--edge-2);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-content);
}

.sync-method-ai {
  border-color: oklch(var(--ai-triplet) / 0.3);
  background: oklch(var(--ai-triplet) / 0.1);
  color: var(--ai);
}

.sync-reason {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--c-muted);
  text-wrap: pretty;
}

.sync-reason-check {
  color: var(--warning);
}

.sync-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
}

.sync-verdict {
  font-weight: 600;
  color: var(--c-muted);
}

.sync-stage[data-step='4'] .sync-verdict {
  color: var(--warning);
}

.sync-stage[data-step='5'] .sync-verdict {
  color: var(--success);
}

.sync-actions {
  display: none;
  gap: 8px;
  margin-left: auto;
}

.sync-stage[data-step='4'] .sync-actions {
  display: inline-flex;
}

.sync-applied {
  font-size: 13.5px;
  color: var(--c-content);
}

.sync-replay {
  margin-left: auto;
}

.sync-stage:not([data-step='5']) .sync-replay,
.sync-stage[data-step='4'] .sync-replay {
  display: none;
}

.sync-stage[data-step='5'] .sync-replay {
  display: inline-flex;
}

/* 03 The usage panel */
.usage-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding: 14px 20px 10px;
}

.usage-live {
  min-width: 0;
  font-size: 14px;
  color: var(--warning);
}

.usage-live .dot {
  background: var(--warning);
}

.usage-stage[data-step='2'] .usage-live {
  color: var(--success);
}

.usage-stage[data-step='2'] .usage-live .dot {
  background: var(--success);
}

.usage-why {
  font-size: 13px;
  color: var(--c-muted);
}

.usage-bars {
  display: grid;
  gap: 12px;
  padding: 4px 20px 14px;
}

.usage-bar {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.usage-bar dt {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-subtle);
}

.usage-bar dd {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  font-size: 12.5px;
}

.usage-track {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: oklch(var(--ink) / 0.08);
  overflow: hidden;
}

.usage-fill {
  display: block;
  height: 100%;
  width: var(--fill, 100%);
  border-radius: 3px;
  background: var(--fill-color, var(--danger));
  transition:
    width 1.1s var(--ease-out),
    background-color 0.5s ease;
}

.usage-bar-week .usage-fill {
  --fill: 62%;
  --fill-color: var(--teal);
}

.usage-stage[data-step='2'] [data-usage-bar='5h'] .usage-fill {
  --fill: 3%;
  --fill-color: var(--teal);
}

.usage-value {
  color: var(--c-content);
  font-variant-numeric: tabular-nums;
}

.usage-reset {
  color: var(--c-subtle);
}

.usage-queue {
  display: grid;
  gap: 3px;
  margin: 0 20px 14px;
  padding: 10px 12px;
  border: 1px dashed var(--edge-2);
  border-radius: 10px;
  transition: opacity 0.4s ease;
}

.usage-stage[data-step='2'] .usage-queue {
  border-style: solid;
  border-color: oklch(0.72 0.155 150 / 0.4);
}

.usage-queue-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-subtle);
}

.usage-stage[data-step='2'] .usage-queue-label {
  color: var(--success);
}

.usage-queue-prompt {
  color: var(--c-ink);
  font-size: 13.5px;
}

.usage-queue-note {
  font-size: 12.5px;
  color: var(--c-muted);
}

.usage-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 20px;
  border-top: 1px solid var(--edge-1);
}

.usage-alt {
  font-size: 13px;
  color: var(--teal);
}

.usage-clock {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--c-subtle);
}

.usage-stage:not([data-step='2']) .usage-replay {
  visibility: hidden;
}

/* 04 The diff and its thread */
.diff {
  padding: 8px 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
}

.diff-line {
  display: flex;
  gap: 14px;
  padding: 1px 20px;
  color: var(--c-content);
  white-space: pre;
  overflow: hidden;
}

.diff-line code {
  font: inherit;
  text-overflow: ellipsis;
  overflow: hidden;
}

.diff-num {
  flex: none;
  width: 22px;
  color: var(--c-subtle);
  text-align: right;
}

.diff-add {
  background: oklch(0.72 0.155 150 / 0.1);
}

.diff-del {
  background: oklch(0.72 0.155 22 / 0.1);
  color: var(--c-muted);
}

.diff-commented {
  box-shadow: inset 3px 0 0 var(--warning);
}

.thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 20px 18px;
  padding: 12px 14px;
  border: 1px solid var(--edge-2);
  border-radius: 12px;
  background: var(--bg);
}

.thread-comment,
.thread-reply {
  display: grid;
  gap: 3px;
}

.thread-who {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-muted);
}

.thread-agent {
  color: var(--ai);
}

.thread-text {
  color: var(--c-ink);
  text-wrap: pretty;
}

.thread-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.thread-reply {
  padding-top: 10px;
  border-top: 1px solid var(--edge-1);
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.4s ease,
    transform 0.4s var(--ease-out);
}

.thread-reply.is-shown {
  opacity: 1;
  transform: none;
}

.review-stage:not([data-state='sent']) .thread-reply,
.review-stage:not([data-state='draft']) .thread-actions,
.review-stage[data-state='draft'] .thread-foot {
  display: none;
}

.thread-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.thread-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--success);
}

.review-stage[data-state='queued'] .thread-status {
  color: var(--c-muted);
}

.thread-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

@media (max-width: 899px) {
  .moments {
    gap: 72px;
    margin-top: 56px;
  }

  .moment {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  /* In one column the demo follows its sentence, ahead of the small print and
     Kep, so each moment shows itself before it explains itself. */
  .moment-copy,
  .moment:nth-child(even) .moment-copy {
    display: contents;
  }

  .moment-visual {
    order: 1;
    margin-top: 24px;
  }

  .moment-fine {
    order: 2;
    margin-top: 18px;
  }

  .moment-kep {
    order: 3;
  }

  .moment-kep {
    --kep-size: clamp(120px, 30vw, 160px);
  }

  .approval-meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .approval-card {
    padding: 20px 20px 22px;
  }

  .handles-foot {
    margin-top: 64px;
  }
}

/* Walk away: what keeps going while you are gone */
.away-facts {
  display: grid;
  gap: 20px;
  margin-top: 32px;
}

.away-facts h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--c-ink);
}

.away-facts p {
  margin-top: 4px;
  font-size: 15px;
  color: var(--c-muted);
  text-wrap: pretty;
}

/* ── Walk away ────────────────────────────────────────────────────────── */

.away {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 56px 80px;
  align-items: center;
}

/* Kep asleep over the phone, his dream drifting up into the nebula. */
.nap {
  --kep-size: clamp(170px, 18vw, 230px);

  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-self: center;
  width: 100%;
  max-width: 380px;
  padding-top: 96px;
}

.nap .phone {
  width: 100%;
  max-width: 320px;
}

.nap .kep-slot {
  position: relative;
  z-index: 1;
  margin-left: -24px;
  margin-bottom: calc(var(--kep-size) * -0.22);
}

.nap .phone {
  position: relative;
}

@media (max-width: 899px) {
  .away {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
  }

  .nap {
    --kep-size: clamp(150px, 40vw, 200px);

    justify-self: start;
    padding-top: 84px;
  }
}

/* ── Download ─────────────────────────────────────────────────────────── */

.download-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.download-kep {
  --kep-size: clamp(190px, 20vw, 270px);

  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 36px;
}

.download-kep .kep-card {
  margin-top: -12px;
  text-align: center;
}

.download-head .section-title {
  margin-top: 18px;
}

.download-head .section-text {
  margin-top: 16px;
}

.download-head .cta-row {
  margin-top: 30px;
}

.download-head .button-primary {
  min-height: 56px;
  padding: 0 30px;
  font-size: 18px;
  border-radius: 14px;
}
/* ── Dashboard visual ─────────────────────────────────────────────────────
   A stylised rendition of the real Dashboard: the top bar, the views as tabs,
   the toolbar, the list grouped by Inbox, and the preview pane showing the
   selected task's session with its approval card pinned above the composer. */

.fleet-wrap {
  position: relative;
  z-index: 1;
  margin-top: 26px;
}

.fleet-glow {
  position: absolute;
  left: 50%;
  top: -60px;
  width: min(900px, 90vw);
  height: 360px;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at 50% 20%,
    oklch(var(--brand) / 0.42) 0%,
    oklch(var(--brand) / 0.1) 45%,
    transparent 70%
  );
  filter: blur(24px);
  pointer-events: none;
}

.fleet {
  position: relative;
  height: 500px;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, #000 86%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 86%, transparent 100%);
  font-size: 13.5px;
  line-height: 1.3;
  color: var(--c-content);
  user-select: none;
}

.fleet-window {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg-raised);
  border: 1px solid var(--edge-2);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px oklch(0 0 0 / 0.6),
    0 -1px 0 oklch(var(--ink) / 0.08) inset,
    0 40px 100px oklch(0 0 0 / 0.6);
}

/* Top bar */
.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid var(--edge-1);
}

.app-new {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  background: oklch(var(--ink) / 0.07);
  color: var(--c-ink);
  font-weight: 500;
}

.app-plus {
  color: var(--c-muted);
  font-weight: 400;
}

.app-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--c-muted);
}

.app-ask {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--c-content);
}

.app-icon {
  width: 15px;
  height: 15px;
  background: var(--c-muted);
  mask: var(--glyph) center / contain no-repeat;
  -webkit-mask: var(--glyph) center / contain no-repeat;
}

.app-icon-feedback {
  --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.5' stroke-linejoin='round' d='M2.5 3.5h11v7h-6l-3 2.5v-2.5h-2z'/%3E%3C/svg%3E");
}

.app-icon-settings {
  --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='2.2' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.5' d='M8 1.8v2M8 12.2v2M1.8 8h2M12.2 8h2M3.6 3.6l1.4 1.4M11 11l1.4 1.4M3.6 12.4 5 11M11 5l1.4-1.4'/%3E%3C/svg%3E");
}

.app-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), #7cd0bf);
}

/* Views */
.app-views {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 36px;
  padding: 0 10px;
  border-bottom: 1px solid var(--edge-1);
}

.app-view {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 11px;
  border-radius: 7px 7px 0 0;
  color: var(--c-muted);
}

.app-view.is-active {
  color: var(--c-ink);
  background: oklch(var(--ink) / 0.06);
  box-shadow: inset 0 -2px 0 var(--teal);
}

.app-view-add {
  color: var(--c-subtle);
}

.app-view-right {
  margin-left: auto;
}

/* Toolbar */
.app-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid var(--edge-1);
}

.app-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 300px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--edge-1);
  border-radius: 7px;
  background: var(--bg-sunken);
  color: var(--c-subtle);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
}

.app-search::before {
  content: '';
  flex: none;
  width: 12px;
  height: 12px;
  background: var(--c-subtle);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='7' cy='7' r='4.5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3Cpath stroke='%23000' stroke-width='1.6' stroke-linecap='round' d='M10.5 10.5 14 14'/%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%3Ccircle cx='7' cy='7' r='4.5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3Cpath stroke='%23000' stroke-width='1.6' stroke-linecap='round' d='M10.5 10.5 14 14'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.app-tool {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--edge-2);
  border-radius: 7px;
  color: var(--c-muted);
  font-size: 12.5px;
  white-space: nowrap;
}

.app-tool b {
  color: var(--c-content);
  font-weight: 500;
}

.app-tool-right {
  margin-left: auto;
}

.app-tool-preview {
  width: 28px;
  padding: 0;
  justify-content: center;
}

.app-tool-preview::before {
  content: '';
  width: 13px;
  height: 11px;
  border: 1.5px solid var(--c-muted);
  border-radius: 2px;
  box-shadow: inset -4px 0 0 var(--c-muted);
}

/* Body: list and preview */
.app-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  flex: 1;
  min-height: 0;
}

.app-list {
  padding: 6px 0 12px;
  min-width: 0;
}

.grp-head {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-subtle);
}

.grp-head b {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0;
}

.grp-rows {
  position: relative;
}

.row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  height: 40px;
  margin: 0 8px;
  padding: 0 12px;
  border-radius: 8px;
  transition:
    transform 0.55s var(--ease-out),
    opacity 0.4s ease,
    background-color 0.4s ease;
  will-change: transform;
}

.row.is-selected {
  background: oklch(var(--ink) / 0.06);
}

.row.st-needs {
  background: oklch(0.72 0.155 50 / 0.08);
}

.row.is-leaving {
  opacity: 0;
  transform: translateX(16px);
}

.row.is-entering {
  opacity: 0;
  transform: translateY(10px);
}

.row-title {
  min-width: 0;
  color: var(--c-ink);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  white-space: nowrap;
}

.row-repo {
  color: var(--c-subtle);
}

.row-pr {
  padding: 1px 6px;
  border: 1px solid var(--edge-2);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--c-muted);
}

.row-stage {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--info);
  transition: color 0.4s ease;
}

.st-pr .row-stage {
  color: var(--warning);
}

.st-merged .row-stage {
  color: var(--merged);
}

.st-alert .row-stage {
  color: var(--warning);
}

.st-todo .row-stage,
.is-exploring .row-stage {
  color: var(--c-muted);
}

.row-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 118px;
  font-weight: 600;
  color: var(--c-muted);
  transition: color 0.4s ease;
}

.dot {
  flex: none;
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--edge-3);
  transition:
    background-color 0.4s ease,
    box-shadow 0.4s ease;
}

.st-needs .row-state,
.phone-state.st-needs {
  color: var(--attention);
}

.st-needs .dot,
.dot.st-needs {
  background: var(--attention);
  box-shadow: 0 0 0 3px oklch(0.72 0.155 50 / 0.2);
}

.st-working .row-state {
  color: var(--success);
}

.st-working .dot {
  background: var(--success);
}

.st-pr .dot {
  background: var(--c-subtle);
}

.st-merged .row-state {
  color: var(--c-subtle);
}

/* A pull request's trouble, named on the row. */
.st-alert .row-state {
  color: var(--danger);
}

.st-alert .dot {
  background: var(--danger);
}

.st-merged .dot {
  background: var(--merged);
}

.row-age {
  width: 30px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--c-subtle);
  text-align: right;
}

.agent-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 6px;
  background: oklch(var(--ai-triplet) / 0.12);
  color: var(--ai);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Preview pane: the selected task's session */
.app-preview {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-left: 1px solid var(--edge-1);
  background: var(--bg);
}

.pv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid var(--edge-1);
}

.pv-title {
  min-width: 0;
  color: var(--c-ink);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-transcript {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
}

.pv-msg {
  padding: 8px 10px;
  border-radius: 10px;
  background: oklch(var(--ink) / 0.04);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--c-content);
  text-wrap: pretty;
}

.pv-user {
  align-self: flex-end;
  max-width: 88%;
  background: var(--teal-soft);
  color: var(--c-ink);
}

.pv-after {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.pv-after.is-shown {
  opacity: 1;
}

.pv-approval {
  margin: 0 14px 10px;
  padding: 10px 12px;
  border: 1px solid oklch(0.72 0.155 50 / 0.45);
  border-radius: 10px;
  background: oklch(0.72 0.155 50 / 0.08);
  transition:
    opacity 0.3s ease,
    border-color 0.3s ease;
}

.app-preview.is-resolved .pv-approval {
  display: none;
}

.pv-approval-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--attention);
}

.pv-shield {
  flex: none;
  width: 12px;
  height: 12px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5 2.5 3.8v4c0 3.4 2.3 5.6 5.5 6.7 3.2-1.1 5.5-3.3 5.5-6.7v-4z'/%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='M8 1.5 2.5 3.8v4c0 3.4 2.3 5.6 5.5 6.7 3.2-1.1 5.5-3.3 5.5-6.7v-4z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.pv-approval-summary {
  margin-top: 5px;
  color: var(--c-ink);
  font-weight: 600;
  font-size: 13px;
}

.pv-approval-detail {
  margin-top: 1px;
  color: var(--c-muted);
  font-size: 12px;
}

.pv-approval-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}

.mini-button {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 11px;
  border-radius: 7px;
  border: 1px solid var(--edge-2);
  background: oklch(var(--ink) / 0.06);
  color: var(--c-ink);
  font-weight: 600;
  font-size: 12.5px;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.mini-approve {
  background: var(--teal);
  border-color: transparent;
  color: var(--on-teal);
}

.mini-caret {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.8;
}

.mini-deny {
  color: var(--c-muted);
  background: transparent;
}

.mini-approve.is-pressed {
  background: var(--teal-hover);
  transform: scale(0.97);
}

.mini-done {
  display: none;
  align-items: center;
  gap: 6px;
  height: 28px;
  color: var(--success);
  font-weight: 600;
  font-size: 12.5px;
}

.mini-done::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--success);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-7'/%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 fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.app-preview.is-approved .mini-approve,
.app-preview.is-approved .mini-deny {
  display: none;
}

.app-preview.is-approved .mini-done {
  display: inline-flex;
}

.pv-composer {
  display: block;
  height: 36px;
  line-height: 34px;
  margin: 0 14px 14px;
  padding: 0 12px;
  border: 1px solid var(--edge-2);
  border-radius: 10px;
  color: var(--c-subtle);
  font-size: 12.5px;
}

/* Dashboard responsive. The desktop app keeps the list beside the session at
   every window width, so the split stays and the rows shed columns. */
@media (max-width: 1199px) {
  .app-body {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .row-repo {
    display: none;
  }
}

@media (max-width: 959px) {
  .app-body {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .app-view-right,
  .app-tool:not(.app-tool-preview):not(:nth-of-type(3)),
  .row-age,
  .row-pr,
  .row-stage {
    display: none;
  }

  .row-state {
    min-width: 0;
  }
}

/* On a phone the app shows one of the two: the list, or the task's session
   come over it. Here the session is drawn part of the way up, so the row and
   the request it raised are read together. */
@media (max-width: 767px) {
  /* The whole window shows here, and the session rests on its bottom edge:
     once the request is answered the session is shorter and the list behind
     it shows what the approval started. */
  .fleet {
    height: 480px;
    font-size: 13px;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .fleet-window {
    height: 100%;
    overflow: hidden;
  }

  .app-bar-right .app-icon,
  .app-tools,
  .app-preview .pv-user,
  .app-preview [data-pv-reply] {
    display: none;
  }

  .app-body {
    display: flex;
    flex-direction: column;
  }

  .app-list {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
  }

  .app-preview {
    position: relative;
    flex: none;
    margin: 0 6px;
    border: 1px solid var(--edge-2);
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -14px 30px oklch(0 0 0 / 0.55);
  }

  .pv-head {
    height: 40px;
  }

  .pv-transcript {
    padding-block: 10px 0;
  }

  .pv-after {
    margin-bottom: 10px;
  }

  .fleet-wrap .fleet-controls {
    margin-top: 8px;
  }
}

/* Pause control under the Dashboard */
.fleet-controls {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  margin-top: -36px;
}

.fleet-toggle {
  gap: 6px;
}

.fleet-toggle svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.fleet-toggle .icon-play {
  display: none;
}

.fleet-toggle.is-paused .icon-pause {
  display: none;
}

.fleet-toggle.is-paused .icon-play {
  display: block;
}

.phone {
  width: 100%;
  max-width: 320px;
  background: var(--bg-sunken);
  border: 1px solid var(--edge-2);
  border-radius: 28px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.7),
    0 -1px 0 rgba(255, 255, 255, 0.08) inset,
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 100px rgba(63, 166, 147, 0.1);
  overflow: hidden;
  font-size: 13px;
  line-height: 1.3;
  user-select: none;
}

.phone-browser {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 10px;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--edge-1);
}

.phone-browser-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--edge-3);
}

.phone-address {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--c-muted);
  font-size: 12.5px;
}

.phone-address svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  stroke: currentColor;
}

.phone-screen {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phone-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.phone-title {
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--c-ink);
  letter-spacing: -0.01em;
}

.phone-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--edge-1);
  font-size: 12px;
  font-weight: 600;
}

.phone-screen .pv-msg {
  font-size: 13px;
}

.phone-composer {
  margin: 8px 0 0;
  height: 40px;
  line-height: 38px;
  font-size: 13px;
}

.fine-print {
  margin-top: 6px;
  font-size: 14px;
  color: var(--c-subtle);
}

.platforms {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 24px;
  margin-top: 72px;
}

.platform-stack {
  display: grid;
  gap: 24px;
  align-content: start;
}

@media (max-width: 899px) {
  .platforms {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 48px;
  }

  .platform-stack {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 559px) {
  .platform-stack {
    grid-template-columns: minmax(0, 1fr);
  }
}

.platform {
  padding: 20px 22px 10px;
  background: var(--bg-raised);
  border: 1px solid var(--edge-1);
  border-radius: 14px;
}

.platform-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--c-ink);
  margin-bottom: 10px;
}

.installers li {
  border-top: 1px solid var(--edge-1);
}

.installers a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin-inline: -8px;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--c-content);
}

.installers a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--c-ink);
}

.installer-arch {
  font-weight: 500;
}

.installer-file {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--c-muted);
  text-align: right;
  overflow-wrap: anywhere;
}

.installers a:hover .installer-file {
  color: var(--c-content);
}

.installer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.installer-table th,
.installer-table td {
  padding: 0;
  text-align: left;
  border-top: 1px solid var(--edge-1);
  vertical-align: middle;
}

.installer-table thead th {
  height: 32px;
  padding-bottom: 2px;
  border-top: 0;
  font-weight: 500;
  font-size: 12.5px;
  color: var(--c-subtle);
}

.installer-table tbody th {
  height: 48px;
  padding-right: 16px;
  font-weight: 500;
  color: var(--c-content);
  white-space: nowrap;
}

.installer-table td {
  width: 36%;
}

.installer-table td a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: -8px;
  padding: 0 8px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--c-muted);
}

.installer-table td a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--c-ink);
}

.installer-none {
  font-size: 12.5px;
  color: var(--c-subtle);
}

@media (max-width: 559px) {
  .installer-table thead {
    display: none;
  }

  .installer-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 10px 0 8px;
    border-top: 1px solid var(--edge-1);
  }

  .installer-table tbody th,
  .installer-table td {
    height: auto;
    width: auto;
    border-top: 0;
  }

  .installer-table tbody th {
    padding-bottom: 2px;
  }

  .installer-table td a {
    min-height: 40px;
  }

  .installer-none {
    display: none;
  }
}
/* Footer */

.site-footer {
  border-top: 1px solid var(--edge-1);
  padding-block: 36px;
  font-size: 14px;
  color: var(--c-subtle);
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.footer-brand img {
  border-radius: 6px;
}

.footer-brand > span:nth-child(2) {
  color: var(--c-content);
  font-weight: 600;
}

.footer-tagline::before {
  content: '';
  display: inline-block;
  width: 1px;
  height: 12px;
  margin-right: 10px;
  background: var(--edge-3);
  vertical-align: -1px;
}

.footer-legal a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--c-muted);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--edge-3);
}

.footer-legal a:hover {
  color: var(--c-ink);
  text-decoration-color: currentColor;
}

@media (max-width: 639px) {
  .footer-tagline {
    display: none;
  }
}

/* ── Reduced motion ───────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fleet-controls {
    display: none;
  }

  .row,
  .row-stage,
  .row-state,
  .dot,
  .mini-button,
  .button,
  .kep-card-line,
  .pv-after,
  .pv-approval,
  .approval-card,
  .sync-file,
  .usage-fill,
  .usage-queue,
  .thread-reply,
  .chat-after {
    transition: none;
  }

  /* Belt and braces for a page whose script did not run: the moving layers
     take their resting frame. main.js never adds the live classes here. */
  .no-js .sky-stars,
  .no-js .sky-stars-b,
  .no-js .sky-point {
    animation: none;
  }
}
