:root {
  color-scheme: dark;
  --bg: #f3f7fb;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-soft: rgba(255, 255, 255, 0.48);
  --ink: #202124;
  --muted: #5f6368;
  --quiet: #7d848c;
  --line: rgba(32, 33, 36, 0.1);
  --good: #00843d;
  --warn: #f2a900;
  --bad: #dc241f;
  --dlr: #00afad;
  --jubilee: #a0a5a9;
  --district: #00782a;
  --circle: #ffd329;
  --central: #dc241f;
  --elizabeth: #6950a1;
  --windrush: #ef7b10;
  --bus: #e32017;
  --tfl-blue: #0019a8;
  --weather: #0072ce;
  --news: #bb1919;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  font-family: "Open Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-weight: 400;
}

.weather-scene {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  --day-opacity: 1;
  --twilight-opacity: 0;
  --sun-x: 78%;
  background:
    radial-gradient(circle at 78% 13%, rgba(255, 255, 255, 0.34), transparent 7%),
    radial-gradient(circle at 24% 18%, rgba(73, 112, 180, 0.28), transparent 30%),
    linear-gradient(180deg, #101827 0%, #17243a 48%, #25354d 100%);
  transition: background 700ms ease;
}

.weather-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(202, 230, 255, 0.96) 0%, rgba(237, 246, 252, 0.94) 42%, rgba(244, 248, 252, 1) 100%);
  opacity: var(--day-opacity);
  transition: opacity 30s linear;
}

.weather-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at var(--sun-x) 18%, rgba(255, 174, 92, 0.58), transparent 24%),
    linear-gradient(180deg, rgba(38, 60, 96, 0.64) 0%, rgba(255, 194, 133, 0.5) 42%, rgba(244, 248, 252, 0.72) 100%),
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.28) 0 1px, transparent 2px),
    radial-gradient(circle at 52% 22%, rgba(255, 255, 255, 0.2) 0 1px, transparent 2px),
    radial-gradient(circle at 84% 30%, rgba(255, 255, 255, 0.28) 0 1px, transparent 2px);
  opacity: var(--twilight-opacity);
  transition: opacity 30s linear;
}

.weather-scene[data-mode="rain"] {
  background:
    linear-gradient(180deg, rgba(111, 135, 153, 0.92) 0%, rgba(220, 227, 232, 0.96) 48%, rgba(246, 248, 252, 1) 100%);
}

.weather-scene[data-mode="cold"] {
  background:
    linear-gradient(180deg, rgba(183, 218, 244, 0.92) 0%, rgba(236, 246, 252, 0.96) 48%, rgba(246, 248, 252, 1) 100%);
}

