/* Shared by the company page and the ARES page. The demo carries its own
   stylesheet, lifted from the product, and does not use this one. */

:root {
  /* Declared so nothing force-darkens: Chrome's auto-dark leaves a page alone
     only once it says it handles both. */
  color-scheme: light dark;

  /* Light is the default. Dark is applied by the two rules below rather than
     by light-dark(), which resolves to the light value on any browser that
     does not support it, so dark mode silently did nothing there. */
  --ground: #fbfbfd;
  --ink: #12141a;
  --muted: #656b7a;
  --rule: #dfe2ea;
  --reject: #b3372c;
  --quote-wash: rgba(0, 0, 0, .02);
  --bar: rgba(251, 251, 253, .82);
  --pill: rgba(18, 20, 26, .06);
  --measure: 66ch;

  /* Four steps, roughly 1.2 apart, plus two clamps for headings. This is not
     the console ramp in ARES/web/DESIGN.md; that is an instrument face and
     this is a document. Anything between these steps is drift. */
  --t-micro: 11px;   /* uppercase mono labels, badges, table headers */
  --t-small: 13px;   /* notes, data values, footer */
  --t-base: 16px;    /* prose, and the claim inside a specimen */
  --t-lede: 18px;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Specimens are the product, lifted whole. On paper they are the console's
     deep ground; on a dark page --p-bg rises to its lifted surface so the
     inset still reads as a different material. Both are the product's own. */
  --p-bg: #0b0f18;
  --p-line: rgba(255, 255, 255, .10);
  --p-line-strong: rgba(255, 255, 255, .16);
  --p-ink: #e2e8f0;
  --p-soft: #94a3b8;
  --p-brand: #00d2be;
  --p-danger: #ef4444;
  --p-danger-ink: #ffc5c5;
  --p-success: #6ee7b7;
  --p-sky: #bae6fd;
  --p-warn: #f59e0b;
}

/* Dark, twice on purpose: once for people who never touch the control, once
   for people who pin it. Both lists are generated from one source so they
   cannot drift apart. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #07090e;
    --ink: #e2e8f0;
    --muted: #94a3b8;
    --rule: rgba(255, 255, 255, .11);
    --reject: #e4685c;
    --quote-wash: rgba(255, 255, 255, .04);
    --p-bg: #151c2c;
    --bar: rgba(7, 9, 14, .82);
    --pill: rgba(255, 255, 255, .08);
  }
}
:root[data-theme="dark"] {
    --ground: #07090e;
    --ink: #e2e8f0;
    --muted: #94a3b8;
    --rule: rgba(255, 255, 255, .11);
    --reject: #e4685c;
    --quote-wash: rgba(255, 255, 255, .04);
    --p-bg: #151c2c;
    --bar: rgba(7, 9, 14, .82);
    --pill: rgba(255, 255, 255, .08);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
body {
  background: var(--ground); color: var(--ink); margin: 0;
  font-family: var(--sans); font-size: var(--t-base); line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.page { max-width: 940px; margin: 0 auto; padding: 0 24px 96px; }
section { padding-block: 52px; border-top: 1px solid var(--rule); }
p { max-width: var(--measure); }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--reject); outline-offset: 3px; }

.eyebrow {
  font-family: var(--mono); font-size: var(--t-micro); letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
h1, h2 { font-family: var(--serif); font-weight: 600; text-wrap: balance; line-height: 1.15; margin: 0 0 16px; }
h1 { font-size: clamp(30px, 5vw, 46px); letter-spacing: -.015em; }
h2 { font-size: clamp(21px, 2.6vw, 27px); }
.lede { font-size: var(--t-lede); color: var(--muted); max-width: var(--measure); }
.note { font-size: var(--t-small); color: var(--muted); margin-top: 16px; max-width: var(--measure); }

/* Scoped to the page's own hero. A bare `header` selector also caught the
   top bar, which is a <header> too, and gave it 100px of hero padding. */
