@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/pretendardvariable-dynamic-subset.css");

:root {
  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-sub: #94a3b8;
  
  --brand-blue: #2563eb;
  --brand-blue-light: #eff6ff;
  --brand-navy: #1e293b;
  
  --badge-major: #ef4444;
  --badge-major-bg: #fef2f2;
  --badge-high: #f97316;
  --badge-high-bg: #fff7ed;
  --badge-med: #eab308;
  --badge-med-bg: #fefce8;
  --badge-low: #3b82f6;
  --badge-low-bg: #eff6ff;

  --sidebar-w: 184px;
  --header-h: 60px;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
  
  --font-family: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

[data-theme="dark"] {
  --bg-app: #090d16;
  --bg-card: #111827;
  --bg-sidebar: #0f172a;
  --border-color: #1f2937;
  --border-light: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #64748b;
  --brand-blue: #3b82f6;
  --brand-blue-light: #1e3a8a;
  --brand-navy: #0f172a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg-app);
  font-family: var(--font-family);
  color: var(--text-main);
  letter-spacing: -0.015em;
  -webkit-font-smoothing: antialiased;
  display: flex;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--brand-blue); }
.skip-link { position: fixed; top: 0.5rem; left: 0.5rem; z-index: 1000; padding: 0.65rem 0.85rem; color: #fff; background: var(--brand-navy); border-radius: var(--radius-sm); font-size: 0.8rem; font-weight: 850; transform: translateY(-150%); }
.skip-link:focus { color: #fff; transform: translateY(0); }
.content-anchor { position: absolute; width: 1px; height: 1px; overflow: hidden; }
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-blue) 58%, white);
  outline-offset: 2px;
}

/* App Layout */
.app-sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  padding: 1.1rem 0.6rem;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  padding: 0 0.6rem 1.05rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
}

.app-logo svg { width: 22px; height: 22px; color: var(--brand-blue); }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.9rem;
  flex: 1;
}

.sidebar-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-sub);
  text-transform: uppercase;
  padding: 0.7rem 0.7rem 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 0.58rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

.nav-item:hover, .nav-item.active {
  background: var(--brand-blue-light);
  color: var(--brand-blue);
}

.nav-item svg { width: 18px; height: 18px; }

/* Main Shell */
.app-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-header {
  height: var(--header-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-context { display: flex; min-width: 0; flex-direction: column; gap: 0.1rem; }
.header-context span { color: var(--text-sub); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.12em; }
.header-context strong { max-width: 34rem; overflow: hidden; color: var(--text-main); font-size: 0.85rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }

.header-tools { display: flex; align-items: center; gap: 1rem; }
.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-input-wrap input {
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.85rem 0.45rem 2rem;
  font-size: 0.85rem;
  color: var(--text-main);
  outline: none;
  width: 240px;
}
.search-input-wrap svg {
  position: absolute;
  left: 0.65rem;
  width: 15px;
  height: 15px;
  color: var(--text-sub);
}
.search-results {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  z-index: 50;
  width: min(28rem, 85vw);
  max-height: 70vh;
  overflow-y: auto;
  padding: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}
.search-result {
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem 0.8rem;
  border-radius: calc(var(--radius-md) - 3px);
}
.search-result:hover,
.search-result.active,
.search-result:focus-visible { background: var(--bg-app); }
.search-result span {
  color: var(--brand-blue);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.search-result strong { font-size: 0.88rem; }
.search-result small {
  color: var(--text-sub);
  font-size: 0.74rem;
  line-height: 1.45;
}
.search-empty {
  padding: 0.8rem;
  color: var(--text-sub);
  font-size: 0.8rem;
}

/* Dashboard Content */
.dashboard-content {
  padding: 2rem;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
}

.dashboard-title h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.2rem;
}

.dashboard-title p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.stats-grid { display: flex; gap: 1rem; }
.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  min-width: 130px;
}
.stat-box-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.stat-box-val {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
}
.stat-box-delta {
  font-size: 0.75rem;
  font-weight: 700;
  color: #10b981;
}

/* Main 2-Col Dashboard Grid */
.dashboard-main-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.board-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.card-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-blue);
}

/* Top Events List in Card */
.top-events-list { display: flex; flex-direction: column; gap: 0.9rem; }
.top-event-item {
  display: flex;
  gap: 0.85rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border-light);
}
.top-event-item:last-child { border-bottom: none; padding-bottom: 0; }
.event-num {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-sub);
  width: 24px;
  line-height: 1.3;
}
.event-body { flex: 1; }
.event-headline-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.badge {
  font-size: 0.68rem;
  font-weight: 750;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  line-height: 1.2;
}
.badge-major { background: var(--badge-major-bg); color: var(--badge-major); }
.badge-high { background: var(--badge-high-bg); color: var(--badge-high); }
.badge-med { background: var(--badge-med-bg); color: var(--badge-med); }
.badge-low { background: var(--badge-low-bg); color: var(--badge-low); }

.event-headline {
  font-size: 0.96rem;
  font-weight: 750;
  line-height: 1.35;
}
.event-meta-row {
  display: flex;
  gap: 0.8rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}

@keyframes pulse-ring {
  0% { transform: scale(0.85); opacity: 0.45; }
  70%, 100% { transform: scale(1.65); opacity: 0; }
}

.map-board-card { min-width: 0; }
.map-canvas-wrap {
  position: relative;
  width: 100%;
  height: 390px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}
.world-map-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.42;
  filter: grayscale(1) contrast(0.9);
}
.map-pin-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-pin-group { cursor: pointer; }
.pin-pulse { transform-origin: center; animation: pulse-ring 2.5s infinite ease-out; }
.pin-dot { stroke: #fff; stroke-width: 2.5; transition: transform 0.18s ease; }
.map-pin-group:hover .pin-dot { transform: scale(1.3); }
.map-pin-label {
  fill: var(--text-main);
  font-size: 14px;
  font-weight: 800;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
}
.map-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
  color: var(--text-muted);
  font-size: 0.7rem;
}
.map-legend span {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.48rem;
  background: var(--dot-soft);
  border: 1px solid color-mix(in srgb, var(--dot) 24%, var(--border-light));
  border-radius: 999px;
  font-weight: 750;
}
.map-legend i {
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  margin-right: 0.3rem;
  background: var(--dot);
  border-radius: 50%;
}
.top-event-item small {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-sub);
  font-size: 0.72rem;
}
/* Country directory */
.country-directory { scroll-behavior: smooth; }
.region-jump {
  position: sticky;
  top: calc(var(--header-h) + 0.75rem);
  z-index: 20;
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.55rem;
  overflow-x: auto;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
}
.region-jump a {
  flex: 1 0 auto;
  padding: 0.62rem 1rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 750;
  text-align: center;
}
.region-jump a:hover { color: #fff; background: var(--brand-blue); border-color: var(--brand-blue); }
.macro-region-stack { display: grid; gap: 1.5rem; }
.macro-region-block {
  scroll-margin-top: calc(var(--header-h) + 6rem);
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}
.macro-region-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid var(--text-main);
}
.macro-region-header span {
  color: var(--brand-blue);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}
