/* wrok.in landing — implements the BytesBrains design spec.
   Dark "ink-slate" canvas, cyan interaction / green = live, mono terminal motif. */

:root {
  --bg: #0b0f14;
  --bg-raised: #0e141b;
  --surface: #121a23;
  --surface-hover: #16202b;
  --border: #1e2a36;
  --border-strong: #2b3b4a;
  --text: #e6edf3;
  --text-2: #9fb0c0;
  --muted: #5e7184;
  --accent: #36c6f0;
  --accent-hover: #5ad4f5;
  --indigo: #7c8cf8;
  --ok: #3fd17a;
  --warn: #e0a14b;
  --c-string: #9ecbff;
  --c-kw: #c792ea;

  /* wrokin logo palette — the multi-color blocks, sampled from the mark */
  --logo-blue: #1e74ec;
  --logo-purple: #8a54ec;
  --logo-red: #f03e42;
  --logo-orange: #f0800f;
  --logo-yellow: #f5b81a;
  --logo-green: #1eaf37;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1120px;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.01em; margin: 0; }
.mono { font-family: var(--font-mono); }
.accent { color: var(--accent); }
.dim { color: var(--muted); }
code.mono { background: #0a1119; border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; font-size: 0.9em; color: var(--text-2); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Skip link + a11y */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #06121a; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 12px; top: 12px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 2px; border-radius: 4px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 500; font-size: 15px;
  padding: 12px 20px; border-radius: 8px; border: 1px solid transparent;
  cursor: pointer; transition: all 150ms ease; line-height: 1;
}
.btn-primary { background: var(--accent); color: #06121a; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
/* Force the ink-dark label on the cyan fill in EVERY state. Without this, the primary
   button placed inside .nav-menu inherits the low-contrast nav-link colour (.nav-menu a
   and :hover out-specify .btn-primary), which rendered the CTA text nearly invisible.
   These selectors carry the class-count to win, and are theme-agnostic (the button owns
   its own fill + label, so it reads correctly on any background, light or dark). */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:visited,
.nav-menu a.btn-primary,
.nav-menu a.btn-primary:hover,
.nav-menu a.btn-primary:focus,
.nav-menu a.btn-primary:visited { color: #06121a; }
.btn-primary .mono, .nav-menu a.btn-primary .mono { color: #06121a; }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-hover); border-color: var(--accent); }
.btn.full { width: 100%; justify-content: center; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.cta-row.center { justify-content: center; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 20, 0.72); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px; height: 92px;
  display: flex; align-items: center; justify-content: space-between;
}
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--text); display: inline-flex; align-items: center; }
.wordmark .mono { font-weight: 400; font-size: 17px; }
.wordmark img { height: 60px; width: auto; display: block; }
.foot-brand .wordmark img { height: 40px; }
.nav-menu { display: flex; align-items: center; gap: 22px; }
.nav-menu a { color: var(--text-2); font-size: 15px; }
.nav-menu a:hover { color: var(--text); }
.nav-cta { color: #06121a; }
/* The two nav buttons read as one action group, set slightly apart from the
   section links so the bar doesn't look like six equal-weight items. */
.nav-menu .btn { padding: 9px 16px; font-size: 14px; }
.nav-dash { margin-left: 6px; }
.nav-menu a.nav-dash, .nav-menu a.nav-dash:hover { color: var(--text); }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 6px; }

/* Eyebrow + sections */
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); margin: 0 0 14px;
}
section { padding: 112px 0; }
.band { background: var(--bg-raised); }
h2 { font-size: 38px; line-height: 1.12; max-width: 20ch; }
.section-sub { color: var(--text-2); font-size: 19px; margin: 12px 0 0; max-width: 60ch; }

/* Gutter rail motif — thin accent line on the left of content at wide screens */
@media (min-width: 960px) {
  .rail .wrap { position: relative; }
  .rail .wrap::before {
    content: ""; position: absolute; left: -28px; top: 6px; bottom: 6px;
    width: 1px; background: linear-gradient(var(--border), transparent);
  }
}

