/* Scenarios review pages: shared styles. Colours follow the ai-governance evaluation pages. */
:root {
  color-scheme: light;
  --ink: #1f2d38; --muted: #5d6c76; --faint: #7a8790; --line: #dce3e7; --bg: #f5f7f8; --paper: #fff;
  --blue: #185c8d; --blue-soft: #e9f2f8; --amber-soft: #fff7df; --amber-line: #efd18e; --amber: #8b5a00;
  --teal: #126b62; --teal-soft: #e8f6f3; --purple-soft: #f5f3ff;
  /* Chart tokens (validated: ordinal blue ramp and 2-slot categorical, light surface). */
  --c-modest: #86b6ef; --c-substantial: #2a78d6; --c-extreme: #104281;
  --c-1: #2a78d6; --c-2: #eb6834; --c-muted: #c3c2b7;
  --grid: #e1e0d9; --axis: #c3c2b7; --t-secondary: #52514e; --t-muted: #6f6d67;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; overflow-x: hidden; }
@media(max-width:600px) {
  main, .top-inner, .foot-inner { padding-right:44px !important; }
  .site-nav { position:static !important; }
  .site-nav ul { padding-right:44px !important; }
}
a { color: var(--blue); overflow-wrap: anywhere; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; line-height: 1.22; }
h1 { font-size: clamp(1.55rem, 4.2vw, 2.1rem); margin: .4rem 0 .6rem; }
h2 { font-size: 1.42rem; margin: 2rem 0 .6rem; }
h3 { font-size: 1.06rem; margin: 1.2rem 0 .4rem; line-height: 1.35; }
p { margin: .5rem 0 .85rem; }
ul, ol { padding-left: 1.3rem; } li { margin: .35rem 0; }
code { font-size: .9em; background: #eef2f4; padding: 0 .2em; border-radius: .2em; overflow-wrap: anywhere; }
.top { background: #173c58; color: #fff; }
.top-inner, main, .foot-inner { max-width: 980px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.top-inner { padding-top: .7rem; padding-bottom: .2rem; font-size: .84rem; }
.top a { color: #d8ebf7; }
.review-navigation{background:#fff;border-bottom:1px solid var(--line)}
.review-navigation>.workspace-nav{max-width:980px;margin:0 auto;padding:0 16px}
@media(max-width:600px){.review-navigation>.workspace-nav{padding-right:44px}}
.crumbs { display: flex; flex-wrap: wrap; gap: .2rem .9rem; }
.site-nav { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-nav ul { list-style: none; margin: 0 auto; max-width: 980px; padding: .35rem 16px; display: flex; flex-wrap: wrap; gap: .25rem .35rem; }
.site-nav li { margin: 0; }
.site-nav a { display: inline-block; padding: .28rem .55rem; border: 1px solid #c9dbe8; border-radius: .35rem; font-size: .8rem; font-weight: 650; text-decoration: none; background: #fff; min-height: 32px; }
.site-nav a[aria-current=page] { background: var(--blue); border-color: var(--blue); color: #fff; }
main { padding-top: 1.1rem; padding-bottom: 3rem; }
.kicker { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 760; color: var(--teal); margin: .2rem 0 0; }
.lede { font-size: 1.05rem; color: #34444f; }
.banner { border: 1px solid var(--amber-line); border-left: 4px solid #d29a22; background: var(--amber-soft); color: #5e430b; padding: .75rem .9rem; border-radius: .3rem; font-size: .9rem; margin: .4rem 0 1rem; }
.banner p { margin: .25rem 0; }
.banner strong { color: #4d3608; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: .4rem; padding: 1rem 1.1rem; margin: 1rem 0; }
.panel > :first-child { margin-top: 0; }
.robust { border-left: 4px solid var(--teal); background: var(--teal-soft); padding: .8rem 1rem; border-radius: .3rem; margin: 1rem 0; }
.robust p { margin: .2rem 0; }
.muted, .src { color: var(--muted); font-size: .84rem; }
.src { margin-top: .5rem; }
.tag { display: inline-block; font-size: .68rem; font-weight: 750; letter-spacing: .02em; padding: .05rem .4rem; border-radius: 999px; border: 1px solid transparent; vertical-align: .08em; white-space: nowrap; }
.tag.claude { background: var(--purple-soft); color: #5b21b6; border-color: #ddd6fe; }
.tag.ar { background: #eef2f4; color: #3e4c56; border-color: #d5dde2; }
.tag.ok { background: #e7f5ea; color: #1d5f2e; border-color: #c4e3cc; }
.tag.part { background: #fff4d6; color: #6b4b00; border-color: #f0d995; }
.tag.no { background: #fbeaea; color: #8a2424; border-color: #efc7c7; }
.tag.fix { background: #e9f2f8; color: #174f78; border-color: #c4dbeb; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .7rem; margin: 1rem 0; }
.card { display: block; background: #fff; border: 1px solid var(--line); border-radius: .4rem; padding: .8rem .9rem; text-decoration: none; color: var(--ink); }
.card strong { display: block; color: var(--blue); margin-bottom: .2rem; }
.card span { font-size: .86rem; color: var(--muted); }
.card:hover, .card:focus-visible { border-color: var(--blue); }
details.fold { border: 1px solid var(--line); border-radius: .35rem; background: #fbfcfd; margin: .7rem 0; }
details.fold > summary { cursor: pointer; padding: .55rem .75rem; font-weight: 650; color: #24435a; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: "\25B8\00a0"; color: var(--faint); }
details.fold[open] > summary::before { content: "\25BE\00a0"; }
details.fold > .fold-body { padding: 0 .9rem .7rem; font-size: .94rem; }
details.fold.claim > summary { font-weight: 600; }
.claim-meta { font-size: .8rem; color: var(--muted); margin: -.1rem 0 .4rem; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; line-height: 1.4; background: #fff; }
th, td { padding: .45rem .55rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f1f5f7; font-size: .78rem; color: #34444f; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.term { font: inherit; color: inherit; background: none; border: 0; border-bottom: 1px dotted var(--muted); padding: 0; cursor: help; text-align: inherit; line-height: inherit; }
.term:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.term.tag { font-size: .68rem; font-weight: 750; line-height: 1.5; padding: .02rem .4rem; border-bottom-width: 1px; cursor: help; }
.term.tag.ok { border-bottom: 1px dotted #6aa57a; } .term.tag.part { border-bottom: 1px dotted #c9a640; } .term.tag.ar { border-bottom: 1px dotted #8a98a3; } .term.tag.claude { border-bottom: 1px dotted #a78bfa; } .term.tag.no { border-bottom: 1px dotted #d08a8a; } .term.tag.fix { border-bottom: 1px dotted #6f9cc4; }
#term-tooltip { position: fixed; z-index: 1000; max-width: min(25rem, calc(100vw - 24px)); padding: .65rem .8rem; background: #243440; color: #fff; border-radius: .3rem; box-shadow: 0 3px 12px #0003; font-size: .88rem; line-height: 1.45; }
.hypothesis { padding: .8rem; border-left: 4px solid var(--teal); background: var(--teal-soft); margin: 1.5rem 0 .5rem; border-radius: .25rem; font-size: .9rem; }
.hypothesis .reuse-notice { font-size: .82rem; color: #234e49; border-top: 1px solid #b8ddd7; padding-top: .5rem; margin-top: .5rem; }
.pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 2rem 0 .5rem; font-size: .9rem; }
footer { border-top: 1px solid var(--line); background: #fff; }
.foot-inner { padding-top: 1rem; padding-bottom: 2rem; font-size: .82rem; color: var(--muted); }

/* Controls */
.controls { display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: center; margin: .4rem 0 .7rem; }
.controls .label { font-size: .8rem; font-weight: 700; color: #34444f; }
.seg { display: inline-flex; flex-wrap: wrap; gap: .25rem; }
.seg button, .chip-btn, .preset { min-height: 34px; padding: .25rem .6rem; border: 1px solid #c9d3da; border-radius: .35rem; background: #fff; color: #2b3a44; font: inherit; font-size: .82rem; cursor: pointer; }
.seg button[aria-pressed=true], .chip-btn[aria-pressed=true] { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 650; }
.seg button:focus-visible, .chip-btn:focus-visible, .preset:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.preset:hover, .seg button:hover, .chip-btn:hover { border-color: var(--blue); }
input[type=search] { min-height: 34px; border: 1px solid #c9d3da; border-radius: .35rem; padding: .25rem .5rem; font: inherit; font-size: .86rem; flex: 1 1 200px; min-width: 0; }
.count { font-size: .8rem; color: var(--muted); }

/* Charts */
.viz { background: #fff; border: 1px solid var(--line); border-radius: .4rem; padding: .9rem 1rem .7rem; margin: 1rem 0; }
.viz h3 { margin-top: 0; }
.viz svg { display: block; width: 100%; height: auto; overflow: visible; }
.viz svg text { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.viz .note { font-size: .8rem; color: var(--muted); margin: .4rem 0 0; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .8rem; color: var(--t-secondary); margin: .2rem 0 .3rem; }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.legend i.line { height: 2px; width: 16px; border-radius: 1px; }
.legend i.tick { width: 2px; height: 14px; border-radius: 0; background: var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin: .7rem 0; }
.tile { border: 1px solid var(--line); border-radius: .35rem; padding: .55rem .7rem; background: #fbfcfd; }
.tile .t-label { font-size: .76rem; color: var(--muted); display: block; }
.tile .t-value { font-size: 1.5rem; font-weight: 650; display: block; line-height: 1.2; }
.tile .t-delta { font-size: .76rem; color: var(--t-secondary); }
.chart-tip { position: fixed; z-index: 900; pointer-events: none; background: #fff; color: var(--ink); border: 1px solid #cfd6db; box-shadow: 0 4px 14px #0002; border-radius: .3rem; padding: .45rem .6rem; font-size: .8rem; line-height: 1.35; max-width: min(18rem, calc(100vw - 24px)); }
.chart-tip strong { display: block; font-size: .95rem; }
.slider-row { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr) 3.4rem; gap: .5rem; align-items: center; margin: .35rem 0; font-size: .85rem; }
.slider-row input[type=range] { width: 100%; min-height: 28px; accent-color: var(--blue); }
.slider-row output { font-variant-numeric: tabular-nums; text-align: right; font-weight: 650; }
.not-model { border: 1px dashed #b8c4cc; background: #f7f9fa; border-radius: .35rem; padding: .5rem .7rem; font-size: .85rem; color: #34444f; margin: .5rem 0; }

/* Causal chain */
.chain { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem .9rem; counter-reset: step; }
.chain li { margin: 0; position: relative; }
.chain button { width: 100%; height: 100%; min-height: 92px; text-align: left; border: 1px solid #c9d3da; border-radius: .4rem; padding: .55rem .6rem; font: inherit; font-size: .84rem; cursor: pointer; background: #fff; color: var(--ink); }
.chain button[aria-expanded=true] { outline: 2px solid var(--ink); outline-offset: 1px; }
.chain .step-n { font-size: .7rem; font-weight: 750; color: var(--muted); display: block; }
.chain .step-t { font-weight: 650; display: block; line-height: 1.3; }
.chain .step-s { display: inline-block; margin-top: .3rem; font-size: .68rem; font-weight: 750; padding: .05rem .4rem; border-radius: 999px; }
.chain .cov-model button { background: #e3eefb; border-color: #2a78d6; border-width: 2px; }
.chain .cov-model .step-s { background: #2a78d6; color: #fff; }
.chain .cov-input button { background: #f3f8fe; border-color: #86b6ef; border-style: dashed; border-width: 2px; }
.chain .cov-input .step-s { background: #d9e8fb; color: #174f78; }
.chain .cov-partial button { background: #f6f9fb; border-color: #9fb3c2; }
.chain .cov-partial .step-s { background: #e4ebf0; color: #34444f; }
.chain .cov-out button { background: #f4f4f2; border-color: #d6d5cf; color: #4a4943; }
.chain .cov-out .step-s { background: #e7e6e1; color: #4a4943; }
.chain li:not(:last-child)::after { content: "\2192"; position: absolute; right: -.78rem; top: 38%; color: var(--faint); font-weight: 700; }
.chain li:nth-child(4)::after { content: "\2193"; right: 45%; top: auto; bottom: -1.1rem; }
.chain-detail { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: .35rem; padding: .7rem .9rem; font-size: .92rem; }

/* Filterable lists */
.qitem { background: #fff; border: 1px solid var(--line); border-radius: .4rem; margin: .6rem 0; }
.qitem > summary { cursor: pointer; padding: .6rem .8rem; list-style: none; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .2rem .6rem; align-items: baseline; }
.qitem > summary::-webkit-details-marker { display: none; }
.qitem .q { font-weight: 620; }
.qitem .qtags { grid-column: 2; font-size: .76rem; color: var(--muted); }
.qitem .qbody { padding: 0 .9rem .8rem; font-size: .92rem; border-top: 1px solid var(--line); }
.prio { font-size: .7rem; font-weight: 800; padding: .08rem .45rem; border-radius: .25rem; white-space: nowrap; text-transform: uppercase; letter-spacing: .03em; }
.prio-critical { background: #7a1f1f; color: #fff; }
.prio-veryhigh { background: #7a1f1f; color: #fff; }
.prio-high { background: #f7dfcf; color: #6a2d0c; }
.prio-mediumhigh { background: #fbefc8; color: #5d4300; }
.prio-verification { background: #e4ebf0; color: #2b3a44; }
.empty { padding: .8rem; color: var(--muted); font-size: .9rem; }

@media (max-width: 760px) {
  .site-nav ul { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; padding-bottom: .4rem; }
  .site-nav li { flex: 0 0 auto; }
  .chain { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
  .chain li:not(:last-child)::after, .chain li:nth-child(4)::after { content: "\2193"; right: auto; left: 1.2rem; top: auto; bottom: -1.15rem; }
  .chain button { min-height: 0; }
  .slider-row { grid-template-columns: minmax(0, 1fr) 3.4rem; }
  .slider-row label { grid-column: 1 / -1; }
  th, td { padding: .4rem .45rem; }
  .panel { padding: .85rem .8rem; }
  .viz { padding: .75rem .7rem .6rem; }
}
@media print { .site-nav, .hypothesis, .controls { display: none; } }