.macro-region-header h2 { margin-top: 0.1rem; font-size: 1.45rem; }
.macro-region-header > a { color: var(--text-sub); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.08em; }
.subregion-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.subregion-card {
  padding: 1rem;
  background: var(--bg-app);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}
.subregion-card h3 {
  margin-bottom: 0.75rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.country-link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; }
.country-link-grid a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 0;
  padding: 0.7rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}
.country-link-grid a:hover { border-color: var(--brand-blue); box-shadow: 0 3px 12px rgba(37, 99, 235, 0.08); }
.country-link-grid strong { overflow: hidden; font-size: 0.85rem; text-overflow: ellipsis; white-space: nowrap; }
.country-link-grid span { color: var(--text-sub); font-size: 0.66rem; white-space: nowrap; }

/* Event briefing */
.event-brief-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.event-brief-card {
  --event-accent: var(--brand-blue);
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.event-brief-card:hover { transform: translateY(-2px); border-color: var(--brand-blue); box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08); }
.event-brief-link { display: flex; min-height: 100%; flex-direction: column; padding: 1.25rem; color: inherit; }
.event-brief-topline { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.85rem; }
.event-brief-topline time { display: flex; align-items: baseline; gap: 0.35rem; color: var(--brand-blue); }
.event-brief-topline time strong { font-size: 1.45rem; line-height: 1; }
.event-brief-topline time span { color: var(--text-sub); font-size: 0.68rem; font-weight: 750; }
.event-brief-number { color: var(--border-color); font: 800 1.65rem/1 ui-monospace, monospace; }
.event-brief-card h2 { margin-bottom: 0.7rem; color: var(--text-main); font-size: 1.08rem; font-weight: 780; line-height: 1.5; letter-spacing: -0.025em; }
.event-brief-card h2::before { content: ""; display: inline-block; width: 0.48rem; height: 0.48rem; margin-right: 0.5rem; background: var(--event-accent); border-radius: 50%; vertical-align: 0.08em; }
.event-brief-card p { flex: 1; color: var(--text-muted); font-size: 0.84rem; line-height: 1.75; }
.event-brief-footer { display: flex; justify-content: space-between; align-items: flex-end; gap: 0.75rem; margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1px solid var(--border-light); }
.event-brief-footer .tag-chips { gap: 0.3rem; }
.event-brief-footer .tag-chip { padding: 0.2rem 0.45rem; font-size: 0.66rem; }
.event-read-more { flex: 0 0 auto; color: var(--brand-blue); font-size: 0.68rem; font-weight: 850; letter-spacing: 0.04em; }
.event-brief-featured { grid-column: 1 / -1; }
.event-brief-featured .event-brief-link { padding: 1.5rem; }
.event-brief-featured h2 { max-width: 55rem; font-size: 1.35rem; }
.event-brief-featured p { max-width: 62rem; font-size: 0.88rem; }

/* Shared topic color language: one contextual accent, all topics remain visible. */
.event-brief-card.topic-accent { --event-accent: var(--topic-color); }
.event-brief-card.topic-accent:hover { border-color: var(--topic-color); }
.topic-chip {
  color: var(--topic-color);
  background: var(--topic-soft);
  border-color: color-mix(in srgb, var(--topic-color) 30%, transparent);
  font-weight: 800;
}
.section-topic.topic-accent {
  --section-accent: var(--topic-color);
  background: linear-gradient(145deg, var(--topic-soft), var(--bg-card) 68%);
}
.section-topic.topic-accent .section-code,
.topic-detail-page.topic-accent .eyebrow,
.topic-detail-page.topic-accent .event-read-more { color: var(--topic-color); }
.topic-detail-header {
  padding: 1.4rem 1.5rem;
  background: linear-gradient(110deg, var(--topic-soft), var(--bg-card) 72%);
  border-left: 4px solid var(--topic-color);
  border-radius: var(--radius-lg);
}
.event-detail-main.topic-accent::before {
  content: "";
  display: block;
  width: 2.75rem;
  height: 3px;
  margin-bottom: 1.35rem;
  background: var(--topic-color);
  border-radius: 999px;
}