.weather-scene[data-time="night"],
.weather-scene[data-time="late-night"] {
  background:
    radial-gradient(circle at 78% 13%, rgba(255, 255, 255, 0.34), transparent 7%),
    radial-gradient(circle at 24% 18%, rgba(73, 112, 180, 0.28), transparent 30%),
    linear-gradient(180deg, #101827 0%, #17243a 48%, #25354d 100%);
}

.weather-scene[data-time="night"]::after,
.weather-scene[data-time="late-night"]::after {
  opacity: var(--twilight-opacity);
}

body[data-time="night"],
body[data-time="late-night"] {
  color: #f6f8fb;
}

body[data-time="night"] .hero-panel,
body[data-time="night"] .tile,
body[data-time="late-night"] .hero-panel,
body[data-time="late-night"] .tile {
  border-color: rgba(255, 255, 255, 0.16);
}

body[data-time="night"] h1,
body[data-time="night"] .clock-time,
body[data-time="night"] .clock-date,
body[data-time="night"] .greeting,
body[data-time="night"] .destination,
body[data-time="night"] .headline,
body[data-time="night"] .line-name,
body[data-time="night"] .station-labels span:nth-child(2),
body[data-time="late-night"] h1,
body[data-time="late-night"] .clock-time,
body[data-time="late-night"] .clock-date,
body[data-time="late-night"] .greeting,
body[data-time="late-night"] .destination,
body[data-time="late-night"] .headline,
body[data-time="late-night"] .line-name,
body[data-time="late-night"] .station-labels span:nth-child(2) {
  color: #f6f8fb;
}

body[data-time="night"] .muted,
body[data-time="night"] .updated,
body[data-time="night"] .advice-reason,
body[data-time="night"] .metric-label,
body[data-time="night"] .line-state,
body[data-time="night"] .station-labels,
body[data-time="night"] .map-legend,
body[data-time="late-night"] .muted,
body[data-time="late-night"] .updated,
body[data-time="late-night"] .advice-reason,
body[data-time="late-night"] .metric-label,
body[data-time="late-night"] .line-state,
body[data-time="late-night"] .station-labels,
body[data-time="late-night"] .map-legend {
  color: rgba(246, 248, 251, 0.72);
}

body[data-time="night"] .metric-stack > div,
body[data-time="night"] .status-pill,
body[data-time="night"] .all-good,
body[data-time="late-night"] .metric-stack > div,
body[data-time="late-night"] .status-pill,
body[data-time="late-night"] .all-good {
  background: rgba(255, 255, 255, 0.12);
}

body[data-time="night"] .metric-stack strong,
body[data-time="late-night"] .metric-stack strong {
  color: #f6f8fb;
}

.weather-scene[data-time="morning"] {
  background:
    radial-gradient(circle at 78% 13%, rgba(255, 255, 255, 0.34), transparent 7%),
    radial-gradient(circle at 24% 18%, rgba(73, 112, 180, 0.28), transparent 30%),
    linear-gradient(180deg, #101827 0%, #17243a 48%, #25354d 100%);
}

.weather-scene[data-time="dawn"] {
  background:
    radial-gradient(circle at 78% 13%, rgba(255, 255, 255, 0.34), transparent 7%),
    radial-gradient(circle at 24% 18%, rgba(73, 112, 180, 0.28), transparent 30%),
    linear-gradient(180deg, #101827 0%, #17243a 48%, #25354d 100%);
}

.weather-scene[data-time="dusk"] {
  background:
    radial-gradient(circle at 78% 13%, rgba(255, 255, 255, 0.34), transparent 7%),
    radial-gradient(circle at 24% 18%, rgba(73, 112, 180, 0.28), transparent 30%),
    linear-gradient(180deg, #101827 0%, #17243a 48%, #25354d 100%);
}

.sky-glow,
.cloud {
  position: absolute;
  pointer-events: none;
}

.sky-glow {
  top: -12vh;
  right: -26vw;
  width: 78vw;
  height: 42vh;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 248, 203, 0.68), rgba(255, 248, 203, 0.16) 48%, transparent 72%);
  filter: blur(18px);
}

.cloud {
  width: 58vw;
  height: 16vh;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  filter: blur(22px);
}

.cloud-one {
  top: 9vh;
  left: -20vw;
  animation: drift 38s ease-in-out infinite alternate;
}

.cloud-two {
  top: 29vh;
  right: -24vw;
  opacity: 0.58;
  animation: drift 45s ease-in-out infinite alternate-reverse;
}

.rain-field {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 450ms ease;
}

.weather-scene[data-mode="rain"] .rain-field {
  opacity: 0.55;
}

.drop {
  position: absolute;
  top: -12vh;
  width: 1px;
  height: 64px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(231, 245, 255, 0.86));
  animation: rain 980ms linear infinite;
}

@keyframes rain {
  to {
    transform: translate3d(-18vw, 116vh, 0);
  }
}

@keyframes drift {
  to {
    transform: translateX(9vw);
  }
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto auto auto 1fr auto;
  gap: 0;
  width: min(100vw, 820px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(8px, 1.1vh, 16px) clamp(18px, 3vw, 38px) clamp(18px, 2.4vh, 32px);
}

.hero-panel,
.tile {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.tile::before {
  display: none;
}

.hero-panel {
  --accent: var(--dlr);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(18px, 3vw, 32px);
  align-items: center;
  padding: clamp(6px, 1vh, 14px) 0 clamp(14px, 2vh, 24px);
  border-bottom: 1px solid rgba(32, 33, 36, 0.1);
}

.weather-tile {
  --accent: var(--weather);
}

.departures-tile {
  --accent: var(--dlr);
}

.status-tile {
  --accent: var(--tfl-blue);
}

.bus-tile {
  --accent: var(--bus);
}

.news-tile {
  --accent: var(--news);
}

.studio-clock {
  width: clamp(96px, 12vh, 136px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.clock-face {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.82) 0 56%, transparent 57%),
    conic-gradient(from 0deg, rgba(32, 33, 36, 0.42) 0 1deg, transparent 1deg 30deg);
  border: 2px solid rgba(32, 33, 36, 0.18);
  box-shadow: 0 18px 38px rgba(42, 62, 82, 0.12);
}

.clock-face::before {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border: 1px solid rgba(32, 33, 36, 0.06);
}

.tick,
.hand,
.clock-pin {
  position: absolute;
  left: 50%;
  top: 50%;
}

.tick {
  width: 2px;
  height: 10px;
  border-radius: 999px;
  background: rgba(32, 33, 36, 0.36);
}

.tick-12 {
  top: 8%;
  transform: translateX(-50%);
}

.tick-3 {
  left: auto;
  right: 8%;
  transform: translateY(-50%) rotate(90deg);
}

.tick-6 {
  top: auto;
  bottom: 8%;
  transform: translateX(-50%);
}

.tick-9 {
  left: 8%;
  transform: translateY(-50%) rotate(90deg);
}

.hand {
  top: auto;
  bottom: 50%;
  width: 4px;
  border-radius: 999px;
  background: #202124;
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(0deg);
}

.hour-hand {
  height: 25%;
}

.minute-hand {
  height: 36%;
  width: 3px;
  background: #3c4043;
}

.second-hand {
  height: 40%;
  width: 1.5px;
  background: #ff3b30;
}

.clock-pin {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff3b30;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
}

.clock-time {
  display: block;
  color: #202124;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Open Sans", sans-serif;
  font-size: clamp(3.95rem, 10.7vh, 7rem);
  font-weight: 200;
  line-height: 0.88;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

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

.greeting {
  margin-bottom: 5px;
  color: rgba(32, 33, 36, 0.62);
  font-size: clamp(1rem, 1.8vh, 1.28rem);
  font-weight: 400;
}

.clock-date {
  margin-top: 8px;
  color: var(--muted);
  font-size: clamp(1.35rem, 2.8vh, 2rem);
  font-weight: 400;
}

.leave-advice {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.advice-label {
  min-width: 156px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: #fff;
  color: var(--good);
  font-size: clamp(1.16rem, 2.35vh, 1.7rem);
  font-weight: 450;
  text-align: center;
  transition: color 260ms ease, background-color 260ms ease, transform 260ms ease;
}

.advice-label.green {
  color: var(--good);
}

.advice-label.amber {
  color: #9a6500;
  background: #fff8e7;
}

.advice-label.red {
  color: var(--bad);
  background: #fff1f0;
}

.advice-reason {
  color: var(--muted);
  font-size: clamp(0.98rem, 1.75vh, 1.25rem);
  line-height: 1.28;
}

.tile {
  min-width: 0;
  padding: clamp(15px, 1.9vh, 23px) 0;
  border-bottom: 1px solid rgba(32, 33, 36, 0.08);
  background: transparent;
}

.tile-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 10px;
  padding-bottom: 0;
  border-bottom: 0;
}

h1 {
  margin: 0;
  color: #202124;
  font-size: clamp(0.98rem, 1.7vh, 1.18rem);
  font-weight: 500;
  letter-spacing: 0;
}

h1::before {
  content: "";
  display: inline-block;
  width: 0.58em;
  height: 0.58em;
  margin-right: 0.42em;
  border-radius: 999px;
  background: var(--accent, var(--weather));
  vertical-align: 0.02em;
}

.updated,
.system-strip {
  color: var(--quiet);
  font-size: clamp(0.74rem, 1.15vh, 0.92rem);
  font-weight: 400;
  white-space: nowrap;
}

.weather-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(176px, 0.95fr);
  gap: 18px;
  align-items: center;
}

.temperature {
  color: #071015;
  font-size: clamp(3.7rem, 8.7vh, 6.2rem);
  font-weight: 300;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--muted);
  font-size: clamp(0.98rem, 1.8vh, 1.26rem);
  font-weight: 400;
}

.metric-stack {
  display: grid;
  gap: 8px;
}

.metric-stack > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
}

.metric-label {
  color: var(--muted);
  font-size: clamp(0.86rem, 1.45vh, 1rem);
  font-weight: 400;
}

.metric-stack strong {
  color: #10202b;
  font-size: clamp(1rem, 1.9vh, 1.28rem);
  font-weight: 450;
  font-variant-numeric: tabular-nums;
}

.status-pill,
.inline-warning,
.all-good {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 999px;
  border-left: 0;
  background: rgba(255, 255, 255, 0.5);
  font-size: clamp(0.96rem, 1.7vh, 1.16rem);
  font-weight: 400;
}

.status-pill.neutral,
.all-good {
  color: var(--muted);
}

.status-pill.green,
.all-good.green {
  color: var(--good);
  background: #edf8f1;
}

.status-pill.amber,
.inline-warning,
.all-good.amber {
  color: #9a6500;
  background: #fff8e7;
}

.status-pill.red {
  color: var(--bad);
  background: #fff1f0;
}

.departure-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.departure-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid rgba(32, 33, 36, 0.07);
  animation: rowIn 360ms ease both;
}

