:root {
  color-scheme: light;
  --ink: #18202b;
  --muted: #5b6a78;
  --line: #dbe3ec;
  --panel: #ffffff;
  --bg: #edf4f2;
  --teal: #11756d;
  --blue: #2d6f95;
  --aqua: #24a7a0;
  --gold: #bd7d1c;
  --red: #c7443e;
  --green: #20794d;
  --orange: #e56a35;
  --soft: #f8fbfa;
  --shadow-panel: 0 10px 26px rgba(24, 32, 43, 0.055);
  --shadow-control: 0 8px 18px rgba(17, 117, 109, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: #f2f7f5;
  color: var(--ink);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px max(24px, calc((100vw - 1480px) / 2 + 20px));
  border-bottom: 1px solid var(--line);
  background: linear-gradient(100deg, #ffffff 0%, #f1faf8 46%, #f2f8fb 72%, #fff8ee 100%);
  box-shadow: 0 6px 20px rgba(24, 32, 43, 0.045);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 310px;
}

.brand-mark {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(17, 117, 109, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--teal);
  box-shadow: 0 8px 18px rgba(17, 117, 109, 0.1);
}

.brand-mark svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.brand-copy {
  min-width: 0;
}

.topbar .module-nav {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid #cbd8dc;
  border-radius: 6px;
  background: #fff;
}

.topbar .module-nav a {
  min-height: 36px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.topbar .module-nav a.active {
  color: #fff;
  background: var(--teal);
}

.language-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid #cbd8dc;
  border-radius: 6px;
  background: #ffffff;
}

.language-switch button {
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.language-switch button.active {
  background: var(--teal);
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.trial-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 6px;
  padding: 2px 7px;
  border: 1px solid rgba(189, 125, 28, 0.38);
  border-radius: 4px;
  background: #fff4dc;
  color: #86580f;
  font-size: 11px;
  font-weight: 900;
  vertical-align: middle;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 27px;
  line-height: 1.2;
}

h2 {
  font-size: 18px;
  line-height: 1.3;
}

p {
  color: var(--muted);
  line-height: 1.6;
}

.status-pill {
  min-width: 150px;
  padding: 9px 13px;
  border: 1px solid rgba(17, 117, 109, 0.22);
  border-radius: 999px;
  background: #fff;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.status-pill[data-tone="ok"] {
  border-color: rgba(32, 121, 77, 0.28);
  background: #edf8f1;
  color: var(--green);
}

.status-pill[data-tone="warn"] {
  border-color: rgba(189, 125, 28, 0.3);
  background: #fff7e8;
  color: #906014;
}

.status-pill[data-tone="error"] {
  border-color: rgba(199, 68, 62, 0.32);
  background: #fff0ef;
  color: var(--red);
}

.status-pill[data-tone="loading"] {
  border-color: rgba(45, 111, 149, 0.28);
  background: #eef7fb;
  color: var(--blue);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(480px, 1.06fr) minmax(430px, 0.94fr);
  gap: 16px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px;
}

.map-panel,
.insight-panel,
.forecast-panel,
.forecast-chart-panel,
.risk-map-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-panel);
}

.map-panel {
  border-top: 3px solid rgba(45, 111, 149, 0.78);
}

.insight-panel {
  border-top: 3px solid rgba(17, 117, 109, 0.8);
}

.trial-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 13px 15px;
  border-left: 4px solid var(--gold);
  border-radius: 0 6px 6px 0;
  background: #fff8e9;
}

.trial-notice strong {
  display: block;
  color: #704b12;
  font-size: 14px;
}

.trial-notice p {
  margin-top: 5px;
  color: #695c45;
  font-size: 13px;
}

.trial-notice a,
.footnote a,
.legal-shell a {
  color: var(--teal);
  font-weight: 700;
}

.trial-notice a {
  flex: 0 0 auto;
  font-size: 13px;
  white-space: nowrap;
}

.legal-shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 54px;
}

