/* ===========================================================================
   Theme — Report 2026-34, "Mapping the Interdependencies of
   Twenty-First-Century Risk"

   Aesthetic: the risk web. The masthead is the report's own finding drawn as
   string art: eighteen pressures as coloured nodes on a ring, joined through
   the centre by the income-controlled links that survive, line weight by
   strength (inline SVG data URI generated from the data), over a near-black
   field. Each domain keeps one colour throughout: environment green, economy
   amber, demography coral, technology sky, instability violet. Every h2 opens
   with a three-node glyph. Readex Pro for display, Be Vietnam Pro for prose,
   Share Tech Mono for figures.

   Loaded after report.css; report.js reads these tokens for chart colours,
   and charts.js reads the --d-* tokens so no hex lives in the script.
   =========================================================================== */

:root {
  --bg: #f5f5f7;
  --bg-card: #ffffff;
  --bg-accent: #ececf1;
  --bg-dark: #17171c;
  --bg-dark-2: #0f0f13;

  --text: #18181d;
  --text-secondary: #3b3b45;
  --text-muted: #6a6a77;
  --text-inverse: #f5f5f7;

  --primary: #23232c;
  --primary-light: #5146b8;
  --accent: #7c6cf0;
  --accent-light: #b8aefc;

  --border: #dcdce4;
  --border-light: #eaeaf0;
  --rule: #c8c8d3;

  /* domains */
  --d-env: #16a571;
  --d-econ: #d99a06;
  --d-demo: #e5486b;
  --d-tech: #1a92d0;
  --d-inst: #7c6cf0;
  --d-muted: #a7a7b3;
  --d-neg: #8a8a96;

  --chart-blue: #1a92d0;
  --chart-blue-light: #a3d3ee;
  --chart-gold: #d99a06;
  --chart-red: #e5486b;
  --chart-teal: #16a571;
  --chart-gray: #8f8f9b;
  --chart-orange: #ea7a2e;
  --chart-purple: #7c6cf0;

  --serif: "Readex Pro", -apple-system, BlinkMacSystemFont, "system-ui", sans-serif;
  --sans: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "system-ui", "Segoe UI", sans-serif;
  --mono: "Share Tech Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --web: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='360' viewBox='0 0 640 360'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M320 30 Q320 180 371 39' stroke='%2334d399' stroke-opacity='0.33' stroke-width='1.9'/%3E%3Cpath d='M320 30 Q320 180 190 105' stroke='%2334d399' stroke-opacity='0.37' stroke-width='2.1'/%3E%3Cpath d='M371 39 Q320 180 450 105' stroke='%2334d399' stroke-opacity='0.32' stroke-width='1.8'/%3E%3Cpath d='M371 39 Q320 180 416 295' stroke='%2334d399' stroke-opacity='0.32' stroke-width='1.9'/%3E%3Cpath d='M371 39 Q320 180 190 105' stroke='%2334d399' stroke-opacity='0.36' stroke-width='2.1'/%3E%3Cpath d='M416 65 Q320 180 320 330' stroke='%2334d399' stroke-opacity='0.35' stroke-width='2.0'/%3E%3Cpath d='M416 65 Q320 180 269 321' stroke='%2334d399' stroke-opacity='0.32' stroke-width='1.9'/%3E%3Cpath d='M450 105 Q320 180 416 295' stroke='%2334d399' stroke-opacity='0.43' stroke-width='2.4'/%3E%3Cpath d='M450 105 Q320 180 320 330' stroke='%2334d399' stroke-opacity='0.36' stroke-width='2.0'/%3E%3Cpath d='M450 105 Q320 180 224 295' stroke='%2334d399' stroke-opacity='0.36' stroke-width='2.1'/%3E%3Cpath d='M450 105 Q320 180 190 255' stroke='%2334d399' stroke-opacity='0.32' stroke-width='1.9'/%3E%3Cpath d='M450 105 Q320 180 190 105' stroke='%2334d399' stroke-opacity='0.53' stroke-width='2.9'/%3E%3Cpath d='M450 105 Q320 180 224 65' stroke='%2334d399' stroke-opacity='0.38' stroke-width='2.1'/%3E%3Cpath d='M468 154 Q320 180 224 65' stroke='%23fbbf24' stroke-opacity='0.30' stroke-width='1.8'/%3E%3Cpath d='M416 295 Q320 180 371 321' stroke='%23fbbf24' stroke-opacity='0.30' stroke-width='1.8'/%3E%3Cpath d='M416 295 Q320 180 320 330' stroke='%23fbbf24' stroke-opacity='0.45' stroke-width='2.5'/%3E%3Cpath d='M416 295 Q320 180 269 321' stroke='%23fbbf24' stroke-opacity='0.39' stroke-width='2.2'/%3E%3Cpath d='M416 295 Q320 180 224 295' stroke='%23fbbf24' stroke-opacity='0.40' stroke-width='2.3'/%3E%3Cpath d='M416 295 Q320 180 172 154' stroke='%23fbbf24' stroke-opacity='0.35' stroke-width='2.0'/%3E%3Cpath d='M416 295 Q320 180 190 105' stroke='%23fbbf24' stroke-opacity='0.41' stroke-width='2.3'/%3E%3Cpath d='M416 295 Q320 180 224 65' stroke='%23fbbf24' stroke-opacity='0.36' stroke-width='2.1'/%3E%3Cpath d='M371 321 Q320 180 320 330' stroke='%23fbbf24' stroke-opacity='0.36' stroke-width='2.0'/%3E%3Cpath d='M371 321 Q320 180 269 39' stroke='%23fbbf24' stroke-opacity='0.30' stroke-width='1.8'/%3E%3Cpath d='M320 330 Q320 180 269 321' stroke='%23fb7185' stroke-opacity='0.62' stroke-width='3.4'/%3E%3Cpath d='M320 330 Q320 180 224 295' stroke='%23fb7185' stroke-opacity='0.61' stroke-width='3.3'/%3E%3Cpath d='M320 330 Q320 180 172 154' stroke='%23fb7185' stroke-opacity='0.41' stroke-width='2.3'/%3E%3Cpath d='M320 330 Q320 180 190 105' stroke='%23fb7185' stroke-opacity='0.31' stroke-width='1.8'/%3E%3Cpath d='M269 321 Q320 180 224 295' stroke='%23fb7185' stroke-opacity='0.45' stroke-width='2.5'/%3E%3Cpath d='M269 321 Q320 180 172 154' stroke='%23fb7185' stroke-opacity='0.37' stroke-width='2.1'/%3E%3Cpath d='M224 295 Q320 180 172 154' stroke='%23fb7185' stroke-opacity='0.40' stroke-width='2.2'/%3E%3Cpath d='M224 295 Q320 180 190 105' stroke='%23fb7185' stroke-opacity='0.30' stroke-width='1.8'/%3E%3Cpath d='M224 295 Q320 180 269 39' stroke='%23fb7185' stroke-opacity='0.31' stroke-width='1.8'/%3E%3Cpath d='M190 255 Q320 180 190 105' stroke='%23fb7185' stroke-opacity='0.54' stroke-width='2.9'/%3E%3Cpath d='M190 255 Q320 180 224 65' stroke='%23fb7185' stroke-opacity='0.31' stroke-width='1.8'/%3E%3Cpath d='M172 206 Q320 180 172 154' stroke='%2338bdf8' stroke-opacity='0.37' stroke-width='2.1'/%3E%3Cpath d='M190 105 Q320 180 224 65' stroke='%23a78bfa' stroke-opacity='0.42' stroke-width='2.4'/%3E%3C/g%3E%3Ccircle cx='320' cy='30' r='7' fill='%2334d399' stroke='%2317171c' stroke-width='2'/%3E%3Ccircle cx='371' cy='39' r='7' fill='%2334d399' stroke='%2317171c' stroke-width='2'/%3E%3Ccircle cx='416' cy='65' r='7' fill='%2334d399' stroke='%2317171c' stroke-width='2'/%3E%3Ccircle cx='450' cy='105' r='7' fill='%2334d399' stroke='%2317171c' stroke-width='2'/%3E%3Ccircle cx='468' cy='154' r='7' fill='%23fbbf24' stroke='%2317171c' stroke-width='2'/%3E%3Ccircle cx='468' cy='206' r='7' fill='%23fbbf24' stroke='%2317171c' stroke-width='2'/%3E%3Ccircle cx='450' cy='255' r='7' fill='%23fbbf24' stroke='%2317171c' stroke-width='2'/%3E%3Ccircle cx='416' cy='295' r='7' fill='%23fbbf24' stroke='%2317171c' stroke-width='2'/%3E%3Ccircle cx='371' cy='321' r='7' fill='%23fbbf24' stroke='%2317171c' stroke-width='2'/%3E%3Ccircle cx='320' cy='330' r='7' fill='%23fb7185' stroke='%2317171c' stroke-width='2'/%3E%3Ccircle cx='269' cy='321' r='7' fill='%23fb7185' stroke='%2317171c' stroke-width='2'/%3E%3Ccircle cx='224' cy='295' r='7' fill='%23fb7185' stroke='%2317171c' stroke-width='2'/%3E%3Ccircle cx='190' cy='255' r='7' fill='%23fb7185' stroke='%2317171c' stroke-width='2'/%3E%3Ccircle cx='172' cy='206' r='7' fill='%2338bdf8' stroke='%2317171c' stroke-width='2'/%3E%3Ccircle cx='172' cy='154' r='7' fill='%2338bdf8' stroke='%2317171c' stroke-width='2'/%3E%3Ccircle cx='190' cy='105' r='7' fill='%23a78bfa' stroke='%2317171c' stroke-width='2'/%3E%3Ccircle cx='224' cy='65' r='7' fill='%23a78bfa' stroke='%2317171c' stroke-width='2'/%3E%3Ccircle cx='269' cy='39' r='7' fill='%23a78bfa' stroke='%2317171c' stroke-width='2'/%3E%3Ccircle cx='320' cy='180' r='168' fill='none' stroke='%23ffffff' stroke-opacity='0.08' stroke-width='1'/%3E%3C/svg%3E");
  --domains: linear-gradient(90deg, var(--d-env) 0 20%, var(--d-econ) 20% 40%, var(--d-demo) 40% 60%, var(--d-tech) 60% 80%, var(--d-inst) 80% 100%);

  --max-width: 1200px;
}