/* Hero */
.hero { padding-top: 80px; }
/* fr, not percentages: `52% 48%` sums to 100% and then ADDS the 48px gap, so the
   hero pushed the page 48px wider than the viewport at every width between the
   900px single-column breakpoint and the point where --maxw absorbs it (~1090px).
   minmax(0, …) also lets the terminal's `overflow-x: auto` actually engage instead
   of the pre forcing the track wider than its share. */
.hero-grid { display: grid; grid-template-columns: minmax(0, 52fr) minmax(0, 48fr); gap: 48px; align-items: center; }
.hero h1 { font-size: 60px; line-height: 1.05; letter-spacing: -0.02em; }
.lead { color: var(--text-2); font-size: 19px; margin: 22px 0 0; max-width: 46ch; }
.trust { color: var(--muted); font-size: 13px; margin-top: 22px; }
.hero-alt { color: var(--muted); font-size: 14px; margin: 16px 0 0; }
.hero-alt a { color: var(--accent); font-weight: 500; }
.hero-alt a:hover { color: var(--accent-hover); text-decoration: underline; }
/* Forge row under the hero CTA (#51). Badges sit inline here, so .badge-live's
   card-corner positioning is turned off, as in #review's eyebrow. */
.forges { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 13px; }
.forges li { display: inline-flex; align-items: center; gap: 8px; }
.forges .badge { font-size: 11px; padding: 2px 7px; }
.forges .badge-live { position: static; top: auto; right: auto; background: transparent; }
.forges .forge-st { color: var(--muted); border: 1px dashed color-mix(in srgb, var(--muted) 50%, transparent); border-radius: 6px; padding: 2px 7px; font-size: 11px; }

/* Hero chips — the jump row above the terminal. Each carries its own tint via
   `--c` (the same pattern the agent cards use) so status reads at a glance in the
   dot, the status word, and the hover border without four bespoke rules.
   Ragged right edge is intentional — equal-width chips stretched to the terminal's
   width stop reading as chips and start reading as a button bar. */
.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }
.hero-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1; color: var(--text-2);
  border: 1px solid var(--border); border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  padding: 8px 13px; transition: all 150ms ease;
}
.hero-chip:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--c) 55%, var(--border));
  background: color-mix(in srgb, var(--c) 10%, var(--surface));
  transform: translateY(-1px);
}
.hero-chip-dot {
  width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 20%, transparent);
}
.hero-chip-st {
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--c);
}

