/* ------------------------------------------------------------------
   Visual language: Inter on a white ground, a big circled-year title,
   four quadrant headings around a bare circle chart, ring lists and
   alternating ring sections.
   ------------------------------------------------------------------ */

:root {
  --txt: #000;
  --bg: #fff;
  --muted: #6b7280;
  --soft: #9ca3af;
  --line: #e5e7eb;
  --rule: #666;
  --chart-line: #d0d0d0;
  --panel: #f9f9f9;
  --accent: #2b5cff;
  --danger: #c8341f;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 20, 26, .06), 0 10px 30px rgba(16, 20, 26, .08);
  --shadow-lg: 0 12px 40px rgba(16, 20, 26, .18);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --page: 1600px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.page { max-width: var(--page); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* -------------------------------------------------------------- lock screen */

#lock-root { display: none; }
body.is-locked #lock-root {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px;
}
/* Nothing from the app is shown — or fetched — until the password is accepted. */
body.is-locked .appbar,
body.is-locked main,
body.is-locked .site-footer { display: none !important; }

.lock-card {
  width: 100%; max-width: 420px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 28px; box-shadow: var(--shadow);
}
.lock-card h1 { font-size: 1.5rem; margin-bottom: 6px; letter-spacing: -.01em; }
.lock-card form { display: flex; gap: 8px; margin-top: 20px; }
.lock-card input[type=password] {
  flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: inherit;
}
.lock-card input[type=password]:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.lock-error { color: var(--danger); font-size: 13px; margin-top: 12px; }

/* ------------------------------------------------------------------ appbar */

.appbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.appbar-inner {
  max-width: var(--page); margin: 0 auto; padding: 8px 20px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.appbar .mark { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -.01em; }
.appbar .mark svg { width: 22px; height: 22px; color: var(--txt); }
.appbar .mark .version { font-weight: 500; color: var(--muted); }
.appbar .spacer { flex: 1; }

.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 9px; width: 14px; height: 14px; fill: var(--soft); pointer-events: none; }
.search input {
  font: inherit; font-size: 14px; width: 210px; padding: 7px 10px 7px 28px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; color: inherit;
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }

.btn {
  font: inherit; font-size: 14px; font-weight: 600;
  border: 1px solid var(--line); background: #fff; color: var(--txt);
  padding: 7px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--panel); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.dark { background: #111; border-color: #111; color: #fff; }
.btn.dark:hover { background: #000; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); font-weight: 500; }
.btn.ghost:hover { background: var(--panel); color: var(--txt); }
.btn.small { font-size: 13px; padding: 4px 10px; }
.btn.danger { color: var(--danger); border-color: #f0c9c2; }
.btn.danger:hover { background: #fdf1ee; }
.btn.is-on { background: #111; border-color: #111; color: #fff; }
.btn-link {
  border: 0; background: none; padding: 0; cursor: pointer; font: inherit;
  text-decoration: underline; color: inherit;
}

.chip {
  font: inherit; font-size: 13px; font-weight: 500;
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 3px 11px; cursor: pointer; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { background: var(--panel); }
.chip.is-on { background: #111; border-color: #111; color: #fff; }
.chip .swatch { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.chip.is-on .swatch { background: #fff; }

.banner {
  display: flex; align-items: center; gap: 14px; justify-content: center;
  padding: 8px 20px; font-size: 14px;
  background: #eef2ff; border-bottom: 1px solid #d9e0ff; color: #23306b;
}
.banner.warn { background: #fff8e6; border-bottom-color: #f0d089; color: #6b4e06; }
.banner code { font: 13px var(--mono); background: rgba(0, 0, 0, .06); padding: 1px 5px; border-radius: 4px; }

/* -------------------------------------------------------------------- hero */

.hero { padding: 44px 0 28px; text-align: center; }
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px 40px;
  align-items: start;
}
.hero-copy { min-width: 0; }
.hero-legend { text-align: left; }
.hero-layout > .themes { grid-column: 1 / -1; }
.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.25rem);
  font-weight: 1000;
  line-height: 1.1;
  letter-spacing: -.02em;
  max-width: 9.6em;
  margin: 0 auto;
}
.hero .year-circle {
  display: inline-block;
  padding: .1em .35em .45em;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjEwNCIgdmlld0JveD0iMCAwIDIwMCAxMDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTU0Ljc0NCAxNi44OTY1QzE2My45ODIgMTkuMzY2MiAxNzAuNjQ2IDI0LjI3NTMgMTc3LjIyIDI5LjU3ODFDMTk4Ljc3NSA0Ni45ODQ2IDIwMi42NzIgNjcuMTg2MSAxODEuODg3IDgxLjM2OEMxNDkuNTg0IDEwMy4zNDQgODUuMTE4NyAxMDcuNzQ5IDQwLjMzOTMgODguNTQ5MUMzMC40MjAxIDg0LjMwNjEgMTYuNzg4NyA3OS40NDA0IDguNjEyNDcgNjcuOTk0NEMxLjAwNTc3IDU3LjM1MDggMy43MTU3OCA0Ny40MDQ4IDEwLjIzNCAzOS4xMjAyQzE2Ljg4NjEgMzAuNjE4OCAyNy41MDIzIDIzLjgyOTYgMzUuNjQ1OSAxOS43Njk0QzcxLjIzODkgMi4wNjkwNSAxMzYuMzIzIC02LjQ3ODEgMTg3LjgxNCAxNy43OTEyQzE4OC44NzYgMTguMjc0OSAxOTAuMDggMTguMTQxMSAxOTAuNTYyIDE3LjUwNThDMTkxLjA0NCAxNi44NzA1IDE5MC42NjEgMTUuOTgyMiAxODkuNjc5IDE1LjUxNjhDMTM2LjY3NSAtOS40NjI3MyA2OS41Njk5IC0wLjg3NTU5MiAzMi45MzYzIDE3LjMzOThDMjIuODAwNSAyMi40MDcgOC45NTUwOSAzMS41NzM4IDIuOTc1IDQyLjk4MDRDLTEuMDg1MjYgNTAuNzgyNyAtMS41MjY5IDU5LjYxMjggNS4wNTE2MSA2OC44OTc5QzEzLjcyODIgODEuMDgyNyAyOC4xNzY0IDg2LjQwNTggMzguNzA0NiA5MC45MTYyQzg0LjkzMjUgMTEwLjc0MSAxNTEuNTkgMTA2LjI3OSAxODQuOSA4My41Njk4QzIwNy4yNjkgNjguMzMzNSAyMDMuMjE1IDQ2LjYzMTkgMTgwLjAzMyAyNy45MTkyQzE3Mi45NzIgMjIuMTgyMiAxNjUuNjMgMTYuOTM4NyAxNTUuNjAzIDE0LjI1ODdDMTU0LjQ5NyAxMy45NjM3IDE1My40MSAxNC4zMTYgMTUzLjIzOSAxNS4wNTkyQzE1Mi45ODggMTUuNzg0IDE1My43MTggMTYuNzk4IDE1NC43NDQgMTYuODk2NVoiIGZpbGw9IiM2Q0MyNEEiLz4KPC9zdmc+Cg==");
}
.hero .intro { font-size: 1.25rem; max-width: 62ch; margin: 18px auto 0; }

.themes {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px; margin: 52px auto 0; max-width: 1280px; text-align: center;
  list-style: none; padding: 0;
}
.themes .icon { width: 84px; height: 84px; margin: 0 auto 14px; display: block; }
.themes h4 { font-size: 1.25rem; margin-bottom: 10px; }
.themes p { font-size: 1rem; }
.hero-cta { margin: 42px 0 26px; }

/* --------------------------------------------------------------- radar stage */

.stage-wrap { padding: 8px 0 0; }

.radar-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 800px) minmax(0, 1fr);
  grid-template-areas:
    "tl chart tr"
    "bl chart br";
  gap: 8px 32px;
  align-items: start;
}
.corner-tl { grid-area: tl; }
.corner-tr { grid-area: tr; }
.corner-bl { grid-area: bl; }
.corner-br { grid-area: br; }
.chart-cell { grid-area: chart; position: relative; }

.corner { padding-top: 26px; }
.corner h3 {
  font-size: 1.875rem; line-height: 1.2; margin-bottom: .75rem; letter-spacing: -.02em;
}
.corner h3 span { display: inline-block; border-bottom: 5px solid var(--accent-ring); padding-right: .6rem; }
.corner .blip-list { justify-content: flex-start; }
.corner-bl .blip-list, .corner-bl h3 { text-align: left; }

.blip-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 2px 10px;
  font-size: 15px; line-height: 1.35;
}
.blip-list li { display: inline-flex; }
.corner .blip-list { font-size: 15px; }

/* A list entry: coloured dot + name, exactly the original's treatment. */
button.blip {
  display: inline-flex; align-items: flex-start; gap: .3em;
  border: 0; background: none; padding: .125em .25em; border-radius: 4px;
  text-align: left; line-height: 1.2em; cursor: pointer;
}
button.blip::before {
  flex: none; content: ""; width: .6em; height: .6em; margin-top: .32em;
  border-radius: 50%; background-color: var(--dot, #999);
}
button.blip:hover { background-color: var(--dot, #999); color: var(--dot-ink, #fff); }
button.blip:hover::before { box-shadow: 0 0 0 1.5px var(--dot-ink, #fff) inset; }
button.blip.is-selected { background-color: var(--dot, #999); color: var(--dot-ink, #fff); }

/* Compact (dot matrix) variant: bare 20px dots. */
.blip-list.compact { gap: 3px; }
.blip-list.compact button.blip { padding: 0; }
.blip-list.compact button.blip::before {
  width: 20px; height: 20px; margin-top: 0; border-radius: 50%;
}
.blip-list.compact button.blip:hover {
  background: none; box-shadow: 0 0 0 2px #000;
}

/* ------------------------------------------------------------------- chart */

#radar-chart {
  display: block; width: 100%; height: auto; touch-action: pan-y pinch-zoom; cursor: default;
}

.radar-ring-label { font-size: 24px; font-weight: 600; }

.blip-group { cursor: pointer; }
.blip-group .dot { stroke: #fff; stroke-width: 1.5; }
.blip-group .blip-hit { fill: transparent; }
.blip-group.is-dim { opacity: .12; }
.blip-group.is-hover .dot,
.blip-group.is-selected .dot,
.blip-group.is-dragging .dot { stroke: #111; stroke-width: 2.5; }
.blip-group.is-hover .mark-new,
.blip-group.is-selected .mark-new { stroke-width: 2; }
.blip-group.is-dragging { cursor: grabbing; }
.radar-dropzone { fill: none; stroke: #111; stroke-width: 1.5; stroke-dasharray: 5 5; opacity: 0; }
.radar-dropzone.is-on { opacity: .7; }

.chart-note { text-align: center; margin-top: 6px; font-size: 1rem; }
.chart-note a { color: #111; text-decoration: underline; text-decoration-color: #6CC24A; text-underline-offset: 3px; }

/* ------------------------------------------------------------------ legend */

#chart-legend {
  border: 1px solid var(--line); border-radius: 6px;
  padding: 15px; background: #fff; font-size: 15px;
}
#chart-legend h5 { color: var(--soft); font-size: 15px; font-weight: 700; margin-bottom: 10px; }
#chart-legend .icon-grid { display: flex; flex-direction: row; gap: 4px; }
#chart-legend .icon-grid > div { flex: 1; display: flex; flex-direction: column; }
#chart-legend .icon-grid > div > span:first-child { align-self: center; height: 26px; display: flex; align-items: center; }
#chart-legend .icon-grid > div > span:last-child { text-align: center; font-size: 12px; line-height: 1.3; }
#chart-legend hr { border: 0; border-top: 1px solid #a19f9f; margin: 14px 0; }
#chart-legend .rings { display: grid; grid-template-columns: 1fr; gap: 8px; }
#chart-legend .ring-row { display: grid; grid-template-columns: 78px 1fr; gap: 10px; align-items: baseline; }
#chart-legend .ring-row dt {
  font-weight: 600; font-size: 15px; border-bottom: 3px solid currentColor; padding-bottom: 1px;
}
#chart-legend .ring-row dd { margin: 0; font-size: 11px; color: var(--muted); }

/* ------------------------------------------------------------- list sections */

.radar-list { padding: 48px 20px; border-top: 1px solid var(--line); background: #fff; }
.radar-list.is-tinted { background: var(--panel); }
.radar-list-inner {
  max-width: var(--page); margin: 0 auto;
  display: grid; grid-template-columns: 240px repeat(4, minmax(0, 1fr));
  gap: 3rem 1.5rem;
}
.radar-list .quadrant-head h3 {
  font-size: 1.875rem; line-height: 1.2; margin-bottom: .75rem;
  display: inline-block; border-bottom: 5px solid var(--accent-ring); padding-right: 1.5rem;
}
.radar-list h4 {
  font-size: 1.125rem; line-height: 1.75rem; text-transform: uppercase;
  border-bottom: 2px solid var(--rule); margin-bottom: .75rem; height: 3rem;
  display: flex; align-items: flex-end; letter-spacing: .01em;
}
.radar-list .blip-list { font-size: 1.25rem; line-height: 1.75rem; flex-direction: column; gap: 0; }
.radar-list .blip-list.compact { flex-direction: row; flex-wrap: wrap; gap: 3px; margin-bottom: 4px; }
.radar-list .blip-list.compact button.blip::before { width: 20px; height: 20px; margin-top: 0; }
.removed-inner { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.removed-inner .removed-title { grid-column: 1 / -1; font-size: 1.875rem; margin-bottom: 6px; }
.removed-inner h4 { border-bottom: 2px solid var(--rule); }
.radar-list .blip-list button.blip::before { width: .55em; height: .55em; margin-top: .42em; }
.removed-section .blip-list { font-size: 1rem; }

.section-title {
  font-size: 1.875rem; font-weight: 700; max-width: var(--page);
  margin: 0 auto; padding: 40px 0 0;
}
.section-title .rule { display: block; height: 2px; background: var(--rule); margin-top: 10px; }

/* --------------------------------------------------------------- settings */

.settings-overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(16, 20, 26, .45);
  overflow: auto; padding: 4vh 16px;
}
.settings-panel {
  max-width: 1100px; margin: 0 auto; background: #fff; border-radius: 12px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.settings-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 22px; border-bottom: 1px solid var(--line);
}
.settings-head h2 { font-size: 1.25rem; flex: 1; }
.settings-body { padding: 22px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 22px; align-items: start; }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.card.wide { grid-column: 1 / -1; }
.card h3 { font-size: 1rem; margin-bottom: 4px; }
.card .help { font-size: 13px; color: var(--muted); margin-bottom: 12px; }

.field { margin-bottom: 12px; }
.field > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.field input[type=text], .field input[type=password], .field input[type=url],
.field input[type=number], .field textarea, .field select {
  width: 100%; font: inherit; font-size: 14px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; color: inherit;
}
.field textarea { resize: vertical; min-height: 74px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent;
}
.field .hint { font-size: 12px; color: var(--muted); margin-top: 3px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline input[type=text] { flex: 1; }

.editor-list { display: flex; flex-direction: column; gap: 8px; }
.editor-item {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px;
}
.editor-item .grip { color: var(--muted); text-align: center; font-size: 12px; font-weight: 600; }
.editor-item .editor-fields { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.editor-item input {
  font: inherit; font-size: 13px; padding: 5px 8px; color: inherit;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; width: 100%; min-width: 0;
}
.editor-item input[type=color] { flex: 0 0 40px; width: 40px; padding: 2px; height: 30px; }
.editor-item input[type=number] { flex: 0 0 74px; width: 74px; text-align: right; }
.editor-item input[type=text] { flex: 1 1 60px; width: auto; }
.editor-item .row-actions { display: flex; gap: 3px; }
.icon-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 6px;
  width: 26px; height: 26px; line-height: 1; cursor: pointer; color: var(--muted);
}
.icon-btn:hover { background: var(--panel); color: var(--txt); }
.icon-btn.danger { color: var(--danger); }

.import-area { font: 12px var(--mono); min-height: 130px; }

/* ------------------------------------------------------------------ modals */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 70; background: rgba(16, 20, 26, .45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 5vh 16px; overflow: auto;
}
.modal {
  background: #fff; border-radius: 8px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 620px; overflow: hidden;
  animation: pop .16s ease-out;
}
.modal.narrow { max-width: 420px; }
.modal.wide { max-width: 760px; }
@keyframes pop { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal .bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  height: 32px; padding: 0 12px; background: var(--bar-bg, #111); color: var(--bar-ink, #fff);
  font-size: 14px; font-weight: 600;
}
.modal .bar .quadrant { font-size: 12px; font-weight: 600; opacity: .85; }
.modal .bar .close-x {
  border: 0; background: none; color: inherit; font-size: 20px; line-height: 1;
  cursor: pointer; padding: 0 4px; margin-right: -8px;
}
.modal .modal-body { padding: 18px 20px; max-height: 72vh; overflow: auto; }
.modal .modal-footer {
  display: flex; align-items: center; gap: 8px; padding: 14px 20px;
  border-top: 1px solid var(--line); background: var(--panel);
}
.modal .modal-footer .spacer { flex: 1; }
.modal .lede { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.modal .prose { font-size: 14px; color: #333; }
.modal .prose + .prose { margin-top: 10px; }
.modal .prose h4 { margin: 14px 0 3px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--soft); }

.revision {
  border-top: 1px solid var(--line); padding: 8px 0; font-size: 13px;
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
}
.revision:first-child { border-top: 0; }

/* ---------------------------------------------------------------- tooltip */

.tooltip {
  position: fixed; z-index: 55; width: 300px; pointer-events: none;
  background: #fff; border-radius: 6px; overflow: hidden;
  box-shadow: rgba(14, 18, 22, .35) 0 10px 38px -10px, rgba(14, 18, 22, .2) 0 10px 20px -15px;
  animation: pop .16s ease-out;
}
.tooltip .tip-bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 30px; padding: 0 12px; font-size: 13px; font-weight: 600;
  background: var(--bar-bg, #111); color: var(--bar-ink, #fff);
}
.tooltip .tip-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.tooltip .tip-quadrant { font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.tooltip .tip-title { font-size: 16px; font-weight: 700; line-height: 1.25; }
.tooltip .tip-summary { font-size: 13px; color: #444; }
.tooltip .tip-hint { font-size: 11px; color: var(--soft); }

/* ----------------------------------------------------------------- toasts */

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #111; color: #fff; padding: 10px 14px; border-radius: 8px;
  font-size: 14px; box-shadow: var(--shadow-lg); max-width: 380px;
  animation: pop .18s ease-out;
}
.toast.err { background: #8f2312; }
.toast.ok { background: #14532d; }

/* ----------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 22px 20px 40px; font-size: 13px; color: var(--muted);
}
.site-footer .page { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ------------------------------------------------------------- responsive */

@media (max-width: 1280px) {
  .radar-stage {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 640px) minmax(0, 1fr);
    gap: 8px 18px;
  }
  .themes { gap: 28px; }
}
@media (max-width: 1024px) {
  .hero-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero-legend { width: 100%; max-width: 640px; margin: 0 auto; }
  #chart-legend .rings { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
  .radar-stage {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "chart chart"
      "tl tr"
      "bl br";
    gap: 20px;
  }
  .chart-cell { max-width: 640px; margin: 0 auto; }
  .radar-list-inner { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .themes { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 680px) {
  #chart-legend .rings { grid-template-columns: minmax(0, 1fr); }
  .radar-list-inner { grid-template-columns: 1fr; }
  .search input { width: 140px; }
  .hero { padding-top: 26px; }
}

@media print {
  .appbar, .banner, .settings-overlay, .toasts, .tooltip { display: none !important; }
}

/* Geographic labels remain legible in both the lists and dot matrices. */
button.blip[data-geography]:not([data-geography=""])::before {
  content: attr(data-geography);
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; margin-top: 0;
  color: var(--dot-ink, #fff); font-size: 9px; font-weight: 700; line-height: 1;
}
.blip-detail-section { margin: 20px 0; }
.blip-detail-section h3 { font-size: 14px; margin-bottom: 6px; }
.blip-detail-section p { white-space: pre-wrap; overflow-wrap: anywhere; }
