/* A permanent desktop briefing becomes one reading sheet on smaller screens. */
svg .factor-name{font-size:9.5px}
svg .factor-sub{font-size:7.2px}
:root{--reading-width:clamp(300px,27vw,420px);--insight-width:clamp(280px,25vw,380px)}
#reader,#reader-body{display:contents}
#reader-controls{display:none}
#viewport{width:calc(100% - var(--reading-width) - var(--insight-width))}
#detail,#detail.sources-wide,#detail.compact-detail{left:calc(100% - var(--reading-width) - var(--insight-width) + 8px);right:auto;top:64px;bottom:16px;width:calc(var(--insight-width) - 24px);height:auto;max-height:none;padding:20px;scrollbar-width:thin;overflow-wrap:anywhere}
#detail>button.back-sector{position:static;float:none;width:auto;height:auto;border:0;background:none;border-radius:5px;padding:8px 0;margin:0 0 12px;text-align:left;color:#53664d;font:600 12px Arial,sans-serif}
#detail>h2{padding:0;margin:0 0 14px;font-size:23px;line-height:1.25;letter-spacing:-.025em}
#detail h2:focus{outline:none}
#detail .panel-kicker{font-size:10px;letter-spacing:.1em;color:#687563;margin:0 0 8px}
#detail .brief-country{font-size:11px;color:#687563}
#detail .brief-stats{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0;padding-bottom:18px;border-bottom:1px solid #e7ebe2}
.brief-stats strong,.brief-stats span{display:block}
.brief-stats strong{font:600 23px/1.25 system-ui,sans-serif;letter-spacing:-.03em;color:#344734}
.brief-stats span{font-size:11px;color:#687563;margin-top:4px}
#detail .research-brief{padding:16px;background:#f5f7f1;border-radius:12px;border:1px solid #e5eadf;margin:20px 0}
#detail .research-brief .source-text{margin:8px 0;line-height:1.65}
#detail .scope-label{font-size:11px;font-weight:600;color:#607153;line-height:1.6}
#detail .brief-source{font-size:11px;line-height:1.65;display:block;color:#35676d}
#detail .research-gap{font-size:12px;background:#faf7ee;border-left:2px solid #c2ae7a;padding:12px}
#detail .brief-hint{font-size:12px;color:#687563;line-height:1.55}
#detail .explore-point{float:none;display:block;position:relative;width:100%;min-height:56px;text-align:left;border:1px solid #e3e8dc;border-radius:10px;padding:12px 28px 12px 12px;margin:8px 0;background:#fff;color:#354833;white-space:normal}
.explore-point span,.explore-point small{display:block}
.explore-point span{font-size:12px;font-weight:600;line-height:1.5}
.explore-point small{color:#6e7967;font-size:10px;line-height:1.5;margin-top:4px}
.explore-point b{position:absolute;right:11px;top:14px;font-size:14px;font-weight:400}
#detail .explore-point:hover{background:#f5f8ef;border-color:#b6c4a8}
.more-points,.wider-context{margin:16px 0}
.more-points summary,.wider-context summary{cursor:pointer;font-size:12px;font-weight:600;line-height:1.5;color:#52664a;padding:8px 0}
.wider-context{border-top:1px solid #e3e8dc;padding-top:8px}
.wider-context a{font-size:12px;line-height:1.6}
svg .node[aria-pressed=true] circle{stroke:var(--country-accent);stroke-width:2px}
svg .node[aria-pressed=true] .factor-name{fill:var(--country-ink);font-weight:750}
@media(max-width:1100px){
 :root{--header-height:88px;--sheet-compact:136px}
 body{height:100dvh;overflow:hidden}
 header{height:var(--header-height);padding:6px 10px;gap:3px;flex-wrap:wrap;align-content:center}
 header>div:first-child{width:100%;font-size:11px;line-height:1.3;min-width:0}
 header strong{font-size:11px;font-weight:600}
 header small{display:none}
 .controls{width:100%;justify-content:space-between;gap:3px}
 .controls button{min-height:40px;min-width:40px;padding:6px 8px;font-size:12px}
 .controls #zoom{font-size:11px;min-width:28px;text-align:center}
 .controls #edit{font-size:11px;margin-left:2px!important;padding:10px 0}
 #viewport{width:100%;height:calc(100dvh - var(--header-height) - var(--sheet-compact));padding:8px 0;overscroll-behavior:contain}
 #reader{display:flex;flex-direction:column;position:fixed;left:0;right:0;bottom:0;height:var(--sheet-compact);background:#fff;border:1px solid #dfe5da;border-bottom:0;border-radius:20px 20px 0 0;box-shadow:0 -6px 30px #263c2417;z-index:5;overflow:hidden;padding-bottom:env(safe-area-inset-bottom,0px);transition:height .2s ease}
 #reader[data-size=half]{height:52dvh}
 #reader[data-size=full]{height:calc(100dvh - var(--header-height) - 6px)}
 #reader-controls{display:block;flex:none;padding:0 16px;background:#fff}
 #sheet-grip{height:23px;display:flex;align-items:center;justify-content:center;cursor:ns-resize;touch-action:none}
 #sheet-grip span{width:36px;height:4px;border-radius:10px;background:#c8d1c0}
 #sheet-grip:focus-visible{outline:2px solid #6d805f;outline-offset:-2px;border-radius:5px}
 .sheet-heading{display:flex;gap:6px;align-items:center;min-height:51px}
 #sheet-toggle{border:0;text-align:left;flex:1;min-width:0;padding:3px 0;background:none;color:#354833;min-height:48px}
 #sheet-toggle strong,#sheet-toggle span{display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
 #sheet-toggle strong{font-size:15px;line-height:1.4}
 #sheet-toggle span{font-size:11px;color:#687563;margin-top:3px}
 #sheet-expand,#sheet-collapse{width:44px;height:44px;font-size:20px;border:1px solid #e2e8db;border-radius:50%;background:#f6f8f2;flex:none}
 #sheet-expand:disabled,#sheet-collapse:disabled{opacity:.3;cursor:default}
 #reader-tabs{display:flex;gap:20px;border-bottom:1px solid #e4eadc;margin-top:4px}
 #reader-tabs button{min-width:80px;min-height:44px;border:0;border-radius:0;border-bottom:3px solid transparent;padding:8px 6px;background:none;color:#71816b;font-weight:600;font-size:13px}
 #reader-tabs button[aria-selected=true]{border-bottom-color:#526b43;color:#314b29}
 #reader-body{display:block;overflow:auto;overscroll-behavior:contain;flex:1;min-height:0;scrollbar-width:thin}
 #reader[data-size=compact] #reader-body{visibility:hidden}
 #detail,#detail.sources-wide,#detail.compact-detail,#overview,#overview.compact-overview{position:static;left:auto;right:auto;top:auto;bottom:auto;width:auto;height:auto;max-height:none;margin:0;border:0;border-radius:0;box-shadow:none;padding:20px;overflow:visible;font-size:13px}
 #reader[data-tab=insights] #overview,#reader[data-tab=startups] #detail{display:none}
 #reader [hidden]{display:none!important}
 #detail>h2{font-size:24px}
 #detail .source-register{font-size:12px;table-layout:auto;min-width:0}
 #detail .source-register td,#detail .source-register th{padding:9px 6px}
 #detail .source-register .source-table{min-width:260px}
 #overview table{font-size:12px}
 #overview.compact-overview .startup-list td{padding:10px 4px}
}
@media(prefers-reduced-motion:reduce){#reader{transition:none}}

/* Keep first-level labels on the quiet side of the branching badges. */
svg .sector-label .sector-name{font-size:10px;font-weight:650;fill:var(--country-ink);paint-order:stroke;stroke:#ffffffb8;stroke-width:2px;stroke-linejoin:round}
svg .sector-label .amount{font-size:8px;fill:#656b65;paint-order:stroke;stroke:#ffffffb8;stroke-width:2px;stroke-linejoin:round}