/* Terminal device */
.terminal { background: #0a1119; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.hero-device .terminal { box-shadow: 0 0 0 1px var(--border-strong), 0 24px 60px -30px rgba(54, 198, 240, 0.25); }
.term-bar { height: 36px; display: flex; align-items: center; gap: 7px; padding: 0 14px; border-bottom: 1px solid var(--border); position: relative; }
.dot { width: 10px; height: 10px; border-radius: 50%; opacity: 0.7; }
.dot.r { background: #ff5f56; } .dot.y { background: #ffbd2e; } .dot.g { background: #27c93f; }
.term-title { position: absolute; left: 0; right: 0; text-align: center; color: var(--muted); font-size: 12px; }
.term-body { margin: 0; padding: 18px 20px; font-size: 13.5px; line-height: 1.7; color: var(--text); white-space: pre; overflow-x: auto; }
.c-comment { color: var(--muted); } .c-kw { color: var(--c-kw); } .c-string { color: var(--c-string); }
.ok { color: var(--ok); } .warn { color: var(--warn); }
.caret { color: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Animated hero terminal — cross-fades through what the agents do (hero.js).
   Scenes are stacked absolutely inside a fixed-height stage so cycling never
   shifts the layout; each scene is exactly 6 lines to keep the height stable. */
.term-stage { position: relative; min-height: 176px; }
.term-stage .term-scene {
  position: absolute; inset: 0; opacity: 0; transform: translateY(5px);
  transition: opacity 480ms ease, transform 480ms ease; pointer-events: none;
}
.term-stage .term-scene.is-active { opacity: 1; transform: none; pointer-events: auto; }
.hero-term .term-title { transition: opacity 240ms ease; }
.term-tabs { display: flex; gap: 7px; padding: 2px 20px 16px; }
.term-tab {
  flex: 1; height: 3px; padding: 0; border: 0; border-radius: 3px;
  background: var(--border-strong); cursor: pointer; transition: background 200ms ease;
}
.term-tab:hover { background: var(--muted); }
.term-tab.is-active { background: var(--accent); }
.term-scene .badge-beta { margin-left: 2px; vertical-align: 1px; }
@media (prefers-reduced-motion: reduce) {
  .term-stage .term-scene { transition: none; transform: none; }
}

/* Grids + cards */
.grid { display: grid; gap: 24px; margin-top: 40px; }
.grid-value { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-steps { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); list-style: none; padding: 0; counter-reset: none; }
.grid-soon { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 20px; }
.grid-pricing { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; list-style: none; padding: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card-value { transition: all 150ms ease; }
.card-value:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.card h3 { font-size: 22px; font-weight: 500; margin: 0 0 8px; }
.card p { color: var(--text-2); font-size: 15px; margin: 0; }
.ico { display: inline-flex; color: var(--accent); margin-bottom: 14px; }
.ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.principle h3 { font-size: 20px; font-weight: 500; margin-bottom: 6px; }
.principle p { color: var(--text-2); font-size: 15px; }

/* Steps */
.step { position: relative; }
.step-n { color: var(--muted); font-size: 13px; }
.step h3 { font-size: 19px; margin: 8px 0 6px; }

/* Product flagship */
.card-product-live {
  margin-top: 40px; padding: 0; border-color: var(--border-strong);
  box-shadow: inset 3px 0 0 var(--ok);
  display: grid; grid-template-columns: 1.1fr 0.9fr; overflow: hidden;
}
.card-product-oss {
  margin-top: 28px; padding: 0; border-color: var(--border-strong);
  box-shadow: inset 3px 0 0 var(--indigo);
  display: grid; grid-template-columns: 1.1fr 0.9fr; overflow: hidden;
}
.cpl-copy { padding: 32px; }
.kicker { color: var(--accent); font-size: 13px; margin: 0 0 10px; }
.cpl-copy h3 { font-size: 26px; font-weight: 700; margin-bottom: 12px; }
.cpl-device { position: relative; padding: 32px; background: var(--bg-raised); border-left: 1px solid var(--border); display: flex; align-items: center; }
.cpl-device .terminal.sm { width: 100%; }
.feature-list { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 10px; }
.feature-list li { color: var(--text-2); font-size: 15px; display: flex; gap: 10px; align-items: start; }
.feature-list strong { color: var(--text); font-weight: 600; }
.chk { width: 20px; height: 20px; flex: none; margin-top: 2px; fill: none; stroke: var(--ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Hunter — verified security hunter, three intensity levels (traffic-light coded) */
.hunt-note {
  display: inline-flex; align-items: center; gap: 9px; margin: 20px 0 0;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--warn) 32%, var(--border));
  background: color-mix(in srgb, var(--warn) 8%, transparent);
  color: var(--text-2); font-size: 13.5px;
}
.hunt-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.hunt-note-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--warn);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent);
}
.grid-hunter { grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); margin-top: 32px; }
.hunt-level {
  display: flex; flex-direction: column;
  border-top: 2px solid color-mix(in srgb, var(--lvl) 65%, transparent);
  background:
    radial-gradient(130% 62% at 50% 0%, color-mix(in srgb, var(--lvl) 11%, transparent), transparent 70%),
    var(--surface);
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}
.hunt-level:hover {
  border-top-color: var(--lvl); transform: translateY(-2px);
  background:
    radial-gradient(130% 62% at 50% 0%, color-mix(in srgb, var(--lvl) 17%, transparent), transparent 70%),
    var(--surface-hover);
}
.hunt-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.hunt-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--lvl);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lvl) 22%, transparent);
}
.hunt-name { color: var(--lvl); font-size: 13px; font-weight: 700; letter-spacing: 0.1em; margin: 0; }
.hunt-budget { color: var(--muted); font-size: 12px; margin: 0 0 16px; }
.hunt-level h3 { font-size: 20px; font-weight: 600; margin: 0 0 8px; }
.hunt-level > p { color: var(--text-2); font-size: 15px; margin: 0; }
.hunt-level p strong { color: var(--text); font-weight: 600; }
.hunt-use { color: var(--muted); font-size: 12px; margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--border); }

