/* 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 {
  --ground: #fbfbfd;
  --ink: #12141a;
  --muted: #656b7a;
  --rule: #dfe2ea;
  --reject: #b3372c;
  --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. These are its own tokens. */
  --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;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0e1014; --ink: #e8eaf0; --muted: #949bad;
    --rule: #262b36; --reject: #e4685c;
    --p-bg: #151c2c;   /* lift the specimen off a dark page */
  }
}

* { 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); }

header { padding-block: 68px 44px; }
.wordmark {
  font-family: var(--mono); font-size: var(--t-micro); letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 40px;
}
.wordmark a { text-decoration: none; }
.wordmark a:hover { text-decoration: underline; }
/* 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. */
.wordmark--masthead {
  display: inline-block;
  font-size: var(--t-lede);
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--ink);
  margin-bottom: 40px;
  padding-bottom: 13px;
  border-bottom: 2px solid var(--reject);
}
/* Ares carries the accent so the eye lands on the name, not the category. */
.wordmark--masthead b { color: var(--reject); font-weight: 700; }
.cta {
  display: inline-block; margin-top: 26px; font-size: var(--t-base); color: var(--reject);
  text-decoration-thickness: 1px; text-underline-offset: 5px;
}
.cta::after { content: " \2192"; }

/* ---- 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: rgba(0, 0, 0, .02);
  font-size: var(--t-small); color: var(--muted); line-height: 1.6;
}
@media (prefers-color-scheme: dark) { blockquote { background: rgba(255, 255, 255, .03); } }
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; }
}
@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); } }
}