/* Interactive world map */
.atlas-directory-link { padding: 0.65rem 0.9rem; color: var(--brand-blue); background: var(--brand-blue-light); border-radius: var(--radius-md); font-size: 0.78rem; font-weight: 800; }
.atlas-shell { display: block; }
.atlas-main { min-width: 0; }
.atlas-breadcrumb { display: flex; min-height: 2rem; align-items: center; gap: 0.45rem; margin-bottom: 0.9rem; overflow-x: auto; color: var(--text-sub); font-size: 0.72rem; white-space: nowrap; scrollbar-width: none; }
.atlas-breadcrumb::-webkit-scrollbar { display: none; }
.atlas-breadcrumb button { padding: 0.25rem 0.4rem; color: var(--brand-blue); background: transparent; border: 0; border-radius: var(--radius-sm); cursor: pointer; font: inherit; font-weight: 800; }
.atlas-breadcrumb button:hover { background: var(--brand-blue-light); }
.atlas-breadcrumb span[aria-hidden="true"] { color: var(--border-color); }
.atlas-breadcrumb [aria-current="page"] { color: var(--text-main); font-weight: 850; }
.atlas-toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; }
.atlas-filter-stack { display: grid; gap: 0.65rem; width: 100%; }
.atlas-filter-group { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 0.75rem; align-items: center; }
.atlas-filter-group > span { color: var(--text-sub); font-size: 0.66rem; font-weight: 850; letter-spacing: 0.06em; }
.atlas-filter-control { min-width: 0; }
.atlas-region-filter { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.atlas-region-filter button { padding: 0.45rem 0.7rem; color: var(--text-muted); background: var(--bg-app); border: 1px solid var(--border-color); border-radius: 999px; cursor: pointer; font: inherit; font-size: 0.72rem; font-weight: 750; }
.atlas-region-filter button:hover, .atlas-region-filter button.active { color: #fff; background: var(--brand-blue); border-color: var(--brand-blue); }
.atlas-mobile-filter { display: none; }
.atlas-mobile-filter { min-width: 12rem; padding: 0.58rem 2rem 0.58rem 0.7rem; color: var(--text-main); background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-sm); font: inherit; font-size: 0.78rem; }
.atlas-country-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 0.4rem; }
.atlas-country-list button { min-height: 2.5rem; padding: 0.52rem 0.65rem; overflow: hidden; color: var(--text-muted); background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-sm); cursor: pointer; font: inherit; font-size: 0.75rem; font-weight: 750; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.atlas-country-list button:hover { color: var(--brand-blue); border-color: color-mix(in srgb, var(--brand-blue) 45%, var(--border-color)); background: var(--brand-blue-light); }
.atlas-country-list button.active { color: #fff; background: var(--brand-blue); border-color: var(--brand-blue); }
.world-map-explorer { position: relative; min-height: 34rem; overflow: hidden; background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius-md); }
.home-world-map { min-height: 390px; }
.home-world-map .atlas-world-vector, .home-world-map .atlas-world-vector > svg { min-height: 390px; }
.atlas-loading { display: grid; min-height: inherit; place-items: center; padding: 2rem; color: var(--text-sub); font-size: 0.8rem; text-align: center; }
.atlas-world-vector { width: 100%; min-height: 34rem; }
.atlas-world-vector > svg { display: block; width: 100%; height: 100%; min-height: 34rem; }
.atlas-world-vector path { fill: #e2e8f0; stroke: #fff; stroke-width: 0.65; transition: fill 0.18s ease, fill-opacity 0.18s ease, opacity 0.18s ease, stroke 0.18s ease; }
.atlas-world-vector path.atlas-country-shape { cursor: pointer; outline: none; }
.atlas-world-vector path.atlas-country-observed { fill: var(--country-topic-color); fill-opacity: var(--country-activity, 0.36); }
.atlas-world-vector path.atlas-country-shape:hover,
.atlas-world-vector path.atlas-country-shape:focus,
.atlas-world-vector path.atlas-country-selected { fill-opacity: 0.88; stroke: var(--text-main); stroke-width: 1.6; }
.atlas-world-vector path.atlas-country-muted { opacity: 0.1; pointer-events: none; }
.atlas-map-tooltip {
  position: absolute;
  z-index: 8;
  pointer-events: none;
  padding: 0.38rem 0.55rem;
  color: #fff;
  background: rgba(15, 23, 42, 0.92);
  border-radius: 5px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}
.atlas-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; margin-top: 0.75rem; color: var(--text-muted); font-size: 0.68rem; }
.atlas-topic-legend span { display: inline-flex; align-items: center; padding: 0.3rem 0.5rem; background: var(--legend-soft); border: 1px solid color-mix(in srgb, var(--legend) 24%, var(--border-light)); border-radius: 999px; font-weight: 750; }
.atlas-topic-legend i { display: inline-block; width: 0.45rem; height: 0.45rem; margin-right: 0.3rem; background: var(--legend); border-radius: 50%; }
.atlas-size-note { margin-top: 0.5rem; color: var(--text-sub); font-size: 0.66rem; text-align: center; }
.atlas-inspector { margin-top: 1rem; min-height: 0; }
.atlas-detail-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; }
.atlas-region-label { display: inline-block; margin: 1rem 0 0.3rem; color: var(--brand-blue); font-size: 0.7rem; font-weight: 850; letter-spacing: 0.08em; }
.atlas-topic-label { display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 0.55rem; color: var(--text-muted); font-size: 0.7rem; font-weight: 750; }
.atlas-topic-label:before { content: ""; width: 8px; height: 8px; background: var(--topic-color, var(--text-sub)); border-radius: 50%; }
.atlas-inspector h2 { margin-bottom: 0.45rem; font-size: 1.55rem; }
.atlas-country-summary { max-width: 52rem; color: var(--text-muted); font-size: 0.84rem; line-height: 1.7; }
.atlas-primary-link { display: block; flex: 0 0 auto; margin-top: 1rem; padding: 0.7rem 0.9rem; color: #fff; background: var(--brand-blue); border-radius: var(--radius-sm); font-size: 0.78rem; font-weight: 800; text-align: center; }
.atlas-primary-link:hover { color: #fff; background: var(--brand-navy); }
.atlas-event-list-wrap { padding-top: 0.9rem; border-top: 1px solid var(--border-light); }
.atlas-event-list-wrap h3 { margin-bottom: 0.55rem; color: var(--text-sub); font-size: 0.65rem; letter-spacing: 0.1em; }
.atlas-event-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.atlas-event-list a { display: grid; gap: 0.2rem; padding: 0.55rem; background: var(--bg-app); border-radius: var(--radius-sm); }
.atlas-event-list strong { font-size: 0.74rem; line-height: 1.45; }
.atlas-event-list span, .atlas-no-events { color: var(--text-sub); font-size: 0.65rem; }

/* Bottom 3-Col Grid */
.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
}

.sub-list { display: flex; flex-direction: column; gap: 0.75rem; }
.sub-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--border-light);
}
.sub-list-item strong { font-weight: 650; }
.sub-list-item span { font-size: 0.76rem; color: var(--text-sub); }
.topic-home-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}
.topic-home-item {
  position: relative;
  display: grid;
  grid-template-columns: 0.5rem minmax(0, 1fr);
  gap: 0.48rem;
  align-items: center;
  min-width: 0;
  min-height: 3.25rem;
  padding: 0.62rem 0.58rem;
  overflow: hidden;
  background: var(--topic-soft);
  border: 1px solid color-mix(in srgb, var(--topic-color) 24%, var(--border-light));
  border-bottom-style: solid;
  border-radius: var(--radius-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.topic-home-item:hover {
  border-color: var(--topic-color);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--topic-color) 12%, transparent);
  transform: translateY(-1px);
}
.topic-home-accent {
  align-self: center;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--topic-color);
  border-radius: 50%;
  box-shadow: 0 0 0 0.2rem var(--topic-soft);
}
.topic-home-item strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text-main);
  font-size: clamp(0.72rem, 0.9vw, 0.82rem);
  font-weight: 780;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

/* Compact Tag Chips (알약형 컴팩트 뱃지) */
.tag-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 650;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--bg-app);
  color: var(--brand-blue);
  border: 1px solid var(--border-color);
  line-height: 1.2;
}

.tag-chip:hover {
  background: var(--brand-blue);
  color: #ffffff;
  border-color: var(--brand-blue);
}

/* Event Detail Page (Wireframe 1:1) */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  margin-top: 1.5rem;
}

.detail-main {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
}

.detail-breadcrumb {
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-bottom: 0.8rem;
}

.detail-title {
  font-size: 1.85rem;
  font-weight: 850;
  line-height: 1.3;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.detail-tabs {
  display: flex;
  gap: 1.2rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
}

.detail-tab {
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--text-muted);
}
.detail-tab.active { color: var(--brand-blue); font-weight: 750; }