.hunt-impact {
  list-style: none; padding: 0; margin: 36px 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px 28px;
}
.hunt-impact li { color: var(--text-2); font-size: 15px; display: flex; gap: 11px; align-items: start; line-height: 1.55; }
.hunt-impact strong { color: var(--text); font-weight: 600; }

/* Code-review section — the LIVE badge sits inline in the eyebrow here rather than pinned
   to a card corner, so it needs the absolute positioning of .badge-live turned off. */
#review .eyebrow .badge-live { position: static; top: auto; right: auto; background: transparent; margin-left: 6px; vertical-align: 1px; }
.review-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); list-style: none; padding: 0; }
.review-grid h3 { font-size: 18px; margin-bottom: 8px; }
.review-grid em { font-style: normal; color: var(--accent); }
.review-foot { color: var(--text-2); margin: 28px 0 0; font-size: 16px; }

/* Badges */
.badge { font-family: var(--font-mono); font-size: 12px; border-radius: 6px; padding: 4px 9px; display: inline-flex; align-items: center; gap: 6px; }
.badge-live { color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); position: absolute; top: 18px; right: 18px; background: rgba(11,15,20,0.6); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.badge-soon { color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
/* "not available to you yet" — deliberately NOT `badge-beta`, which reads as "available,
   rough". Use for invite-only / unwired roles, and for Builder (on demand only since it
   left the catalog plans). Hunter remains `badge-beta` / available on paid plans. */
/* A tier line for something NOT included yet. Dimmed so it can't be read as part of what
   you're paying for today — the check mark alone would imply it is. */
.feat-preview { opacity: 0.6; }
.feat-preview em { font-style: normal; color: var(--warn); }
.badge-preview {
  align-self: center; margin-left: 4px; font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--warn); border: 1px solid var(--warn); border-radius: 4px;
  padding: 0 5px; white-space: nowrap;
}
.badge-offline {
  color: var(--indigo); border: 1px solid color-mix(in srgb, var(--indigo) 45%, transparent);
  position: absolute; top: 18px; right: 18px; background: rgba(11, 15, 20, 0.6); letter-spacing: 0.06em;
}
.badge-offline .lock {
  width: 8px; height: 8px; border-radius: 50%; background: var(--indigo);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--indigo) 22%, transparent);
}
/* offline model flagship card — indigo accent bar to distinguish it from the green "live" wrokin card */
.model-live { box-shadow: inset 3px 0 0 var(--indigo); }

/* Coming-soon cards */
.card-soon { opacity: 0.82; position: relative; }
.card-soon .badge-soon { position: static; margin-bottom: 12px; }
.card-soon:hover { border-color: color-mix(in srgb, var(--warn) 30%, var(--border)); }
.card-soon h3 { font-size: 19px; }
.card-soon p { color: var(--muted); }

