/* tokama.dev: one dark theme, matching the app. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/space-grotesk-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --bg: #0B0F17;
  --bg-chrome: #0C1014;
  --surface: #121826;
  --surface-step: #0F141E;
  --selected: #18213A;
  --line: #1F262E;
  --line-strong: #2A333D;
  --text-strong: #E6EDF3;
  --text: #D5DCE3;
  --text-body: #B8C2CC;
  --text-muted: #9DA9B6;
  --text-dim: #7D8894;
  --brand: #1F5BFF;
  --brand-deep: #0F2257;
  --brand-ink: #E4ECFF;
  --link: #7FB2FF;
  --link-hover: #A9CCFF;
  --running: #5C8CFF;
  --ok: #6FB884;
  --waiting: #D9A93A;
  --failed: #E07A70;
  --teal: #14C8C8;
  --orange: #FF6B1A;
  --note-line: #5A4A22;
  --note-bg: #17140C;
  --note-text: #C9C2B0;
  --wf-plan: #6F9FD8;
  --wf-fix: #58B8BC;
  --wf-quick: #DCCBA6;
  --agent-architect: #8F73F2;
  --agent-builder: #22A98B;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: 48px;
  --section-gap: 128px;
}

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

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

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

a { color: var(--link); }
a:hover { color: var(--link-hover); }
a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 6px;
}

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

/* Keep status symbols as text, never as colour emoji. */
.sym { font-family: var(--font-mono); font-variant-emoji: text; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--brand);
  color: #FFFFFF;
  font-weight: 600;
  text-decoration: none;
  z-index: 10;
}
.skip-link:focus { top: 12px; color: #FFFFFF; }

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

.display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-strong);
  text-wrap: balance;
}

/* Header */

.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 12px 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img { width: auto; height: 34px; }

.nav-main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 14.5px;
}
.nav-main a, .menu-panel a { color: var(--text); text-decoration: none; }
.nav-main a:hover, .menu-panel a:hover { color: #FFFFFF; }

.menu { display: none; margin-left: auto; position: relative; }
.menu summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--selected); }
.menu-panel {
  position: absolute;
  right: 0;
  top: 52px;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 5;
}
.menu-panel a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 6px;
}
.menu-panel a:hover { background: var(--selected); }

/* Hero */

.hero { padding-top: 88px; }
.hero .wrap { display: flex; flex-direction: column; gap: 56px; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; max-width: 820px; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}
.eyebrow .dot { color: var(--teal); margin-right: 10px; }
.hero h1 { font-size: 64px; line-height: 1.04; letter-spacing: -1.6px; }
.tagline {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.2px;
  color: var(--text-strong);
}
.lead { margin: 0; max-width: 660px; font-size: 19px; color: var(--text-body); }
.hero-actions { padding-top: 8px; display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; }
.hero-note { font-size: 13.5px; color: var(--text-dim); }

/* Not a link: the code opens with the first release. */
.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px dashed var(--brand);
  background: var(--brand-deep);
  color: var(--brand-ink);
  font-weight: 600;
  font-size: 16px;
}
.soon .muted { font-weight: 500; color: var(--text-muted); }

/* App mock-up */

.shot { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.shot figcaption { font-size: 13px; color: var(--text-dim); }
.mk { font-family: var(--font-mono); font-size: 11px; }
.window {
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  background: var(--bg-chrome);
  border-bottom: 1px solid var(--line);
}
.window-bar .light { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); }
.window-bar .mk { margin-left: 12px; color: var(--text-dim); }
.window-body { display: flex; min-height: 520px; font-size: 13px; }
.rail {
  flex: 0 0 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  background: var(--bg-chrome);
  border-right: 1px solid var(--line);
}
.rail .badge-wrap { position: relative; display: flex; }
.rail .badge {
  position: absolute;
  top: -6px;
  right: -9px;
  min-width: 15px;
  height: 15px;
  border-radius: 8px;
  background: var(--waiting);
  color: var(--bg);
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.side {
  flex: 0 0 214px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 8px;
  border-right: 1px solid var(--line);
}
.side-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--text);
}
.side-head { padding: 12px 10px 4px; color: var(--text-dim); letter-spacing: 0.6px; }
.main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 20px;
}
.main-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.main-head b { font-size: 14px; font-weight: 600; color: var(--text-strong); }
.main-head .sub { font-size: 12px; color: var(--text-dim); }
.main-head .new {
  margin-left: auto;
  padding: 5px 11px;
  border-radius: 6px;
  border: 1px solid var(--brand);
  background: var(--brand-deep);
  color: var(--brand-ink);
  font-size: 12px;
}
.tabs {
  display: inline-flex;
  align-self: flex-start;
  margin: 10px 0 6px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  overflow: hidden;
  font-size: 11.5px;
}
.tabs span { padding: 4px 11px; color: var(--text-muted); border-left: 1px solid var(--line-strong); }
.tabs span:first-child { border-left: 0; background: var(--selected); color: var(--text-strong); }
.group { padding: 14px 12px 4px; color: var(--text-muted); letter-spacing: 0.6px; }
.group.first { padding-top: 10px; color: var(--waiting); }
.row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.row:last-child { border-bottom: 0; }
.row .title { color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .stack { display: flex; flex-direction: column; min-width: 0; }
.row .ask { font-size: 11.5px; color: var(--waiting); }
.row .wf, .row .agent { color: var(--text-muted); }
.pips { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; overflow: hidden; }

/* Phone version of the mock-up */
.window-compact { display: none; border-radius: 12px; font-size: 12.5px; box-shadow: none; }
.wc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-chrome);
  border-bottom: 1px solid var(--line);
}
.wc-head b { font-weight: 600; color: var(--text-strong); }
.wc-head .sub { font-size: 11.5px; color: var(--text-dim); }
.wc-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.wc-item:last-child { border-bottom: 0; }
.wc-item .t { display: flex; gap: 8px; color: var(--text-strong); }
.wc-item .d { padding-left: 20px; }

