:root {
  color-scheme: light;
  --page: #f3f6f7;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #f7f9fa;
  --surface-strong: #eaf0f2;
  --text: #343537;
  --text-strong: #242426;
  --muted: #6d7377;
  --subtle: #8b9296;
  --border: #dbe3e7;
  --border-strong: #c8d4da;
  --navy: #252426;
  --navy-light: #393638;
  --accent: #008d97;
  --accent-strong: #007b85;
  --accent-soft: #e2f7f8;
  --cyan: #12d4d9;
  --normal: #177b5d;
  --normal-soft: #e6f5ef;
  --watch: #b7650c;
  --watch-soft: #fff1d8;
  --intervention: #c43d48;
  --intervention-soft: #fde9ea;
  --unavailable: #74818a;
  --shadow-sm: 0 1px 2px rgba(7, 26, 39, 0.04), 0 8px 22px rgba(7, 26, 39, 0.045);
  --shadow-md: 0 18px 50px rgba(7, 26, 39, 0.09);
  --radius: 18px;
  --radius-sm: 12px;
  --focus: #007f8a;
  --curve-planned: #5f6b70;
  --curve-actual: #008d97;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #111416;
  --surface: #1a1e20;
  --surface-raised: #202527;
  --surface-soft: #15191b;
  --surface-strong: #272d30;
  --text: #e0e7e9;
  --text-strong: #f6fbfc;
  --muted: #9fb0b9;
  --subtle: #788c98;
  --border: #303638;
  --border-strong: #454d50;
  --navy: #111416;
  --navy-light: #272d30;
  --accent: #33ced5;
  --accent-strong: #6ee1e5;
  --accent-soft: #17383b;
  --cyan: #33ced5;
  --normal: #4ec89a;
  --normal-soft: #12392e;
  --watch: #f0b45b;
  --watch-soft: #3a2a14;
  --intervention: #ff858c;
  --intervention-soft: #412025;
  --unavailable: #a2b0b8;
  --shadow-sm: 0 10px 26px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 22px 60px rgba(0, 0, 0, 0.3);
  --focus: #59c9ff;
  --curve-planned: #a9b4b8;
  --curve-actual: #33ced5;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  color: inherit;
  font: inherit;
}

button,
input[type="date"] {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: inherit;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-strong);
  box-shadow: var(--shadow-md);
  font-weight: 700;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(24px, calc((100vw - 1480px) / 2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(37, 36, 38, 0.98);
  color: #ffffff;
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #ffffff;
  text-decoration: none;
}

.brand-logo-tile {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  overflow: hidden;
  place-items: center;
  border-radius: 10px;
  background: #ffffff;
}

.brand-logo-tile img {
  width: 55px;
  height: 55px;
  max-width: none;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
  font-weight: 760;
  letter-spacing: 0.16em;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: #b8c4c7;
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.environment-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #dce8ed;
  font-size: 12px;
  font-weight: 650;
}

.environment-badge > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64d9bc;
  box-shadow: 0 0 0 4px rgba(100, 217, 188, 0.13);
}

.timezone-label {
  color: #b8cad3;
  font-size: 13px;
}

.icon-button,
.date-arrow,
.today-button,
.topbar-action,
.notice button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
}

.icon-button {
  display: grid;
  width: 42px;
  place-items: center;
  border-color: rgba(255, 255, 255, 0.15);
  color: #d7e5eb;
}

.icon-button:hover,
.topbar-action:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.theme-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.theme-icon-moon,
:root[data-theme="dark"] .theme-icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-icon-moon {
  display: block;
}

.topbar-action {
  padding: 0 12px;
  color: #d7e5eb;
  font-size: 13px;
  font-weight: 650;
}

.page-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 38px 24px 48px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--text-strong);
  letter-spacing: -0.025em;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(29px, 3vw, 40px);
  font-weight: 720;
  line-height: 1.12;
}

h2 {
  margin-bottom: 5px;
  font-size: 20px;
  font-weight: 720;
  line-height: 1.25;
}

h3 {
  font-size: 15px;
  font-weight: 720;
}

.heading-context {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
}

