/* Ablagent site — palette matches docs/assets artwork (render_readme_art.py) */
:root {
  --bg: #0b1420;
  --bg-2: #0e1a29;
  --panel: #142333;
  --line: #24394c;
  --line-2: #31485d;
  --ink: #edf5fa;
  --muted: #a8bccd;
  --accent: #74e3d0;
  --accent-dim: rgba(116, 227, 208, 0.12);
  --pass: #74e3d0;
  --fail: #ff7a6e;
  --warn: #ffc46e;
  --missing: #8fa3b8;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
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: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: var(--mono); font-size: 0.86em;
  background: var(--accent-dim); color: var(--accent);
  padding: 0.1em 0.35em; border-radius: 4px;
}
pre { font-family: var(--mono); }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 1.4rem;
  background: rgba(11, 20, 32, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.05rem; color: var(--ink); letter-spacing: 0.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; border-radius: 6px; display: block; }
.nav-links { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.nav-links a { color: var(--muted); font-size: 0.9rem; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-cta {
  border: 1px solid var(--line-2); border-radius: 6px; padding: 0.25rem 0.7rem;
  color: var(--ink) !important;
}
.nav-cta:hover { border-color: var(--accent); }

/* hero */
.hero {
  position: relative; overflow: hidden;
  padding: 5rem 1.4rem 4rem;
  background:
    radial-gradient(900px 420px at 85% 20%, rgba(116, 227, 208, 0.07), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: 1060px; margin: 0 auto; position: relative; z-index: 1; }
.eyebrow {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.22em;
  color: var(--accent); margin: 0 0 1rem;
}
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.12; margin: 0 0 1.2rem; max-width: 640px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { max-width: 640px; color: var(--muted); font-size: 1.08rem; margin: 0 0 1.8rem; }
.lede strong { color: var(--ink); }
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.btn {
  display: inline-block; padding: 0.65rem 1.3rem; border-radius: 8px;
  border: 1px solid var(--line-2); color: var(--ink); font-weight: 600; font-size: 0.95rem;
  background: var(--panel); cursor: pointer;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #06231d; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-small { padding: 0.4rem 0.9rem; font-size: 0.85rem; }
.hero-scope {
  font-family: var(--mono); font-size: 0.74rem; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 1rem; max-width: 640px;
}
.hero-graph {
  position: absolute; right: -40px; top: 50%; transform: translateY(-50%);
  width: 420px; height: 420px; opacity: 0.55; pointer-events: none;
}
@media (max-width: 900px) { .hero-graph { display: none; } }

/* sections */
.section { max-width: 1060px; margin: 0 auto; padding: 3.6rem 1.4rem 1rem; }
.section h2 { font-size: 1.7rem; margin: 0 0 0.7rem; }
.sec-num { font-family: var(--mono); color: var(--accent); font-size: 1rem; margin-right: 0.6rem; }
.section-lede { color: var(--muted); max-width: 820px; margin: 0 0 1.8rem; }
.section-lede em { color: var(--ink); font-style: normal; }

/* cards */
.cards { display: grid; gap: 1rem; }
.cards.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cards.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px;
  padding: 1.3rem 1.4rem;
}
.card h3 { margin: 0 0 0.6rem; font-size: 1.05rem; color: var(--accent); }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card p strong { color: var(--ink); }

/* stepper */
.stepper { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.step {
  flex: 1; min-width: 130px; text-align: left;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px;
  color: var(--muted); padding: 0.7rem 0.9rem; cursor: pointer;
  font-family: var(--sans); font-size: 0.95rem; font-weight: 600;
}
.step span { display: block; font-family: var(--mono); font-size: 0.7rem; color: var(--accent); letter-spacing: 0.15em; }
.step:hover { border-color: var(--accent); }
.step.active { border-color: var(--accent); color: var(--ink); background: var(--accent-dim); }
.stage-panel {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 1.5rem 1.6rem; min-height: 220px;
}
.stage-panel h3 { margin: 0 0 0.5rem; color: var(--accent); font-size: 1.15rem; }
.stage-panel .stage-purpose { color: var(--ink); margin: 0 0 0.9rem; }
.stage-panel ul { margin: 0 0 1rem; padding-left: 1.2rem; color: var(--muted); }
.stage-panel li { margin-bottom: 0.35rem; }
.stage-artifacts { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.stage-artifacts code { font-size: 0.78rem; }
.stage-boundary {
  margin-top: 1rem; padding: 0.7rem 1rem; border-left: 3px solid var(--accent);
  background: var(--accent-dim); border-radius: 0 8px 8px 0;
  color: var(--ink); font-size: 0.92rem;
}

/* gate explorer */
.gate-list { display: flex; flex-direction: column; gap: 0.6rem; }
.gate {
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px;
  overflow: hidden;
}
.gate-head {
  width: 100%; display: flex; align-items: center; gap: 0.9rem;
  background: none; border: none; color: var(--ink); cursor: pointer;
  padding: 0.9rem 1.1rem; font-family: var(--sans); font-size: 0.98rem; text-align: left;
}
.gate-head:hover { background: rgba(116, 227, 208, 0.05); }
.gate-name { font-family: var(--mono); font-size: 0.9rem; color: var(--accent); min-width: 220px; }
.gate-tag {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em;
  border: 1px solid var(--line-2); border-radius: 20px; padding: 0.15rem 0.6rem;
  color: var(--muted); white-space: nowrap;
}
.gate-tag.hard { color: var(--fail); border-color: rgba(255, 122, 110, 0.4); }
.gate-tag.precondition { color: var(--warn); border-color: rgba(240, 196, 108, 0.4); }
.gate-summary { color: var(--muted); font-size: 0.88rem; flex: 1; }
.gate-caret { color: var(--muted); transition: transform 0.15s; }
.gate.open .gate-caret { transform: rotate(90deg); }
.gate-body { display: none; padding: 0 1.1rem 1.1rem; color: var(--muted); font-size: 0.93rem; }
.gate.open .gate-body { display: block; }
.gate-body p { margin: 0.4rem 0; }
.gate-body .purpose { color: var(--ink); }
.gate-body .fail-mode { border-left: 3px solid var(--fail); padding-left: 0.8rem; margin-top: 0.7rem; }
@media (max-width: 700px) {
  .gate-head { flex-wrap: wrap; }
  .gate-name { min-width: 0; }
}
.hard-block-note {
  margin-top: 1.4rem; background: rgba(255, 122, 110, 0.06);
  border: 1px solid rgba(255, 122, 110, 0.35); border-radius: 12px; padding: 1.2rem 1.4rem;
}
.hard-block-note h3 { margin: 0 0 0.5rem; color: var(--fail); font-size: 1rem; }
.hard-block-note p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* simulator */
.sim { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 860px) { .sim { grid-template-columns: 1fr; } }
.sim-controls, .sim-output {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.3rem;
}
.sim-row { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 0.8rem; align-items: center; margin-bottom: 0.9rem; }
.sim-row label { color: var(--muted); font-size: 0.85rem; }
select, .state-select {
  background: var(--panel); color: var(--ink); border: 1px solid var(--line-2);
  border-radius: 6px; padding: 0.35rem 0.5rem; font-family: var(--mono); font-size: 0.8rem;
}
.sim-metric { border-top: 1px solid var(--line); padding-top: 0.8rem; margin-top: 0.4rem; }
.sim-metric-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.sim-metric-head strong { font-family: var(--mono); font-size: 0.88rem; color: var(--accent); }
.slider-row { display: flex; align-items: center; gap: 0.7rem; margin: 0.3rem 0; }
.slider-row label { color: var(--muted); font-size: 0.78rem; min-width: 58px; }
.slider-row input[type="range"] { flex: 1; accent-color: var(--accent); }
.slider-val { font-family: var(--mono); font-size: 0.8rem; min-width: 42px; text-align: right; }
.sim-redlines { border-top: 1px solid var(--line); margin-top: 0.8rem; padding-top: 0.8rem; }
.sim-redlines h4 { margin: 0 0 0.5rem; font-family: var(--mono); font-size: 0.85rem; color: var(--accent); }
.redline-note { margin: 0 0 0.6rem; font-size: 0.78rem; color: var(--muted); line-height: 1.45; }
.redline-row { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; margin: 0.3rem 0; }
.redline-row span { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.verdict {
  border-radius: 10px; padding: 1rem 1.2rem; margin-bottom: 1rem;
  font-family: var(--mono); border: 1px solid var(--line-2);
}
.verdict .verdict-status { font-size: 1.3rem; font-weight: 700; letter-spacing: 0.04em; }
.verdict .verdict-detail { font-size: 0.78rem; color: var(--muted); margin-top: 0.3rem; }
.verdict.eligible { border-color: var(--pass); background: rgba(116, 227, 208, 0.08); }
.verdict.eligible .verdict-status { color: var(--pass); }
.verdict.blocked { border-color: var(--warn); background: rgba(255, 196, 110, 0.07); }
.verdict.blocked .verdict-status { color: var(--warn); }
.verdict.hardblock { border-color: var(--fail); background: rgba(255, 122, 110, 0.08); }
.verdict.hardblock .verdict-status { color: var(--fail); }
.sim-gates { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 1rem; }
.sim-gate {
  display: flex; justify-content: space-between; gap: 0.8rem; align-items: baseline;
  font-family: var(--mono); font-size: 0.78rem; padding: 0.3rem 0.5rem;
  border-radius: 6px; background: var(--panel);
}
.sim-gate .g-name { color: var(--muted); }
.sim-gate .g-outcome { font-weight: 700; }
.outcome-PASS { color: var(--pass); }
.outcome-FAIL { color: var(--fail); }
.outcome-MISSING { color: var(--missing); }
.outcome-NOT_RUN { color: var(--warn); }
.outcome-ERROR { color: var(--fail); }
.outcome-NOT_APPLICABLE { color: var(--missing); }
.sim-invariants { border-top: 1px solid var(--line); padding-top: 0.8rem; font-size: 0.8rem; color: var(--muted); }
.sim-invariants div { margin: 0.25rem 0; }
.sim-invariants span { font-family: var(--mono); color: var(--accent); margin-right: 0.5rem; font-size: 0.74rem; }

/* evidence states */
.states-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.7rem; margin-bottom: 2rem; }
.state-card { background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 0.9rem 1rem; }
.state-card .state-name { font-family: var(--mono); font-weight: 700; font-size: 0.85rem; display: block; margin-bottom: 0.4rem; }
.state-card p { margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.45; }
.chain-title { margin: 0 0 0.9rem; font-size: 1.1rem; }
.chain { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.chain-node {
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 0.5rem 0.8rem; font-family: var(--mono); font-size: 0.74rem; color: var(--ink);
}
.chain-node small { display: block; color: var(--muted); font-size: 0.64rem; }
.chain-arrow { color: var(--accent); font-size: 1rem; }
.chain-note { color: var(--muted); font-size: 0.9rem; margin-top: 1rem; max-width: 860px; }

/* example */
.example-results { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 1.4rem 0 1rem; }
@media (max-width: 800px) { .example-results { grid-template-columns: 1fr; } }
.table-wrap { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
caption { text-align: left; color: var(--ink); font-weight: 600; padding-bottom: 0.7rem; font-size: 0.92rem; }
.caption-note { display: block; color: var(--muted); font-weight: 400; font-size: 0.75rem; }
th, td { padding: 0.45rem 0.7rem; text-align: right; border-bottom: 1px solid var(--line); font-family: var(--mono); }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.06em; }
tr.hl td { color: var(--accent); font-weight: 700; }
.example-facts { display: flex; flex-direction: column; gap: 0.8rem; justify-content: center; }
.fact { background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 0.8rem 1.1rem; display: flex; gap: 1rem; align-items: baseline; }
.fact-num { font-family: var(--mono); font-size: 1.25rem; font-weight: 700; color: var(--accent); white-space: nowrap; }
.fact-label { color: var(--muted); font-size: 0.83rem; }
.example-scope { color: var(--muted); font-size: 0.9rem; }

/* quickstart */
.code-stack { display: flex; flex-direction: column; gap: 0.9rem; }
.code-block { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.code-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 1rem; border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 0.8rem;
}
.copy {
  background: var(--panel); border: 1px solid var(--line-2); color: var(--muted);
  border-radius: 5px; padding: 0.15rem 0.6rem; font-size: 0.72rem; cursor: pointer;
  font-family: var(--mono);
}
.copy:hover { color: var(--accent); border-color: var(--accent); }
.code-block pre { margin: 0; padding: 0.9rem 1.1rem; font-size: 0.84rem; overflow-x: auto; color: var(--ink); }

/* footer */
.footer { border-top: 1px solid var(--line); margin-top: 4rem; background: var(--bg-2); }
.footer-inner {
  max-width: 1060px; margin: 0 auto; padding: 2rem 1.4rem;
  color: var(--muted); font-size: 0.85rem; display: flex; flex-direction: column; gap: 0.8rem;
}
.footer-scope { font-size: 0.78rem; border-left: 3px solid var(--line-2); padding-left: 0.9rem; }