/* Ireland climate-policy timeline: design tokens ------------------------------ */
:root {
  --bg: #EDF1F0;
  --surface: #FFFFFF;
  --surface-2: #F6F8F8;
  --ink: #15252D;
  --ink-2: #4B5C65;
  --ink-3: #7A8990;
  --line: #D3DCDB;
  --line-2: #E4EAE9;
  --atlantic: #0B5563;
  --atlantic-2: #0F6F80;
  --atlantic-soft: #D8E9EA;
  --cursor: #C4841D;
  --ok: #2F7D4A;
  --warn: #A6611A;
  --callout-bg: #FBF3E6;
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --r-sm: 3px;
  --r-md: 6px;
  --shadow: 0 1px 2px rgba(21, 37, 45, .06), 0 4px 14px rgba(21, 37, 45, .05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 var(--sans); font-feature-settings: "tnum" 1;
}
a { color: var(--atlantic); text-underline-offset: 2px; }
a:hover { color: var(--atlantic-2); }
:focus-visible { outline: 2px solid var(--cursor); outline-offset: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 6px 10px; z-index: 99; }
.wrap { max-width: 1340px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.005em; margin: 0; }
h1 { font-size: 40px; line-height: 1.12; }
h2 { font-size: 27px; line-height: 1.2; }
h3 { font-size: 20px; line-height: 1.3; }
p { margin: 0 0 .8em; }
.lede { font-family: var(--serif); font-size: 20px; line-height: 1.5; color: var(--ink-2); max-width: 70ch; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.prose { max-width: 72ch; }
.prose p { margin-bottom: .9em; }
code, .code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line-2); padding: 0 4px; border-radius: 3px; word-break: break-word; }