/* Colour helpers: every colour is paired with a symbol or a word. */
.c-wait { color: var(--waiting); }
.c-run { color: var(--running); }
.c-ok { color: var(--ok); }
.c-bad { color: var(--failed); }
.c-dim { color: var(--text-dim); }
.c-muted { color: var(--text-muted); }
.c-strong { color: var(--text-strong); }
.c-plan { color: var(--wf-plan); }
.c-fix { color: var(--wf-fix); }
.c-quick { color: var(--wf-quick); }
.c-architect { color: var(--agent-architect); }
.c-builder { color: var(--agent-builder); }

/* Sections */

.section { padding-top: var(--section-gap); }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.section h2 { font-size: 40px; line-height: 1.1; letter-spacing: -0.8px; }
.section-head p { margin: 0; font-size: 17px; color: var(--text-muted); }

.features .wrap { display: flex; flex-direction: column; gap: 48px; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px 64px;
}
.feature { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.feature h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
  color: var(--text-strong);
}
.feature h3 svg { flex: none; }
.feature p { margin: 0; color: var(--text-body); }
.feature p code { font-size: 14px; color: var(--text-strong); }
.feature .note { font-size: 14px; color: var(--text-muted); }
.feature .note b { color: var(--text-strong); font-weight: 600; }

.panel {
  margin: 0;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
}
pre.panel {
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}
.kv {
  padding: 16px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.9;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  column-gap: 16px;
  white-space: nowrap;
}
.sent { font-size: 13.5px; display: flex; flex-direction: column; }
.sent-head { padding: 12px 20px; border-bottom: 1px solid var(--line); color: var(--text-muted); }
.sent-list { padding: 14px 20px; display: flex; flex-direction: column; gap: 10px; }
.sent-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  column-gap: 14px;
  align-items: baseline;
}
.sent-row .time, .sent-row .to { font-family: var(--font-mono); }
.sent-row .time { color: var(--text-dim); }
.sent-row .to { color: var(--text-muted); }

.meters { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; font-size: 13.5px; }
.meter { display: flex; flex-direction: column; gap: 6px; }
.meter-label { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--text-strong); }
.meter-label .val {
  margin-left: auto;
  font-family: var(--font-mono);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.bar { height: 6px; border-radius: 3px; background: var(--line); }
.bar span { display: block; height: 6px; border-radius: 3px; background: var(--running); }
.meters .foot { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }

/* How it works */

.how .wrap { display: flex; flex-direction: column; gap: 40px; }
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.steps li {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--surface-step);
  border-top: 2px solid var(--ok);
  border-radius: 0 0 10px 10px;
}
.steps li.s2 { border-top-color: var(--running); }
.steps li.s3 { border-top-color: var(--waiting); }
.steps .num { font-family: var(--font-mono); font-size: 13px; }
.steps li.s1 .num { color: var(--ok); }
.steps li.s2 .num { color: var(--link); }
.steps li.s3 .num { color: var(--waiting); }
.steps h3 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 22px; color: var(--text-strong); }
.steps p { margin: 0; color: var(--text-body); }
.steps .ex {
  margin-top: auto;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
}
.steps .ex.mono { font-size: 12.5px; color: var(--text); }
.steps .ex-task { display: flex; flex-direction: column; gap: 4px; }
.steps .ex-task .mono { font-size: 12px; color: var(--text-muted); }
.chips { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; font-size: 12.5px; }
.chips span { padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--text); }
.chips span:first-child { border-color: var(--brand); background: var(--brand-deep); color: var(--brand-ink); }

/* Open source */

.oss .wrap { display: flex; flex-wrap: wrap; gap: 48px 64px; }
.oss-main { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.oss-main > p { margin: 0; max-width: 560px; color: var(--text-body); }
.status {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid var(--note-line);
  background: var(--note-bg);
}
.status strong { font-weight: 600; color: var(--text-strong); }
.status strong .sym { color: var(--waiting); }
.status span { font-size: 15px; color: var(--note-text); }
.support { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.support h3, .label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-dim);
}
.support ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.support li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.support li:last-child { padding-bottom: 0; border-bottom: 0; }
.support li > span:first-child { color: var(--text-strong); }