.departure-row:first-child {
  border-top: 0;
}

.destination {
  min-width: 0;
  overflow: hidden;
  color: #202124;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(1.42rem, 2.9vh, 2rem);
  font-weight: 400;
}

.minutes {
  color: var(--dlr);
  font-size: clamp(1.18rem, 2.45vh, 1.68rem);
  font-weight: 450;
  font-variant-numeric: tabular-nums;
}

.bus-tile .minutes {
  color: var(--bus);
}

.bus-row {
  align-items: center;
}

.bus-row .destination {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bus-badge {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  background: var(--bus);
  color: #fff;
  font-size: clamp(1rem, 1.9vh, 1.28rem);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.14);
}

.bus-destination {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-list .departure-row {
  padding: 8px 0;
}

.compact-list .destination,
.compact-list .minutes {
  font-size: clamp(1.18rem, 2.2vh, 1.48rem);
}

.mini-map {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(32, 33, 36, 0.07);
}

.dlr-track-map {
  display: grid;
  gap: 7px;
}

.dlr-track-line {
  position: relative;
  height: 48px;
}

.dlr-track-line::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 50%;
  height: 5px;
  border-radius: 999px;
  background: rgba(0, 175, 173, 0.28);
  transform: translateY(-50%);
}

.station-marker {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 17px;
  height: 17px;
  border: 4px solid var(--dlr);
  border-radius: 50%;
  background: #f3f7fb;
  transform: translate(-50%, -50%);
}