.detail-prose {
  font-size: 1.04rem;
  line-height: 1.85;
  color: var(--text-main);
}
.detail-prose p { margin: 1.2rem 0; }
.detail-prose h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 2.2rem 0 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1.5px solid var(--border-color);
}
.detail-prose blockquote {
  background: var(--brand-blue-light);
  border-left: 4px solid var(--brand-blue);
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  font-size: 1.08rem;
  line-height: 1.75;
}

/* Detail Side Sidebar Info Box */
.detail-side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.info-card h3 {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.info-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
}
.info-item span { color: var(--text-muted); }
.info-item strong { font-weight: 700; }

/* Timeline UI */
.timeline-wrap {
  margin: 1.5rem 0;
  position: relative;
  padding-left: 1.5rem;
}
.timeline-wrap:before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border-color);
}
.timeline-entry {
  position: relative;
  margin-bottom: 1.4rem;
}
.timeline-entry:before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand-blue);
  border: 2px solid #ffffff;
}
.timeline-date { font-size: 0.78rem; font-weight: 700; color: var(--brand-blue); }
.timeline-text { font-size: 0.94rem; margin-top: 0.2rem; }

/* Events Filter & List Page */
.events-filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 0.45rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--text-muted);
}
.filter-btn.active, .filter-btn:hover {
  background: var(--brand-blue);
  color: #ffffff;
  border-color: var(--brand-blue);
}