.page > header { padding-block: 72px 52px; text-align: center; }
.page > header p { margin-inline: auto; }
h1 em { font-style: italic; color: var(--muted); }
/* A real signal, not decoration: what the recorded runs actually contain. */
.signal {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 26px;
  font-family: var(--mono); font-size: var(--t-micro); letter-spacing: .06em;
  color: var(--muted); border: 1px solid var(--rule);
  border-radius: 999px; padding: 6px 14px;
}
.signal i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--reject); flex: none;
}
.actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-top: 30px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  font-size: var(--t-base); text-decoration: none; white-space: nowrap;
}
.btn--primary { background: var(--ink); color: var(--ground); }
.btn--primary:hover { opacity: .86; }
.btn--ghost { border: 1px solid var(--rule); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.facts {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px;
  margin-top: 34px; font-family: var(--mono); font-size: var(--t-micro);
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}

/* Eyebrow with a rule running off to the right, the way blink marks a band. */
.eyebrow--rule { display: flex; align-items: center; gap: 14px; }
.eyebrow--rule::after {
  content: ""; flex: 1; height: 1px; background: var(--rule);
}
/* The company page's own name should carry weight; on the ARES page the same
   element is a link back, and has to stay under that page's h1. */
.cta {
  display: inline-flex; align-items: center; min-height: 44px;
  margin-top: 18px; font-size: var(--t-base); color: var(--reject);
  text-decoration-thickness: 1px; text-underline-offset: 5px;
}
.cta::after { content: " \2192"; }

/* ---- top bar ---------------------------------------------------------- *
   Identity, the two other destinations, and the scheme control, pinned to the
   top of every page. Sticky because these pages are long and the way out
   should not require scrolling back. */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--bar);
  border-bottom: 1px solid var(--rule);
}
@supports (backdrop-filter: blur(8px)) {
  .topbar { backdrop-filter: saturate(1.4) blur(10px); }
}
.topbar__inner {
  /* Wider than the text column on purpose: the bar belongs to the window, so
     the control sits at the top right of the screen rather than at the right
     edge of the prose. */
  max-width: 1400px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 10px 22px; flex-wrap: wrap;
  min-height: 56px;
}
.brand {
  font-family: var(--mono); font-size: var(--t-micro); letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); text-decoration: none;
  white-space: nowrap; padding: 4px 0;
}
.brand b { color: var(--reject); font-weight: 700; }
.brand:hover { color: var(--ink); }
.tabs { display: flex; align-items: center; gap: 4px; }
.tabs a {
  font-family: var(--mono); font-size: var(--t-micro); letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); text-decoration: none;
  padding: 8px 10px; border-bottom: 2px solid transparent; min-height: 36px;
  display: inline-flex; align-items: center;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] {
  color: var(--ink); border-bottom-color: transparent;
  background: var(--pill); border-radius: 999px;
}
.bar-cta {
  font-family: var(--mono); font-size: var(--t-micro); letter-spacing: .08em;
  text-transform: uppercase; text-decoration: none; white-space: nowrap;
  background: var(--ink); color: var(--ground);
  border-radius: 999px; padding: 9px 15px; min-height: 36px;
  display: inline-flex; align-items: center;
}
.bar-cta:hover { opacity: .86; }
/* Three icons in one pill, the way blink groups them: compact enough to sit
   beside a call to action without crowding it. */
.scheme {
  display: flex; align-items: center; gap: 2px; margin-left: auto;
  background: var(--pill); border-radius: 999px; padding: 3px;
}
.scheme button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 30px; padding: 0; cursor: pointer;
  background: none; border: 0; border-radius: 999px; color: var(--muted);
}
.scheme button svg { width: 15px; height: 15px; }
.scheme button:hover { color: var(--ink); }
.scheme button[aria-pressed="true"] { color: var(--ink); background: var(--ground); }
.scheme button:focus-visible,
.tabs a:focus-visible,
.brand:focus-visible { outline: 2px solid var(--reject); outline-offset: 2px; }

/* Narrow: identity and the control hold the first row, the tabs take the
   second, so nothing shrinks below a comfortable target. */
@media (max-width: 620px) {
  .topbar__inner { padding: 8px 20px; gap: 6px 12px; }
  .brand { flex: 1 1 auto; }
  .tabs { order: 3; flex-basis: 100%; margin-left: -10px; }
  /* The hero repeats both actions immediately below, so the bar's own call to
     action is redundant here and costs a whole row. */
  .bar-cta { display: none; }
}

/* ---- specimens ---- */
.spec {
  background: var(--p-bg); border: 1px solid var(--p-line-strong);
  border-radius: 10px; color: var(--p-ink); margin-top: 26px;
  max-width: 620px; overflow: hidden;
}
.spec-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; border-bottom: 1px solid var(--p-line);
}
.spec-kind {
  font-family: var(--mono); font-size: var(--t-micro); letter-spacing: .1em; text-transform: uppercase;
  color: var(--p-brand); border: 1px solid var(--p-brand); border-radius: 999px; padding: 2px 9px;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono);
  font-size: var(--t-micro); border-radius: 999px; padding: 3px 10px;
  color: var(--p-danger-ink); background: rgba(239, 68, 68, .14);
  border: 1px solid rgba(239, 68, 68, .45);
}
.badge.ok {
  color: var(--p-success); background: rgba(16, 185, 129, .14);
  border-color: rgba(16, 185, 129, .45);
}
.badge.warn {
  color: #ffe0ad; background: rgba(245, 158, 11, .14);
  border-color: rgba(245, 158, 11, .45);
}
.badge.mute {
  color: var(--p-soft); background: rgba(255, 255, 255, .04);
  border-color: var(--p-line-strong);
}
.spec-body { padding: 16px; }
.spec-claim { font-size: var(--t-base); line-height: 1.55; margin: 0 0 16px; max-width: none; }
.kv { display: grid; grid-template-columns: 152px 1fr; gap: 7px 14px; font-size: var(--t-small); align-items: baseline; margin: 0; }
.kv dt { color: var(--p-soft); margin: 0; }
.kv dd { margin: 0; font-family: var(--mono); word-break: break-word; }
.kv dd.ref { color: var(--p-sky); }
.gate { color: var(--p-danger); }
.gate.ok { color: var(--p-success); }
.spec-foot {
  border-top: 1px solid var(--p-line); padding: 11px 16px;
  font-size: var(--t-small); color: var(--p-soft); font-family: var(--mono);
}