.date-panel {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.date-arrow {
  display: grid;
  width: 42px;
  flex: 0 0 42px;
  place-items: center;
  color: var(--muted);
}

.date-arrow:hover,
.today-button:hover {
  border-color: var(--border);
  background: var(--surface-soft);
  color: var(--text-strong);
}

.date-arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.date-input-wrap {
  display: grid;
  align-content: center;
  min-width: 180px;
  padding: 2px 12px;
  border-right: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.date-input-wrap span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.date-input-wrap input {
  width: 100%;
  min-height: 27px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 690;
}

.today-button {
  padding: 0 13px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 720;
}

.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.notice div {
  display: grid;
  gap: 2px;
}

.notice strong {
  color: var(--text-strong);
}

.notice span {
  color: var(--muted);
}

.notice-error {
  border-color: color-mix(in srgb, var(--intervention) 30%, var(--border));
  background: var(--intervention-soft);
}

.notice button {
  flex: 0 0 auto;
  padding: 0 14px;
  border-color: color-mix(in srgb, var(--intervention) 35%, var(--border));
  color: var(--intervention);
  font-weight: 700;
}

.dashboard-loading {
  display: grid;
  gap: 20px;
}

.loading-banner,
.loading-card {
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.loading-banner {
  height: 150px;
}

.loading-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.loading-card {
  height: 178px;
}

.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 70%, transparent), transparent);
  content: "";
  transform: translateX(-100%);
  animation: shimmer 1.3s infinite;
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

.status-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(260px, 340px);
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.status-banner[data-level="normal"] {
  border-color: color-mix(in srgb, var(--normal) 25%, var(--border));
  background: linear-gradient(110deg, var(--normal-soft), var(--surface) 48%);
}

.status-banner[data-level="watch"] {
  border-color: color-mix(in srgb, var(--watch) 26%, var(--border));
  background: linear-gradient(110deg, var(--watch-soft), var(--surface) 48%);
}

.status-banner[data-level="intervention"] {
  border-color: color-mix(in srgb, var(--intervention) 27%, var(--border));
  background: linear-gradient(110deg, var(--intervention-soft), var(--surface) 48%);
}

.status-symbol {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 17px;
  background: var(--accent-soft);
  color: var(--accent);
}

.status-banner[data-level="normal"] .status-symbol {
  background: var(--normal-soft);
  color: var(--normal);
}

.status-banner[data-level="watch"] .status-symbol {
  background: var(--watch-soft);
  color: var(--watch);
}

.status-banner[data-level="intervention"] .status-symbol {
  background: var(--intervention-soft);
  color: var(--intervention);
}

.status-symbol svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.status-symbol-mark {
  stroke-width: 2.2;
}

.status-copy h2 {
  margin-bottom: 5px;
  font-size: 25px;
}

.status-copy p:last-child {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
}

.programme-progress {
  display: grid;
  gap: 8px;
  padding-left: 24px;
  border-left: 1px solid var(--border);
}

.programme-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.programme-progress-head strong {
  color: var(--text-strong);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.programme-progress svg {
  width: 100%;
  height: 12px;
}

.programme-track {
  fill: var(--surface-strong);
}

.programme-fill {
  fill: var(--accent);
  transition: width 320ms ease;
}

.status-banner[data-level="normal"] .programme-fill { fill: var(--normal); }
.status-banner[data-level="watch"] .programme-fill { fill: var(--watch); }
.status-banner[data-level="intervention"] .programme-fill { fill: var(--intervention); }

.programme-progress > span {
  color: var(--muted);
  font-size: 12px;
}

.section-heading,
.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.compact-heading {
  align-items: flex-end;
  margin-bottom: 13px;
}

.compact-heading h2 {
  margin-bottom: 0;
}

.freshness {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 13px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.kpi-card,
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}

.kpi-card {
  display: flex;
  min-width: 0;
  min-height: 178px;
  flex-direction: column;
  padding: 18px;
}

.kpi-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.kpi-label {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0.01em;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.kpi-topline .status-chip {
  flex: 0 0 auto;
}

.status-chip,
.flight-status,
.summary-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-weight: 720;
  white-space: nowrap;
}

.status-chip {
  gap: 5px;
  padding: 4px 7px;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.status-normal { background: var(--normal-soft); color: var(--normal); }
.status-watch { background: var(--watch-soft); color: var(--watch); }
.status-intervention { background: var(--intervention-soft); color: var(--intervention); }
.status-unavailable { background: var(--surface-strong); color: var(--unavailable); }

.kpi-value {
  margin: 14px 0 8px;
  color: var(--text-strong);
  font-size: clamp(26px, 2.1vw, 34px);
  font-weight: 740;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
  line-height: 1;
}

.kpi-context {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.kpi-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-size: 10px;
  font-weight: 650;
}

.kpi-meta span:last-child {
  text-align: right;
}

.overview-grid,
.secondary-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.overview-grid {
  grid-template-columns: minmax(0, 1.95fr) minmax(320px, 0.9fr);
}

.secondary-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
}

.panel {
  min-width: 0;
  padding: 22px;
}

.panel-header {
  margin-bottom: 20px;
}

.panel-header h2 {
  margin-bottom: 4px;
}

.panel-header p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.chart-legend,
.chart-key {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

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

.timeline-legend-mark {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  font-style: normal;
}

.timeline-legend-normal,
.timeline-legend-awaiting,
.timeline-legend-future {
  border-radius: 50%;
}

.timeline-legend-normal {
  border: 2px solid var(--surface);
  background: var(--normal);
  box-shadow: 0 0 0 1px var(--normal);
}

.timeline-legend-late::before,
.timeline-legend-critical::before {
  position: absolute;
  top: 0;
  left: 5px;
  width: 2px;
  height: 12px;
  border-radius: 2px;
  background: var(--timeline-legend-severity, var(--watch));
  content: "";
}

.timeline-legend-late::after,
.timeline-legend-critical::after {
  position: absolute;
  top: 0;
  left: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--timeline-legend-severity, var(--watch));
  content: "";
}

.timeline-legend-critical {
  --timeline-legend-severity: var(--intervention);
}

.timeline-legend-cancelled::before,
.timeline-legend-cancelled::after {
  position: absolute;
  top: 5px;
  left: 0;
  width: 13px;
  height: 2px;
  border-radius: 2px;
  background: var(--intervention);
  content: "";
}

.timeline-legend-cancelled::before {
  transform: rotate(45deg);
}

.timeline-legend-cancelled::after {
  transform: rotate(-45deg);
}

.timeline-legend-awaiting {
  border: 2px solid var(--watch);
  background: var(--surface);
}

.timeline-legend-future {
  border: 2px solid var(--unavailable);
  background: var(--surface);
}

.target-key {
  width: 2px;
  height: 12px;
  background: var(--text-strong);
}

.baseline-key {
  width: 7px;
  height: 7px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--surface);
}

.chart-wrap {
  width: 100%;
  min-height: 280px;
}

.departure-timeline {
  width: 100%;
  height: auto;
  overflow: visible;
}

.timeline-grid,
.timeline-tick {
  stroke: var(--border);
  stroke-width: 1;
}

.timeline-target-band {
  fill: var(--normal-soft);
  opacity: 0.78;
}

.timeline-target-line {
  stroke: var(--normal);
  stroke-width: 1.4;
  stroke-dasharray: 4 4;
}

.timeline-cancel-lane {
  stroke: var(--border-strong);
  stroke-width: 1;
}

.timeline-axis-label,
.timeline-axis-title,
.timeline-target-label,
.timeline-exception-label,
.timeline-cancel-label {
  font-family: inherit;
}

.timeline-axis-label {
  fill: var(--subtle);
  font-size: 10px;
  font-weight: 600;
}

.timeline-axis-title,
.timeline-target-label {
  fill: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.timeline-stem {
  stroke-linecap: round;
  stroke-width: 2.2;
}

.timeline-stem-watch {
  stroke: var(--watch);
}

.timeline-stem-intervention {
  stroke: var(--intervention);
}

.timeline-stem-projected {
  stroke: var(--watch);
  stroke-dasharray: 3 3;
}

.timeline-dot {
  vector-effect: non-scaling-stroke;
}

.timeline-dot-normal {
  fill: var(--normal);
  stroke: var(--surface);
  stroke-width: 1.2;
}

.timeline-dot-watch {
  fill: var(--watch);
  stroke: var(--surface);
  stroke-width: 1.5;
}

.timeline-dot-intervention {
  fill: var(--intervention);
  stroke: var(--surface);
  stroke-width: 1.5;
}

.timeline-dot-projected {
  fill: var(--surface);
  stroke: var(--watch);
  stroke-width: 2;
}

.timeline-dot-future {
  fill: var(--surface);
  stroke: var(--unavailable);
  stroke-width: 1.7;
}

.timeline-exception-label,
.timeline-cancel-label {
  fill: var(--text-strong);
  font-size: 11px;
  font-weight: 750;
}

.timeline-cancel-mark {
  stroke: var(--intervention);
  stroke-linecap: round;
  stroke-width: 3;
}

.accessible-data {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.accessible-data summary {
  width: fit-content;
  padding-top: 12px;
  color: var(--accent-strong);
  cursor: pointer;
  font-weight: 690;
}

.accessible-data table {
  margin-top: 10px;
}

.attention-panel {
  background: linear-gradient(165deg, var(--surface-raised), var(--surface-soft));
}

.count-badge {
  display: grid;
  min-width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: var(--watch-soft);
  color: var(--watch);
  font-size: 13px;
  font-weight: 800;
}

.attention-list {
  display: grid;
  gap: 10px;
}

.attention-item {
  padding: 14px 0 4px 16px;
  border-top: 1px solid var(--border);
  border-left: 3px solid var(--watch);
}

.attention-item:first-child {
  border-top: 0;
}

.attention-item[data-severity="intervention"] {
  border-left-color: var(--intervention);
}

.attention-item h3 {
  margin-bottom: 5px;
}

.attention-item > p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.attention-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 680;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.empty-attention {
  display: grid;
  min-height: 230px;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.empty-attention svg {
  width: 38px;
  height: 38px;
  margin: 0 auto 12px;
  fill: none;
  stroke: var(--normal);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.empty-attention strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text-strong);
}

.empty-attention p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.station-chart,
.delay-chart {
  display: grid;
  gap: 15px;
}

.station-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.85fr) minmax(220px, 2.2fr) 74px;
  align-items: center;
  gap: 14px;
}

.station-name strong,
.station-name span {
  display: block;
}

.station-name strong {
  color: var(--text-strong);
  font-size: 13px;
}

.station-name span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station-bar {
  width: 100%;
  height: 22px;
  overflow: visible;
}

.station-track {
  fill: var(--surface-strong);
}

.station-value {
  fill: var(--accent);
}

.station-row[data-status="normal"] .station-value { fill: var(--normal); }
.station-row[data-status="watch"] .station-value { fill: var(--watch); }
.station-row[data-status="intervention"] .station-value { fill: var(--intervention); }

.station-target {
  stroke: var(--text-strong);
  stroke-width: 1.5;
}

.station-baseline {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 1.8;
}

.station-score {
  text-align: right;
}

.station-score strong,
.station-score span {
  display: block;
}

.station-score strong {
  color: var(--text-strong);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.station-score span {
  color: var(--muted);
  font-size: 10px;
}

.panel-total {
  color: var(--text-strong);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.delay-row {
  display: grid;
  gap: 6px;
}

.delay-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.delay-row-head strong {
  color: var(--text-strong);
  font-size: 12px;
}

.delay-row-head span {
  color: var(--muted);
  font-size: 10px;
}

.delay-bar {
  width: 100%;
  height: 11px;
}

.delay-track {
  fill: var(--surface-strong);
}

.delay-value {
  fill: var(--accent);
}

.delay-row[data-controllable="false"] .delay-value {
  fill: var(--curve-planned);
}

.chart-footnote {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}

.flight-panel {
  margin-bottom: 18px;
}

.summary-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.summary-pill {
  gap: 5px;
  padding: 5px 9px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 10px;
}

.summary-pill strong {
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.table-scroll {
  overflow-x: auto;
  scrollbar-color: var(--border-strong) transparent;
  scrollbar-width: thin;
}

table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text);
  font-size: 12px;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.flight-table {
  min-width: 860px;
}

.flight-table tbody tr:hover {
  background: var(--surface-soft);
}

.flight-number {
  color: var(--text-strong);
  font-weight: 750;
}

.route-cell,
.time-cell,
.delay-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.route-cell {
  font-weight: 650;
}

.muted-value {
  color: var(--subtle);
}

.delay-late {
  color: var(--watch);
  font-weight: 720;
}

.delay-severe {
  color: var(--intervention);
  font-weight: 750;
}

.flight-status {
  padding: 4px 8px;
  font-size: 10px;
}

.flight-status.status-arrived { background: var(--normal-soft); color: var(--normal); }
.flight-status.status-airborne { background: var(--accent-soft); color: var(--accent-strong); }
.flight-status.status-delayed { background: var(--watch-soft); color: var(--watch); }
.flight-status.status-scheduled { background: var(--surface-strong); color: var(--muted); }
.flight-status.status-cancelled { background: var(--intervention-soft); color: var(--intervention); }
.flight-status.status-diverted { background: var(--watch-soft); color: var(--watch); }

.cause-cell {
  max-width: 190px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 4px;
  color: var(--subtle);
  font-size: 10px;
}

.data-footer p {
  margin-bottom: 0;
}

.data-footer strong {
  color: var(--muted);
}

.data-footer-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.data-footer-brand img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* Secure sign-in */
.login-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(420px, 0.95fr) minmax(440px, 1.05fr);
  background: var(--surface);
}

.login-story {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(34px, 5vw, 72px);
  background:
    radial-gradient(circle at 82% 18%, rgba(25, 199, 208, 0.18), transparent 26%),
    radial-gradient(circle at 10% 80%, rgba(25, 199, 208, 0.08), transparent 25%),
    linear-gradient(145deg, #171618, #2a282b 62%, #1e1d1f);
  color: #d9e7ed;
  overflow: hidden;
}

.login-story::after {
  position: absolute;
  right: -8%;
  bottom: -7%;
  width: min(46vw, 520px);
  height: min(46vw, 520px);
  background: url("/assets/bermudair-mark.png") center / contain no-repeat;
  content: "";
  opacity: 0.065;
}

.brand-light,
.login-story-copy,
.login-story-status {
  position: relative;
  z-index: 1;
}

.login-story-copy {
  max-width: 620px;
  margin: auto 0;
  padding: 80px 0;
}

.login-story-copy .eyebrow {
  color: #5fd6cf;
}

.login-story-copy h1 {
  margin-bottom: 22px;
  color: #ffffff;
  font-size: clamp(40px, 5.4vw, 72px);
  font-weight: 690;
  line-height: 1.02;
}

.login-story-copy > p:last-child {
  max-width: 540px;
  margin-bottom: 0;
  color: #abc3cf;
  font-size: 17px;
  line-height: 1.65;
}

.login-story-status {
  display: flex;
  max-width: 460px;
  align-items: flex-start;
  gap: 12px;
  color: #a9c0cb;
  font-size: 12px;
}

.login-story-status > span {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  margin-top: 5px;
  border-radius: 50%;
  background: #58d4b0;
  box-shadow: 0 0 0 5px rgba(88, 212, 176, 0.12);
}

.login-story-status p {
  margin-bottom: 0;
}

.login-story-status strong {
  display: block;
  margin-bottom: 2px;
  color: #e5f0f3;
}

.login-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 50px clamp(30px, 7vw, 110px);
  background: var(--surface);
}

.login-card {
  width: min(430px, 100%);
}

.login-panel-brand {
  display: grid;
  justify-items: start;
  gap: 10px;
  margin-bottom: 46px;
}

.login-panel-brand img {
  width: min(300px, 82%);
  height: auto;
}

.login-panel-brand span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-card h2 {
  margin-bottom: 10px;
  font-size: clamp(28px, 3vw, 38px);
}

.login-intro {
  margin-bottom: 30px;
  color: var(--muted);
}

.login-card form {
  display: grid;
  gap: 9px;
}

.login-card label {
  margin-top: 9px;
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 720;
}

.login-card input {
  width: 100%;
  min-height: 50px;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  outline: 0;
  background: var(--surface-soft);
  color: var(--text-strong);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.login-card input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 66px;
}

.password-field button {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 54px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 720;
}

.password-field button:hover {
  background: var(--accent-soft);
}

.form-error {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--intervention-soft);
  color: var(--intervention);
  font-size: 12px;
  font-weight: 650;
}

.primary-button {
  min-height: 52px;
  margin-top: 16px;
  border: 0;
  border-radius: 11px;
  background: var(--navy);
  color: #ffffff;
  font-weight: 730;
  box-shadow: 0 8px 20px rgba(11, 37, 56, 0.18);
  transition: transform 140ms ease, background 140ms ease;
}

.primary-button:hover:not(:disabled) {
  background: var(--navy-light);
  transform: translateY(-1px);
}

.login-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.login-note svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  fill: none;
  stroke: var(--normal);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.login-note p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 11px;
}