.events-feed-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.event-feed-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  gap: 1.2rem;
  transition: all 0.2s ease;
}
.event-feed-card:hover {
  border-color: var(--brand-blue);
  box-shadow: 0 4px 16px rgba(0,0,0,0.03);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .map-canvas-wrap { height: 260px; }
  .subregion-grid, .event-brief-grid { grid-template-columns: 1fr; }
  .country-link-grid { grid-template-columns: 1fr; }
  .event-brief-featured { grid-column: auto; }
  .event-brief-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 1024px) {
  .dashboard-main-grid { grid-template-columns: 1fr; }
  .dashboard-bottom-grid { grid-template-columns: 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
}

/* Epocharium Hugo information architecture */
.today-link {
  color: var(--brand-blue);
  background: var(--brand-blue-light);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
}

.eyebrow,
.card-kicker,
.section-code {
  margin: 0 0 0.35rem;
  color: var(--brand-blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.home-dashboard-header { align-items: flex-end; }
.feature-card { min-height: 24rem; }

.feature-story {
  display: block;
  padding: 1.35rem;
  color: inherit;
  background: var(--bg-app);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  text-decoration: none;
}

.feature-story time { color: var(--brand-blue); font-size: 0.78rem; font-weight: 750; }
.feature-story h3 { margin: 0.55rem 0; font-size: 1.45rem; line-height: 1.35; }
.feature-story p { margin: 0; color: var(--text-muted); line-height: 1.75; }

.section-board-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.section-board-grid.topic-directory { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.section-board-card {
  display: flex;
  min-height: 12rem;
  flex-direction: column;
  padding: 1.25rem;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--section-accent, var(--brand-blue));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.section-board-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.section-board-card strong { color: var(--text-main); font-size: 1.1rem; }
.section-board-card p { flex: 1; color: var(--text-muted); font-size: 0.86rem; line-height: 1.65; }
.section-board-card small { color: var(--text-sub); font-weight: 700; }
.section-country { --section-accent: #2563eb; }
.section-wiki { --section-accent: #8b5cf6; }
.section-topic { --section-accent: #f97316; }
.section-trend { --section-accent: #10b981; }
.section-header { align-items: flex-end; }
.section-count { color: var(--text-muted); font-size: 0.78rem; font-weight: 750; }
.document-labels { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.detail-lead { color: var(--text-muted); font-size: 1.05rem; line-height: 1.7; }

/* Chronicle: editorial index and long-form reading */
.chronicle-index,
.chronicle-document { width: min(1120px, 100%); margin-inline: auto; }

.chronicle-index-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.chronicle-index-header h1 { margin: 0.15rem 0 0.35rem; font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -0.055em; }
.chronicle-index-header p:last-child { color: var(--text-muted); line-height: 1.7; }
.chronicle-feature { display: grid; grid-template-columns: 10rem minmax(0, 1fr); overflow: hidden; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06); }
.chronicle-date-block { display: flex; min-height: 19rem; flex-direction: column; justify-content: space-between; padding: 1.7rem; color: #fff; background: #172554; }
.chronicle-date-block span, .chronicle-date-block small { color: #bfdbfe; font-size: 0.72rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.chronicle-date-block strong { font-size: 2.45rem; line-height: 1; letter-spacing: -0.06em; writing-mode: vertical-rl; transform: rotate(180deg); }
.chronicle-feature-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(1.6rem, 4vw, 3rem); }
.chronicle-feature-copy h2 { max-width: 50rem; margin: 0.4rem 0 1rem; font-size: clamp(1.55rem, 3vw, 2.35rem); line-height: 1.3; letter-spacing: -0.04em; }
.chronicle-feature-copy > p:not(.card-kicker) { max-width: 48rem; color: var(--text-muted); line-height: 1.8; }
.chronicle-feature-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--border-light); }
.chronicle-read-link { color: var(--brand-blue); font-size: 0.86rem; font-weight: 800; white-space: nowrap; }
.chronicle-archive { margin-top: 3rem; }
.chronicle-section-heading { margin-bottom: 1rem; }
.chronicle-section-heading h2 { font-size: 1.4rem; }
.chronicle-timeline { overflow: hidden; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); }
.chronicle-row { display: grid; grid-template-columns: 5rem minmax(0, 1fr) 2rem; gap: 1.25rem; align-items: center; padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--border-light); }
.chronicle-row:last-child { border-bottom: 0; }
.chronicle-row time { display: flex; flex-direction: column; color: var(--brand-blue); }
.chronicle-row time strong { font-size: 1.15rem; }
.chronicle-row time span { color: var(--text-sub); font-size: 0.7rem; }
.chronicle-row h3 { margin-bottom: 0.3rem; font-size: 1rem; line-height: 1.45; }
.chronicle-row p { color: var(--text-muted); font-size: 0.82rem; line-height: 1.6; }
.chronicle-row-arrow { color: var(--text-sub); font-size: 1.2rem; }

.chronicle-paper { overflow: hidden; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: 0 12px 38px rgba(15, 23, 42, 0.05); }
.chronicle-paper-header { padding: clamp(2rem, 6vw, 4.5rem); border-bottom: 1px solid var(--border-color); background: linear-gradient(145deg, var(--bg-card) 45%, var(--brand-blue-light)); }
.chronicle-paper-header .document-labels time { color: var(--text-muted); font-size: 0.8rem; font-weight: 700; }
.chronicle-paper-header h1 { max-width: 55rem; margin: 1rem 0; font-size: clamp(2rem, 4vw, 3.35rem); line-height: 1.2; letter-spacing: -0.055em; }
.chronicle-paper-header > p { max-width: 48rem; margin-bottom: 1.3rem; color: var(--text-muted); font-size: 1.08rem; line-height: 1.8; }
.chronicle-reading-layout { display: grid; grid-template-columns: 13rem minmax(0, 48rem); justify-content: center; gap: clamp(2rem, 5vw, 4rem); padding: clamp(2rem, 6vw, 4.5rem); }
.chronicle-toc { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; max-height: calc(100vh - 7rem); overflow: auto; }
.chronicle-toc > p { margin-bottom: 0.8rem; color: var(--text-sub); font-size: 0.64rem; font-weight: 800; letter-spacing: 0.12em; }
.chronicle-toc nav > ul { padding-left: 0; list-style: none; }
.chronicle-toc ul ul { display: none; }
.chronicle-toc li { margin-bottom: 0.55rem; }
.chronicle-toc a { color: var(--text-muted); font-size: 0.76rem; line-height: 1.4; }
.chronicle-toc a:hover { color: var(--brand-blue); }
.chronicle-prose { min-width: 0; font-size: 1.06rem; line-height: 1.95; }
.chronicle-prose > :first-child { margin-top: 0; }
.chronicle-prose h2 { margin-top: 3.25rem; padding-bottom: 0.65rem; font-size: 1.45rem; line-height: 1.45; }
.chronicle-prose h3 { margin: 2rem 0 0.7rem; font-size: 1.16rem; }
.chronicle-prose ul, .chronicle-prose ol { padding-left: 1.35rem; }
.chronicle-prose li { margin: 0.55rem 0; }
.chronicle-prose a:not(.wiki-link) { color: var(--brand-blue); text-decoration: underline; text-underline-offset: 0.18em; }
.chronicle-related-label { margin: 1.4rem 0 0.5rem !important; color: var(--text-sub); font-size: 0.65rem; font-weight: 850; letter-spacing: 0.12em; }
.chronicle-related-label + ul { margin: 0; padding: 0; list-style: none; }
.chronicle-related-label + ul li { margin: 0; }
.chronicle-prose h2#sources { margin-bottom: 0; padding: 1rem 1.15rem; background: var(--bg-app); border: 1px solid var(--border-color); border-radius: var(--radius-md) var(--radius-md) 0 0; font-size: 1rem; }
.chronicle-prose h2#sources + ul { max-height: 30rem; overflow: auto; margin: 0; padding: 0.8rem 1.15rem 1.2rem 2.25rem; background: var(--bg-app); border: 1px solid var(--border-color); border-top: 0; border-radius: 0 0 var(--radius-md) var(--radius-md); }
.chronicle-prose h2#sources + ul li { color: var(--text-muted); font-size: 0.72rem; line-height: 1.55; word-break: break-word; }
.chronicle-document-nav { padding: 1.25rem 0; }
.chronicle-document-nav a { color: var(--text-muted); font-size: 0.85rem; font-weight: 750; }

/* About: provenance, editorial policy, and licensing */
.about-page { width: min(1120px, 100%); margin-inline: auto; }
.about-hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 7vw, 6rem); align-items: end; padding: clamp(1.5rem, 4vw, 3rem) 0 3.5rem; border-bottom: 1px solid var(--border-color); }
.about-hero h1 { margin-top: 0.45rem; font-size: clamp(2.5rem, 6vw, 5rem); line-height: 1.05; letter-spacing: -0.065em; }
.about-hero > p { color: var(--text-muted); font-size: 1.08rem; line-height: 1.9; }
.about-mission, .about-sources, .about-license { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 3rem; padding: 3.5rem 0; border-bottom: 1px solid var(--border-color); }
.about-section-label span { color: var(--brand-blue); font: 800 0.72rem/1 ui-monospace, monospace; }
.about-section-label h2 { margin-top: 0.55rem; font-size: 1.05rem; }
.about-copy > p { max-width: 48rem; color: var(--text-muted); font-size: 1rem; line-height: 1.85; }
.about-principle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.85rem; margin-top: 2rem; }
.about-principle-grid article { padding: 1.25rem; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); }
.about-principle-grid strong { font-size: 0.83rem; letter-spacing: 0.01em; }
.about-principle-grid p { margin-top: 0.6rem; color: var(--text-muted); font-size: 0.82rem; line-height: 1.65; }
.credit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin: 2rem 0 1.3rem; }
.credit-grid a { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.15rem; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); }
.credit-grid a:hover { border-color: var(--brand-blue); }
.credit-grid strong { font-size: 0.94rem; }
.credit-grid span { color: var(--text-muted); font-size: 0.78rem; }
.about-source-note { padding-left: 1rem; border-left: 3px solid var(--border-color); font-size: 0.86rem !important; }
.about-subheading { margin: 2.8rem 0 0.65rem; font-size: 1.15rem; letter-spacing: -0.025em; }
.reference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; margin-top: 1.4rem; }
.reference-grid a { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--border-light); }
.reference-grid a:hover strong { color: var(--brand-blue); }
.reference-grid strong { font-size: 0.84rem; }
.reference-grid span { color: var(--text-sub); font-size: 0.72rem; text-align: right; }
.reference-note { margin-top: 1.3rem; padding: 1rem; color: var(--text-muted); background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); font-size: 0.8rem; line-height: 1.7; }
.license-callout { padding: 1.5rem; background: #172554; border-radius: var(--radius-lg); color: #fff; }
.license-callout strong { font-size: 1.08rem; }
.license-callout p { margin-top: 0.7rem; color: #cbd5e1; line-height: 1.75; }
.about-policy-list { display: grid; gap: 0.75rem; margin: 1.5rem 0; padding-left: 1.25rem; color: var(--text-muted); line-height: 1.7; }
.about-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.about-actions a { padding: 0.65rem 0.9rem; border: 1px solid var(--border-color); border-radius: var(--radius-md); font-size: 0.82rem; font-weight: 750; }
.about-actions .about-primary-link { color: #fff; background: var(--brand-blue); border-color: var(--brand-blue); }
.event-detail-main { width: min(880px, 100%); margin-inline: auto; }

.knowledge-overview {
  margin: 1.8rem 0 2.2rem;
  padding: 1.35rem;
  border: 1px solid color-mix(in srgb, var(--brand-blue) 28%, var(--border-color));
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--brand-blue-light), var(--bg-card) 72%);
}
.knowledge-overview-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem; }
.knowledge-overview-heading h2 { margin: 0.15rem 0 0; font-size: 1.12rem; }
.knowledge-overview-heading > p { max-width: 28rem; margin: 0; color: var(--text-muted); font-size: 0.82rem; text-align: right; }
.knowledge-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.7rem; }
.knowledge-metric { padding: 0.9rem; border: 1px solid var(--border-light); border-radius: var(--radius-md); background: color-mix(in srgb, var(--bg-card) 88%, transparent); }
.knowledge-metric strong { display: block; color: var(--brand-blue); font-size: 1.55rem; line-height: 1; }
.knowledge-metric span { display: block; margin-top: 0.45rem; color: var(--text-muted); font-size: 0.76rem; font-weight: 700; }
.event-brief-knowledge { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.event-brief-knowledge span { padding: 0.28rem 0.48rem; border: 1px solid var(--border-light); border-radius: 999px; background: var(--brand-blue-light); color: var(--text-muted); font-size: 0.7rem; font-weight: 650; }
.event-brief-knowledge strong { color: var(--brand-blue); }

@media (max-width: 680px) {
  .knowledge-overview-heading { display: block; }
  .knowledge-overview-heading > p { margin-top: 0.55rem; text-align: left; }
  .knowledge-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.topic-linked-section { margin-top: 2.5rem; }

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-top: 4rem;
  padding: 2rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
}

.app-footer nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.app-footer a { color: inherit; font-weight: 650; text-decoration: none; }

@media (max-width: 1024px) {
  body {
    display: block;
    padding-top: 3.75rem;
  }
  .app-sidebar {
    width: 100%;
    height: 3.75rem;
    bottom: auto;
    flex-direction: row;
    align-items: center;
    padding: 0.45rem 0.75rem;
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--border-color);
  }
  .app-logo {
    flex: 0 0 auto;
    padding: 0 0.7rem 0 0;
    border-right: 1px solid var(--border-light);
    border-bottom: 0;
  }
  .app-logo span, .sidebar-section-title { display: none; }
  .sidebar-nav {
    min-width: 0;
    flex-direction: row;
    gap: 0.2rem;
    margin-top: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .nav-item {
    flex: 0 0 auto;
    gap: 0;
    min-height: 2.75rem;
    padding: 0.55rem 0.7rem;
    white-space: nowrap;
  }
  .app-sidebar .nav-index { display: none; }
  .app-sidebar .nav-label { display: inline; }
  .app-main { width: 100%; margin-left: 0; }
  .app-header { top: 3.75rem; }
  .section-board-grid, .section-board-grid.topic-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .app-logo { display: none; }
  .app-sidebar { padding-inline: 0.5rem; }
  .nav-item { padding-inline: 0.65rem; }
  .app-header { height: auto; min-height: var(--header-h); padding: 0.65rem 0.75rem; }
  .header-context, .today-link { display: none; }
  .header-tools { width: 100%; min-width: 0; }
  .header-tools .search-input-wrap { width: 100%; min-width: 0; max-width: none; }
  .search-input-wrap input { width: 100%; }
  .search-results { right: 0; width: min(28rem, calc(100vw - 1.5rem)); }
}

@media (max-width: 640px) {
  .header-context span { display: none; }
  .search-input-wrap { max-width: 14rem; }
  .section-board-grid, .section-board-grid.topic-directory { grid-template-columns: 1fr; }
  .app-footer { align-items: flex-start; flex-direction: column; }
  .chronicle-index-header, .chronicle-feature-footer { align-items: flex-start; flex-direction: column; }
  .chronicle-feature { grid-template-columns: 1fr; }
  .chronicle-date-block { min-height: auto; flex-direction: row; align-items: center; padding: 1rem 1.25rem; }
  .chronicle-date-block strong { font-size: 1.5rem; writing-mode: initial; transform: none; }
  .chronicle-reading-layout { display: block; }
  .chronicle-toc { position: static; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); }
  .about-hero, .about-mission, .about-sources, .about-license { grid-template-columns: 1fr; gap: 1.5rem; }
  .about-principle-grid, .credit-grid, .reference-grid { grid-template-columns: 1fr; }
  .reference-grid a { align-items: flex-start; flex-direction: column; gap: 0.25rem; }
  .reference-grid span { text-align: left; }
}

