:root {
  --bg: #0f1419;
  --panel: #171d26;
  --panel-2: #1f2733;
  --line: #2a3340;
  --text: #e6edf3;
  --muted: #8b98a9;
  --accent: #4f9cf9;
  --accent-2: #f0b429;
  --overseas: #f0b429;
  --meeting: #d6409f;
  --good: #3fb950;
  --bad: #f85149;
  --radius: 12px;
  --maxw: 1100px;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* header */
header.site {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #131922, #0f1419);
  position: sticky; top: 0; z-index: 10;
}
header.site .wrap { display: flex; align-items: center; gap: 16px; padding: 14px 20px; }
header.site h1 { font-size: 18px; margin: 0; letter-spacing: .2px; }
header.site h1 a { color: var(--text); }
header.site .globe { font-size: 22px; }
header.site nav { margin-left: auto; display: flex; gap: 18px; font-size: 14px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

h2.section { font-size: 14px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 28px 0 12px; font-weight: 600; }

/* leader cards grid */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; transition: border-color .15s, transform .15s;
}
.card.link:hover { border-color: var(--accent); transform: translateY(-2px); }
.leader-head { display: flex; align-items: center; gap: 12px; }
.flag { font-size: 30px; line-height: 1; width: 40px; text-align: center; }
.leader-head .name { font-weight: 650; font-size: 16px; }
.leader-head .title { color: var(--muted); font-size: 13px; }
.stat-row { display: flex; gap: 18px; margin-top: 14px; font-size: 13px; }
.stat-row .num { font-size: 18px; font-weight: 650; display: block; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badge.overseas { color: #1a1205; background: var(--overseas); border-color: var(--overseas); }
.badge.meeting { color: #fff; background: var(--meeting); border-color: var(--meeting); }
.badge.ok { color: var(--good); border-color: #1f5132; }
.badge.stale { color: var(--accent-2); border-color: #6b561a; }
.badge.err { color: var(--bad); border-color: #5e2126; }

/* today strip */
.today-card { display: flex; gap: 14px; align-items: flex-start; }
.today-card .body { flex: 1; }
.today-card .when { font-size: 12.5px; color: var(--muted); }
.evline { padding: 6px 0; border-top: 1px solid var(--line); display: flex; gap: 12px; }
.evline:first-child { border-top: 0; }
.evline .t { color: var(--accent); font-variant-numeric: tabular-nums; min-width: 62px; font-weight: 600; }
.evline .d { flex: 1; }
.evline .loc { color: var(--muted); font-size: 12.5px; }

/* meetings list */
.meeting-item { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--meeting);
  border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; }
.meeting-item .date { color: var(--muted); font-size: 12.5px; }

/* leader page */
.toolbar { display: flex; align-items: center; gap: 10px; margin: 18px 0; flex-wrap: wrap; }
.btn { background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  padding: 7px 14px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.btn:hover { border-color: var(--accent); }
.btn.active { background: var(--accent); border-color: var(--accent); color: #04101f; font-weight: 600; }

/* calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; color: var(--muted); font-size: 11px; text-transform: uppercase; padding: 4px 0; }
.cal-cell { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; min-height: 78px;
  padding: 6px; cursor: default; position: relative; overflow: hidden; }
.cal-cell.empty { background: transparent; border-color: transparent; }
.cal-cell.has { cursor: pointer; }
.cal-cell.has:hover { border-color: var(--accent); }
.cal-cell.overseas { border-color: var(--overseas); }
.cal-cell.selected { outline: 2px solid var(--accent); }
.cal-cell .dnum { font-size: 12px; color: var(--muted); }
.cal-cell.today .dnum { color: var(--accent); font-weight: 700; }
.cal-cell .pip { display: inline-block; font-size: 10px; margin-top: 4px; color: var(--text);
  background: var(--panel-2); border-radius: 4px; padding: 1px 5px; }
.cal-cell .dots { position: absolute; bottom: 6px; left: 6px; display: flex; gap: 3px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.dot.os { background: var(--overseas); }
.dot.mt { background: var(--meeting); }

/* day detail */
.day-detail { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-top: 16px; }
.day-detail h3 { margin: 0 0 4px; }
.event { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.event:first-of-type { border-top: 0; }
.event .time { min-width: 70px; color: var(--accent); font-weight: 650; font-variant-numeric: tabular-nums; }
.event .time.none { color: var(--muted); font-weight: 400; }
.event .main { flex: 1; }
.event .meta { margin-top: 5px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.event .cat { font-size: 11.5px; color: var(--muted); }
.empty-note { color: var(--muted); font-style: italic; padding: 10px 0; }

/* world map */
.worldmap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; overflow: hidden; }
.worldmap svg { width: 100%; height: auto; display: block; }
.worldmap svg path { fill: #26303f; stroke: #0f1419; stroke-width: 0.3; transition: fill .12s; }
.worldmap svg path.has-leader { fill: var(--accent); cursor: pointer; }
.worldmap svg path.has-leader:hover { fill: #8cc0ff; }
.worldmap svg text.map-star { fill: #f0b429; font-size: 16px; cursor: pointer;
  stroke: #1a1205; stroke-width: 0.5; paint-order: stroke; transition: fill .12s; }
.worldmap svg text.map-star:hover { fill: #ffe08a; }
.map-tooltip { position: fixed; pointer-events: none; background: #0b0f14; border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 11px; font-size: 13px; line-height: 1.45; z-index: 60; display: none; max-width: 280px; box-shadow: 0 6px 24px rgba(0,0,0,.5); }
.intl-orgs { margin-top: 12px; }
.intl-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.intl-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--text); }
.intl-chip:hover { border-color: var(--accent); text-decoration: none; }
.intl-chip .flag { font-size: 17px; width: auto; }

/* header / nav */
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 8px; top: 8px; background: var(--accent); color: #04101f; padding: 6px 10px; border-radius: 6px; z-index: 100; }
header.site .brand { font-size: 18px; margin: 0; }
header.site .brand a { color: var(--text); }
.mainnav { margin-left: auto; display: flex; gap: 16px; align-items: center; font-size: 14px; flex-wrap: wrap; }
.mainnav a { color: var(--muted); }
.mainnav a:hover, .mainnav a.active { color: var(--text); text-decoration: none; }
.nav-search { font-size: 15px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 4px 10px; font-size: 18px; cursor: pointer; }
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .mainnav { display: none; flex-basis: 100%; flex-direction: column; align-items: flex-start; gap: 10px; padding: 10px 0; }
  .mainnav.open { display: flex; }
}

/* breadcrumbs */
.breadcrumbs { padding: 12px 20px 0; font-size: 12.5px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs .sep { opacity: .5; }

/* hero */
.hero { padding: 30px 0 8px; }
.hero h1 { font-size: 30px; margin: 0 0 8px; }
.lead { font-size: 17px; color: #c9d4e0; max-width: 70ch; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #04101f; font-weight: 650; }
.btn-primary:hover { background: #6db0ff; }

/* leader photos / profiles */
.leader-profile { display: flex; gap: 18px; align-items: center; margin: 6px 0 10px; }
.leader-photo { width: 120px; height: 120px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); background: var(--panel-2); flex: 0 0 auto; }
.leader-photo.ph { display: flex; align-items: center; justify-content: center; font-size: 56px; }
.profile-meta { min-width: 0; }
.profile-meta h1 { margin: 0 0 4px; }
.profile-bio { margin: 0; font-size: 14.5px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); flex: 0 0 auto; }
.social-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.social-row { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.social-row .avatar { width: 38px; height: 38px; }
.social-row .x { margin-left: auto; color: var(--accent); font-weight: 600; }
@media (max-width: 520px) { .leader-photo { width: 84px; height: 84px; } }

/* unified feed (social timeline) */
.feed { max-width: 680px; }
.feed-item { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.feed-item:first-child { border-top: 0; }
.feed-item .avatar, .feed-item .flag { width: 46px; height: 46px; flex: 0 0 auto; }
.feed-item .flag { font-size: 30px; display: flex; align-items: center; justify-content: center; }
.feed-main { min-width: 0; flex: 1; }
.feed-head { font-size: 13.5px; line-height: 1.4; }
.feed-head .name { font-weight: 650; color: var(--text); }
.feed-head .handle { color: var(--accent); }
.feed-body { margin: 4px 0 2px; font-size: 15px; }
.feed-body .t { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }

/* today grid */
.today-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.today-block { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.today-block .name { font-weight: 650; color: var(--text); }
.today-events { list-style: none; padding: 0; margin: 10px 0 0; }
.today-events li { padding: 5px 0; border-top: 1px solid var(--line); font-size: 14px; }
.today-events li:first-child { border-top: 0; }
.today-events .t { color: var(--accent); font-variant-numeric: tabular-nums; font-weight: 600; }

/* prose / articles */
.prose { max-width: 75ch; }
.prose h1 { font-size: 28px; }
.prose h2 { font-size: 19px; margin-top: 28px; }
.prose p, .prose li { color: #c9d4e0; }
.facts { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 6px 18px; }
.facts li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.link-list { list-style: none; padding: 0; }
.link-list li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.mtg-list { list-style: none; padding: 0; }
.mtg-list li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.index-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 18px; }
.post-card { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.post-card h2 { margin: 0 0 4px; font-size: 19px; }
details.faq { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 8px 0; background: var(--panel); }
details.faq summary { cursor: pointer; font-weight: 600; }

/* forms */
.form { max-width: 520px; display: grid; gap: 12px; }
.form label { display: grid; gap: 5px; font-size: 14px; color: var(--muted); }
.form input, .form textarea, .search-form input { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 10px 12px; font: inherit; }
.form .check { display: flex; flex-direction: row; align-items: flex-start; gap: 8px; }
.news-mini { display: flex; gap: 6px; margin: 6px 0; }
.news-mini input { flex: 1; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 8px 10px; }
.search-form input { width: 100%; font-size: 16px; }

/* footer */
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 24px; padding: 28px 20px 8px; }
.foot-grid h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.foot-links { list-style: none; padding: 0; margin: 0; }
.foot-links li { padding: 3px 0; }
.brand-sm { font-weight: 650; }
.foot-bottom { padding: 14px 20px 0; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* ads */
.ad-slot { margin: 22px 0; }
.ad-ph { border: 1px dashed var(--line); border-radius: 8px; padding: 18px; text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }

/* cookie banner */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: #0b0f14; border-top: 1px solid var(--line); z-index: 80; }
.cookie-inner { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 20px; flex-wrap: wrap; }
.cookie-inner p { margin: 0; font-size: 13px; color: var(--muted); flex: 1; min-width: 240px; }
.cookie-actions { display: flex; gap: 8px; }

footer.site { border-top: 1px solid var(--line); margin-top: 40px; padding: 8px 0 20px; color: var(--muted); font-size: 12.5px; }
.health { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.spin { color: var(--muted); padding: 40px 0; text-align: center; }
.disclaimer { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; color: var(--muted); font-size: 12.5px; margin-top: 16px; }
