/* Control Room components (RFC-001 §11). Colors come only from the theme
   tokens in theme.css; every text color is used only on the backgrounds the
   contrast check in internal/theme covers. */

@font-face {
  font-family: "Geist";
  src: url("geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Geist", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
  overflow-wrap: break-word;
}
img { max-width: 100%; display: block; }
a { color: var(--accentText); }
a:focus-visible, button:focus-visible, summary:focus-visible, iframe:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.mono { font-family: "Geist Mono", ui-monospace, monospace; }
.label {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }
.section { padding-bottom: clamp(56px, 7vw, 88px); }
.section-title { font-size: clamp(26px, 2.8vw, 34px); letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 24px; }
.feature-title { font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -0.03em; line-height: 1.1; }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); max-width: 38rem; }
.muted { color: var(--muted); }

/* Header and footer */
.site-header {
  display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.brand {
  display: inline-flex; align-items: center; min-height: 44px; min-width: 44px;
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); text-decoration: none;
}
.nav { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.nav-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px;
  color: var(--soft); text-decoration: none; font-size: 15px;
}
.nav-link:hover { color: var(--text); }
.icon-button {
  width: 44px; height: 44px; border-radius: 4px; border: 1px solid var(--outline);
  background: transparent; color: var(--text); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
}
.icon-button[hidden] { display: none; }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .icon-sun { display: block; }
  :root:not([data-theme]) .icon-moon { display: none; }
}
.site-footer {
  display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center;
  padding: 24px 0 40px; border-top: 1px solid var(--border);
  font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; color: var(--muted);
}
.site-footer a { color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; }

/* Buttons */
.buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; min-width: 44px; padding: 0 22px; border-radius: 4px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.button-primary { background: var(--accent); color: var(--onAccent); border: 1px solid var(--accent); }
.button-secondary { background: transparent; color: var(--text); border: 1px solid var(--outline); font-weight: 500; }

/* Hero */
.hero {
  display: flex; flex-wrap: wrap; gap: 40px 48px; align-items: center;
  padding: clamp(48px, 7vw, 88px) 0 clamp(48px, 6vw, 72px);
}
.hero-copy { flex: 1 1 500px; min-width: 0; }
.hero-side { flex: 1 1 460px; min-width: 0; }
.eyebrow {
  font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accentText); margin-bottom: 18px;
}
.hero-title { font-size: clamp(36px, 4.6vw, 58px); line-height: 1.05; letter-spacing: -0.035em; margin-bottom: 20px; }
.hero .lead { margin-bottom: 28px; }

/* Panels */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; }
.caption { margin-top: 10px; font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; color: var(--dim); }