.station-marker.current {
  width: 22px;
  height: 22px;
  background: var(--dlr);
  box-shadow: 0 0 0 7px rgba(0, 175, 173, 0.14);
  animation: stationPulse 1.8s ease-in-out infinite;
}

.train-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 24px;
  height: 24px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--dlr);
  box-shadow: 0 8px 18px rgba(0, 92, 92, 0.22);
  transform: translate(-50%, -50%);
  transition: left 1.2s linear;
  animation: arrowPulse 1.7s ease-in-out infinite;
}

.train-arrow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: translate(-62%, -50%) rotate(45deg);
}

.train-arrow.westbound::before {
  transform: translate(-38%, -50%) rotate(225deg);
}

.train-arrow::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--dlr);
  font-size: 0.68rem;
  font-weight: 500;
  transform: translateX(-50%);
}

.train-arrow.eastbound {
  animation: arrowPulse 1.7s ease-in-out infinite;
}

.train-arrow.westbound {
  animation: arrowPulse 1.7s ease-in-out infinite;
}

.train-arrow.is-new {
  animation: trainPop 360ms ease both, arrowPulse 1.7s ease-in-out infinite;
}

.train-arrow.leaving {
  opacity: 0;
  transition: opacity 300ms ease;
}

.dlr-track-line::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 0 3px var(--dlr),
    0 0 0 9px rgba(0, 175, 173, 0.12);
  transform: translate(-50%, -50%);
  animation: stationPulse 1.8s ease-in-out infinite;
}

