/* Pilot — brand system (REM family, cyan accent) */
:root {
  --bg: #07080a;
  --s1: #0d0e11;
  --s2: #15171b;
  --s3: #1c1f24;
  --b1: #1b1e23;
  --b2: #272b32;
  --t1: #eceef1;
  --t2: #9097a3;
  --t3: #5a606b;
  --accent: #22d3ee;
  --accent-hi: #67e8f9;
  --accent-ink: #041216;
  --up: #1fd17f;
  --down: #f6465d;
  --cool: #f0b90b;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --wrap: 1200px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--t1);
  font: 400 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--t2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: var(--r-sm); font-weight: 600; }
.skip:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 14px; border-radius: 8px;
  font: 600 14px/1 var(--sans); letter-spacing: -0.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hi); }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 10px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 8, 10, 0.78);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--b1);
}
.nav-inner { display: flex; align-items: center; gap: 32px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -0.02em; }
.brand img { border-radius: 7px; }
.nav-links { display: flex; gap: 24px; font-size: 14px; color: var(--t2); }
.nav-links a { transition: color .15s ease; }
.nav-links a:hover { color: var(--t1); }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.icon-link { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; color: var(--t2); border: 1px solid var(--b1); }
.icon-link:hover { color: var(--t1); border-color: var(--b2); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 88px 0 96px; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 120%;
  background:
    radial-gradient(ellipse 55% 50% at 50% 18%, rgba(22, 64, 104, 0.55), transparent 70%),
    radial-gradient(ellipse 35% 30% at 72% 40%, rgba(34, 211, 238, 0.06), transparent 70%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--t2); padding: 7px 12px; border: 1px solid var(--b2); border-radius: 999px; background: rgba(13, 14, 17, .6); }
h1 { text-wrap: balance; margin-top: 24px; font-size: clamp(40px, 5.6vw, 64px); line-height: 1.02; font-weight: 700; letter-spacing: -0.045em; }
.lede { margin-top: 20px; max-width: 34em; font-size: 18px; line-height: 1.55; color: var(--t2); }
.hero-actions { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }
.badges { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.badges li { font: 500 12px/1 var(--mono); color: var(--t2); padding: 7px 10px; border: 1px solid var(--b1); border-radius: var(--r-sm); background: var(--s1); }

.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 0 rgba(31, 209, 127, .5); animation: pulse 2s ease-out infinite; flex: none; }
.live-dot.is-stale { background: var(--cool); animation: none; }
.live-dot.is-down { background: var(--down); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(31, 209, 127, .45); } 70% { box-shadow: 0 0 0 7px rgba(31, 209, 127, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 209, 127, 0); } }