.get { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.get .panel { padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; color: var(--text-body); }
.get .panel p { margin: 0; }
.get .needs { font-size: 14.5px; color: var(--text-muted); }

/* Footer */

.site-footer { margin-top: var(--section-gap); border-top: 1px solid var(--line); }
.site-footer .wrap {
  padding-top: 32px;
  padding-bottom: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  font-size: 14px;
}
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-brand img { width: auto; height: 26px; }
.foot-brand .domain { font-family: var(--font-mono); font-size: 13px; color: var(--text-dim); }
.site-footer .legal { flex: 1 1 100%; font-size: 13px; color: var(--text-dim); }
.site-footer .legal + .legal { margin-top: -8px; }

/* 404 */

.lost { padding: 120px 0 40px; }
.lost .wrap { display: flex; flex-direction: column; gap: 20px; max-width: 760px; margin: 0 auto; }
.lost h1 { font-size: 48px; line-height: 1.1; letter-spacing: -1px; }
.lost p { margin: 0; color: var(--text-body); font-size: 18px; }

/* Smaller screens */

@media (max-width: 1080px) {
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
}

@media (max-width: 900px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .window { display: none; }
  .window-compact { display: block; }
  .hero h1 { font-size: 52px; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; --section-gap: 80px; }

  .site-header .wrap { min-height: 64px; }
  .nav-main { display: none; }
  .menu { display: block; }
  .brand { gap: 8px; }
  .brand img { width: auto; height: 30px; }

  .hero { padding-top: 48px; }
  .hero .wrap { gap: 40px; }
  .hero-copy { gap: 20px; }
  .eyebrow { font-size: 12px; }
  .hero h1 { font-size: 38px; line-height: 1.08; letter-spacing: -0.8px; }
  .tagline { font-size: 19px; }
  .lead { font-size: 17px; }
  .hero-actions { flex-direction: column; align-items: stretch; padding-top: 4px; }
  .soon { justify-content: center; flex-wrap: wrap; text-align: center; padding: 8px 16px; }


  .section h2 { font-size: 30px; line-height: 1.12; letter-spacing: -0.5px; }
  .section-head { gap: 10px; }
  .section-head p { font-size: 16px; }
  .features .wrap { gap: 44px; }
  .feature-grid { gap: 44px; }
  .feature { gap: 14px; }
  .feature h3 { font-size: 20px; gap: 10px; }
  .feature h3 svg { width: 20px; height: 20px; }
  .feature p { font-size: 15.5px; }
  .feature p code { font-size: 13.5px; }
  pre.panel { padding: 14px 16px; font-size: 12.5px; }
  .kv { padding: 12px 16px; font-size: 12.5px; display: block; white-space: normal; }
  .kv > span:nth-child(odd) { margin-right: 1ch; }
  .kv > span:nth-child(even)::after { content: "\A"; white-space: pre; }
  .sent { font-size: 13px; }
  .sent-head { padding: 12px 16px; border-bottom: 0; padding-bottom: 0; }
  .sent-list { padding: 10px 16px 12px; }
  .sent-row { grid-template-columns: 44px minmax(0, 1fr); }
  .sent-row .to { grid-column: 2; font-family: var(--font-sans); font-size: 12px; }
  .sent-row .to::before { content: "to "; }
  .sent-row.never .to::before { content: ""; }
  .meters { padding: 14px 16px; gap: 12px; font-size: 13px; }
  .meter-label .val { font-size: 12px; }
  .meters .foot { font-size: 11.5px; }

  .how .wrap { gap: 24px; }
  .steps { gap: 16px; }
  .steps li { padding: 20px; gap: 10px; }
  .steps h3 { font-size: 20px; }
  .steps p { font-size: 15.5px; }

  .oss .wrap { gap: 18px; }
  .oss-main { gap: 18px; flex-basis: 100%; }
  .oss-main > p { font-size: 15.5px; }
  .status { padding: 14px 16px; }
  .status span { font-size: 14.5px; }
  .support { grid-template-columns: minmax(0, 1fr); font-size: 15px; }
  .support h3, .label { font-size: 12.5px; }
  .get { flex-basis: 100%; padding-top: 12px; gap: 12px; }
  .get .panel { padding: 14px 16px; }
  .get .needs { font-size: 14px; }

  .site-footer .wrap { flex-direction: column; align-items: flex-start; padding-top: 28px; padding-bottom: 40px; }
  .foot-brand { gap: 8px; }
  .foot-brand img { width: auto; height: 24px; }
  .site-footer .legal { font-size: 12.5px; }

  .lost { padding-top: 64px; }
  .lost h1 { font-size: 34px; }
}

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