.station-labels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  color: rgba(32, 33, 36, 0.62);
  font-size: clamp(0.74rem, 1.15vh, 0.9rem);
}

.station-labels span:nth-child(2) {
  text-align: center;
  color: #202124;
}

.station-labels span:nth-child(3) {
  text-align: right;
}

.map-legend {
  display: flex;
  gap: 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: clamp(0.72rem, 1.08vh, 0.84rem);
  white-space: nowrap;
}

.map-legend span {
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes trainPop {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes arrowPulse {
  0%,
  100% {
    box-shadow: 0 8px 18px rgba(0, 92, 92, 0.22), 0 0 0 0 rgba(0, 175, 173, 0.22);
  }
  50% {
    box-shadow: 0 8px 18px rgba(0, 92, 92, 0.22), 0 0 0 8px rgba(0, 175, 173, 0);
  }
}

@keyframes stationPulse {
  0%,
  100% {
    box-shadow: 0 0 0 6px rgba(0, 175, 173, 0.12);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(0, 175, 173, 0);
  }
}

.status-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 0;
  margin-top: 10px;
}

.line-status {
  --line-colour: var(--muted);
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 31px;
  padding: 5px 0;
  border-radius: 0;
  background: transparent;
  border-top: 1px solid rgba(32, 33, 36, 0.07);
  animation: rowIn 360ms ease both;
}

.line-status::before {
  content: "";
  width: 5px;
  height: 100%;
  min-height: 22px;
  border-radius: 0 999px 999px 0;
  background: var(--line-colour);
}

.line-status.line-dlr {
  --line-colour: var(--dlr);
}

.line-status.line-jubilee {
  --line-colour: var(--jubilee);
}

.line-status.line-bakerloo {
  --line-colour: #b36305;
}

.line-status.line-district {
  --line-colour: var(--district);
}

.line-status.line-circle {
  --line-colour: var(--circle);
}

.line-status.line-central {
  --line-colour: var(--central);
}

.line-status.line-elizabeth {
  --line-colour: var(--elizabeth);
}

.line-status.line-hammersmith-city {
  --line-colour: #f3a9bb;
}

.line-status.line-liberty {
  --line-colour: #61686b;
}

.line-status.line-lioness {
  --line-colour: #ffa600;
}

.line-status.line-metropolitan {
  --line-colour: #9b0056;
}

.line-status.line-mildmay {
  --line-colour: #006fe6;
}

.line-status.line-northern {
  --line-colour: #000;
}

.line-status.line-piccadilly {
  --line-colour: #0019a8;
}

.line-status.line-suffragette {
  --line-colour: #18a95d;
}

.line-status.line-victoria {
  --line-colour: #0098d4;
}

.line-status.line-waterloo-city {
  --line-colour: #95cdba;
}

.line-status.line-weaver {
  --line-colour: #9b641b;
}

.line-status.line-windrush {
  --line-colour: var(--windrush);
}

.line-name {
  overflow: hidden;
  color: #202124;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(0.8rem, 1.25vh, 0.95rem);
  font-weight: 400;
}

.line-state {
  color: var(--muted);
  font-size: clamp(0.72rem, 1.08vh, 0.84rem);
  font-weight: 450;
}

.line-status.green .line-state {
  color: var(--good);
}

.line-status.amber .line-state {
  color: #9a6500;
}

.line-status.red .line-state {
  color: var(--bad);
}

.headline-panel {
  --thumb-size: clamp(46px, 6vh, 62px);
  display: grid;
  grid-template-columns: var(--thumb-size) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: clamp(58px, 6.6vh, 82px);
}

.headline {
  display: flex;
  align-items: center;
  min-height: 0;
  color: #202124;
  font-size: clamp(1rem, 1.85vh, 1.34rem);
  font-weight: 400;
  line-height: 1.22;
}

.headline-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 5px 14px rgba(32, 33, 36, 0.12);
  clip-path: inset(0 0 0 0);
}

