/*
 * Ondo Bot holding page.
 *
 * Monochrome, light first, because the brand assets are pure black on pure
 * white with no alpha channel. That constraint is also the solution: since the
 * mark is only ever black or white, dark mode inverts it in CSS rather than
 * shipping a second file.
 *
 * Deliberately no accent colour. robin.bot carries lime and XRADE carries
 * amber; a visibly branded family across the bots would undercut the
 * independence each one claims separately.
 */
:root {
  color-scheme: light dark;
  --fg: #0a0a0a;
  --bg: #fbfbf9;
  --muted: #6b6b66;
  --rule: #e4e4dd;
  --invert: 0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #f2f2ec;
    --bg: #0a0a0a;
    --muted: #8a8a82;
    --rule: #26261f;
    --invert: 1;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

/*
 * ONE EDGE PER PAGE. This is the rule the layout kept breaking.
 *
 * The container was 34rem, right for a holding page of pure prose and far too
 * narrow once a 565 row table arrived. The first attempt at fixing it widened
 * the container to 64rem and capped the paragraphs at 40rem inside it, which
 * was worse: the section rules ran to 1200px, the tables stopped at 980 and the
 * text wrapped at 880, so the page had three different right edges and read as
 * broken even though every individual width was defensible.
 *
 * So: no internal caps. The container sets the measure, everything aligns to
 * it, and the two table-heavy pages get their own wider container.
 */
.wrap {
  max-width: 50rem;
  margin: 0 auto;
  padding: 3.5rem 2rem 4rem;
}

/* ---------- head ---------- */

.head { margin-bottom: 2.5rem; }

/* The asset is black on an opaque white ground, so on a dark page it would
   render as a white tile. Inverting gives white on black at zero extra weight. */
.mark {
  display: block;
  width: 112px;
  height: auto;
  margin-bottom: 1.1rem;
  filter: invert(var(--invert));
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.15rem;
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.34em;
}

h2 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 600;
  margin: 2.5rem 0 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
}

section p { margin: 0 0 0.9rem; }

.lede p {
  font-size: 1.2rem;
  line-height: 1.45;
  margin: 0;
}

/* ---------- status ---------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 1.75rem 0 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--muted);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fg);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* Respect a stated preference for reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; }
}

/* ---------- follow ---------- */

/*
 * The page had no links at all before this one, so the anchor style lives
 * here rather than as a global rule. Underlined in the foreground colour
 * because the palette carries no accent on purpose, and a default browser
 * blue would be the only colour on a deliberately monochrome page.
 */
.follow {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.follow a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

.follow a:hover,
.follow a:focus-visible {
  text-decoration-thickness: 2px;
}

/* ---------- footer ---------- */

footer {
  margin-top: 4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

footer p { margin: 0; }
footer p + p { margin-top: 0.6rem; }

/* Same reasoning as .follow a: no accent in this palette, so an unstyled
   anchor would render as the only colour on the page. */
footer a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

footer a:hover,
footer a:focus-visible {
  text-decoration-thickness: 2px;
}
footer strong { color: var(--fg); font-weight: 600; }

/* ---------- nav ---------- */

/*
 * Added when the site stopped being a holding page. Same reasoning as .follow a:
 * the palette carries no accent, so the current page is marked with weight and
 * an underline rather than with colour.
 */
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin: 0 0 2.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible { color: var(--fg); }

.nav a[aria-current="page"] {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 0.3em;
  text-decoration-thickness: 1px;
}

/*
 * The two table-heavy pages. Their prose is one or two short sentences, so it
 * runs to the same edge as the table rather than being capped, which is what
 * keeps a single edge on those pages too.
 */
.wrap.wide { max-width: 72rem; }

/* ---------- tables ---------- */

.counts,
.tokens {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: 0.9rem;
}

/*
 * Column widths are set rather than left to the browser. With three auto
 * columns and the last one right aligned, the figure ends up marooned in the
 * middle with a wide gap on both sides, which is what the first version did.
 */
.counts th[scope="row"] { width: 34%; }
.counts .num { width: 14%; }

/*
 * A real overflow container, not a comment claiming one. Below this width the
 * token table cannot fit and the choice is between the table scrolling inside
 * itself and the whole page scrolling sideways. The first is correct.
 *
 * display:block is what makes overflow apply to a table element at all.
 */
@media (max-width: 34rem) {
  .tokens {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

.counts th,
.counts td,
.tokens th,
.tokens td {
  text-align: left;
  padding: 0.55rem 0.7rem 0.55rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: baseline;
}

.counts th[scope="row"],
.tokens th[scope="row"] { font-weight: 600; white-space: nowrap; }

.tokens thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
}

/* Figures are compared down the column, so they are lined up and tabular. */
.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.counts .note {
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.none { color: var(--muted); font-size: 0.82rem; }

/* A stated absence, not a warning. Monochrome like everything else. */
.flag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.34rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--muted);
  vertical-align: 0.08em;
}

.asof {
  color: var(--muted);
  font-size: 0.78rem;
}

/* Visible to a screen reader, not on screen. Table captions say what a table
   is for, which the surrounding prose does not repeat. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.head a { display: inline-block; }

/* ---------- KPI row ---------- */

/*
 * Four headline counts. A row of stat tiles rather than four one-bar charts,
 * because the job is magnitude at a glance and a chart would say less.
 *
 * auto-fit with a minimum means it is four across on a desktop, two on a
 * tablet and one on a phone, without a media query per breakpoint.
 */
.kpi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1.6rem 1.4rem;
  margin: 2rem 0 1.2rem;
}

.stat p { margin: 0; }

/*
 * PROPORTIONAL figures, not tabular. tabular-nums gives every digit the width
 * of a zero, which reads as loose at display sizes. Tabular belongs in the
 * table columns, and that is where it is.
 */
.stat-value {
  font-size: 2.8rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.stat-label {
  margin-top: 0.5rem !important;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.stat-note {
  margin-top: 0.35rem !important;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

/* ---------- quoted source ---------- */

/*
 * Contract source, quoted. Scrolls inside itself rather than making the page
 * scroll sideways on a phone.
 */
.code {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.5;
}

.code code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre;
}
