:root {
  --bg: #07101d;
  --panel: #0d1726;
  --panel-2: #111d2e;
  --panel-3: #162337;
  --line: rgba(255,255,255,.10);
  --line-strong: rgba(255,255,255,.18);
  --text: #f5f7fb;
  --muted: #9ca9ba;
  --faint: #6e7b8c;
  --accent: #69e0b4;
  --accent-2: #87a7ff;
  --danger: #ff8d92;
  --shadow: 0 18px 50px rgba(0,0,0,.32);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --sidebar: 350px;
  --topbar: 72px;
  --notice: 48px;
  --timeline: 166px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --cat-probability: #78a7ff;
  --cat-bayesian: #ad91ff;
  --cat-official: #f7c768;
  --cat-survey: #ff9d72;
  --cat-inference: #63d4f3;
  --cat-modeling: #5ee1b7;
  --cat-causal: #ff7da5;
  --cat-computing: #a8d86d;
  --cat-visualization: #f78fe7;
  --cat-quality: #e9a86c;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: var(--bg); color: var(--text); font-family: var(--font); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.fatal { padding: 24px; background: #331b1f; color: #fff; }

.app-shell { height: 100%; display: grid; grid-template-rows: var(--topbar) var(--notice) minmax(0,1fr); min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 22px; border-bottom: 1px solid var(--line); background: #091321;
  position: relative; z-index: 900;
}
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand h1 { margin: 0; font-size: 19px; letter-spacing: .02em; font-weight: 720; white-space: nowrap; }
.brand p { margin: 3px 0 0; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark { width: 38px; height: 38px; border: 1px solid var(--line-strong); border-radius: 12px; position: relative; overflow: hidden; background: #101e30; flex: 0 0 auto; }
.brand-grid { position: absolute; inset: 8px; background-image: linear-gradient(rgba(255,255,255,.12) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.12) 1px,transparent 1px); background-size: 7px 7px; border-radius: 5px; }
.brand-dot { position: absolute; width: 8px; height: 8px; right: 7px; top: 7px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 16px rgba(105,224,180,.8); }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.logo-card {
  width: 52px;
  height: 52px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.site-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.about-brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #d7e1ea;
  border-radius: 10px;
  background: #f8fafc;
  margin-bottom: 4px;
}
.about-logo-card {
  width: 132px;
  min-width: 132px;
  height: 132px;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: none;
}
.about-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.about-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.about-brand-copy strong {
  font-size: 18px;
  font-weight: 720;
  color: #172333;
}
.about-brand-copy span {
  color: #5f6f82;
  font-size: 13px;
}

.button { border: 1px solid var(--line-strong); background: var(--panel-2); border-radius: 11px; min-height: 38px; padding: 0 14px; cursor: pointer; transition: transform .14s ease, background .14s ease, border-color .14s ease; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.button:hover { background: var(--panel-3); border-color: rgba(255,255,255,.28); }
.button:active { transform: translateY(1px) scale(.99); }
.button.primary { background: var(--accent); color: #082018; border-color: transparent; font-weight: 700; }
.button.primary:hover { background: #79ebc1; }
.button.ghost { background: rgba(255,255,255,.04); }
.text-button { border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; padding: 5px 0; }
.text-button:hover { color: var(--text); }
.icon-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 20px; width: 28px; height: 28px; }


.safety-notice {
  min-width: 0; display: flex; align-items: center; gap: 12px; padding: 0 18px;
  border-bottom: 1px solid rgba(247,199,104,.2); background: #111827; color: #d8e0eb;
  position: relative; z-index: 880;
}
.safety-notice .cutoff-chip, .safety-notice .audit-chip {
  flex: 0 0 auto; border: 1px solid rgba(247,199,104,.34); background: rgba(247,199,104,.08);
  color: #f5d99c; border-radius: 999px; padding: 6px 9px; font-size: 10px; font-weight: 720;
  letter-spacing: .02em; white-space: nowrap;
}
.safety-notice p { min-width: 0; flex: 1; margin: 0; color: #bdc8d6; font-size: 11px; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.safety-notice button { flex: 0 0 auto; border: 0; background: transparent; color: var(--accent); padding: 7px 0; font-size: 11px; font-weight: 680; cursor: pointer; }
.safety-notice button:hover { text-decoration: underline; }

.workspace { min-height: 0; min-width: 0; display: grid; grid-template-columns: var(--sidebar) minmax(0,1fr); }
.sidebar { min-width: 0; min-height: 0; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; position: relative; z-index: 650; }
.sidebar-head { padding: 16px 16px 13px; border-bottom: 1px solid var(--line); }
.search-box { height: 43px; border: 1px solid var(--line); background: rgba(0,0,0,.16); border-radius: 12px; display: grid; grid-template-columns: 28px minmax(0,1fr) 28px; align-items: center; padding: 0 9px; color: var(--muted); }
.search-box:focus-within { border-color: rgba(105,224,180,.65); box-shadow: 0 0 0 3px rgba(105,224,180,.09); }
.search-box input { border: 0; outline: 0; background: transparent; color: var(--text); min-width: 0; width: 100%; font-size: 13px; }
.search-box input::placeholder { color: #6f7d90; }
.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.metrics div { min-width: 0; border: 1px solid var(--line); background: rgba(255,255,255,.025); border-radius: 10px; padding: 9px 8px; display: flex; flex-direction: column; gap: 2px; }
.metrics strong { font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metrics span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.filter-section { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.section-title-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.section-title-row h2 { font-size: 12px; margin: 0; color: #d7deea; letter-spacing: .08em; text-transform: uppercase; }
.category-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.category-chip { min-width: 0; border: 1px solid var(--line); background: rgba(255,255,255,.025); border-radius: 10px; padding: 8px 9px; display: flex; gap: 8px; align-items: center; cursor: pointer; user-select: none; transition: opacity .14s ease, border-color .14s ease, background .14s ease; }
.category-chip:hover { background: rgba(255,255,255,.055); }
.category-chip.off { opacity: .38; }
.category-chip input { display: none; }
.category-chip .dot { width: 8px; height: 8px; border-radius: 999px; flex: 0 0 auto; box-shadow: 0 0 0 3px rgba(255,255,255,.035); }
.category-chip span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.compact-filters { padding-top: 10px; padding-bottom: 10px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; cursor: pointer; gap: 10px; padding: 6px 0; }
.switch-row > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.switch-row strong { font-size: 12px; font-weight: 620; }
.switch-row small { font-size: 10px; color: var(--muted); }
.switch-row input { display: none; }
.switch-row i { position: relative; width: 36px; height: 21px; background: #28364a; border-radius: 999px; flex: 0 0 auto; transition: background .18s ease; }
.switch-row i::after { content:""; position: absolute; width: 15px; height: 15px; border-radius: 50%; background: #d5dde9; left: 3px; top: 3px; transition: transform .18s ease, background .18s ease; }
.switch-row input:checked + i { background: rgba(105,224,180,.32); }
.switch-row input:checked + i::after { transform: translateX(15px); background: var(--accent); }
.event-list-section { min-height: 0; flex: 1; display: flex; flex-direction: column; padding: 13px 10px 0; }
.event-list-section .section-title-row { padding: 0 6px; }
.sort-control { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.sort-control select, .timeline-mode select { color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; height: 31px; padding: 0 8px; outline: 0; }
.event-list { min-height: 0; overflow: auto; padding: 0 5px 22px; scrollbar-width: thin; scrollbar-color: #33445a transparent; }
.event-list::-webkit-scrollbar { width: 8px; }
.event-list::-webkit-scrollbar-thumb { background: #314157; border-radius: 999px; }
.event-card { border: 1px solid transparent; border-bottom-color: var(--line); padding: 12px 9px; display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 10px; cursor: pointer; border-radius: 11px; transition: background .14s ease, border-color .14s ease; }
.event-card:hover, .event-card.active { background: rgba(255,255,255,.045); border-color: var(--line); }
.event-card-year { color: var(--accent); font-size: 15px; font-weight: 760; font-variant-numeric: tabular-nums; padding-top: 2px; }
.event-card-body { min-width: 0; }
.event-card h3 { margin: 0; font-size: 13px; line-height: 1.42; font-weight: 660; }
.event-card p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.event-meta { margin-top: 7px; display: flex; gap: 7px; flex-wrap: wrap; color: var(--faint); font-size: 10px; }
.event-meta .meta-category { color: var(--category-color); }
.importance-dots { display: inline-flex; align-items: center; gap: 2px; }
.importance-dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .26; }
.importance-dots i.on { opacity: 1; }
.empty-state { margin: auto; padding: 25px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); }
.empty-state strong { color: var(--text); }
.empty-state span { font-size: 12px; line-height: 1.6; }

.map-stage { min-width: 0; min-height: 0; position: relative; overflow: hidden; background: #dfe5ea; }
#map { position: absolute; inset: 0; background: #dfe5ea; }
.map-fallback { position: absolute; inset: 0; z-index: 500; background: linear-gradient(135deg,#12243a,#0e1724); display: grid; place-content: center; text-align: center; padding: 24px; }
.map-fallback p { color: var(--muted); max-width: 520px; line-height: 1.7; }
.leaflet-container { font-family: var(--font); }
.leaflet-control-zoom a { background: #0e1928 !important; color: white !important; border-color: rgba(255,255,255,.13) !important; }
.leaflet-control-attribution { background: rgba(255,255,255,.82) !important; font-size: 9px !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #101b2b; color: var(--text); }
.leaflet-popup-content-wrapper { border-radius: 13px; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.11); }
.leaflet-popup-content { margin: 13px 14px; width: 245px !important; }
.popup-card .popup-year { color: var(--accent); font-size: 12px; font-weight: 800; }
.popup-card h3 { margin: 4px 0 6px; font-size: 14px; line-height: 1.35; }
.popup-card p { margin: 0; color: var(--muted); line-height: 1.48; font-size: 11px; }
.popup-card button { margin-top: 10px; width: 100%; border: 0; border-radius: 9px; background: var(--accent); color: #082018; height: 32px; font-weight: 700; cursor: pointer; }
.stat-marker { background: transparent; border: 0; }
.stat-marker-core { width: var(--marker-size); height: var(--marker-size); border-radius: 50%; background: var(--marker-color); border: 2px solid rgba(255,255,255,.92); box-shadow: 0 3px 12px rgba(0,0,0,.35), 0 0 0 4px color-mix(in srgb,var(--marker-color) 22%,transparent); transition: transform .15s ease; }
.stat-marker-core:hover { transform: scale(1.18); }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: rgba(9,19,33,.28); }
.marker-cluster div { color: #07101d; background: var(--accent); font-weight: 800; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.map-top-left { position: absolute; top: 14px; left: 14px; z-index: 600; display: flex; gap: 8px; align-items: center; }
.map-status { background: rgba(8,17,30,.88); color: #dfe6f1; border: 1px solid rgba(255,255,255,.13); border-radius: 11px; padding: 9px 11px; font-size: 11px; box-shadow: 0 8px 25px rgba(0,0,0,.18); backdrop-filter: blur(8px); }
.mobile-filter-button { display: none; border: 1px solid rgba(255,255,255,.16); background: #0c1725; color: white; border-radius: 11px; height: 38px; padding: 0 12px; }
.legend { position: absolute; right: 14px; top: 14px; z-index: 600; width: 196px; background: rgba(8,17,30,.9); border: 1px solid rgba(255,255,255,.13); border-radius: 13px; overflow: hidden; box-shadow: 0 10px 28px rgba(0,0,0,.2); backdrop-filter: blur(8px); }
.legend-toggle { width: 100%; border: 0; background: transparent; color: var(--text); height: 38px; padding: 0 12px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 650; font-size: 12px; }
.legend-body { padding: 0 12px 11px; display: grid; grid-template-columns: 1fr; gap: 6px; }
.legend-item { display: flex; align-items: center; gap: 7px; color: #c7d0dd; font-size: 10px; }
.legend-item i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.timeline-dock { position: absolute; z-index: 610; left: 18px; right: 18px; bottom: 18px; min-height: var(--timeline); background: rgba(8,17,30,.94); border: 1px solid rgba(255,255,255,.14); border-radius: 18px; box-shadow: 0 22px 60px rgba(0,0,0,.28); padding: 14px 16px 12px; backdrop-filter: blur(12px); }
.timeline-topline { display: grid; grid-template-columns: minmax(120px,1fr) auto minmax(190px,1fr); gap: 12px; align-items: center; }
.year-readout { min-width: 0; display: flex; flex-direction: column; }
.year-readout span { font-size: 28px; line-height: 1; font-weight: 780; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.year-readout small { color: var(--muted); margin-top: 3px; font-size: 10px; }
.timeline-actions { display: flex; align-items: center; gap: 7px; }
.circle-button, .play-button { border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--text); border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.circle-button { width: 33px; height: 33px; font-size: 20px; }
.play-button { width: 41px; height: 41px; background: var(--accent); color: #082018; border-color: transparent; }
.play-button span { transform: translateX(1px); }
.timeline-mode { justify-self: end; display: flex; gap: 7px; }
.range-row { display: grid; grid-template-columns: 36px minmax(0,1fr) 36px; gap: 9px; align-items: center; margin-top: 13px; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.range-row > span:last-child { text-align: right; }
.range-wrap { position: relative; height: 28px; min-width: 0; }
.range-base { position: absolute; z-index: 1; left: 0; right: 0; top: 12px; height: 4px; border-radius: 999px; background: rgba(255,255,255,.14); pointer-events: none; }
.range-wrap input { position: absolute; z-index: 4; inset: 0; width: 100%; height: 28px; background: transparent; appearance: none; cursor: pointer; margin: 0; pointer-events: none; }
.range-wrap input.range-start { z-index: 5; }
.range-wrap input.range-end { z-index: 6; }
.range-wrap input::-webkit-slider-runnable-track { height: 4px; background: transparent; border-radius: 999px; }
.range-wrap input::-moz-range-track { height: 4px; background: transparent; border-radius: 999px; }
.range-wrap input::-webkit-slider-thumb { appearance: none; pointer-events: auto; width: 17px; height: 17px; border-radius: 50%; background: var(--accent); border: 3px solid #0d1827; box-shadow: 0 0 0 2px rgba(105,224,180,.38); margin-top: -6px; }
.range-wrap input::-moz-range-thumb { pointer-events: auto; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); border: 3px solid #0d1827; box-shadow: 0 0 0 2px rgba(105,224,180,.38); }
.range-progress { position: absolute; z-index: 2; top: 12px; height: 4px; background: linear-gradient(90deg,var(--accent-2),var(--accent)); border-radius: 999px; pointer-events: none; }
.range-disabled { opacity: .5; }
.range-disabled input { pointer-events: none; cursor: default; }

.timeline-ticks { position: absolute; z-index: 1; inset: 0; pointer-events: none; }
.timeline-ticks i { position: absolute; top: 8px; width: 2px; height: 10px; background: rgba(255,255,255,.16); border-radius: 2px; }
.era-buttons { margin-top: 7px; display: flex; gap: 6px; overflow: auto hidden; scrollbar-width: none; }
.era-buttons::-webkit-scrollbar { display: none; }
.era-buttons button { border: 1px solid var(--line); background: rgba(255,255,255,.035); color: var(--muted); border-radius: 999px; height: 27px; padding: 0 10px; font-size: 10px; white-space: nowrap; cursor: pointer; }
.era-buttons button:hover, .era-buttons button.active { color: var(--text); border-color: rgba(105,224,180,.45); background: rgba(105,224,180,.09); }

.detail-drawer { position: fixed; inset: 0; z-index: 1300; pointer-events: none; visibility: hidden; }
.detail-drawer.open { pointer-events: auto; visibility: visible; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.42); opacity: 0; transition: opacity .2s ease; }
.detail-drawer.open .drawer-scrim { opacity: 1; }
.drawer-panel { position: absolute; top: 0; bottom: 0; right: 0; width: min(520px,94vw); background: #0b1523; border-left: 1px solid var(--line-strong); box-shadow: -25px 0 70px rgba(0,0,0,.38); transform: translateX(102%); transition: transform .24s cubic-bezier(.2,.75,.2,1); display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.detail-drawer.open .drawer-panel { transform: translateX(0); }
.drawer-header { display: flex; justify-content: space-between; gap: 18px; padding: 22px 22px 18px; border-bottom: 1px solid var(--line); }
.detail-kicker, .eyebrow { display: block; color: var(--accent); font-size: 11px; letter-spacing: .13em; text-transform: uppercase; font-weight: 760; margin-bottom: 7px; }
.drawer-header h2 { margin: 0; font-size: 23px; line-height: 1.35; }
.drawer-close { border: 1px solid var(--line); background: rgba(255,255,255,.035); color: var(--muted); width: 36px; height: 36px; border-radius: 50%; font-size: 22px; cursor: pointer; flex: 0 0 auto; }
.drawer-content { overflow: auto; padding: 20px 22px 34px; }
.detail-location { display: grid; gap: 9px; color: #dbe3ee; font-size: 12px; }
.location-overview { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 2px; }
.location-overview strong { margin-right: auto; font-size: 12px; }
.location-overview span, .location-card-tags span, .location-card-head > span { border: 1px solid var(--line); border-radius: 999px; padding: 5px 8px; background: rgba(255,255,255,.03); }
.location-card { border: 1px solid var(--line); border-radius: 13px; padding: 11px 12px; background: rgba(255,255,255,.025); }
.location-card.primary { border-color: rgba(105,224,180,.34); background: rgba(105,224,180,.045); }
.location-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.location-card-head div { min-width: 0; }
.location-card-head strong { display: block; font-size: 13px; line-height: 1.4; }
.location-card-head small { display: block; margin-top: 3px; color: #aeb9c8; font-size: 10px; line-height: 1.4; }
.location-card-head > span { flex: 0 0 auto; color: var(--accent); font-size: 9px; }
.location-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.location-card-tags span { color: #9caabc; font-size: 9px; padding: 4px 7px; }
.location-card p { margin: 9px 0 0; color: #aeb9c8; font-size: 11px; line-height: 1.6; }
.detail-map-note { color: var(--muted); font-size: 11px; line-height: 1.55; margin-top: 10px; }
.detail-verification { margin-top: 10px; padding: 9px 11px; border: 1px solid rgba(94,225,183,.24); border-radius: 10px; background: rgba(94,225,183,.055); color: #bdebdc; font-size: 10px; line-height: 1.5; }
.detail-section { padding-top: 22px; }
.detail-section h3 { margin: 0 0 8px; font-size: 11px; letter-spacing: .10em; text-transform: uppercase; color: #c8d1df; }
.detail-section p { margin: 0; color: #c4cfdd; line-height: 1.76; font-size: 14px; }
.impact-section { position: relative; margin-top: 20px; padding: 18px; border: 1px solid rgba(105,224,180,.18); border-radius: 14px; background: rgba(105,224,180,.055); }
.impact-section h3 { color: var(--accent); }
.person-list, .tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.person-list span, .tag-list span { border: 1px solid var(--line); background: rgba(255,255,255,.03); border-radius: 9px; padding: 7px 9px; font-size: 11px; color: #d5deea; }
.tag-list span { border-radius: 999px; color: var(--muted); }
.source-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.source-heading span { color: var(--faint); font-size: 10px; }
.source-list { display: grid; gap: 8px; }
.source-item { display: grid; grid-template-columns: minmax(0,1fr) 22px; gap: 10px; align-items: center; text-decoration: none; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: rgba(255,255,255,.025); }
.source-item:hover { border-color: rgba(105,224,180,.36); background: rgba(105,224,180,.04); }
.source-item strong { font-size: 12px; line-height: 1.45; }
.source-item small { display: block; color: var(--faint); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-item i { font-style: normal; color: var(--accent); }
.source-safety-note { margin: 10px 0 0 !important; color: #8896a8 !important; font-size: 10px !important; line-height: 1.55 !important; }
.drawer-footer { border-top: 1px solid var(--line); padding: 13px 16px; display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 8px; background: #0a1421; }

.about-dialog { border: 0; padding: 0; background: transparent; color: var(--text); width: min(760px,94vw); max-height: 88vh; }
.about-dialog::backdrop { background: rgba(0,0,0,.62); backdrop-filter: blur(3px); }
.about-card { background: #0d1726; border: 1px solid var(--line-strong); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.about-card > header { padding: 20px 22px 17px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; }
.about-card h2 { margin: 0; font-size: 21px; }
.about-content { max-height: calc(88vh - 90px); overflow: auto; padding: 20px 22px 25px; }
.about-content section + section { margin-top: 20px; }
.about-content h3 { margin: 0 0 7px; font-size: 13px; }
.about-content p { color: #bdc8d7; line-height: 1.72; font-size: 13px; margin: 0; }
.selection-section { border-left: 2px solid rgba(105,224,180,.45); padding-left: 15px; }
.criteria-list { margin: 10px 0 12px; padding-left: 20px; color: #c8d3df; }
.criteria-list li { margin: 7px 0; padding-left: 3px; font-size: 12.5px; line-height: 1.65; }
.criteria-list li::marker { color: var(--accent); }
.selection-boundary { margin-top: 11px !important; padding: 11px 12px; border-radius: 11px; background: rgba(120,167,255,.07); border: 1px solid rgba(120,167,255,.18); color: #d7e2ef !important; }
.notice-card { border: 1px solid rgba(247,199,104,.26); border-radius: 14px; padding: 15px; background: rgba(247,199,104,.055); }
.notice-card h3 { color: #f5d99c; }
.download-panel { border: 1px solid var(--line); border-radius: 14px; padding: 15px; display: flex; justify-content: space-between; gap: 20px; align-items: center; background: rgba(255,255,255,.025); }
.download-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.compiled-note { margin-top: 18px !important; color: var(--faint) !important; font-size: 11px !important; }
.toast { position: fixed; z-index: 2000; left: 50%; bottom: 24px; transform: translate(-50%,20px); background: #0c1725; border: 1px solid var(--line-strong); border-radius: 999px; padding: 10px 15px; color: var(--text); font-size: 12px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.toast.show { opacity: 1; transform: translate(-50%,0); }

@media (max-width: 1000px) {
  :root { --sidebar: 315px; }
  .category-grid { grid-template-columns: 1fr; }
  .legend { width: 178px; }
}

@media (max-width: 760px) {
  :root { --topbar: 62px; --notice: 64px; --timeline: 174px; }
  .safety-notice { gap: 8px; padding: 7px 10px; align-items: center; }
  .safety-notice .cutoff-chip, .safety-notice .audit-chip { padding: 5px 7px; font-size: 9px; }
  .safety-notice p { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 9px; line-height: 1.35; }
  .safety-notice button { font-size: 9px; max-width: 68px; line-height: 1.2; }

  .topbar { padding: 0 12px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand h1 { font-size: 15px; }
  .brand p { display: block; font-size: 9px; letter-spacing: .045em; }
  .topbar-actions .button.ghost { display: none; }
  .topbar-actions .button.primary { min-height: 35px; padding: 0 11px; font-size: 11px; }
  .workspace { display: block; }
  .sidebar { position: fixed; z-index: 1100; top: calc(var(--topbar) + var(--notice)); bottom: 0; left: 0; width: min(360px,92vw); transform: translateX(-102%); transition: transform .22s ease; box-shadow: 20px 0 50px rgba(0,0,0,.38); }
  .sidebar.mobile-open { transform: translateX(0); }
  .map-stage { height: 100%; }
  .mobile-filter-button { display: inline-flex; align-items: center; }
  .map-status { max-width: 50vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .legend { top: 60px; right: 10px; width: 168px; }
  .timeline-dock { left: 8px; right: 8px; bottom: 8px; padding: 12px 12px 10px; border-radius: 16px; }
  .timeline-topline { grid-template-columns: 1fr auto; }
  .timeline-mode { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
  .timeline-mode select { flex: 1; min-width: 0; }
  .year-readout span { font-size: 24px; }
  .range-row { margin-top: 10px; }
  .era-buttons { margin-top: 4px; }
  .drawer-panel { width: 100vw; }
  .drawer-header { padding: 18px 16px 15px; }
  .drawer-header h2 { font-size: 20px; }
  .drawer-content { padding: 16px 16px 28px; }
  .drawer-footer { grid-template-columns: 1fr 1.2fr 1fr; padding: 10px; }
  .download-panel { align-items: flex-start; flex-direction: column; }
  .download-actions { width: 100%; }
  .download-actions .button { flex: 1; }
}

@media (max-width: 430px) {
  .brand h1 { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
  .map-status { display: none; }
  .legend { top: 14px; }
  .timeline-actions { gap: 5px; }
  .circle-button { width: 31px; height: 31px; }
  .play-button { width: 38px; height: 38px; }
  .era-buttons button { padding: 0 8px; }
}

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

.map-fallback { display: block; background: #dce5ec; color: #142032; overflow: hidden; }
#nativeMapSvg { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; user-select: none; touch-action: none; }
#nativeMapSvg.dragging { cursor: grabbing; }
.native-ocean { fill: #dfe8ee; }
.native-land { fill: #f8fafb; stroke: #d3dde5; stroke-width: .35; vector-effect: non-scaling-stroke; }
.native-country { fill: none; stroke: #aebbc7; stroke-width: .65; vector-effect: non-scaling-stroke; pointer-events: none; }
.native-connection { fill: none; stroke: rgba(15,78,95,.62); stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; pointer-events: none; }
.native-event { cursor: pointer; stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; filter: drop-shadow(0 2px 2px rgba(0,0,0,.28)); }
.native-event.secondary { fill-opacity: .34; stroke-width: 1.35; }
.native-event.secondary.selected { fill-opacity: .78; }
.native-event:hover, .native-event.selected { stroke: #07101d; stroke-width: 2.4; }
.native-cluster { cursor: zoom-in; }
.native-cluster circle { fill: #0b5ea8; stroke: #ffffff; stroke-width: 1.5; vector-effect: non-scaling-stroke; filter: drop-shadow(0 2px 2px rgba(0,0,0,.22)); }
.native-cluster text { fill: #ffffff; font-weight: 750; text-anchor: middle; dominant-baseline: central; pointer-events: none; user-select: none; }
.native-spider-line { fill: none; stroke: rgba(48,79,105,.55); stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; }

.place-count { display: inline-flex; margin-left: 4px; padding: 1px 5px; border-radius: 999px; background: rgba(105,224,180,.12); color: var(--accent); font-size: 9px; vertical-align: 1px; }
.native-map-controls { position: absolute; right: 14px; bottom: calc(var(--timeline) + 34px); z-index: 4; display: flex; background: #0d1827; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; overflow: hidden; box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.native-map-controls button { border: 0; border-right: 1px solid rgba(255,255,255,.12); background: transparent; color: white; min-width: 36px; height: 34px; cursor: pointer; }
.native-map-controls button:last-child { border-right: 0; }
.native-map-controls button:hover { background: rgba(255,255,255,.08); }
.native-map-tooltip { position: absolute; z-index: 8; pointer-events: none; background: #0c1725; color: white; border: 1px solid rgba(255,255,255,.15); border-radius: 9px; padding: 7px 9px; font-size: 10px; max-width: 250px; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
@media (max-width:760px) {
  .native-map-banner { left: 108px; right: 10px; max-width: none; }
  .native-map-controls { right: 10px; bottom: calc(var(--timeline) + 20px); }
}

/* Language choice */
.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(255,255,255,.035);
  flex: 0 0 auto;
}
.language-switch button {
  min-width: 34px;
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
  cursor: pointer;
}
.language-switch button:hover { color: var(--text); background: rgba(255,255,255,.055); }
.language-switch button.active { color: #082018; background: var(--accent); }
.legend-toggle b { font: inherit; }

html[lang="es"] .category-chip span:last-child,
html[lang="en"] .category-chip span:last-child { white-space: normal; line-height: 1.25; }
html[lang="es"] .category-chip,
html[lang="en"] .category-chip { min-height: 42px; }

@media (max-width: 1000px) {
  .topbar { gap: 10px; padding-left: 14px; padding-right: 14px; }
  .topbar-actions { gap: 6px; }
  .language-switch button { min-width: 31px; padding: 0 6px; }
}

@media (max-width: 760px) {
  .topbar-actions { margin-left: auto; }
  .language-switch { padding: 2px; }
  .language-switch button { min-width: 29px; height: 28px; padding: 0 5px; font-size: 10px; }
  #shareBtn { display: none; }
  html[lang="es"] .brand h1 { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 430px) {
  .brand { gap: 8px; }
  .brand-mark { width: 31px; height: 31px; }
  .brand h1 { max-width: 170px; font-size: 13px; }
  .brand p { font-size: 8px; }
  .topbar { padding-left: 8px; padding-right: 8px; }
  .language-switch button { min-width: 27px; padding: 0 4px; }
}

@media (max-width: 370px) {
  .brand p { display: none; }
  .brand h1 { max-width: 145px; }
}

/* Keep the offline-map notice separate from the live status pill. */
.map-fallback .native-map-banner { top: 58px; }
#yearSpan { font-size: 13px; letter-spacing: -.01em; }
@media (max-width: 760px) {
  .map-fallback .native-map-banner { display: none; }
}

.audit-chip { color:#bdebdc; border-color:rgba(94,225,183,.22)!important; background:rgba(94,225,183,.07)!important; }
@media (max-width: 720px){ .safety-notice .audit-chip{display:none;} }

/* --------------------------------------------------------------------------
   Official light interface — clean white workspace with a restrained blue rail
   -------------------------------------------------------------------------- */
:root {
  --bg: #f4f7fa;
  --panel: #ffffff;
  --panel-2: #f7f9fc;
  --panel-3: #edf3f8;
  --line: #d9e2ec;
  --line-strong: #c4d0dc;
  --text: #172333;
  --muted: #5f6f82;
  --faint: #8190a1;
  --accent: #0b5ea8;
  --accent-2: #2d7fbd;
  --danger: #b42318;
  --shadow: 0 14px 36px rgba(31, 50, 73, .14);
  --radius-sm: 7px;
  --radius: 10px;
  --radius-lg: 14px;
  --sidebar: 356px;
}

body { background: var(--bg); color: var(--text); }

.topbar {
  background: #ffffff;
  border-bottom-color: #d7e0e9;
  box-shadow: 0 1px 0 rgba(25, 46, 70, .03);
}
.brand h1 { color: #142235; font-weight: 720; }
.brand p { color: #66778a; letter-spacing: .045em; text-transform: none; }
.brand-mark {
  border: 0;
  border-radius: 0;
  background: transparent;
}
.logo-card { box-shadow: none; }
.brand-grid {
  background-image: linear-gradient(rgba(11,94,168,.18) 1px,transparent 1px),linear-gradient(90deg,rgba(11,94,168,.18) 1px,transparent 1px);
}
.brand-dot { background: #0b5ea8; box-shadow: none; }

.button {
  border-color: #c9d5e1;
  background: #ffffff;
  color: #26384b;
  border-radius: 7px;
  box-shadow: 0 1px 1px rgba(31,50,73,.03);
}
.button:hover { background: #f5f8fb; border-color: #aebdcb; }
.button.primary { background: #0b5ea8; color: #ffffff; border-color: #0b5ea8; }
.button.primary:hover { background: #094f8e; border-color: #094f8e; }
.button.ghost { background: #ffffff; }
.text-button { color: #d8e9f8; }
.text-button:hover { color: #ffffff; }
.icon-button { color: #6d7d8e; }

.language-switch {
  background: #f5f7fa;
  border-color: #d1dbe5;
  border-radius: 8px;
}
.language-switch button { color: #5e6d7d; border-radius: 6px; }
.language-switch button:hover { color: #17324f; background: #e8eef4; }
.language-switch button.active { color: #ffffff; background: #0b5ea8; }

.safety-notice {
  background: #f4f8fc;
  border-bottom-color: #d7e3ee;
  color: #31465d;
}
.safety-notice .cutoff-chip,
.safety-notice .audit-chip {
  border-color: #bdd1e3 !important;
  background: #e7f0f8 !important;
  color: #24567d !important;
}
.safety-notice p { color: #53687d; }
.safety-notice button { color: #0b5ea8; }

/* Blue navigation rail */
.sidebar {
  background: #0d4f83;
  border-right-color: #0a426e;
  color: #ffffff;
}
.sidebar-head,
.filter-section { border-bottom-color: rgba(255,255,255,.15); }
.search-box {
  background: #ffffff;
  border-color: rgba(255,255,255,.55);
  color: #617286;
  border-radius: 7px;
  box-shadow: 0 1px 2px rgba(4,37,66,.12);
}
.search-box:focus-within {
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255,255,255,.20);
}
.search-box input { color: #172333; }
.search-box input::placeholder { color: #7b8a99; }
.metrics div {
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.075);
  border-radius: 7px;
}
.metrics strong { color: #ffffff; }
.metrics span { color: #c7dced; }
.section-title-row h2 { color: #ffffff; letter-spacing: .055em; }
.category-chip {
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.075);
  border-radius: 7px;
  color: #ffffff;
}
.category-chip:hover { background: rgba(255,255,255,.13); }
.category-chip.off { opacity: .45; }
.category-chip .dot { box-shadow: 0 0 0 2px rgba(255,255,255,.22); }
.switch-row strong { color: #ffffff; }
.switch-row small { color: #bed3e4; }
.switch-row i { background: rgba(255,255,255,.23); }
.switch-row i::after { background: #ffffff; }
.switch-row input:checked + i { background: #73b7e6; }
.switch-row input:checked + i::after { background: #ffffff; }
.sort-control { color: #c7dced; }
.sort-control select {
  color: #1e3247;
  background: #ffffff;
  border-color: rgba(255,255,255,.45);
  border-radius: 6px;
}
.event-list { scrollbar-color: rgba(255,255,255,.32) transparent; }
.event-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.28); }
.event-card { border-bottom-color: rgba(255,255,255,.14); color: #ffffff; border-radius: 7px; }
.event-card:hover,
.event-card.active { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.16); }
.event-card-year { color: #d9eeff; }
.event-card h3 { color: #ffffff; }
.event-card p { color: #c5d9e9; }
.event-meta { color: #a9c6dc; }
.event-meta .meta-category { color: #ffffff; }
.empty-state { color: #c5d9e9; }
.empty-state strong { color: #ffffff; }
.sidebar .button.ghost { color: #ffffff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); }
.sidebar .button.ghost:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.42); }

/* Main map and floating controls */
.map-stage,
#map { background: #eef3f7; }
.leaflet-control-zoom a {
  background: #ffffff !important;
  color: #24415c !important;
  border-color: #d4dee8 !important;
}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip { background: #ffffff; color: var(--text); }
.leaflet-popup-content-wrapper { border-color: #d7e0e9; box-shadow: var(--shadow); border-radius: 9px; }
.popup-card .popup-year { color: #0b5ea8; }
.popup-card p { color: #5f6f82; }
.popup-card button { background: #0b5ea8; color: #ffffff; border-radius: 6px; }
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large { background: rgba(11,94,168,.18); }
.marker-cluster div { color: #ffffff; background: #0b5ea8; }
.map-status {
  background: rgba(255,255,255,.96);
  color: #31465d;
  border-color: #d6e0e9;
  border-radius: 7px;
  box-shadow: 0 4px 14px rgba(31,50,73,.10);
  backdrop-filter: blur(7px);
}
.mobile-filter-button {
  border-color: #0b5ea8;
  background: #0b5ea8;
  color: #ffffff;
  border-radius: 7px;
}
.legend {
  background: rgba(255,255,255,.97);
  border-color: #d5dfe8;
  border-radius: 9px;
  box-shadow: 0 8px 22px rgba(31,50,73,.12);
}
.legend-toggle { color: #24364a; }
.legend-item { color: #4f6275; }
.timeline-dock {
  background: rgba(255,255,255,.97);
  border-color: #d4dee8;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(31,50,73,.14);
  backdrop-filter: blur(10px);
}
.year-readout span { color: #17324f; }
.year-readout small { color: #647589; }
.circle-button,
.play-button { border-color: #cbd6e0; background: #ffffff; color: #264158; }
.circle-button:hover { background: #f0f5f9; }
.play-button { background: #0b5ea8; color: #ffffff; border-color: #0b5ea8; }
.timeline-mode select {
  color: #25394e;
  background: #ffffff;
  border-color: #cbd6e0;
  border-radius: 6px;
}
.range-row { color: #67788b; }
.range-base { background: #d7e1ea; }
.range-wrap input::-webkit-slider-runnable-track { background: transparent; }
.range-wrap input::-moz-range-track { background: transparent; }
.range-wrap input::-webkit-slider-thumb { background: #0b5ea8; border-color: #ffffff; box-shadow: 0 0 0 2px rgba(11,94,168,.25); }
.range-wrap input::-moz-range-thumb { background: #0b5ea8; border-color: #ffffff; box-shadow: 0 0 0 2px rgba(11,94,168,.25); }
.range-progress { background: #0b5ea8; }
.timeline-ticks i { background: #b8c5d2; }
.era-buttons button {
  border-color: #d2dce6;
  background: #f7f9fb;
  color: #586b7f;
}
.era-buttons button:hover,
.era-buttons button.active { color: #0b5ea8; border-color: #8fb5d4; background: #eaf3fa; }

/* Embedded world map */
.map-fallback { background: #eaf0f5; color: #1b2d40; }
.native-ocean { fill: #e9f0f5; }
.native-land { fill: #ffffff; stroke: #d4dee7; }
.native-country { fill: none; stroke: #aebdca; }
.native-map-banner {
  background: rgba(255,255,255,.96);
  color: #22384d;
  border-color: #d3dee8;
  border-radius: 8px;
  box-shadow: 0 5px 16px rgba(31,50,73,.11);
}
.native-map-banner span { color: #66778a; }
.native-map-controls {
  background: #ffffff;
  border-color: #d3dee8;
  border-radius: 7px;
  box-shadow: 0 5px 16px rgba(31,50,73,.12);
}
.native-map-controls button { color: #24415c; border-right-color: #d9e2ea; }
.native-map-controls button:hover { background: #f1f5f8; }
.native-map-tooltip {
  background: #ffffff;
  color: #203449;
  border-color: #d4dee7;
  border-radius: 7px;
  box-shadow: 0 6px 18px rgba(31,50,73,.15);
}
.native-event:hover,
.native-event.selected { stroke: #17324f; }
.place-count { background: #dcecf8; color: #0b5ea8; }

/* White reading surfaces */
.drawer-scrim { background: rgba(25,43,61,.30); }
.drawer-panel {
  background: #ffffff;
  border-left-color: #d4dee8;
  box-shadow: -18px 0 45px rgba(31,50,73,.18);
}
.drawer-header { border-bottom-color: #dce4ec; }
.detail-kicker,
.eyebrow { color: #0b5ea8; }
.drawer-header h2 { color: #172333; }
.drawer-close { border-color: #d4dee8; background: #f7f9fb; color: #596c80; }
.detail-location { color: #26394d; }
.location-overview span,
.location-card-tags span,
.location-card-head > span {
  border-color: #d6e0e9;
  background: #f6f8fa;
}
.location-card { border-color: #d8e1ea; background: #ffffff; border-radius: 8px; }
.location-card.primary { border-color: #93b8d7; background: #f3f8fc; }
.location-card-head strong { color: #1d3044; }
.location-card-head small,
.location-card p { color: #66778a; }
.location-card-head > span { color: #0b5ea8; }
.location-card-tags span { color: #65778a; }
.detail-map-note { color: #68798c; }
.detail-verification { border-color: #b9d2e6; background: #eef6fb; color: #245a82; }
.detail-section h3 { color: #42576c; }
.detail-section p { color: #394d61; }
.impact-section { border-color: #b9d2e6; background: #f3f8fc; border-radius: 8px; }
.impact-section h3 { color: #0b5ea8; }
.person-list span,
.tag-list span { border-color: #d7e0e9; background: #f7f9fb; color: #42566a; border-radius: 6px; }
.tag-list span { color: #617285; }
.source-heading span { color: #7b8b9b; }
.source-item { border-color: #d8e1e9; background: #ffffff; border-radius: 7px; }
.source-item:hover { border-color: #91b5d3; background: #f4f9fc; }
.source-item small { color: #748496; }
.source-item i { color: #0b5ea8; }
.source-safety-note { color: #718295 !important; }
.drawer-footer { border-top-color: #dce4ec; background: #f7f9fb; }

.about-dialog { color: #172333; }
.about-dialog::backdrop { background: rgba(27,43,60,.38); }
.about-card { background: #ffffff; border-color: #d3dde7; border-radius: 10px; box-shadow: 0 20px 55px rgba(31,50,73,.22); }
.about-card > header { border-bottom-color: #dce4ec; }
.about-content p { color: #475b70; }
.selection-section { border-left-color: #0b5ea8; }
.criteria-list { color: #43576c; }
.criteria-list li::marker { color: #0b5ea8; }
.selection-boundary { background: #eef5fb; border-color: #c5daeb; color: #304c66 !important; }
.notice-card { border-color: #e3cf9d; background: #fffaf0; }
.notice-card h3 { color: #755817; }
.download-panel { border-color: #d7e1ea; background: #f8fafc; border-radius: 8px; }
.compiled-note { color: #778799 !important; }
.toast { background: #17324f; border-color: #17324f; color: #ffffff; box-shadow: 0 8px 24px rgba(31,50,73,.22); }

@media (max-width: 760px) {
  .sidebar { box-shadow: 16px 0 38px rgba(20,47,73,.28); }
  .timeline-dock { border-radius: 9px; }
  .logo-card { width: 46px; height: 46px; padding: 0; }
  .about-brand-block { flex-direction: column; align-items: flex-start; }
  .about-logo-card { width: 116px; min-width: 116px; height: 116px; aspect-ratio: 1 / 1; }
}

/* Year range controls */
.timeline-mode { align-items: center; }
.year-field {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.year-field input {
  width: 76px;
  height: 31px;
  padding: 0 7px;
  border: 1px solid #cbd6e0;
  border-radius: 6px;
  background: #ffffff;
  color: #25394e;
  font-variant-numeric: tabular-nums;
}
.year-field input:disabled {
  opacity: .5;
  cursor: not-allowed;
  background: #f2f5f8;
}

/* The brand image stands on its own, without a frame. */
.about-brand-block {
  border: 0;
  background: transparent;
  padding: 4px 0 10px;
}
.about-logo-card {
  border: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 760px) {
  .timeline-mode { display: grid; grid-template-columns: 1fr 1fr; }
  .timeline-mode > select { grid-column: 1 / -1; }
  .year-field { justify-content: space-between; }
  .year-field input { width: min(92px, 58%); }
}


/* Readable category legend */
.legend {
  width: 244px;
}
.legend-toggle {
  min-height: 44px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 760;
}
.legend-body {
  padding: 2px 14px 14px;
  gap: 9px;
}
.legend-item {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  color: #31465d;
  font-size: 12px;
  font-weight: 590;
  line-height: 1.28;
}
.legend-item i {
  display: block;
  width: 12px;
  height: 12px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(31, 50, 73, .20), 0 2px 5px rgba(31, 50, 73, .18);
}
.category-chip .dot {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255,255,255,.80);
  box-shadow: 0 0 0 2px rgba(255,255,255,.14);
}

@media (max-width: 1000px) {
  .legend { width: 224px; }
}

@media (max-width: 760px) {
  .legend { width: 212px; }
  .legend-toggle { min-height: 42px; font-size: 12.5px; }
  .legend-body { padding: 1px 12px 12px; gap: 8px; }
  .legend-item { font-size: 11.5px; }
}

@media (max-width: 430px) {
  .legend { width: min(210px, calc(100vw - 20px)); }
}