body { font-size: 1.01rem; line-height: 1.66; }

::selection { background: rgba(124, 108, 240, 0.2); }
:where(a, button, [tabindex], input, select):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

a { color: var(--primary-light); }
a:hover { color: var(--d-demo); }

.progress__bar { background: var(--domains); }
.skip-link { background: var(--primary); }

/* --- masthead: the risk web --------------------------------------------------- */

.masthead {
  position: relative;
  color: var(--text-inverse);
  border-bottom: 0;
  padding: 3.3rem var(--gutter) 3.2rem;
  background:
    var(--web) right -10px center / 600px auto no-repeat,
    radial-gradient(ellipse at 78% 50%, rgba(124, 108, 240, 0.22), transparent 60%),
    linear-gradient(160deg, #1f1f27, #0f0f13);
}
.masthead::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--domains); }
.masthead .overline { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.14em; color: var(--accent-light); margin-bottom: 1rem; }
.masthead .overline::before { content: "⋰ NETWORK DASHBOARD · "; color: #fff; }
.masthead h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(2rem, 4.8vw, 3.3rem); line-height: 1.06; letter-spacing: -0.02em; max-width: 20ch; color: #fff; }
.masthead .subtitle { color: #d0d0dc; font-weight: 400; max-width: 58ch; }
.masthead .strapline { font-family: var(--sans); font-style: normal; font-size: 1.02rem; color: #e6e6ee; border-left: 3px solid var(--accent); max-width: 70ch; }
.masthead .meta-row { border-top: 1px solid rgba(255, 255, 255, 0.14); color: #b4b4c2; font-family: var(--mono); font-size: 0.78rem; }
.masthead .meta-row strong { color: var(--accent-light); font-family: var(--mono); font-weight: 400; font-size: 0.68rem; letter-spacing: 0.12em; }

/* --- nav --------------------------------------------------------------------- */

.sticky-nav { background: rgba(245, 245, 247, 0.96); border-bottom: 1px solid var(--border); }
.nav-inner a { color: var(--text-muted); font-family: var(--mono); font-size: 0.76rem; }
.nav-inner a:hover { color: var(--text); }
.nav-inner a.is-active { color: var(--primary); border-bottom-color: var(--accent); }

/* --- headings with a three-node glyph ------------------------------------------- */

section > h2 {
  position: relative;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.2vw, 2.05rem);
  letter-spacing: -0.015em;
  color: var(--primary);
  border-bottom: 1px solid var(--rule);
  padding: 0 0 0.7rem 2.4rem;
}
section > h2::before {
  content: "";
  position: absolute; left: 0; top: 0.1em;
  width: 1.7rem; height: 1.25rem;
  background:
    radial-gradient(circle at 15% 80%, var(--d-env) 0 3.2px, transparent 3.6px),
    radial-gradient(circle at 50% 18%, var(--d-demo) 0 3.2px, transparent 3.6px),
    radial-gradient(circle at 86% 78%, var(--d-inst) 0 3.2px, transparent 3.6px),
    linear-gradient(64deg, transparent 47%, var(--rule) 47% 53%, transparent 53%) 0 0 / 50% 100% no-repeat,
    linear-gradient(-64deg, transparent 47%, var(--rule) 47% 53%, transparent 53%) 100% 0 / 50% 100% no-repeat,
    linear-gradient(var(--rule), var(--rule)) 15% 80% / 72% 1.5px no-repeat;
}
.abstract h2, .endmatter h2 { padding-left: 0; border-bottom: 0; }
.abstract h2::before, .endmatter h2::before { content: none; }
section > .section-dek { color: var(--text-muted); font-size: 1.06rem; max-width: none; font-style: normal; }

.section-rule { border-top: 1px solid var(--border-light); margin: 2.6rem 0 2.8rem; }

/* --- generated blocks ------------------------------------------------------------ */

.abstract { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; position: relative; overflow: hidden; }
.abstract::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--domains); }
.abstract h2 { color: var(--primary); font-family: var(--mono); letter-spacing: 0.14em; }
.endmatter .kw { background: var(--bg-accent); border-color: var(--border); font-family: var(--mono); font-size: 0.72rem; }
.endmatter dt { font-family: var(--mono); font-size: 0.68rem; }

/* --- KPI board ------------------------------------------------------------------------ */

.kpi-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 1.6rem 0; }
.kpi { position: relative; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.05rem 0.85rem; display: flex; flex-direction: column; min-width: 0; }
.kpi::before { content: ""; position: absolute; right: 14px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--k, var(--accent)); box-shadow: -14px 8px 0 -2px var(--k2, var(--d-muted)); }
.kpi--env { --k: var(--d-env); }
.kpi--econ { --k: var(--d-econ); }
.kpi--demo { --k: var(--d-demo); }
.kpi--tech { --k: var(--d-tech); }
.kpi--inst { --k: var(--d-inst); }
.kpi-value { font-family: var(--serif); font-weight: 700; font-size: clamp(1.5rem, 2.8vw, 2.05rem); letter-spacing: -0.02em; line-height: 1.05; color: var(--text); font-variant-numeric: tabular-nums; }
.kpi-label { font-size: 0.86rem; line-height: 1.42; color: var(--text-secondary); margin-top: 0.45rem; flex: 1; }
.kpi-source { font-family: var(--mono); font-size: 0.66rem; color: var(--text-muted); margin-top: 0.6rem; border-top: 1px solid var(--border-light); padding-top: 0.4rem; }

