:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --panel: #ffffff;
  --ink: #17211d;
  --muted: #61706a;
  --line: #dce3de;
  --teal: #0f766e;
  --teal-soft: #d9f4ef;
  --blue: #2563eb;
  --amber: #b7791f;
  --red: #b42318;
  --green: #2f7d46;
  --shadow: 0 14px 45px rgba(25, 38, 34, 0.10);
  --plot-left-inset: 64px;
  --plot-right-inset: 64px;
  --plot-y-pad: 9px;
  --chart-pad-y: 16px;
  --chart-pad-x: 16px;
  --chart-gap: 10px;
  --value-column-width: minmax(196px, 264px);
  --chart-content-min-width: 100%;
  --plot-grid-line: rgba(97, 112, 106, 0.15);
  --plot-midnight-line: rgba(23, 33, 29, 0.48);
  --plot-cursor-line: rgba(23, 33, 29, 0.52);
  --type-xs: 0.9rem;
  --type-sm: 1rem;
  --type-md: 1.125rem;
  --type-lg: 1.125rem;
  --time-label-size: 1rem;
  --axis-label-size: 1.2rem;
  --chart-label-size: 1rem;
  --font-ui: Calibri, Carlito, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-brand: var(--font-ui);
  --font-number: var(--font-ui);
  font-family:
    var(--font-ui);
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  min-width: 0;
  overflow-x: hidden;
}

