

:root {
  --surface: #0c1621;
  --line: #263d50;
  --muted: #91a8bc;
  --accent: #86d8ef;
  --mono: Consolas, "SFMono-Regular", "Liberation Mono", monospace;
}
body { color: #e7f2fb; background: #090f1a; }
.map-panel { background: #000; }
button, input, dialog, kbd, .data-badge, .search-box, .search-results,
.detail, .map-title, .map-controls, .highlight-chip, .group-bar,
.group-bar span, .group-row.chosen, .map-bottom > span:first-child,
.weight-grid > div, .outline-button, .map-button, .map-controls button,
.search-result, .extension-filter { border-radius: 0; }
button:focus-visible, a:focus-visible, input:focus-visible,
canvas:focus-visible { outline-color: var(--accent); }
.masthead {
  height: 80px;
  padding: 0 28px;
  background: #0c1621;
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 -2px #86d8ef08;
}
.brand { font-size: 34.5px; letter-spacing: -.7px; gap: 13px; }
.brand-icon { display: block; width: 52px; height: 52px; object-fit: contain; flex-shrink: 0; }
.brand-light { color: #bfd6e5; }
.brand small {
  font-family: var(--mono);
  color: #88a6ba;
  font-size: 12px;
  letter-spacing: 2.2px;
  margin-top: 5px;
}
.header-caption {
  margin-left: 56px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
  font-size: 16.5px;
}
.header-caption span { color: var(--muted); }
.header-actions { gap: 24px; }
.data-badge {
  background: #102330;
  border: 1px solid #315c70;
  border-left: 3px solid var(--accent);
  padding: 9px 12px;
  color: #b9e6f3;
  font: 13.5px var(--mono);
  letter-spacing: 1.3px;
}
.data-badge i, .map-title i, .map-bottom i {
  background: var(--accent);
  border-radius: 0;
  width: 4px;
  height: 4px;
}
.text-button { color: #b0c5d6; font-size: 15px; }
.text-button:hover, .text-button span { color: var(--accent); }
.workspace { height: calc(100% - 80px); }
.sidebar {
  width: 336px;
  padding: 27px 23px 24px;
  background: linear-gradient(160deg, #111f2d, #0c1621 70%);
  border-right: 1px solid var(--line);
  scrollbar-color: #34556b #0c1621;
}
.eyebrow {
  color: #90b6cb;
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: 1.7px;
}
.intro h1 { font-size: 45px; font-weight: 500; margin: 13px 0 8px; }
.intro p { font-size: 16.5px; color: var(--muted); margin-bottom: 23px; }
.search-box {
  background: #08121d;
  border-color: #355369;
  padding: 14px 11px;
  position: relative;
}
.search-box::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  width: 15px;
  height: 3px;
  background: var(--accent);
}
.search-box svg { stroke: #96d9ec; }
.search-box input { font-size: 16.5px; }
.search-box input::placeholder { color: #8ba3b7; }
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px #86d8ef24; }
kbd { color: #a1b8c8; border-color: #355369; font-family: var(--mono); }
.summary { gap: 0; padding: 22px 0; border-color: var(--line); }
.summary > div { flex: 1; }
.summary > div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.summary strong { font: 33px var(--mono); color: #dcedf8; letter-spacing: -1px; }
.summary span { font: 13.5px var(--mono); color: var(--muted); }
.section-heading h2 { font-size: 18px; font-weight: 600; letter-spacing: .2px; }
.section-heading > span { color: #90a9be; font-family: var(--mono); font-size: 12px; }
.section-note { color: #8ea7bd; font-size: 15px; }
.neighborhoods, .sidebar-footer { border-color: var(--line); }
.group-row { padding: 10px 0; }
.group-name { font: 18px var(--mono); }
.group-bar { height: 2px; background: #2b4153; }
.group-count { color: #a6bacb; font: 15px var(--mono); }
.group-row.chosen { background: #152f41; border-left: 2px solid var(--accent); }
.outline-button {
  border-color: #355369;
  color: #bdd8e8;
  font: 15px var(--mono);
  padding: 12px;
}
.outline-button span { color: var(--accent); }
.outline-button:hover { background: #143145; border-color: #72bad2; }
.leader-row { border-bottom: 1px solid #263d504d; padding: 10px 0; font-size: 16.5px; }
.leader-rank { font: 15px var(--mono); color: #94bad0; }
.leader-row .arrow { color: #79b3ce; }
.leaders { border-bottom: 1px solid var(--line); }
.neighbor-note { color: #94acbf; font-size: 16.5px; line-height: 1.7; margin: 12px 0 0; }
.neighbor-divider { font: 12px var(--mono); letter-spacing: 1.4px; color: #87b9cf; padding: 12px 0 4px; }
.rank-neighbor .leader-rank { width: 71px; flex-shrink: 0; font-size: 15px; }
.rank-neighbor { gap: 8px; }
.rank-neighbor:hover { background: #183448; }
.star-tooltip {
  position: absolute;
  pointer-events: none;
  max-width: min(360px, calc(100% - 24px));
  padding: 7px 10px;
  border: 1px solid #69b8d3;
  background: #06121ff2;
  color: white;
  font: 600 18px "Segoe UI", system-ui, sans-serif;
  overflow-wrap: anywhere;
  box-shadow: 0 3px 10px #0005;
}
.source-logos { color: #91b0c4; font-family: var(--mono); font-size: 12px; letter-spacing: .3px; }
.sidebar-footer p { color: #8da5b9; line-height: 1.7; }
.sidebar-footer button { color: #a5d4e6; }
.detail {
  background: linear-gradient(135deg, #142e40, #0c1b28);
  border-color: #3a687f;
  border-top: 2px solid var(--accent);
  padding: 20px 17px 17px;
  margin-top: 20px;
  box-shadow: none;
}
.detail .eyebrow { color: #a4dceb; font-size: 12px; letter-spacing: 1.5px; }
.detail h2 { font-size: 31.5px; margin: 14px 14px 21px 0; line-height: 1.35; }
.detail .close-detail { top: 9px; right: 9px; font-size: 31.5px; color: #a4c5d9; }
.detail dl { display: block; padding: 16px 0; border-top: 1px solid #33546a; border-bottom: 1px solid #33546a; }
.detail dl > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail dt { font: 13.5px var(--mono); letter-spacing: 1.2px; color: #a4bed0; margin: 0; }
.detail dd { font: 39px var(--mono); color: #dcf4ff; letter-spacing: -1px; }
.detail .cc-metrics { padding: 12px 0 0; border-top: 0; border-bottom: 0; }
.detail .cc-metrics > div { align-items: center; padding: 10px 0; }
.detail .cc-metrics dt { font: 16.5px "Segoe UI", system-ui, sans-serif; letter-spacing: 0; }
.detail .cc-metrics dt span { display: block; font: 10.5px var(--mono); letter-spacing: .8px; color: #89a7bc; margin-top: 5px; }
.detail .cc-metrics dd { font: 19.5px var(--mono); letter-spacing: 0; }
.detail .domain-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 15px var(--mono);
  color: #afe2f2;
  margin-top: 18px;
}
.detail .domain-link:hover { color: white; }
.search-results { background: #0d1c2a; border-color: #355369; }
.search-result { border-bottom: 1px solid #263d504d; }
.search-result small { color: #acd4e7; font-family: var(--mono); }
.search-result:hover, .search-result.active { background: #19374b; }
.map-panel::after {
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
  background:
    linear-gradient(#4b7d96, #4b7d96) left top / 20px 1px no-repeat,
    linear-gradient(#4b7d96, #4b7d96) left top / 1px 20px no-repeat,
    linear-gradient(#4b7d96, #4b7d96) right top / 20px 1px no-repeat,
    linear-gradient(#4b7d96, #4b7d96) right top / 1px 20px no-repeat,
    linear-gradient(#4b7d96, #4b7d96) left bottom / 20px 1px no-repeat,
    linear-gradient(#4b7d96, #4b7d96) left bottom / 1px 20px no-repeat,
    linear-gradient(#4b7d96, #4b7d96) right bottom / 20px 1px no-repeat,
    linear-gradient(#4b7d96, #4b7d96) right bottom / 1px 20px no-repeat;
  opacity: .7;
}
.map-top { top: 26px; left: 29px; right: 29px; }
.map-title { color: #bcd7e8; font: 15px var(--mono); border-color: #355369; background: #0c1a27ed; padding: 12px; }
.map-button { border-color: #355369; color: #bcd7e8; background: #0c1a27ed; padding: 11px 12px; }
.map-button:hover { background: #193448; border-color: #79bad1; }
.map-caption { top: 92px; left: 29px; }
.map-caption .eyebrow { color: #8fbad0; font-size: 12px; }
.map-caption > span:last-child { color: #92adc2; font-size: 15px; }
.map-controls { background: #0d1e2cf2; border-color: #3a5d74; box-shadow: 0 6px 24px #0004; bottom: 54px; }
.map-controls button { color: #b5dcec; }
.map-controls button:hover { background: #204359; }
#zoom-value { font-family: var(--mono); color: #d5edfa; }
#zoom-value span { color: #9ab9cc; }
.control-divider { background: #35566d; }
.map-bottom { left: 29px; right: 29px; bottom: 25px; color: #9ab6ca; font-family: var(--mono); }
.map-bottom > span:first-child { border: 1px solid #263d50; padding: 7px 10px; background: #0c1926e8; }
.map-bottom > span:last-child { padding-top: 8px; color: #90aabd; }
.highlight-chip { background: #102a3ded; border-color: #5285a1; color: #c8e7f6; font-family: var(--mono); }
dialog { background: #101f2d; border-color: #3a627b; border-top: 2px solid var(--accent); }
dialog h2 { font-size: 40.5px; color: #e7f2fb; }
dialog p { color: #afc2d2; }
.dialog-close { color: #aed0e5; }
.weight-grid > div { background: #142b3c; border-color: #35566d; }
.weight-grid strong { color: #a9e2f3; font-family: var(--mono); }
.method-links { color: #a5dcec; flex-wrap: wrap; }
.extension-filter { border-color: #40657d; background: #0b1926; }
.loading-ring { border-radius: 0; border-color: #2c4d63; border-top-color: var(--accent); }
@media (min-width: 1650px) {
  .sidebar { width: 370px; padding: 32px 28px; }
  .masthead { height: 88px; }
  .workspace { height: calc(100% - 88px); }
}
@media (max-width: 1000px) {
  .sidebar { width: 300px; padding: 24px 20px; }
  .masthead { padding: 0 22px; }
}
@media (max-width: 700px) {
  .masthead { height: 68px; padding: 0 16px; }
  .brand { font-size: 30px; gap: 9px; }
  .brand-icon { width: 44px; height: 44px; }
  .brand small { font-size: 10.5px; letter-spacing: 1.6px; }
  .data-badge { font-size: 10.5px; padding: 8px; }
  .workspace { height: calc(100% - 68px); }
  .sidebar { width: 100%; padding: 18px 20px; border-top-color: var(--line); }
  .summary { padding: 15px 0; }
  .summary strong { font-size: 27px; }
  .summary > div { flex: 0 1 auto; }
  .summary > div + div { margin-left: 25px; }
  .detail { margin-top: 14px; }
  .detail h2 { font-size: 28.5px; }
  .detail dd { font-size: 36px; }
  .map-top { top: 24px; left: 24px; right: 24px; }
  .map-title { font-size: 13.5px; padding: 10px; }
  .map-bottom { left: 24px; right: 24px; bottom: 24px; }
  .map-bottom > span:first-child { font-size: 10.5px; }
  .map-controls { bottom: 63px; }
  .highlight-chip { right: 24px; }
  .leaders { display: block; padding: 18px 0; }
}
@media (prefers-reduced-motion: reduce) { .loading-ring { animation: none; } }


.masthead { height: 104px; }
.workspace { height: calc(100% - 104px); }
.sidebar { width: 440px; }
.header-caption { margin-left: 32px; }
.header-actions { gap: 22px; }
.header-actions .map-button { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.section-heading { flex-wrap: wrap; }
.section-heading h2 { max-width: 100%; }
.group-name { width: 48px; }
.group-count { min-width: 64px; }
.rank-neighbor .leader-rank { width: 106px; }
.summary > div { min-width: 0; }
.detail dl > div { flex-wrap: wrap; }
.detail dd { overflow-wrap: anywhere; }
.map-caption { max-width: 315px; }
.map-controls { bottom: 26px; }
.map-controls button { width: 50px; height: 48px; }
.map-bottom { justify-content: flex-end; }
.map-bottom > span:first-child { border: 0; background: none; padding: 0; }
.map-status { position: absolute; left: 28px; bottom: 90px; max-width: calc(100% - 56px); padding: 12px; background: #102330; border: 1px solid #355369; font-size: 15px; }
dialog { max-width: 760px; }
dialog h3 { font-size: 21px; margin: 26px 0 6px; }
dialog p { margin: 10px 0 16px; }
@media (min-width: 1650px) { .sidebar { width: 480px; } }
@media (max-width: 1000px) { .sidebar { width: 360px; } .header-actions { gap: 16px; } }
@media (max-width: 700px) {
  .masthead { height: 80px; display: flex; align-items: center; gap: 12px; }
  .brand { flex-shrink: 0; }
  .header-actions { flex: 1; min-width: 0; justify-content: flex-end; gap: 12px; }
  .header-actions .text-button { display: block; text-align: right; line-height: 1.35; }
  .workspace { height: calc(100% - 80px); }
  .sidebar { width: 100%; max-height: 44%; }
  .summary > div + div { margin-left: 16px; padding-left: 16px; }
  .group-list, .all-group-list { grid-template-columns: 1fr; }
  .map-controls { bottom: 20px; }
  .map-title { max-width: calc(100% - 16px); }
  .highlight-chip { top: 90px; }
  .detail dl > div { align-items: flex-start; }
}
@media (max-width: 600px) {
  .header-actions .map-button { display: none; }
  .header-actions .text-button { max-width: 132px; }
}

.sidebar { padding: 0; overflow: hidden; position: relative; transition: width .25s ease; }
.sidebar-content { height: 100%; overflow-y: auto; padding: 20px 23px 24px; scrollbar-width: thin; scrollbar-color: #34556b #0c1621; }
.sidebar-content .intro > .eyebrow { line-height: 22px; padding-right: 44px; }
.sidebar-toggle { position: absolute; z-index: 5; top: 12px; right: 12px; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid #355369; background: #102330; color: #afe2f2; padding: 0; }
#sidebar-toggle-icon { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: 0 0 24px; }
#sidebar-toggle-icon svg { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#sidebar-toggle-icon[data-direction="right"] { transform: rotate(180deg); }
#sidebar-toggle-icon[data-direction="down"] { transform: rotate(-90deg); }
#sidebar-toggle-icon[data-direction="up"] { transform: rotate(90deg); }
.sidebar-toggle-label { display: none; font: 15px var(--mono); }
.sidebar-toggle:hover { background: #204359; border-color: #79bad1; }
.workspace.panel-collapsed .sidebar { width: 56px; }
.workspace.panel-collapsed .sidebar-toggle { right: 8px; }
.data-update { font: 13.5px var(--mono); color: #91a8bc; line-height: 1.6; margin: 0 0 18px; }
.data-update time { color: #c3e3ef; }
dialog .data-update { border-top: 1px solid #355369; padding-top: 18px; margin-top: 24px; }
@media (min-width: 1650px) { .sidebar-content { padding: 20px 28px 28px; } }
@media (max-width: 1000px) { .sidebar-content { padding: 20px 20px 24px; } }
@media (max-width: 700px) {
  .sidebar { width: 100%; height: 44%; max-height: 44%; transition: height .25s ease; }
  .sidebar-content { padding: 20px 20px 20px; }
  .sidebar-content > .data-update { padding-right: 44px; }
  .workspace.panel-collapsed .sidebar { width: 100%; height: 52px; max-height: 52px; }
  .workspace.panel-collapsed .sidebar-toggle { top: 6px; right: 12px; left: 12px; width: calc(100% - 24px); height: 38px; }
  .workspace.panel-collapsed .sidebar-toggle-label { display: inline; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }
