/* Editorial gallery theme. Behavior and contract artifacts remain unchanged. */
:root {
  color-scheme: dark;
  --ink: #101411;
  --paper: #f0f4ef;
  --panel: #1d261f;
  --panel2: #25352a;
  --line: #374239;
  --muted: #b1bcb3;
  --mint: #a9efc4;
  --amber: #ffca88;
  --red: #ff9eaa;
  --radius: 10px;
}
body { background: #141815; color: #f0f4ef; }
a { text-underline-offset: .22em; }
button, select, input, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid #b5f7ce; outline-offset: 4px; }
.topbar {
  height: auto; min-height: 88px; position: relative; background: #141815;
  backdrop-filter: none; padding: 1rem clamp(1rem, 4vw, 4rem); gap: 1.5rem;
}
.brand { font-size: 1.2rem; letter-spacing: -.045em; }
.brand-logo { border-radius: 9px; }
.topbar nav { align-items: center; gap: 1.6rem; }
.topbar nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; font-weight: 550; }
.topbar nav .nav-cta { color: #102017; background: #b5f7ce; padding: .7rem 1.1rem; border-radius: 99px; gap: 1.1rem; }
.topbar nav .nav-cta:hover { background: #355c42; color: #fff; }
.version { border: 0; color: #aeb9af; padding: 0; font-size: .75rem; }
.eyebrow { color: #aeb9af; font-size: .75rem; letter-spacing: .09em; }
.button { border-radius: 99px; font-size: .875rem; gap: 1.6rem; min-height: 48px; padding: .75rem 1.2rem; }
.button.primary { color: #102017; background: #b5f7ce; }
.button.primary:hover { color: #fff; background: #17684b; transform: none; }
.button.ghost { border-color: #58645b; }
.explainer {
  max-width: 1600px; padding: 3.5rem clamp(1rem, 4vw, 4rem) 2rem;
  display: grid; grid-template-columns: minmax(240px, .7fr) minmax(0, 1.65fr);
  column-gap: clamp(2rem, 5vw, 5rem); row-gap: 0; align-items: start;
}
.film-heading { display: flex; flex-direction: column; align-items: start; gap: 1.5rem; margin: 0; padding-top: 2rem; grid-column: 1; grid-row: 1 / 4; }
.film-heading .eyebrow { font-size: .75rem; margin-bottom: 1.4rem; }
.film-heading h1 { font-size: clamp(2.5rem, 4.2vw, 4.5rem); line-height: 1.03; letter-spacing: -.065em; }
.film-heading h1 em { color: #a8b7aa; }
.film-heading > p { font-size: 1.0625rem; line-height: 1.65; max-width: 30ch; margin: 0; color: #b1bcb3; }
.cover-note { margin-top: 2rem; padding-top: 1.3rem; border-top: 1px solid var(--line); width: 100%; }
.cover-note > span { font: 500 .75rem/1.6 var(--mono); color: #aeb9af; letter-spacing: .04em; }
.cover-note p { margin: .8rem 0; font-size: .9375rem; }
.film-player, .lab, .compatibility-code, footer {
  color-scheme: dark; --ink: #111815; --paper: #f6f8f5; --panel: #1b2520;
  --panel2: #233029; --line: #39453c; --muted: #b7c2b9;
  --mint: #b5f7ce; --amber: #ffca88; --red: #ff9eaa;
  color: var(--paper);
}
.film-player { grid-column: 2; border-radius: 12px; box-shadow: none; border: 0; background: #111815; }
.film-stage { height: clamp(280px, 28vw, 410px); }
.film-caption { background: #1b2520; border-color: #39453c; padding: 1.25rem; min-height: 140px; }
.film-caption h2 { font-size: 1.375rem; }
.film-caption p { color: #c8d1cb; }
.film-controls { padding: .65rem 1rem; }
.film-controls button { border-radius: 99px; background: #202c25; border-color: #48594c; }
.film-controls #filmPlay { color: #111815; }
.film-chapters { gap: .5rem; }
.film-chapters button { font-size: .875rem; display: flex; flex-direction: column; gap: .2rem; border-color: #46564a; }
.film-chapters button span { font-size: .75rem; }
.film-branch { background: #1b2520; padding: 1rem 1.25rem; }
.film-branch select { background: #111815; border-color: #607164; }
.film-proof { color: #b7c2b9; }
.film-footnote, .film-transcript { grid-column: 2; }
.film-footnote { flex-direction: column; gap: .5rem; margin-top: .8rem; }
.film-footnote p { font-size: .8125rem; }
.film-footnote a { min-height: 44px; display: inline-flex; align-items: center; }
.film-transcript { margin-top: .2rem; }
.film-transcript summary { color: #dce7dc; }
.film-transcript li, .film-transcript p { font-size: 1rem; }
.chapter-nav { max-width: 1600px; margin: auto; padding: 1.25rem clamp(1rem,4vw,4rem); border-block: 1px solid #313a32; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.chapter-nav > span { font: 500 .75rem var(--mono); color: #aeb9af; margin-right: 1rem; }
.chapter-nav a { display: inline-flex; min-height: 44px; align-items: center; background: #242d26; color: #d7e4d9; text-decoration: none; border-radius: 99px; padding: .6rem 1rem; font-size: .875rem; }
.chapter-nav a:hover { background: #263e30; }
.hero { max-width: 1600px; padding: 4.5rem clamp(1rem,4vw,4rem); grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); gap: 5rem; align-items: center; }
.hero h2 { font-size: clamp(2.5rem,3.5vw,3.8rem); line-height: 1.04; letter-spacing: -.055em; }
.hero h2 em { color: #a3b0a5; }
.lede { font-size: 1rem; line-height: 1.7; margin-top: 1.25rem; max-width: 48ch; }
.hero-actions { margin-top: 1.5rem; }
.brief-card { box-shadow: none; border: 0; background: #1c251e; padding: 1.5rem 1.75rem; }
.brief-head, .panel-title { font-size: .75rem; letter-spacing: .07em; }
.brief-card dl { margin-top: 1rem; }
.brief-card dl div { padding: .95rem 0; }
.brief-card dd { color: #dce7dc; font-size: 1rem; }
.brief-card dt { color: #a9efc4; font-size: .875rem; }
.lab { background: #111815; padding: 4.5rem clamp(1rem,4vw,4rem); border: 0; }
.lab .eyebrow { color: #b7c2b9; }
.section-heading { max-width: 1472px; gap: 2rem; margin-bottom: 2rem; }
.section-heading h2, .protocol-section h2, .architecture-copy h2, .evidence-intro h2, .compatibility-section h2 {
  font-size: clamp(2rem,3.4vw,3.4rem); line-height: 1.08; letter-spacing: -.055em; margin: 0 0 .3rem;
}
.section-heading > p { font-size: 1rem; line-height: 1.65; max-width: 42ch; }
.section-heading.wide { max-width: 1472px; }
.lab-shell { max-width: 1472px; border-radius: 12px; box-shadow: none; }
.lab-toolbar { background: #1b2520; padding: 1rem 1.25rem; }
.lab-toolbar label, .agent-state, .agent-top div span, .timeline small, .packet { font-size: .875rem; }
.lab-toolbar select { font-size: 1rem; }
.run-button, .reset-button { border-radius: 99px; min-height: 44px; font-size: .875rem; }
.scenario-summary { background: none; font-size: 1rem; }
.relay-stage { padding: 1.5rem; }
.agent-card { border-radius: 8px; }
.agent-card.active { box-shadow: none; }
.agent-id { border-radius: 50%; background: #304337; font-size: 1rem; }
.agent-task { font-size: 1rem; color: #c7d1c9; }
.timeline-panel, .inspection-panel { padding: 1.5rem; }
.timeline li { color: #a4b1a7; gap: .75rem; padding: .9rem 0; }
.timeline li > span { font-size: .875rem; }
.timeline small { margin-top: .3rem; }
.timeline li.complete { color: #c5d0c8; }
.timeline li.current { color: #fff; }
.checks li { font-size: 1rem; }
.checks li.reviewed, .checks li.reviewed span { color: #c5d0c8; }
.score small { font-size: .875rem; }
.decision-panel { background: #1b2520; }
.decision-heading .eyebrow { font-size: .75rem; }
.decision-heading h3 { font-size: 1.5rem; }
.decision-panel > p, .decision-reasons li { font-size: 1rem; color: #c7d1c9; }
.decision-reasons code { font-size: .875rem; }
.artifact-panel { background: #0d1310; }
.artifact-tabs { gap: 1.5rem; }
.artifact-tabs button, .copy-button { font-size: .875rem; letter-spacing: 0; }
.copy-button { min-height: 44px; border-radius: 99px; }
.artifact-panel pre { color: #d4ddd5; font-size: .875rem; }
.artifact-meta { font-size: .8125rem; }
.lab-boundary { font-size: .875rem; line-height: 1.7; }
.gate-section, .protocol-section, .ecosystem-section, .integrations-section, .evidence-section, .compatibility-section, .architecture-section {
  padding: 4.5rem clamp(1rem,4vw,4rem); background: #141815; border-bottom: 1px solid #313a32;
}
.gate-section { background: #101411; }
.gate-grid, .protocol-flow, .contract-grid, .ecosystem-stack, .opportunity-grid, .integration-list, .gate-decisions, .proposal-note, .boundary-note { max-width: 1472px; }
.gate-grid { margin-top: 2.5rem; gap: 1rem; }
.gate-grid article { padding: 1.5rem; background: #141815; border: 1px solid #374239; border-radius: 10px; min-height: 260px; }
.gate-number { color: #aab7ac; font-size: .75rem; letter-spacing: .06em; }
.gate-grid article:first-child { background: #263e30; border-color: #d9f2e2; }
.gate-grid h3 { font-size: 1.5rem; line-height: 1.13; margin-top: 3rem; letter-spacing: -.04em; }
.gate-grid p, .protocol-flow p, .contract-grid p, .architecture-copy > p, .evidence-intro > p, .compatibility-section > div > p { font-size: 1rem; line-height: 1.65; }
.gate-decisions { justify-content: flex-start; gap: 1rem 2.5rem; margin-top: 2rem; }
.gate-decisions > span { font-size: .9375rem; }
.proposal-note, .boundary-note { font-size: .875rem!important; line-height: 1.65; letter-spacing: 0; font-family: var(--sans); }
.protocol-flow { margin-top: 2.5rem; border: 0; border-radius: 0; overflow: visible; gap: 1rem; }
.protocol-flow article { padding: 1.5rem; background: #1d261f; border: 0!important; display: flex; flex-direction: column; gap: 1.25rem; border-radius: 10px; }
.protocol-flow article > span { font-size: 2.5rem; line-height: 1; font-weight: 400; letter-spacing: -.08em; color: #a9efc4; }
.protocol-flow small { font-size: .75rem; letter-spacing: .06em; color: #aeb9af; }
.protocol-flow h3 { font-size: 1.75rem; letter-spacing: -.04em; }
.contract-grid { margin-top: 1.5rem; gap: 1rem; }
.contract-grid article { background: #141815; border: 0; border-top: 1px solid #374239; border-radius: 0; padding: 1.5rem .3rem; }
.contract-icon { background: #263e30; border-radius: 99px; height: 44px; width: 44px; font-size: 1.3rem; }
.contract-grid h3 { font-size: 1.125rem; }
.architecture-section { max-width: 1600px; gap: clamp(2rem,6vw,6rem); grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.architecture-copy > p { margin-top: 1.25rem; }
.principles li > span { color: #aeb9af; font-size: .875rem; }
.principles small { font-size: .9375rem; margin-top: .2rem; }
.architecture-map { background: #1c251e; border: 0; border-radius: 10px; padding: 2rem; }
.map-node { border: 1px solid #465848; border-radius: 8px; background: #141815; min-height: 100px; padding: 1rem; }
.map-node span, .map-node small { font-size: .75rem; }
.map-node strong { font-size: 1.125rem; }
.map-node.core { background: #1b3326; color: #fff; border: 0; box-shadow: none; }
.map-node.core span, .map-node.core small { color: #b5f7ce; }
.map-bridge { color: #adbdaf; height: 72px; font-size: .75rem; letter-spacing: 0; }
.map-bridge i { background: #9cad9e; }
.map-bridge i:after { background: #1c251e; }
.ecosystem-section { background: #101411; }
.ecosystem-stack { margin-top: 2.5rem; border: 0; border-radius: 0; gap: .6rem; overflow: visible; }
.ecosystem-stack article { background: #141815; border: 1px solid #374239; border-radius: 8px; display: flex; flex-direction: column; padding: 1.25rem; }
.ecosystem-stack article > span { font-size: .875rem; color: #aeb9af; margin-bottom: 1.5rem; }
.ecosystem-stack small, .opportunity-grid article > span { font-size: .75rem; letter-spacing: .06em; }
.ecosystem-stack h3 { font-size: 1.125rem; letter-spacing: -.025em; }
.ecosystem-stack p, .opportunity-grid p { font-size: 1rem; line-height: 1.6; }
.ecosystem-stack .relay-layer { background: #263e30; box-shadow: none; border-color: #4a7254; }
.opportunity-grid { gap: 1rem; margin-top: 2rem; }
.opportunity-grid article { border: 0; border-top: 1px solid #374239; border-radius: 0; padding: 1.5rem .25rem; }
.opportunity-grid h3 { font-size: 1.125rem; margin: .75rem 0; }
.opportunity-grid code { font-size: .875rem; }
.integration-list { margin-top: 2rem; border: 0; border-radius: 0; gap: 1rem; }
.integration-list article { border: 1px solid #39463c!important; border-radius: 10px; padding: 1.5rem; background: #1a211c; }
.integration-letter { background: #2b3a2d; border: 0; border-radius: 50%; width: 48px; height: 48px; color: #dce7dc; font-size: .875rem; }
.integration-list h3 { font-size: 1.125rem; }
.integration-list p, .integration-list code { font-size: .875rem; }
.integration-list code { color: #aeb9af; }
.evidence-section { max-width: 1600px; gap: 2.5rem; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); }
.evidence-intro > p { margin-top: 1.25rem; }
.evidence-metrics { border: 0; border-radius: 0; gap: .75rem; }
.evidence-metrics article { border: 0!important; border-radius: 8px; background: #1c251e; padding: 1.5rem 1.15rem; min-height: 230px; }
.evidence-metrics .evidence-word { font-size: clamp(1.4rem,2.2vw,2.2rem); color: #f0f4ef; margin-bottom: 1.5rem; }
.evidence-metrics span { font-size: 1rem; line-height: 1.4; }
.evidence-metrics small { font-size: .875rem; margin-top: .6rem; }
.evidence-metrics a { display: inline-block; min-height: 44px; }
.evidence-boundary > span { font-size: .75rem; }
.evidence-boundary ul { font-size: .9375rem; }
.compatibility-section { background: #19271e; color: #f0f4ef; gap: 4rem; }
.compatibility-section > div > p { margin-top: 1.25rem; color: #adbdaf; }
.compatibility-section .eyebrow { color: #adbdaf; }
.compatibility-code { background: #1b2520; padding: .6rem 1.5rem; }
.compatibility-code span { font-size: .75rem; }
.compatibility-code code { font-size: 1rem; }
footer { background: #111815; padding-block: 3rem; }
footer .brand { color: #f6f8f5; }
footer > div { font-size: .75rem; }
footer .footer-description { align-items: start; gap: .65rem; font-family: var(--sans); letter-spacing: 0; text-align: left; }
footer .footer-description p { font-size: 1rem; }
footer .footer-description a { color: #b5f7ce; font-size: .875rem; min-height: 44px; display: inline-flex; align-items: center; }
.maker-credit a { display: inline-flex; align-items: center; min-height: 44px; border-radius: 3px; }
.maker-credit a:hover { opacity: .8; }
footer :focus-visible, .film-player :focus-visible, .lab :focus-visible { outline-color: #b5f7ce; }
section[id] { scroll-margin-top: 1.5rem; }
@media (max-width: 1050px) {
  .explainer { grid-template-columns: minmax(220px,.65fr) minmax(0,1.35fr); column-gap: 2rem; }
  .film-heading h1 { font-size: 2.75rem; }
  .film-branch { align-items: stretch; flex-direction: column; }
  .film-controls #filmNext { width: 100%; }
  .topbar { flex-wrap: wrap; gap: .8rem 1.5rem; }
  .version { display: none; }
  .hero { gap: 2rem; }
  .ecosystem-stack { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ecosystem-stack article:last-child { grid-column: 1/-1; }
  .ecosystem-stack article > span { margin-bottom: .5rem; }
  .evidence-section { grid-template-columns: 1fr; }
  .evidence-metrics { max-width: none; }
  .architecture-section { grid-template-columns: 1fr 1fr; }
  .architecture-map { padding: 1.25rem; }
  .compatibility-section { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 760px) {
  .topbar { padding: 1rem; }
  .topbar nav { display: flex; flex-wrap: wrap; width: 100%; margin: 0; gap: .3rem 1.2rem; }
  .topbar nav .nav-cta { padding: .5rem .85rem; }
  .explainer { display: block; padding: 2.25rem 1rem 1.5rem; }
  .film-heading { padding: 0; gap: 1.1rem; margin-bottom: 2rem; }
  .film-heading h1 { font-size: clamp(2.65rem,10vw,4rem); }
  .film-heading > p { max-width: 45ch; font-size: 1rem; }
  .cover-note { display: none; }
  .film-stage { height: 330px; }
  .film-topline { font-size: .75rem; flex-wrap: wrap; gap: .3rem; }
  .film-caption { min-height: 180px; }
  .film-agent > span, .film-agent small { font-size: .75rem; }
  .film-start small { font-size: .75rem; white-space: normal; }
  .film-start { width: max-content; max-width: 92%; white-space: normal; }
  .chapter-nav > span { width: 100%; margin: .3rem 0 .6rem; }
  .hero { grid-template-columns: 1fr; gap: 2rem; padding: 3rem 1rem; }
  .hero h2 { font-size: 2.5rem; }
  .brief-card { max-width: none; padding: 1.25rem; }
  .lab, .gate-section, .protocol-section, .ecosystem-section, .integrations-section, .evidence-section, .compatibility-section, .architecture-section { padding: 3rem 1rem; }
  .section-heading { gap: 1.25rem; flex-direction: column; align-items: start; }
  .section-heading h2, .protocol-section h2, .architecture-copy h2, .evidence-intro h2, .compatibility-section h2 { font-size: clamp(2rem,7.5vw,2.8rem); }
  .relay-stage, .timeline-panel, .inspection-panel { padding: 1rem; }
  .agent-top { flex-wrap: wrap; }
  .agent-state { font-size: .75rem; }
  .artifact-tabs { gap: 1rem; }
  .artifact-panel pre { font-size: .875rem; }
  .gate-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
  .gate-grid article { padding: 1.2rem; min-height: 0; }
  .gate-grid h3 { margin-top: 2rem; }
  .architecture-section { grid-template-columns: 1fr; }
  .architecture-map { max-width: none; }
  .integration-list article { flex-wrap: wrap; }
  .integration-list code { display: block; }
  footer { grid-template-columns: 1fr; padding: 2rem 1rem; }
  footer > div { align-items: start; }
}
@media (max-width: 480px) {
  .topbar nav { justify-content: space-between; gap: .3rem .75rem; }
  .topbar nav .nav-cta { width: 100%; justify-content: space-between; margin-top: .3rem; }
  .film-chapters { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .film-chapters button { font-size: .875rem; }
  .gate-grid, .ecosystem-stack { grid-template-columns: 1fr; }
  .ecosystem-stack article:last-child { grid-column: auto; }
  .gate-grid h3 { margin-top: 1.5rem; }
  .evidence-metrics article { min-height: 0; }
  .evidence-metrics .evidence-word { margin-bottom: .3rem; font-size: 2rem; }
  .film-footnote p { font-size: .875rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none!important; animation: none!important; }
}
