/* AgentOps Monitor — Financial Terminal direction
   mono throughout, tabular numerals, semantic colour only, zero radius. */

:root {
  --bg: #0e1116;
  --surface: #161b22;
  --surface-2: #1c2230;
  --line: #2a3140;
  --line-strong: #3a4256;
  --text: #e6edf3;
  --text-muted: #8b95a7;
  --accent: #56d364;      /* semantic ok */
  --warn: #f0b429;        /* semantic warn */
  --fail: #f85149;        /* semantic fail */
  --hot: #d29922;
  --loop: #58a6ff;
  --font-mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --font-sans: var(--font-mono);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
a:hover { border-bottom-color: var(--text); }
a:focus-visible, button:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--text);
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- Top bar ---------- */
.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-bottom: none;
  color: var(--text);
}
.brand-mark { color: var(--accent); font-weight: 700; letter-spacing: -1px; }
.brand-name { font-weight: 600; }
.brand-meta { color: var(--text-muted); font-size: 12px; }
.nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
}
.nav a {
  border-bottom: none;
  color: var(--text-muted);
  font-size: 14px;
}
.nav a:hover { color: var(--text); }

/* ---------- CTAs ---------- */
.cta {
  display: inline-block;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.cta-primary {
  background: var(--accent);
  color: #0a0d12;
  border-color: var(--accent);
}
.cta-primary:hover { background: #6ee07a; }
.cta-ghost:hover { border-color: var(--text); }

/* ---------- Layout ---------- */
main { display: block; }
section { padding: 56px 20px; max-width: 1200px; margin: 0 auto; }
section + section { border-top: 1px solid var(--line); }

/* ---------- Hero ---------- */
.hero { padding-top: 72px; padding-bottom: 64px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; }
}
.eyebrow {
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(28px, 4.6vw, 48px);
  line-height: 1.1;
  margin: 0 0 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.lede {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0 0 28px;
  max-width: 56ch;
}
.hero-actions { display: flex; gap: 12px; margin: 0 0 18px; flex-wrap: wrap; }
.hero-meta { color: var(--text-muted); font-size: 13px; margin: 0; max-width: 60ch; }

/* ---------- Surfaces (in-DOM product surfaces) ---------- */
.surface {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 16px;
  margin: 0;
  position: relative;
  min-width: 0;
}
.surface + .surface { margin-top: 16px; }
.surface-head {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.surface-head > span:first-child { color: var(--text); font-weight: 600; }
.surface-head span { min-width: 0; overflow-wrap: anywhere; }
.figure-tag {
  position: absolute;
  top: -10px;
  left: 12px;
  background: var(--bg);
  color: var(--text-muted);
  padding: 0 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line);
}
.figure-caption {
  font-size: 12px;
  color: var(--text-muted);
  margin: 12px 0 0;
}

/* ---------- Trace surface ---------- */
.trace-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px 16px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.trace-meta span { white-space: nowrap; }
.trace-spans {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.span {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.span .time { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.span .agent { color: var(--text); }
.span .tool { color: var(--text-muted); }
.span-loop .tool { color: var(--loop); }
.span-hot .tool { color: var(--hot); }
.span-fail .tool { color: var(--fail); }

/* ---------- Section heads ---------- */
.section-head {
  margin-bottom: 28px;
  max-width: 70ch;
}
.section-head h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* ---------- Thesis ---------- */
.thesis h2 { display: none; }
.thesis p {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.3;
  margin: 0;
  max-width: 60ch;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ---------- Pains ---------- */
.pain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.pain-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.pain-num { color: var(--text-muted); font-size: 13px; }
.pain-list p { margin: 0; font-size: 16px; }

/* ---------- Surface sections ---------- */
.surface-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.surface-row > * { min-width: 0; }
@media (min-width: 960px) {
  .surface-row { grid-template-columns: 1fr 1fr; }
}

.kv {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 13px;
  min-width: 0;
}
.kv span { color: var(--text-muted); }
.kv code { color: var(--text); }
.kv code { min-width: 0; overflow-wrap: anywhere; }

.block {
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 12px;
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text);
  overflow-x: auto;
  border-radius: 0;
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.block code { color: inherit; }

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  height: 64px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin: 8px 0 6px;
  overflow: hidden;
}
.bar {
  position: absolute;
  top: 8px;
  height: 12px;
  background: var(--line-strong);
}
.bar-hot { background: var(--hot); }
.bar-loop { background: var(--loop); }
.timeline-axis {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  padding: 4px 2px 0;
}

/* ---------- Install ---------- */
.install-row {
  display: grid;
  gap: 14px;
  align-items: start;
}
@media (min-width: 720px) {
  .install-row { grid-template-columns: 1fr auto; }
}
.install {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 16px;
  margin: 0;
  overflow-x: auto;
}
.install code { font-size: 14px; color: var(--text); }
.install-meta { color: var(--text-muted); font-size: 13px; margin-top: 12px; }

/* ---------- Integrations ---------- */
.integration-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.integration-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.int-status { color: var(--accent); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- Pricing ---------- */
.plan-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--line-strong);
}
@media (min-width: 880px) {
  .plan-row { grid-template-columns: repeat(4, 1fr); }
}
.plan {
  padding: 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.plan:last-child { border-right: none; border-bottom: none; }
@media (max-width: 879px) {
  .plan { border-right: none; }
}
.plan h3 {
  margin: 0 0 12px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.plan .price {
  margin: 0 0 14px;
}
.plan .amount {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.plan .period {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.plan ul {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  font-size: 13px;
  color: var(--text-muted);
}
.plan ul li {
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}
.plan ul li:last-child { border-bottom: none; }
.plan .cta { width: 100%; text-align: center; }

/* ---------- Ledger ---------- */
.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ledger th, .ledger td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.ledger th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--line-strong);
}
.ledger td.num, .ledger th.num { text-align: right; font-variant-numeric: tabular-nums; }
.status-ok { color: var(--accent); }
.status-warn { color: var(--warn); }
.status-fail { color: var(--fail); }

/* ---------- Audit ---------- */
.audit-table th, .audit-table td { padding: 10px 12px; }

/* ---------- Close ---------- */
.close { padding-top: 80px; padding-bottom: 80px; }
.close h2 {
  font-size: clamp(24px, 3.4vw, 36px);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.close p { margin: 0 0 16px; color: var(--text-muted); font-size: 16px; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 24px 20px;
  background: var(--bg);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}
.footer-meta a { border-bottom: none; }

/* ---------- Motion ---------- */
@keyframes surfaceIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.surface { animation: surfaceIn 360ms ease-out both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
  .surface { animation: none; }
}

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
  .nav { display: none; }
  .topbar-inner { gap: 12px; }
  .span { grid-template-columns: 64px 1fr; }
  .span .tool { grid-column: 2; color: var(--text-muted); }
}

:root {
  --bg: #f6f5f0;
  --surface: #fbfaf6;
  --surface-2: #eeece4;
  --line: #d3d0c5;
  --line-strong: #8a877d;
  --text: #171713;
  --text-muted: #5e5c55;
  --accent: #176b3a;
  --warn: #9a5b00;
  --fail: #a92c26;
  --hot: #9a5b00;
  --loop: #275e91;
  --font-sans: Georgia, "Times New Roman", serif;
}

body {
  font-family: Georgia, "Times New Roman", serif;
  background-image: none;
}

.brand,
.nav,
.cta,
.eyebrow,
.brand-meta,
.surface,
.ledger,
.trace-meta,
.timeline-axis,
.figure-tag,
.figure-caption,
.pain-num,
.install,
.int-status,
.footer-inner {
  font-family: var(--font-mono);
}

.hero h1,
.section-head h2,
.thesis p,
.close h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.surface,
.install,
.plan-row {
  box-shadow: none;
}

.surface {
  border-left-width: 3px;
  border-top-color: var(--line);
  border-right-color: var(--line);
  border-bottom-color: var(--line);
}

.trace-spans,
.ledger,
.pain-list {
  font-variant-numeric: tabular-nums;
}

.topbar {
  background: rgba(246, 245, 240, 0.96);
}

.cta-primary {
  color: #ffffff;
}