.legal-intro {
  padding-bottom: 28px;
  border-bottom: 2px solid var(--teal);
}

.legal-intro > span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.legal-intro h2 {
  margin: 8px 0 10px;
  font-size: 26px;
}

.legal-section {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.legal-section h2 {
  margin-bottom: 10px;
  color: #253541;
  font-size: 19px;
}

.legal-section p + p {
  margin-top: 10px;
}

.legal-contact {
  border-bottom: 0;
}

.legal-footer {
  margin-bottom: 0;
  padding-bottom: 28px;
  text-align: center;
}

.map-panel,
.insight-panel {
  min-height: 720px;
  padding: 18px;
}

.forecast-risk-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1.12fr) minmax(390px, 0.88fr);
  gap: 16px;
  align-items: stretch;
}

.forecast-chart-panel,
.risk-map-panel {
  min-height: 0;
  padding: 18px;
  border-top: 3px solid rgba(45, 111, 149, 0.42);
}

.forecast-chart-panel {
  display: flex;
  flex-direction: column;
}

.forecast-panel {
  grid-column: 1 / -1;
  padding: 18px;
  border-top: 3px solid var(--teal);
}

.forecast-heading {
  align-items: flex-start;
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.forecast-heading-copy {
  max-width: 900px;
}

.forecast-heading h2 {
  margin: 4px 0 5px;
}

.forecast-heading p {
  max-width: 720px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.section-kicker {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.forecast-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(45, 111, 149, 0.25);
  border-radius: 6px;
  background: #eef7fb;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.forecast-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.forecast-status-block {
  flex: 0 0 auto;
}

.forecast-status[data-tone="ok"] {
  border-color: rgba(32, 121, 77, 0.25);
  background: #edf8f1;
  color: var(--green);
}

.forecast-status[data-tone="warn"] {
  border-color: rgba(189, 125, 28, 0.28);
  background: #fff7e8;
  color: #906014;
}

.forecast-update-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}

.forecast-update-row a,
.forecast-caveat a {
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.forecast-update-row a:hover,
.forecast-caveat a:hover {
  text-decoration: underline;
}

.forecast-loading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-left: 4px solid var(--blue);
  border-radius: 0 6px 6px 0;
  background: #eef7fb;
}

.forecast-loading[hidden] {
  display: none;
}

.forecast-loading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.forecast-spinner {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 3px solid rgba(45, 111, 149, 0.2);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: forecast-spin 0.8s linear infinite;
}

@keyframes forecast-spin {
  to { transform: rotate(360deg); }
}

.forecast-content.is-loading {
  opacity: 0.55;
}

.forecast-summary {
  display: grid;
  grid-template-columns: minmax(180px, max-content) minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  padding: 14px 16px;
  border-left: 6px solid #9aa8b5;
  border-radius: 0 6px 6px 0;
  background: #f5f8fa;
}

.forecast-summary.safe {
  border-left-color: var(--green);
  background: #edf8f1;
}

.forecast-summary.watch {
  border-left-color: var(--gold);
  background: #fff7e8;
}

.forecast-summary.danger {
  border-left-color: var(--red);
  background: #fff0ef;
}

.forecast-summary strong {
  font-size: 18px;
  line-height: 1.35;
  white-space: nowrap;
}

.forecast-summary p {
  color: #465767;
  font-size: 14px;
  line-height: 1.65;
}

.forecast-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.forecast-metrics > div {
  min-height: 88px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-top: 4px solid rgba(17, 117, 109, 0.42);
  border-radius: 6px;
  background: #fff;
}

.forecast-metric[data-tone="watch"] {
  border-top-color: var(--gold);
}

.forecast-metric[data-tone="danger"] {
  border-top-color: var(--red);
}

.forecast-metrics span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.forecast-metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 23px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.forecast-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 7px;
}

.forecast-chart-header > strong {
  color: #273947;
  font-size: 15px;
}