/* Terminal card */
.term { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--r-lg); box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .8), 0 0 0 1px rgba(34, 211, 238, .03); overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--b1); background: var(--bg); }
.term-dots { display: inline-flex; gap: 6px; }
.term-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--s3); }
.term-path { font-size: 12px; color: var(--t2); }
.term-head { padding: 16px 18px 0; }
.term-title { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.term-sub { margin-top: 6px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--t2); }
.term-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 16px 18px 0; border: 1px solid var(--b1); border-radius: var(--r); }
.term-stats div { padding: 10px 12px; }
.term-stats div + div { border-left: 1px solid var(--b1); }
.term-stats dt { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--t2); }
.term-stats dd { margin-top: 4px; font-size: 16px; font-weight: 500; }
.term-section { padding: 16px 18px 0; }
.term-section:last-child { padding-bottom: 18px; }
.term-label { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.term-label .mono { font-weight: 400; color: var(--t2); font-size: 12px; }
.mini li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 14px; align-items: center; padding: 7px 0; border-top: 1px solid var(--b1); font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.mini li:first-child { border-top: 0; }
.mini .sym { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini .n { color: var(--t2); text-align: right; }
.mini .chip { justify-self: end; min-width: 72px; text-align: center; }
.mini-log li { padding: 6px 0; border-top: 1px solid var(--b1); font-size: 12px; color: var(--t2); line-height: 1.5; }
.mini-log li:first-child { border-top: 0; }
.mini-log time, .log time { color: var(--t3); }
.mini-empty, .log-empty { color: var(--t2); font-family: var(--mono); font-size: 12.5px; }

/* Chips + colours */
.chip { display: inline-block; font: 600 10.5px/1 var(--mono); letter-spacing: .06em; padding: 5px 7px; border-radius: 5px; border: 1px solid; white-space: nowrap; }
.chip-RUNNING, .chip-live { color: var(--up); background: rgba(31, 209, 127, .08); border-color: rgba(31, 209, 127, .28); }
.chip-COOLING, .chip-stale { color: var(--cool); background: rgba(240, 185, 11, .08); border-color: rgba(240, 185, 11, .28); }
.chip-DEAD, .chip-down { color: var(--down); background: rgba(246, 70, 93, .08); border-color: rgba(246, 70, 93, .28); }
.c-up { color: var(--up); }
.c-down { color: var(--down); }
.c-cool { color: var(--cool); }
.s-RUNNING { color: var(--up); }
.s-COOLING { color: var(--cool); }
.s-DEAD { color: var(--down); }

/* Sections */
.section { padding: 96px 0 0; }
.label { font: 500 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.section-head { margin-top: 14px; max-width: 720px; }
.section-head.split { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.section-head.split > div:first-child { max-width: 720px; }
h2 { text-wrap: balance; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; font-weight: 700; letter-spacing: -0.035em; }
.sub { margin-top: 12px; color: var(--t2); font-size: 16px; max-width: 40em; }
h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }

.tickbox { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--t2); padding: 8px 12px; border: 1px solid var(--b1); border-radius: 8px; background: var(--s1); white-space: nowrap; }
.tickbox [data-next-tick] { color: var(--t1); }
.sep { color: var(--t3); }

.feed-status { margin-top: 24px; padding: 12px 14px; border: 1px solid rgba(240, 185, 11, .28); background: rgba(240, 185, 11, .06); color: var(--cool); border-radius: var(--r); font-size: 13px; }
.feed-status.is-down { border-color: rgba(246, 70, 93, .3); background: rgba(246, 70, 93, .06); color: var(--down); }

/* Board table */
.board-wrap { margin-top: 24px; border: 1px solid var(--b1); border-radius: var(--r-lg); background: var(--s1); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.board { width: 100%; border-collapse: collapse; min-width: 960px; }
.board th { position: sticky; top: 0; text-align: left; font: 500 10.5px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--t2); padding: 12px 14px; border-bottom: 1px solid var(--b1); background: var(--s1); white-space: nowrap; }
.board td { padding: 12px 14px; border-top: 1px solid var(--b1); vertical-align: middle; font-size: 13.5px; transition: background-color .9s ease; }
.board tbody tr:first-child td { border-top: 0; }
.board tbody tr:hover td { background-color: var(--s2); }
.board .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.board th.num { text-align: right; }
.board th:first-child, .board td:first-child { position: sticky; left: 0; background: var(--s1); z-index: 1; }
.board tbody tr:hover td:first-child { background: var(--s2); }
.tok { display: flex; flex-direction: column; min-width: 150px; max-width: 220px; }
.tok-sym { font: 600 13.5px/1.3 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tok-name { font-size: 12.5px; color: var(--t2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs .b { color: var(--up); }
.bs .s { color: var(--down); }
.bs .slash { color: var(--t3); padding: 0 3px; }
.est { color: var(--t2); }
.status-cell { min-width: 250px; }
.reason { display: block; margin-top: 5px; font: 400 11.5px/1.45 var(--mono); color: var(--t2); }
.board td.flash-up { background-color: rgba(31, 209, 127, .16); transition: none; }
.board td.flash-down { background-color: rgba(246, 70, 93, .16); transition: none; }
.board-msg td { padding: 40px 14px; text-align: center; color: var(--t2); font-size: 13px; }
.board-foot { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--t2); }

/* Decisions */
.decisions { margin-top: 32px; border: 1px solid var(--b1); border-radius: var(--r-lg); background: var(--s1); }
.decisions-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--b1); }
.decisions-head p { font-size: 12px; }
.log { max-height: 340px; overflow-y: auto; padding: 6px 0; }
.log li { padding: 7px 18px; font-size: 12.5px; line-height: 1.5; color: var(--t2); }
.log li + li { border-top: 1px solid rgba(27, 30, 35, .6); }
.log .who, .mini-log .who { color: var(--t1); font-weight: 600; }
.log-empty { padding: 14px 18px; }
.log li.is-new { animation: logIn .6s ease-out; }
@keyframes logIn { from { background: rgba(34, 211, 238, .08); } to { background: transparent; } }

/* Rules */
.rules { margin-top: 32px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; }
.rules-main { border: 1px solid var(--b1); border-radius: var(--r-lg); background: var(--s1); padding: 6px 0; font-size: 13px; }
.rule { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 16px 20px; }
.rule + .rule { border-top: 1px solid var(--b1); }
.rule .chip { justify-self: start; align-self: start; }
.rule-lines div { line-height: 1.8; color: var(--t1); }
.rule-lines .kw { color: var(--t2); }
.rule-lines .v { color: var(--accent); }
.rule-note { margin-top: 4px; color: var(--t2); font-size: 12px; }
.defs { display: grid; gap: 0; border: 1px solid var(--b1); border-radius: var(--r-lg); background: var(--s1); }
.defs div { padding: 16px 20px; }
.defs div + div { border-top: 1px solid var(--b1); }
.defs dt { font-size: 12.5px; font-weight: 600; color: var(--t1); }
.defs dd { margin-top: 4px; font-size: 14px; color: var(--t2); }

/* Cards */
.card { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--r-lg); padding: 22px; }
.card p { margin-top: 8px; color: var(--t2); font-size: 14.5px; }
.steps, .trust { margin-top: 32px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.step-n { display: block; font-size: 12px; color: var(--accent); margin-bottom: 18px; }

/* Closing */
.closing { margin-top: 120px; padding: 96px 0; border-top: 1px solid var(--b1); position: relative; overflow: hidden; }
.closing::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 50% 70% at 50% 0%, rgba(22, 64, 104, .35), transparent 70%); pointer-events: none; }
.closing-inner { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; }
.closing .sub { margin-bottom: 28px; }

/* Footer */
.footer { border-top: 1px solid var(--b1); padding: 28px 0; }
.footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; font-size: 14px; }
.footer-x { margin-left: auto; color: var(--t2); font-size: 13px; }
.footer-x:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .br-lg { display: none; }
  .steps, .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rules { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .nav-links { display: none; }
  .hero { padding: 56px 0 64px; }
  .lede { font-size: 16.5px; }
  .section { padding-top: 72px; }
  .steps, .trust { grid-template-columns: 1fr; }
  .term-stats { grid-template-columns: repeat(2, 1fr); }
  .term-stats div:nth-child(3) { border-left: 0; }
  .term-stats div:nth-child(n+3) { border-top: 1px solid var(--b1); }
  .mini li { grid-template-columns: minmax(0, 1fr) auto auto; }
  .mini .n-mcap { display: none; }
  .rule { grid-template-columns: 1fr; gap: 10px; }
  .footer-x { margin-left: 0; }
  .tickbox { white-space: normal; }
  .eyebrow-more { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .live-dot { animation: none; }
  .log li.is-new { animation: none; }
  .board td { transition: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
#board:focus { outline: none; }