/* Header ----------------------------------------------------------------------- */
.site-head { background: var(--atlantic); color: #fff; }
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; gap: 12px; align-items: center; color: #fff; text-decoration: none; padding: 10px 0; }
.brand:hover { color: #fff; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark rect:first-child { fill: rgba(255,255,255,.12); }
.brand-mark rect { fill: #fff; }
.brand strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 20px; line-height: 1.15; }
.brand small { display: block; font-size: 12.5px; color: rgba(255,255,255,.75); }
.main-nav { display: flex; gap: 2px; flex-wrap: wrap; }
.main-nav a { color: rgba(255,255,255,.82); text-decoration: none; padding: 8px 12px; border-radius: var(--r-sm); font-weight: 500; font-size: 14px; }
.main-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.main-nav a[aria-current="page"] { color: var(--atlantic); background: #fff; }

main.wrap { padding-top: 30px; padding-bottom: 40px; }
.site-foot { border-top: 1px solid var(--line); padding-top: 18px; padding-bottom: 36px; color: var(--ink-2); font-size: 13px; }
.site-foot p { max-width: 90ch; }
.sep { color: var(--ink-3); margin: 0 6px; }

/* Page structure -------------------------------------------------------------- */
.page-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; margin-bottom: 22px; }
.page-head p { margin: 8px 0 0; }
.section { margin-top: 44px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head p { margin: 0; color: var(--ink-2); font-size: 14px; max-width: 70ch; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; }
.panel.flush { padding: 0; }
.panel h3 { margin-bottom: 6px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.split { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
@media (max-width: 1000px) { .split, .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } h1 { font-size: 31px; } .page-head { grid-template-columns: 1fr; } }

/* Controls ---------------------------------------------------------------------- */
.controls { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-end; }
.control { display: flex; flex-direction: column; gap: 5px; }
.control > label, .control > .label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 6px 11px; font: 500 13px var(--sans); color: var(--ink-2); cursor: pointer; border-right: 1px solid var(--line-2); }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--surface-2); color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--atlantic); color: #fff; }
/* Chart text-size buttons (Categories): "A−" / "A+" like word processors */
.font-size button { font-family: var(--serif); font-weight: 600; min-width: 44px; line-height: 1; }
.font-size .a-small { font-size: 13px; }
.font-size .a-large { font-size: 18px; }
.chart-tools { justify-content: flex-end; margin-bottom: 8px; }

/* Categories sunburst / treemap: all text is sized in em from --chart-fs (A− / A+) */
.sb-wrap { --chart-fs: 10px; font-size: var(--chart-fs); }
.sb-chart { min-height: 400px; }
.sb-chart svg { display: block; max-width: 100%; height: auto; overflow: visible; font: 600 1em var(--sans); }
.sb-chart text { font-size: 1em; }
.sb-seg { cursor: pointer; }
.sb-seg:focus { outline: none; }
.sb-seg:focus-visible { stroke: var(--cursor) !important; stroke-width: 3px !important; }
.sb-lab { pointer-events: none; paint-order: stroke; stroke-width: .25em; stroke-linejoin: round; }
.sb-out-item { cursor: pointer; }
.sb-out-item path { fill: none; stroke: var(--ink-2); stroke-width: 1; }
.sb-out-item circle { fill: var(--ink); }
.sb-out-item text { font-size: .95em; fill: var(--ink); stroke: var(--surface); stroke-width: .3em; paint-order: stroke; stroke-linejoin: round; }
.sb-out-item:hover text, .sb-out-item:focus text { fill: var(--atlantic); text-decoration: underline; }
.sb-out-item:focus { outline: none; }
.sb-centre circle { fill: var(--surface); stroke: var(--line); }
.sb-centre .sb-c1 { fill: var(--ink); font-weight: 700; }
.sb-centre .sb-big { font-size: 1.6em; }
.sb-centre .sb-c2 { fill: var(--ink-2); font-weight: 500; font-size: .95em; }
.sb-centre .sb-c3 { fill: var(--atlantic); font-size: .85em; }
.sb-centre.can-zoom { cursor: pointer; }
.sb-centre.can-zoom:hover circle, .sb-centre.can-zoom:focus-visible circle { stroke: var(--atlantic); stroke-width: 2; }
.sb-centre:focus { outline: none; }
.sb-mag rect { fill: #15252D; stroke: #fff; stroke-width: 1.5; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
.sb-mag .sb-mag-title { fill: #fff; font-size: 1.35em; font-weight: 700; }
.sb-mag .sb-mag-sub { fill: #DDE7EA; font-size: 1.05em; font-weight: 500; }
.sb-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .2em .4em; margin-bottom: .5em; font-size: .95em; color: var(--ink-3); }
.sb-crumbs button { font: inherit; color: var(--atlantic); background: none; border: 0; padding: .15em .2em; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.sb-crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.sb-legend { display: flex; flex-wrap: wrap; gap: .4em .5em; margin-top: .7em; font-size: .95em; }
.sb-key { display: inline-flex; align-items: center; gap: .45em; font: 500 1em var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .3em .75em; cursor: pointer; }
.sb-key:hover, .sb-key:focus-visible { border-color: var(--ink); }
.sb-key i { width: .85em; height: .85em; border-radius: 2px; flex: none; }
.sb-key b { font-weight: 600; color: var(--ink-2); }
.font-size button:disabled { opacity: .4; cursor: default; background: transparent; }
select, input[type="search"], input[type="text"] {
  font: 14px var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 6px 9px; min-height: 33px;
}
input[type="search"] { min-width: 230px; }
.btn { display: inline-flex; align-items: center; gap: 7px; font: 600 13px var(--sans); padding: 7px 13px; border-radius: var(--r-sm); border: 1px solid var(--atlantic); background: var(--atlantic); color: #fff; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--atlantic-2); color: #fff; }
.btn.ghost { background: transparent; color: var(--atlantic); }
.btn.ghost:hover { background: var(--atlantic-soft); color: var(--atlantic); }
.btn svg { width: 14px; height: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 3px 10px 3px 8px; font: 500 12.5px var(--sans); cursor: pointer; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.chip[aria-pressed="false"] { color: var(--ink-3); background: transparent; border-style: dashed; }
.chip[aria-pressed="false"] .dot { opacity: .3; }

/* Badges and tags ---------------------------------------------------------------- */
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.tag .dot { width: 8px; height: 8px; border-radius: 50%; }
.tag.layer { background: var(--atlantic-soft); border-color: transparent; color: var(--atlantic); font-weight: 600; }
.term { border-bottom: 1px dotted var(--ink-3); cursor: help; }

/* Tooltip ------------------------------------------------------------------------ */
.tip { position: fixed; z-index: 50; pointer-events: none; max-width: 330px; background: var(--ink); color: #fff; font-size: 12.5px; line-height: 1.45; padding: 9px 11px; border-radius: var(--r-sm); box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.tip strong { display: block; font-size: 13px; margin-bottom: 2px; }
.tip .row { display: flex; justify-content: space-between; gap: 14px; }
.tip .row span:first-child { color: rgba(255,255,255,.7); }
.tip hr { border: 0; border-top: 1px solid rgba(255,255,255,.18); margin: 6px 0; }

/* Overview ---------------------------------------------------------------------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 36px; align-items: center; margin-bottom: 10px; }
.hero h1 { max-width: 16ch; }
.hero .lede { margin-top: 14px; }
.hero-figure { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px 10px; }
.hero-figure figcaption { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 1000px) { .hero { grid-template-columns: 1fr; } }
.facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); margin-top: 26px; }
.fact { padding: 14px 18px; border-right: 1px solid var(--line-2); }
.fact:last-child { border-right: 0; }
.fact b { display: block; font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.1; color: var(--atlantic); }
.fact span { font-size: 13px; color: var(--ink-2); }
@media (max-width: 900px) { .facts { grid-template-columns: repeat(2, 1fr); } .fact { border-bottom: 1px solid var(--line-2); } }

.pipeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.pipeline li { list-style: none; padding: 4px 22px 4px 0; position: relative; }
.pipeline li + li { padding-left: 22px; border-left: 1px solid var(--line); }
.pipeline .n { font-family: var(--serif); font-size: 15px; color: var(--cursor); font-weight: 600; }
.pipeline h3 { font-size: 18px; margin: 2px 0 6px; }
.pipeline p { font-size: 14px; color: var(--ink-2); margin: 0; }
@media (max-width: 900px) { .pipeline { grid-template-columns: 1fr 1fr; gap: 18px 0; } .pipeline li:nth-child(3) { border-left: 0; padding-left: 0; } }
@media (max-width: 560px) { .pipeline { grid-template-columns: 1fr; padding-left: 0; } .pipeline li, .pipeline li + li { border-left: 0; padding: 0; } }

.matrix { --cell-fs: 13px; width: 100%; border-collapse: separate; border-spacing: 3px; font-size: var(--cell-fs); }
.matrix th { font-weight: 600; color: var(--ink-2); font-size: calc(var(--cell-fs) - 1px); text-align: left; padding: 4px 6px; vertical-align: bottom; }
.matrix thead th { text-align: center; }
.matrix td { height: calc(var(--cell-fs) * 2.9); text-align: center; border-radius: var(--r-sm); background: var(--surface-2); cursor: default; font-weight: 600; min-width: calc(var(--cell-fs) * 3.4); }
.matrix td.has { cursor: pointer; color: #fff; }
.matrix td.has:hover { outline: 2px solid var(--ink); }
.matrix th.rowh { white-space: nowrap; }
.matrix-wrap { overflow-x: auto; }

.layer-stack { display: flex; flex-direction: column; gap: 8px; }
.layer-row { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); }
.layer-row .badge { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--atlantic); text-align: center; line-height: 1.2; }
.layer-row h3 { font-size: 16px; font-family: var(--sans); font-weight: 600; }
.layer-row p { font-size: 13.5px; color: var(--ink-2); margin: 2px 0 0; }
.layer-row .count { font-size: 12px; color: var(--ink-3); }

.caveats { border-left: 3px solid var(--cursor); background: var(--surface); padding: 14px 18px; border-radius: 0 var(--r-md) var(--r-md) 0; }
.caveats ul { margin: 6px 0 0; padding-left: 18px; }
.caveats li { margin-bottom: 6px; font-size: 14px; }

/* Main caveat box (Overview) */
.callout { margin-top: 18px; padding: 14px 18px; border: 1px solid var(--warn); border-left-width: 5px; border-radius: var(--r-md); background: var(--callout-bg); color: var(--ink); max-width: 100%; }
.callout p { margin: 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.callout p + p { margin-top: 4px; }
.callout .callout-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--warn); }

/* Timeline ------------------------------------------------------------------------ */
.tl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 1150px) { .tl-layout { grid-template-columns: 1fr; } }
.tl-toolbar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md) var(--r-md) 0 0; padding: 14px 16px; border-bottom: 0; }
.tl-toolbar .row2 { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.tl-canvas { background: var(--surface); border: 1px solid var(--line); border-radius: 0 0 var(--r-md) var(--r-md); overflow-x: auto; position: relative; }
.tl-canvas svg { display: block; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink-2); align-items: center; }
.tl-legend .sw { display: inline-block; width: 16px; height: 11px; border-radius: 2px; vertical-align: -1px; margin-right: 5px; border: 1px solid rgba(0,0,0,.08); }
.tl-row-label { font: 500 calc(12.5px * var(--tl-k, 1)) var(--sans); fill: var(--ink); cursor: pointer; }
.tl-row-label:hover { fill: var(--atlantic); text-decoration: underline; }
.tl-group-label { font: 600 calc(13px * var(--tl-k, 1)) var(--sans); fill: var(--ink); }
.tl-group-sub { font: 400 calc(12px * var(--tl-k, 1)) var(--sans); fill: var(--ink-2); }
.tl-axis text { font: 500 11px var(--sans); fill: var(--ink-2); }
.tl-axis line, .tl-axis path { stroke: var(--line); }
.snapshot { position: sticky; top: 14px; }
.snapshot .year-big { font-family: var(--serif); font-size: 52px; line-height: 1; color: var(--cursor); font-weight: 500; }
.snapshot ul { list-style: none; margin: 0; padding: 0; }
.snapshot li { padding: 4px 0; font-size: 13.5px; border-bottom: 1px solid var(--line-2); display: flex; gap: 8px; align-items: baseline; }
.snapshot li .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; transform: translateY(-1px); }
.snapshot h4 { margin: 14px 0 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.snap-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.snap-stats div { background: var(--surface-2); padding: 8px 10px; border-radius: var(--r-sm); }
.snap-stats b { display: block; font-size: 22px; font-family: var(--serif); font-weight: 500; }
.snap-stats span { font-size: 12px; color: var(--ink-2); }
.player { display: flex; gap: 8px; align-items: center; }
.player input[type="range"] { width: 200px; accent-color: var(--cursor); }
.player output { font-weight: 700; color: var(--cursor); min-width: 36px; }

/* Drawer ----------------------------------------------------------------------------- */
.drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(460px, 100vw); background: var(--surface); box-shadow: -10px 0 30px rgba(21,37,45,.14); z-index: 40; transform: translateX(105%); transition: transform .22s ease; overflow-y: auto; padding: 22px 24px 30px; border-left: 1px solid var(--line); }
.drawer[aria-hidden="false"] { transform: none; }
.drawer .close { position: absolute; top: 12px; right: 12px; border: 0; background: var(--surface-2); width: 32px; height: 32px; border-radius: 50%; font-size: 18px; cursor: pointer; color: var(--ink-2); }
.drawer h2 { font-size: 24px; padding-right: 40px; }
.drawer .tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 13.5px; margin: 12px 0; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; }
@media (prefers-reduced-motion: reduce) { .drawer { transition: none; } }

/* Tables ---------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 9px 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); position: sticky; top: 0; white-space: nowrap; }
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sortable:hover { color: var(--ink); }
table.data th[aria-sort="ascending"]::after { content: " \25B4"; }
table.data th[aria-sort="descending"]::after { content: " \25BE"; }
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.data tr:hover td { background: #F8FBFB; }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .pname { font-weight: 600; color: var(--ink); text-decoration: none; }
table.data .pname:hover { color: var(--atlantic); text-decoration: underline; }
.pass { color: var(--ok); font-weight: 700; }
.fail { color: #B42318; font-weight: 700; }

/* Explorer ---------------------------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; margin-bottom: 14px; }
.result-count { font-size: 13px; color: var(--ink-2); }
.spark { display: block; }

/* Detail ------------------------------------------------------------------------------- */
.detail-head { border-left: 6px solid var(--atlantic); padding: 4px 0 4px 18px; margin-bottom: 20px; }
.detail-head .crumbs { font-size: 13px; margin-bottom: 6px; }
.detail-head h1 { font-size: 36px; max-width: 30ch; }
.detail-head .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.glance { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); margin-bottom: 22px; }
.glance div { padding: 12px 16px; border-right: 1px solid var(--line-2); }
.glance div:last-child { border-right: 0; }
.glance b { display: block; font-size: 22px; font-family: var(--serif); font-weight: 500; }
.glance span { font-size: 12.5px; color: var(--ink-2); }
@media (max-width: 800px) { .glance { grid-template-columns: 1fr 1fr; } }
.formula { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.formula .term-box { background: var(--surface-2); border-radius: var(--r-sm); padding: 8px 12px; min-width: 110px; }
.formula .term-box b { display: block; font-family: var(--serif); font-size: 26px; font-weight: 500; }
.formula .term-box span { font-size: 12px; color: var(--ink-2); }
.formula .op { align-self: center; font-size: 20px; color: var(--ink-3); }
.formula .term-box.result { background: var(--atlantic); color: #fff; }
.formula .term-box.result span { color: rgba(255,255,255,.8); }
.bar-track { height: 6px; background: var(--line-2); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--atlantic); }
.flag-group { margin-bottom: 12px; }
.flag-group h4 { margin: 0 0 4px; font-size: 13px; }
.flag-group ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); }
.citations li { font-size: 13px; margin-bottom: 8px; word-break: break-word; }