.forecast-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.forecast-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-line {
  display: inline-block;
  width: 24px;
  height: 0;
  border-top: 3px solid var(--blue);
}

.legend-line.threshold {
  border-top: 2px dashed var(--red);
}

.legend-area {
  display: inline-block;
  width: 24px;
  height: 10px;
  border: 1px solid rgba(45, 111, 149, 0.25);
  background: rgba(45, 111, 149, 0.12);
}

.forecast-chart {
  width: 100%;
  min-height: 240px;
  border-top: 1px solid #edf1f4;
  background: #fff;
}

.forecast-caveat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 4px solid #8999a8;
  background: #f5f7f9;
}

.forecast-caveat strong {
  color: #344452;
  font-size: 13px;
}

.forecast-caveat p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.panel-header,
.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-header {
  padding-bottom: 14px;
  border-bottom: 1px solid #e8eef2;
}

.panel-header h2 {
  font-size: 20px;
}

.panel-header p {
  margin-top: 4px;
  font-size: 14px;
}

.primary-button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: #11756d;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-control);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.primary-button::after {
  margin-left: 8px;
  content: "→";
}

.primary-button:hover:not(:disabled) {
  background: #0d625c;
  box-shadow: 0 11px 22px rgba(17, 117, 109, 0.22);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.66;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 12px;
  margin-bottom: 16px;
}

label {
  display: grid;
  gap: 6px;
  color: #3b4855;
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  height: 44px;
  border: 1px solid #cbd6e2;
  border-radius: 6px;
  background: #fbfdfe;
  color: var(--ink);
  font: inherit;
  padding: 0 12px;
}

input:focus,
select:focus {
  border-color: var(--aqua);
  box-shadow: 0 0 0 3px rgba(36, 167, 160, 0.16);
  outline: none;
}

.map {
  position: relative;
  height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(29, 138, 122, 0.15), rgba(45, 108, 162, 0.18)),
    #e7eef4;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}

.map.leaflet-map {
  background: #dceef4;
  cursor: grab;
  touch-action: auto;
}

.map.leaflet-map:active {
  cursor: grabbing;
}

.map.leaflet-container {
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.map .leaflet-control-layers,
.map .leaflet-bar a {
  border-color: rgba(35, 51, 67, 0.16);
}

.map .leaflet-control-layers {
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(24, 32, 43, 0.12);
}

.map .leaflet-tooltip {
  border: 0;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(24, 32, 43, 0.16);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.map .selected-site-marker {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
}

.selected-site-pulse,
.selected-site-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.selected-site-pulse {
  width: 34px;
  height: 34px;
  background: rgba(229, 106, 53, 0.24);
  box-shadow: 0 0 0 0 rgba(229, 106, 53, 0.44);
  animation: selectedPulse 1.6s ease-out infinite;
}

.selected-site-dot {
  width: 18px;
  height: 18px;
  border: 4px solid #fff;
  background: var(--orange);
  box-shadow:
    0 5px 14px rgba(24, 32, 43, 0.32),
    0 0 0 3px rgba(229, 106, 53, 0.2);
}

.selected-site-tooltip {
  padding: 7px 10px;
  border: 1px solid rgba(35, 51, 67, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(24, 32, 43, 0.18);
}

.leaflet-tooltip-top.selected-site-tooltip::before {
  border-top-color: rgba(255, 255, 255, 0.96);
}

@keyframes selectedPulse {
  0% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(0.74);
  }
  70% {
    opacity: 0.16;
    transform: translate(-50%, -50%) scale(1.35);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.45);
  }
}

.map-fallback {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #f0d7a8;
  border-radius: 6px;
  background: #fff8eb;
  color: #85600f;
}

.map svg {
  display: block;
  width: 100%;
  height: 100%;
}

.map-base-svg,
.tile-layer,
.risk-layer {
  position: absolute;
  inset: 0;
}

.map-base-svg {
  z-index: 0;
}

.tile-layer {
  z-index: 1;
  background: rgba(220, 238, 244, 0.35);
}

.tile-layer img {
  position: absolute;
  display: block;
  object-fit: fill;
  pointer-events: none;
}

.tile-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.18));
  pointer-events: none;
}

