/* Home page macro views (countries, entities, matrix, years, flows, institutions). Script: home-macro.js */
#macro-facts{grid-template-columns:repeat(4,minmax(0,1fr))}
#macro-facts .macro-facts-note{grid-column:1/-1;margin:0;background:var(--ds-surface);padding:8px 18px;font-size:var(--ds-fs-caption);color:var(--muted)}
@media(max-width:900px){#macro-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){#macro-facts{grid-template-columns:minmax(0,1fr)}}
.macro-bar{display:flex;flex-wrap:wrap;gap:10px 22px;align-items:center;margin:0 0 12px}
.macro-toggle{display:inline-flex;flex-wrap:wrap;gap:6px}
.macro-btn{min-height:38px;border:1px solid #8aa19b;background:var(--ds-surface);border-radius:999px;padding:4px 15px;font:inherit;font-size:var(--ds-fs-control);color:var(--ink);cursor:pointer}
.macro-btn:hover{background:#e3ecee}
.macro-btn[aria-pressed=true]{background:var(--night);border-color:var(--night);color:var(--ds-action-text)}
.macro-btn:focus-visible,.macro-row:focus-visible,.macro-matrix a:focus-visible{outline:3px solid var(--ds-link);outline-offset:2px}
.macro-card{position:relative;background:var(--ds-surface);border:1px solid var(--line);border-radius:16px;padding:14px;min-width:0}
.macro-card.eu-map{background:linear-gradient(180deg,var(--ds-surface-soft),var(--ds-surface-soft));margin:0}
.macro-card svg{display:block;width:100%;height:auto}
.macro-card h3{margin:0 0 10px;font-size:var(--ds-fs-body)}
.macro-grid{display:grid;gap:16px;align-items:start}
@media(min-width:980px){.macro-grid--map{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr)}}
.macro-legend{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin-top:8px;font-size:var(--ds-fs-small);color:var(--muted)}
.macro-grad{display:inline-block;width:140px;height:11px;border-radius:6px;border:1px solid #10232c33}
.macro-hatch-key{margin-left:auto}
.macro-rank{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.macro-row{display:grid;grid-template-columns:22px minmax(90px,1.1fr) minmax(60px,1.4fr) auto;align-items:center;gap:10px;min-height:34px;padding:2px 8px;border-radius:8px;color:var(--ink);text-decoration:none;font-size:var(--ds-fs-control)}
.macro-row--inst{cursor:default;grid-template-columns:22px minmax(170px,2.2fr) minmax(40px,.7fr) auto}
.macro-row--entity{grid-template-columns:12px minmax(110px,1.3fr) minmax(90px,.9fr) minmax(60px,1fr) auto}
.macro-row:hover,.macro-rank li.is-hot .macro-row{background:#e3ecee}
.macro-name{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.macro-years{font-size:var(--ds-fs-caption);color:var(--muted);white-space:nowrap}
.macro-track{height:10px;background:var(--ds-surface-soft);border-radius:5px;overflow:hidden}.macro-track i{display:block;height:100%;border-radius:5px}
.macro-val{font-variant-numeric:tabular-nums;font-size:var(--ds-fs-small);color:var(--muted);text-align:right;white-space:nowrap}
.macro-flag{width:22px;height:15px;object-fit:cover;border-radius:2px;border:1px solid #16273822}
.macro-dot{display:inline-block;width:11px;height:11px;border-radius:50%}
.macro-note{font-size:var(--ds-fs-small);color:var(--muted);margin:12px 0 0;max-width:80ch}
.macro-readout{min-height:1.6em;margin:8px 4px 0;font-size:var(--ds-fs-control);font-weight:700}
.macro-key{display:flex;flex-wrap:wrap;gap:6px 16px;list-style:none;margin:10px 2px 0;padding:0;font-size:var(--ds-fs-small);color:var(--muted)}
.macro-key li{display:inline-flex;align-items:center;gap:6px}.macro-key i{display:inline-block;width:12px;height:12px;border-radius:3px}
.macro-tm{outline:none}.macro-tm:hover rect{stroke:var(--ds-ink);stroke-width:1.6}
.macro-tm-head{font:700 11px system-ui,sans-serif;fill:var(--ds-ink)}
.macro-tm-label{font:700 11px system-ui,sans-serif;fill:var(--ds-action-text);pointer-events:none}
.macro-tm-sub{font:11px system-ui,sans-serif;fill:#ffffffdd;pointer-events:none}
.macro-axis{font:11px system-ui,sans-serif;fill:var(--ds-muted)}
.macro-flow-label{font:12px system-ui,sans-serif;fill:var(--ds-ink);pointer-events:none}
.macro-sliders{display:flex;flex-wrap:wrap;gap:8px 28px;margin:0 0 10px;font-size:var(--ds-fs-control)}
.macro-sliders label{display:inline-flex;align-items:center;gap:10px}.macro-sliders input{width:min(320px,60vw)}.macro-sliders output{min-width:3.2em;font-weight:700;font-variant-numeric:tabular-nums}
.macro-scroll{overflow-x:auto}
.macro-matrix{border-collapse:separate;border-spacing:2px;width:100%;min-width:640px;font-size:var(--ds-fs-small)}
.macro-matrix caption{caption-side:top;text-align:left;font-size:var(--ds-fs-small);color:var(--muted);padding:0 0 8px}
.macro-matrix th{font-weight:700;text-align:left;padding:6px 8px;background:var(--ds-surface-soft);border-radius:6px;font-size:var(--ds-fs-caption)}
.macro-matrix thead th{text-align:center}
.macro-matrix tbody th a{display:flex;align-items:center;gap:8px;color:var(--ink);text-decoration:none;font-size:var(--ds-fs-small)}
.macro-matrix td{text-align:center;padding:7px 4px;border-radius:6px;font-variant-numeric:tabular-nums}
.macro-source{margin:14px 2px 0;font-size:var(--ds-fs-caption);line-height:1.5;color:var(--muted);max-width:110ch}
.macro-source__scope{color:var(--ink);font-size:var(--ds-fs-label);letter-spacing:.06em;text-transform:uppercase}
.macro-source a,.macro-note a{color:var(--ds-link)}
#macro-countries-section details,#macro-entities-section details,#macro-matrix-section details,#macro-time-section details,#macro-flows-section details,#macro-institutions-section details{margin:6px 2px 0;font-size:var(--ds-fs-caption);color:var(--muted)}
#macro-countries-section details summary,#macro-entities-section details summary,#macro-matrix-section details summary,#macro-time-section details summary,#macro-flows-section details summary,#macro-institutions-section details summary{cursor:pointer;font-weight:700;color:var(--ink)}
#macro-countries-section details ul,#macro-entities-section details ul,#macro-matrix-section details ul,#macro-time-section details ul,#macro-flows-section details ul{margin:6px 0 0;padding-left:18px}
.macro-error{padding:24px;color:#a21942}
@media(max-width:640px){.macro-row--inst{grid-template-columns:22px minmax(90px,1.4fr) minmax(30px,.5fr) auto}.macro-row{grid-template-columns:22px minmax(80px,1fr) minmax(40px,.8fr) auto;gap:8px}.macro-row--entity{grid-template-columns:12px minmax(80px,1fr) minmax(40px,.7fr) auto}.macro-row--entity .macro-years{display:none}.macro-hatch-key{margin-left:0}}
@media(prefers-reduced-motion:reduce){.eu-c path{transition:none}}
@media(max-width:640px){.macro-row.macro-row--inst{grid-template-columns:22px minmax(90px,1.4fr) minmax(30px,.5fr) auto}}
@media(min-width:980px){.macro-grid--inst{grid-template-columns:minmax(0,1.7fr) minmax(0,1fr)}.macro-sticky{position:sticky;top:84px}}
.macro-more{margin:16px 0 0}.macro-btn--link{display:inline-flex;align-items:center;text-decoration:none;background:var(--night);border-color:var(--night);color:var(--ds-action-text);font-weight:700}.macro-btn--link:hover{background:#12414f}
.macro-grid--inst .macro-row--inst{min-height:30px}
.hero h1{font-size:clamp(40px,5.6vw,80px)}
.macro-panel-intro{margin:0 0 12px;font-size:var(--ds-fs-body);max-width:70ch}
#macro-tabs{margin-bottom:18px;padding:10px 14px;border:1px solid var(--line);background:var(--ds-surface-soft);gap:10px 26px;align-items:center}
#macro-tabs .macro-ctl{width:auto;padding:0}
#macro-tabs .macro-toggle{gap:0}
#macro-tabs .macro-btn{min-height:40px;padding:4px 16px;font-weight:700;font-size:var(--ds-fs-control)}
/* sweep through history */
.hs-card{background:#071c27;border:1px solid #12303d;border-radius:18px;padding:14px 14px 12px}
.hs-card svg{display:block;width:100%;max-width:800px;height:auto;margin:0 auto}
.hs-ctrl{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:center;margin:0 0 10px}.hs-ctrl input{width:min(420px,62vw)}.hs-ctrl output{min-width:5em;font-weight:700;color:#e6f1ef;font-variant-numeric:tabular-nums}
.hs-btn{min-height:40px;border:1px solid #d8ed70;background:#d8ed70;color:var(--ds-ink);border-radius:999px;padding:4px 20px;font:inherit;font-weight:700;cursor:pointer}.hs-btn:focus-visible,.hs-ctrl input:focus-visible{outline:3px solid #7fe0ee;outline-offset:2px}
.hs-tick{font:11px system-ui,sans-serif;fill:#a9c3c6}.hs-big{font:700 40px Georgia,serif;fill:#e9f6f7}
.hs-read{min-height:1.5em;margin:8px 4px 0;font-size:var(--ds-fs-control);font-weight:700;color:#e6f1ef}
.hs-source{margin:14px 2px 0;font-size:var(--ds-fs-caption);line-height:1.5;color:var(--muted);max-width:110ch}.hs-source a{color:var(--ds-link)}.hs-error{padding:24px;color:#a21942}
/* About page */
.about-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:18px;margin:8px 0 28px}
.about-card{background:var(--ds-surface);border:1px solid var(--line);border-radius:16px;padding:20px 22px}.about-card h2{margin:0 0 8px;font-size:var(--ds-fs-h3)}.about-card p{margin:0 0 10px;color:var(--muted);max-width:70ch}
.about-h{font-size:clamp(24px,3vw,34px);margin:30px 0 12px;letter-spacing:-.02em}
.about-goals{list-style:none;counter-reset:g;margin:0;padding:0;display:grid;gap:10px;max-width:900px}
.about-goals li{counter-increment:g;display:grid;grid-template-columns:34px 150px minmax(0,1fr);gap:12px;align-items:baseline;background:var(--ds-surface);border:1px solid var(--line);border-radius:12px;padding:12px 16px}
.about-goals li::before{content:counter(g);font:700 13px ui-monospace,monospace;color:var(--ds-link);background:#e3f3f5;border-radius:6px;padding:2px 0;text-align:center}
.about-goals b{font-size:var(--ds-fs-body)}.about-goals span{color:var(--muted)}
.about-lead{max-width:80ch}
@media(max-width:640px){.about-goals li{grid-template-columns:30px minmax(0,1fr)}.about-goals span{grid-column:2}}
/* Home: coverage, constellation, two clocks (home-discover.js) */
.hd-card{background:var(--ds-surface);border:1px solid var(--line);border-radius:16px;padding:14px;min-width:0}
.hd-card svg{display:block;width:100%;height:auto}.hd-card .am-svg{aspect-ratio:1.55;min-height:0;border:0}
.hd-paper{background:var(--ds-surface-soft);border-color:var(--ds-line)}
.hd-night{background:var(--am-sea,#071c27);border-color:#12303d;color:#e6f1ef}.hd-night .hd-read{color:#e6f1ef}.hd-night .hd-keyline{color:#a9c3c6}
.hd-canvas{display:block;width:100%;height:auto;border-radius:12px}
.hd-counter{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 14px}
.hd-count{background:var(--ds-surface);border:1px solid var(--line);border-left:4px solid var(--ds-cyan);border-radius:12px;padding:12px 16px}.hd-count--n{border-left-color:var(--ds-sun)}.hd-count--u{border-left-color:#8a9a96;border-left-style:dashed}
.hd-count b{display:block;font:400 clamp(28px,3.4vw,46px) Georgia,serif;line-height:1}.hd-count span{display:block;font-size:var(--ds-fs-small);color:var(--muted);margin-top:4px}
@media(max-width:640px){.hd-counter{grid-template-columns:minmax(0,1fr)}}
.hd-cover-grid{display:grid;gap:16px;align-items:start}@media(min-width:980px){.hd-cover-grid{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr)}}
.hd-q{font-family:Georgia,serif;font-weight:700;fill:#4a6b7a;pointer-events:none}
.hd-read{min-height:1.5em;margin:8px 2px 0;font-size:var(--ds-fs-control);font-weight:700}
.hd-key{display:flex;flex-wrap:wrap;gap:6px 16px;list-style:none;margin:10px 0 0;padding:0;font-size:var(--ds-fs-small);color:var(--muted)}.hd-key li{display:inline-flex;align-items:center;gap:6px}.hd-key i{display:inline-block;width:12px;height:12px;border-radius:3px;border:1px solid #10232c33}.hd-key--d{color:#a9c3c6}
.hd-keyline{font-size:var(--ds-fs-caption);color:var(--muted);margin:8px 2px 0;max-width:110ch;line-height:1.5}
.hd-star-label{font-family:system-ui,sans-serif;font-weight:700;fill:#d8f4f7;stroke:#071c27;opacity:.85;pointer-events:none}
.hd-note{font-size:var(--ds-fs-small);color:var(--muted);margin:0 0 8px}.hd-h3{margin-top:18px}.hd-card h3{margin:0 0 6px;font-size:var(--ds-fs-body)}
.hd-chips{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:6px 0 0;padding:0}.hd-chips li{border:1px solid var(--line);border-radius:999px;padding:3px 11px;font-size:var(--ds-fs-small);background:var(--ds-paper)}
.hd-source{margin:14px 2px 0;font-size:var(--ds-fs-caption);line-height:1.5;color:var(--muted);max-width:110ch}.hd-source a{color:var(--ds-link)}
#home-cover-section details,#home-constellation-section details,#home-clocks-section details{margin:6px 2px 0;font-size:var(--ds-fs-caption);color:var(--muted)}#home-cover-section summary,#home-constellation-section summary,#home-clocks-section summary{cursor:pointer;font-weight:700;color:var(--ink)}
.hd-error{padding:24px;color:#a21942}
.about-steps{margin:8px 0 0;padding-left:20px;display:grid;gap:8px;color:var(--muted)}.about-steps b{color:var(--ink)}
.about-card--limit{border-left:4px solid var(--ds-sun)}.about-card--limit b{color:var(--ink)}
.scope-note{margin:8px 0 0;max-width:78ch;font-size:var(--ds-fs-small);line-height:1.5;color:var(--muted);border-left:3px solid var(--ds-sun);padding-left:10px}
.about-status{font-style:normal;font-size:var(--ds-fs-label);font-weight:800;letter-spacing:.06em;text-transform:uppercase;padding:2px 8px;margin-right:8px;border:1px solid}
.about-status--in-place{color:#1d6b43;border-color:#8dc5a3;background:var(--ds-surface-soft)}.about-status--partial{color:#8a6a12;border-color:#e0c06a;background:#fbf3dc}.about-status--next{color:var(--ds-muted);border-color:var(--ds-line);background:var(--ds-surface-soft)}
.alias-shared{color:var(--muted)}
/* focus bar */
.home-focus{position:sticky;top:64px;z-index:20;background:rgba(247,248,243,.96);border-bottom:1px solid var(--line);backdrop-filter:blur(8px)}
.hf-inner{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;padding-block:8px!important;font-size:var(--ds-fs-control)}
.hf-inner select{font:inherit;min-height:36px;border:1px solid #8aa19b;padding:2px 10px;background:var(--ds-surface);max-width:100%}
.hf-inner select:focus-visible{outline:3px solid var(--ds-link);outline-offset:2px}.hf-status{color:var(--muted);font-size:var(--ds-fs-small)}
.macro-focus{margin:0 0 10px;font-size:var(--ds-fs-control);font-weight:700;border-left:3px solid var(--ds-violet);padding-left:10px}
.macro-rank li.is-focus .macro-row{background:#e3f0f7;outline:2px solid var(--ds-violet);outline-offset:-2px}.macro-matrix tr.is-focus th,.macro-matrix tr.is-focus td{outline:2px solid var(--ds-violet);outline-offset:-2px}
@media(max-width:640px){.home-focus{top:64px}.hf-status{display:none}}
/* Atlas now moves directly from its hero into the first instrument; there is
   no chapter strip between them, so it needs no inherited section divider. */
#macro-countries-section{border-top:0}
/* compare */
.hc-bar{align-items:center}.hc-pick{display:inline-flex;align-items:center;gap:8px;font-weight:700;font-size:var(--ds-fs-control)}.hc-pick select{font:inherit;min-height:38px;border:1px solid #8aa19b;padding:2px 10px;background:var(--ds-surface)}.hc-pick select:focus-visible{outline:3px solid var(--ds-link);outline-offset:2px}
.hc-sw{display:inline-block;width:12px;height:12px;margin-right:6px;vertical-align:-1px}
.hc-grid{display:grid;gap:16px}@media(min-width:980px){.hc-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.hc-card{background:var(--ds-surface);border:1px solid var(--line);padding:16px;min-width:0}.hc-card h3{margin:0 0 10px}.hc-card h4{margin:12px 0 6px;font-size:var(--ds-fs-body)}
.hc-facts{width:100%;border-collapse:collapse;font-size:var(--ds-fs-control)}.hc-facts th,.hc-facts td{padding:6px 8px;border-bottom:1px solid var(--line);text-align:left}.hc-facts td{font-variant-numeric:tabular-nums}.hc-facts thead th{font-size:var(--ds-fs-small)}
.hc-overlap{margin:12px 0 0;font-weight:800;font-size:var(--ds-fs-body)}
.hc-back{width:100%;border-collapse:collapse;font-size:var(--ds-fs-small)}.hc-back th{width:26%;text-align:center;font-weight:700;padding:4px 6px}.hc-back td{padding:3px 0;width:37%}
.hc-back .hc-l{text-align:right}.hc-back .hc-l i,.hc-back .hc-r i{display:inline-block;height:14px;vertical-align:middle}.hc-back span{display:inline-block;min-width:36px;font-variant-numeric:tabular-nums;color:var(--muted);padding:0 4px}
.hc-tops{display:grid;grid-template-columns:1fr 1fr;gap:12px}.hc-tops h3,.hc-tops>.macro-note{grid-column:1/-1}.hc-tops ol{margin:0;padding-left:20px;font-size:var(--ds-fs-small)}.hc-tops li{margin:3px 0}.hc-tops li span{display:block;color:var(--muted);font-size:var(--ds-fs-caption)}.hc-tops li.hc-both{border-bottom:2px solid var(--ds-cyan);display:list-item}
.hc-back td{white-space:nowrap}.hc-back .hc-l i,.hc-back .hc-r i{max-width:calc(100% - 44px)}
.about-limits{margin:8px 0 14px;padding-left:20px;display:grid;gap:10px;max-width:75ch;line-height:1.5}
.about-body .hd-cover-grid{grid-template-columns:minmax(0,1fr)}
.hd-birth{margin:12px 0 0}.hd-birth .am-clock{margin-top:10px}

/* Atlas review (October 2026) */
/* the "night" cards are dark whatever the map template says: --am-sea is a light colour in the atlas template, which made their light text unreadable */
.hd-night{background:var(--ds-night);border-color:#12303d}
/* a fixed column for the figure, so that the bars of every row start at the same place */
.macro-row{grid-template-columns:22px minmax(90px,1.1fr) minmax(60px,1.4fr) 6.2em}.macro-row>:last-child{text-align:right;font-variant-numeric:tabular-nums}
.macro-row--inst{grid-template-columns:22px minmax(170px,2.2fr) minmax(40px,.7fr) 4.6em}
.macro-row--entity{grid-template-columns:12px minmax(110px,1.3fr) minmax(90px,.9fr) minmax(60px,1fr) 12em}.macro-row--entity>:last-child{white-space:nowrap}
/* The entity ranking changes its measure in place. Keep the date, bar and
   value rails stable between raw matches and matches per century, rather than
   letting the longer metric reflow the visual comparison. */
@media(min-width:980px){
  #macro-entities .macro-rank--wide .macro-row--entity{grid-template-columns:12px minmax(13rem,1.35fr) 11rem minmax(8rem,1fr) 17rem}
  #macro-entities .macro-rank--wide .macro-years{width:11rem}
  #macro-entities .macro-rank--wide .macro-val{width:17rem;overflow:visible;text-align:right}
}
/* the cards of the comparison keep their own height */
.hc-grid{align-items:start}
/* the sweep: the text in the middle is readable and the needle does not cross it */
.hs-tick{font-size:15px;paint-order:stroke;stroke:#071c27;stroke-width:5px;stroke-linejoin:round}.hs-big{paint-order:stroke;stroke:#071c27;stroke-width:6px;stroke-linejoin:round}
@media(max-width:640px){.macro-grid--map .am-svg{min-height:300px}.hc-back .hc-m{font-size:var(--ds-fs-caption)}}

/* Sweep through history: the dial and, on its right, an inspector as tall as the dial whose list scrolls (the layout of the maps of the country pages) */
.hs-card{padding:14px}.hs-stage{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,28%);gap:16px;align-items:stretch}.hs-dial{min-width:0;position:relative}.hs-dial>.hs-legend{position:absolute;right:6px;bottom:6px;margin:0;padding:6px 10px;background:rgba(7,28,39,.82);border-radius:8px;font-size:12px}.hs-dial>.hs-legend li{font-size:12px;line-height:1.35}
.hs-card svg.hs-svg{display:block;aspect-ratio:1/1;width:min(100%,calc(100vh - 230px));min-width:min(100%,420px);height:auto;max-width:100%;max-height:none;margin:0 auto;margin:0;touch-action:none;cursor:crosshair}
.hs-arc{cursor:pointer;transition:stroke-width .1s}.hs-arc.is-hover{stroke:#fff;stroke-width:1.6}.hs-arc.is-pinned{stroke:#d8ed70;stroke-width:2.4}
.hs-legend{list-style:none;margin:0;padding:0;display:grid;gap:3px;font-size:var(--ds-fs-caption);color:#a9c3c6}.hs-legend i{display:inline-block;width:10px;height:10px;margin-right:6px;border-radius:50%}
.hs-panel{position:relative;min-height:0}
.hs-panel__in{position:absolute;inset:0;overflow:auto;box-sizing:border-box;padding:14px 16px;background:#0c2431;border:1px solid #12303d;border-top:3px solid #d8ed70;color:#e6f1ef}
.hs-panel__kicker{margin:0 0 4px;font-size:var(--ds-fs-label);font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:#7fe0ee}.hs-panel__kicker--list{margin-top:14px}
.hs-panel__year{margin:0;font:400 38px/1.1 Georgia,serif;color:#e9f6f7}.hs-panel__sub{margin:2px 0 0;font-size:var(--ds-fs-control);color:#a9c3c6}
.hs-pop{position:absolute;z-index:3;display:none;width:min(300px,70%);box-sizing:border-box;padding:10px 12px;background:#0c2431;border:1px solid #2a5566;border-left:3px solid #7fe0ee;border-radius:8px;box-shadow:0 6px 22px rgba(0,0,0,.55);pointer-events:none}.hs-pop.is-on{display:block}.hs-pop.is-pinned{border-left-color:#d8ed70;pointer-events:auto}
.hs-detail__kicker{margin:0 0 2px;font-size:var(--ds-fs-label);font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#a9c3c6}.hs-sw{display:inline-block;width:9px;height:9px;margin-right:6px;border-radius:50%}
.hs-detail h4{margin:0;font-size:var(--ds-fs-body);line-height:1.25;color:#fff}.hs-detail__line{margin:3px 0 0;font-size:var(--ds-fs-small);color:#c9dde0}.hs-detail__actions{display:flex;flex-wrap:wrap;gap:4px 14px;margin:8px 0 0}
.hs-link{padding:0;border:0;background:none;font:inherit;font-size:var(--ds-fs-small);font-weight:700;color:#7fe0ee;text-decoration:underline;cursor:pointer}.hs-link:hover{color:#fff}
.hs-live{list-style:none;margin:0;padding:0}
.hs-live button{display:grid;grid-template-columns:10px minmax(0,1fr) auto;grid-template-areas:"dot name val" "dot bar bar";gap:1px 8px;align-items:center;width:100%;padding:6px 6px;border:0;border-bottom:1px solid #12303d;background:none;font:inherit;font-size:var(--ds-fs-small);text-align:left;color:#e6f1ef;cursor:pointer}
.hs-live button:hover,.hs-live button.is-hover{background:#12303d}.hs-live button.is-pinned{background:#173a4a;box-shadow:inset 3px 0 0 #d8ed70}
.hs-dot{grid-area:dot;width:10px;height:10px;border-radius:50%}.hs-live__name{grid-area:name;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hs-live b{grid-area:val;font-variant-numeric:tabular-nums}
.hs-live__bar{grid-area:bar;display:block;height:3px;background:#12303d}.hs-live__bar i{display:block;height:100%}.hs-live__none{padding:8px 0;color:#a9c3c6;font-size:var(--ds-fs-small)}
.hs-hint{margin:12px 0 0;font-size:var(--ds-fs-caption);color:#8fb0b6}
@media(max-width:900px){.hs-pop{left:6px!important;right:6px;width:auto;top:auto!important;bottom:6px}.hs-stage{grid-template-columns:minmax(0,1fr)}.hs-dial>.hs-legend{position:static;margin-top:8px;grid-template-columns:repeat(2,minmax(0,1fr))}.hs-card svg.hs-svg{width:100%;height:auto}.hs-panel__in{position:static;max-height:460px}}

/* button bars: a visible label before each group, one height, one look */
.macro-bar{gap:10px 28px}.macro-ctl{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.macro-ctl__label{font-size:var(--ds-fs-label);font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.macro-toggle{gap:0;border:1px solid #8aa19b;border-radius:999px;overflow:hidden;background:var(--ds-surface)}
.macro-toggle .macro-btn{border:0;border-radius:0;min-height:40px;padding:4px 18px;background:none}.macro-toggle .macro-btn+.macro-btn{border-left:1px solid #c5d3d0}
.macro-toggle .macro-btn[aria-pressed=true]{background:var(--night);color:var(--ds-action-text);font-weight:700}
#macro-tabs{display:flex;align-items:center}
@media(max-width:760px){#macro-tabs{align-items:flex-start}#macro-tabs .macro-ctl{width:100%}}
/* Map and ranking: the ranking is as tall as the map; its list scrolls and a search narrows it */
.macro-grid--map{align-items:stretch}.eu-rank{position:relative;padding:0;min-height:0}
.eu-rank__in{display:flex;flex-direction:column;gap:6px;padding:14px;box-sizing:border-box}
.eu-find{width:100%;box-sizing:border-box;min-height:42px;padding:6px 12px;border:1px solid #8aa19b;border-radius:999px;background:var(--ds-surface);font:inherit;font-size:var(--ds-fs-control);color:var(--ink)}.eu-find:focus-visible{outline:3px solid var(--ds-link);outline-offset:2px}
.eu-find__info{margin:0;font-size:var(--ds-fs-caption);color:var(--muted)}
.eu-rank__list{min-height:0;overflow:auto;flex:1 1 auto}
@media(min-width:980px){.eu-rank__in{position:absolute;inset:0}}
@media(max-width:979px){.eu-rank__list{max-height:420px}}
/* the treemap fills its card: the generic height limit of the svg elements does not apply to it */
#macro-entities .macro-card>svg{max-height:none;width:100%;height:auto}
/* The entity atlas is an instrument first: its two control groups and map fit
   together before a reader needs to scroll.  Ranking tabs deliberately retain
   normal document height, because compressing thirty named rows harms reading. */
@media(min-width:761px){
  #macro-entities .macro-bar--entity-controls{gap:6px 18px;margin:0 0 8px}
  #macro-entities .macro-bar--entity-controls .macro-ctl{gap:7px}
  #macro-entities .macro-bar--entity-controls .macro-toggle .macro-btn{min-height:34px;padding:3px 13px}
  #macro-entities .macro-card--treemap{padding:10px}
  #macro-entities .macro-card--treemap .macro-key{margin:7px 0 0}
  #macro-entities .macro-card--treemap .macro-note{margin:7px 0 0;font-size:var(--ds-fs-caption)}
}
.hc-open{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:16px 0 0}
.hc-openbtn{display:flex;flex-direction:column;gap:2px;padding:12px 16px;background:var(--ds-surface);border:1px solid var(--line);border-left:6px solid var(--ds-line);text-decoration:none;color:var(--ink)}.hc-openbtn small{font-size:var(--ds-fs-label);font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}.hc-openbtn b{font-size:var(--ds-fs-h3)}.hc-openbtn:hover{background:#e3ecee}.hc-openbtn:focus-visible{outline:3px solid var(--ds-link);outline-offset:2px}
@media(max-width:640px){.hc-open{grid-template-columns:minmax(0,1fr)}}
/* a figure never leaves its card: on a phone the last column takes the width of its text */
@media(max-width:640px){.macro-row{grid-template-columns:22px minmax(80px,1fr) minmax(40px,.8fr) auto}.macro-row--inst{grid-template-columns:22px minmax(90px,1.4fr) minmax(30px,.5fr) auto}.macro-row--entity{grid-template-columns:12px minmax(80px,1fr) minmax(40px,.7fr) auto}}
/* Atlas reading flow: the scale line under the first heading and the link that closes each chapter */
.atlas-scale{margin:10px 0 0;font-size:var(--ds-fs-small);color:var(--muted);max-width:90ch}.atlas-scale a{color:var(--ds-link)}
.atlas-next{margin:22px 0 0;padding-top:12px;border-top:1px solid var(--line);font-size:var(--ds-fs-body);max-width:90ch}.atlas-next a{font-weight:700;color:var(--ds-link)}
/* licences page: the Seshat card carries the agreement's own words */
.about-card--wide{grid-column:1/-1}.about-card h3{margin:18px 0 6px;font-size:var(--ds-fs-body)}.about-card blockquote{margin:8px 0;padding:10px 14px;border-left:3px solid var(--ds-notice-line);background:var(--ds-notice-bg);font-size:var(--ds-fs-small);line-height:1.5}.about-card code{white-space:normal;overflow-wrap:anywhere;font-size:var(--ds-fs-small)}.about-source{font-size:var(--ds-fs-caption);color:var(--muted)}
