/* The llm-router page. Typography and palette follow the foundation's own
   stylesheet; the page adds only what the one-pager and the shelf do not have —
   a document column and a terminal. */

@font-face {
  font-family: "OF Inter";
  src: url("../fonts/of-inter-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "OF Inter Tight";
  src: url("../fonts/of-inter-tight-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "OF Mono";
  src: url("../fonts/JetBrainsMono-var.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #151513;
  --lime: #faff69;
  --grey: #414141;
  --panel: #1c1c19;
  --panel-lift: #242420;
  --paper: #f4f4ef;
  --muted: #a9a294;
  --rule: #2c2c28;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  overflow-x: clip;
  margin: 0;
  background: var(--bg);
  color: var(--paper);
  font: 400 16px/1.6 "OF Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.top, main, .bottom { max-width: 62rem; margin: 0 auto; padding: 0 1.6rem; }

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg, #0f0f0e);
}

.top::before {
  content: "";
  position: absolute;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  background: var(--bg, #0f0f0e);
  background-clip: padding-box;
  z-index: -1;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: "OF Inter Tight", system-ui, sans-serif;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-decoration: none;
}

.mark img {
  display: block;
  flex: none;
  width: 24px;
  height: 24px;
}

.nav a {
  margin-left: 1.4rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
}

.nav a:hover { color: var(--lime); }

.lede { padding: 4.5rem 0 3rem; }

.kicker {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lime);
}

h1 {
  margin: 0;
  font-family: "OF Inter Tight", system-ui, sans-serif;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 800;
  max-width: 22ch;
}

.sub {
  max-width: 46ch;
  margin: 1.2rem 0 2rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.facts {
  list-style: none;
  margin: 0 0 2.4rem;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  max-width: 46rem;
}

.facts li {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 1rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--muted);
}

.facts span {
  color: var(--paper);
  font-family: "OF Mono", ui-monospace, monospace;
  font-size: 0.8rem;
}

.cta { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }

.button {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  background: var(--lime);
  color: #151513;
  border: 1px solid var(--lime);
  border-radius: 2px;
  font: 600 0.9rem/1 "OF Inter", system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.button:hover { background: #e9ee55; }

.button[disabled] { opacity: 0.4; cursor: default; }

.button--tight { padding: 0.6rem 1.1rem; font-size: 0.82rem; }

.button--quiet {
  background: transparent;
  color: var(--paper);
  border-color: var(--grey);
}

.button--quiet:hover { background: var(--panel-lift); }

.cta-note { color: var(--muted); font-size: 0.85rem; }

.tail { padding: 3rem 0; border-top: 1px solid var(--rule); }

.tail-head h2, .how h2 {
  margin: 0 0 0.6rem;
  font-family: "OF Inter Tight", system-ui, sans-serif;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.tail-head p, .how p {
  max-width: 60ch;
  margin: 0 0 1.8rem;
  color: var(--muted);
  font-size: 0.95rem;
}

code {
  font-family: "OF Mono", ui-monospace, monospace;
  font-size: 0.85em;
  color: var(--lime);
}

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.9rem;
  padding: 1.2rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.field { display: flex; flex-direction: column; gap: 0.35rem; }

.field.wide { grid-column: span 2; }

.field > span {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

input, select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  background: var(--panel-lift);
  color: var(--paper);
  border: 1px solid var(--grey);
  border-radius: 2px;
  font: 400 0.85rem "OF Mono", ui-monospace, monospace;
}

input:focus, select:focus { outline: 1px solid var(--lime); border-color: var(--lime); }

.actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding-top: 0.4rem;
}

.actions select { width: auto; min-width: 6rem; }

.status {
  margin: 1rem 0 0.6rem;
  font: 400 0.8rem "OF Mono", ui-monospace, monospace;
  color: var(--muted);
}

.status.live { color: var(--lime); }
.status.err { color: #ff8f6b; }

.log {
  height: 26rem;
  overflow: auto;
  margin: 0;
  padding: 0.9rem 1rem;
  background: #101010;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font: 400 0.78rem/1.55 "OF Mono", ui-monospace, monospace;
  white-space: pre;
  tab-size: 2;
}

.log:focus { outline: 1px solid var(--grey); }

.log .row { color: #cfd1c8; white-space: pre; }
.log .row.bad { color: #ff8f6b; }
.log .row.meta { color: #7f8478; }
.log .empty { color: #6d7268; margin: 0; }

.foot-note {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.6rem 0 0;
  font: 400 0.75rem "OF Mono", ui-monospace, monospace;
  color: var(--muted);
  word-break: break-all;
}

.how { padding: 3rem 0; border-top: 1px solid var(--rule); }

.bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  padding-bottom: calc(3rem + env(safe-area-inset-bottom, 0px));
  padding-left: max(1.6rem, env(safe-area-inset-left, 0px));
  padding-right: max(1.6rem, env(safe-area-inset-right, 0px));
}

.bottom a { color: var(--muted); font-size: 0.82rem; text-decoration: none; }
.bottom a:hover { color: var(--lime); }

@media (max-width: 40rem) {
  .facts li { grid-template-columns: 1fr; gap: 0.2rem; }
  .field.wide { grid-column: span 1; }
  .lede { padding-top: 3rem; }
  .top { flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; }
}

/* Print — the same paper-first block the other families carry in their own
   sheets: white ground, ink text, the sticky controls printed once. The muted
   and lime inks are darkened past their screen density — 2.54:1 and 1.07:1 on
   white — to measured 8.93:1 and 10.3:1. */
@media print {
  :root {
    --bg: #ffffff;
    --lime: #3f4400;
    --grey: #414141;
    --panel: #ffffff;
    --panel-lift: #ffffff;
    --paper: #1a1a18;
    --muted: #4a4a43;
    --rule: #9a9a94;
  }

  html { scroll-behavior: auto; }
  body { background: #ffffff; color: #1a1a18; overflow-x: visible; padding-bottom: 0; font-size: 10.5pt; }
  a { color: #1a1a18; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.86em; }

  /* The header is sticky on screen; on paper it is one line at the top. */
  .top { position: static; border-bottom-color: #9a9a94; }
  .top::before { display: none; }
  .lede { padding: 0 0 12pt; }
  .sub, .tail-head p, .how p, .cta-note, .foot-note { color: #333331; }
  .kicker, code, .status.live { color: #3f4400; }

  /* The console is a control, not a record: its fields and buttons leave and
     what prints is the log the reader was looking at, on paper. */
  .controls { background: #ffffff; border-color: #9a9a94; }
  .actions, .cta, .controls input, .controls select { display: none; }
  .log { height: auto; max-height: 60vh; background: #ffffff; border-color: #9a9a94; color: #1a1a18; }
  .log .row { color: #1a1a18; }
  .log .row.meta, .log .empty { color: #4a4a43; }
  .log .row.bad { color: #8a1c00; }

  .tail, .how, .bottom { border-top-color: #9a9a94; }
  .bottom a { color: #1a1a18; }
}
