/* Tokens match the console (apps/spa/src/styles/app.css). The accent is a fill,
   never text on the light ground: #FF8400 on #F2F3F0 is 2.2:1. */
:root {
  --bg: #f2f3f0;
  --bg-alt: #e7e8e5;
  --card: #ffffff;
  --card-head: #fafaf9;
  --ink: #111111;
  --body: #3d3d3d;
  --muted: #555555;
  --faint: #8a8b88;
  --border: #cbccc9;
  --rule: #e7e8e5;
  --accent: #ff8400;
  --accent-hover: #ff9426;
  --accent-tint: #fff4e8;
  --ok-bg: #dfe6e1;
  --ok-ink: #004d1a;
  --warn-bg: #e9e3d8;
  --warn-ink: #804200;
  --term: #111111;
  --term-ink: #e7e8e5;
  --term-rule: #2a2a2a;
  --term-dot: #3a3a3a;
  --bad: #ff6b4a;
  --good: #5fd38d;
  --radius: 8px;
  --radius-lg: 16px;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Geist", system-ui, -apple-system, sans-serif;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 16px 40px rgba(0, 0, 0, 0.08);
  --dots: radial-gradient(circle at 1px 1px, rgba(17, 17, 17, 0.08) 1px, transparent 0);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

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

a {
  color: inherit;
}

code,
pre {
  font-family: var(--mono);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--mono);
  letter-spacing: -0.02em;
}

.sprite {
  position: absolute;
}

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

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon.ok {
  width: 14px;
  height: 14px;
  color: var(--ok-ink);
  stroke-width: 3;
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ─────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(242, 243, 240, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 22px;
  height: 22px;
  color: var(--accent);
  stroke-width: 2.25;
}

.brand-sm {
  font-size: 15px;
}

.brand-sm .brand-mark {
  width: 18px;
  height: 18px;
}

.nav-links {
  display: flex;
  gap: 24px;
  flex: 1;
  font-size: 14px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--ink);
}

/* ── Buttons ─────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.btn .icon {
  width: 16px;
  height: 16px;
  stroke-width: 2.25;
}

.btn-sm {
  height: 40px;
  padding: 0 16px;
  font-size: 13px;
  margin-left: auto;
}

.btn-primary {
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-dark {
  background: var(--ink);
  color: #fff;
}

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

.btn-ghost:hover {
  border-color: var(--ink);
}

/* ── Hero ────────────────────────────────────────────────────────── */

.hero {
  padding: 72px 0 88px;
  background-image: var(--dots);
  background-size: 22px 22px;
}

.hero-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: center;
}