/* ---- UI fragments, drawn in the product's own language ---- */
.ui-compose {
  border: 1px solid var(--p-line-strong); border-radius: 8px;
  padding: 14px; background: rgba(255, 255, 255, .02);
}
.ui-compose__ph { color: var(--p-soft); font-size: var(--t-small); }
.ui-compose__row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 40px; border-top: 1px solid var(--p-line); padding-top: 12px;
}
.ui-hint { font-family: var(--mono); font-size: var(--t-micro); color: var(--p-soft); }
.ui-btn {
  font-family: var(--mono); font-size: var(--t-micro); font-weight: 600;
  background: var(--p-brand); color: #052019; border-radius: 6px;
  padding: 7px 14px; letter-spacing: .04em; white-space: nowrap;
}
.ui-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.ui-tab {
  font-family: var(--mono); font-size: var(--t-micro); color: var(--p-soft);
  border: 1px solid var(--p-line); border-radius: 6px; padding: 5px 10px;
}
.ui-tab.on { color: var(--p-ink); border-color: var(--p-line-strong); background: rgba(255, 255, 255, .05); }

.ui-run { display: grid; grid-template-columns: 3px 1fr; gap: 14px; align-items: stretch; }
.ui-run__bar { background: var(--p-warn); border-radius: 2px; }
.ui-run__chips { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin-bottom: 9px; }
.ui-run__title { font-size: var(--t-small); color: var(--p-ink); line-height: 1.5; margin: 0 0 6px; max-width: none; }
.ui-run__meta { font-family: var(--mono); font-size: var(--t-micro); color: var(--p-soft); }
.ui-chip {
  font-family: var(--mono); font-size: var(--t-micro);
  border-radius: 999px; padding: 2px 9px; border: 1px solid;
}
.ui-chip--warn { color: #ffe0ad; background: rgba(245, 158, 11, .14); border-color: rgba(245, 158, 11, .45); }
.ui-chip--mute { color: var(--p-soft); background: rgba(255, 255, 255, .04); border-color: var(--p-line); }
.ui-chip--fail { color: var(--p-danger-ink); background: rgba(239, 68, 68, .14); border-color: rgba(239, 68, 68, .45); }

/* Legend under the graph fragment: every node type the graph can hold. */
.ui-legend {
  display: flex; flex-wrap: wrap; gap: 10px 20px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--p-line);
}
.ui-legend__item {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: var(--t-micro); color: var(--p-soft);
}
.ui-legend__item b { color: var(--p-ink); font-weight: 500; }

/* ---- prose furniture ---- */
table { border-collapse: collapse; width: 100%; font-size: var(--t-small); }
.scroll { overflow-x: auto; margin-top: 22px; }
th, td { text-align: left; padding: 9px 16px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th {
  font-family: var(--mono); font-size: var(--t-micro); letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-weight: 400;
}
td.v { font-family: var(--mono); font-size: var(--t-small); white-space: nowrap; }
td.off { color: var(--muted); }

ol.steps {
  list-style: none; counter-reset: s; display: grid; gap: 18px;
  max-width: var(--measure); padding: 0; margin: 24px 0 0;
}
/* Absolute counter, not a grid column: a grid makes every inline child its own
   item, so a bold lead-in wraps the rest of the sentence one word per line. */
ol.steps li { counter-increment: s; position: relative; padding-left: 44px; }
ol.steps li::before {
  content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 4px;
  font-family: var(--mono); font-size: var(--t-micro); color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Product lines on the company page. */
.line { border-top: 1px solid var(--rule); padding-top: 22px; margin-top: 30px; max-width: var(--measure); }
.line:first-of-type { border-top: 0; padding-top: 0; margin-top: 24px; }
.line-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.line-name { font-family: var(--serif); font-size: var(--t-lede); font-weight: 600; }
.line-state {
  font-family: var(--mono); font-size: var(--t-micro); letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--rule); border-radius: 999px; padding: 2px 9px;
}


code { font-family: var(--mono); font-size: .92em; }
blockquote {
  margin: 22px 0 0; padding: 14px 18px; max-width: var(--measure);
  border-left: 2px solid var(--reject); background: var(--quote-wash);
  font-size: var(--t-small); color: var(--muted); line-height: 1.6;
}
footer { border-top: 1px solid var(--rule); padding-top: 34px; color: var(--muted); font-size: var(--t-small); }
footer a { color: var(--ink); }

@media (max-width: 560px) {
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 9px; }
  /* Keep the name on one line: wrapped, its rule reads as a section divider
     rather than a masthead. */
    }
@media (prefers-reduced-motion: no-preference) {
  .spec { animation: settle .55s cubic-bezier(.16, 1, .3, 1) both; }
  @keyframes settle { from { opacity: 0; transform: translateY(8px); } }
}