.login-demo-badge {
  margin-top: 20px;
  border-color: var(--border);
  background: var(--surface-soft);
  color: var(--muted);
}

@media (max-width: 1240px) {
  .kpi-grid,
  .loading-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kpi-card {
    min-height: 160px;
  }
}

@media (max-width: 1020px) {
  .topbar {
    padding-right: 20px;
    padding-left: 20px;
  }

  .overview-grid,
  .secondary-grid {
    grid-template-columns: 1fr;
  }

  .attention-panel {
    min-height: auto;
  }

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

  .attention-item {
    border-top: 0;
  }

  .login-shell {
    grid-template-columns: minmax(360px, 0.85fr) minmax(400px, 1.15fr);
  }
}

@media (max-width: 820px) {
  .page-shell {
    padding: 28px 18px 38px;
  }

  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .date-panel {
    align-self: flex-start;
  }

  .status-banner {
    grid-template-columns: auto 1fr;
  }

  .programme-progress {
    grid-column: 1 / -1;
    padding: 18px 0 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .attention-list {
    grid-template-columns: 1fr;
  }

  .login-shell {
    display: block;
    background: var(--surface);
  }

  .login-story {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    padding: 38px 24px;
  }

  .login-panel-brand {
    margin-bottom: 56px;
  }
}

@media (max-width: 680px) {
  .brand small,
  .timezone-label,
  .environment-badge {
    display: none;
  }

  .topbar {
    min-height: 64px;
  }

  .brand-logo-tile {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .brand-logo-tile img {
    width: 48px;
    height: 48px;
  }

  .page-shell {
    padding-right: 14px;
    padding-left: 14px;
  }

  .date-panel {
    width: 100%;
    flex-wrap: wrap;
  }

  .date-input-wrap {
    min-width: 130px;
    flex: 1 1 150px;
  }

  .today-button {
    flex: 1 0 100%;
    border-color: var(--border);
  }

  .status-banner {
    padding: 19px;
  }

  .status-symbol {
    width: 48px;
    height: 48px;
  }

  .status-copy h2 {
    font-size: 21px;
  }

  .kpi-grid,
  .loading-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .kpi-card {
    min-height: 170px;
    padding: 15px;
  }

  .kpi-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .kpi-label {
    white-space: normal;
  }

  .kpi-value {
    font-size: 27px;
  }

  .panel {
    padding: 18px;
  }

  .panel-header,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .chart-legend,
  .chart-key,
  .summary-pills {
    justify-content: flex-start;
  }

  .chart-wrap {
    min-height: 210px;
  }

  .station-row {
    grid-template-columns: 90px minmax(130px, 1fr) 62px;
    gap: 9px;
  }

  .data-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

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

  .topbar-action {
    display: none;
  }

  .status-banner {
    grid-template-columns: 1fr;
  }

  .status-symbol {
    display: none;
  }

  .kpi-grid,
  .loading-grid {
    grid-template-columns: 1fr;
  }

  .kpi-card {
    min-height: 150px;
  }

  .station-row {
    grid-template-columns: 78px minmax(110px, 1fr) 54px;
  }

  .station-name span {
    display: none;
  }

  .flight-table {
    min-width: 0;
  }

  .flight-table thead {
    display: none;
  }

  .flight-table,
  .flight-table tbody,
  .flight-table tr,
  .flight-table td {
    display: block;
    width: 100%;
  }

  .flight-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
  }

  .flight-table tr:last-child {
    border-bottom: 0;
  }

  .flight-table td {
    padding: 0;
    border: 0;
    white-space: normal;
  }

  .flight-table td::before {
    display: block;
    margin-bottom: 2px;
    color: var(--subtle);
    content: attr(data-label);
    font-size: 9px;
    font-weight: 760;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .cause-cell {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Pinax executive interface */
:root {
  --page: #f4f5f5;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #f7f8f8;
  --surface-strong: #edf0f1;
  --text: #3b4143;
  --text-strong: #222627;
  --muted: #667074;
  --subtle: #7d878b;
  --border: #d8dddf;
  --border-strong: #bec7ca;
  --navy: #272527;
  --navy-light: #383638;
  --accent: #008d97;
  --accent-strong: #007982;
  --accent-soft: #e5f4f5;
  --normal: #25765f;
  --normal-soft: #e8f2ee;
  --watch: #9a5c10;
  --watch-soft: #f8efe1;
  --intervention: #b43e48;
  --intervention-soft: #f8e9ea;
  --shadow-sm: none;
  --shadow-md: none;
  --radius: 8px;
  --radius-sm: 6px;
}

:root[data-theme="dark"] {
  --page: #111415;
  --surface: #1a1e1f;
  --surface-raised: #1a1e1f;
  --surface-soft: #151819;
  --surface-strong: #252a2c;
  --text: #d9dfe1;
  --text-strong: #f3f6f7;
  --muted: #a3adb1;
  --subtle: #839095;
  --border: #343a3c;
  --border-strong: #4b5457;
  --accent: #32c7cf;
  --accent-strong: #66d9df;
  --accent-soft: #17383b;
  --normal: #5cc49f;
  --normal-soft: #17372d;
  --watch: #e6ae62;
  --watch-soft: #392b19;
  --intervention: #f1848c;
  --intervention-soft: #402227;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
}

.topbar {
  min-height: 64px;
  padding: 0 max(24px, calc((100vw - 1440px) / 2));
  border-bottom: 1px solid #d8dddf;
  background: #ffffff;
  color: #272527;
  backdrop-filter: none;
}

.brand {
  gap: 14px;
  color: #272527;
}

.header-wordmark {
  display: block;
  width: 154px;
  height: auto;
}

.brand-divider {
  width: 1px;
  height: 28px;
  background: #d8dddf;
}

.product-lockup {
  display: grid;
  gap: 1px;
  line-height: 1.1;
}

.brand .product-lockup strong {
  color: #272527;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

.brand .product-lockup small {
  margin: 0;
  color: #70777a;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.topbar-meta {
  gap: 10px;
}

.environment-badge {
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid #cfd5d7;
  border-radius: 4px;
  background: #f5f6f6;
  color: #5f686b;
  font-size: 11px;
  font-weight: 600;
}

.environment-badge > span {
  display: none;
}

.timezone-label {
  color: #667074;
  font-size: 12px;
}

.icon-button,
.topbar-action {
  min-height: 34px;
  border-color: #d8dddf;
  border-radius: 5px;
  color: #4f585b;
}

.icon-button {
  width: 36px;
}

.icon-button:hover,
.topbar-action:hover {
  border-color: #b7c0c3;
  background: #f4f5f5;
  color: #222627;
}

.topbar-action {
  padding: 0 11px;
  font-weight: 500;
}

.page-shell {
  width: min(1440px, 100%);
  padding: 32px 24px 46px;
}

.page-heading {
  margin-bottom: 22px;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: none;
}

h1,
h2,
h3 {
  letter-spacing: -0.015em;
}

h1 {
  margin-bottom: 5px;
  font-size: clamp(28px, 2.4vw, 34px);
  font-weight: 600;
}

h2 {
  font-size: 19px;
  font-weight: 600;
}

h3 {
  font-weight: 600;
}

.heading-context {
  font-size: 14px;
}

.date-panel {
  gap: 4px;
  padding: 5px;
  border-radius: 7px;
  box-shadow: none;
}

.date-arrow,
.today-button {
  min-height: 38px;
  border-radius: 5px;
}

.date-arrow {
  width: 38px;
  flex-basis: 38px;
}

.date-input-wrap {
  min-width: 174px;
  padding: 1px 11px;
}

.date-input-wrap span {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.date-input-wrap input {
  font-size: 13px;
  font-weight: 500;
}

.today-button {
  padding: 0 12px;
  font-weight: 500;
}

.status-banner {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 24px;
  margin-bottom: 28px;
  padding: 17px 20px;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
}

.status-banner[data-level="normal"],
.status-banner[data-level="watch"],
.status-banner[data-level="intervention"] {
  background: var(--surface);
}

.status-banner[data-level="normal"] { border-color: var(--border); border-left-color: var(--normal); }
.status-banner[data-level="watch"] { border-color: var(--border); border-left-color: var(--watch); }
.status-banner[data-level="intervention"] { border-color: var(--border); border-left-color: var(--intervention); }

.status-symbol {
  display: none;
}

.status-copy h2 {
  margin-bottom: 3px;
  font-size: 21px;
}

.status-copy p:last-child {
  font-size: 13px;
}

.programme-progress {
  gap: 6px;
  padding-left: 20px;
}

.programme-progress-head,
.programme-progress > span {
  font-size: 11px;
}

.programme-progress-head strong {
  font-size: 13px;
  font-weight: 600;
}

.programme-progress svg {
  height: 10px;
}

.compact-heading {
  margin-bottom: 11px;
}

.freshness {
  font-size: 12px;
}

.kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.kpi-card {
  min-height: 164px;
  padding: 17px 16px 15px;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.kpi-card:last-child {
  border-right: 0;
}

.kpi-label {
  font-size: 12px;
  font-weight: 500;
}

.status-chip {
  gap: 5px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.status-normal,
.status-watch,
.status-intervention,
.status-unavailable {
  background: transparent;
}

.kpi-value {
  margin: 13px 0 7px;
  font-size: clamp(25px, 2vw, 31px);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.kpi-context {
  margin-bottom: 12px;
  font-size: 12px;
  line-height: 1.4;
}

.kpi-meta {
  gap: 7px;
  padding-top: 10px;
  font-size: 10.5px;
  font-weight: 400;
}

.overview-grid,
.secondary-grid {
  gap: 16px;
  margin-bottom: 16px;
}

.overview-grid {
  grid-template-columns: minmax(0, 1.85fr) minmax(330px, 0.85fr);
}

.secondary-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(330px, 0.8fr);
}

.panel {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
}

.panel-header {
  margin-bottom: 18px;
}

.panel-header p:not(.eyebrow) {
  font-size: 12.5px;
}

.chart-legend,
.chart-key {
  font-size: 11px;
  font-weight: 500;
}

.attention-panel {
  background: var(--surface);
}

.count-badge {
  min-width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--text-strong);
  font-weight: 600;
}

.attention-list {
  gap: 0;
}

.attention-item {
  padding: 14px 0 13px 14px;
  border-left-width: 2px;
}

.attention-item h3 {
  font-size: 14px;
}

.attention-item > p {
  font-size: 12px;
}

.attention-meta {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.empty-attention {
  min-height: 210px;
}

.station-chart,
.delay-chart {
  gap: 14px;
}

.station-name strong,
.station-score strong {
  font-size: 12.5px;
  font-weight: 600;
}

.station-name span,
.station-score span,
.delay-row-head span {
  font-size: 10.5px;
}

.panel-total {
  font-size: 18px;
  font-weight: 600;
}

.delay-row-head,
.delay-row-head strong {
  font-size: 12px;
}

.summary-pills {
  gap: 0;
}

.summary-pill {
  gap: 4px;
  padding: 0 9px;
  border-left: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  font-size: 10.5px;
  font-weight: 400;
}

.summary-pill:first-child {
  padding-left: 0;
  border-left: 0;
}

.summary-pill strong {
  font-weight: 600;
}

table {
  font-size: 13px;
}

th,
td {
  padding: 10px 11px;
}

th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: var(--surface);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.flight-number,
.route-cell {
  font-weight: 600;
}

.flight-status {
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 500;
}

.data-footer {
  padding-top: 3px;
  font-size: 10.5px;
}

.data-footer-brand {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.data-footer-brand img {
  width: 20px;
  height: 20px;
}

/* Restrained sign-in */
.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  grid-template-columns: 1fr;
  padding: 36px 20px;
  background: var(--page);
}

.login-panel {
  display: block;
  min-height: auto;
  padding: 0;
  background: transparent;
}

.login-card {
  width: min(420px, calc(100vw - 40px));
  padding: 34px 38px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.login-panel-brand {
  display: grid;
  gap: 5px;
  margin-bottom: 28px;
}

.login-panel-brand img {
  width: 224px;
  margin-bottom: 9px;
}

.login-panel-brand strong {
  color: var(--text-strong);
  font-size: 18px;
  font-weight: 600;
}

.login-panel-brand span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.login-card h1 {
  margin-bottom: 7px;
  font-size: 27px;
}

.login-intro {
  margin-bottom: 18px;
  font-size: 13px;
}

.login-card label {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 500;
}

.login-card input {
  min-height: 44px;
  border-radius: 5px;
  background: var(--surface);
}

.password-field button {
  border-radius: 4px;
  font-weight: 500;
}

.form-error {
  border-radius: 5px;
  font-weight: 500;
}

.primary-button {
  min-height: 44px;
  margin-top: 12px;
  border-radius: 5px;
  font-weight: 600;
  box-shadow: none;
  transition: background 140ms ease;
}

.primary-button:hover:not(:disabled) {
  transform: none;
}

.login-security {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 10.5px;
}

.demo-access {
  margin-top: 12px;
  padding: 11px 12px 10px;
  border-left: 2px solid var(--accent);
  background: var(--surface-soft);
}

.demo-access-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.demo-access-header strong {
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 600;
}

.demo-credential-list {
  display: grid;
  gap: 5px;
  margin: 0;
}

.demo-credential-list > div {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
}

.demo-credential-list dt {
  color: var(--muted);
  font-size: 10.5px;
}

.demo-credential-list dd {
  min-width: 0;
  margin: 0;
}

.demo-credential-list code {
  color: var(--text-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
  overflow-wrap: anywhere;
  user-select: all;
  white-space: pre-wrap;
}

@media (max-width: 1240px) {
  .kpi-grid,
  .loading-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kpi-card {
    min-height: 150px;
  }

  .kpi-card:nth-child(3n) {
    border-right: 0;
  }

  .kpi-card:nth-child(-n + 3) {
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 820px) {
  .page-shell {
    padding: 26px 18px 38px;
  }

  .page-heading {
    gap: 18px;
  }

  .status-banner {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .programme-progress {
    grid-column: auto;
    padding: 14px 0 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .login-panel {
    min-height: auto;
    padding: 0;
  }

  .login-panel-brand {
    margin-bottom: 36px;
  }
}

@media (max-width: 680px) {
  .topbar {
    padding: 0 14px;
  }

  .header-wordmark {
    width: 130px;
  }

  .brand-divider {
    height: 24px;
  }

  .brand .product-lockup small,
  .timezone-label,
  .environment-badge {
    display: none;
  }

  .date-panel {
    width: 100%;
  }

  .status-banner {
    padding: 16px;
  }

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

  .kpi-card {
    min-height: 154px;
    padding: 15px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }

  .kpi-card:nth-child(3n) {
    border-right: 1px solid var(--border);
  }

  .kpi-card:nth-child(2n) {
    border-right: 0;
  }

  .kpi-card:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .kpi-topline {
    flex-direction: row;
  }

  .panel {
    padding: 17px;
  }
}

@media (max-width: 480px) {
  .brand {
    gap: 10px;
  }

  .header-wordmark {
    width: 116px;
  }

  .brand .product-lockup strong {
    font-size: 13px;
  }

  .page-shell {
    padding-right: 12px;
    padding-left: 12px;
  }

  .kpi-grid,
  .loading-grid {
    grid-template-columns: 1fr;
  }

  .kpi-card,
  .kpi-card:nth-child(2n),
  .kpi-card:nth-child(3n),
  .kpi-card:nth-last-child(-n + 2) {
    min-height: 142px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .kpi-card:last-child {
    border-bottom: 0;
  }

  .login-shell {
    padding: 20px 12px;
  }

  .login-card {
    width: min(420px, calc(100vw - 24px));
    padding: 32px 24px 27px;
  }

  .login-panel-brand img {
    width: min(220px, 85%);
  }

  .demo-access-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
}

/* Wallboard chart clarity */
.insight-grid {
  min-width: 0;
}

.timeline-axis-label {
  font-size: 12px;
  font-weight: 500;
}

.timeline-axis-title,
.timeline-target-label {
  font-size: 10px;
}

.timeline-exception-label,
.timeline-cancel-label {
  font-size: 13px;
  font-weight: 650;
}

.station-chart,
.delay-chart {
  gap: 17px;
}

.station-row {
  grid-template-columns: minmax(130px, 0.8fr) minmax(260px, 2.4fr) 96px;
  gap: 18px;
}

.station-bar {
  height: 30px;
}

.station-target,
.station-baseline {
  stroke-width: 2.5;
}

.station-name strong {
  font-size: 16px;
}

.station-score strong {
  font-size: 18px;
}

.station-name span,
.station-score span {
  font-size: 12px;
}

.delay-row {
  gap: 8px;
}

.delay-row-head,
.delay-row-head strong {
  font-size: 15px;
}

.delay-row-head > strong {
  font-size: 18px;
}

.delay-row-head span {
  font-size: 12px;
}

.delay-bar {
  height: 18px;
}

.panel-total {
  font-size: 26px;
}

.chart-footnote {
  font-size: 12px;
}

@media (min-width: 1600px) and (min-height: 900px) {
  .topbar {
    padding-right: max(32px, calc((100vw - 1760px) / 2));
    padding-left: max(32px, calc((100vw - 1760px) / 2));
  }

  .page-shell {
    width: min(1760px, 100%);
    padding: 24px 32px 38px;
  }

  .page-heading {
    margin-bottom: 16px;
  }

  .status-banner {
    gap: 20px;
    margin-bottom: 18px;
    padding: 14px 18px;
  }

  .compact-heading {
    margin-bottom: 8px;
  }

  .kpi-grid {
    margin-bottom: 16px;
  }

  .kpi-card {
    min-height: 150px;
    padding: 14px 15px 13px;
  }

  .kpi-value {
    margin-top: 10px;
    font-size: 34px;
  }

  .insight-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.65fr) minmax(0, 1fr) minmax(0, 0.75fr);
    gap: 14px;
    align-items: stretch;
    margin-bottom: 16px;
  }

  .insight-grid > .overview-grid,
  .insight-grid > .secondary-grid {
    display: contents;
  }

  .insight-grid .panel {
    padding: 18px;
  }

  .insight-grid .panel-header {
    gap: 12px;
    margin-bottom: 14px;
  }

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

  .insight-grid .panel-header p:not(.eyebrow) {
    font-size: 12px;
    line-height: 1.35;
  }

  .insight-grid .chart-legend,
  .insight-grid .chart-key {
    gap: 9px;
    font-size: 12px;
  }

  .insight-grid .chart-wrap {
    min-height: 0;
  }

  .insight-grid .accessible-data {
    margin-top: 8px;
  }

  .insight-grid .accessible-data summary {
    padding-top: 8px;
  }

  .station-chart {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 14px;
  }

  .station-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 8px;
  }

  .station-name {
    min-width: 0;
    white-space: nowrap;
  }

  .station-name strong,
  .station-name span {
    display: inline;
  }

  .station-name span {
    margin-left: 5px;
  }

  .station-score span {
    display: none;
  }

  .station-score {
    grid-column: 2;
    grid-row: 1;
  }

  .station-bar {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 22px;
  }

  .delay-chart {
    gap: 6px;
  }

  .delay-row {
    gap: 3px;
  }

  .delay-row-head {
    gap: 8px;
  }

  .delay-row-head > div {
    min-width: 0;
  }

  .delay-row-head > div strong,
  .delay-row-head > div span {
    display: block;
    overflow: hidden;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .delay-row-head > div strong {
    font-size: 15px;
  }

  .delay-row-head > div span {
    margin-top: 1px;
    font-size: 11.5px;
  }

  .delay-row-head > strong {
    font-size: 17px;
    white-space: nowrap;
  }

  .delay-bar {
    height: 14px;
  }

  .chart-footnote {
    margin-top: 8px;
    padding-top: 8px;
    font-size: 11.5px;
    line-height: 1.25;
  }

  .attention-item {
    padding-top: 12px;
    padding-bottom: 11px;
  }
}

@media (max-width: 1020px) {
  .overview-grid,
  .secondary-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .station-row {
    grid-template-columns: 78px minmax(0, 1fr) 64px;
    gap: 9px;
  }

  .station-bar {
    height: 26px;
  }
}

@media (max-width: 480px) {
  .station-row {
    grid-template-columns: 68px minmax(0, 1fr) 56px;
  }

  .station-name span {
    display: none;
  }

  .station-name strong {
    font-size: 15px;
  }

  .station-score strong {
    font-size: 16px;
  }
}

/* Three-second operating verdict */
:root {
  --normal-band: #126146;
  --watch-band: #815000;
  --intervention-band: #9c2d38;
  --unavailable-band: #526068;
  --status-band-text: #ffffff;
}

:root[data-theme="dark"] {
  --normal-band: #164f3d;
  --watch-band: #704600;
  --intervention-band: #842832;
  --unavailable-band: #46545c;
}

.status-banner {
  --status-band: var(--unavailable-band);
  border: 0;
  border-left: 12px solid color-mix(in srgb, var(--status-band-text) 48%, transparent);
  background: var(--status-band);
  color: var(--status-band-text);
}

.status-banner[data-level="normal"] {
  --status-band: var(--normal-band);
  background: var(--normal-band);
}

.status-banner[data-level="watch"] {
  --status-band: var(--watch-band);
  background: var(--watch-band);
}

.status-banner[data-level="intervention"] {
  --status-band: var(--intervention-band);
  background: var(--intervention-band);
}

.status-banner[data-level="unavailable"] {
  --status-band: var(--unavailable-band);
  background: var(--unavailable-band);
}

.status-copy .eyebrow,
.status-copy h2,
.status-copy p.status-detail,
.status-detail strong,
.status-drivers,
.programme-progress,
.programme-progress-head,
.programme-progress-head strong,
.programme-progress > span {
  color: var(--status-band-text);
}

.status-copy .eyebrow {
  margin-bottom: 5px;
  opacity: 0.78;
}

.status-copy h2 {
  margin-bottom: 7px;
  font-size: 46px;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1;
}

.status-copy p.status-detail {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.status-detail strong {
  font-weight: 500;
}

.status-drivers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 22px;
  max-width: 980px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.status-drivers li {
  position: relative;
  min-width: 0;
  padding-left: 18px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
}

.status-drivers li::before {
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
  opacity: 0.78;
  transform: translateY(-50%);
}

.programme-progress {
  border-color: color-mix(in srgb, var(--status-band-text) 28%, transparent);
}

.programme-progress-head strong {
  font-size: 24px;
  font-weight: 600;
}

.programme-track {
  fill: color-mix(in srgb, var(--status-band-text) 26%, transparent);
}

.status-banner .programme-fill,
.status-banner[data-level="normal"] .programme-fill,
.status-banner[data-level="watch"] .programme-fill,
.status-banner[data-level="intervention"] .programme-fill {
  fill: var(--status-band-text);
}

@media (min-width: 1600px) {
  .topbar {
    min-height: 66px;
    padding-right: max(34px, calc((100vw - 1800px) / 2));
    padding-left: max(34px, calc((100vw - 1800px) / 2));
  }

  .page-heading .eyebrow {
    display: none;
  }

  .page-heading h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .page-shell {
    width: min(1800px, 100%);
    padding: 12px 30px 0;
  }

  .page-heading {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
  }

  .heading-context {
    color: var(--text-strong);
    font-size: 18px;
    font-weight: 500;
  }

  .date-panel {
    gap: 3px;
    padding: 3px;
  }

  .date-arrow,
  .today-button {
    min-height: 32px;
  }

  .date-arrow {
    width: 34px;
    flex-basis: 34px;
  }

  .date-input-wrap {
    min-width: 164px;
  }

  .status-banner {
    grid-template-columns: minmax(0, 1fr) minmax(350px, 410px);
    min-height: 210px;
    gap: 42px;
    margin-bottom: 18px;
    padding: 22px 34px;
    border-left-width: 15px;
    border-radius: 10px;
  }

  .status-copy .eyebrow {
    font-size: 14px;
  }

  .status-copy h2 {
    margin: 4px 0 9px;
    font-size: 78px;
  }

  .status-copy p.status-detail {
    font-size: 24px;
  }

  .status-drivers {
    gap: 12px 30px;
    margin-top: 23px;
  }

  .status-drivers li {
    padding-left: 22px;
    font-size: 22px;
  }

  .status-drivers li::before {
    width: 9px;
    height: 9px;
  }

  .programme-progress {
    align-content: center;
    gap: 13px;
    padding-left: 35px;
  }

  .programme-progress-head {
    align-items: flex-start;
    flex-direction: column-reverse;
    gap: 2px;
    font-size: 17px;
  }

  .programme-progress-head strong {
    font-size: 54px;
    letter-spacing: -0.04em;
    line-height: 1;
  }

  .programme-progress svg {
    height: 16px;
  }

  .programme-progress > span {
    font-size: 15px;
    line-height: 1.35;
    opacity: 0.84;
  }

  .compact-heading {
    margin-bottom: 8px;
  }

  .compact-heading .eyebrow {
    display: none;
  }

  .compact-heading h2 {
    font-size: 22px;
  }

  .freshness {
    margin-bottom: 0;
    font-size: 15px;
  }

  .kpi-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 17px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .kpi-grid .kpi-card {
    min-height: 154px;
    padding: 17px 19px 15px;
    border: 1px solid var(--border);
    border-top: 6px solid var(--unavailable);
    border-radius: 8px;
    background: var(--surface);
  }

  .kpi-card[data-kpi="completion"] {
    display: none;
  }

  .kpi-card[data-status="normal"] { border-top-color: var(--normal); }
  .kpi-card[data-status="watch"] { border-top-color: var(--watch); }
  .kpi-card[data-status="intervention"] { border-top-color: var(--intervention); }

  .kpi-topline {
    align-items: center;
  }

  .kpi-label {
    display: block;
    color: var(--text-strong);
    font-size: 17px;
    font-weight: 500;
    -webkit-line-clamp: unset;
  }

  .kpi-card .status-chip,
  .kpi-card .kpi-context,
  .kpi-card .kpi-meta {
    display: none;
  }

  .kpi-card:not([data-status="normal"]) .status-chip {
    display: inline-flex;
    font-size: 13px;
  }

  .kpi-card:not([data-status="normal"]) .kpi-context {
    display: -webkit-box;
    margin: 0;
    color: var(--text);
    font-size: 15px;
    line-height: 1.3;
    -webkit-line-clamp: 2;
  }

  .kpi-value {
    margin: 18px 0 0;
    font-size: 47px;
    font-weight: 650;
    letter-spacing: -0.04em;
  }

  .kpi-card:not([data-status="normal"]) .kpi-value {
    margin-bottom: 9px;
  }

  .insight-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.25fr) minmax(380px, 0.75fr);
    gap: 17px;
    align-items: stretch;
    margin-bottom: 0;
  }

  .insight-grid > .overview-grid {
    display: contents;
  }

  .insight-grid > .secondary-grid {
    display: none;
  }

  .insight-grid .panel {
    min-height: 368px;
    padding: 22px 25px;
    border-radius: 8px;
  }

  .insight-grid .panel-header {
    margin-bottom: 10px;
  }

  .insight-grid .panel-header h2 {
    font-size: 25px;
  }

  .insight-grid .panel-header p:not(.eyebrow) {
    font-size: 15px;
  }

  .insight-grid .panel-header .eyebrow {
    font-size: 13px;
  }

  .insight-grid .chart-legend {
    font-size: 15px;
  }

  .curve-panel .chart-wrap {
    display: grid;
    min-height: 0;
    place-items: center;
  }

  .curve-panel .departure-timeline {
    width: min(100%, 1050px);
  }

  .timeline-axis-label {
    font-size: 14px;
  }

  .timeline-axis-title,
  .timeline-target-label {
    font-size: 12px;
  }

  .timeline-exception-label,
  .timeline-cancel-label {
    font-size: 16px;
  }

  .insight-grid .accessible-data {
    display: none;
  }

  .empty-attention {
    min-height: 250px;
  }

  .empty-attention svg {
    width: 50px;
    height: 50px;
  }

  .empty-attention strong {
    font-size: 20px;
  }

  .attention-item h3 {
    font-size: 18px;
  }

  .attention-panel .panel-header p:not(.eyebrow),
  .attention-item > p {
    display: none;
  }

  .attention-meta {
    font-size: 13px;
  }

  .flight-panel,
  .data-footer {
    display: none;
  }
}

@media (max-width: 1200px) {
  .status-drivers {
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 14px;
  }
}

@media (max-width: 680px) {
  .status-copy h2 {
    font-size: 36px;
  }

  .status-copy p.status-detail {
    font-size: 16px;
  }

  .status-drivers li {
    font-size: 15px;
  }
}

/* Operational context: ranked delay attribution and mock airport weather */
.station-detail-grid {
  grid-template-columns: minmax(0, 1fr);
}

.operational-context-panel {
  margin-bottom: 18px;
}

.operational-context-panel .panel-header {
  margin-bottom: 16px;
}

.context-freshness {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.operational-context-body {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
  gap: 24px;
}

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

.context-block + .context-block {
  padding-left: 24px;
  border-left: 1px solid var(--border);
}

.context-block-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.context-block-heading h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 16px;
  font-weight: 600;
}

.context-block-heading > strong {
  color: var(--text-strong);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.operational-context-panel .delay-chart {
  gap: 12px;
}

.operational-context-panel .delay-row,
.operational-context-panel .delay-row-head {
  min-width: 0;
}

.delay-code-detail {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  gap: 9px;
}

.operational-context-panel .delay-code-detail > .delay-code {
  display: inline-flex;
  min-width: 48px;
  min-height: 24px;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--text-strong);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: 0.025em;
}

.delay-code-copy {
  min-width: 0;
}

.operational-context-panel .delay-row-head .delay-code-copy strong,
.operational-context-panel .delay-row-head .delay-code-copy span {
  display: block;
  overflow: hidden;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operational-context-panel .delay-row-head .delay-code-copy strong {
  font-size: 14px;
}

.operational-context-panel .delay-row-head .delay-code-copy span {
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
}

.operational-context-panel .delay-row-head > strong {
  flex: 0 0 auto;
  white-space: nowrap;
}

.delay-other-row {
  display: none;
}

.weather-summary-copy {
  margin: -3px 0 8px;
  color: var(--muted);
  font-size: 12px;
}

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

.weather-station {
  min-width: 0;
  padding: 13px 14px 12px;
  border-top: 4px solid var(--unavailable);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.weather-station:nth-child(even) {
  border-right: 0;
}

.weather-station[data-status="normal"] { border-top-color: var(--normal); }
.weather-station[data-status="watch"] { border-top-color: var(--watch); }
.weather-station[data-status="intervention"] { border-top-color: var(--intervention); }

.weather-station-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.weather-station-identity {
  min-width: 0;
}

.weather-station-identity strong,
.weather-station-identity span {
  display: block;
}

.weather-station-identity strong {
  color: var(--text-strong);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.weather-station-identity span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-category {
  display: inline-flex;
  min-width: 44px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 650;
}

.weather-normal {
  background: var(--normal-soft);
  color: var(--normal);
}

.weather-watch {
  background: var(--watch-soft);
  color: var(--watch);
}

.weather-intervention {
  background: var(--intervention-soft);
  color: var(--intervention);
}

.weather-condition {
  margin: 9px 0 8px;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 600;
}

.weather-brief {
  display: none;
}

.weather-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
  margin: 0;
}

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

.weather-metrics dt,
.weather-metrics dd {
  margin: 0;
}

.weather-metrics dt {
  color: var(--muted);
  font-size: 10px;
}

.weather-metrics dd {
  color: var(--text-strong);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.weather-impact {
  min-height: 35px;
  margin: 11px 0 0;
  padding-top: 9px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

@media (min-width: 1600px) {
  .kpi-grid {
    margin-bottom: 15px;
  }

  .insight-grid {
    grid-template-columns: minmax(0, 1.8fr) minmax(310px, 0.65fr) minmax(430px, 0.9fr);
    gap: 17px;
  }

  .operational-context-panel {
    min-height: 368px;
    margin-bottom: 0;
    padding: 15px 18px 12px;
  }

  .operational-context-panel .panel-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1px;
    margin-bottom: 7px;
  }

  .operational-context-panel .panel-header h2 {
    font-size: 21px;
  }

  .operational-context-panel .panel-header .eyebrow {
    display: none;
  }

  .operational-context-panel .panel-header > div > p:not(.eyebrow) {
    display: none;
  }

  .context-freshness {
    margin-top: 0;
    font-size: 11px;
  }

  .operational-context-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .context-block + .context-block {
    margin-top: 8px;
    padding-top: 8px;
    padding-left: 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .context-block-heading {
    margin-bottom: 5px;
  }

  .context-block-heading h3 {
    font-size: 14px;
  }

  .context-block-heading > strong {
    font-size: 17px;
  }

  .operational-context-panel .delay-chart {
    gap: 4px;
  }

  .operational-context-panel .delay-row {
    gap: 2px;
  }

  .operational-context-panel .delay-row:nth-child(n + 4):not(.delay-other-row) {
    display: none;
  }

  .operational-context-panel .delay-other-row {
    display: grid;
  }

  .operational-context-panel .delay-code-detail > .delay-code {
    min-width: 43px;
    min-height: 20px;
    flex-basis: 43px;
    font-size: 11px;
  }

  .operational-context-panel .delay-row-head .delay-code-copy strong {
    font-size: 12px;
  }

  .operational-context-panel .delay-row-head .delay-code-copy span {
    font-size: 11px;
  }

  .operational-context-panel .delay-row-head > strong {
    font-size: 13px;
  }

  .operational-context-panel .delay-bar {
    display: none;
  }

  .operational-context-panel .chart-footnote {
    display: none;
  }

  .weather-summary-copy {
    overflow: hidden;
    margin-bottom: 3px;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .weather-station {
    padding: 5px 8px 6px;
    border-top-width: 3px;
  }

  .weather-station-identity strong {
    font-size: 14px;
  }

  .weather-station-identity span,
  .weather-condition,
  .weather-impact {
    display: none;
  }

  .weather-brief {
    display: block;
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.2;
  }

  .weather-station[data-status="watch"] .weather-brief,
  .weather-station[data-status="intervention"] .weather-brief {
    display: none;
  }

  .weather-station[data-status="watch"] .weather-impact,
  .weather-station[data-status="intervention"] .weather-impact {
    display: block;
    min-height: 0;
    overflow: hidden;
    margin: 3px 0 0;
    padding: 0;
    border: 0;
    font-size: 11px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .weather-category {
    min-width: 39px;
    min-height: 19px;
    padding: 1px 5px;
    font-size: 11px;
  }

  .weather-metrics {
    display: none;
  }
}

@media (max-width: 1020px) {
  .operational-context-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .context-block + .context-block {
    margin-top: 20px;
    padding-top: 20px;
    padding-left: 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }
}

@media (max-width: 680px) {
  .operational-context-panel .panel-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .context-freshness {
    white-space: normal;
  }

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

  .weather-station {
    padding: 8px;
    border-top-width: 3px;
  }

  .weather-station-identity span,
  .weather-condition,
  .weather-impact,
  .weather-metrics {
    display: none;
  }

  .weather-brief {
    display: block;
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
  }
}