.hero-copy {
  flex: 1 1 460px;
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

h1 {
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h1 mark {
  background: var(--accent);
  color: var(--ink);
  padding: 0 0.12em;
  border-radius: 4px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.lede {
  margin: 24px 0 0;
  max-width: 540px;
  font-size: 18px;
  color: var(--body);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.connects {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
}

.connects-label {
  margin-right: 4px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.chip {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-size: 13px;
  font-weight: 500;
}

/* Change request card */

.cr-card {
  flex: 1 1 400px;
  min-width: 0;
  margin: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cr-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule);
  background: var(--card-head);
}

.cr-id {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill-warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
}

.pill-ok {
  background: var(--ok-bg);
  color: var(--ok-ink);
}

.cr-body {
  padding: 20px;
}

.cr-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.cr-meta {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.sql {
  margin: 16px 0 18px;
  padding: 16px 18px;
  background: var(--term);
  color: var(--term-ink);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
}

.sql .k {
  color: #ffb066;
}

.sql .s {
  color: #a5e3b7;
}

.sql .n {
  color: #9ec5ff;
}

.cr-rows {
  margin: 0;
}

.cr-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
}

.cr-row:last-child {
  padding-bottom: 0;
}

.cr-row dt {
  width: 72px;
  padding-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.cr-row dd {
  flex: 1 1 200px;
  margin: 0;
  font-size: 14px;
}

.checks,
.signoff {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.checks span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mask {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-alt);
  font-size: 12px;
}

.risk {
  display: flex;
  align-items: center;
  gap: 8px;
}

.signoff {
  gap: 6px;
}

.step {
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 12px;
}

.step-done {
  background: var(--ink);
  color: #fff;
}

.step-next {
  border: 1px dashed var(--faint);
  color: var(--muted);
}

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

.section {
  padding: 96px 0;
}

.section-ruled {
  border-top: 1px solid var(--border);
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--accent);
}

h2 {
  max-width: 760px;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  line-height: 1.15;
}

h3 {
  font-size: 17px;
  font-weight: 700;
}

.body-lg {
  margin: 20px 0 0;
  font-size: 17px;
  color: var(--body);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.steps-grid li {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
}

.steps-grid h3 {
  margin-top: 18px;
}

.steps-grid p,
.feature p {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--body);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1px;
  margin-top: 48px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feature {
  padding: 28px 24px;
  background: var(--bg);
}

.feature h3 {
  margin-top: 16px;
  font-size: 16px;
}

.f-icon {
  width: 24px;
  height: 24px;
}

/* Two-column sections: copy beside a table or terminal */

.split {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: flex-start;
}

.split-center {
  align-items: center;
}

.split-copy {
  flex: 1 1 380px;
  min-width: 0;
}

/* Roles */

.table-box {
  flex: 1.4 1 520px;
  min-width: 0;
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.roles {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 14px;
}

.roles th,
.roles td {
  border-bottom: 1px solid var(--rule);
}

.roles tbody tr:last-child > * {
  border-bottom: 0;
}

.roles thead th {
  padding: 16px 8px;
  border-bottom-color: var(--border);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.roles thead th:first-child {
  padding-left: 20px;
  text-align: left;
  text-transform: uppercase;
  color: var(--muted);
}

.roles thead th:not(:first-child) {
  width: 76px;
}

.roles tbody th {
  padding: 12px 20px;
  text-align: left;
  font-weight: 500;
}

.roles td {
  text-align: center;
}

.roles .no {
  color: var(--faint);
}

.roles thead .owner {
  background: var(--accent);
}

.roles tbody .owner {
  background: var(--accent-tint);
}

.roles .key th,
.roles .key .owner {
  font-weight: 700;
}

/* Guard */

.ticks {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  line-height: 1.5;
}

.ticks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ticks .icon.ok {
  width: 16px;
  height: 16px;
  margin-top: 3px;
}

.ticks code {
  font-size: 13px;
}

.terminal {
  flex: 1 1 440px;
  min-width: 0;
  background: var(--term);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--term-rule);
}

.terminal-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--term-dot);
}

.terminal-bar p {
  margin: 0 0 0 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}

.terminal pre {
  margin: 0;
  padding: 22px 24px 26px;
  color: var(--term-ink);
  font-size: 13px;
  line-height: 1.75;
  overflow-x: auto;
}

.prompt {
  color: var(--accent);
}

.bad {
  color: var(--bad);
  font-weight: 700;
}

.good {
  color: var(--good);
  font-weight: 700;
}

/* Closing call to action */

.cta-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 72px 32px;
  border-radius: 24px;
  background-color: var(--term);
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.07) 1px, transparent 0);
  background-size: 22px 22px;
  color: #fff;
  text-align: center;
}

.cta-panel h2 {
  font-size: clamp(28px, 3.4vw, 44px);
}

.cta-panel p {
  max-width: 520px;
  margin: 16px 0 32px;
  font-size: 17px;
  color: #b5b6b3;
}

/* Footer */

.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding-top: 24px;
  padding-bottom: 24px;
  font-size: 13px;
  color: var(--muted);
}

.footer-inner p {
  flex: 1;
  margin: 0;
}

.footer-inner a:not(.brand) {
  color: var(--muted);
  text-decoration: none;
}

.footer-inner a:not(.brand):hover {
  color: var(--ink);
}

/* ── Small screens ───────────────────────────────────────────────── */

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }

  .hero {
    padding: 40px 0 64px;
  }

  .lede {
    font-size: 16px;
  }

  .section {
    padding: 72px 0;
  }

  .cr-body {
    padding: 16px;
  }

  /* All four roles stay in view: the owner column is the point. */
  .roles {
    min-width: 0;
    font-size: 13px;
  }

  .roles thead th {
    padding: 12px 2px;
    font-size: 11px;
    letter-spacing: 0;
  }

  .roles thead th:not(:first-child) {
    width: 54px;
  }

  .roles thead th:first-child,
  .roles tbody th {
    padding-left: 12px;
    padding-right: 8px;
  }

  .terminal pre {
    padding: 18px;
    font-size: 12px;
  }

  .cta-panel {
    padding: 56px 20px;
  }
}

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

  .btn {
    transition: none;
  }

  .btn:hover {
    transform: none;
  }
}