.risk-layer {
  z-index: 2;
  pointer-events: none;
}

.map-label {
  fill: #425469;
  font-size: 12px;
  font-weight: 700;
}

.map-water {
  fill: #dceef4;
}

.map-land {
  fill: #f3efe4;
  stroke: #c9bea8;
  stroke-width: 1.4;
}

.map-grid {
  stroke: rgba(81, 98, 115, 0.18);
  stroke-width: 1;
}

.map-marker {
  position: absolute;
  z-index: 3;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 5px 14px rgba(24, 32, 43, 0.25);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.map-controls {
  position: absolute;
  z-index: 4;
  top: 12px;
  right: 12px;
  display: grid;
  gap: 6px;
}

.map-controls button {
  min-width: 42px;
  height: 34px;
  border: 1px solid rgba(35, 51, 67, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(24, 32, 43, 0.12);
}

.map-controls button:last-child {
  min-width: 54px;
  font-size: 13px;
}

.risk-point {
  position: absolute;
  width: 13px;
  height: 13px;
  border: 2px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 3px 10px rgba(24, 32, 43, 0.2);
}

.risk-point.safe {
  background: var(--green);
}

.risk-point.watch {
  background: var(--gold);
}

.risk-point.danger {
  background: var(--red);
}

.risk-banner {
  display: grid;
  gap: 7px;
  min-height: 118px;
  padding: 16px;
  border-left: 6px solid #9aa8b5;
  border-radius: 0 6px 6px 0;
  background: var(--soft);
}

.risk-banner.safe {
  border-left-color: var(--green);
  background: #edf8f1;
}

.risk-banner.watch {
  border-left-color: var(--gold);
  background: #fff7e8;
}

.risk-banner.danger {
  border-left-color: var(--red);
  background: #fff0ef;
}

.risk-banner strong {
  font-size: 23px;
  line-height: 1.25;
}

.risk-label {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(24, 32, 43, 0.08);
  color: #41505f;
  font-size: 12px;
  font-weight: 800;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.metric,
.threshold-grid > div,
.cold-panel {
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.metric {
  border-top: 4px solid rgba(45, 111, 149, 0.28);
}

.threshold-grid > div {
  border-top: 4px solid rgba(17, 117, 109, 0.34);
}

.metric span,
.threshold-grid span,
.cold-panel span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.metric strong,
.threshold-grid strong,
.cold-panel strong {
  display: block;
  margin-top: 8px;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

html[lang="en"] .metric strong,
html[lang="en"] .threshold-grid strong,
html[lang="en"] .cold-panel strong {
  font-size: 23px;
  overflow-wrap: anywhere;
}

.threshold-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.cold-panel {
  display: grid;
  grid-template-columns: 190px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 74px;
  margin-bottom: 18px;
  background: #f7fbff;
  border-left: 6px solid #9aa8b5;
}

.cold-panel.safe {
  border-left-color: var(--green);
}

.cold-panel.watch {
  border-left-color: var(--gold);
}

.cold-panel.danger {
  border-left-color: var(--red);
}

.cold-panel p {
  color: var(--muted);
  font-size: 14px;
}

.chart-wrap {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.chart-heading h2 {
  margin: 0;
}

.chart-heading p {
  margin-top: 6px;
  font-size: 14px;
}

.trend-chart {
  width: 100%;
  min-height: 320px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 50%;
}

.safe {
  background: var(--green);
}

.watch {
  background: var(--gold);
}

.danger {
  background: var(--red);
}

.risk-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.risk-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.risk-panel-heading h2 {
  margin: 0;
}

.risk-panel-heading p {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
}

.risk-item {
  border: 1px solid var(--line);
  border-top: 4px solid #9aa8b5;
  border-radius: 6px;
  min-height: 64px;
  padding: 10px 11px;
  background: #fff;
}

.risk-item.safe {
  border-top-color: var(--green);
}

.risk-item.watch {
  border-top-color: var(--gold);
}

.risk-item.danger {
  border-top-color: var(--red);
}

.risk-item-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.risk-item strong {
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.25;
}

.risk-level {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(24, 32, 43, 0.07);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.risk-item-data {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.footnote {
  max-width: 1480px;
  margin: 0 auto 28px;
  padding: 16px 18px 0;
  border-top: 1px solid rgba(219, 227, 236, 0.9);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.footnote p + p {
  margin-top: 8px;
}

.author-note {
  color: #344452;
  font-weight: 700;
}

.author-note a {
  color: var(--teal);
  text-decoration: none;
}

.author-note a:hover {
  text-decoration: underline;
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .forecast-risk-grid {
    grid-template-columns: 1fr;
  }

  .risk-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forecast-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-panel,
  .insight-panel {
    min-height: auto;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .brand-block {
    flex: 1 1 320px;
  }
}

@media (max-width: 700px) {
  .topbar,
  .panel-header,
  .section-title {
    display: grid;
  }

  .topbar {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 14px 14px 12px;
  }

  .topbar > div:first-child {
    grid-column: 1 / -1;
  }

  .brand-block {
    min-width: 0;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .brand-mark svg {
    width: 23px;
    height: 23px;
  }

  .workspace {
    gap: 10px;
    padding: 10px;
  }

  .controls-grid,
  .cold-panel {
    grid-template-columns: 1fr;
  }

  .metrics-grid,
  .threshold-grid,
  .forecast-metrics,
  .risk-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .threshold-grid > div:last-child,
  .risk-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .map-panel,
  .insight-panel {
    padding: 14px;
  }

  .forecast-panel {
    padding: 14px;
  }

  .forecast-heading,
  .forecast-chart-header,
  .forecast-summary {
    grid-template-columns: 1fr;
  }

  .forecast-status-block {
    justify-self: start;
  }

  .forecast-summary {
    display: grid;
    gap: 8px;
  }

  .forecast-summary strong {
    font-size: 17px;
    white-space: normal;
  }

  .forecast-chart-header {
    display: grid;
  }

  .forecast-update-row,
  .trial-notice,
  .forecast-caveat {
    display: grid;
    justify-content: stretch;
    gap: 6px;
  }

  .forecast-update-row {
    justify-items: start;
  }

  .forecast-chart {
    min-height: 205px;
  }

  .risk-panel-heading {
    display: grid;
  }

  .map {
    height: 360px;
  }

  h1 {
    font-size: 23px;
  }

  .topbar .module-nav {
    grid-column: 1;
    width: 100%;
  }

  .language-switch {
    grid-column: 2;
    width: auto;
  }

  .status-pill {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .topbar .module-nav a {
    flex: 1;
  }

  .language-switch button {
    flex: 1;
  }

  .panel-header {
    gap: 12px;
  }

  .primary-button {
    width: 100%;
  }

  .risk-banner strong {
    font-size: 21px;
  }

  .metric,
  .threshold-grid > div {
    min-height: 92px;
    padding: 12px;
  }

  .metric span,
  .threshold-grid span {
    font-size: 12px;
  }

  .metric strong,
  .threshold-grid strong,
  .cold-panel strong {
    font-size: 22px;
  }

  .trend-chart {
    min-height: 250px;
  }

  .forecast-chart-panel,
  .risk-map-panel {
    padding: 14px;
  }

  .risk-item {
    min-height: 86px;
    padding: 9px;
  }

  .risk-item-data {
    font-size: 11px;
  }

  .legal-shell {
    width: min(100% - 28px, 980px);
    padding: 30px 0 40px;
  }

  .legal-intro h2 {
    font-size: 22px;
  }
}
