/* Design tokens and base. docs/DESIGN.md (v2, light) is binding. */
:root {
  --bg: #FFFFFF;
  --bg-soft: #F7F7F4;
  --bg-tint: #F2F4FB;
  --paper: #FBF8F1;
  --paper-line: #EDE6D6;
  --line: #E6E6E1;
  --line-2: #D5D6D0;
  --text: #16181D;
  --text-2: #474B55;
  --text-3: #6B6F79;
  --warm: #B86E0F;
  --warm-ink: #8E5409;
  --warm-soft: #FCEFD9;
  --warm-wash: #FEF8EE;
  --cool: #3B4FD9;
  --cool-ink: #2C3CB0;
  --cool-soft: #E9ECFD;
  --ok: #1E7F55;
  --ok-soft: #E3F4EB;
  --danger: #B42318;
  --danger-soft: #FDECEA;

  --a1: #D2461F; --a2: #B7650B; --a3: #9A7B00; --a4: #1E7F55; --a5: #0E7C8C;
  --a6: #2F5FD0; --a7: #5840D0; --a8: #8A35B8; --a9: #C02660;

  /* four corner radii, one system: chips and fragments, controls, cards (DESIGN.md --radius), large panels */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(22, 24, 29, .04), 0 8px 24px rgba(22, 24, 29, .06);
  --shadow-lift: 0 2px 4px rgba(22, 24, 29, .05), 0 16px 40px rgba(22, 24, 29, .09);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --f-display: "Frank Ruhl Libre", "David", "Times New Roman", serif;
  --f-body: "Assistant", "Segoe UI", "Arial Hebrew", Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --fs-body: 19px;
  --wrap: 1160px;
  --read: 680px;
  --gutter: clamp(16px, 4vw, 40px);
  --topbar-h: 64px;
  /* the demo banner inside the fixed top bar (site/js/banner.js sets it); --head-h is what the fixed header covers */
  --banner-h: 0px;
  --head-h: calc(var(--topbar-h) + var(--banner-h));
  --section-pad: clamp(72px, 10vw, 150px);

  --z-sticky: 10;
  --z-topbar: 30;

  color-scheme: light;
}

@media (max-width: 767px) {
  :root { --fs-body: 17px; --topbar-h: 56px; }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 24px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--cool); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--cool-ink); }

h1, h2, h3, h4, h5 {
  font-family: var(--f-display);
  line-height: 1.18;
  margin: 0;
  font-weight: 700;
  color: var(--text);
}
h2 { font-size: clamp(2.1rem, 1.4rem + 2.4vw, 3.3rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: clamp(1.45rem, 1.2rem + .9vw, 1.9rem); }
h4 { font-size: 1.2rem; }
h5 { font-size: 1.05rem; }
p { margin: 0 0 .9em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 700; color: var(--text); }
/* no lone last words on display lines; calmer rag in running text */
h1, h2, h3, h4, .hero-sub, .rq-text, .pn-head h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

/* The English persona names (THE MINER ...), one style everywhere: tracked caps in the agent's ink.
   (SVG labels in the network have their own sizes in run.css.) */
:is(span, bdi).persona {
  font-family: var(--f-body);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .06em;
  direction: ltr;
  unicode-bidi: isolate;
  color: color-mix(in srgb, var(--hue, var(--text-3)) 78%, #000);
}

.mono, code, kbd, .id {
  font-family: var(--f-mono);
  font-size: .78em;
  letter-spacing: 0;
  direction: ltr;
  unicode-bidi: isolate;
}
.id { color: var(--text-3); font-weight: 400; }

:focus-visible {
  outline: 2px solid var(--cool);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -80px;
  z-index: 100;
  background: var(--text);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

.muted { color: var(--text-2); }
.small { font-size: .9rem; }
.noscript { padding: 24px; text-align: center; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }
}
