:root {
  --ink: #17222b;
  --muted: #66737e;
  --paper: #f4f1eb;
  --card: #fffdf9;
  --line: #ded9d0;
  --navy: #173f4f;
  --teal: #167f7a;
  --mint: #b6ddd1;
  --gold: #e2aa49;
  --coral: #db6b57;
  --violet: #7167a8;
  --shadow: 0 16px 45px rgba(31, 45, 53, 0.08);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1480px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 48px; }
.hero { min-height: 180px; border-radius: 20px; padding: 30px 36px; background: linear-gradient(130deg,#173b48,#235660); color: white; display: flex; align-items: flex-end; justify-content: space-between; gap: 36px; box-shadow: 0 10px 30px rgba(31,45,53,.08); position: relative; overflow: hidden; }
.hero-copy { max-width: 820px; position: relative; z-index: 1; }
.eyebrow, .section-kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 750; }
.eyebrow { color: #a9d9cf; }
h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: clamp(2rem,3vw,3rem); letter-spacing: -.025em; line-height: 1.05; margin: 10px 0 13px; max-width: 840px; }
.hero p { color: #d7e5e6; font-size: 1.02rem; line-height: 1.55; margin: 0; max-width: 710px; }
.hero-meta { min-width: 225px; padding: 20px 22px; border: 1px solid rgba(255,255,255,.16); background: rgba(4,30,37,.35); backdrop-filter: blur(8px); border-radius: 16px; display:flex; flex-direction:column; gap:5px; z-index:1; }
.hero-meta strong { font-size: 1rem; }
.hero-meta > span:last-child { font-size: .8rem; color: #bed1d2; }
.live-dot { color:#cbe8e1; font-size:.75rem; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }
.live-dot i { display:inline-block; width:8px; height:8px; border-radius:50%; background:#72d7b5; margin-right:7px; box-shadow:0 0 0 4px rgba(114,215,181,.12); }

.metrics { display:grid; grid-template-columns:repeat(5,1fr); gap:14px; margin:18px 0 22px; }
.metric { padding:19px 20px; background:var(--card); border:1px solid var(--line); border-radius:17px; box-shadow:0 8px 25px rgba(31,45,53,.04); }
.metric span { color:var(--muted); font-size:.72rem; text-transform:uppercase; letter-spacing:.08em; font-weight:700; }
.metric strong { display:block; font-family:Georgia,serif; font-size:2rem; font-weight:500; margin-top:4px; }
.metric small { color:var(--muted); }

.tabs { display:flex; align-items:center; gap:4px; border-bottom:1px solid var(--line); margin: 8px 0 22px; overflow-x:auto; }
.tab { appearance:none; border:0; border-bottom:3px solid transparent; padding:13px 17px 11px; color:var(--muted); background:transparent; font-weight:720; }
.tab:hover { color:var(--navy); }
.tab.active { color:var(--navy); border-color:var(--teal); }
.tab-panel { display:none; }
.tab-panel.active { display:block; animation:fade .22s ease-out; }
@keyframes fade { from { opacity:.2; transform:translateY(3px); } }
.panel-grid { display:grid; gap:18px; }
.panel-grid.two { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
.lower-grid { margin-top:18px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:20px; padding:25px; box-shadow:0 10px 30px rgba(31,45,53,.045); }
.card-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:21px; }
.card-heading h2 { margin:4px 0 0; font-family:Georgia,serif; font-size:1.5rem; font-weight:500; letter-spacing:-.02em; }
.section-kicker { color:var(--teal); }
.quiet { color:var(--muted); font-size:.83rem; }
.text-button, .secondary-button { border:0; color:var(--teal); font-weight:720; background:transparent; padding:7px; }
.secondary-button { border:1px solid #cbc7bf; background:#faf8f4; color:#53616a; border-radius:9px; padding:9px 13px; }

.donut-layout { min-height:230px; display:grid; grid-template-columns:210px 1fr; align-items:center; gap:30px; }
.donut { width:185px; height:185px; border-radius:50%; position:relative; display:grid; place-items:center; }
.donut::after { content:""; position:absolute; width:112px; height:112px; background:var(--card); border-radius:50%; }
.donut-label { position:relative; z-index:1; text-align:center; }
.donut-label strong { display:block; font-family:Georgia,serif; font-size:2.15rem; font-weight:500; }
.donut-label span { color:var(--muted); font-size:.75rem; }
.legend { display:flex; flex-direction:column; gap:12px; }
.legend-row { display:grid; grid-template-columns:11px 1fr auto; gap:10px; align-items:center; font-size:.9rem; }
.swatch { width:10px; height:10px; border-radius:3px; }
.legend-row span:nth-child(2) { color:var(--muted); }
.bar-chart { display:flex; flex-direction:column; gap:13px; min-height:230px; justify-content:center; }
.bar-row { display:grid; grid-template-columns:minmax(175px,205px) 1fr 40px; align-items:center; gap:12px; font-size:.82rem; }
.bar-label { color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bar-track { height:10px; background:#ece8e1; border-radius:999px; overflow:hidden; }
.bar-fill { height:100%; border-radius:999px; background:linear-gradient(90deg,var(--teal),#52a79c); }
.bar-value { text-align:right; font-weight:750; }

.readiness-list { display:flex; flex-direction:column; gap:13px; }
.readiness-row { display:grid; grid-template-columns:48px 1fr minmax(118px,auto); align-items:center; gap:11px; }
.country-code { font-weight:800; color:var(--navy); }
.progress-track { height:7px; background:#ece8e1; border-radius:999px; overflow:hidden; }
.progress-fill { height:100%; background:var(--teal); border-radius:999px; }
.progress-fill.tcg-fill { background:#716f91; }
.readiness-progress { display:flex; flex-direction:column; gap:5px; min-width:0; }
.readiness-progress small { color:var(--muted); font-size:.68rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.safe-label { display:flex; flex-direction:column; text-align:right; color:#43525b; font-size:.72rem; }
.safe-label small { color:var(--muted); font-size:.59rem; font-weight:750; text-transform:uppercase; letter-spacing:.05em; }
.safe-label em { color:var(--muted); font-size:.59rem; font-style:normal; white-space:nowrap; }
.attention-summary { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
.attention-tile { border:1px solid var(--line); border-radius:14px; padding:17px; }
.attention-tile strong { display:block; font-family:Georgia,serif; font-size:1.9rem; font-weight:500; }
.attention-tile span { color:var(--muted); font-size:.8rem; }

.map-card { overflow:hidden; }
.map-heading { align-items:flex-end; }
.map-intro { margin:7px 0 0; color:var(--muted); font-size:.86rem; line-height:1.45; max-width:650px; }
.map-country-picker { display:flex; flex-direction:column; gap:5px; min-width:225px; }
.map-country-picker > span { color:var(--muted); font-size:.67rem; font-weight:750; text-transform:uppercase; letter-spacing:.055em; }
.map-layout { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(330px,.8fr); gap:24px; align-items:start; }
.world-map { min-height:390px; border:1px solid var(--line); border-radius:16px; background:linear-gradient(180deg,#eaf4f4 0%,#edf5f2 62%,#e8f0ec 100%); overflow:hidden; }
.world-map svg { display:block; width:100%; height:auto; min-height:390px; }
.map-country { fill:#d6d8d4; stroke:#fffdf9; stroke-width:.85; vector-effect:non-scaling-stroke; pointer-events:none; transition:fill .14s ease,stroke .14s ease,filter .14s ease; }
.map-country.tracked { pointer-events:auto; cursor:pointer; fill:#9cc4bc; }
.map-country.map-status-downstream-ready { fill:#297e74; }
.map-country.map-status-scraping-complete { fill:#63a89e; }
.map-country.map-status-active { fill:#4f84a0; }
.map-country.map-status-blocked { fill:#d66e58; }
.map-country.map-status-in-progress { fill:#d8b56b; }
.map-country.tracked:hover,.map-country.tracked.selected { stroke:#152f3b; stroke-width:2.2; filter:brightness(1.04); }
.map-country.tracked:focus { outline:none; stroke:#111f27; stroke-width:3.2; }
.map-legend { display:flex; flex-wrap:wrap; gap:8px 16px; padding:12px 3px 0; color:var(--muted); font-size:.7rem; }
.map-legend span { display:flex; align-items:center; gap:6px; }
.map-key { width:10px; height:10px; border-radius:3px; background:#d6d8d4; }
.map-key.downstream-ready { background:#297e74; }
.map-key.scraping-complete { background:#63a89e; }
.map-key.active { background:#4f84a0; }
.map-key.blocked { background:#d66e58; }
.map-key.in-progress { background:#d8b56b; }
.map-credit { margin:7px 3px 0; color:#8a918f; font-size:.64rem; }
.map-country-detail { min-height:445px; max-height:620px; overflow:auto; border:1px solid var(--line); background:#f8f6f1; border-radius:16px; padding:18px; }
.map-empty { min-height:390px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:7px; color:var(--muted); }
.map-empty strong { color:var(--navy); font-family:Georgia,serif; font-weight:500; font-size:1.35rem; }
.map-detail-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.map-detail-head .country-code { display:block; font-size:.7rem; letter-spacing:.09em; }
.map-detail-head h3 { margin:2px 0 0; font-family:Georgia,serif; font-size:1.7rem; font-weight:500; }
.map-detail-summary { color:#526068; font-size:.79rem; line-height:1.45; margin:9px 0 13px; }
.map-detail-metrics { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-bottom:15px; }
.map-detail-metrics span { display:flex; flex-direction:column; gap:1px; border:1px solid #e2ded6; background:#fffdfa; border-radius:9px; padding:8px 9px; color:var(--muted); font-size:.65rem; }
.map-detail-metrics b { color:var(--ink); font-size:.78rem; }
.map-source-list,.shared-source-list { display:flex; flex-direction:column; gap:7px; }
.map-source-row { padding:10px 11px; background:#fffdfa; border:1px solid #e3dfd7; border-radius:10px; }
.map-source-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.map-source-top strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--navy); font-size:.78rem; }
.map-source-dates,.map-source-pipeline { display:flex; flex-wrap:wrap; gap:4px 13px; margin-top:6px; color:var(--muted); font-size:.66rem; }
.map-source-dates b,.map-source-pipeline b { color:#48565e; }
.map-source-pipeline { padding-top:6px; border-top:1px solid #ede9e2; }
.map-source-row p { margin:5px 0 0; color:#58656d; font-size:.69rem; line-height:1.35; }
.shared-source-section { margin-top:18px; }
.shared-source-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin:0 2px 12px; }
.shared-source-heading h2 { margin:4px 0 0; font-family:Georgia,serif; font-size:1.35rem; font-weight:500; }
.shared-source-heading p { margin:0; color:var(--muted); font-size:.77rem; }
.shared-source-groups { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.shared-source-card { border:1px solid var(--line); border-radius:14px; background:var(--card); overflow:hidden; }
.shared-source-card summary { display:flex; align-items:center; justify-content:space-between; gap:15px; cursor:pointer; padding:14px 16px; list-style:none; color:var(--navy); }
.shared-source-card summary::-webkit-details-marker { display:none; }
.shared-source-card summary::after { content:"+"; font-size:1.15rem; color:var(--teal); }
.shared-source-card[open] summary::after { content:"−"; }
.shared-source-card summary > span:first-child { flex:1; display:flex; flex-direction:column; gap:2px; }
.shared-source-card summary > span:last-child,.shared-source-card summary small { color:var(--muted); font-size:.69rem; font-weight:500; }
.shared-source-list { max-height:430px; overflow:auto; padding:0 12px 12px; }

.table-card { padding:0; overflow:hidden; }
.table-title { padding:24px 25px 0; margin-bottom:17px; }
.table-actions { display:flex; gap:10px; }
.coverage-guide { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; padding:0 25px 18px; }
.coverage-guide div { display:flex; gap:8px; align-items:baseline; padding:9px 11px; border:1px solid #e2ded6; border-radius:10px; background:#faf8f4; }
.coverage-guide strong { color:var(--navy); font-size:.72rem; white-space:nowrap; }
.coverage-guide span { color:var(--muted); font-size:.7rem; line-height:1.4; }
input, select { border:1px solid #cbc7bf; background:#fff; color:var(--ink); border-radius:9px; padding:9px 11px; outline:none; }
input:focus,select:focus { border-color:var(--teal); box-shadow:0 0 0 3px rgba(22,127,122,.1); }
.table-wrap { overflow:auto; border-top:1px solid var(--line); }
table { width:100%; border-collapse:collapse; font-size:.82rem; }
th { position:sticky; top:0; background:#f7f5f0; color:#53616a; text-align:left; padding:12px 14px; font-size:.7rem; text-transform:uppercase; letter-spacing:.055em; white-space:nowrap; border-bottom:1px solid var(--line); cursor:pointer; }
th::after { content:" ↕"; color:#b1aea7; }
td { padding:12px 14px; border-bottom:1px solid #ebe7df; vertical-align:middle; }
tbody tr { transition:background .14s; }
tbody tr:hover { background:#f5faf8; }
.source-table-wrap tbody tr { cursor:pointer; }
.source-name { font-weight:750; color:var(--navy); }
.mini-progress { min-width:115px; display:flex; align-items:center; gap:8px; }
.mini-progress .progress-track { flex:1; }
.coverage-cell { min-width:148px; display:flex; flex-direction:column; gap:3px; }
.coverage-cell strong { color:#33444d; font-size:.78rem; white-space:nowrap; }
.coverage-cell small { color:var(--muted); font-size:.65rem; white-space:nowrap; }
.coverage-cell .progress-track { width:100%; margin-top:3px; }
.history-summary { min-width:190px; display:flex; flex-direction:column; gap:4px; color:var(--muted); font-size:.67rem; line-height:1.35; }
.history-summary span { white-space:nowrap; }
.history-summary b { color:#3f4f58; font-size:.68rem; }
.pill { display:inline-flex; align-items:center; border-radius:999px; padding:4px 8px; font-size:.69rem; font-weight:750; white-space:nowrap; background:#ece9e3; color:#59636b; }
.pill.done,.pill.ready,.pill.on-track,.pill.cycle-covered { background:#dcefe9; color:#17685e; }
.pill.active { background:#dcecf1; color:#285c70; }
.pill.blocked { background:#f8ddd7; color:#9c3d2d; }
.pill.review,.pill.open,.pill.cycle-gap { background:#f7e9c9; color:#845d16; }
.pill.backlog,.pill.unassessed,.pill.no-cycle-receipt { background:#e9e7ed; color:#625e6b; }
.table-footer { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:14px 20px; color:var(--muted); font-size:.8rem; }
.pagination { display:flex; align-items:center; gap:10px; }
.pagination button { border:1px solid var(--line); background:white; border-radius:8px; padding:6px 9px; color:var(--ink); }
.pagination button:disabled { opacity:.35; cursor:default; }
.filters { display:grid; grid-template-columns:2fr repeat(4,1fr) auto; gap:10px; align-items:end; padding:0 25px 19px; }
.filters label { display:flex; flex-direction:column; gap:5px; }
.filters label span { color:var(--muted); font-size:.67rem; font-weight:750; text-transform:uppercase; letter-spacing:.05em; }
.filter-clear { margin-bottom:2px; }
.detail-drawer { display:none; margin-top:15px; background:var(--card); border:1px solid var(--line); border-radius:18px; padding:24px; box-shadow:var(--shadow); }
.detail-drawer.open { display:block; }
.detail-head { display:flex; justify-content:space-between; gap:20px; }
.detail-head h3 { font-family:Georgia,serif; font-size:1.65rem; font-weight:500; margin:0 0 4px; }
.detail-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin:20px 0; }
.detail-item { background:#f7f5f0; border-radius:11px; padding:12px; }
.detail-item span { display:block; color:var(--muted); font-size:.65rem; text-transform:uppercase; font-weight:750; margin-bottom:4px; }
.detail-copy { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.detail-copy section { border-top:1px solid var(--line); padding-top:14px; }
.detail-copy h4 { margin:0 0 7px; font-size:.75rem; text-transform:uppercase; letter-spacing:.05em; color:var(--teal); }
.detail-copy p { margin:0; line-height:1.55; font-size:.87rem; color:#46535c; }
.close-detail { border:0; background:transparent; color:var(--muted); font-size:1.25rem; }
.count-pill { background:#edf2f0; border-radius:999px; padding:6px 10px; font-size:.75rem; color:var(--muted); font-weight:750; }
.work-list { max-height:660px; overflow:auto; border-top:1px solid var(--line); }
.work-item { padding:16px 24px; border-bottom:1px solid #ebe7df; }
.work-top { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:7px; }
.work-source { font-weight:800; color:var(--navy); }
.work-country { color:var(--muted); font-size:.74rem; }
.work-item p { margin:5px 0 0; color:#56636c; font-size:.82rem; line-height:1.45; }
.work-label { color:var(--teal); font-size:.65rem; text-transform:uppercase; font-weight:800; letter-spacing:.05em; }
.cycle-card { padding-bottom:30px; }
.timeline { display:grid; grid-template-columns:repeat(3,1fr); gap:13px; }
.wave-card { border:1px solid var(--line); border-radius:14px; padding:17px; position:relative; overflow:hidden; }
.wave-card::before { content:""; position:absolute; top:0; left:0; right:0; height:4px; background:var(--teal); }
.wave-number { color:var(--teal); font-size:.67rem; text-transform:uppercase; font-weight:800; }
.wave-card strong { display:block; margin:7px 0; }
.wave-card p { margin:0; color:var(--muted); font-size:.8rem; line-height:1.45; }
.privacy-note { display:flex; gap:24px; align-items:baseline; background:#e9f2ef; border:1px solid #cbded8; border-radius:15px; padding:17px 20px; margin-top:16px; }
.privacy-note strong { color:var(--navy); white-space:nowrap; }
.privacy-note p { margin:0; color:#51615f; font-size:.83rem; line-height:1.5; }
footer { text-align:center; color:#7a837f; font-size:.75rem; padding:32px 0 0; }
.empty { color:var(--muted); padding:32px; text-align:center; }

@media (max-width:1050px) {
  .metrics { grid-template-columns:repeat(3,1fr); }
  .filters { grid-template-columns:repeat(3,1fr); }
  .panel-grid.two { grid-template-columns:1fr; }
  .timeline { grid-template-columns:repeat(2,1fr); }
  .map-layout { grid-template-columns:1fr; }
  .map-country-detail { min-height:0; max-height:560px; }
}
@media (max-width:720px) {
  .shell { width:min(100% - 18px,1480px); padding-top:9px; }
  .hero { padding:30px 24px; min-height:320px; flex-direction:column; align-items:stretch; }
  .hero-meta { min-width:0; }
  .metrics { grid-template-columns:repeat(2,1fr); }
  .metric:last-child { grid-column:1/-1; }
  .card { padding:19px; }
  .donut-layout { grid-template-columns:1fr; justify-items:center; }
  .bar-row { grid-template-columns:135px 1fr 32px; gap:8px; }
  .filters { grid-template-columns:1fr 1fr; padding:0 16px 16px; }
  .coverage-guide { grid-template-columns:1fr; padding:0 16px 16px; }
  .filters label:first-child { grid-column:1/-1; }
  .timeline { grid-template-columns:1fr; }
  .detail-grid,.detail-copy { grid-template-columns:1fr 1fr; }
  .privacy-note { flex-direction:column; gap:6px; }
  .map-heading,.shared-source-heading { align-items:stretch; flex-direction:column; }
  .map-country-picker { min-width:0; }
  .world-map,.world-map svg { min-height:235px; }
  .map-layout { gap:15px; }
  .map-card { padding:16px; }
  .map-country-detail { padding:14px; }
  .map-detail-metrics,.shared-source-groups { grid-template-columns:1fr; }
  .map-legend { gap:7px 12px; }
}
