/* Shared layout and accessible light/dark color tokens for the static aid site.
   Theme radios work with CSS alone; motion respects reduced-motion preferences. */
:root {
  color-scheme: light;
  --bg: #f4f2eb;
  --surface: #e9e6dd;
  --ink: #23241f;
  --muted: #62635a;
  --line: #cbc9bd;
  --accent: #a93813;
  --accent-soft: #eedacb;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #191b18;
    --surface: #262923;
    --ink: #f0eee4;
    --muted: #b4b6a9;
    --line: #494d42;
    --accent: #ff9568;
    --accent-soft: #432e24;
  }
}
:root:has(input[value="light"]:checked) {
  color-scheme: light;
  --bg: #f4f2eb;
  --surface: #e9e6dd;
  --ink: #23241f;
  --muted: #62635a;
  --line: #cbc9bd;
  --accent: #a93813;
  --accent-soft: #eedacb;
}
:root:has(input[value="dark"]:checked) {
  color-scheme: dark;
  --bg: #191b18;
  --surface: #262923;
  --ink: #f0eee4;
  --muted: #b4b6a9;
  --line: #494d42;
  --accent: #ff9568;
  --accent-soft: #432e24;
}
.hero-film { margin: 3rem max(24px, calc((100% - 1120px) / 2)); min-width: 0; }
.hero-film video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #f4f2eb; }
.hero-film figcaption { margin-top: .75rem; color: var(--muted); font-size: .9rem; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.6; }
a { color: inherit; text-underline-offset: .22em; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
p { margin: 0 0 1.2rem; max-width: 70ch; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -.04em; }
h1 { font-size: clamp(2.5rem, 5.5vw, 5rem); font-weight: 650; }
h2 { font-size: clamp(2rem, 3.6vw, 3.2rem); font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
code, .mono, pre { font-family: var(--mono); }
code { font-size: .9em; overflow-wrap: anywhere; }
pre {
  background: var(--surface);
  border-left: 2px solid var(--accent);
  padding: 1.3rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.7;
  margin: 1.5rem 0;
}
button { font: inherit; cursor: pointer; }
button[hidden] { display: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip { position: absolute; top: -5rem; left: 1rem; z-index: 5; background: var(--bg); padding: 1rem; }
.skip:focus { top: 1rem; }
.site-header, .site-footer, .section, .page-intro, .guide-layout {
  padding-inline: max(24px, calc((100% - 1120px) / 2));
}
.site-header {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  min-height: 100px;
  border-bottom: 1px solid var(--line);
}
.brand { font-size: 2rem; font-weight: 750; letter-spacing: -.07em; text-decoration: none; }
.brand span { color: var(--accent); padding-left: .2em; }
.site-header nav { display: flex; gap: 1.7rem; margin-right: auto; }
.site-header nav a { text-decoration: none; font-size: .9rem; padding-block: .6rem; }
[aria-current="page"] { color: var(--accent); text-decoration: underline !important; }
.theme { display: flex; gap: .7rem; border: 0; padding: 0; margin: 0; font-size: .72rem; }
.theme label { cursor: pointer; display: flex; align-items: center; gap: .2rem; min-height: 44px; }
.theme input { accent-color: var(--accent); margin: 0; }
.hero { position: relative; padding-block: 3rem 2rem; border-bottom: 1px solid var(--line); }
.hero-inner { padding-inline: max(24px, calc((100% - 1120px) / 2)); }
.eyebrow { font-family: var(--mono); text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; }
.hero h1 { font-size: clamp(8rem, 22vw, 19rem); line-height: .85; letter-spacing: -.095em; }
.hero h1 span { color: var(--accent); font-size: .65em; display: inline-block; padding-left: .1em; }
.hero-description { max-width: 44rem; font-size: 1.15rem; margin-top: 2rem; }
.hero-line { color: var(--muted); font-family: var(--mono); font-size: .85rem; }
.install {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--surface);
  max-width: 44rem;
  padding: 1rem 1.2rem;
  border-left: 2px solid var(--accent);
  margin: 1.5rem 0 1rem;
}
.install code { min-width: 0; }
.install button {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  padding: .5rem .8rem;
}
.text-link { display: inline-block; padding-block: .5rem; font-weight: 600; }
.section { padding-block: 5.5rem; border-bottom: 1px solid var(--line); }
.section-heading { margin-bottom: 3rem; }
.section-heading h2 { margin-bottom: 1.5rem; }
.context-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  padding: 0;
  gap: 2rem;
}
.context-points li { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.context-points h3 { font-size: 1.2rem; margin-bottom: 1rem; }
.context-points p { font-size: .95rem; color: var(--muted); }
.hero-headline { font-size: clamp(1.4rem, 2.5vw, 2rem); line-height: 1.2; margin-top: 2rem; }
.hero .hero-description { font-size: 1rem; margin-top: 1rem; max-width: 38rem; }
.capabilities article {
  display: grid;
  grid-template-columns: 3rem 17rem 1fr;
  column-gap: 2rem;
  padding-block: 2rem;
  border-top: 1px solid var(--line);
}
.capability-index { color: var(--accent); }
.capabilities article p { grid-column: 3; margin-bottom: .5rem; }
.muted { color: var(--muted); font-size: .9rem; }
.agent-links { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin-bottom: 2rem; }
.agent-links a { padding-block: .5rem; font-size: 1.15rem; }
.security { background: var(--accent-soft); }
.security h2 { margin-bottom: 2rem; }
.page-intro { padding-block: 4.5rem; border-bottom: 1px solid var(--line); }
.page-intro h1 { margin-bottom: 2rem; }
.page-intro p { color: var(--muted); }
.page-intro .eyebrow { color: var(--accent); }
.guide-layout { display: grid; grid-template-columns: 220px 1fr; gap: 3rem; padding-block: 4rem; }
.contents { align-self: start; position: sticky; top: 2rem; display: grid; gap: .5rem; font-size: .9rem; }
.contents a { padding-block: .5rem; text-decoration: none; }
.guide { min-width: 0; }
.guide section { margin-bottom: 4rem; scroll-margin-top: 2rem; }
.guide h2 { margin-bottom: 1.5rem; }
.reference h2 { margin-bottom: 2rem; }
.reference dl { margin: 0; }
.reference-row { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; padding: 1.1rem 0; }
.reference-row { border-top: 1px solid var(--line); scroll-margin-top: 2rem; }
.reference-row dt { font-weight: 600; }
.reference-row dt a { text-decoration: none; }
.reference-row dd { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.not-found { min-height: 65vh; }
.not-found a { margin-right: 2rem; }
.site-footer { padding-block: 3rem; }
.site-footer p { color: var(--muted); font-size: .85rem; margin-top: 1rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1rem 2rem; font-size: .85rem; }
@media (prefers-reduced-motion: no-preference) {
  .hero h1 { animation: arrive .6s ease-out both; }
  .hero-description { animation: arrive .6s .08s ease-out both; }
  .text-link, .agent-links a { transition: color .15s, transform .15s; }
  .text-link:hover { transform: translateX(3px); }
  @keyframes arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 800px) {
  .site-header { gap: 1.5rem; flex-wrap: wrap; padding-block: 1rem; }
  .theme { flex-basis: 100%; }
  .context-points { grid-template-columns: 1fr; gap: 1rem; }
  .capabilities article { grid-template-columns: 2rem 1fr; gap: 1rem; }
  .capabilities article p { grid-column: 2; }
  .guide-layout { grid-template-columns: 1fr; gap: 2rem; }
  .contents { position: static; display: flex; flex-wrap: wrap; gap: .3rem 1.5rem; }
  .reference-row { grid-template-columns: 180px 1fr; gap: 1rem; }
}
@media (max-width: 480px) {
  .site-header nav { gap: 1rem; }
  .site-header nav a { font-size: .8rem; }
  .hero { padding-top: 2rem; }
  .hero-description { font-size: 1rem; margin-top: 1.5rem; }
  .install { flex-wrap: wrap; gap: .5rem; padding: .9rem; }
  .section { padding-block: 3.5rem; }
  .reference-row { grid-template-columns: 1fr; gap: .4rem; }
  .page-intro { padding-block: 3rem; }
  pre { padding: 1rem; font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
}

/* Aggregate methodology remains readable without scripting in either theme. */
.film-method { color: var(--muted); font-size: .85rem; line-height: 1.6; }
.film-method summary { cursor: pointer; padding: .5rem 0; }
.film-method p { margin: .6rem 0; overflow-wrap: anywhere; }