/* --- readout ------------------------------------------------------------------------- */

.readout { background: var(--bg-dark); border-radius: 14px; padding: 1.15rem 1.4rem 0.45rem; margin: 1.6rem 0; position: relative; overflow: hidden; }
.readout::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--domains); }
.readout-title { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-light); margin: 0.2rem 0 0.4rem !important; }
.readout p { color: #dcdce6; text-align: justify; hyphens: auto; -webkit-hyphens: auto; position: relative; }
.readout strong { color: #fff; }

/* --- panels ---------------------------------------------------------------------------- */

.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 1.2rem 0; }
.panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 1.05rem 1.15rem 0.95rem; min-width: 0; }
.panel--wide { grid-column: 1 / -1; }
.panel--hero { margin: 1.2rem 0; padding: 1.15rem 1.25rem 1.05rem; }
.panel-head { border-bottom: 1px solid var(--border-light); margin-bottom: 0.75rem; padding-bottom: 0.55rem; }
.panel-title { font-family: var(--serif); font-weight: 600; font-size: 1.04rem; color: var(--text); margin: 0 !important; }
.panel-meta { font-family: var(--mono); font-size: 0.7rem; color: var(--text-muted); margin: 0.2rem 0 0.4rem !important; }
.panel-note { font-size: 0.86rem; line-height: 1.5; color: var(--text-muted); margin: 0.6rem 0 0 !important; text-align: left !important; }
.panel canvas { max-width: 100%; }
.panel .chart-frame { height: 320px; }
.panel .chart-frame--tall { height: 420px; }

