/* overwatch documentation: live feedback for agentic engineering. */

:root {
  --bg: #f8f8fb;
  --bg-band: #f0eff7;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --ink: #171722;
  --ink-soft: #3f3e50;
  --muted: #747287;
  --line: #dedce8;
  --line-strong: #cbc8da;
  --accent: #6557e8;
  --accent-ink: #4c3fd0;
  --accent-soft: #ebe9ff;
  --success: #087f5b;
  --success-soft: #ddf5ec;
  --danger: #d7485f;
  --danger-soft: #ffe9ed;
  --code-bg: #f0eff5;
  --term-bg: #101016;
  --term-panel: #171720;
  --term-ink: #dcdbe8;
  --term-muted: #858397;
  --shadow: 0 2px 3px rgba(28, 25, 55, 0.04), 0 18px 50px rgba(28, 25, 55, 0.09);
  --shadow-lg: 0 30px 80px -28px rgba(39, 27, 99, 0.42);
  --radius: 16px;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d12;
    --bg-band: #12121a;
    --surface: rgba(24, 24, 34, 0.86);
    --surface-solid: #181822;
    --ink: #f0eff8;
    --ink-soft: #c6c3d6;
    --muted: #918ea3;
    --line: #292837;
    --line-strong: #3a384c;
    --accent: #8d82ff;
    --accent-ink: #a9a1ff;
    --accent-soft: #252143;
    --success: #43d4a4;
    --success-soft: #12362c;
    --danger: #ff7b8e;
    --danger-soft: #3d1c24;
    --code-bg: #1b1a25;
    --term-bg: #08080c;
    --term-panel: #111118;
    --shadow: 0 2px 3px rgba(0, 0, 0, 0.25), 0 18px 50px rgba(0, 0, 0, 0.24);
    --shadow-lg: 0 30px 90px -30px rgba(0, 0, 0, 0.8);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.68 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-underline-offset: 3px; }