/* Categories ------------------------------------------------------------------------ */
.cat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.cat { border-top: 4px solid var(--c, var(--atlantic)); background: var(--surface); border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0 0 var(--r-md) var(--r-md); padding: 14px 16px; }
.cat h3 { font-size: 18px; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.cat h3 small { font-family: var(--sans); font-size: 12px; color: var(--ink-2); font-weight: 500; }
.cat p { font-size: 13.5px; color: var(--ink-2); margin: 6px 0 10px; }
.cat ul { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.cat li { padding: 3px 0; border-top: 1px solid var(--line-2); display: flex; justify-content: space-between; gap: 10px; }
.cat li a { color: var(--ink); text-decoration: none; }
.cat li a:hover { color: var(--atlantic); text-decoration: underline; }
.cat li span { color: var(--ink-3); white-space: nowrap; }
.ladder { display: flex; flex-direction: column; gap: 6px; }
.ladder div { display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: center; font-size: 13.5px; }
.ladder b { font-family: var(--serif); font-size: 20px; font-weight: 500; color: var(--atlantic); text-align: right; }
.node-panel ul { padding-left: 0; list-style: none; margin: 6px 0 0; }
.node-panel li { padding: 5px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }

/* CAPMF ------------------------------------------------------------------------------- */
.picker { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.picker .chip { cursor: pointer; }
.chip .x { color: var(--ink-3); margin-left: 2px; }
.suggest { position: relative; }
.suggest ul { position: absolute; z-index: 20; top: 100%; left: 0; right: 0; max-height: 280px; overflow: auto; margin: 2px 0 0; padding: 4px 0; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow); min-width: 360px; }
.suggest li { padding: 6px 10px; font-size: 13px; cursor: pointer; }
.suggest li:hover, .suggest li[aria-selected="true"] { background: var(--atlantic-soft); }
.suggest li small { color: var(--ink-3); margin-left: 6px; }

.empty { padding: 30px; text-align: center; color: var(--ink-2); }
.note { font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }
details.more summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--atlantic); }
details.more[open] summary { margin-bottom: 10px; }
.anchor-link { scroll-margin-top: 20px; }
.layer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .layer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .layer-grid { grid-template-columns: 1fr; } }

