:root {
  --bg: #f7f9fc;
  --panel: #ffffff;
  --text: #081a35;
  --muted: #516071;
  --line: #d7e1ec;
  --blue: #0a72d6;
  --red: #ee1d24;
  --yellow: #f2a100;
  --green: #078622;
  --soft-blue: #eef6ff;
  --soft-red: #fff4f4;
  --soft-green: #f2fff4;
  --shadow: 0 6px 18px rgba(12, 32, 56, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 4%, rgba(10, 114, 214, 0.07), transparent 30%),
    radial-gradient(circle at 90% 0%, rgba(7, 134, 34, 0.06), transparent 24%),
    var(--bg);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  overflow-x: hidden;
}

button,
table {
  font: inherit;
}

svg {
  display: block;
  fill: currentColor;
}

.risk-board {
  max-width: 1780px;
  margin: 0 auto;
  padding: 16px 20px 22px;
}

.board-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}

.headline {
  min-width: 0;
}

.headline h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1.02;
  font-weight: 850;
  letter-spacing: 0;
}

.context-line {
  display: flex;
  flex-wrap: wrap;
  margin-top: 6px;
  color: #263244;
  font-size: 18px;
  line-height: 1.3;
}

.context-line span + span::before {
  content: "|";
  margin: 0 14px;
  color: #2c3544;
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 360px;
  color: #263244;
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
}

.header-tools button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #064e9f;
  background: transparent;
  border: 0;
  border-left: 1px solid #cbd7e4;
}

.header-tools svg {
  width: 27px;
  height: 27px;
}

.section-line {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}

.section-line::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.section-line h2 {
  margin: 0 0 0 24px;
  color: #0b356d;
  font-size: 18px;
  line-height: 1.2;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1.15fr repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.summary-card,
.panel {
  min-width: 0;
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.summary-card {
  min-height: 92px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
}

.summary-card.status-card {
  grid-template-columns: minmax(0, 1fr) 42px;
  color: var(--red);
  border-color: rgba(238, 29, 36, 0.7);
  background: #fff;
}

.status-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
}

.status-card strong {
  color: var(--red);
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
}

.status-card.status-green {
  color: var(--green);
  border-color: rgba(7, 134, 34, 0.5);
}

.status-card.status-green strong {
  color: var(--green);
}

.status-card.status-yellow {
  color: var(--yellow);
  border-color: rgba(242, 161, 0, 0.62);
}

.status-card.status-yellow strong {
  color: var(--yellow);
}

.alert-icon {
  width: 40px;
  height: 40px;
}

.metric svg {
  width: 36px;
  height: 36px;
  color: var(--blue);
}

.metric span {
  display: block;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.2;
}

.metric strong {
  display: block;
  margin-top: 2px;
  color: #071322;
  font-size: 26px;
  line-height: 1.05;
  font-weight: 850;
}

.metric strong small {
  font-size: 18px;
  font-weight: 750;
}

.metric em {
  display: block;
  margin-top: 4px;
  color: #111827;
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
}

.risk-layout {
  display: grid;
  grid-template-columns: minmax(600px, 2.15fr) minmax(180px, 0.55fr) minmax(240px, 0.78fr) minmax(260px, 0.82fr);
  gap: 14px;
  margin-bottom: 16px;
}

.panel {
  padding: 18px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.panel-title.compact {
  margin-bottom: 12px;
}

h2 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 850;
}

.info {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-left: 4px;
  color: #1a2431;
  border: 1.5px solid #1a2431;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
  vertical-align: 2px;
}

.forecast-step {
  color: #2f3b4d;
  font-size: 15px;
  white-space: nowrap;
}

.timeline-labels {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 20px 10px;
  text-align: center;
  font-size: 15px;
  gap: 8px;
}

.timeline-labels strong {
  min-width: 0;
  display: grid;
  gap: 2px;
  line-height: 1.12;
}

.timeline-labels b {
  font-size: 16px;
}

.timeline {
  position: relative;
  padding: 0 2px;
}

.hour-cells {
  position: relative;
  z-index: 2;
  display: grid;
  height: 30px;
  overflow: visible;
  border-radius: 3px;
  border: 1px solid #f0d1d1;
}

.risk-cell {
  position: relative;
  min-width: 0;
  display: block;
  min-width: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.44);
  cursor: help;
  outline: 0;
}

.risk-cell:last-child {
  border-right: 0;
}