/* Activity log */
.log { overflow: hidden; }
.log-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px;
}
.log-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.log-counts { color: var(--muted); }
.log-counts .needs { color: var(--amber); }
.log-row {
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-start;
  padding: 16px 18px; border-bottom: 1px solid var(--rowBorder);
}
.log-row:last-child { border-bottom: 0; }
.log-row.needs-you { background: var(--amberRow); }
.log-time { flex: 0 0 44px; font-family: "Geist Mono", ui-monospace, monospace; font-size: 13px; color: var(--muted); padding-top: 1px; }
.log-body { flex: 1 1 220px; min-width: 0; }
.log-worker { font-family: "Geist Mono", ui-monospace, monospace; font-size: 13px; margin-bottom: 3px; }
.log-action { font-size: 15px; color: var(--soft); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-family: "Geist Mono", ui-monospace, monospace; font-size: 11px; padding: 1px 7px;
  border-radius: 3px; border: 1px solid var(--border); color: var(--muted);
}
.log-state { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.pill { font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill-done { background: var(--okBg); color: var(--okText); }
.pill-running { border: 1px solid var(--accent); color: var(--accentText); padding: 2px 9px; }
.pill-needs { background: var(--amberBg); color: var(--amber); }
.pill-ready { border: 1px solid var(--outline); color: var(--soft); padding: 2px 9px; }
.review {
  font-size: 13px; padding: 4px 12px; border-radius: 4px; border: 1px solid var(--amber); color: var(--amber);
}

/* Routing trace */
.trace { padding: clamp(20px, 3.5vw, 40px); }
.trace .label { margin-bottom: 14px; }
.trace .feature-title { margin-bottom: 12px; }
.trace-body { font-size: clamp(16px, 1.5vw, 18px); color: var(--muted); max-width: 46rem; margin-bottom: 32px; }
.lane { display: flex; flex-direction: column; gap: 14px; padding: clamp(16px, 2.5vw, 24px); border-radius: 6px; }
.lane + .lane { margin-top: 14px; }
.lane-today { border: 1px dashed var(--outline); }
.lane-zati { border: 1px solid var(--accent); background: var(--okWash); }
.lane-head {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between;
  font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; color: var(--muted);
}
.lane-today .lane-name { color: var(--amber); letter-spacing: 0.08em; }
.lane-zati .lane-name { color: var(--okText); letter-spacing: 0.08em; }
.flow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.flow li { display: inline-flex; align-items: center; gap: 10px; }
.flow-step { font-family: "Geist Mono", ui-monospace, monospace; font-size: 13px; padding: 8px 12px; border-radius: 4px; }
.lane-today .flow-step { border: 1px solid var(--border); background: var(--bg); color: var(--soft); }
.lane-zati .flow-step { background: var(--okBg); color: var(--okText); }
.lane-zati .flow-step.checkpoint { background: var(--amberBg); color: var(--amber); }
.connector { font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; }
.lane-today .connector { color: var(--amber); }
.lane-zati .connector { color: var(--okText); }

/* Connected apps */
.apps { border-top: 1px solid var(--border); margin-top: 36px; padding-top: 28px; }
.apps-head { display: flex; flex-wrap: wrap; gap: 8px 12px; justify-content: space-between; align-items: baseline; margin-bottom: 20px; }
.apps-head h3 { font-size: 20px; }
.apps-head .works { font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; color: var(--muted); }
.app-groups { display: flex; flex-wrap: wrap; gap: 24px; }
.app-group { flex: 1 1 240px; min-width: 0; }
.app-group .label { font-size: 11px; margin-bottom: 10px; }
.app-list { display: flex; flex-direction: column; gap: 8px; }
.app {
  display: flex; gap: 12px; align-items: center; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--panel2);
  font-family: "Geist Mono", ui-monospace, monospace; font-size: 13px;
}
.app-logo { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 5px; object-fit: contain; }
.app-logo-slot { border: 1px dashed var(--outline); }

/* Demo video */
.video { display: flex; flex-wrap: wrap; gap: 20px; }
.video-main { flex: 2 1 560px; min-width: 0; }
.video-stage {
  position: relative; aspect-ratio: 16 / 9; background: var(--bar); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
}
.video-poster { width: 100%; height: 100%; object-fit: cover; }
.video-play {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-decoration: none; color: var(--text);
}
.video-play-icon {
  width: 76px; height: 76px; border-radius: 50%; background: var(--accent); color: var(--onAccent);
  display: flex; align-items: center; justify-content: center;
}
.video-play-note {
  font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; color: var(--text);
  background: var(--bar); padding: 2px 8px; border-radius: 4px;
}
.video-frame { width: 100%; height: 100%; border: 0; display: block; }
.video-fallback { margin-top: 10px; font-size: 14px; }
.video-fallback a { display: inline-flex; align-items: center; min-height: 44px; }
.chapters { flex: 1 1 260px; min-width: 0; padding: 20px; }
.chapters .label { font-size: 11px; margin-bottom: 4px; }
.chapter {
  display: flex; gap: 14px; align-items: center; min-height: 44px; padding: 10px 0;
  border-top: 1px solid var(--rowBorder); color: var(--soft); text-decoration: none; font-size: 15px;
}
.chapter-time { flex: 0 0 52px; font-family: "Geist Mono", ui-monospace, monospace; font-size: 13px; color: var(--accentText); }

/* Card grids: stalls and steps */
.cards { display: flex; flex-wrap: wrap; gap: 16px; }
.card { flex: 1 1 280px; min-width: 0; padding: 24px; }
.card-kicker { font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; margin-bottom: 14px; }
.stall .card-kicker { color: var(--amber); }
.card h3 { font-size: 20px; line-height: 1.25; margin-bottom: 10px; }
.card p { color: var(--muted); }
.step { flex: 1 1 260px; min-width: 0; border-top: 1px solid var(--accent); padding-top: 18px; }
.step .card-kicker { color: var(--accentText); }
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--muted); }