/* Small-screen fixes: let grid columns shrink so wide charts scroll inside their panel */
@media (max-width: 1150px) { .tl-layout { grid-template-columns: minmax(0, 1fr); } .snapshot { position: static; } }
@media (max-width: 1000px) { .split { grid-template-columns: minmax(0, 1fr); } }
input[type="search"] { min-width: min(230px, 100%); max-width: 100%; }
select { max-width: 100%; }
.seg { flex-wrap: wrap; }
.control { min-width: 0; max-width: 100%; }
@media (max-width: 620px) {
  .wrap { padding: 0 14px; }
  .tl-toolbar { padding: 12px; }
  .panel { padding: 14px; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { font-weight: 600; margin-top: 4px; }
  #heat { overflow-x: auto; }
}

/* Instruments guide */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dot-inline { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 0; }
.guide-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 32px; align-items: start; }
.toc { position: sticky; top: 16px; font-size: 14px; }
.toc-title { font-weight: 600; color: var(--ink-2); font-size: 13px; margin-bottom: 6px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a { display: block; padding: 5px 12px; color: var(--ink); text-decoration: none; }
.toc li a:hover { color: var(--atlantic); background: var(--surface); }
.instrument { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 0 0 var(--r-md) var(--r-md); padding: 22px 26px; margin-bottom: 26px; }
.instrument h2 { font-size: 26px; margin-bottom: 8px; }
.instrument h3 { font-family: var(--sans); font-size: 14px; font-weight: 700; margin: 16px 0 6px; color: var(--ink); }
.instrument p, .instrument li { font-size: 15px; line-height: 1.6; }
.instrument .lead-def { font-family: var(--serif); font-size: 19px; line-height: 1.5; color: var(--ink-2); max-width: 75ch; }
.instrument ul { padding-left: 18px; margin: 0; }
.pros-cons > div { background: var(--surface-2); border-radius: var(--r-sm); padding: 2px 16px 12px; }
.measure { border-left: 3px solid var(--c); padding: 2px 0 2px 14px; margin-top: 16px; }
.measure h3 { margin-top: 4px; }
.policy-list { list-style: none; padding: 0 !important; columns: 2; column-gap: 28px; }
.policy-list li { break-inside: avoid; padding: 5px 0; border-bottom: 1px solid var(--line-2); font-size: 14px !important; display: flex; justify-content: space-between; gap: 10px; }
.policy-list li span { color: var(--ink-3); white-space: nowrap; font-size: 13px; }
.refs { font-size: 13.5px; color: var(--ink-2); padding-left: 20px; }
.refs li { margin-bottom: 6px; font-size: 13.5px !important; }
@media (max-width: 900px) { .guide-layout { grid-template-columns: minmax(0, 1fr); } .toc { position: static; } .policy-list { columns: 1; } }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; align-items: start; }
.prose-block section { margin-bottom: 34px; max-width: 74ch; }
.prose-block h2 { font-size: 25px; margin-bottom: 10px; }
.prose-block h3 { font-family: var(--sans); font-size: 15px; font-weight: 700; margin: 16px 0 4px; }
.prose-block p, .prose-block li { font-size: 15.5px; line-height: 1.65; }
.prose-block ul { padding-left: 20px; }
.prose-block li { margin-bottom: 6px; }
.cite { border-top: 4px solid var(--atlantic); }
.cite-text { font-family: var(--serif); font-size: 16px; line-height: 1.5; }
@media (max-width: 1000px) { .about-grid { grid-template-columns: minmax(0, 1fr); } }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr; } }
.milestones { list-style: none; padding: 0; margin: 6px 0 0; border-left: 2px solid var(--line); }
.milestones li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 4px 0 4px 12px; font-size: 14px; position: relative; }
.milestones li::before { content: ""; position: absolute; left: -6px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--atlantic); }
.milestones b { font-family: var(--serif); font-weight: 600; color: var(--atlantic); }
.instrument-box { border-top: 4px solid var(--c); }
.instrument-box ul { padding-left: 18px; margin: 4px 0 10px; }
.formula-display { font-family: var(--serif); font-size: 26px; text-align: center; padding: 10px 0 14px; border-bottom: 1px solid var(--line-2); margin-bottom: 10px; }
.emis-line { font-size: 13px; background: var(--surface-2); padding: 5px 9px; border-radius: 3px; margin: -2px 0 10px !important; color: var(--ink) !important; }

/* Embedded in the INPACT dashboard (Policy Timeline tab) ----------------------- */
/* The host tab supplies the section navigation, so this app's header is hidden. */
html.embedded .site-head, html.embedded .skip { display: none; }
/* No CSV downloads inside the INPACT tab (they remain on the standalone /policy/ site). */
html.embedded .csv-link, html.embedded a[href*="/download/dataset/"] { display: none !important; }
html.embedded body { background: var(--bg); }
html.embedded main#main { padding-top: 22px; }
