*{box-sizing:border-box}
[hidden]{display:none!important} /* overlays set display; hidden must still win */
body{margin:0;font:14px system-ui,sans-serif;background:#0b1220;color:#e8ecf3;height:100vh;display:flex;flex-direction:column}
header{display:flex;justify-content:space-between;align-items:center;padding:10px 20px;border-bottom:1px solid #223}
h1{font-size:18px;margin:0}
.legend{display:flex;gap:8px;align-items:center;font-size:12px}
.bar{width:160px;height:10px;border-radius:5px}
main{flex:1;display:flex;min-height:0}
#globe-wrap{flex:1;position:relative;min-width:0}
#globe{width:100%;height:100%;cursor:grab}
#globe:active{cursor:grabbing}
#hint{position:absolute;bottom:10px;left:0;right:0;text-align:center;color:#8a96ad;font-size:12px;pointer-events:none}
#tip{position:absolute;background:#000c;padding:4px 8px;border-radius:4px;pointer-events:none;font-size:12px}
.country{stroke:#0b1220;stroke-width:.4;cursor:pointer}
.country:hover{stroke:#fff;stroke-width:1}
.country.selected{stroke:#fff;stroke-width:1.5}
.country.nodata{cursor:not-allowed}
#panel{width:380px;background:#121a2e;border-left:1px solid #223;padding:16px;overflow-y:auto;position:relative}
#close{position:absolute;top:8px;right:10px;background:none;border:0;color:#aab;font-size:22px;cursor:pointer}
#panel h2{margin:0 0 12px}
textarea,input,select{background:#0b1220;color:inherit;border:1px solid #334;border-radius:4px;padding:6px;font:inherit}
textarea{width:100%;height:70px;resize:vertical}
.row{display:flex;gap:6px;margin-top:6px}
.row input{flex:1;min-width:0}
button[type=submit],.resolve{background:#2f6fed;color:#fff;border:0;border-radius:4px;padding:6px 12px;cursor:pointer}
.toggle{display:block;margin:12px 0;color:#9aa6bd}
ul{list-style:none;padding:0;margin:0}
li{border:1px solid #223;border-left-width:4px;border-radius:4px;padding:8px;margin-bottom:8px}
li.low{border-left-color:#4caf50}li.medium{border-left-color:#f5c542}li.high{border-left-color:#e5453a}
li.resolved{opacity:.55}
li .meta{color:#8a96ad;font-size:12px;margin-top:4px;display:flex;justify-content:space-between;align-items:center}
li p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.resolve{background:#2a8a4a;padding:3px 8px;font-size:12px}
#error{color:#ff7b72}
@media(max-width:800px){main{flex-direction:column}#panel{width:100%;max-height:50vh}}
.user{font-size:12px;color:#9aa6bd}.user a{color:#7aa7ff;margin-left:8px}
.country.dot{stroke:#0b1220;stroke-width:1}
.country.dot:hover,.country.dot.selected{stroke:#fff;stroke-width:1.5}
.country.touring{stroke:#fff;stroke-width:1.5}
#tour-btn{background:#2f6fed;color:#fff;border:0;border-radius:4px;padding:4px 10px;cursor:pointer;font:inherit;font-size:12px;margin-right:8px}
#tour-card{position:absolute;left:20px;bottom:40px;width:340px;max-width:calc(100% - 40px);background:#0b1220e6;border:1px solid #2a3654;border-radius:8px;padding:14px;box-shadow:0 6px 24px #0008;animation:tc-in .4s ease}
@keyframes tc-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){#tour-card{animation:none}}
.tc-head{display:flex;align-items:center;gap:8px;font-size:16px}
.tc-swatch{width:14px;height:14px;border-radius:3px;flex:none}
.tc-step{margin-left:auto;color:#8a96ad;font-size:12px}
.tc-counts{color:#c7cfdd;margin:6px 0}
.tc-sev{display:flex;gap:6px;margin-bottom:8px}
.tc-pill{font-size:11px;padding:2px 8px;border-radius:10px;color:#0b1220;font-weight:600}
.tc-pill.high{background:#e5453a;color:#fff}.tc-pill.medium{background:#f5c542}.tc-pill.low{background:#4caf50}
.tc-list{margin:0;padding:0}
.tc-list li{border-left:3px solid #556;padding:2px 0 2px 8px;margin:4px 0;border-top:0;border-right:0;border-bottom:0;border-radius:0;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tc-list li.high{border-left-color:#e5453a}.tc-list li.medium{border-left-color:#f5c542}.tc-list li.low{border-left-color:#4caf50}
.tc-list li.tc-more{color:#8a96ad;border-left-color:transparent}
.tc-hint{color:#8a96ad;font-size:12px;margin-top:8px}
.signed-out{align-items:center;justify-content:center;flex-direction:column;gap:16px}.signed-out p{color:#9aa6bd}
.signed-out .btn{background:#2f6fed;color:#fff;border-radius:4px;padding:8px 16px;text-decoration:none}
li.unknown{border-left-color:#9aa6bd}
#news{margin-top:16px;border-top:1px solid #223;padding-top:10px}
#news h3{font-size:14px;margin:0 0 8px}#news-date{color:#8a96ad;font-weight:normal}
.muted{color:#8a96ad}
.news-summary{list-style:disc;padding-left:18px;margin:0}
.news-summary li{border:0;padding:0;margin:0 0 8px;border-radius:0}
.news-src{display:block;font-size:12px;margin-top:2px}
.news-src a,.news-heads a{color:#7aa7ff}
.news-src a+a::before{content:" · ";color:#8a96ad}
#news details{margin-top:6px}#news summary{cursor:pointer;color:#9aa6bd;font-size:12px}
.news-heads{margin:6px 0 0;padding:0}
.news-heads li{border:0;border-radius:0;padding:4px 0;margin:0;font-size:13px;border-bottom:1px solid #1b2440}
.news-meta{color:#8a96ad;font-size:11px}
.tc-news{margin-top:8px;font-size:13px;color:#c7cfdd;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.tc-news:empty{display:none}.tc-news-label{color:#8a96ad}

/* header */
h1{display:flex;align-items:center;gap:8px}
.version{font-size:11px;font-weight:600;color:#0b1220;background:#7aa7ff;border:0;border-radius:10px;padding:2px 8px;cursor:pointer}
.header-links{display:flex;gap:12px;align-items:center;font-size:12px}
.header-links a{color:#7aa7ff}
.hdr-btn{background:none;border:1px solid #2f6fed;color:#7aa7ff;border-radius:4px;padding:3px 8px;cursor:pointer;font:inherit;font-size:12px}
/* overlays on the globe */
.overlay{position:absolute;background:#0b1220e6;border:1px solid #2a3654;border-radius:8px;box-shadow:0 6px 24px #0008;z-index:2;display:flex;flex-direction:column;max-height:calc(100% - 40px)}
.overlay-head{display:flex;justify-content:space-between;align-items:center;gap:8px;width:100%;background:none;border:0;color:inherit;font:inherit;font-weight:600;padding:10px 12px;cursor:pointer;text-align:left}
.overlay-head.static{cursor:default}.overlay-head button{background:none;border:0;color:#aab;font-size:18px;cursor:pointer}
.overlay-body{padding:0 12px 12px;overflow-y:auto}
.overlay.collapsed .overlay-body{display:none}
.chev::before{content:"\25BE";color:#8a96ad}.overlay.collapsed .chev::before{content:"\25B8"}
#dash{top:16px;right:16px;width:290px}
#dash h4{margin:10px 0 4px;font-size:12px;color:#9aa6bd;text-transform:uppercase;letter-spacing:.04em}
.dash-totals{font-size:12px;color:#c7cfdd}
.dash-list{margin:0;padding-left:20px}.dash-list li{border:0;padding:2px 0;margin:0;border-radius:0}
.dash-country{background:none;border:0;color:#7aa7ff;cursor:pointer;font:inherit;padding:0}
.dash-stat{color:#8a96ad;font-size:12px;margin-left:6px}
#regtech,#brief,#health{top:16px;left:16px;width:360px}
#chat{right:16px;bottom:16px;width:360px;height:440px}
#chat.collapsed{height:auto}
.chat-body{display:flex;flex-direction:column;flex:1;min-height:0;padding-bottom:10px}
#chat-log{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:8px;padding:2px 0 8px}
.chat-msg{max-width:92%;padding:8px 10px;border-radius:8px;font-size:13px}
.chat-msg.user{align-self:flex-end;background:#2f6fed;color:#fff}
.chat-msg.assistant{align-self:flex-start;background:#16223d}
.chat-msg.pending{color:#8a96ad;font-style:italic}.chat-msg.error{color:#ff7b72}
.chat-text{white-space:pre-wrap;overflow-wrap:anywhere}
.chat-chips,#chat-suggest{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.chat-chip{background:#1b2a4a;border:1px solid #2a3654;color:#c7d6ff;border-radius:12px;padding:3px 9px;font:inherit;font-size:12px;cursor:pointer;text-align:left}
#chat-form textarea{width:100%;resize:none;margin-top:6px}
.chat-actions{display:flex;justify-content:space-between;margin-top:6px}
#chat-send{background:#2f6fed;color:#fff;border:0;border-radius:4px;padding:6px 14px;cursor:pointer}
#chat-send:disabled{opacity:.5}
.link-btn{background:none;border:0;color:#8a96ad;cursor:pointer;font:inherit;font-size:12px}
.country.chat-hit{stroke:#7aa7ff;stroke-width:2}
/* What's new */
#whats-new{background:#121a2e;color:#e8ecf3;border:1px solid #2a3654;border-radius:10px;max-width:560px;width:calc(100% - 40px);padding:16px 20px}
#whats-new::backdrop{background:#0008}
.wn-head{display:flex;justify-content:space-between;align-items:center}.wn-head h2{margin:0}
.wn-head button{background:none;border:0;color:#aab;font-size:22px;cursor:pointer}
.wn-release h3{display:inline;margin:0 8px 0 0;font-size:15px}.wn-date{color:#8a96ad;font-size:12px}
.wn-release{margin-top:14px}.wn-release ul{margin:6px 0 0;padding-left:20px}.wn-release li{border:0;padding:2px 0;margin:0;border-radius:0}
@media(max-width:900px){#dash{width:240px}#regtech,#brief,#health{width:calc(100% - 32px)}#chat{width:calc(100% - 32px)}}
.link-host{color:#8a96ad;font-size:11px}
.tc-by{color:#8a96ad;font-size:11px}

/* Overlays stay inside the globe area and under the header (pentest: tour card covered Sign out) */
header{position:relative;z-index:10}
#globe-wrap{overflow:hidden}
#tour-card{max-height:calc(100% - 80px);overflow:hidden}
.news-src .link-host,.news-heads .link-host{font-weight:600;color:#c7d6ff;font-size:inherit}
p.error{color:#ff7b72;display:inline}

.theme-chips{display:flex;flex-wrap:wrap;gap:4px;margin:4px 0}
.theme-tag{display:inline-block;background:#1b2a4a;border:1px solid #2a3654;color:#c7d6ff;border-radius:10px;padding:0 7px;font:inherit;font-size:11px;line-height:18px}
button.theme-tag{cursor:pointer}button.theme-tag[aria-pressed="true"]{background:#2f6fed;border-color:#2f6fed;color:#fff}
.brief-item{border-top:1px solid #2a3654;padding:8px 0}.brief-item:first-child{border-top:0}
.brief-item p{margin:0 0 4px}.brief-stat{font-size:12px;color:#8a96ad;margin:0 0 6px}
.brief-h{font-size:13px;margin:12px 0 4px}.brief-issue{font-size:12px;margin:0 0 6px}.brief-issue b{color:#c7d6ff}
.new-tag{background:#2f6fed;color:#fff;border-radius:8px;padding:0 6px;font-size:10px;margin-right:4px}
.brief-add{margin-top:8px;font-size:12px}.brief-add summary{cursor:pointer;color:#7aa7ff}
.brief-add form{display:flex;flex-direction:column;gap:6px;margin-top:6px}
.brief-add input,.brief-add select{background:#111a2e;border:1px solid #2a3654;color:inherit;border-radius:6px;padding:5px 7px;font:inherit}
.country.changed{stroke:#ffd24d;stroke-width:1.6}
.sev{display:inline-block;border-radius:8px;padding:0 6px;font-size:10px;font-weight:700;margin-right:4px;text-transform:uppercase;background:#2a3654}
.sev.high{background:#c0392b;color:#fff}.sev.medium{background:#d4a017;color:#111}.sev.low{background:#3b6ea5;color:#fff}
.health-finding{border-top:1px solid #2a3654;padding:8px 0}.health-finding:first-of-type{border-top:0}
.health-finding p{margin:2px 0;font-size:12px}.probe-row{display:flex;justify-content:space-between;gap:8px;font-size:12px;margin:2px 0}
.probe-ok{color:#5fd38d}.probe-fail{color:#ff7b72;font-weight:700}
.reg-badge{display:inline-block;background:#1f6f43;color:#fff;border-radius:8px;padding:0 6px;font-size:10px;font-weight:700;text-transform:uppercase;vertical-align:1px}
.error{color:#ff7b72}
li p,.brief-item p{max-height:9em;overflow-y:auto} /* padding can never push a byline or button out of view */
.ai-note{font-size:11px;margin:0 0 4px}
.news-summary li{border-left:2px solid #2a3654;padding-left:8px}
.settling button,.settling a{pointer-events:none}
.clamp{display:inline-block;max-height:9em;overflow-y:auto;vertical-align:top;max-width:100%}
#banner{background:#7a1f1a;color:#fff;padding:6px 14px;font-size:13px;text-align:center}
.country.nodata{fill:#2b3550}