@media (max-width: 640px) {
  .app-header { padding: 0 1rem; }
  .dashboard-content { padding: 1.25rem 1rem; }
  .dashboard-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .stats-grid { width: 100%; }
}

@media (max-width: 1024px) {
  .atlas-inspector { min-height: auto; }
}

@media (max-width: 640px) {
  .atlas-toolbar { align-items: stretch; flex-direction: column; }
  .atlas-filter-group { grid-template-columns: 1fr; gap: 0.35rem; }
  .atlas-region-filter { display: none; }
  .atlas-mobile-filter { display: block; }
  .atlas-mobile-filter { width: 100%; }
  .atlas-country-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .world-map-explorer, .atlas-world-vector, .atlas-world-vector > svg { min-height: 20rem; }
  .atlas-detail-header { flex-direction: column; gap: 0.5rem; }
  .atlas-primary-link { width: 100%; }
  .atlas-event-list { grid-template-columns: 1fr; }
}

/* Public-service messaging and evidence states */
.home-service-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: end;
  margin-bottom: 1rem;
  padding: clamp(1.5rem, 4vw, 3.5rem) 0 clamp(2rem, 5vw, 4rem);
}
.home-service-copy h1 { max-width: 52rem; margin: 0.55rem 0 1rem; font-size: clamp(2.4rem, 5vw, 4.7rem); line-height: 1.08; letter-spacing: -0.065em; }
.home-service-copy > p:not(.eyebrow) { max-width: 45rem; color: var(--text-muted); font-size: clamp(1rem, 1.6vw, 1.18rem); line-height: 1.85; }
.home-hero-actions { display: flex; align-items: center; gap: 1.1rem; margin-top: 1.7rem; font-size: 0.86rem; font-weight: 800; }
.home-hero-actions a { color: var(--brand-blue); }
.home-hero-actions .home-primary-action { padding: 0.78rem 1rem; color: #fff; background: var(--brand-blue); border-radius: var(--radius-md); }
.home-service-hero .stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; min-width: 0; }
.home-service-hero .stat-box { min-width: 0; }
.service-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 1.5rem; overflow: hidden; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); }
.service-flow article { display: flex; gap: 0.8rem; min-width: 0; padding: 1rem; border-right: 1px solid var(--border-light); }
.service-flow article:last-child { border-right: 0; }
.service-flow article > span { color: var(--brand-blue); font: 800 0.68rem/1.5 ui-monospace, monospace; }
.service-flow strong { display: block; margin-bottom: 0.25rem; font-size: 0.82rem; }
.service-flow p { color: var(--text-sub); font-size: 0.72rem; line-height: 1.5; }