body {
  margin: 0;
  background:
    url("/public/rhone-background.jpg") center / cover no-repeat fixed,
    var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.app-shell {
  width: calc(100% - 20px);
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 0 36px;
  min-width: 0;
}

.app-shell.focus-mode {
  width: calc(100% - 16px);
  max-width: 1480px;
  padding: 8px 0 20px;
}

.app-shell.embed-mode {
  width: 100%;
  max-width: none;
  padding: 0;
}

.focus-toggle-button {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 20;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(25, 38, 34, 0.12);
}

.focus-toggle-button:hover {
  border-color: rgba(15, 118, 110, 0.45);
}

.app-shell.focus-mode .focus-toggle-button {
  top: 12px;
  right: auto;
  bottom: auto;
  left: 12px;
}

.focus-corner-marks {
  display: flex;
  align-items: end;
  justify-content: space-between;
  width: calc(100% - 36px);
  min-width: 0;
  margin: 4px auto 0;
}

.focus-corner-logo {
  position: static;
  z-index: 12;
  display: block;
  width: clamp(72px, 8vw, 118px);
  aspect-ratio: 1135 / 1179;
  background-image: url("/public/Logo_Pontonniers_Round_White.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.focus-corner-qr {
  position: static;
  z-index: 12;
  display: block;
  width: clamp(72px, 8vw, 118px);
  aspect-ratio: 1;
  background-image: url("/public/pontonniers-geneve-qr.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-width: 0;
  padding: 10px 0 18px;
}

.topbar h1,
.station-heading h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-family: var(--font-brand);
  font-size: clamp(2.1rem, 6vw, 4.25rem);
  line-height: 0.95;
}

.brand-lockup {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px 16px;
  min-width: 0;
}

.partner-mark {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  width: fit-content;
  max-width: 100%;
  color: var(--muted);
  font-family: var(--font-brand);
  font-size: var(--type-xs);
  font-weight: 850;
  line-height: 1.1;
  white-space: nowrap;
}

.partner-logo-icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: block;
  border-radius: 999px;
  background-color: #17211d;
  background-image: url("/public/Logo_Pontonniers_Round_White.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 86%;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: var(--type-xs);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.app-shell.focus-mode .topbar {
  display: none;
}

.app-shell.branded-mode:not(.focus-mode) .brand-lockup {
  display: none;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(2, 46px);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.segmented button,
.refresh-button {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

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

.refresh-button {
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
}

.button-icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.refresh-button.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
}

.refresh-button.ghost {
  color: var(--muted);
}

.refresh-button:hover,
.station-tab:hover {
  border-color: rgba(15, 118, 110, 0.45);
}

.pro-signin {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.pro-signin strong {
  margin-right: 4px;
}

.pro-signin input {
  min-width: 160px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.pro-signin input:focus {
  border-color: var(--teal);
  outline: 2px solid rgba(15, 118, 110, 0.16);
  outline-offset: 0;
}

.dashboard {
  display: grid;
  gap: 18px;
  width: 100%;
  min-width: 0;
  margin-inline: auto;
}

.dashboard-focus {
  gap: 0;
}

.dashboard-embed {
  gap: 0;
}

.source-strip,
.station-panel,
.empty-state,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.source-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
}

.source-strip > div {
  display: grid;
  gap: 2px;
}

.source-strip-footer {
  box-shadow: none;
}

.source-list {
  min-width: 0;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  min-width: 0;
  color: var(--ink);
  font-size: var(--type-sm);
  font-weight: 750;
}

.label {
  color: var(--muted);
  font-size: var(--type-xs);
  font-weight: 800;
  text-transform: uppercase;
}

.cache,
.loading-text {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: var(--type-xs);
  font-weight: 900;
}

.cache.fresh {
  background: #e7f6ec;
  color: var(--green);
}

.cache.stale {
  background: #fff3d6;
  color: var(--amber);
}

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

.loading-text {
  background: var(--teal-soft);
  color: var(--teal);
}

.notice {
  padding: 12px 16px;
  color: var(--muted);
}

.notice p {
  margin: 4px 0;
}

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

.station-tabs-bottom {
  margin-top: 2px;
}

.station-tab {
  display: grid;
  align-content: center;
  gap: 7px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.station-tab.active {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.16);
}

.station-tab strong {
  line-height: 1.15;
}

.station-tab small,
.plot-current small {
  color: var(--muted);
  line-height: 1.35;
}

.station-panel {
  display: grid;
  gap: 18px;
  width: 100%;
  min-width: 0;
  margin-inline: auto;
  padding: 18px;
}

.app-shell.focus-mode .station-panel {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.app-shell.embed-mode .station-panel {
  min-height: 100vh;
  align-content: center;
  gap: 8px;
  border-color: transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.app-shell.embed-mode .station-header-qr {
  display: none;
}

.app-shell.branded-mode {
  --station-attribution-size: clamp(1rem, 3vw, 2.2rem);
}

.app-shell.branded-mode .station-heading {
  --station-title-size: clamp(2.25rem, 6.6vw, 4.9rem);
  align-items: end;
  justify-items: start;
  text-align: left;
}

.station-current-summary {
  display: grid;
  align-self: end;
  justify-self: end;
  justify-items: end;
  gap: 3px;
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-brand);
  font-size: var(--station-attribution-size);
  font-weight: 850;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.station-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--chart-gap);
  min-width: 0;
  padding: 0 var(--chart-pad-x);
}

.station-heading-title {
  min-width: 0;
}

.station-heading h2 {
  font-size: clamp(1.45rem, 4vw, 2.2rem);
  line-height: 1.05;
}

.location-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: var(--type-sm);
  font-weight: 700;
  line-height: 1.25;
}

.station-focus-brand {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  flex: 0 1 auto;
  gap: clamp(14px, 1.7vw, 24px);
  max-width: 100%;
  min-width: 0;
  color: var(--muted);
  font-family: var(--font-brand);
  font-size: var(--station-attribution-size);
  font-weight: 850;
  line-height: 1;
}

.station-brand-copy {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  text-align: left;
}


.app-shell.branded-mode .station-focus-brand,
.app-shell.branded-mode .station-focus-brand .station-brand-copy,
.app-shell.embed-mode .station-embed-brand,
.app-shell.embed-mode .station-embed-brand .station-brand-copy {
  color: var(--ink);
}

.station-focus-title {
  --focus-logo-size: clamp(38px, 4.2vw, 58px);
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.station-embed-title {
  --embed-logo-size: clamp(28px, 3.2vw, 42px);
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px 12px;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.station-app-word {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  font-family: var(--font-brand);
  font-size: var(--station-title-size);
  line-height: 1;
}

.station-embed-brand {
  display: flex;
  align-items: flex-end;
  flex: 0 1 auto;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  color: var(--muted);
  font-family: var(--font-brand);
  font-size: clamp(0.7rem, 1.2vw, 0.86rem);
  font-weight: 850;
  line-height: 1.05;
}

.station-embed-logo {
  flex: 0 0 var(--embed-logo-size);
  width: var(--embed-logo-size);
  height: var(--embed-logo-size);
  max-width: var(--embed-logo-size);
  max-height: var(--embed-logo-size);
  aspect-ratio: 1;
}

.station-brand-logo {
  flex: 0 0 var(--focus-logo-size);
  width: var(--focus-logo-size);
  height: var(--focus-logo-size);
  max-width: var(--focus-logo-size);
  max-height: var(--focus-logo-size);
  aspect-ratio: 1;
}

.app-shell.branded-mode .station-brand-logo {
  display: none;
}

.station-heading-side {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.station-header-qr {
  display: block;
  flex: 0 0 var(--station-header-qr-size);
  width: var(--station-header-qr-size);
  height: var(--station-header-qr-size);
  max-width: var(--station-header-qr-size);
  max-height: var(--station-header-qr-size);
  aspect-ratio: 1;
  border: 1px solid rgba(23, 33, 29, 0.18);
  background-color: #ffffff;
  background-image: url("/public/pontonniers-geneve-qr.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.page-live-clock {
  display: grid;
  gap: 3px;
  justify-items: center;
  color: var(--ink);
  font-size: var(--type-md);
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  line-height: 1.05;
  white-space: nowrap;
}

.station-live-clock {
  align-self: start;
  justify-items: end;
  min-width: 0;
  text-align: right;
}

.app-shell.focus-mode .station-live-clock .live-clock-time {
  display: block;
  font-family: var(--font-brand);
  font-size: clamp(2.35rem, 6.4vw, 3.95rem);
  line-height: 1;
}

.live-clock-label {
  color: var(--muted);
  font-size: var(--type-xs);
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.live-clock-time {
  font-family: var(--font-number);
  font-size: clamp(1.22rem, 2.3vw, 1.65rem);
}

.live-clock-air {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  color: var(--muted);
  font-size: var(--type-xs);
  font-weight: 800;
}

.live-clock-air strong {
  color: var(--red);
  font-family: var(--font-number);
  font-size: var(--type-md);
}

.app-shell.focus-mode .station-live-clock,
.app-shell.focus-mode .station-live-clock .live-clock-label,
.app-shell.focus-mode .station-live-clock .live-clock-air,
.app-shell.focus-mode .station-live-clock .live-clock-air strong,
.app-shell.embed-mode .station-live-clock,
.app-shell.embed-mode .station-live-clock .live-clock-label,
.app-shell.embed-mode .station-live-clock .live-clock-air,
.app-shell.embed-mode .station-live-clock .live-clock-air strong {
  color: var(--ink);
}

.app-shell.focus-mode .station-live-clock .live-clock-air strong,
.app-shell.embed-mode .station-live-clock .live-clock-air strong {
  color: var(--red);
}

.station-footnotes {
  display: grid;
  gap: 4px;
  margin: -7px 0 0;
}

.station-footnote {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: var(--type-xs);
  line-height: 1.35;
}

.station-footnote strong {
  flex: 0 0 auto;
  font-size: var(--type-xs);
  font-weight: 850;
  text-transform: uppercase;
}

.station-footnote span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.app-shell.focus-mode .station-footnote,
.app-shell.focus-mode .station-footnote strong,
.app-shell.focus-mode .station-footnote span,
.app-shell.embed-mode .station-footnote,
.app-shell.embed-mode .station-footnote strong,
.app-shell.embed-mode .station-footnote span {
  color: #ffffff;
}

.chart-stack {
  position: relative;
  display: grid;
  gap: 0;
  width: 100%;
  min-width: 0;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}


.app-shell.embed-mode .chart-stack {
  border-radius: 0;
}

.chart-measure-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  min-width: 0;
  padding: 12px calc(var(--plot-right-inset) + var(--chart-pad-x) + 1px) 3px
    calc(var(--plot-left-inset) + var(--chart-pad-x) + 1px);
}

.app-shell.branded-mode .chart-measure-row {
  justify-items: center;
  padding-bottom: 16px;
  padding-right: var(--chart-pad-x);
  padding-left: var(--chart-pad-x);
  text-align: center;
}

.chart-measure-footer {
  display: grid;
  align-items: end;
  justify-items: start;
  min-width: 0;
  padding: 0 calc(var(--chart-pad-x) + 6px) 8px
    calc(var(--plot-left-inset) + var(--chart-pad-x) + 1px);
}

.chart-context-label {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: var(--type-md);
  font-weight: 750;
  line-height: 1.18;
}

.app-shell.branded-mode .chart-context-label {
  font-family: var(--font-brand);
  font-size: var(--station-attribution-size);
  font-weight: 850;
  line-height: 1;
}

.chart-card {
  position: relative;
  z-index: 2;
  display: grid;
  padding: var(--chart-pad-y) var(--chart-pad-x);
  overflow: hidden;
  min-width: 0;
  --metric-axis: var(--muted);
  --metric-line: var(--teal);
  --metric-fill: var(--teal);
  --metric-grid: rgba(97, 112, 106, 0.12);
}

.chart-card.temperature {
  --metric-axis: var(--red);
  --metric-line: #dc2626;
  --metric-grid: rgba(180, 35, 24, 0.16);
  padding-top: calc(var(--chart-pad-y) + 26px);
}

.chart-card.discharge {
  --metric-line: #1287a8;
  --metric-axis: var(--metric-line);
  --metric-fill: #1f9fc4;
  --metric-grid: rgba(37, 99, 235, 0.14);
  padding-bottom: calc(var(--chart-pad-y) + 34px);
}

.plot-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--value-column-width);
  gap: var(--chart-gap);
  align-items: stretch;
  min-width: 0;
}

.chart-frame {
  position: relative;
  width: 100%;
  height: clamp(180px, 21vw, 245px);
  min-width: 0;
  min-height: 0;
}

.custom-chart {
  position: relative;
  width: 100%;
  height: 100%;
}

.custom-y-axis {
  position: absolute;
  top: var(--plot-y-pad);
  bottom: var(--plot-y-pad);
  left: 0;
  width: var(--plot-left-inset);
  pointer-events: none;
}

.custom-y-axis-right {
  right: 0;
  left: auto;
  width: var(--plot-right-inset);
}

.custom-y-axis-title {
  position: absolute;
  top: 50%;
  right: 40px;
  color: var(--muted);
  font-size: var(--axis-label-size);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
  opacity: 0.95;
  text-transform: none;
  transform: translateY(-50%) rotate(180deg);
  white-space: nowrap;
  writing-mode: vertical-rl;
}

.custom-y-axis-right .custom-y-axis-title {
  display: none;
  right: auto;
  left: 40px;
  font-size: var(--axis-label-size);
}

.risk-axis-scale {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 5px;
  overflow: hidden;
  border-radius: 999px;
  opacity: 0.94;
}

.custom-y-axis-right .risk-axis-scale {
  right: auto;
  left: 0;
}

.risk-axis-segment {
  position: absolute;
  left: 0;
  right: 0;
}

.risk-axis-segment.safety-safe {
  background: #16803c;
}

.risk-axis-segment.safety-risky {
  background: #d97706;
}

.risk-axis-segment.safety-noswim {
  background: #dc2626;
}

.custom-y-tick {
  position: absolute;
  right: 4px;
  width: 32px;
  color: var(--metric-axis);
  font-family: var(--font-number);
  font-size: var(--type-sm);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  opacity: 0.9;
  text-align: right;
  transform: translateY(-50%);
  white-space: nowrap;
}

.custom-y-tick.edge-top {
  transform: translateY(0);
}

.custom-y-tick.edge-bottom {
  transform: translateY(-100%);
}

.custom-y-axis.has-risk-scale .custom-y-tick {
  right: 10px;
}

.custom-y-tick.safety-safe {
  color: #16803c;
}

.custom-y-tick.safety-risky {
  color: #d97706;
}

.custom-y-tick.safety-noswim {
  color: #dc2626;
}

.custom-y-axis-right .custom-y-tick {
  right: auto;
  left: 4px;
  text-align: left;
}

.custom-y-axis-right.has-risk-scale .custom-y-tick {
  left: 7px;
}

.custom-plot-area {
  position: absolute;
  inset: var(--plot-y-pad) 0;
}

.plot-scroll-viewport {
  position: absolute;
  top: 0;
  right: var(--plot-right-inset);
  bottom: 0;
  left: var(--plot-left-inset);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.plot-scroll-viewport::-webkit-scrollbar {
  display: none;
}

.plot-scroll-content {
  position: relative;
  min-width: 100%;
  height: 100%;
}

.custom-plot-area svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.hover-capture {
  position: absolute;
  inset: 0;
  z-index: 3;
  cursor: crosshair;
}

.custom-grid-x line,
.custom-grid-y line {
  stroke: var(--metric-grid);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.custom-grid-x line.midnight {
  stroke: var(--plot-midnight-line);
  stroke-width: 2;
}

.custom-grid-x line.six-hour,
.custom-grid-x line.eighteen-hour {
  opacity: 0.55;
}

.sun-shading rect {
  fill: rgba(23, 33, 29, 0.045);
}

.uncertainty-band {
  fill: rgba(183, 121, 31, 0.16);
  stroke: rgba(183, 121, 31, 0.22);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.custom-area {
  stroke: none;
  fill-opacity: 0.18;
}

.custom-area.discharge {
  fill: var(--metric-fill);
  fill-opacity: 0.20;
}

.custom-area.forecast {
  fill: #b45309;
  fill-opacity: 0.10;
}

.custom-area.safety-safe {
  fill: #16803c;
}

.custom-area.safety-risky {
  fill: #d97706;
}

.custom-area.safety-noswim {
  fill: #dc2626;
}

.custom-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
}

.custom-line.discharge {
  stroke: var(--metric-line);
}

.custom-line.temperature {
  stroke: var(--metric-line);
  stroke-width: 3.6;
}

.custom-line.forecast {
  stroke: #b45309;
  stroke-dasharray: 7 5;
}

.custom-line.forecast.temperature {
  stroke: var(--metric-line);
}

.custom-line.air-temperature {
  stroke: #111827;
  stroke-dasharray: 4 5;
  stroke-linecap: butt;
  stroke-width: 2.1;
  opacity: 0.74;
}

.custom-line.safety-safe {
  stroke: #16803c;
}

.custom-line.safety-risky {
  stroke: #d97706;
}

.custom-line.safety-noswim {
  stroke: #dc2626;
}

.hover-cursor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.hover-cursor-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--plot-cursor-line);
  transform: translateX(-50%);
}

.hover-cursor-point {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 3px solid var(--metric-line);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 3px 12px rgba(23, 33, 29, 0.24);
  transform: translate(-50%, -50%);
}

.chart-card.level .hover-cursor-point {
  border-color: var(--teal);
}

.plot-current {
  display: grid;
  font-family: var(--font-brand);
  align-content: center;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  padding-left: 0;
}

.plot-current-stacked {
  display: none;
}

.plot-current-heading {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.plot-current-heading h3,
.plot-current-heading .readout-live-time {
  font-family: var(--font-brand);
  margin: 0;
  color: var(--muted);
  font-size: var(--axis-label-size);
  font-weight: 850;
  line-height: 1.15;
  opacity: 0.95;
}

.plot-readout {
  display: grid;
  align-content: start;
  align-self: start;
  gap: 8px;
  min-width: 0;
}

.readout-context {
  color: var(--muted);
}

.plot-current strong {
  display: inline-flex;
  align-items: baseline;
  gap: 0.16em;
  font-family: var(--font-brand);
  font-size: clamp(2.35rem, 6.4vw, 3.95rem);
  line-height: 1;
  overflow-wrap: normal;
  white-space: nowrap;
  word-break: normal;
}


.metric-number,
.metric-unit {
  font-family: var(--font-brand);
}

.readout-value.temperature {
  color: var(--red);
}

.readout-value.safety-safe {
  color: #16803c;
}

.readout-value.safety-risky {
  color: #d97706;
}

.readout-value.safety-noswim {
  color: #dc2626;
}

.discharge-comment {
  font-family: var(--font-brand);
  font-size: var(--type-md);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.2;
}

.discharge-comment.safety-safe {
  color: #16803c;
}

.discharge-comment.safety-risky {
  color: #d97706;
}

.discharge-comment.safety-noswim {
  color: #dc2626;
}

.plot-last-measure {
  display: grid;
  align-self: end;
  gap: 1px;
  min-width: 0;
  margin: 4px 0 0;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.plot-last-measure span {
  color: var(--muted);
  font-size: var(--type-xs);
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.plot-last-measure time {
  color: var(--ink);
  font-family: var(--font-number);
  font-size: var(--type-md);
  font-weight: 850;
  white-space: nowrap;
}

.plot-last-measure-chart {
  display: flex;
  align-items: baseline;
  gap: 0.4em;
  margin: 0;
  color: var(--muted);
  font-family: var(--font-number);
  font-size: var(--time-label-size);
  font-weight: 650;
  line-height: 1.15;
  opacity: 0.9;
  text-align: left;
  white-space: nowrap;
}

.plot-last-measure-chart span,
.plot-last-measure-chart time {
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  opacity: 1;
  text-transform: none;
}

.plot-last-measure-stacked {
  display: none;
}

.plot-last-measure-inline {
  display: grid;
  gap: 2px;
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--font-brand);
  font-size: var(--axis-label-size);
  font-weight: 850;
  line-height: 1.15;
  opacity: 0.95;
  white-space: nowrap;
}

.plot-last-measure-inline span,
.plot-last-measure-inline time {
  color: inherit;
  font-family: var(--font-brand);
  opacity: 1;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-transform: none;
}

.shared-time-axis {
  position: absolute;
  right: var(--chart-pad-x);
  left: var(--chart-pad-x);
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--value-column-width);
  gap: var(--chart-gap);
  padding: 0;
  background: transparent;
  color: var(--muted);
  pointer-events: none;
}

.time-axis-top {
  top: 10px;
  margin: 0;
}

.time-axis-bottom {
  bottom: 10px;
  margin: 0;
}

.axis-rule {
  display: none;
}

.shared-axis-frame {
  margin-left: var(--plot-left-inset);
  margin-right: var(--plot-right-inset);
  max-width: 100%;
  min-width: 0;
}

.axis-range-label {
  display: none;
  font-size: var(--type-xs);
}

.axis-scroll-viewport {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.axis-scroll-viewport::-webkit-scrollbar {
  display: none;
}

.axis-scroll-content {
  display: grid;
  gap: 0;
  min-width: 100%;
}

.axis-rule-top {
  border-top: 1px solid var(--plot-grid-line);
}

.axis-rule-bottom {
  border-bottom: 1px solid var(--plot-grid-line);
}

.axis-tick-mark {
  position: absolute;
  display: none;
  width: 1px;
  height: 6px;
  background: var(--plot-grid-line);
  transform: translateX(-50%);
}

.axis-rule-top .axis-tick-mark {
  top: -1px;
}

.axis-rule-bottom .axis-tick-mark {
  bottom: -1px;
}

.axis-tick-mark.midnight {
  width: 2px;
  height: 8px;
  background: var(--plot-midnight-line);
}

.axis-tick-mark.noon {
  height: 6px;
  background: rgba(97, 112, 106, 0.24);
}

.axis-tick-mark.six-hour,
.axis-tick-mark.eighteen-hour {
  height: 5px;
  opacity: 0.65;
}

.axis-labels {
  position: relative;
  height: 19px;
  min-width: 0;
}

.axis-label {
  position: absolute;
  top: 0;
  width: 26px;
  color: var(--muted);
  font-family: var(--font-number);
  font-size: var(--time-label-size);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  opacity: 0.9;
  overflow: visible;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
  transform: translateX(-50%);
}

.axis-label.noon {
  width: 96px;
  font-weight: 850;
  opacity: 0.95;
}

.axis-label.start {
  text-align: left;
  transform: translateX(0);
}

.axis-label.end {
  text-align: right;
  transform: translateX(-100%);
}

.axis-label-wide,
.axis-label-medium,
.axis-label-short {
  display: none;
}

.axis-hover-tick {
  position: absolute;
  width: 2px;
  height: 8px;
  background: var(--plot-cursor-line);
  transform: translateX(-50%);
}

.axis-rule-top .axis-hover-tick {
  top: -1px;
}

.axis-rule-bottom .axis-hover-tick {
  bottom: -1px;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 360px;
  padding: 48px 20px;
  text-align: center;
}

.empty-state h2,
.empty-state p {
  margin: 0;
}

.loading-mark {
  width: 56px;
  height: 56px;
  border: 6px solid var(--line);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.status-line {
  color: var(--muted);
}

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

@media (max-width: 1180px) {
  .axis-label {
    width: 54px;
  }

  .axis-range-label {
    display: none;
    margin: 0 0 2px;
    color: var(--muted);
    font-weight: 750;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
  }

  .axis-label-full {
    display: none;
  }

  .axis-label-wide {
    display: inline;
  }

  .axis-label.noon {
    display: block;
    width: 92px;
  }
}

@media (max-width: 1180px) {
  .station-heading {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0 calc(var(--plot-right-inset) + var(--chart-pad-x) + 1px) 0
      calc(var(--plot-left-inset) + var(--chart-pad-x) + 1px);
  }

  .app-shell.focus-mode .station-heading-side {
    justify-self: end;
  }

  .app-shell.branded-mode .station-focus-title {
    flex-wrap: nowrap;
  }

}

@media (max-width: 760px) {
  .axis-label {
    width: 38px;
  }

  .axis-label-wide {
    display: none;
  }

  .axis-label-medium {
    display: inline;
  }

  .axis-label.noon {
    width: 68px;
  }
}

@media (max-width: 540px) {
  .axis-label {
    width: 30px;
  }

  .axis-label-medium {
    display: none;
  }

  .axis-label-short {
    display: inline;
  }

  .axis-label.noon {
    display: block;
    width: 46px;
  }
}

@media (max-width: 900px) {
  :root {
    --value-column-width: minmax(132px, 34vw);
  }

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

  .page-live-clock {
    justify-items: end;
    padding-top: 2px;
    text-align: right;
  }

  .brand-lockup {
    text-align: left;
  }

  .topbar-actions {
    grid-column: 1 / -1;
    justify-content: center;
    width: 100%;
  }

  .partner-mark {
    white-space: normal;
  }

  .source-strip,
  .station-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .plot-current strong {
    font-size: clamp(1.8rem, 8.4vw, 2.85rem);
  }

  .app-shell.focus-mode .station-live-clock .live-clock-time {
    font-size: clamp(1.8rem, 8.4vw, 2.85rem);
  }

  .app-shell.branded-mode .station-focus-title {
    --focus-logo-size: clamp(36px, 6vw, 52px);
  }
}

@media (max-width: 640px) {
  :root {
    --plot-left-inset: 54px;
    --plot-right-inset: 14px;
    --plot-y-pad: 10px;
    --chart-pad-y: 12px;
    --chart-pad-x: 10px;
    --chart-gap: 7px;
    --value-column-width: minmax(94px, 26vw);
    --chart-content-min-width: 150px;
  }

  .app-shell {
    width: calc(100% - 12px);
    max-width: 1240px;
    padding-top: 8px;
    padding-bottom: 20px;
  }

  .source-strip,
  .station-tabs {
    grid-template-columns: 1fr;
  }

  .station-tab {
    min-height: 88px;
  }

  .chart-frame {
    height: clamp(132px, 18vh, 160px);
  }

  .plot-row,
  .shared-time-axis {
    grid-template-columns: minmax(0, 1fr);
  }

  .plot-current-inline {
    display: none;
  }

  .plot-current-stacked {
    display: grid;
  }

  .axis-spacer {
    display: none;
  }

  .custom-y-axis-right {
    display: none;
  }

  .plot-current {
    grid-template-columns: minmax(0, 1fr);
    justify-items: end;
    align-content: start;
    gap: 4px;
    padding: 9px var(--plot-right-inset) 0 var(--plot-left-inset);
    text-align: right;
  }

  .plot-current-heading,
  .plot-readout {
    justify-items: end;
    text-align: right;
  }

  .plot-last-measure-stacked {
    display: grid;
    justify-items: end;
    margin: -2px calc(var(--plot-right-inset) + var(--chart-pad-x) + 1px) 0
      calc(var(--plot-left-inset) + var(--chart-pad-x) + 1px);
    text-align: right;
  }

  .chart-measure-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .chart-measure-footer {
    padding-bottom: 6px;
  }

  .station-heading {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 calc(var(--plot-right-inset) + var(--chart-pad-x) + 1px) 0
      calc(var(--plot-left-inset) + var(--chart-pad-x) + 1px);
  }

  .station-heading-side {
    --station-header-qr-size: clamp(42px, 11vw, 52px);
    justify-self: end;
  }

  .station-heading h2 {
    font-size: clamp(1.22rem, 6vw, 1.72rem);
  }

  .station-live-clock .live-clock-time {
    font-size: clamp(1.05rem, 5.7vw, 1.45rem);
  }

  .app-shell.branded-mode .station-heading,
  .app-shell.embed-mode .station-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0;
  }

  .app-shell.branded-mode .chart-measure-row {
    padding-right: 0;
    padding-left: 0;
    padding-bottom: 16px;
  }

  .app-shell.branded-mode {
    --station-attribution-size: clamp(0.68rem, 3.6vw, 1.08rem);
  }

  .app-shell.branded-mode .station-heading {
    --station-title-size: clamp(1.65rem, 9.7vw, 2.85rem);
    column-gap: 10px;
  }

  .station-current-summary {
    max-width: 52vw;
  }

  .app-shell.branded-mode .station-focus-title {
    --focus-logo-size: clamp(34px, 10vw, 48px);
    gap: 6px;
    width: 100%;
  }


  .app-shell.branded-mode .station-focus-brand {
    gap: 5px;
    flex: 1 1 auto;
    align-self: auto;
    width: auto;
    overflow: visible;
    font-size: var(--station-attribution-size);
  }

  .app-shell.branded-mode .station-brand-copy {
    text-align: left;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-shell.focus-mode .station-live-clock {
    justify-self: end;
  }

  .custom-y-axis-title {
    right: 32px;
  }

  .custom-y-axis-right .custom-y-axis-title {
    right: auto;
    left: 28px;
  }

  .risk-axis-scale {
    width: 4px;
  }

  .custom-y-tick {
    right: 2px;
    width: 26px;
  }

  .custom-y-axis.has-risk-scale .custom-y-tick {
    right: 6px;
  }

  .custom-y-axis-right.has-risk-scale .custom-y-tick {
    left: 6px;
  }

  .plot-current {
    padding: 8px var(--plot-right-inset) 0 var(--plot-left-inset);
  }

  .plot-current strong {
    font-size: clamp(1.62rem, 8.8vw, 2.45rem);
  }

  .app-shell.focus-mode .station-live-clock .live-clock-time {
    font-size: clamp(1.62rem, 8.8vw, 2.45rem);
  }

  .discharge-comment {
    max-width: 120px;
    text-align: right;
  }
}

@media (max-width: 480px) {
  .app-shell.embed-mode .station-heading {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-shell.embed-mode .station-heading-side {
    justify-self: end;
  }
}

@media (max-width: 420px) {
  :root {
    --plot-left-inset: 50px;
    --plot-right-inset: 12px;
    --value-column-width: minmax(88px, 25vw);
    --type-xs: 0.68rem;
    --type-sm: 0.74rem;
    --type-md: 0.8rem;
    --time-label-size: 0.72rem;
    --axis-label-size: 0.76rem;
    --chart-label-size: 0.74rem;
  }

  .custom-y-axis-title {
    right: 29px;
  }

  .custom-y-axis-right .custom-y-axis-title {
    left: 24px;
  }

  .custom-y-axis-right {
    display: none;
  }

  .custom-y-tick {
    width: 22px;
  }

  .chart-frame {
    height: clamp(86px, 12vh, 104px);
  }

  .chart-card.temperature {
    padding-top: 20px;
    padding-bottom: 4px;
  }

  .chart-card.temperature + .plot-current-stacked {
    padding-top: 2px;
  }

  .chart-card.discharge {
    padding-bottom: 20px;
  }

  .time-axis-top {
    top: 2px;
  }

  .time-axis-bottom {
    bottom: 2px;
  }

  .axis-labels {
    height: 14px;
  }

  .plot-last-measure-inline {
    display: flex;
    align-items: baseline;
    gap: 0.35em;
    white-space: nowrap;
  }
}

@media (max-width: 360px) {
  .axis-label {
    width: 16px;
  }
}

.custom-y-axis-title,
.custom-y-tick,
.plot-current-heading h3,
.plot-current-heading .readout-live-time,
.plot-last-measure-chart,
.plot-last-measure-inline,
.axis-label,
.axis-label.noon {
  color: var(--muted);
  opacity: 1;
}