.news-tile .tile-header {
  border-bottom-color: rgba(187, 25, 25, 0.2);
}

.news-tile .headline-panel {
  position: relative;
  overflow: hidden;
  border-left: 3px solid var(--news);
  padding-left: 10px;
}

.news-tile .headline-panel::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: clamp(46px, 6vh, 62px);
  border-radius: 10px;
  background: var(--news);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

.headline-panel.headline-animate::after {
  animation: none;
}

.headline-panel.headline-animate .headline {
  animation: headlineTextReveal 1720ms ease both;
}

.headline-panel.headline-animate .headline-image {
  animation: headlineImageSwipe 1720ms ease both;
}

.system-strip {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 20px;
  color: rgba(16, 32, 43, 0.62);
}

.warning-flag {
  color: #8a5400;
}

.loading-row {
  color: var(--muted);
  font-size: clamp(1rem, 1.8vh, 1.22rem);
  font-weight: 400;
}

.changed {
  animation: changedPulse 620ms ease;
}

.headline.changed {
  animation: none;
}

.hidden {
  display: none;
}

@keyframes rowIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes changedPulse {
  0% {
    background-color: rgba(0, 114, 206, 0.18);
    transform: translateY(-1px);
  }
  100% {
    background-color: transparent;
    transform: translateY(0);
  }
}

@keyframes headlineChange {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes headlineImageWipe {
  0% {
    opacity: 0.95;
    transform: scaleX(0);
  }
  42% {
    opacity: 0.95;
    transform: scaleX(1);
  }
  100% {
    opacity: 0;
    transform: scaleX(1);
  }
}

@keyframes headlineTextReveal {
  0%,
  42% {
    opacity: 0;
    clip-path: inset(0 0 0 100%);
    transform: translateX(8px);
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translateX(0);
  }
}

@keyframes headlineImageSwipe {
  0% {
    opacity: 1;
    transform: translateX(calc(100vw - var(--thumb-size))) scale(1.02);
    clip-path: inset(0 0 0 0);
  }
  48% {
    opacity: 1;
    transform: translateX(0) scale(1.02);
    clip-path: inset(0 0 0 0);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
    clip-path: inset(0 0 0 0);
  }
}

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

@media (orientation: landscape) {
  body {
    overflow: auto;
  }

  .dashboard {
    width: min(100vw, 1180px);
    grid-template-columns: 1.05fr 0.95fr;
    grid-template-rows: auto auto auto auto;
  }

  .hero-panel,
  .weather-tile,
  .news-tile {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  body {
    overflow: auto;
  }

  .dashboard {
    padding: 12px;
  }

  .leave-advice,
  .weather-grid,
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .studio-clock {
    width: 118px;
  }

  .advice-label {
    min-width: 0;
  }
}