.event-state-stack { display: flex; align-items: center; gap: 0.65rem; }
.evidence-state { display: inline-flex; align-items: center; width: fit-content; padding: 0.28rem 0.5rem; border: 1px solid; border-radius: 999px; font-size: 0.66rem; font-weight: 850; white-space: nowrap; }
.evidence-state-verified { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.evidence-state-multiple { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.evidence-state-primary { color: #6d28d9; background: #f5f3ff; border-color: #ddd6fe; }
.evidence-state-observed { color: #a16207; background: #fefce8; border-color: #fde68a; }
.evidence-explainer { margin: 1rem 0 0; padding-top: 0.9rem; color: var(--text-muted); border-top: 1px solid var(--border-light); font-size: 0.76rem; line-height: 1.65; }

.chronicle-reading-cues { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin: 1.5rem 0; }
.chronicle-reading-cues span { padding: 0.75rem; color: var(--text-muted); background: color-mix(in srgb, var(--bg-card) 80%, transparent); border: 1px solid var(--border-color); border-radius: var(--radius-md); font-size: 0.74rem; line-height: 1.5; }
.chronicle-reading-cues strong { display: block; margin-bottom: 0.2rem; color: var(--brand-blue); font-size: 0.62rem; letter-spacing: 0.07em; }

.about-hero-copy { display: grid; gap: 0.8rem; }
.about-hero-copy p { color: var(--text-muted); font-size: 1.02rem; line-height: 1.85; }
.about-principle-grid.about-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.about-transparency { margin-top: 1.3rem; padding: 1.2rem 1.3rem; background: var(--brand-blue-light); border: 1px solid color-mix(in srgb, var(--brand-blue) 22%, var(--border-color)); border-radius: var(--radius-md); }
.about-transparency strong { color: var(--brand-blue); font-size: 0.82rem; }
.about-transparency p { margin-top: 0.45rem; color: var(--text-muted); font-size: 0.84rem; line-height: 1.7; }

@media (max-width: 640px) {
  .home-service-hero { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 0.5rem; }
  .home-service-copy h1 { font-size: clamp(2.15rem, 11vw, 3.2rem); }
  .home-hero-actions { align-items: flex-start; flex-direction: column; }
  .service-flow { grid-template-columns: 1fr 1fr; }
  .service-flow article:nth-child(2) { border-right: 0; }
  .service-flow article:nth-child(-n + 2) { border-bottom: 1px solid var(--border-light); }
  .about-principle-grid.about-product-grid, .chronicle-reading-cues { grid-template-columns: 1fr; }
  .event-brief-link, .event-brief-featured .event-brief-link { padding: 1rem; }
  .event-brief-featured h2 { font-size: 1.15rem; }
  .event-brief-number { font-size: 1.25rem; }
}

@media (max-width: 400px) {
  .service-flow { grid-template-columns: 1fr; }
  .service-flow article { border-right: 0; border-bottom: 1px solid var(--border-light); }
  .service-flow article:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Country pages are exploration hubs, not isolated documents. */
.country-detail-page { width: min(1180px, 100%); margin-inline: auto; }
.country-detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: end;
  padding: clamp(1.4rem, 4vw, 2.8rem);
  background: linear-gradient(120deg, #eff6ff, var(--bg-card) 72%);
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--brand-blue);
  border-radius: var(--radius-lg);
}
.country-detail-heading h1 { margin: 0.35rem 0 0.7rem; font-size: clamp(2.3rem, 5vw, 4.2rem); line-height: 1; letter-spacing: -0.06em; }
.country-detail-heading > p:not(.eyebrow) { max-width: 45rem; color: var(--text-muted); font-size: 1rem; line-height: 1.75; }
.country-geography { display: flex; align-items: center; gap: 0.45rem; margin-top: 1rem; color: var(--text-sub); font-size: 0.78rem; }
.country-geography a { color: var(--brand-blue); font-weight: 800; }
.country-geography strong { color: var(--text-muted); }
.country-detail-stats { display: grid; grid-template-columns: repeat(3, minmax(6.5rem, 1fr)); overflow: hidden; background: color-mix(in srgb, var(--bg-card) 88%, transparent); border: 1px solid var(--border-color); border-radius: var(--radius-md); }
.country-detail-stats > div { padding: 1rem; border-right: 1px solid var(--border-light); }
.country-detail-stats > div:last-child { border-right: 0; }
.country-detail-stats strong { display: block; font-size: 1.35rem; }
.country-detail-stats span { display: block; margin-top: 0.25rem; color: var(--text-sub); font-size: 0.66rem; font-weight: 750; white-space: nowrap; }
.country-topic-overview { margin-top: 2rem; }
.country-topic-links { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.country-topic-links a { display: flex; align-items: center; gap: 0.45rem; padding: 0.55rem 0.7rem; color: var(--topic-color); background: var(--topic-soft); border: 1px solid color-mix(in srgb, var(--topic-color) 28%, transparent); border-radius: var(--radius-md); }
.country-topic-links a:hover { transform: translateY(-1px); border-color: var(--topic-color); }
.country-topic-links i { width: 0.5rem; height: 0.5rem; background: var(--topic-color); border-radius: 50%; }
.country-topic-links strong { font-size: 0.78rem; }
.country-topic-links span { color: var(--text-muted); font-size: 0.65rem; }
.country-event-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; margin-bottom: 0.85rem; }
.country-event-meta time { color: var(--text-sub); font-size: 0.7rem; font-weight: 750; }
.country-wiki-grid .empty-state { grid-column: 1 / -1; }

@media (max-width: 760px) {
  .country-detail-header { grid-template-columns: 1fr; align-items: start; }
  .country-detail-stats { width: 100%; }
}

@media (max-width: 420px) {
  .country-detail-stats { grid-template-columns: 1fr; }
  .country-detail-stats > div { display: flex; align-items: baseline; justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--border-light); }
  .country-detail-stats > div:last-child { border-bottom: 0; }
  .country-detail-stats span { margin-top: 0; }
}
/* Wiki keyword index: ranked discovery on the left, evidence brief on the right. */
.event-keyword-links{display:grid;grid-template-columns:minmax(13rem,.55fr) minmax(0,1.45fr);gap:1.25rem;margin:1.5rem 0;padding:1.25rem;border:1px solid var(--border-light);border-radius:14px;background:#f8fafc}.event-keyword-links h2{margin:.15rem 0 .45rem;font-size:1.2rem}.event-keyword-links p{margin:0;color:var(--text-muted);font-size:.82rem;line-height:1.65}.event-keyword-chips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem}.event-keyword-chips a{display:grid;gap:.22rem;padding:.75rem .8rem;border:1px solid #dbe3ef;border-radius:10px;background:#fff;color:var(--text-main);text-decoration:none}.event-keyword-chips a:hover{border-color:var(--brand-blue);box-shadow:0 6px 18px rgba(15,23,42,.06)}.event-keyword-chips strong{font-size:.84rem}.event-keyword-chips span{color:var(--text-muted);font-size:.68rem}@media(max-width:800px){.event-keyword-links,.event-keyword-chips{grid-template-columns:1fr}}
.wiki-index-hero{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(16rem,.7fr);gap:2rem;margin-bottom:1.5rem;padding:2rem;border-radius:18px;background:linear-gradient(135deg,#0f172a,#1e3a5f);color:#fff}.wiki-index-hero h1{margin:.2rem 0 .75rem;font-size:clamp(2rem,4vw,3.4rem);line-height:1.04}.wiki-index-hero p{max-width:50rem;margin:0;color:#cbd5e1;line-height:1.75}.wiki-index-guide{align-self:start;padding:1.1rem 1.2rem;border:1px solid rgba(255,255,255,.16);border-radius:12px;background:rgba(255,255,255,.07)}.wiki-index-guide strong{display:block;margin-bottom:.6rem}.wiki-index-guide ol{margin:0;padding-left:1.15rem;color:#dbeafe;font-size:.84rem;line-height:1.8}.wiki-keyword-controls{display:grid;grid-template-columns:minmax(15rem,1fr) repeat(3,minmax(9rem,.42fr));gap:.8rem;margin-bottom:1rem}.wiki-keyword-controls label{display:grid;gap:.38rem;font-size:.72rem;font-weight:800;color:var(--text-muted)}.wiki-keyword-controls input,.wiki-keyword-controls select{width:100%;border:1px solid var(--border-light);border-radius:10px;background:#fff;color:var(--text-main);padding:.78rem .85rem;font:inherit}.wiki-keyword-layout{display:grid;grid-template-columns:minmax(19rem,.82fr) minmax(0,1.35fr);gap:1.1rem;align-items:start}.wiki-keyword-directory,.wiki-keyword-detail{background:#fff;border:1px solid var(--border-light);border-radius:14px}.wiki-keyword-directory{padding:.75rem}.wiki-directory-heading,.wiki-detail-heading,.wiki-detail-section-title{display:flex;align-items:center;justify-content:space-between;gap:1rem}.wiki-directory-heading{padding:.55rem .55rem .85rem;border-bottom:1px solid var(--border-light)}.wiki-directory-heading h2{margin:.1rem 0 0;font-size:1.15rem}.wiki-directory-heading>strong{font-size:.78rem;color:var(--text-muted)}.wiki-keyword-list{display:grid;gap:.3rem;padding-top:.45rem}.wiki-keyword-card{display:grid;grid-template-columns:2.15rem minmax(0,1fr) auto;align-items:center;gap:.7rem;width:100%;padding:.72rem;border:0;border-radius:10px;background:transparent;text-align:left;color:var(--text-main);cursor:pointer}.wiki-keyword-card:hover,.wiki-keyword-card.active{background:#eef4ff}.wiki-keyword-card.active{box-shadow:inset 3px 0 var(--brand-blue)}.wiki-keyword-card:focus-visible{outline:3px solid var(--brand-blue);outline-offset:1px}.wiki-keyword-score,.wiki-detail-score{display:grid;place-items:center;border-radius:9px;background:#e0e7ff;color:#3730a3;font-weight:900}.wiki-keyword-score{width:2.15rem;height:2.15rem;font-size:.72rem}.wiki-keyword-copy{min-width:0;display:grid;gap:.18rem}.wiki-keyword-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.93rem}.wiki-keyword-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-muted);font-size:.7rem}.wiki-keyword-count{font-size:.68rem;color:var(--text-muted);white-space:nowrap}.wiki-keyword-more{width:100%;margin-top:.55rem;padding:.7rem;border:1px solid var(--border-light);border-radius:9px;background:#f8fafc;color:var(--text-main);font-weight:800;cursor:pointer}.wiki-keyword-detail{position:sticky;top:1rem;padding:1.5rem}.wiki-detail-heading h2{margin:.15rem 0 0;font-size:1.65rem}.wiki-detail-score{width:3rem;height:3rem;font-size:1rem}.wiki-keyword-detail>p{color:var(--text-muted);line-height:1.7}.wiki-detail-aliases{display:flex;flex-wrap:wrap;gap:.4rem;margin:1rem 0}.wiki-detail-aliases span{padding:.25rem .55rem;border:1px solid #dbe3ef;border-radius:999px;background:#f8fafc;color:#475569;font-size:.75rem}.wiki-detail-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem;margin:1rem 0}.wiki-detail-meta div{padding:.7rem;border-radius:9px;background:#f8fafc}.wiki-detail-meta dt{font-size:.68rem;color:var(--text-muted)}.wiki-detail-meta dd{margin:.25rem 0 0;font-size:.8rem;font-weight:800}.wiki-detail-evidence{padding:.75rem .85rem;border-left:3px solid var(--brand-blue);background:#f8fafc;color:#475569;font-size:.78rem}.wiki-detail-events{margin-top:1.25rem}.wiki-detail-section-title h3{margin:0;font-size:1rem}.wiki-detail-section-title span{font-size:.72rem;color:var(--text-muted)}.wiki-detail-event-list{display:grid;gap:.45rem;margin-top:.65rem}.wiki-detail-event-list a{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.78rem;border:1px solid var(--border-light);border-radius:9px;color:var(--text-main);text-decoration:none}.wiki-detail-event-list a:hover{border-color:var(--brand-blue);background:#f8fbff}.wiki-detail-event-list a span{display:grid;gap:.25rem}.wiki-detail-event-list small{color:var(--text-muted);font-size:.7rem}.wiki-detail-event-list b{color:var(--brand-blue)}.wiki-detail-page-link{display:inline-flex;margin-top:1rem;color:var(--brand-blue);font-weight:850;text-decoration:none}@media(max-width:900px){.wiki-keyword-controls{grid-template-columns:1fr 1fr}.wiki-keyword-layout{grid-template-columns:minmax(16rem,.72fr) minmax(0,1.28fr)}}@media(max-width:800px){.wiki-index-hero,.wiki-keyword-controls,.wiki-keyword-layout{grid-template-columns:1fr}.wiki-index-hero{padding:1.35rem;gap:1.2rem}.wiki-keyword-detail{position:static;scroll-margin-top:1rem}.wiki-detail-meta{grid-template-columns:1fr}.wiki-keyword-directory{max-height:none}}