code, pre { font-family: var(--mono); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  backdrop-filter: saturate(1.35) blur(18px);
}
.topbar-inner, .footer-inner {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.topbar-inner { min-height: 64px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.brand img { filter: drop-shadow(0 5px 10px color-mix(in srgb, var(--accent) 25%, transparent)); }
.topnav { display: flex; align-items: center; gap: 24px; }
.topnav a:not(.button) { color: var(--ink-soft); font-size: 14px; font-weight: 550; text-decoration: none; }
.topnav a:not(.button):hover { color: var(--ink); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--accent);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 22%, transparent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
.button:hover { background: var(--accent-ink); box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 30%, transparent); transform: translateY(-2px); }
.button.small { padding: 7px 13px; border-radius: 9px; font-size: 13px; }
.button.ghost { border-color: var(--line-strong); background: var(--surface); box-shadow: none; color: var(--ink); }
.button.ghost:hover { border-color: var(--accent); background: var(--surface-solid); }

.home { overflow: hidden; }
.hero {
  position: relative;
  isolation: isolate;
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 88px 0 108px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(480px, .98fr);
  gap: 68px;
  align-items: center;
}
.hero > * { min-width: 0; }
.hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  width: 620px;
  height: 620px;
  right: -180px;
  top: -200px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 20%, transparent), transparent 67%);
  filter: blur(4px);
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 18px -100vw auto;
  height: 460px;
  opacity: .26;
  background-image: linear-gradient(color-mix(in srgb, var(--line) 60%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--line) 60%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, transparent 10%, #000 45%, #000 70%, transparent 92%);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 6px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px color-mix(in srgb, var(--success) 15%, transparent); }
.hero h1 {
  max-width: 750px;
  margin: 0;
  font-size: clamp(43px, 6vw, 72px);
  font-weight: 850;
  letter-spacing: -.052em;
  line-height: .99;
}
.hero h1 em { color: var(--accent-ink); font-style: normal; }
.hero-lede { max-width: 38em; margin: 25px 0 32px; color: var(--ink-soft); font-size: clamp(17px, 2vw, 20px); line-height: 1.55; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-row.center { justify-content: center; }
.microcopy { margin: 17px 0 0; color: var(--muted); font-size: 13px; }
.microcopy code { padding: 2px 6px; border-radius: 5px; background: var(--code-bg); color: var(--ink-soft); }

.terminal {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  background: var(--term-bg);
  box-shadow: var(--shadow-lg);
  color: var(--term-ink);
  font: 13px/1.65 var(--mono);
  transform: perspective(1100px) rotateY(-2deg) rotateX(1deg);
}
.terminal::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, rgba(255,255,255,.04), transparent 26%); }
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 13px 15px; border-bottom: 1px solid rgba(255, 255, 255, .07); background: var(--term-panel); }
.terminal-bar > span { width: 10px; height: 10px; border-radius: 50%; background: #3d3c49; }
.terminal-bar > span:first-child { background: #ff6577; }
.terminal-bar > span:nth-child(2) { background: #ffc766; }
.terminal-bar > span:nth-child(3) { background: #47d59c; }
.terminal-bar p { margin: 0 0 0 10px; color: var(--term-muted); font-size: 11px; }
.terminal-body { padding: 21px 22px 23px; }
.terminal-body p { margin: 0 0 11px; }
.t-prompt { color: #fff; }
.t-tool { color: #a9a1ff; }
.t-path { color: var(--term-ink); }
.t-failure, .t-success { margin: 8px 0 14px; padding: 12px 14px; border-radius: 8px; }
.t-failure { border-left: 3px solid #ff7b8e; background: rgba(255, 123, 142, .09); }
.t-success { border-left: 3px solid #47d59c; background: rgba(71, 213, 156, .08); }
.t-failure p, .t-success p { margin: 0; }
.t-red { color: #ff8da0; font-weight: 650; }
.t-green { color: #63e0b1; font-weight: 650; }
.t-indent { padding-left: 2.1em; color: #aaa8b9; }
.t-agent { color: var(--term-muted); }
.terminal figcaption { padding: 10px 20px; border-top: 1px solid rgba(255,255,255,.07); color: var(--term-muted); font: 11px var(--sans); }

.band { padding: 90px max(20px, calc((100% - 1220px) / 2)); border-top: 1px solid var(--line); }
.band.tint { background: var(--bg-band); }
.section-head { max-width: 760px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { margin: 8px 0 12px; font-size: clamp(30px, 4.2vw, 46px); line-height: 1.1; letter-spacing: -.04em; }
.section-head p:not(.eyebrow) { margin: 0; color: var(--ink-soft); font-size: 18px; }
.eyebrow { margin: 0; color: var(--accent-ink); font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.cards { max-width: 1120px; margin: 0 auto; display: grid; gap: 18px; }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card::after { content: ""; position: absolute; width: 160px; height: 160px; right: -90px; bottom: -100px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.card h3 { margin: 0 0 9px; font-size: 19px; letter-spacing: -.02em; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.card code { padding: 1px 5px; border-radius: 5px; background: var(--code-bg); font-size: 12px; }
.icon { width: 42px; height: 42px; margin-bottom: 24px; display: grid; place-items: center; border-radius: 11px; background: var(--accent-soft); color: var(--accent-ink); font: 750 18px var(--mono); }
.language-cloud { max-width: 960px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.language-cloud span { padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); box-shadow: 0 1px 2px rgba(20,20,30,.04); color: var(--ink-soft); font: 600 13px var(--mono); }
.story { max-width: 850px; margin: 0 auto; padding: 42px 48px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.story h2:first-child { margin-top: 0; }
.final-cta { padding: 96px 20px; border-top: 1px solid var(--line); text-align: center; }
.final-cta h2 { margin: 0 0 12px; font-size: clamp(30px, 4.2vw, 46px); letter-spacing: -.04em; }
.final-cta p { margin: 0 0 28px; color: var(--ink-soft); font-size: 18px; }

.docs { width: min(1320px, calc(100% - 40px)); margin: 0 auto; padding: 46px 0 88px; display: grid; grid-template-columns: 210px minmax(0, 760px) 190px; justify-content: space-between; gap: 46px; }
.sidebar, .toc { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 116px); overflow-y: auto; }
.sidebar { display: flex; flex-direction: column; gap: 3px; }
.sidebar-group { margin: 20px 0 6px; padding-left: 10px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.sidebar-group:first-child { margin-top: 0; }
.sidebar a { padding: 7px 10px; border-radius: 8px; color: var(--ink-soft); font-size: 14px; text-decoration: none; }
.sidebar a:hover { background: var(--surface); color: var(--ink); }
.sidebar a.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.doc { min-width: 0; }
.doc h1 { margin: 7px 0 12px; font-size: clamp(36px, 5vw, 52px); line-height: 1.05; letter-spacing: -.045em; }
.lede { margin: 0 0 36px; color: var(--ink-soft); font-size: 19px; }
.toc-title { margin: 0 0 9px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.toc ul { margin: 0; padding: 0; list-style: none; }
.toc li { margin: 0; }
.toc a { display: block; padding: 4px 0; color: var(--muted); font-size: 13px; line-height: 1.4; text-decoration: none; }
.toc a:hover, .toc a.current { color: var(--accent-ink); }
.toc a.current { font-weight: 700; }
.toc li.sub a { padding-left: 12px; font-size: 12px; }
.toc.empty { visibility: hidden; }

.prose { color: var(--ink-soft); }
.prose h2 { margin: 50px 0 13px; color: var(--ink); font-size: 25px; letter-spacing: -.025em; scroll-margin-top: 96px; }
.prose h3 { margin: 34px 0 9px; color: var(--ink); font-size: 19px; }
.prose strong { color: var(--ink); }
.prose p, .prose ul, .prose ol { margin-top: 0; margin-bottom: 17px; }
.prose li { margin: 6px 0; }
.prose ul, .prose ol { padding-left: 22px; }
.prose code, .lede code { padding: 1px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--code-bg); color: var(--ink); font-size: .85em; }
.prose pre { position: relative; margin: 21px 0; padding: 18px 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--code-bg); font-size: 13px; line-height: 1.65; }
.prose pre code { padding: 0; border: 0; background: none; font-size: inherit; }
.prose table { display: block; width: 100%; max-width: 100%; margin: 22px 0; border: 1px solid var(--line); border-spacing: 0; border-radius: 12px; overflow-x: auto; font-size: 14px; }
.prose th, .prose td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose th { background: var(--bg-band); color: var(--ink); font-size: 12px; font-weight: 750; letter-spacing: .025em; white-space: nowrap; }
.prose td code { white-space: nowrap; }
.prose blockquote { margin: 24px 0; padding: 14px 18px; border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); border-left: 4px solid var(--accent); border-radius: 10px; background: var(--accent-soft); color: var(--ink); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose [hidden] { display: none; }
.prose :is(h2, h3, h4) a { color: inherit; text-decoration: none; }
.prose :is(h2, h3, h4) a:hover { color: var(--accent-ink); }

.scenario-search { position: sticky; top: 64px; z-index: 5; margin: 0 0 18px; padding: 12px 0 8px; background: var(--bg); }
.scenario-search input { width: 100%; padding: 13px 16px 13px 44px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-solid) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23747287' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") no-repeat 16px center; box-shadow: var(--shadow); color: var(--ink); font: 15px var(--sans); transition: border-color 140ms ease, box-shadow 140ms ease; }
.scenario-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.scenario-search::after { content: ""; position: absolute; inset: 100% 0 auto; height: 18px; background: linear-gradient(var(--bg), transparent); pointer-events: none; }
.prose .scenario-count { margin: 8px 2px 0; color: var(--muted); font-size: 13px; }

.prose .verified, .prose .proposed { --rail: linear-gradient(180deg, var(--success), var(--accent)); position: relative; margin: 16px 0; padding: 22px 24px 20px 28px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); cursor: pointer; transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease; }
.prose .proposed { --rail: repeating-linear-gradient(180deg, var(--line-strong) 0 8px, transparent 8px 14px); border-style: dashed; background: color-mix(in srgb, var(--surface) 55%, transparent); box-shadow: none; }
.prose .verified::before, .prose .proposed::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--rail); }
.prose .verified:hover, .prose .proposed:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.prose h4 { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 10px; color: var(--ink); font-size: 18px; letter-spacing: -.015em; line-height: 1.35; }
.prose h4 a { pointer-events: none; }
.prose .verified h4::after, .prose .proposed h4::after { flex: none; margin-left: auto; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 750; letter-spacing: .04em; line-height: 1.5; text-transform: uppercase; }
.prose .verified h4::after { content: "✓ Verified"; background: var(--success-soft); color: var(--success); }
.prose .proposed h4::after { content: "Proposed"; border: 1px dashed var(--line-strong); color: var(--muted); }
.prose .verified > p, .prose .proposed > p { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 16px; }
.prose .tag { padding: 1px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); cursor: pointer; font: 600 11px/1.9 var(--mono); transition: background 140ms ease, color 140ms ease; }
.prose .tag:hover { background: var(--accent); color: #fff; }
.prose .verified > p a, .prose .proposed > p a { margin-left: auto; padding: 3px 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-solid); color: var(--ink-soft); font-size: 12px; font-weight: 650; text-decoration: none; transition: border-color 140ms ease, color 140ms ease; }
.prose .verified > p a::after, .prose .proposed > p a::after { content: " ↗"; }
.prose .verified:hover > p a, .prose .proposed:hover > p a { border-color: var(--accent); color: var(--accent-ink); }
.prose .verified ul, .prose .proposed ul { position: relative; margin: 0; padding: 0; list-style: none; }
.prose .verified ul::before, .prose .proposed ul::before { content: ""; position: absolute; top: 14px; bottom: 14px; left: 4px; width: 1px; background: var(--line-strong); }
.prose .verified li, .prose .proposed li { --phase: var(--muted); position: relative; margin: 2px 0; padding-left: 5.6em; }
.prose li:has(.when) { --phase: var(--accent-ink); }
.prose li:has(.then) { --phase: var(--success); }
.prose .verified li::before, .prose .proposed li::before { content: ""; position: absolute; top: calc(.84rem - 4.5px); left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--phase); box-shadow: 0 0 0 3px var(--surface-solid); }
.prose .proposed li::before { background: var(--surface-solid); outline: 1.5px solid var(--phase); outline-offset: -1.5px; }
.prose li :is(.given, .when, .then) { position: absolute; left: 1.4em; color: var(--phase); font-size: 11px; font-weight: 800; letter-spacing: .08em; line-height: 1.68rem; text-transform: uppercase; }
.prose li a { color: var(--ink-soft); text-decoration: none; transition: color 140ms ease; }
.prose li a:hover { color: var(--ink); text-decoration: underline dotted var(--accent); }

pre .string { color: #137653; }
pre .number, pre .constant, pre .boolean { color: #b45716; }
pre .property, pre .label { color: #4168c5; }
pre .keyword, pre .function_builtin { color: #8050bd; }
pre .comment { color: var(--muted); font-style: italic; }
button.copy { padding: 5px 9px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface-solid); color: var(--ink-soft); cursor: pointer; font: 600 11px var(--sans); }
button.copy:hover { color: var(--ink); }
button.copy.floating { position: absolute; top: 9px; right: 9px; opacity: 0; transition: opacity 140ms ease; }
pre:hover button.copy.floating, button.copy.floating:focus { opacity: 1; }
@media (prefers-color-scheme: dark) {
  pre .string { color: #70d9a8; }
  pre .number, pre .constant, pre .boolean { color: #f2a667; }
  pre .property, pre .label { color: #91b1ff; }
  pre .keyword, pre .function_builtin { color: #cf9cff; }
}

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 58px; }
.pager a { display: flex; flex-direction: column; padding: 15px 18px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); text-decoration: none; }
.pager a:hover { border-color: var(--accent); }
.pager small { color: var(--muted); font-size: 12px; }
.pager .next { grid-column: 2; text-align: right; }
.footer { border-top: 1px solid var(--line); background: var(--bg-band); }
.footer-inner { min-height: 92px; flex-wrap: wrap; }
.footer p { margin: 0; color: var(--muted); font-size: 13px; }
.muted-brand { color: var(--ink-soft); font-size: 14px; }

@media (max-width: 1120px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(410px, .9fr); gap: 38px; }
  .docs { grid-template-columns: 190px minmax(0, 760px); justify-content: center; }
  .toc { display: none; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding: 58px 0 72px; }
  .terminal { transform: none; }
  .cards.three { grid-template-columns: minmax(0, 1fr); }
  .card { min-height: 0; }
  .docs { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-top: 28px; }
  .sidebar { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; }
  .sidebar-group { display: none; }
  .sidebar a { border: 1px solid var(--line); }
  .prose table { display: block; overflow-x: auto; }
}
@media (max-width: 600px) {
  .topbar-inner, .footer-inner, .hero, .docs { width: min(100% - 32px, 1220px); }
  .topnav a:not(.button) { display: none; }
  .hero h1 { font-size: 43px; }
  .cta-row { align-items: stretch; flex-direction: column; }
  .cta-row .button { width: 100%; }
  .band, .final-cta { padding: 66px 16px; }
  .story { padding: 28px 22px; }
  .terminal-body { padding: 17px; }
  .terminal-body p { overflow-wrap: anywhere; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager .next { grid-column: 1; }
  .footer-inner { padding: 22px 0; align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