.stat-tile { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 0.85rem 1rem; border-top: 4px solid var(--k, var(--accent)); }
.stat-tile--env { --k: var(--d-env); }
.stat-tile--econ { --k: var(--d-econ); }
.stat-tile--demo { --k: var(--d-demo); }
.stat-tile--tech { --k: var(--d-tech); }
.stat-tile--inst { --k: var(--d-inst); }
.stat-tile-value { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; color: var(--text); margin: 0 !important; font-variant-numeric: tabular-nums; }
.stat-tile-label { font-size: 0.83rem; color: var(--text-muted); margin: 0.15rem 0 0 !important; text-align: left !important; line-height: 1.42; }
.tile-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 1rem 0; }

/* --- the network ------------------------------------------------------------------------- */

.web-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.netwrap { background: var(--bg-dark); border-radius: 14px; padding: 6px; }
.net { display: block; width: 100%; height: auto; }
.net .edge { fill: none; stroke-linecap: round; transition: opacity 0.2s; }
.net .edge.neg { stroke-dasharray: 4 4; }
.net.has-focus .edge { opacity: 0.06; }
.net.has-focus .edge.is-on { opacity: 1; }
.net .node circle { stroke: #17171c; stroke-width: 2.5; cursor: pointer; transition: r 0.15s; }
.net .node text { font-family: var(--sans); font-size: 11px; fill: #e6e6ee; pointer-events: none; }
.net.has-focus .node { opacity: 0.35; }
.net.has-focus .node.is-on { opacity: 1; }
.net .node.is-focus circle { stroke: #fff; stroke-width: 3; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0.6rem 0 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.72rem; color: var(--text-secondary); }
.legend i { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.node-card { border: 1px solid var(--border); border-radius: 12px; background: var(--bg); padding: 0.85rem 0.95rem; border-left: 6px solid var(--nc, var(--rule)); min-height: 260px; }
.node-card .nc-kicker { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin: 0 !important; }
.node-card h3 { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: var(--primary); margin: 0.1rem 0 0.3rem; }
.node-card p { font-size: 0.86rem; margin: 0 0 0.5rem !important; text-align: left !important; color: var(--text-secondary); }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 0.22rem 0; border-bottom: 1px solid var(--border-light); font-size: 0.86rem; }
.link-list li i { width: 9px; height: 9px; border-radius: 50%; }
.link-list li b { font-family: var(--mono); font-weight: 400; font-size: 0.8rem; }

/* --- heatmap ----------------------------------------------------------------------------- */

.heat-wrap { overflow-x: auto; }
.heat { border-collapse: separate; border-spacing: 2px; font-family: var(--mono); font-size: 0.7rem; margin: 0 auto; }
.heat th { font-weight: 400; color: var(--text-secondary); padding: 2px 6px; white-space: nowrap; }
.heat thead th { writing-mode: vertical-rl; transform: rotate(180deg); text-align: left; height: 190px; vertical-align: bottom; }
.heat tbody th { text-align: right; }
.heat td { width: 30px; height: 26px; text-align: center; border-radius: 4px; color: var(--text); }
.heat td.dg { background: var(--bg-accent); }
.heat th .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 5px; }

/* --- controls ---------------------------------------------------------------------------- */

.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 22px; margin-bottom: 1rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--border-light); }
.slider { display: grid; gap: 3px; }
.slider-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.slider label, .seg-wrap .seg-label { font-family: var(--serif); font-weight: 600; font-size: 0.92rem; color: var(--text); }
.slider output { font-family: var(--mono); font-size: 0.84rem; color: var(--accent); white-space: nowrap; }
.slider .hint { font-size: 0.8rem; line-height: 1.35; color: var(--text-muted); margin: 0 !important; text-align: left !important; }
.slider input[type="range"] { width: 100%; accent-color: var(--accent); margin: 2px 0; }
.seg-wrap { display: grid; gap: 5px; }
.segmented { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; background: var(--bg-card); width: fit-content; max-width: 100%; }
.segmented button { font: inherit; font-family: var(--mono); font-size: 0.76rem; padding: 0.42rem 0.8rem; border: 0; background: transparent; color: var(--text-secondary); cursor: pointer; }
.segmented button + button { border-left: 1px solid var(--rule); }
.segmented button.is-on { background: var(--primary); color: #fff; }
.calc-note { font-family: var(--mono); font-size: 0.76rem; color: var(--text-muted); margin: 0.6rem 0 0 !important; }

/* --- map -------------------------------------------------------------------------------- */

.atlas-layout { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.atlas-wrap { position: relative; border-radius: 12px; overflow: hidden; background: #e9e9ef; border: 1px solid var(--border); }
.atlas { display: block; width: 100%; height: auto; }
.atlas .atlas-sea { fill: #e9e9ef; }
.atlas .atlas-land path { fill: #d6d6de; stroke: #fff; stroke-width: 0.45; stroke-linejoin: round; transition: fill 0.25s; }
.atlas .atlas-dots circle { fill: #d6d6de; stroke: var(--text); stroke-width: 0.5; }
.atlas [data-iso].is-in { cursor: pointer; }
.atlas [data-iso].is-in:hover { stroke: var(--text); stroke-width: 1.3; }
.atlas [data-iso].is-pick { stroke: var(--text); stroke-width: 2; }
.atlas-corner { position: absolute; left: 10px; bottom: 8px; font-family: var(--mono); font-size: 0.64rem; color: var(--text-muted); background: rgba(255, 255, 255, 0.85); padding: 1px 6px; border-radius: 4px; }
.country-card { border: 1px solid var(--border); border-radius: 12px; background: var(--bg); padding: 0.85rem 0.95rem; min-height: 240px; }
.country-card .cc-kicker { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin: 0 !important; }
.country-card h3 { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: var(--primary); margin: 0.1rem 0 0.2rem; }
.country-card .cc-class { font-family: var(--mono); font-size: 0.74rem; margin: 0 0 0.6rem !important; color: var(--text-secondary); text-align: left !important; }
.dimbars { display: grid; gap: 6px; }
.dimbar { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 2.4rem; gap: 8px; align-items: center; font-size: 0.83rem; color: var(--text-secondary); }
.dimbar b { font-family: var(--mono); font-weight: 400; font-size: 0.78rem; text-align: right; color: var(--text); }
.dimbar .track { height: 9px; background: var(--bg-accent); border-radius: 5px; position: relative; overflow: hidden; }
.dimbar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--k); border-radius: 5px; }
.dimbar .tick { position: absolute; top: -2px; bottom: -2px; left: 66.7%; width: 2px; background: var(--text); opacity: 0.4; }
.side-title { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 0.35rem !important; }

/* --- clusters & pathways ------------------------------------------------------------------ */

.cluster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin: 1rem 0; }
.cluster { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); padding: 0.8rem 0.9rem; }
.cluster .cl-nodes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 0.4rem; }
.cluster .cl-nodes span { font-size: 0.8rem; padding: 0.12rem 0.55rem; border-radius: 999px; color: #fff; background: var(--k); }
.cluster b { font-family: var(--mono); font-weight: 400; font-size: 0.78rem; color: var(--text-muted); }
.table-scroll { overflow-x: auto; }
.paths { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 0.91rem; }
.paths th, .paths td { text-align: left; vertical-align: top; padding: 0.6rem 0.65rem; border-bottom: 1px solid var(--border-light); }
.paths thead th { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); font-weight: 400; border-bottom: 2px solid var(--text); }
.paths tbody th { font-family: var(--serif); font-weight: 600; color: var(--text); }
.paths td { color: var(--text-secondary); }
.paths .dom { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; }

/* --- references, footer --------------------------------------------------------------------- */

.ref-list .ref-org { font-family: var(--mono); color: var(--primary-light); font-size: 0.7rem; }
.report-footer { border-top: 0; position: relative; padding-top: calc(3rem + 6px); }
.report-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--domains); }
.footer-inner h3 { color: #fff; font-family: var(--serif); font-weight: 700; }
.footer-inner a { color: var(--accent-light); }
.cite-box { border-left-color: var(--accent); }

/* --- responsive ------------------------------------------------------------------------------ */

@media (max-width: 1000px) {
  .kpi-board, .tile-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .web-layout, .atlas-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .masthead { padding-top: 2.2rem; background: var(--web) right -300px top -20px / 520px auto no-repeat, linear-gradient(160deg, #1f1f27, #0f0f13); }
  .segmented button { padding: 0.38rem 0.55rem; font-size: 0.7rem; }
}
@media (max-width: 420px) {
  .kpi-board, .tile-row { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .controls { display: none; }
  .masthead, .masthead::after, .readout, .report-footer::before, .netwrap { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