.risk-cell::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 40;
  left: 50%;
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: 230px;
  padding: 9px 10px;
  color: #fff;
  background: #071322;
  border-radius: 7px;
  box-shadow: 0 8px 22px rgba(7, 19, 34, 0.22);
  font-size: 12px;
  line-height: 1.32;
  text-align: left;
  white-space: pre-line;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.risk-cell::before {
  content: "";
  position: absolute;
  z-index: 41;
  left: 50%;
  bottom: calc(100% + 3px);
  border: 7px solid transparent;
  border-top-color: #071322;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 0.12s ease;
}

.risk-cell:hover::after,
.risk-cell:focus::after,
.risk-cell:hover::before,
.risk-cell:focus::before {
  opacity: 1;
  transform: translate(-50%, 0);
}

.risk-cell:hover,
.risk-cell:focus {
  box-shadow: inset 0 0 0 2px rgba(8, 26, 53, 0.28);
}

.risk-red,
.hour-cells .risk-red {
  background: linear-gradient(180deg, #ff2d2d, #df0000);
}

.risk-yellow,
.hour-cells .risk-yellow {
  background: linear-gradient(180deg, #ffc32a, #ff9e00);
}

.risk-green,
.hour-cells .risk-green {
  background: linear-gradient(180deg, #2fbf58, #078622);
}

.risk-unknown,
.hour-cells .risk-unknown {
  background: repeating-linear-gradient(135deg, #d7e0ea, #d7e0ea 5px, #c7d2df 5px, #c7d2df 10px);
}

.day-dividers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.day-divider {
  position: absolute;
  z-index: 1;
  top: -44px;
  bottom: -62px;
  border-left: 2px dashed #b9c3cf;
}

.hour-labels {
  position: relative;
  height: 38px;
  margin: 10px 3px 0;
  color: #1e2632;
  font-size: 13px;
  line-height: 1.15;
  text-align: center;
}

.hour-labels span {
  position: absolute;
  top: 0;
  padding-top: 12px;
  border-left: 1px solid #d2d8df;
  transform: translateX(-50%);
  white-space: nowrap;
}

.date-labels {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 6px 4px 0;
  color: #1b2430;
  font-size: 15px;
}

.date-labels span {
  text-align: center;
}

.date-labels span:first-child {
  text-align: left;
}

.date-labels span:last-child {
  text-align: right;
}

.safe-card {
  color: var(--green);
  border-color: rgba(7, 134, 34, 0.5);
  background: linear-gradient(180deg, #fff, #fbfffb);
}

.satellite-card {
  color: #0a4f9f;
  border-color: rgba(10, 114, 214, 0.38);
  background: linear-gradient(180deg, #fff, #f7fbff);
}

.synoptic-card {
  color: #0a4f9f;
  border-color: rgba(10, 114, 214, 0.42);
  background: linear-gradient(180deg, #fff, #f5faff);
}

.card-icon {
  width: 26px;
  height: 26px;
  color: currentColor;
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.safe-card h2,
.satellite-card h2,
.synoptic-card h2 {
  margin-top: 8px;
  color: currentColor;
  font-size: 17px;
}

.safe-card > strong,
.satellite-card > strong,
.synoptic-card > strong {
  display: block;
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 850;
}

.safe-card p {
  margin: 16px 0 0;
  color: var(--green);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
}

.synoptic-card p {
  margin: 14px 0 0;
  color: #31516f;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}

.satellite-button,
.synoptic-button {
  width: 100%;
  min-height: 40px;
  margin-top: 18px;
  color: #fff;
  background: linear-gradient(180deg, #1379da, #075fb6);
  border: 1px solid rgba(5, 76, 145, 0.3);
  border-radius: 7px;
  box-shadow: 0 8px 18px rgba(10, 114, 214, 0.18);
  font-size: 15px;
  font-weight: 850;
  cursor: pointer;
}

.satellite-button {
  margin-top: 12px;
}

.satellite-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #cfe0f2;
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(10, 114, 214, 0.10), rgba(255, 255, 255, 0)),
    #d7e8f6;
}

.satellite-mosaic {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  transform: scale(1.16);
  transform-origin: 43% 54%;
}

.satellite-mosaic img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.satellite-mosaic.is-loading::after,
.satellite-mosaic.is-error::after {
  content: "Himawari";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #23415d;
  background: linear-gradient(135deg, #e9f4ff, #c9dff2);
  font-size: 14px;
  font-weight: 850;
}

.satellite-mosaic.is-error::after {
  content: "Снимок недоступен";
}

.satellite-marker {
  position: absolute;
  left: 43%;
  top: 54%;
  width: 18px;
  height: 18px;
  border: 3px solid var(--red);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 0 0 4px rgba(238, 29, 36, 0.18), 0 3px 12px rgba(5, 20, 40, 0.28);
  transform: translate(-50%, -50%);
}

.satellite-label {
  position: absolute;
  left: calc(43% + 13px);
  top: calc(54% - 9px);
  padding: 2px 6px;
  color: #061a33;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(10, 56, 100, 0.18);
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 850;
  white-space: nowrap;
}

.synoptic-button:hover,
.synoptic-button:focus-visible,
.satellite-button:hover,
.satellite-button:focus-visible {
  background: linear-gradient(180deg, #1f89ec, #0869c8);
  outline: 2px solid rgba(10, 114, 214, 0.22);
  outline-offset: 2px;
}

.red-text {
  color: var(--red);
}

.yellow-text {
  color: var(--yellow);
}

.green-text {
  color: var(--green);
}

.unknown-text {
  color: #657386;
}

.analysis-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.62fr) repeat(3, minmax(360px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.map-card,
.chart-card {
  padding: 0;
  overflow: hidden;
}

.map-header,
.chart-card h2 {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 18px;
  border-bottom: 1px solid #edf1f5;
}

.map-header h2,
.chart-card h2 {
  font-size: 20px;
}

.map-header span {
  color: #25405f;
  font-size: 13px;
  font-weight: 800;
}

.risk-map {
  height: 260px;
  background: #d9ecfb;
  cursor: default;
}

.risk-map .leaflet-control-zoom {
  display: none;
}

.map-footer {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  padding: 9px 14px;
  color: #42536a;
  border-top: 1px solid #edf1f5;
  font-size: 13px;
  font-weight: 700;
}

.object-marker {
  width: 24px;
  height: 24px;
  border: 4px solid var(--red);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 0 5px rgba(238, 29, 36, 0.16), 0 5px 13px rgba(0, 0, 0, 0.24);
}

.object-marker::before,
.object-marker::after {
  content: "";
  position: absolute;
  background: var(--red);
}

.object-marker::before {
  top: 50%;
  left: -11px;
  right: -11px;
  height: 3px;
  transform: translateY(-50%);
}

.object-marker::after {
  left: 50%;
  top: -11px;
  bottom: -11px;
  width: 3px;
  transform: translateX(-50%);
}

.chart-card {
  position: relative;
  min-height: 410px;
}

.chart-legend {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  padding: 10px 18px 0;
  color: #1f2b38;
  font-size: 12px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chart-legend span::before {
  content: "";
  width: 18px;
  height: 3px;
  display: inline-block;
  border-radius: 999px;
}

.blue-line::before {
  background: #0d5bff;
}

.orange-line::before {
  background: #ff6b22;
}

.cyan-line::before {
  background: #02a6d8;
}

.violet-line::before {
  background: #7752d6;
}

.teal-line::before {
  background: #009a8a;
}

.chart {
  width: 100%;
  height: 320px;
  margin-top: 2px;
}

.grid {
  fill: none;
  stroke: #dce2ea;
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.axis {
  fill: none;
  stroke: #aeb8c5;
  stroke-width: 1.3;
}

.ytick {
  fill: #5d6a7b;
  font-size: 10px;
  font-weight: 700;
  text-anchor: end;
}

.threshold {
  fill: none;
  stroke-dasharray: 7 5;
  stroke-width: 1.5;
}

.threshold.yellow {
  stroke: rgba(242, 161, 0, 0.85);
}

.threshold.red {
  stroke: rgba(238, 29, 36, 0.8);
}

.threshold-label {
  font-size: 10px;
  font-weight: 850;
  text-anchor: end;
}

.threshold-label.yellow {
  fill: #8a5900;
}

.threshold-label.red {
  fill: #b30b12;
}

.area {
  opacity: 0.9;
}

.area.blue {
  fill: url("#windChartBlueFill");
}

.area.cyan,
.area.teal {
  fill: rgba(28, 178, 220, 0.14);
}

.line {
  fill: none;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 2px rgba(16, 40, 72, 0.08));
}

.line.blue {
  stroke: #0d5bff;
}

.line.orange {
  stroke: #ff6b22;
  stroke-dasharray: 9 6;
}

.line.cyan {
  stroke: #02a6d8;
}

.line.violet {
  stroke: #7752d6;
  stroke-dasharray: 9 6;
}

.line.teal {
  stroke: #009a8a;
}

.hover-line {
  fill: none;
  stroke: rgba(8, 26, 53, 0.42);
  stroke-width: 1.2;
  stroke-dasharray: 4 4;
}

.hover-point {
  fill: #fff;
  stroke-width: 3;
  filter: drop-shadow(0 2px 5px rgba(8, 26, 53, 0.25));
}

.hover-point.blue {
  stroke: #0d5bff;
}

.hover-point.orange {
  stroke: #ff6b22;
}

.hover-point.cyan {
  stroke: #02a6d8;
}

.hover-point.violet {
  stroke: #7752d6;
}

.hover-point.teal {
  stroke: #009a8a;
}

.chart-hit-zone {
  fill: transparent;
  cursor: crosshair;
  pointer-events: all;
}

.chart-tooltip {
  position: fixed;
  z-index: 1000;
  min-width: 180px;
  max-width: 260px;
  display: none;
  padding: 10px 12px;
  color: #fff;
  background: rgba(5, 18, 35, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(8, 26, 53, 0.28);
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
}

.chart-tooltip.visible {
  display: grid;
  gap: 4px;
}

.chart-tooltip b {
  color: #fff;
  font-size: 12px;
}

.chart-tooltip span {
  font-weight: 800;
}

.chart-tooltip .blue {
  color: #86b6ff;
}

.chart-tooltip .orange {
  color: #ffb07d;
}

.chart-tooltip .cyan {
  color: #73ddff;
}

.chart-tooltip .violet {
  color: #c2b0ff;
}

.chart-tooltip .teal {
  color: #80e9dd;
}

.xlabels text,
.unit {
  fill: #1d2734;
  font-size: 13px;
  font-weight: 650;
}

.bottom-grid {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(760px, 1.95fr);
  gap: 14px;
  margin-bottom: 14px;
}

.criteria-card,
.daily-risk {
  padding: 16px 18px;
}

.criteria-card dl {
  margin: 12px 0 0;
  display: grid;
  border: 1px solid #e0e6ed;
  border-radius: 8px;
  overflow: hidden;
}

.criteria-card dl div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid #e5eaf0;
}

.criteria-card dl div:last-child {
  border-bottom: 0;
}

.criteria-card dt {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 850;
}

.criteria-card dd {
  margin: 0;
  color: #2f3947;
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.dot {
  width: 21px;
  height: 21px;
  display: inline-block;
  border-radius: 50%;
}

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

.dot.yellow {
  background: var(--yellow);
}

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

.day-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.day-card {
  min-width: 0;
  padding: 16px 28px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.day-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e3e8ee;
}

.day-card header span {
  color: #273140;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 750;
}

.day-card header strong {
  font-size: 20px;
  line-height: 1.1;
  font-weight: 900;
}

.day-card p {
  display: flex;
  justify-content: space-between;
  margin: 12px 0 0;
  color: #26303d;
  font-size: 15px;
  font-weight: 700;
}

.day-card b {
  font-size: 17px;
}

.red-border {
  border-color: rgba(238, 29, 36, 0.55);
}

.yellow-border {
  border-color: rgba(242, 161, 0, 0.62);
}

.green-border {
  border-color: rgba(7, 134, 34, 0.55);
}

.unknown-border {
  border-color: rgba(101, 115, 134, 0.35);
  background: #f8fafc;
}

.data-note {
  margin: 12px 2px 0;
  color: #516071;
  font-size: 13px;
}

.forecast-table-card {
  padding: 16px 18px;
}

.forecast-table-wrap {
  max-height: 520px;
  overflow: auto;
  border: 1px solid #e0e6ed;
  border-radius: 8px;
}

.forecast-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.forecast-table th,
.forecast-table td {
  padding: 9px 10px;
  border-right: 1px solid #e5ebf2;
  border-bottom: 1px solid #e5ebf2;
  color: #142033;
  font-size: 13px;
  line-height: 1.2;
  text-align: left;
  vertical-align: middle;
}

.forecast-table th {
  position: sticky;
  z-index: 2;
  top: 0;
  background: #f7fbff;
  color: #0b356d;
  font-size: 12px;
  font-weight: 850;
}

.forecast-table th:last-child,
.forecast-table td:last-child {
  border-right: 0;
}

.forecast-table td:not(:first-child) {
  font-weight: 750;
}

.forecast-table .data-green {
  color: #045f1a;
  background: #ecfbef;
}

.forecast-table .data-yellow {
  color: #7a4d00;
  background: #fff4c9;
}

.forecast-table .data-red {
  color: #9b0910;
  background: #ffe0e2;
}

.forecast-table .data-unknown {
  color: #657386;
  background: #f0f3f7;
}

.forecast-row.forecast-red td:first-child {
  box-shadow: inset 4px 0 0 var(--red);
}

.forecast-row.forecast-yellow td:first-child {
  box-shadow: inset 4px 0 0 var(--yellow);
}

.forecast-row.forecast-green td:first-child {
  box-shadow: inset 4px 0 0 var(--green);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
}

.status-pill.green {
  color: #045f1a;
  background: #e4f8e9;
}

.status-pill.yellow {
  color: #875600;
  background: #fff0bd;
}

.status-pill.red {
  color: #a40c12;
  background: #ffd9dc;
}

@media (max-width: 1500px) {
  .risk-board {
    padding: 14px 16px 20px;
  }

  .headline h1 {
    font-size: 32px;
  }

  .context-line {
    font-size: 16px;
  }

  .summary-grid {
    gap: 10px;
  }

  .summary-card {
    min-height: 78px;
    gap: 10px;
    padding: 11px 13px;
  }

  .summary-card.status-card {
    grid-template-columns: minmax(0, 1fr) 36px;
  }

  .status-card span {
    margin-bottom: 5px;
    font-size: 13px;
  }

  .status-card strong {
    font-size: 22px;
  }

  .alert-icon {
    width: 34px;
    height: 34px;
  }

  .metric svg {
    width: 30px;
    height: 30px;
  }

  .metric span {
    font-size: 13px;
  }

  .metric strong {
    font-size: 22px;
  }

  .metric strong small {
    font-size: 16px;
  }

  .metric em {
    font-size: 14px;
  }

  .risk-layout {
    grid-template-columns: minmax(560px, 2fr) minmax(170px, 0.55fr) repeat(2, minmax(210px, 0.75fr));
  }

  .analysis-grid {
    grid-template-columns: minmax(260px, 0.62fr) repeat(3, minmax(260px, 1fr));
  }

  .chart-card {
    min-height: 370px;
  }

  .chart {
    height: 290px;
  }

  .bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .board-header {
    display: grid;
  }

  .header-tools {
    justify-content: flex-start;
    min-width: 0;
  }

  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .risk-layout,
  .analysis-grid {
    grid-template-columns: 1fr;
  }

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

  .map-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .risk-board {
    padding: 12px;
  }

  .headline h1 {
    font-size: 27px;
  }

  .context-line {
    display: grid;
    gap: 2px;
    font-size: 14px;
  }

  .context-line span + span::before {
    content: "";
    margin: 0;
  }

  .header-tools {
    flex-wrap: wrap;
    white-space: normal;
    font-size: 14px;
  }

  .section-line h2 {
    margin-left: 0;
  }

  .summary-grid,
  .analysis-grid,
  .day-cards {
    grid-template-columns: 1fr;
  }

  .summary-card {
    min-height: 76px;
    padding: 11px 13px;
  }

  .summary-card.status-card {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
  }

  .summary-card.status-card .alert-icon {
    grid-column: 1;
    grid-row: 1;
    width: 32px;
    height: 32px;
  }

  .summary-card.status-card > div {
    grid-column: 2;
    grid-row: 1;
  }

  .panel {
    padding: 14px;
  }

  .panel-title {
    display: grid;
    align-items: flex-start;
    margin-bottom: 18px;
  }

  h2 {
    font-size: 19px;
  }

  .timeline-labels,
  .date-labels {
    font-size: 12px;
  }

  .timeline-labels {
    margin: 0 0 8px;
  }

  .risk-forecast {
    overflow-x: auto;
  }

  .risk-forecast .timeline-labels,
  .risk-forecast .timeline,
  .risk-forecast .hour-labels,
  .risk-forecast .date-labels {
    min-width: 700px;
  }

  .hour-labels {
    font-size: 11px;
  }

  .risk-map {
    height: 300px;
  }

  .map-footer {
    display: grid;
  }

  .criteria-card dl div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .day-card {
    padding: 14px 16px;
  }
}

@media (max-width: 480px) {
  .headline h1 {
    font-size: 24px;
  }

  .summary-card.status-card .alert-icon {
    width: 30px;
    height: 30px;
  }

  .status-card strong {
    font-size: 22px;
  }

  .timeline-labels {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .date-labels {
    font-size: 11px;
  }
}