/* Roster */
.roster { display: flex; flex-direction: column; gap: 10px; }
.worker { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-start; padding: 20px; }
.worker-main { flex: 1 1 240px; min-width: 0; }
.worker-name { font-family: "Geist Mono", ui-monospace, monospace; font-size: 15px; margin-bottom: 4px; }
.worker-detail { flex: 1 1 200px; min-width: 0; }
.worker-detail .label { font-size: 11px; margin-bottom: 4px; }
.worker-detail .asks { color: var(--amber); }
.worker p { color: var(--soft); font-size: 15px; }

/* Closing */
.closing {
  background: var(--panel2); border: 1px solid var(--border); border-radius: 8px;
  padding: clamp(24px, 4vw, 48px); display: flex; flex-wrap: wrap; gap: 24px;
  align-items: center; justify-content: space-between; margin-bottom: clamp(40px, 5vw, 64px);
}
.closing-copy { flex: 1 1 420px; min-width: 0; }
.closing .feature-title { margin-bottom: 10px; }
.closing p { color: var(--muted); font-size: 17px; }

/* FAQ */
.faq { display: flex; flex-direction: column; }
.faq details { border-top: 1px solid var(--border); }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex; align-items: center; min-height: 52px; padding: 12px 0;
  cursor: pointer; font-size: 17px; font-weight: 500; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; padding-left: 16px; font-family: "Geist Mono", ui-monospace, monospace; color: var(--muted); }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { color: var(--muted); padding-bottom: 16px; max-width: 46rem; }

/* Template gallery */
.gallery { display: flex; flex-wrap: wrap; gap: 16px; }
.template { flex: 1 1 300px; min-width: 0; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.template h3 { font-size: 20px; }
.template h3 a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); }
.template p { color: var(--muted); }
.template .button { align-self: flex-start; }

/* Pricing reference */
.pricing { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; padding: 20px 24px; }
.pricing p { flex: 1 1 320px; color: var(--soft); }
.pricing a { display: inline-flex; align-items: center; min-height: 44px; }

/* Content-addressed illustrations share the existing Control Room tokens. */
.illustration { margin: 0; min-width: 0; }
.illustration img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.illustration .caption { color: var(--muted); max-width: 64rem; }
.hero-side .illustration { width: 100%; }

/* Editorial prose keeps authored paragraphs and lists without card scaffolding. */
.prose-copy { max-width: 78ch; }
.prose-content { display: grid; gap: 18px; overflow-wrap: anywhere; }
.prose-content p, .prose-content ul, .prose-content ol { margin: 0; }
.prose-content h3 { margin: 14px 0 0; font-size: clamp(1.15rem,2vw,1.45rem); line-height: 1.35; }
.prose-content ul, .prose-content ol { padding-inline-start: 1.5em; }
.prose-content ul { list-style: disc; }
.prose-content ol { list-style: decimal; }
.prose-content li + li { margin-top: .65em; }
.prose-copy .buttons { margin-top: 24px; }

.prose-content blockquote { margin: 0; padding: 4px 0 4px 20px; border-inline-start: 3px solid var(--accent); }

/* Keep authored tables semantic and independently scrollable on narrow screens. */
.prose-table-region { max-width: 100%; min-width: 0; overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
.prose-table-region:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.prose-table-region table { width: 100%; min-width: 32rem; border-collapse: collapse; font-size: .95em; }
.prose-table-region th, .prose-table-region td { padding: 14px 16px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--border); }
.prose-table-region th { font-weight: 650; }
.prose-table-region tbody tr:last-child td { border-bottom: 0; }
