/* Agent governance guide. Everything is scoped to .governance-page and builds on the tokens in styles.css. */

.governance-page {
  --g-accent: #3b4fb0;
  --g-accent-soft: #eef1fd;
  --g-muted: #516072;
  --g-warn: #8a4a06;
  --g-warn-soft: #fff5e0;
  --g-bar: 3.3rem;
}
[data-theme="dark"] .governance-page {
  --g-accent: #a5b4fc;
  --g-accent-soft: #19223d;
  --g-muted: #b3bfd0;
  --g-warn: #fbbf24;
  --g-warn-soft: #2b220f;
}

.governance-page [hidden] { display: none !important; }
.governance-page main [id] { scroll-margin-top: calc(var(--g-bar) + 1.25rem); }
.g-wrap { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.g-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

:where(.governance-page main) h2 { margin: 0; font: 400 clamp(2rem, 3.6vw, 3.1rem)/1.08 var(--display); letter-spacing: -0.02em; text-wrap: balance; }
:where(.governance-page main) h3 { margin: 0; font: 400 1.6rem/1.2 var(--display); text-wrap: balance; }
:where(.governance-page main) h4 { margin: 1.9rem 0 0.8rem; color: var(--g-muted); font: 700 0.72rem/1.3 var(--body); letter-spacing: 0.1em; text-transform: uppercase; }
/* Glyphs are written as escapes so the file stays ASCII and survives any served charset. */
.governance-page main a[href^="http"]::after { content: " \2197"; content: " \2197" / ""; font-size: 0.85em; }
::highlight(governance-match) { background-color: #fde68a; color: #1e293b; }

.g-overline { margin: 0; color: var(--g-muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.g-fineprint { margin: 1rem 0 0; color: var(--g-muted); font-size: 0.82rem; }
.g-lede { max-width: 40rem; margin: 0; font: 400 clamp(1.15rem, 1.8vw, 1.4rem)/1.5 var(--display); }

/* Buttons */
.g-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-block: 2rem 1.5rem; }
.g-button { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 48px; padding: 0.7rem 1.3rem; border: 1px solid var(--g-accent); border-radius: 999px; background: var(--g-accent); color: var(--paper); font: 700 0.95rem var(--body); text-decoration: none; cursor: pointer; transition: background-color 0.15s, color 0.15s, border-color 0.15s; }
.g-button:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.g-button-quiet { background: transparent; color: var(--g-accent); }
.g-button-quiet:hover { border-color: var(--g-accent); background: var(--g-accent-soft); color: var(--g-accent); }

/* Hero */
.g-hero { overflow: hidden; border-bottom: 1px solid var(--line); background: radial-gradient(60rem 32rem at 88% 0%, var(--g-accent-soft), transparent 70%); }
.g-hero-grid { display: grid; gap: 3rem; padding-block: clamp(3rem, 7vw, 6rem); }
.g-hero h1 { margin: 0.75rem 0 1.5rem; font: 400 clamp(2.7rem, 5vw, 4.2rem)/1.04 var(--display); letter-spacing: -0.03em; }
.g-hero h1 em { display: block; color: var(--g-accent); }
.g-lead { max-width: 34rem; margin: 0; font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; }
.g-meta { max-width: 36rem; margin: 0; color: var(--g-muted); font-size: 0.82rem; }

/* Framework figure: a plain list on small screens, a ring on wide ones */
.g-orbit-ring ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.25rem, 1fr)); gap: 0.9rem 0.6rem; margin: 0; padding: 0; list-style: none; }
.g-orbit-ring li a { display: inline-flex; align-items: baseline; gap: 0.45rem; padding: 0.45rem 0.85rem; border: 1px solid var(--line); border-radius: 999px; background: var(--white); box-shadow: var(--shadow-card); color: var(--ink); font-size: 0.9rem; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background-color 0.15s, color 0.15s, border-color 0.15s; }
.g-orbit-ring li a b { color: var(--g-accent); font-size: 0.72rem; }
.g-orbit-ring li a:hover, .g-orbit-ring li a:focus-visible { border-color: var(--g-accent); background: var(--g-accent); color: var(--paper); }
.g-orbit-ring li a:hover b, .g-orbit-ring li a:focus-visible b { color: inherit; }
.g-orbit-q { display: block; margin: 0.3rem 0 0 0.3rem; color: var(--g-muted); font-size: 0.8rem; line-height: 1.35; }
.g-orbit-core { display: none; }
.g-ground { margin-top: 1.75rem; }
.g-ground p { margin: 0 0 0.6rem; color: var(--g-muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-align: center; text-transform: uppercase; }
.g-ground ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; margin: 0; padding: 0; overflow: hidden; border-radius: 12px; list-style: none; }
.g-ground a { display: flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0.4rem 0.5rem; background: var(--ink); color: var(--paper); font-size: 0.82rem; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; transition: background-color 0.15s; }
[data-theme="dark"] .g-ground a { background: #1e293b; color: #f1f5f9; }
.g-ground a:hover, .g-ground a:focus-visible { background: var(--g-accent); color: var(--paper); }

@media (min-width: 480px) {
  .g-ground ul { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1100px) {
  .g-hero-grid { grid-template-columns: minmax(0, 1fr) 26rem; gap: 3rem; align-items: center; }
  .g-orbit-ring { position: relative; }
  .g-orbit-ring ol { display: block; position: relative; aspect-ratio: 1; }
  .g-orbit-ring ol::before { content: ""; position: absolute; inset: 12%; border-radius: 50%; background: conic-gradient(from 0deg, var(--g-accent), var(--line) 75%, var(--line)); -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 2px), #000 calc(100% - 2px)); mask: radial-gradient(closest-side, transparent calc(100% - 2px), #000 calc(100% - 2px)); }
  .g-orbit-ring li a { position: absolute; transform: translate(-50%, -50%); }
  .g-orbit-ring li:nth-child(1) a { left: 50%; top: 12%; }
  .g-orbit-ring li:nth-child(2) a { left: 79.71%; top: 26.31%; }
  .g-orbit-ring li:nth-child(3) a { left: 87.05%; top: 58.46%; }
  .g-orbit-ring li:nth-child(4) a { left: 66.49%; top: 84.24%; }
  .g-orbit-ring li:nth-child(5) a { left: 33.51%; top: 84.24%; }
  .g-orbit-ring li:nth-child(6) a { left: 12.95%; top: 58.46%; }
  .g-orbit-ring li:nth-child(7) a { left: 20.29%; top: 26.31%; }
  .g-orbit-q, .g-orbit-core { position: absolute; left: 50%; top: 50%; margin: 0; transform: translate(-50%, -50%); text-align: center; pointer-events: none; transition: opacity 0.2s; }
  .g-orbit-q { width: 42%; color: var(--ink); font: italic 400 1.3rem/1.25 var(--display); opacity: 0; }
  .g-orbit-ring li:hover .g-orbit-q, .g-orbit-ring li:focus-within .g-orbit-q { opacity: 1; }
  .g-orbit-core { display: block; color: var(--g-muted); font: 400 1.5rem/1.2 var(--display); white-space: nowrap; }
  .g-orbit-ring:has(li:hover) .g-orbit-core, .g-orbit-ring:has(li:focus-within) .g-orbit-core { opacity: 0; }
  .g-ground { margin-top: 0.25rem; }
}

/* Sticky step bar */
.g-steps { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: var(--paper); background: color-mix(in srgb, var(--paper) 88%, transparent); -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4); }
.g-steps-inner { display: flex; align-items: center; gap: 0.75rem; min-height: var(--g-bar); }
.g-steps ol { position: relative; display: flex; flex: 1; min-width: 0; margin: 0; padding: 0 2rem 0 0; overflow-x: auto; list-style: none; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 2rem), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 2rem), transparent); }
.g-steps ol::-webkit-scrollbar { display: none; }
.g-steps a { display: flex; align-items: baseline; gap: 0.35rem; padding: 0.9rem 0.6rem; border-bottom: 2px solid transparent; color: var(--g-muted); font-size: 0.84rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.g-steps li:first-child a { padding-left: 0; }
.g-steps a b { color: var(--g-accent); font-size: 0.68rem; }
.g-steps a:hover { color: var(--ink); }
.g-steps a[aria-current] { border-bottom-color: var(--g-accent); color: var(--ink); }
.g-steps-gap { margin-left: auto; padding-left: 0.75rem; }
.g-steps-reset { flex: none; min-height: 2rem; padding: 0.3rem 0.8rem; border: 1px solid var(--g-accent); border-radius: 999px; background: var(--g-accent-soft); color: var(--g-accent); font: 700 0.78rem var(--body); cursor: pointer; }
.g-steps-reset:hover { background: var(--g-accent); color: var(--paper); }

/* The level you picked marks its next steps in the bar */
.governance-page:has(#level-1:checked) .g-steps a[href="#discover"]::after,
.governance-page:has(#level-2:checked) .g-steps :is(a[href="#prove"], a[href="#protect"], a[href="#own"])::after,
.governance-page:has(#level-3:checked) .g-steps :is(a[href="#run"], a[href="#review"])::after,
.governance-page:has(#level-4:checked) .g-steps a[href="#grow"]::after,
.governance-page:has(#level-5:checked) .g-steps :is(a[href="#discover"], a[href="#foundations"])::after { content: ""; align-self: center; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--g-accent); }

/* Bands and stages */
.g-band { padding-block: clamp(3rem, 6vw, 5.5rem); border-bottom: 1px solid var(--line); }
.g-band-head { max-width: 46rem; margin-bottom: 2.25rem; }
.g-band-head .kicker { margin: 0 0 0.6rem; }
.g-band-head p:last-child { margin: 1rem 0 0; color: var(--g-muted); font-size: 1.05rem; }
.g-stage { padding-block: clamp(3.5rem, 7vw, 6.5rem); border-bottom: 1px solid var(--line); }
.g-stage-grid { display: grid; gap: 2rem; }
.g-stage-head .kicker { margin: 0 0 0.6rem; }
.g-stage-head h2 { font-size: clamp(1.9rem, 2.7vw, 2.5rem); }
.g-num { margin: 0 0 0.75rem; color: transparent; font: 400 clamp(4rem, 7vw, 5.5rem)/0.9 var(--display); letter-spacing: -0.04em; -webkit-text-stroke: 1.5px var(--g-accent); }
.g-question { margin: 1rem 0 0; color: var(--g-accent); font: italic 400 1.2rem/1.35 var(--display); }
.g-quote { margin: 1.75rem 0 0; padding-left: 1rem; border-left: 2px solid var(--g-accent); }
.g-quote p { margin: 0; font: 400 1.02rem/1.5 var(--display); }
.g-quote footer { margin-top: 0.5rem; color: var(--g-muted); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.g-stage-body { min-width: 0; }
.g-stage-body > :not(:first-child) { margin-top: 1.5rem; }
.g-lanes { margin: 1.75rem 0 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.g-lanes a { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 700; text-decoration: none; }
.g-lanes a::after { content: "\2193"; color: var(--g-accent); }
.g-lanes a:hover { color: var(--g-accent); }

@media (min-width: 960px) {
  .g-stage-grid { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 5rem); align-items: start; }
}
@media (min-width: 960px) and (min-height: 700px) {
  .g-stage-head { position: sticky; top: calc(var(--g-bar) + 2rem); }
}

/* Foundations sit on a dark band in both themes */
.g-bedrock { --paper: #0b1220; --white: #131c2e; --ink: #f1f5f9; --line: #27344d; --color-text-main: #f1f5f9; --teal: #7dd3fc; --color-primary: #38bdf8; --color-primary-hover: #bae6fd; --g-accent: #a5b4fc; --g-accent-soft: #1b2644; --g-muted: #aab7ca; --g-warn: #fbbf24; --g-warn-soft: #2b220f; --shadow-card: none; background: var(--paper); color: var(--ink); }
[data-theme="dark"] .g-bedrock { --paper: #0f172a; --white: #172138; }

/* Level picker: radios and :has(), so it works without JavaScript */
.g-levels { min-width: 0; margin: 0; padding: 0; border: 0; }
.g-level-options { display: grid; gap: 0.6rem; }
.g-level { position: relative; display: block; cursor: pointer; }
.g-level input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.g-level-face { display: grid; grid-template-columns: 2.5rem 1fr; gap: 0 0.75rem; padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--white); transition: background-color 0.15s, color 0.15s, border-color 0.15s; }
.g-level-face b { grid-row: span 2; align-self: center; color: var(--g-accent); font: 400 2.1rem/1 var(--display); }
.g-level-face strong { font-size: 1rem; }
.g-level-face span { color: var(--g-muted); font-size: 0.86rem; line-height: 1.4; }
.g-level:hover .g-level-face { border-color: var(--g-accent); }
.g-level input:focus-visible + .g-level-face { outline: 3px solid var(--color-primary); outline-offset: 3px; }
.g-level input:checked + .g-level-face { border-color: var(--g-accent); background: var(--g-accent); color: var(--paper); }
.g-level input:checked + .g-level-face :is(b, span) { color: inherit; }
.g-level input:checked + .g-level-face strong::after { content: " \2713"; content: " \2713" / ""; }
.g-level-panels { margin-top: 1rem; padding: clamp(1.25rem, 2.5vw, 2rem); border-radius: 14px; background: var(--g-accent-soft); }
.g-level-prompt { margin: 0; color: var(--g-muted); }
.g-level-panel h3 { margin: 0.35rem 0 0.7rem; }
.g-level-panel p { max-width: 44rem; margin: 0; }
.g-level-panel .g-level-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1rem; }
.g-level-links a, .g-level-panel .g-list a { font-weight: 700; }
.g-level-links a::after { content: " \2192"; }
.g-level-panel + .g-level-panel { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
@supports selector(:has(*)) {
  .g-level-panel { display: none; }
  .g-level-panel + .g-level-panel { margin-top: 0; padding-top: 0; border-top: 0; }
  .g-levels:has(#level-1:checked) [data-level-panel="1"],
  .g-levels:has(#level-2:checked) [data-level-panel="2"],
  .g-levels:has(#level-3:checked) [data-level-panel="3"],
  .g-levels:has(#level-4:checked) [data-level-panel="4"],
  .g-levels:has(#level-5:checked) [data-level-panel="5"] { display: block; }
  .g-levels:has(input:checked) .g-level-prompt { display: none; }
}
@supports not selector(:has(*)) {
  .g-level-prompt { display: none; }
}
@media (min-width: 900px) {
  .g-level-options { grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; }
  /* Each level stands a step higher than the one before. */
  .g-level-face { display: flex; flex-direction: column; min-height: 10.5rem; padding: 1rem 1.1rem 1.1rem; }
  .g-level-face b { align-self: flex-start; }
  .g-level-face strong { margin: 0.5rem 0 0.2rem; }
  .g-level:nth-child(2) .g-level-face { min-height: 11.5rem; }
  .g-level:nth-child(3) .g-level-face { min-height: 12.5rem; }
  .g-level:nth-child(4) .g-level-face { min-height: 13.5rem; }
  .g-level:nth-child(5) .g-level-face { min-height: 14.5rem; }
}

/* Filters */
.g-controls { padding-block: 1.5rem; border-bottom: 1px solid var(--line); background: var(--white); }
.g-controls h2 { margin: 0 0 1rem; color: var(--g-muted); font: 700 0.72rem/1.3 var(--body); letter-spacing: 0.1em; text-transform: uppercase; }
.g-controls-row { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: flex-end; }
.g-control-label { display: block; margin-bottom: 0.4rem; font-size: 0.8rem; font-weight: 700; }
.g-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.g-chip { min-height: 2.5rem; padding: 0.35rem 0.85rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font: 700 0.82rem var(--body); cursor: pointer; transition: background-color 0.15s, color 0.15s, border-color 0.15s; }
.g-chip:hover { border-color: var(--g-accent); }
.g-chip[aria-pressed="true"] { border-color: var(--g-accent); background: var(--g-accent); color: var(--paper); }
.g-chip[aria-pressed="true"]::before { content: "\2713  "; content: "\2713  " / ""; }
.g-search { flex: 1 1 14rem; max-width: 26rem; }
.g-search input { width: 100%; min-height: 2.5rem; padding: 0.4rem 1rem; border: 1px solid var(--g-muted); border-radius: 999px; background: var(--paper); color: var(--ink); }
.g-control-status { min-height: 1.5rem; margin: 1rem 0 0; font-size: 0.88rem; font-weight: 700; }
.g-control-empty { margin: 0.5rem 0 0; }
.g-link-button { padding: 0; border: 0; background: none; color: var(--teal); font: inherit; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }

/* Topics */
.g-topic { min-width: 0; padding: clamp(1.25rem, 2.4vw, 2rem); border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: var(--shadow-card); container-type: inline-size; overflow-wrap: break-word; }
.g-topic:target { border-color: var(--g-accent); box-shadow: 0 0 0 4px var(--g-accent-soft); }
.g-topic > :not(:first-child) { margin-top: 1rem; }
.g-topic > h4:not(:first-child) { margin-top: 1.9rem; }
.g-topic > h4 + :not(:first-child) { margin-top: 0.8rem; }
.g-topic :is(p, li, dd, td, th) { font-size: 0.95rem; }
.g-topic p { margin-bottom: 0; }
.g-topic > p:not([class]) { max-width: 42rem; }
.g-topic-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 2rem; }
.g-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; }
.g-tag { padding: 0.2rem 0.65rem; border-radius: 999px; background: var(--g-accent-soft); color: var(--g-accent); font-size: 0.72rem; font-weight: 700; }
.g-topic .g-tag { font-size: 0.72rem; }
.g-anchor { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; color: var(--g-muted); text-decoration: none; }
.g-anchor:hover { background: var(--g-accent-soft); color: var(--g-accent); }
.g-topic .g-context { display: inline-block; margin: 0 0 0.25rem; padding: 0.2rem 0.65rem; border: 1px dashed var(--g-muted); border-radius: 999px; color: var(--g-muted); font-size: 0.72rem; font-weight: 700; }
.g-topic:has(> .g-context) { border-style: dashed; }
.g-tool-q, .g-topic .g-tool-q { color: var(--g-accent); font: italic 400 1.15rem/1.4 var(--display); }
.g-takeaway { padding-top: 1rem; border-top: 1px solid var(--line); color: var(--g-muted); }

.g-list, .g-check { display: grid; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.g-list li { position: relative; padding-left: 1.2rem; }
.g-list li::before { content: ""; position: absolute; left: 0.1rem; top: 0.62em; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--g-accent); }
.g-check { counter-reset: check; }
.g-check li { position: relative; padding-left: 2.2rem; counter-increment: check; }
.g-check li::before { content: counter(check); position: absolute; left: 0; top: 0.05rem; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--g-accent-soft); color: var(--g-accent); font-size: 0.72rem; font-weight: 700; }

.g-watch, .g-note { max-width: none; margin: 0; padding: 0.9rem 1.1rem; border-radius: 12px; }
.g-watch { background: var(--g-warn-soft); }
.g-watch > strong:first-child { display: block; margin-bottom: 0.2rem; color: var(--g-warn); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; }
.g-note { border: 1px solid var(--line); border-left: 3px solid var(--g-accent); background: var(--white); font-size: 0.95rem; }

.g-proof { display: grid; gap: 1rem 2rem; margin-bottom: 0; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.g-proof dt { color: var(--g-muted); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.g-proof dd { margin: 0.25rem 0 0; }
.g-read { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; align-items: baseline; }
.g-read span { color: var(--g-muted); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.g-read a { padding-block: 0.15rem; font-size: 0.88rem; font-weight: 700; }

.g-facts { display: grid; gap: 1px; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--line); list-style: none; }
.g-facts li { background: var(--white); }
.g-facts li > * { display: block; height: 100%; padding: 1.1rem 1.2rem; color: inherit; text-decoration: none; }
.g-facts strong { display: block; margin-bottom: 0.3rem; font: 400 1.2rem/1.2 var(--display); }
.g-facts span { display: block; color: var(--g-muted); font-size: 0.88rem; line-height: 1.45; }
.g-facts a:hover, .g-facts a:focus-visible { background: var(--g-accent-soft); }
.g-facts a strong { color: var(--g-accent); }
.governance-page .g-facts a[href^="http"]::after { content: none; }
.g-facts a[href^="http"] strong::after { content: " \2197"; content: " \2197" / ""; font-size: 0.8em; }
.g-facts-inset li { background: var(--paper); }

.g-pair { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.g-pair > div { padding: 1.1rem 1.2rem; background: var(--paper); }
.g-pair > div > strong { display: block; font: 400 1.2rem/1.2 var(--display); }
.g-pair p { margin: 0.4rem 0 0; }
.g-pair .g-list { margin-top: 0.7rem; }

.g-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.75rem; margin-bottom: 0; padding: 0; list-style: none; }
.g-stats li { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.g-stats b { display: block; margin-bottom: 0.3rem; color: var(--g-accent); font: 400 2.2rem/1 var(--display); }
.g-stats span { display: block; color: var(--g-muted); font-size: 0.86rem; line-height: 1.4; }

.g-sentence, .g-topic .g-sentence { padding: 1.1rem 1.25rem; border-radius: 12px; background: var(--g-accent-soft); font: 400 1.25rem/1.5 var(--display); }
.g-sentence span { border-bottom: 1px dashed currentColor; color: var(--g-accent); }

.g-questions { margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; counter-reset: question; }
.g-questions li { display: grid; grid-template-columns: 2.75rem 1fr; gap: 0.1rem 0.75rem; padding: 1rem 0; border-bottom: 1px solid var(--line); counter-increment: question; }
.g-questions li::before { content: counter(question); grid-row: span 2; color: var(--g-accent); font: 400 2.3rem/1 var(--display); }
.g-questions strong { font: 400 1.3rem/1.25 var(--display); }
.g-questions span { color: var(--g-muted); font-size: 0.94rem; }

.g-options { display: grid; gap: 0.75rem; margin-bottom: 0; padding: 0; list-style: none; }
.g-options li { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.g-options b { color: var(--g-accent); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; }
.g-options strong { display: block; margin: 0.2rem 0 0.4rem; font: 400 1.3rem/1.2 var(--display); }
.g-options span { display: block; color: var(--g-muted); font-size: 0.9rem; line-height: 1.5; }

.g-journey { margin-bottom: 0; padding: 0; list-style: none; counter-reset: journey; }
.g-journey li { position: relative; padding: 0.6rem 0 0.6rem 2.2rem; border-top: 1px solid var(--line); font-size: 0.92rem; counter-increment: journey; }
.g-journey li::before { content: counter(journey, decimal-leading-zero); position: absolute; left: 0; top: 0.8rem; color: var(--g-accent); font-size: 0.7rem; font-weight: 700; }
.g-journey a { font-weight: 700; }

.g-more { border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.g-more summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3rem; padding: 0.7rem 1rem; font-size: 0.94rem; font-weight: 700; cursor: pointer; list-style: none; }
.g-more summary::-webkit-details-marker { display: none; }
.g-more summary::after { content: "+"; flex: none; color: var(--g-accent); font: 400 1.5rem/1 var(--display); }
.g-more[open] summary::after { content: "\2212"; }
.g-more > :not(summary) { margin: 0 1rem 1rem; }
.g-more > p { font-size: 0.9rem; color: var(--g-muted); }

/* Positioned so the visually hidden cell labels scroll with the table instead of widening the page. */
.g-table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.g-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.g-table-wide { min-width: 36rem; }
.g-table caption { padding: 0.7rem 1rem; border-top: 1px solid var(--line); color: var(--g-muted); font-size: 0.82rem; text-align: left; caption-side: bottom; }
.g-table :is(th, td) { padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.g-table tbody tr:last-child > * { border-bottom: 0; }
.g-table thead th { background: var(--g-accent-soft); color: var(--g-accent); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; }
.g-table tbody th { font-weight: 700; }
.g-record tbody th { width: 34%; color: var(--g-muted); font-size: 0.86rem; }
.g-matrix { min-width: 44rem; table-layout: fixed; }
.g-matrix thead th:first-child { width: 32%; }
.g-matrix :is(td, thead th:not(:first-child)) { padding-inline: 0.4rem; text-align: center; }
.g-matrix td { color: var(--g-accent); font-size: 1.15rem; line-height: 1; vertical-align: middle; }
.g-matrix tbody th a { color: inherit; }

.g-grid-2, .g-grid-3 { display: grid; gap: 1.25rem; align-items: start; }

@container (min-width: 34rem) {
  .g-proof { grid-template-columns: 1fr 1.6fr; }
  .g-pair { grid-template-columns: 1fr 1fr; }
}
@container (min-width: 40rem) {
  .g-check-2 { grid-template-columns: 1fr 1fr; column-gap: 1.75rem; }
  .g-options { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 520px) {
  .g-facts { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 860px) {
  .g-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1040px) {
  .g-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .g-stage-body > .g-facts { grid-template-columns: repeat(4, 1fr); }
}

/* Tools */
.g-tools { background: var(--g-accent-soft); }
.g-subhead { margin: 3rem 0 1.1rem; }
.g-fit { padding: clamp(1.25rem, 2.4vw, 2rem); border: 1px solid var(--line); border-radius: 16px; background: var(--white); container-type: inline-size; }
.g-fit-head p { margin: 0.4rem 0 0; color: var(--g-muted); }
.g-fit-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; margin: 1.5rem 0; padding: 0; list-style: none; }
.g-fit-steps li { padding: 0.7rem 0.4rem; border: 1px dashed var(--g-muted); border-radius: 10px; font-size: 0.88rem; font-weight: 700; text-align: center; }
.g-fit-steps small { display: block; margin-top: 0.1rem; font-size: 0.7rem; font-weight: 400; }
.g-fit-steps .is-covered { border: 1px solid var(--g-accent); background: var(--g-accent); color: var(--paper); }
.g-fit-steps .is-partly { border: 1px solid var(--g-accent); background: repeating-linear-gradient(135deg, var(--g-accent-soft) 0 6px, transparent 6px 12px); color: var(--g-accent); }
@media (min-width: 700px) {
  .g-fit-steps { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

/* Closing band and sources */
.g-close { background: radial-gradient(44rem 22rem at 50% 100%, var(--g-accent-soft), transparent 70%); text-align: center; }
.g-close .kicker { margin: 0 0 0.75rem; }
.g-close h2 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
.g-close p:not(.kicker) { max-width: 40rem; margin: 1.5rem auto 0; font: 400 1.2rem/1.55 var(--display); }
.g-close .g-actions { justify-content: center; margin-bottom: 0; }
.g-print-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; margin: 1.5rem 0 0; }
.g-print-row .g-fineprint { margin: 0; }
.g-sources { border-bottom: 0; }
.g-sources-grid { display: grid; gap: 2.5rem; }
.g-sources-grid > div > * + * { margin-top: 1.1rem; }
.g-sources-grid p { margin-bottom: 0; }
.g-sources h3 { color: var(--g-muted); font: 700 0.72rem/1.3 var(--body); letter-spacing: 0.1em; text-transform: uppercase; }
.g-sources h3:not(:first-child) { margin-top: 2.25rem; }
.g-source-list { margin-bottom: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.g-source-list li { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.g-source-list a { font-weight: 700; }
.g-source-list span { display: block; color: var(--g-muted); font-size: 0.88rem; }
@media (min-width: 900px) {
  .g-sources-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2.5rem, 6vw, 5rem); }
}

@media (prefers-reduced-motion: reduce) {
  .governance-page * { transition: none !important; }
}

@media (forced-colors: active) {
  .g-num { color: CanvasText; -webkit-text-stroke: 0; }
  .g-orbit-ring ol::before { border: 1px solid CanvasText; background: none; -webkit-mask: none; mask: none; }
  .g-chip[aria-pressed="true"], .g-level input:checked + .g-level-face, .g-fit-steps .is-covered { border: 3px solid Highlight; }
  .g-fit-steps .is-partly { border: 3px dashed Highlight; }
  .g-steps a[aria-current] { border-bottom-color: Highlight; }
  .g-watch, .g-level-panels, .g-sentence { border: 1px solid CanvasText; }
}

@media print {
  .governance-page, .g-bedrock { --paper: #fff; --white: #fff; --ink: #000; --line: #999; --color-text-main: #000; --teal: #000; --g-accent: #000; --g-accent-soft: #fff; --g-muted: #333; --g-warn: #000; --g-warn-soft: #fff; --shadow-card: none; color-scheme: light; }
  .governance-page .site-header, .governance-page .site-footer, .governance-page .skip-link, .g-steps, .g-controls, .g-actions, .g-anchor, .g-print-row, .g-orbit-core, .g-level input { display: none !important; }
  .governance-page [data-governance-card][hidden] { display: block !important; }
  .governance-page main a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; overflow-wrap: anywhere; }
  .g-wrap { width: 100%; }
  .g-hero, .g-close, .g-tools { background: none; }
  .g-hero-grid, .g-stage-grid, .g-sources-grid, .g-grid-2, .g-grid-3 { display: block; }
  .g-hero-grid, .g-stage, .g-band { padding-block: 1.25rem; }
  .g-hero h1 { font-size: 30pt; }
  .g-num { color: #000; font-size: 28pt; -webkit-text-stroke: 0; }
  .g-orbit-ring ol { display: block; aspect-ratio: auto; }
  .g-orbit-ring ol::before { display: none; }
  .g-orbit-ring li a, .g-orbit-q { position: static; display: inline; transform: none; opacity: 1; border: 0; box-shadow: none; font: inherit; }
  .g-ground a { background: none; color: #000; border: 1px solid #999; }
  .g-stage-head { position: static; margin-bottom: 1rem; }
  .g-topic, .g-fit, .g-more { margin-bottom: 1rem; break-inside: avoid; }
  .g-level-panel { display: block !important; }
  .g-level-panel + .g-level-panel { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #999; }
  .g-level-prompt { display: none; }
  .g-watch, .g-level-panels, .g-sentence, .g-note { border: 1px solid #999; }
  .g-table-wrap { overflow: visible; }
  .g-table-wide, .g-matrix { min-width: 0; }
  .governance-page details::details-content { content-visibility: visible; display: block; }
  .governance-page details > :not(summary) { display: block; }
  .g-more summary::after { content: none; }
}