/* Philosophy — "the colors aren't a coincidence" (ties copy to the logo palette) */
.philosophy { position: relative; overflow: hidden; }
.philosophy .wrap { position: relative; }
/* subtle multi-hue glow, echoing the logo blocks — decorative, low-opacity */
.philosophy::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 80% at 18% 0%, color-mix(in srgb, var(--logo-blue) 12%, transparent), transparent 70%),
    radial-gradient(50% 80% at 50% 120%, color-mix(in srgb, var(--logo-purple) 12%, transparent), transparent 70%),
    radial-gradient(60% 80% at 85% 0%, color-mix(in srgb, var(--logo-orange) 10%, transparent), transparent 70%);
}
.philosophy-inner { text-align: center; max-width: 64ch; margin: 0 auto; }
.philosophy .eyebrow { text-align: center; }
/* full logo palette as a gradient rule above the headline */
.hue-rule {
  display: block; height: 4px; width: 132px; margin: 0 auto 26px; border-radius: 4px;
  background: linear-gradient(90deg,
    var(--logo-blue), var(--logo-purple), var(--logo-red),
    var(--logo-orange), var(--logo-yellow), var(--logo-green));
}
.philosophy h2 { max-width: none; margin: 0 auto; }
.soul-lead { color: var(--text-2); font-size: 19px; line-height: 1.7; margin: 20px auto 0; max-width: 54ch; }
.soul-lead strong { color: var(--text); font-weight: 600; }

/* Rotating "why diversity matters" cards — one per logo hue.
   Cards echo the glossy, rounded logo blocks; auto-advance with a soft crossfade. */
