@font-face {
  font-family: NotoThai;
  src: url("fonts/noto-thai.woff2") format("woff2");
  font-display: swap;
  font-weight: 100 900;
}
:root {
  --bg: #f3f6f7;
  --surface: #fff;
  --surface2: #f7f9fa;
  --text: #193b40;
  --muted: #5d7478;
  --line: #dde7e9;
  --teal: #168370;
  --teal-light: #e6f4ef;
  --orange: #b95629;
  --orange-light: #fff0e7;
  --blue: #397d99;
  --sidebar: #123c42;
  --shadow: 0 3px 14px #123c4205;
  color-scheme: light;
  font-family: NotoThai, "Leelawadee UI", Tahoma, sans-serif;
  font-size: 18px;
}
.admin-page .admin-header { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:20px max(24px,calc((100vw - 1120px)/2)); background:var(--surface); border-bottom:1px solid var(--line); }
.admin-brand { display:flex; align-items:center; gap:14px; font-size:26px; }
.admin-header nav,.admin-actions { display:flex; gap:12px; flex-wrap:wrap; }
.admin-main { max-width:1120px; margin:0 auto; padding:40px 24px; }
.admin-main h1 { font-size:32px; margin:0 0 8px; }
.admin-lead { max-width:70ch; margin:0 0 18px; color:var(--muted); }
.admin-form { display:grid; gap:20px; }
.admin-form label { display:grid; gap:8px; font-weight:600; }
.admin-form select { max-width:280px; }
.admin-form input[type=file] { padding:20px; border:1px dashed var(--teal); border-radius:8px; background:var(--teal-light); width:100%; }
.admin-form .button { justify-self:start; }
.admin-main .panel { margin-top:24px; }
.auth-main { max-width:580px; }
.login-popup { width:min(500px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); padding:28px; }
.login-popup > p { color:var(--muted); margin:12px 0 24px; }
.login-popup input { width:100%; padding:12px; border:1px solid var(--line); border-radius:6px; color:var(--text); background:var(--surface); }
.login-popup .admin-form .button { width:100%; }
#serverAuth { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.account-name { color:var(--muted); font-size:16px; }
.analysis-page { --chart-danger:#cc4b4b; }
.analysis-intro { display:grid; grid-template-columns:1fr 1fr; gap:32px; align-items:center; margin:0 0 26px; padding:26px 30px; border-left:5px solid var(--teal); background:var(--surface); border-bottom:1px solid var(--line); }
.analysis-intro h2 { font-size:26px; margin:6px 0 10px; background:none; border:0; padding:0; }
.analysis-intro p { color:var(--muted); margin:0; max-width:58ch; }
.analysis-year { display:inline-block; color:var(--teal); font-size:16px; font-weight:650; }
.analysis-observations { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.analysis-observations > div { border-left:1px solid var(--line); padding-left:24px; }
.analysis-observations span,.analysis-observations small { display:block; color:var(--muted); font-size:15px; }
.analysis-observations strong { display:block; font-size:25px; margin:8px 0; overflow-wrap:anywhere; }
.analysis-section-heading { margin:36px 0 20px; border-top:2px solid var(--line); padding-top:26px; }
.analysis-section-heading h2 { font-size:25px; background:none; border:0; padding:0; margin:0 0 6px; }
.analysis-section-heading p { color:var(--muted); margin:0; }
.analysis-chart-toolbar { display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; padding-bottom:18px; }
.analysis-chart-toolbar label { display:flex; align-items:center; gap:12px; font-size:17px; font-weight:600; }
.analysis-chart-toolbar select { min-width:230px; }
.detail-chart-scroll { overflow-x:auto; overscroll-behavior-x:contain; scrollbar-color:var(--teal) var(--surface2); padding:8px 0; margin:8px 0 16px; border-bottom:1px solid var(--line); }
.detail-columns { display:block; max-width:none; font-family:inherit; }
.detail-gridline { stroke:var(--line); stroke-dasharray:4 5; }
.detail-axis { fill:var(--muted); font-size:15px; }
.detail-category { fill:var(--text); font-size:16px; }
.detail-value { fill:var(--text); font-size:17px; font-weight:750; }
.detail-bar.teal { fill:var(--teal); }
.detail-bar.blue { fill:var(--blue); }
.detail-bar.orange { fill:var(--orange); }
.detail-bar.danger { fill:var(--chart-danger,#cc4b4b); }
.detail-column:hover .detail-bar { opacity:.75; }
.detail-threshold line { stroke:var(--chart-danger,#cc4b4b); stroke-width:2; stroke-dasharray:7 5; }
.detail-threshold text { fill:var(--chart-danger,#cc4b4b); font-size:16px; font-weight:700; paint-order:stroke; stroke:var(--surface); stroke-width:4px; }
.chart-data { border-top:1px solid var(--line); padding-top:14px; margin:14px 0 6px; }
.chart-data summary { color:var(--teal); font-size:17px; font-weight:600; cursor:pointer; padding:8px 0; }
.time-heat-scroll { overflow-x:auto; margin-top:20px; }
.time-heat { border-collapse:separate; border-spacing:4px; width:100%; min-width:1080px; table-layout:fixed; }
.time-heat th,.time-heat td { text-align:center; padding:10px 2px; font-size:15px; border:0; border-radius:4px; }
.time-heat th:first-child { width:112px; text-align:left; position:sticky; left:0; background:var(--surface); z-index:1; }
.time-heat .time-heat-cell { background:color-mix(in srgb,var(--teal) calc(var(--heat)*100%),var(--surface2)); font-variant-numeric:tabular-nums; font-weight:650; }
.time-heat .time-heat-cell.high { color:var(--surface); }
.detail-chart-scroll:focus-visible,.time-heat-scroll:focus-visible { outline:3px solid var(--teal); outline-offset:3px; }
.heat-legend { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-top:18px; color:var(--muted); font-size:15px; }
.heat-legend i { width:100px; height:10px; border-radius:4px; background:linear-gradient(90deg,var(--surface2),var(--teal)); }
.heat-legend > span:last-child { margin-left:auto; }
@media(max-width:1000px) { .analysis-intro { grid-template-columns:1fr; gap:24px; } .analysis-observations > div:first-child { border-left:0; padding-left:0; } }
@media(max-width:600px) { .analysis-intro { padding:22px 18px; } .analysis-intro h2,.analysis-section-heading h2 { font-size:23px; } .analysis-observations { gap:12px; } .analysis-observations > div { padding-left:12px; } .analysis-observations strong { font-size:21px; } .analysis-chart-toolbar label { display:grid; width:100%; } .analysis-chart-toolbar select { width:100%; min-width:0; } .heat-legend > span:last-child { margin-left:0; width:100%; } }
[data-publisher-only][hidden],[data-guest-only][hidden],.upload-zone[hidden] { display:none !important; }
.auth-main input { width:100%; padding:12px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--text); }
.admin-error { color:#a93226; border-left-color:#a93226; }
.admin-actions { margin-top:20px; }
@media(max-width:600px) { .admin-page .admin-header { align-items:flex-start; padding:16px; flex-direction:column; } .admin-main { padding:24px 16px; } .admin-main h1 { font-size:26px; } .topbar-actions { flex-wrap:wrap; } }
:root[data-theme="dark"] {
  --bg: #10282d;
  --surface: #18373d;
  --surface2: #1d4147;
  --text: #edf5f5;
  --muted: #afc5c7;
  --line: #355359;
  --teal: #77d7b9;
  --teal-light: #214a43;
  --orange: #ffb07e;
  --orange-light: #50392f;
  --blue: #88c9e4;
  --sidebar: #0c2429;
  --shadow: none;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
  -webkit-tap-highlight-color: #16837022;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button,
select,
input {
  color: var(--text);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  text-wrap: balance;
}
h1 {
  font-size: 34px;
  line-height: 1.45;
  letter-spacing: -0.8px;
  font-weight: 750;
}
h2 {
  font-size: 21px;
  font-weight: 700;
}
h3 {
  font-size: 19px;
}
small {
  font-size: 16px;
}
svg {
  display: block;
}
.icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 20px;
  z-index: 9999;
  background: var(--surface);
  padding: 14px;
}
.skip-link:focus {
  top: 10px;
}
[hidden] {
  display: none !important;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 272px;
  background: var(--sidebar);
  color: #e9f4f3;
  padding: 34px 20px 18px;
  display: flex;
  flex-direction: column;
  z-index: 40;
  overflow-y: auto;
}
.brand {
  --brand-logo-size: 56px;
  display: grid;
  grid-template-columns: var(--brand-logo-size) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 0 8px 18px;
  padding: 0 0 24px;
  border-bottom: 1px solid #ffffff21;
  min-width: 0;
}
.brand-mark {
  height: var(--brand-logo-size);
  width: var(--brand-logo-size);
  background: #fff;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: #8be2cb;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}
.brand-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}
.brand strong {
  font-size: 26px;
  line-height: 1.25;
  display: block;
  letter-spacing: -0.5px;
}
.brand small {
  display: block;
  color: #b8d1d3;
  font-size: 13px;
  margin: 0;
  line-height: 1.7;
}
.sidebar-caption {
  font-size: 14px;
  color: #9bbdc1;
  padding: 0 14px 12px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #c5dbdd;
  font-size: 17px;
  min-height: 46px;
}
nav a:hover {
  background: #ffffff0d;
  color: #fff;
}
nav a[aria-current="page"] {
  background: #28575a;
  color: #fff;
  font-weight: 650;
}
nav a[aria-current="page"] .icon {
  color: #a0e8d2;
}
.nav-count {
  margin-left: auto;
  border-radius: 5px;
  padding: 0 6px;
  background: #ffffff12;
  font-size: 14px;
}
.nav-count.amber {
  color: #ffd2a6;
}
.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8be2cb;
  margin-left: auto;
  display: none;
}
nav a[aria-current="page"] .nav-dot {
  display: block;
}
.sidebar-note {
  margin: 38px 10px 24px;
  padding: 18px 12px;
  border: 1px solid #ffffff21;
  border-radius: 9px;
  font-size: 14px;
}
.sidebar-note strong {
  font-size: 14px;
  margin-left: 6px;
  font-weight: 500;
}
.sidebar-note p {
  color: #b8d1d3;
  margin: 8px 0 11px;
  line-height: 1.9;
}
.sidebar-note a {
  color: #94e0c8;
  font-size: 14px;
}
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #64c7a8;
  border-radius: 50%;
  flex-shrink: 0;
}
.sidebar-footer {
  margin-top: auto;
  padding: 16px 12px 0;
  border-top: 1px solid #ffffff18;
  font-size: 13px;
  color: #a9c5c8;
}
.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  color: #d2e6e5;
  font-size: 14px;
}
.sidebar-footer .icon {
  width: 14px;
  height: 14px;
}
.workspace {
  margin-left: 272px;
  min-width: 0;
}
.topbar {
  height: 68px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.breadcrumb {
  font-size: 16px;
  color: var(--muted);
}
.breadcrumb span {
  padding: 0 12px;
  color: #a1b5b8;
}
.breadcrumb strong {
  color: var(--text);
  font-weight: 500;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 17px;
}
.local-badge {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.icon-button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 35px;
  min-width: 35px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
}
.icon-button:hover {
  background: var(--surface2);
}
main {
  max-width: 1650px;
  margin: auto;
  padding: 33px 38px 18px;
  outline: none;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 27px;
}
.heading-context {
  font-size: 14px;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 6px;
}
.page-heading p:last-child {
  color: var(--muted);
  font-size: 16px;
  margin-top: 7px;
}
.heading-actions {
  display: flex;
  gap: 9px;
  flex-shrink: 0;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  min-height: 40px;
  padding: 9px 14px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
}
.button .icon {
  width: 16px;
  height: 16px;
}
.button.primary {
  background: var(--teal);
  color: #fff;
}
:root[data-theme="dark"] .button.primary {
  color: #10282d;
}
.button.primary:hover {
  filter: brightness(0.91);
}
.button.secondary {
  background: var(--surface);
  border-color: var(--line);
}
.button.secondary:hover {
  background: var(--surface2);
  border-color: var(--muted);
}
.text-button {
  background: none;
  border: 0;
  color: var(--teal);
  font-size: 16px;
  padding: 7px 2px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-button:hover {
  color: var(--text);
}
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  padding: 16px 20px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 21px;
}
.filter-title {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 16px;
  font-weight: 650;
  margin-right: 3px;
}
.filters label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: var(--muted);
}
select,
input[type="date"],
input[type="search"],
input[type="text"],
input[type="number"] {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 35px;
  padding: 6px 9px;
  color: var(--text);
  font-size: 16px;
  min-width: 0;
}
select {
  max-width: 100%;
  padding-right: 22px;
}
.filters select {
  max-width: 160px;
}
.filters input {
  width: 132px;
}
.filter-summary {
  flex-basis: 100%;
  border-top: 1px solid var(--line);
  padding-top: 9px;
  margin-top: 0;
  font-size: 13px;
  color: var(--muted);
}
.source-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 19px;
}
.source-alert .icon {
  color: var(--teal);
  height: 17px;
  width: 17px;
}
.source-alert a {
  margin-left: auto;
  color: var(--teal);
  font-weight: 600;
  white-space: nowrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  margin-bottom: 23px;
  overflow: hidden;
}
.stat {
  padding: 23px 24px;
  position: relative;
  min-width: 0;
}
.stat + .stat {
  border-left: 1px solid var(--line);
}
.stat-label {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.stat-label .icon {
  width: 17px;
  height: 17px;
  color: var(--teal);
}
.stat-number {
  font-size: 45px;
  font-weight: 750;
  letter-spacing: -1px;
  line-height: 1.45;
  margin: 9px 0 7px;
  font-variant-numeric: tabular-nums;
}
.stat-number small {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  margin-left: 6px;
  color: var(--muted);
}
.stat-foot {
  font-size: 13px;
  color: var(--muted);
}
.stat-foot b {
  color: var(--teal);
  font-weight: 550;
}
.stat.orange .stat-number,
.stat.orange .icon {
  color: var(--orange);
}
.stat.orange .stat-foot b {
  color: var(--orange);
}
.stat.blue .stat-number,
.stat.blue .icon {
  color: var(--blue);
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  box-shadow: var(--shadow);
  min-width: 0;
  margin-bottom: 22px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}
.panel-head p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
}
.panel-head h2,
.section-heading h2,
dialog h2 {
  border-inline-start: 4px solid var(--teal);
  background: var(--teal-light);
  border-radius: 0 6px 6px 0;
  padding: 7px 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.panel-head .tag {
  flex-shrink: 0;
}
.tag {
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: var(--teal-light);
  border-radius: 5px;
  color: var(--teal);
  font-weight: 500;
}
.tag.orange {
  background: var(--orange-light);
  color: var(--orange);
}
.tag.neutral {
  color: var(--muted);
  background: var(--surface2);
}
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 22px;
}
.equal-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.three-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 7px 0 15px;
}
.section-heading p {
  font-size: 14px;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.note {
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
  margin: 12px 0 0;
}
.callout {
  background: var(--orange-light);
  border-left: 3px solid var(--orange);
  padding: 15px 18px;
  font-size: 16px;
  color: var(--text);
  border-radius: 0 8px 8px 0;
  margin-bottom: 22px;
}
.callout p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 5px;
}
.empty {
  text-align: center;
  padding: 35px 18px;
  color: var(--muted);
  font-size: 17px;
}
.trend-svg {
  width: 100%;
  min-width: 680px;
  height: auto;
  overflow: visible;
}
.chart-scroll {
  overflow-x: auto;
  padding-top: 8px;
}
.trend-svg text {
  fill: var(--muted);
  font-family: inherit;
  font-size: 13px;
}
.trend-svg .bar-value {
  fill: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.gridline {
  stroke: var(--line);
  stroke-dasharray: 3 5;
}
.trend-bar {
  fill: var(--teal);
}
.trend-bar:hover {
  fill: var(--blue);
}
.chart-caption {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0;
}
.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--teal);
  flex-shrink: 0;
}
.legend-dot.orange {
  background: var(--orange);
}
details {
  font-size: 14px;
  margin-top: 13px;
}
summary {
  cursor: pointer;
  color: var(--muted);
  padding: 6px 0;
  width: fit-content;
}
summary:hover {
  color: var(--teal);
}
.rank-list {
  display: grid;
  gap: 17px;
}
.rank-item {
  display: grid;
  grid-template-columns: 20px 99px 1fr 32px;
  gap: 10px;
  align-items: center;
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  padding: 0;
  font-size: 14px;
  color: var(--text);
}
button.rank-item {
  padding: 4px;
  margin: -4px;
  border-radius: 4px;
}
button.rank-item:hover {
  background: var(--surface2);
}
.rank-position {
  color: #7f989d;
  font-size: 13px;
}
.rank-name {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.rank-track {
  height: 7px;
  background: var(--surface2);
  border-radius: 4px;
  overflow: hidden;
}
.rank-fill {
  height: 100%;
  display: block;
  border-radius: 4px;
}
.rank-item strong {
  text-align: right;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.rank-fill.teal,
.bar-track > .teal {
  background: var(--teal);
}
.rank-fill.orange,
.bar-track > .orange {
  background: var(--orange);
}
.rank-fill.blue,
.bar-track > .blue {
  background: var(--blue);
}
.horizontal-bars {
  display: grid;
  gap: 16px;
}
.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  margin-bottom: 7px;
}
.bar-label strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bar-label small {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.bar-track {
  height: 7px;
  border-radius: 4px;
  background: var(--surface2);
  overflow: hidden;
}
.bar-track > span {
  display: block;
  height: 100%;
  border-radius: 4px;
}
.source-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  background: var(--surface2);
  border-radius: 8px;
  margin-bottom: 12px;
}
.file-symbol {
  height: 37px;
  width: 32px;
  border: 1px solid var(--line);
  border-radius: 5px;
  display: grid;
  place-items: center;
  color: var(--teal);
  background: var(--surface);
  flex-shrink: 0;
}
.source-strip > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.source-strip strong {
  font-size: 14px;
  display: block;
  overflow-wrap: anywhere;
}
.source-strip small {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}
.source-strip .source-value {
  font-size: 26px;
  font-weight: 700;
  white-space: nowrap;
}
.source-strip .source-value small {
  font-size: 13px;
  text-align: right;
  font-weight: 400;
}
.donut-layout {
  display: flex;
  align-items: center;
  gap: 28px;
  justify-content: center;
  min-height: 170px;
}
.donut {
  width: 145px;
  height: 145px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.donut-center {
  width: 112px;
  height: 112px;
  background: var(--surface);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.donut-center strong {
  font-size: 29px;
  font-variant-numeric: tabular-nums;
}
.donut-center small {
  font-size: 13px;
  color: var(--muted);
}
.donut-legend {
  display: grid;
  gap: 15px;
}
.donut-legend > div {
  display: grid;
  grid-template-columns: 10px minmax(52px, 1fr) 58px;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.donut-legend strong {
  text-align: right;
}
.hour-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 7px;
}
.hour-grid > div {
  background: color-mix(
    in srgb,
    var(--teal) calc(var(--heat) * 22%),
    var(--surface)
  );
  padding: 9px 5px;
  text-align: center;
  border-radius: 5px;
}
.hour-grid span {
  display: block;
  font-size: 13px;
  color: var(--text);
}
.hour-grid strong {
  font-size: 19px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.risk-item {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.risk-item:last-child {
  border: 0;
}
.risk-item .bar-label {
  font-size: 16px;
}
.risk-item p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}
.risk-item b {
  color: var(--orange);
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  max-height: 580px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  white-space: nowrap;
  text-align: left;
}
th {
  background: var(--surface2);
  color: var(--muted);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}
td,
th {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: var(--surface2);
}
td {
  font-variant-numeric: tabular-nums;
}
td.wrap {
  white-space: normal;
  min-width: 170px;
  max-width: 360px;
}
td.num,
th.num {
  text-align: right;
}
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.table-toolbar > div {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.search {
  width: 260px;
  max-width: 100%;
}
.pagination {
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 16px;
  font-size: 14px;
}
.pagination > span {
  margin-right: auto;
  color: var(--muted);
}
.pagination button {
  min-height: 32px;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}
.tabs button {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 8px 15px;
  border-radius: 6px;
  font-size: 16px;
}
.tabs button[aria-pressed="true"] {
  background: var(--teal-light);
  border-color: var(--teal);
  color: var(--teal);
}
.tabular {
  font-variant-numeric: tabular-nums;
}
.quality-metrics {
  display: flex;
  gap: 14px;
  margin: 0 0 18px;
  font-size: 14px;
}
.quality-metrics span {
  padding: 7px 10px;
  background: var(--surface2);
  border-radius: 5px;
}
.status-diff {
  color: var(--orange);
  font-weight: 650;
}
.status-ok {
  color: var(--teal);
  font-weight: 650;
}
.source-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.upload-zone {
  padding: 28px;
  border: 1px dashed var(--teal);
  border-radius: 9px;
  background: var(--teal-light);
  text-align: center;
  margin-bottom: 20px;
}
.upload-zone .icon {
  margin: 0 auto 12px;
  width: 27px;
  height: 27px;
  color: var(--teal);
}
.upload-zone h3 {
  font-size: 21px;
}
.upload-zone p {
  font-size: 14px;
  color: var(--muted);
  margin: 9px 0 17px;
}
.upload-zone input {
  max-width: 100%;
  font-size: 16px;
}
.source-sheet-picker {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
  margin: 15px 0;
}
.source-sheet-picker label {
  font-size: 14px;
  display: flex;
  gap: 7px;
  align-items: center;
}
.source-sheet-picker select {
  max-width: 230px;
}
.source-facts {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  font-size: 14px;
  margin-top: 14px;
}
.source-facts dt {
  color: var(--muted);
}
.source-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.hash {
  font-size: 13px;
  font-family: inherit;
}
.history-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.history-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.history-list time {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.page-footer {
  padding: 15px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 10px;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: calc(50% + 136px);
  transform: translateX(-50%);
  max-width: calc(100% - 30px);
  background: var(--sidebar);
  color: #fff;
  border: 1px solid #65958d;
  border-radius: 8px;
  padding: 12px 22px;
  z-index: 100;
  font-size: 16px;
  box-shadow: 0 5px 25px #0002;
}
dialog {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 25px;
  max-width: min(700px, calc(100% - 30px));
  width: 700px;
  max-height: 88vh;
  overscroll-behavior: contain;
  box-shadow: 0 30px 100px #0003;
}
dialog::backdrop {
  background: #0a2d3bcc;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 13px 18px;
  font-size: 16px;
}
.detail-grid dt {
  color: var(--muted);
}
.detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.detail-grid input {
  width: 100%;
}
.error {
  font-size: 16px;
  color: var(--orange);
}
.map {
  height: 460px;
  min-height: 360px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface2);
  z-index: 0;
}
.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
}
.map-count-icon {
  background: none;
  border: none;
}
.map-count-bubble {
  width: var(--marker-size);
  height: var(--marker-size);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--marker-color);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 2px 7px #0004;
}
.map.leaflet-container {
  font-family: inherit;
  font-size: 15px;
}
.map .leaflet-popup-content {
  font-size: 15px;
  line-height: 1.7;
}
.map .leaflet-control-attribution {
  font-size: 12px;
}
.trend-svg text,
.trend-svg .bar-value {
  font-size: 18px;
}
.map-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}
.export-menu {
  display: grid;
  gap: 12px;
}
.export-menu button {
  justify-content: flex-start;
}
.advanced-filters {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  padding: 13px;
  background: var(--surface2);
  border-radius: 7px;
  margin-bottom: 16px;
}
.advanced-filters label {
  font-size: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.intro-note {
  max-width: 80ch;
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.9;
}
/* Detail typography is scoped to content; sidebar menu sizes stay unchanged. */
#main table,
#main .note,
#main .intro-note,
#main .panel-head p,
#main .stat-label,
#main .stat-foot,
#main .filter-summary,
#main .chart-caption,
#main .map-note,
#main .source-facts,
#main .source-strip small,
#main .section-heading p,
#main .rank-item,
#main .bar-label,
#main .risk-item p,
#main .quality-metrics,
#main .history-list li,
#main .donut-legend > div {
  font-size: 16px;
  line-height: 1.85;
}
#main .panel-head h2 {
  font-size: 23px;
}
#main .source-strip strong {
  font-size: 17px;
}
#main .panel small,
#main .bar-label small,
#main .hour-grid span {
  font-size: 15px;
}
#main .rank-item strong {
  font-size: 19px;
}
#main .rank-item {
  grid-template-columns: 24px minmax(80px, 120px) minmax(24px, 1fr) 50px;
}
#main .rank-position {
  font-size: 15px;
}
#main .trend-svg text,
#main .trend-svg .bar-value {
  font-size: 20px;
}
#main .history-list time {
  font-size: 15px;
}
#main .map .leaflet-popup-content {
  font-size: 17px;
}
#detailDialog .detail-grid,
#importDialog .detail-grid,
#detailDialog .detail-grid input {
  font-size: 18px;
  line-height: 1.9;
}
#detailDialog .intro-note,
#importDialog .note {
  font-size: 16px;
}
.nav-label {
  min-width: 0;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 35;
}
.topbar-start {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.breadcrumb {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#sidebarToggle {
  min-width: 40px;
  min-height: 40px;
  flex-shrink: 0;
}
body[data-sidebar-collapsed="true"] #sidebarToggle .icon {
  transform: scaleX(-1);
}
html {
  scroll-padding-top: 84px;
}
@media (min-width: 761px) {
  body[data-sidebar-collapsed="true"] .sidebar {
    width: 80px;
    padding: 22px 12px;
  }
  body[data-sidebar-collapsed="true"] .workspace {
    margin-left: 80px;
  }
  body[data-sidebar-collapsed="true"] .brand {
    --brand-logo-size: 44px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0;
    margin: 0 0 18px;
    padding: 0 0 18px;
  }
  body[data-sidebar-collapsed="true"] .brand-copy,
  body[data-sidebar-collapsed="true"] .sidebar-caption,
  body[data-sidebar-collapsed="true"] .sidebar-note,
  body[data-sidebar-collapsed="true"] .sidebar-footer,
  body[data-sidebar-collapsed="true"] .nav-label,
  body[data-sidebar-collapsed="true"] .nav-count,
  body[data-sidebar-collapsed="true"] .nav-dot {
    display: none;
  }
  body[data-sidebar-collapsed="true"] nav a {
    justify-content: center;
    padding: 12px;
    gap: 0;
    min-height: 48px;
  }
  body[data-sidebar-collapsed="true"] nav a .icon {
    width: 22px;
    height: 22px;
  }
  body[data-sidebar-collapsed="true"] .toast {
    left: calc(50% + 40px);
  }
}
@media (max-width: 760px) {
  body[data-sidebar-collapsed="true"] .sidebar nav {
    display: none;
  }
}
.edit-badge {
  font-size: 13px;
  color: var(--orange);
  margin-left: 7px;
}
.print-only {
  display: none;
}
@media (min-width: 1600px) {
  main {
    padding-top: 38px;
  }
  .stat {
    padding: 28px;
  }
  .panel {
    padding: 26px;
  }
  .trend-svg {
    max-height: 290px;
  }
  .rank-list {
    gap: 22px;
  }
}
@media (max-width: 1240px) {
  .sidebar {
    width: 248px;
    padding-inline: 12px;
  }
  .workspace {
    margin-left: 248px;
  }
  main {
    padding: 27px 24px 16px;
  }
  .topbar {
    padding-inline: 24px;
  }
  .brand {
    --brand-logo-size: 48px;
    gap: 9px;
  }
  .brand strong {
    font-size: 25px;
  }
  nav a {
    font-size: 16px;
    padding-inline: 12px;
  }
  .filters {
    gap: 12px;
  }
  .filters label {
    gap: 5px;
  }
  .filter-title {
    flex-basis: 100%;
  }
  .stat {
    padding: 19px 17px;
  }
  .stat-number {
    font-size: 38px;
  }
  .two-col {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 16px;
  }
  .equal-cols,
  .three-cols {
    gap: 16px;
  }
  .panel {
    padding: 18px;
  }
  .heading-actions .button {
    padding-inline: 10px;
  }
  .rank-item {
    grid-template-columns: 18px 85px 1fr 28px;
    gap: 7px;
  }
  .donut-layout {
    gap: 18px;
    flex-wrap: wrap;
  }
  .toast {
    left: calc(50% + 124px);
  }
}
@media (max-width: 1000px) {
  .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .two-col,
  .three-cols {
    grid-template-columns: 1fr;
  }
  .equal-cols {
    gap: 16px;
  }
  .heading-actions {
    margin-top: 0;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .stat:nth-child(4) {
    border-top: 1px solid var(--line);
  }
  .donut-layout {
    flex-wrap: wrap;
  }
  .filters {
    gap: 12px 16px;
  }
  .filters label {
    flex: 1 1 37%;
  }
  .filters select {
    flex: 1;
    max-width: none;
  }
  .filters input {
    flex: 1;
    width: 100px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: relative;
    width: auto;
    padding: 16px 16px 10px;
    overflow: visible;
  }
  .brand {
    --brand-logo-size: 48px;
    padding: 0 0 13px;
    margin: 0 0 12px;
    gap: 12px;
  }
  .brand strong {
    font-size: 24px;
  }
  .brand small {
    font-size: 13px;
  }
  .sidebar-caption,
  .sidebar-note,
  .sidebar-footer {
    display: none;
  }
  nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 5px;
    padding-bottom: 5px;
  }
  nav a {
    white-space: nowrap;
    font-size: 14px;
    padding: 9px 12px;
    min-height: 40px;
  }
  nav .icon {
    height: 16px;
    width: 16px;
  }
  .nav-count,
  .nav-dot {
    display: none !important;
  }
  .workspace {
    margin: 0;
  }
  .topbar {
    height: 49px;
    padding: 0 18px;
  }
  .breadcrumb {
    font-size: 13px;
  }
  .breadcrumb span {
    padding: 0 7px;
  }
  .local-badge {
    font-size: 12px;
    display: none;
  }
  .topbar-actions {
    gap: 10px;
  }
  .icon-button {
    min-width: 33px;
    min-height: 33px;
  }
  .topbar .icon-button {
    width: 29px;
    height: 29px;
    min-width: 29px;
    min-height: 29px;
  }
  main {
    padding: 23px 17px 12px;
  }
  .page-heading {
    gap: 17px;
    margin-bottom: 20px;
  }
  h1 {
    font-size: 29px;
    letter-spacing: -0.6px;
  }
  .heading-context {
    font-size: 13px;
  }
  .page-heading p:last-child {
    font-size: 14px;
  }
  .heading-actions {
    width: 100%;
  }
  .heading-actions .button {
    flex: 1;
  }
  .filters {
    padding: 13px;
    gap: 10px 14px;
    margin-bottom: 16px;
  }
  .filter-title {
    font-size: 14px;
  }
  .filters label {
    font-size: 13px;
    flex: 1 1 42%;
    display: block;
  }
  .filters input,
  .filters select {
    display: block;
    margin-top: 4px;
    width: 100%;
    font-size: 14px;
  }
  .filter-summary {
    font-size: 12px;
    line-height: 1.9;
  }
  .source-alert {
    font-size: 13px;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 7px;
  }
  .source-alert > span:nth-child(2) {
    flex: 1;
  }
  .source-alert a {
    margin-left: 24px;
  }
  .stats {
    margin-bottom: 17px;
  }
  .stat {
    padding: 17px 15px;
  }
  .stat-label {
    font-size: 13px;
    gap: 6px;
  }
  .stat-label .icon {
    width: 15px;
    height: 15px;
  }
  .stat-number {
    font-size: 37px;
    margin: 7px 0;
  }
  .stat-foot {
    font-size: 12px;
  }
  .stat-number small {
    font-size: 13px;
  }
  .panel {
    padding: 17px;
    margin-bottom: 17px;
  }
  .panel-head {
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
  }
  h2 {
    font-size: 20px;
  }
  .panel-head p {
    font-size: 13px;
  }
  .panel-head .tag {
    font-size: 12px;
  }
  .two-col,
  .equal-cols,
  .three-cols {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .trend-svg {
    min-width: 680px;
  }
  .rank-item {
    grid-template-columns: 22px 104px 1fr 32px;
    gap: 9px;
  }
  .rank-list {
    gap: 17px;
  }
  .source-strip {
    padding: 12px;
  }
  .donut-layout {
    gap: 20px;
    flex-wrap: wrap;
  }
  .hour-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .page-footer {
    flex-direction: column;
    align-items: flex-start;
    font-size: 12px;
    gap: 5px;
  }
  .toast {
    left: 50%;
    width: calc(100% - 34px);
    text-align: center;
  }
  .table-toolbar {
    gap: 10px;
  }
  .table-toolbar > div {
    width: 100%;
  }
  .search {
    width: 100%;
  }
  .pagination {
    gap: 7px;
    flex-wrap: wrap;
  }
  .pagination > span {
    flex-basis: 100%;
  }
  .source-facts {
    grid-template-columns: 85px 1fr;
  }
  .detail-grid {
    grid-template-columns: 100px 1fr;
    gap: 10px;
    font-size: 14px;
  }
  .source-sheet-picker {
    display: grid;
  }
  .source-sheet-picker label {
    display: grid;
    gap: 5px;
  }
  .source-sheet-picker select {
    max-width: 100%;
    width: 100%;
  }
  .quality-metrics {
    flex-wrap: wrap;
    gap: 6px;
  }
  .source-actions .button {
    flex: 1;
  }
  .map {
    height: 360px;
  }
  .advanced-filters {
    gap: 10px;
  }
  .advanced-filters label {
    flex-basis: 100%;
    justify-content: space-between;
  }
  .advanced-filters select {
    width: 60%;
  }
  .upload-zone {
    padding: 22px 15px;
  }
  .source-alert .icon {
    margin-top: 1px;
  }
  .chart-scroll {
    margin-right: -7px;
    padding-right: 7px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  a {
    transition:
      background-color 0.12s,
      color 0.12s,
      border-color 0.12s;
  }
  .toast {
    animation: toast-in 0.18s ease-out;
  }
  @keyframes toast-in {
    from {
      opacity: 0;
      transform: translate(-50%, 8px);
    }
    to {
      opacity: 1;
      transform: translate(-50%, 0);
    }
  }
}
@media print {
  body[data-sidebar-collapsed="true"] .workspace {
    margin-left: 0;
  }
  :root,
  :root[data-theme="dark"] {
    --surface: #fff;
    --surface2: #f7f9fa;
    --text: #193b40;
    --muted: #5d7478;
    --line: #dde7e9;
    --teal: #168370;
    --teal-light: #e6f4ef;
    --orange: #b95629;
    --orange-light: #fff0e7;
    --blue: #397d99;
    color-scheme: light;
  }
  .sidebar,
  .topbar,
  .heading-actions,
  .filters,
  .text-button,
  .source-actions,
  .pagination,
  .advanced-filters,
  .tabs,
  .upload-zone,
  .toast,
  dialog,
  .map {
    display: none !important;
  }
  .workspace {
    margin: 0;
  }
  main {
    max-width: none;
    padding: 0;
  }
  .panel,
  .stats {
    box-shadow: none;
    break-inside: avoid;
  }
  .panel {
    margin-bottom: 14px;
  }
  .two-col,
  .equal-cols,
  .three-cols {
    display: block;
  }
  .table-wrap {
    max-height: none;
    overflow: visible;
  }
  .page-footer {
    margin-top: 20px;
  }
  body {
    background: white;
    color: #193b40;
  }
  .print-only {
    display: block;
  }
  .trend-svg {
    min-width: 0;
  }
  .page-heading {
    margin-bottom: 18px;
  }
  .source-alert a {
    display: none;
  }
  a[href]:after {
    content: none;
  }
}

.prevention-summary,
.prevention-details {
  display: grid;
  gap: 24px;
  margin-block: 24px;
}
.prevention-summary > .equal-cols,
.prevention-details > .equal-cols {
  margin: 0;
}
.duplicate-group summary {
  color: var(--teal);
  font-weight: 600;
}
.duplicate-group ul {
  padding-inline-start: 20px;
  margin-top: 8px;
}
.duplicate-group .text-button {
  text-align: start;
  white-space: normal;
}
.focus-number {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin-block: 12px 20px;
}
.focus-number strong {
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.2;
  color: var(--teal);
}
.focus-number span {
  font-size: 18px;
}
.fiscal-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  border-inline-start: 4px solid var(--teal);
  border-radius: 6px;
  background: var(--teal-light);
  padding: 14px 18px;
  margin-bottom: 20px;
}
.fiscal-controls label {
  font-weight: 650;
  font-size: 18px;
}
.fiscal-controls select {
  font-size: 18px;
  max-width: 100%;
}
.fiscal-controls .note {
  margin: 0;
  font-size: 16px;
}
.fiscal-comparison {
  margin-bottom: 24px;
}
.combined-comparison h3 {
  font-size: 21px;
  margin: 24px 0 12px;
}
.combined-comparison details {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.combined-comparison details > summary {
  font-size: 18px;
  font-weight: 600;
}
.combined-comparison details > .table-wrap {
  margin-top: 14px;
}
.population-chart-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 16px 24px;
  margin: 20px 0;
}
.population-chart-controls label {
  display: grid;
  gap: 6px;
  font-size: 16px;
}
.population-chart-controls .note {
  margin: 0;
  flex: 1 1 280px;
}
.population-chart {
  overflow-x: auto;
  margin-bottom: 12px;
  padding-bottom: 8px;
  scrollbar-gutter: stable;
}
.population-svg {
  display: block;
  max-width: none;
}
.population-gridline {
  stroke: var(--line);
  stroke-dasharray: 4 5;
}
.population-baseline {
  stroke: var(--muted);
}
.population-axis {
  font-size: 16px;
  fill: var(--muted);
}
.population-category {
  font-size: 17px;
  fill: var(--text);
}
.population-value {
  font-size: 16px;
  font-weight: 600;
  fill: var(--text);
}
.population-bar.blue {
  fill: var(--blue);
}
.population-bar.teal {
  fill: var(--teal);
}
.population-bar.orange {
  fill: var(--orange);
}
.mortality-threshold-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px 24px;
  margin-bottom: 20px;
}
.mortality-threshold-controls label {
  display: grid;
  gap: 6px;
  font-size: 16px;
  max-width: 100%;
}
.mortality-threshold-controls input {
  width: 180px;
  max-width: 100%;
}
.mortality-threshold-controls .note {
  flex: 1 1 280px;
}
.mortality-rate {
  display: inline-block;
  font-weight: 650;
  padding-bottom: 3px;
  border-bottom: 3px solid transparent;
}
.mortality-status {
  display: inline-block;
  font-size: 16px;
}
.over-threshold {
  color: #b42318;
  border-bottom: 3px solid #b42318;
}
.mortality-status.over-threshold {
  background: #fff0ee;
  padding: 3px 9px;
  border-radius: 4px;
  font-weight: 650;
}
:root[data-theme="dark"] .over-threshold {
  color: #ffb4aa;
  border-bottom-color: #ff8173;
}
:root[data-theme="dark"] .mortality-status.over-threshold {
  background: #572c2a;
}