.soul-carousel { max-width: 640px; margin: 42px auto 0; }
/* all cards share one grid cell so the viewport sizes to the tallest and they crossfade in place */
.soul-viewport { display: grid; }
.soul-card {
  grid-area: 1 / 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 40px 42px; border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--c) 32%, var(--border));
  background:
    radial-gradient(130% 100% at 50% -10%, color-mix(in srgb, var(--c) 15%, transparent), transparent 62%),
    linear-gradient(180deg, var(--surface), var(--bg-raised));
  box-shadow:
    0 34px 70px -42px color-mix(in srgb, var(--c) 55%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(14px) scale(0.985);
  transition: opacity 700ms ease, transform 760ms cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 700ms;
}
.soul-card.is-active {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: none; transition-delay: 0s;
}
/* glossy rounded "cube" — a nod to the logo blocks */
.soul-cube {
  width: 48px; height: 48px; border-radius: 15px; margin-bottom: 20px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 17px; color: #0b0f14;
  background: linear-gradient(158deg, color-mix(in srgb, var(--c) 78%, #ffffff), var(--c));
  box-shadow:
    0 10px 22px -10px color-mix(in srgb, var(--c) 70%, transparent),
    inset 0 2px 3px rgba(255, 255, 255, 0.55),
    inset 0 -4px 7px rgba(0, 0, 0, 0.28);
}
.soul-kicker {
  font-size: 12px; letter-spacing: 0.09em; text-transform: uppercase; margin: 0 0 10px;
  color: color-mix(in srgb, var(--c) 60%, #ffffff);
}
.soul-card h3 { font-size: 26px; line-height: 1.18; font-weight: 700; color: var(--text); margin: 0 0 12px; max-width: 20ch; }
.soul-card p { color: var(--text-2); font-size: 17px; line-height: 1.6; margin: 0; max-width: 46ch; }

/* progress segments — each maps to (and is colored as) its card */
.soul-nav { display: flex; justify-content: center; gap: 10px; margin-top: 28px; }
.soul-seg {
  width: 44px; height: 5px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: color-mix(in srgb, var(--border-strong) 75%, transparent);
  position: relative; overflow: hidden; transition: background 200ms ease;
}
.soul-seg:hover { background: color-mix(in srgb, var(--c) 45%, var(--border-strong)); }
.soul-seg-fill {
  position: absolute; inset: 0; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #ffffff), var(--c));
}
.soul-seg.is-active .soul-seg-fill { animation: soul-fill 5500ms linear forwards; }
@keyframes soul-fill { from { width: 0; } to { width: 100%; } }

@media (max-width: 640px) {
  .soul-card { padding: 32px 24px 34px; border-radius: 18px; }
  .soul-card h3 { font-size: 22px; }
  .soul-card p { font-size: 16px; }
  .soul-seg { width: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .soul-card { transition: opacity 200ms ease; transform: none; }
  .soul-seg.is-active .soul-seg-fill { animation: none; width: 100%; }
}

/* Pricing */
.card-tier { display: flex; flex-direction: column; }
.card-tier .feature-list { margin: 16px 0; }
.tier-name { color: var(--text-2); font-size: 12px; letter-spacing: 0.08em; }
.price { font-family: var(--font-display); font-size: 38px; font-weight: 700; margin: 8px 0 2px; }
.price .per { font-size: 15px; color: var(--muted); font-weight: 400; }
.tier-for { color: var(--text-2); font-size: 14px; margin: 0 0 6px; }
.byok-note { color: var(--muted); font-size: 12px; margin: 4px 0 18px; }
.card-tier .btn { margin-top: auto; }
.card-tier.featured { border-color: var(--accent); transform: translateY(-8px); box-shadow: 0 0 0 1px var(--border-strong), 0 24px 60px -30px rgba(54,198,240,0.3); position: relative; }
.reco { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #06121a; font-size: 11px; padding: 3px 10px; border-radius: 6px; letter-spacing: 0.06em; }

/* Enterprise — a full-width strip below the four self-serve tiers, so it reads as an
   intentional "custom" tier rather than a lone card orphaned onto a second grid row. */
.card-enterprise {
  grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 36px;
}
.card-enterprise .ent-head { flex: 0 0 240px; display: flex; flex-direction: column; }
.card-enterprise .ent-head .price { font-size: 30px; }
.card-enterprise .btn { margin-top: 14px; align-self: flex-start; }
.card-enterprise .ent-features {
  flex: 1; margin: 0; columns: 2; column-gap: 32px;
}
.card-enterprise .ent-features li { break-inside: avoid; }
@media (max-width: 760px) {
  .card-enterprise { flex-direction: column; align-items: stretch; gap: 18px; }
  .card-enterprise .ent-head { flex-basis: auto; }
  .card-enterprise .ent-features { columns: 1; }
}
.badge-beta { align-self: center; margin-left: 4px; font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); border-radius: 4px; padding: 0 5px; white-space: nowrap; }

/* Legal pages (privacy / terms / dpa) */
.legal { padding: 56px 0 96px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: 34px; margin-bottom: 6px; }
.legal .updated { color: var(--muted); font-family: var(--font-mono); font-size: 13px; margin: 0 0 32px; }
.legal h2 { font-size: 22px; max-width: none; margin: 36px 0 10px; }
.legal h3 { font-size: 17px; margin: 22px 0 6px; }
.legal p, .legal li { color: var(--text-2); font-size: 15.5px; line-height: 1.7; }
.legal ul { padding-left: 20px; margin: 8px 0; }
.legal li { margin: 4px 0; }
.legal a { text-decoration: underline; }
.legal .back { font-family: var(--font-mono); font-size: 13px; }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.legal th, .legal td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; color: var(--text-2); vertical-align: top; }
.legal th { color: var(--text); font-weight: 600; }

/* Final CTA */
.cta-band-inner { text-align: center; }
.cta-band h2 { margin: 0 auto; }
.cta-band p { color: var(--text-2); font-size: 18px; max-width: 52ch; margin: 14px auto 0; }
/* Sits under the two buttons: keeps "compare plans" reachable without giving it
   a third button that would dilute install + dashboard. */
.cta-band p.cta-alt { color: var(--muted); font-size: 14px; margin-top: 20px; }
.cta-alt a { color: var(--accent); font-weight: 500; }
.cta-alt a:hover { color: var(--accent-hover); text-decoration: underline; }

/* Footer */
.footer { border-top: 1px solid var(--border); background: var(--bg-raised); padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer a { display: block; color: var(--text-2); font-size: 14px; padding: 4px 0; }
.footer a:hover { color: var(--text); }
.foot-h { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; margin: 0 0 8px; }
.foot-brand .wordmark { display: inline-block; margin-bottom: 8px; }
.foot-bottom { display: flex; justify-content: space-between; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); }
.foot-bottom span { font-size: 12px; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  /* `1fr` alone still floors the track at min-content, and a `<pre>` never wraps — so
     the terminal's longest line set the card's width and `overflow: hidden` quietly
     clipped the copy column beside it. Measured at 390px: the card was 340px wide with
     495px of content inside it. `minmax(0, …)` lets the track shrink and hands the
     scrolling to `.term-body`, which already has `overflow-x: auto` for exactly this. */
  .card-product-live,
  .card-product-oss { grid-template-columns: minmax(0, 1fr); }
  .cpl-device .terminal { min-width: 0; max-width: 100%; }
  .cpl-device { border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 768px) {
  section { padding: 64px 0; }
  .hero h1 { font-size: 38px; }
  h2 { font-size: 28px; }
  .lead, .section-sub, .cta-band p { font-size: 17px; }
  .grid-pricing { grid-template-columns: 1fr; }
  .card-tier.featured { transform: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .foot-bottom { flex-direction: column; gap: 8px; }
}

/* The primary bar now carries four section links PLUS a Dashboard and an Install
   button, so it needs more room than the old 768px breakpoint gave it: below
   ~980px the row would collide with the wordmark. Collapse to the sheet earlier
   rather than let the CTAs shrink into illegibility. */
@media (max-width: 979px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: absolute; top: 92px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 8px 24px 20px; display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  /* Buttons are buttons in the sheet too. `.nav-menu a` above out-specifies
     `.btn-ghost`, so the ghost button's own bottom border has to be restored by
     colour rather than by zeroing the edge — zeroing it makes the two buttons
     different heights and leaves the ghost box open at the bottom. */
  .nav-menu a.btn { padding: 13px 16px; font-size: 15px; justify-content: center; }
  .nav-menu a.btn-primary { border-bottom-color: transparent; }
  .nav-menu a.btn-ghost { border-bottom-color: var(--border-strong); }
  .nav-menu a.btn-ghost:hover { border-bottom-color: var(--accent); }
  .nav-dash { margin-left: 0; margin-top: 14px; }
  .nav-cta { margin-top: 10px; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
}

/* ─────────────────────────────────────────────────────────────────────────
   AGENT TEAM — the catalog as a team of agents, grouped by class.
   Replaces the old single "products" card + roadmap tile for repo posture
   (which shipped as Warden). Each card carries a `readme` chip that opens a
   native <dialog> with ONE real sample artifact; the full set lives on the
   agent's own page under /agents/.

   Availability badges reuse .badge-live / .badge-preview / .badge-soon and
   mean exactly what AGENT.md says they mean — a badge here must trace to a
   registered runner in wrokin-backend/src/index.ts.
   ───────────────────────────────────────────────────────────────────────── */
.agent-class { margin-top: 44px; }
.agent-class-h {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 16px;
  display: flex; align-items: center; gap: 10px;
}
.agent-class-h::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* auto-FILL, not auto-fit: a class with a single agent (Posture → Warden)
   would otherwise stretch that one card across the full row, which reads as a
   different kind of thing rather than one of a set. auto-fill keeps the empty
   tracks so every card is the same width whatever the class contains. */
.grid-agents { grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 20px; margin-top: 0; }

.agent-card { position: relative; display: flex; flex-direction: column; gap: 12px; transition: all 150ms ease; }
.agent-card:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.agent-card .badge { position: static; align-self: flex-start; }

.agent-top { display: flex; align-items: center; gap: 12px; }
.agent-icon {
  width: 38px; height: 38px; flex: none; border-radius: 9px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--tint, var(--accent)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--tint, var(--accent)) 34%, transparent);
}
.agent-icon svg { width: 19px; height: 19px; stroke: var(--tint, var(--accent)); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.agent-card h4 { font-family: var(--font-display); font-size: 18px; font-weight: 500; margin: 0; color: var(--text); }
.agent-role { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); margin: 2px 0 0; }
.agent-card > p { color: var(--text-2); font-size: 14.5px; line-height: 1.6; margin: 0; flex: 1; }

.agent-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
/* The readme chip. A button, not a link — it opens a dialog, and a screen
   reader should not be told it navigates. */
.chip-readme {
  font-family: var(--font-mono); font-size: 12px; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  border-radius: 6px; padding: 5px 10px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: all 140ms ease;
}
.chip-readme:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent-hover); }
.chip-readme:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.agent-more { font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-decoration: none; }
.agent-more:hover { color: var(--accent); }

/* ── the readme dialog ─────────────────────────────────────────────────── */
.agent-dialog {
  width: min(760px, calc(100vw - 32px)); max-height: min(84vh, 900px);
  padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--bg-raised); color: var(--text); overflow: hidden;
}
.agent-dialog::backdrop { background: rgba(6, 9, 13, 0.72); backdrop-filter: blur(2px); }
.dlg-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 16px; border-bottom: 1px solid var(--border); }
.dlg-head h3 { font-family: var(--font-display); font-size: 21px; font-weight: 500; margin: 0; }
.dlg-head .agent-role { margin-top: 3px; }
.dlg-close {
  margin-left: auto; background: transparent; border: 1px solid var(--border);
  color: var(--text-2); border-radius: 7px; width: 30px; height: 30px; flex: none;
  cursor: pointer; font-size: 17px; line-height: 1;
}
.dlg-close:hover { background: var(--surface-hover); color: var(--text); }
.dlg-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dlg-body { padding: 20px 22px 24px; overflow-y: auto; max-height: calc(84vh - 78px); }
.dlg-body > p { color: var(--text-2); font-size: 15px; line-height: 1.68; margin: 0 0 16px; }
.dlg-facts { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 9px; }
.dlg-facts li { display: flex; gap: 10px; font-size: 14px; color: var(--text-2); }
.dlg-facts b { color: var(--text); font-weight: 500; font-family: var(--font-mono); font-size: 12.5px; min-width: 92px; flex: none; }
.dlg-sample-h {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 10px;
}
/* Sample artifacts are real output, so they wrap rather than scroll off —
   a reader should be able to read the whole thing on a phone. */
.agent-dialog .term-body { white-space: pre-wrap; word-break: break-word; font-size: 12.5px; max-height: 340px; overflow-y: auto; }
.dlg-foot { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 560px) {
  .agent-dialog { width: calc(100vw - 20px); max-height: 90vh; }
  .dlg-body { max-height: calc(90vh - 78px); padding: 16px 16px 20px; }
  .dlg-head { padding: 16px 16px 14px; }
  .dlg-facts b { min-width: 78px; }
}
@media (prefers-reduced-motion: reduce) {
  .agent-card, .chip-readme { transition: none; }
}
.agent-team-h { font-family: var(--font-display); font-size: 26px; font-weight: 500; margin: 56px 0 6px; }
.agent-team-h + .section-sub { margin-bottom: 0; }

/* The facts table (#474 B) — comparison-shaped, agent-first. Row headers narrow,
   answers get the width; wide content scrolls in its wrapper, the page never does. */
.facts-table-wrap { overflow-x: auto; margin-top: 26px; }
.facts-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.facts-table th, .facts-table td { text-align: left; vertical-align: top; padding: 12px 16px; border-top: 1px solid var(--border); }
.facts-table tr:last-child th, .facts-table tr:last-child td { border-bottom: 1px solid var(--border); }
.facts-table th { color: var(--text); font-weight: 600; white-space: nowrap; width: 1%; }
.facts-table td { color: var(--text-2); }
.facts-table a { color: var(--text); text-decoration: underline; }
