:root {
  color-scheme: light;
  --pi-bg: #edf3f7;
  --pi-bg-soft: #f7f9fb;
  --pi-surface: #fbfcfd;
  --pi-card: rgba(255, 255, 255, 0.92);
  --pi-card-strong: #ffffff;
  --pi-border: rgba(94, 113, 132, 0.18);
  --pi-border-soft: rgba(94, 113, 132, 0.12);
  --pi-text: #14202b;
  --pi-heading: #0f1b26;
  --pi-muted: #637284;
  --pi-soft: #8795a5;
  --pi-accent: #327f8f;
  --pi-accent-2: #466fbb;
  --pi-warn: #b86b35;
  --pi-route: #f4c542;
  --pi-page-glow: rgba(255, 255, 255, 0.88);
  --pi-screen-overlay: linear-gradient(160deg, rgba(255, 255, 255, 0.84), rgba(239, 246, 250, 0.9));
  --pi-radius-xl: 36px;
  --pi-radius-lg: 26px;
  --pi-radius-md: 18px;
  --pi-shadow-soft: 0 24px 60px rgba(50, 71, 94, 0.14);
  --pi-shadow-card: 0 14px 34px rgba(50, 71, 94, 0.11);

  /* Legacy aliases used by older rules and future theme migrations. */
  --bg: var(--pi-bg);
  --surface: var(--pi-surface);
  --panel: var(--pi-card);
  --panel-strong: var(--pi-card-strong);
  --text: var(--pi-text);
  --muted: var(--pi-muted);
  --line: var(--pi-border);
  --accent: var(--pi-accent);
  --accent-2: var(--pi-accent-2);
  --warn: var(--pi-warn);
}

html[data-pi-theme="dark"] {
  color-scheme: dark;
  --pi-bg: #18212b;
  --pi-bg-soft: #202b36;
  --pi-surface: #263342;
  --pi-card: rgba(35, 47, 61, 0.92);
  --pi-card-strong: #2d3c4d;
  --pi-border: rgba(198, 211, 224, 0.16);
  --pi-border-soft: rgba(198, 211, 224, 0.1);
  --pi-text: #ecf3f8;
  --pi-heading: #ffffff;
  --pi-muted: #aebdca;
  --pi-soft: #8194a7;
  --pi-accent: #73c8d8;
  --pi-accent-2: #91aef2;
  --pi-warn: #f0b66d;
  --pi-route: #f4d76d;
  --pi-page-glow: rgba(105, 132, 158, 0.22);
  --pi-screen-overlay: linear-gradient(160deg, rgba(44, 59, 74, 0.88), rgba(23, 32, 42, 0.94));
  --pi-shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.3);
  --pi-shadow-card: 0 16px 40px rgba(0, 0, 0, 0.28);
}

html[data-pi-theme="black"] {
  color-scheme: dark;
  --pi-bg: #000000;
  --pi-bg-soft: #050608;
  --pi-surface: #080b0f;
  --pi-card: rgba(11, 15, 20, 0.96);
  --pi-card-strong: #101720;
  --pi-border: rgba(230, 238, 246, 0.14);
  --pi-border-soft: rgba(230, 238, 246, 0.08);
  --pi-text: #f3f8fb;
  --pi-heading: #ffffff;
  --pi-muted: #b1bfcb;
  --pi-soft: #748595;
  --pi-accent: #5fd2c8;
  --pi-accent-2: #86a8ff;
  --pi-warn: #ffbf75;
  --pi-route: #f9db5a;
  --pi-page-glow: rgba(72, 99, 122, 0.12);
  --pi-screen-overlay: linear-gradient(160deg, rgba(12, 17, 23, 0.94), rgba(0, 0, 0, 0.98));
  --pi-shadow-soft: none;
  --pi-shadow-card: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  min-width: 0;
  min-height: 0;
  background:
    radial-gradient(circle at 18% 12%, var(--pi-page-glow) 0, transparent 34%),
    linear-gradient(135deg, var(--pi-bg-soft), var(--pi-bg));
  color: var(--pi-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pi-viewport {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 12%, var(--pi-page-glow) 0, transparent 34%),
    linear-gradient(135deg, var(--pi-bg-soft), var(--pi-bg));
}

.pi-scale-shell {
  width: var(--pi-scaled-width, 1920px);
  height: var(--pi-scaled-height, 1200px);
  position: relative;
  overflow: visible;
}

.pi-screen {
  --gap: var(--pi-grid-column-gap, 26px);
  --zone-column-gap: var(--pi-grid-column-gap, var(--gap));
  --zone-row-gap: var(--pi-grid-row-gap, var(--gap));
  --card-padding: 34px;
  --card-gap: 22px;
  --tile-gap: 12px;
  --row-padding: 12px;
  --body-text: 25px;
  --small-text: 18px;
  --title-text: 34px;
  position: relative;
  width: var(--pi-canvas-width, 1920px);
  height: var(--pi-canvas-height, 1200px);
  padding: var(--pi-grid-padding-y, 38px) var(--pi-grid-padding-x, 38px);
  background:
    var(--pi-screen-overlay),
    var(--pi-bg);
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: var(--gap);
  overflow: hidden;
  transform: scale(var(--pi-scale-x, 1), var(--pi-scale-y, 1));
  transform-origin: top left;
  will-change: transform;
}

.pi-debug-overlay {
  position: fixed;
  z-index: 1000;
  top: 14px;
  left: 14px;
  max-width: min(420px, calc(100vw - 28px));
  padding: 12px 14px;
  border: 1px solid rgba(20, 32, 43, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 36px rgba(20, 32, 43, 0.16);
  color: var(--pi-heading);
  font: 700 14px/1.35 "IBM Plex Mono", "JetBrains Mono", Consolas, monospace;
  white-space: pre-wrap;
  pointer-events: none;
}

.pi-debug-overlay[hidden] {
  display: none;
}

.lcd-video-override {
  position: fixed;
  z-index: 900;
  inset: 0;
  overflow: hidden;
  background: #000;
}

.lcd-video-override[hidden] {
  display: none;
}

.lcd-video-override video {
  display: block;
  width: 100vw;
  height: 100vh;
  background: #000;
}

.lcd-video-fit-cover video {
  object-fit: cover;
}

.lcd-video-fit-contain video {
  object-fit: contain;
}

.lcd-video-fit-fill video {
  object-fit: fill;
}

.lcd-video-status {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 18px;
  font-weight: 760;
  text-align: center;
}

.lcd-video-status[hidden] {
  display: none;
}

.pi-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 72% 0%, rgba(70, 111, 187, 0.08), transparent 36%),
    radial-gradient(circle at 2% 100%, rgba(50, 127, 143, 0.08), transparent 34%);
}

.pi-screen.density-spacious {
  --gap: var(--pi-grid-column-gap, 32px);
  --zone-column-gap: var(--pi-grid-column-gap, var(--gap));
  --zone-row-gap: var(--pi-grid-row-gap, var(--gap));
  --card-padding: 40px;
  --card-gap: 26px;
  --tile-gap: 14px;
  --row-padding: 14px;
  --body-text: 27px;
  --small-text: 19px;
  --title-text: 36px;
}

.pi-screen.density-compact {
  --gap: var(--pi-grid-column-gap, 14px);
  --zone-column-gap: var(--pi-grid-column-gap, var(--gap));
  --zone-row-gap: var(--pi-grid-row-gap, var(--gap));
  --card-padding: 22px;
  --card-gap: 14px;
  --tile-gap: 8px;
  --row-padding: 8px;
  --body-text: 21px;
  --small-text: 14px;
  --title-text: 28px;
}

/* The kiosk display should be all widgets; the hidden debug state remains for SSE updates. */
.pi-header {
  display: none;
}

.pi-header h1,
.pi-header-meta,
.state-debug,
.state-debug strong {
  color: inherit;
}

.kicker,
.zone-label,
.zone-service-id {
  color: var(--pi-soft);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.zone-service-id {
  color: var(--pi-muted);
  opacity: 0.58;
}

html[data-pi-mode="work"] {
  --pi-accent: #287c70;
  --pi-accent-2: #336fb2;
}

html[data-pi-mode="family"] {
  --pi-accent: #9a6a2f;
  --pi-accent-2: #327f8f;
}

html[data-pi-mode="news"] {
  --pi-accent: #5268a8;
  --pi-accent-2: #327f8f;
}

html[data-pi-sleep="1"] .pi-screen {
  filter: saturate(0.6) brightness(0.74);
}

.builder-warning-strip {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: 46px;
  right: 46px;
  display: flex;
  gap: 12px;
  color: var(--pi-warn);
  font-size: 14px;
  font-weight: 800;
  pointer-events: none;
}

.pi-zone-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--pi-grid-columns, repeat(3, minmax(0, 1fr)) 510px);
  grid-template-rows: var(--pi-grid-rows, minmax(0, 1fr) 330px);
  grid-template-areas: var(--pi-grid-areas, "hero hero hero sidebar-top" "lower-left lower-middle lower-right sidebar-bottom");
  column-gap: var(--zone-column-gap);
  row-gap: var(--zone-row-gap);
  min-height: 0;
}

.zone-hero { grid-area: hero; }
.zone-sidebar-top { grid-area: sidebar-top; }
.zone-sidebar-bottom { grid-area: sidebar-bottom; }
.zone-lower-left { grid-area: lower-left; }
.zone-lower-middle { grid-area: lower-middle; }
.zone-lower-right { grid-area: lower-right; }

.zone-card {
  background: var(--pi-card);
  border: 1px solid var(--pi-border);
  border-radius: var(--pi-radius-xl);
  box-shadow: var(--pi-shadow-card);
  padding: var(--card-padding);
  overflow: hidden;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: var(--card-gap);
}

.zone-card-header {
  display: block;
}

.zone-card h2 {
  margin: 0;
  color: var(--pi-heading);
  font-size: var(--title-text);
  font-weight: 780;
  line-height: 1.05;
}

.zone-hero.zone-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 252, 253, 0.94));
  box-shadow: var(--pi-shadow-soft);
}

.primary-text {
  color: var(--pi-heading);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.14;
}

.secondary-text {
  margin-top: 8px;
  color: var(--pi-muted);
  font-size: var(--small-text);
  font-weight: 620;
  line-height: 1.35;
}

.empty-state,
.empty-zone {
  color: var(--pi-soft);
  font-size: 24px;
  font-weight: 720;
}

.empty-zone {
  display: grid;
  place-items: center;
  min-height: 0;
  background: rgba(255, 255, 255, 0.48);
  border: 1px dashed var(--pi-border);
  border-radius: var(--pi-radius-lg);
}

.weather-service,
.calendar-service,
.list-service,
.subway-service,
.feature-service,
.news-service,
.message-service,
.image-service {
  min-height: 0;
  overflow: hidden;
}

.weather-service {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 16px;
}

.weather-current {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 26px;
  padding-bottom: 4px;
}

.weather-temp {
  color: var(--pi-accent-2);
  font-size: 96px;
  font-weight: 850;
  line-height: 0.9;
  letter-spacing: 0;
  white-space: nowrap;
}

.weather-current-copy {
  min-width: 0;
  padding-bottom: 7px;
}

.weather-current-copy .primary-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.weather-current-copy .secondary-text {
  margin-top: 9px;
}

.weather-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 2px 0 8px;
  border-bottom: 1px solid var(--pi-border-soft);
}

.weather-metric {
  min-width: 0;
  padding: 4px 16px 7px;
  border-left: 1px solid var(--pi-border-soft);
}

.weather-metric:first-child {
  border-left: 0;
  padding-left: 0;
}

.weather-metric strong,
.section-title {
  display: block;
  color: var(--pi-accent);
  font-size: 13px;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.weather-metric span {
  display: block;
  margin-top: 4px;
  color: var(--pi-heading);
  font-size: 21px;
  font-weight: 760;
  white-space: nowrap;
}

.weather-context {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 0;
  min-width: 0;
  padding: 0 0 3px;
  color: var(--pi-muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
}

.weather-context span {
  white-space: nowrap;
}

.weather-context span + span {
  margin-left: 11px;
  padding-left: 11px;
  border-left: 1px solid var(--pi-border-soft);
}

.weather-section {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.weather-forecast-section {
  flex: 1 1 auto;
}

.weather-hourly-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 0;
  min-height: 0;
  overflow: hidden;
  background: rgba(239, 246, 250, 0.55);
  border: 1px solid var(--pi-border-soft);
  border-radius: var(--pi-radius-lg);
}

.weather-hour {
  min-width: 0;
  padding: 12px 13px;
  text-align: center;
  border-left: 1px solid rgba(94, 113, 132, 0.1);
}

.weather-hour:first-child {
  border-left: 0;
}

.weather-hour strong,
.weather-forecast-row strong {
  display: block;
  color: var(--pi-accent);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.weather-hour span {
  display: block;
  margin-top: 5px;
  color: var(--pi-heading);
  font-size: 23px;
  font-weight: 800;
}

.weather-forecast-table {
  display: grid;
  grid-auto-rows: minmax(0, 1fr);
  align-content: stretch;
  gap: 0;
  min-height: 0;
  height: 100%;
  border-top: 1px solid var(--pi-border-soft);
}

.weather-forecast-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--pi-border-soft);
}

.weather-forecast-row:last-child {
  border-bottom: 0;
}

.weather-forecast-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-forecast-row span {
  color: var(--pi-heading);
  font-size: 22px;
  font-weight: 780;
  white-space: nowrap;
}

.weather-forecast-row span:last-child {
  color: var(--pi-muted);
}

.service-weather.zone-size-medium .weather-temp {
  font-size: 60px;
}

.service-weather.zone-size-medium h2 {
  font-size: 28px;
}

.service-weather.zone-size-medium .weather-current {
  align-items: center;
  gap: 13px;
  padding-bottom: 0;
}

.service-weather.zone-size-medium .weather-current-copy {
  padding-bottom: 0;
}

.service-weather.zone-size-medium .primary-text {
  font-size: 22px;
  line-height: 1.1;
}

.service-weather.zone-size-medium .weather-metrics {
  grid-template-columns: 1.35fr 1fr 1fr;
  padding: 4px 0 7px;
  border-top: 1px solid var(--pi-border-soft);
}

.service-weather.zone-size-medium .weather-metric {
  padding: 0 11px;
  border-top: 0;
  border-left: 1px solid var(--pi-border-soft);
}

.service-weather.zone-size-medium .weather-metric:first-child {
  border-left: 0;
  padding-left: 0;
}

.service-weather.zone-size-medium .weather-metric strong,
.service-weather.zone-size-medium .section-title {
  font-size: 11px;
}

.service-weather.zone-size-medium .weather-metric span {
  margin-top: 2px;
  font-size: 17px;
  font-weight: 760;
}

.service-weather.zone-size-medium .weather-context {
  padding-bottom: 1px;
  font-size: 12px;
  line-height: 1.1;
}

.service-weather.zone-size-medium .weather-context span + span {
  margin-left: 7px;
  padding-left: 7px;
}

.service-weather.zone-size-medium .weather-hourly-strip {
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  background: transparent;
  border-width: 1px 0;
  border-color: var(--pi-border-soft);
  border-radius: 0;
}

.service-weather.zone-size-medium .weather-hour {
  display: block;
  padding: 7px 8px;
  text-align: center;
  border-top: 0;
  border-left: 1px solid rgba(94, 113, 132, 0.12);
}

.service-weather.zone-size-medium .weather-hour:first-child {
  border-left: 0;
}

.service-weather.zone-size-medium .weather-hour strong {
  font-size: 11px;
}

.service-weather.zone-size-medium .weather-hour span {
  margin-top: 2px;
  font-size: 17px;
}

.service-weather.zone-size-medium .weather-forecast-section {
  flex: 0 0 auto;
}

.service-weather.zone-size-medium .weather-forecast-table {
  height: auto;
  grid-auto-rows: auto;
}

.service-weather.zone-size-medium .weather-forecast-row {
  padding: 4px 0;
  gap: 10px;
}

.service-weather.zone-size-medium .weather-forecast-row strong {
  font-size: 12px;
}

.service-weather.zone-size-medium .weather-forecast-row span {
  font-size: 17px;
}

.service-weather.zone-size-medium .weather-service {
  gap: 9px;
}

.service-weather.zone-size-medium .weather-section {
  gap: 5px;
}

.service-weather.zone-size-small .weather-service {
  gap: 12px;
}

.service-weather.zone-size-small .weather-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-weather.zone-size-small .weather-hourly-section,
.service-weather.zone-size-small .weather-forecast-section {
  display: none;
}

.weather-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(237, 243, 247, 0.74));
  border: 1px solid var(--pi-border-soft);
}

.weather-icon svg {
  width: 82%;
  height: 82%;
  display: block;
}

.weather-icon-sun {
  fill: rgba(244, 197, 66, 0.72);
}

.weather-icon-cloud {
  fill: rgba(70, 111, 187, 0.18);
  stroke: rgba(70, 111, 187, 0.58);
  stroke-width: 4;
  stroke-linejoin: round;
}

.weather-hour small {
  display: block;
  margin-top: 2px;
  color: var(--pi-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.weather-forecast-temps {
  justify-self: end;
  color: var(--pi-heading);
  font-weight: 790;
}

.weather-forecast-desc {
  min-width: 0;
  color: var(--pi-muted);
  font-weight: 680;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-weather .weather-layout-tall {
  gap: 10px;
}

.service-weather .weather-layout-tall .weather-current {
  grid-template-columns: 54px auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding-bottom: 0;
}

.service-weather .weather-layout-tall .weather-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
}

.service-weather .weather-layout-tall .weather-temp {
  font-size: 58px;
}

.service-weather .weather-layout-tall .weather-current-copy {
  padding-bottom: 0;
}

.service-weather .weather-layout-tall .weather-current-copy .primary-text {
  font-size: 21px;
  line-height: 1.12;
}

.service-weather.zone-size-medium .weather-layout-tall .weather-metrics {
  grid-template-columns: 1.35fr 1fr 1fr;
  padding: 3px 0 6px;
}

.service-weather .weather-layout-tall .weather-context {
  padding-bottom: 0;
  font-size: 12px;
}

.service-weather.zone-size-medium .weather-layout-tall .weather-hourly-strip {
  min-height: 54px;
}

.service-weather .weather-layout-tall .weather-hour {
  padding: 6px 5px;
}

.service-weather .weather-layout-tall .weather-hour strong {
  font-size: 11px;
}

.service-weather .weather-layout-tall .weather-hour span {
  margin-top: 1px;
  font-size: 16px;
}

.service-weather .weather-layout-tall .weather-hour small {
  font-size: 10px;
}

.service-weather.zone-size-medium .weather-layout-tall .weather-forecast-section {
  flex: 1 1 auto;
}

.service-weather.zone-size-medium .weather-layout-tall .weather-forecast-table {
  height: 100%;
  grid-auto-rows: minmax(0, 1fr);
}

.service-weather.zone-size-medium .weather-layout-tall .weather-forecast-row {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 5px 0;
}

.service-weather .weather-layout-tall .weather-forecast-row strong {
  font-size: 11px;
}

.service-weather .weather-layout-tall .weather-forecast-desc {
  font-size: 13px;
}

.service-weather .weather-layout-tall .weather-forecast-temps {
  color: var(--pi-heading);
  font-size: 15px;
}

.service-weather .weather-layout-compact .weather-current,
.service-weather .weather-layout-wide .weather-current {
  align-items: center;
}

.service-weather .weather-layout-micro .weather-current {
  align-items: center;
}

.service-weather .weather-layout-micro .weather-metrics,
.service-weather .weather-layout-micro .weather-context,
.service-weather .weather-layout-micro .weather-hourly-section,
.service-weather .weather-layout-micro .weather-forecast-section {
  display: none;
}

.service-weather .weather-layout-hero .weather-current,
.service-weather .weather-layout-full .weather-current {
  grid-template-columns: 88px auto minmax(0, 1fr);
  align-items: center;
}

.service-weather .weather-layout-hero .weather-icon,
.service-weather .weather-layout-full .weather-icon {
  width: 88px;
  height: 88px;
  border-radius: 28px;
}

.service-weather .weather-layout-hero .weather-forecast-row,
.service-weather .weather-layout-full .weather-forecast-row {
  grid-template-columns: 72px minmax(0, 1fr) auto;
}

/* Adaptive Weather contract: these rules consume servicePresentation.js layout modes. */
.weather-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.weather-status-card {
  min-width: 0;
  padding: 9px 11px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(237, 243, 247, 0.68));
  border: 1px solid var(--pi-border-soft);
  border-radius: 16px;
}

.weather-status-card strong {
  display: block;
  color: var(--pi-accent);
  font-size: 12px;
  font-weight: 830;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.weather-status-card span {
  display: block;
  min-width: 0;
  margin-top: 3px;
  color: var(--pi-heading);
  font-size: 18px;
  font-weight: 760;
  line-height: 1.12;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-weather .weather-layout-tall {
  display: grid;
  grid-template-rows: auto auto auto auto max-content;
  align-content: space-between;
  gap: clamp(14px, 1.35vh, 20px);
  height: 100%;
  min-height: 0;
  padding-bottom: clamp(2px, 0.45vh, 6px);
}

.service-weather .weather-layout-tall .weather-current {
  grid-template-columns: clamp(86px, 5.6vw, 108px) auto minmax(0, 1fr);
  gap: clamp(14px, 1.2vw, 20px);
  align-items: center;
  padding: 2px 0 4px;
}

.service-weather .weather-layout-tall .weather-icon {
  width: clamp(86px, 5.6vw, 108px);
  height: clamp(86px, 5.6vw, 108px);
  border-radius: 30px;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.95), rgba(237, 243, 247, 0.74) 72%),
    rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.service-weather .weather-layout-tall .weather-icon svg {
  width: 86%;
  height: 86%;
}

.service-weather .weather-layout-tall .weather-temp {
  font-size: clamp(72px, 4.3vw, 86px);
  letter-spacing: -0.01em;
}

.service-weather .weather-layout-tall .weather-current-copy .primary-text {
  color: var(--pi-heading);
  font-size: clamp(25px, 1.55vw, 31px);
  line-height: 1.08;
}

.service-weather.zone-size-medium .weather-layout-tall .weather-metrics {
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 0;
  padding: clamp(13px, 1.35vh, 17px) 0;
  border-top: 1px solid var(--pi-border-soft);
  border-bottom: 1px solid var(--pi-border-soft);
}

.service-weather .weather-layout-tall .weather-metric {
  padding: 0 clamp(16px, 1.25vw, 22px);
}

.service-weather .weather-layout-tall .weather-metric:first-child {
  padding-left: 0;
}

.service-weather .weather-layout-tall .weather-metric strong,
.service-weather .weather-layout-tall .section-title {
  font-size: 12px;
}

.service-weather .weather-layout-tall .weather-metric span {
  margin-top: 4px;
  font-size: clamp(19px, 1.2vw, 23px);
}

.service-weather .weather-layout-tall .weather-status-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1vh, 14px);
}

.service-weather .weather-layout-tall .weather-status-card {
  padding: clamp(10px, 1vh, 13px) clamp(12px, 1vw, 16px);
  border-radius: 17px;
}

.service-weather .weather-layout-tall .weather-status-card span {
  font-size: clamp(18px, 1.05vw, 21px);
}

.service-weather.zone-size-medium .weather-layout-tall .weather-hourly-strip {
  min-height: auto;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  background:
    linear-gradient(145deg, rgba(237, 243, 247, 0.62), rgba(255, 255, 255, 0.58));
  border: 1px solid var(--pi-border-soft);
  border-radius: 20px;
}

.service-weather .weather-layout-tall .weather-hour {
  padding: clamp(9px, 1vh, 12px) 8px;
}

.service-weather .weather-layout-tall .weather-hour strong {
  font-size: 12px;
}

.service-weather .weather-layout-tall .weather-hour span {
  margin-top: 3px;
  font-size: 21px;
}

.service-weather .weather-layout-tall .weather-hour small {
  margin-top: 3px;
  font-size: 11px;
}

.service-weather.zone-size-medium .weather-layout-tall .weather-forecast-section {
  flex: initial;
  min-height: 0;
}

.service-weather.zone-size-medium .weather-layout-tall .weather-forecast-table {
  height: auto;
  align-content: start;
  grid-auto-rows: minmax(34px, auto);
}

.service-weather.zone-size-medium .weather-layout-tall .weather-forecast-row {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  padding: clamp(5px, 0.75vh, 7px) 0;
}

.service-weather .weather-layout-tall .weather-forecast-row strong {
  font-size: 13px;
}

.service-weather .weather-layout-tall .weather-forecast-desc {
  font-size: 15px;
}

.service-weather .weather-layout-tall .weather-forecast-temps {
  color: var(--pi-heading);
  font-size: 17px;
  font-weight: 790;
}

.density-compact .service-weather .weather-layout-tall {
  gap: 12px;
}

.density-compact .service-weather .weather-layout-tall .weather-icon {
  width: 82px;
  height: 82px;
  border-radius: 26px;
}

.density-compact .service-weather .weather-layout-tall .weather-current {
  grid-template-columns: 82px auto minmax(0, 1fr);
}

.density-compact .service-weather .weather-layout-tall .weather-temp {
  font-size: 68px;
}

.date-strip {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(237, 243, 247, 0.82), rgba(255, 255, 255, 0.68));
  border: 1px solid var(--pi-border-soft);
  border-radius: var(--pi-radius-lg);
}

.date-number {
  min-width: 108px;
  color: var(--pi-accent-2);
  font-size: 108px;
  font-weight: 850;
  line-height: 0.9;
}

.agenda-list {
  display: grid;
  align-content: start;
  gap: 2px;
  margin-top: 20px;
  min-height: 0;
  overflow: hidden;
}

.agenda-row {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
  padding: 12px 0;
  border-bottom: 1px solid var(--pi-border-soft);
}

.agenda-row:last-child,
.list-service li:last-child,
.news-list li:last-child {
  border-bottom: 0;
}

.agenda-time {
  color: var(--pi-accent);
  font-size: 22px;
  font-weight: 780;
}

.agenda-title {
  color: var(--pi-heading);
  font-size: 28px;
  font-weight: 720;
  line-height: 1.16;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agenda-copy small,
.list-service small,
.news-list small {
  display: block;
  margin-top: 5px;
  color: var(--pi-muted);
  font-size: var(--small-text);
  font-weight: 600;
  line-height: 1.28;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-service li,
.news-list li {
  padding: var(--row-padding) 0;
  border-bottom: 1px solid var(--pi-border-soft);
  color: var(--pi-heading);
  font-size: var(--body-text);
  font-weight: 700;
  line-height: 1.2;
}

.more-row {
  color: var(--pi-muted);
  font-size: var(--small-text);
  font-weight: 760;
}

.subway-service {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-content: start;
  align-items: center;
}

.subway-route {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pi-route);
  color: #1a1a1a;
  box-shadow: inset 0 0 0 1px rgba(20, 32, 43, 0.08);
  font-size: 52px;
  font-weight: 900;
}

.train-times {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.train-times span {
  min-width: 90px;
  padding: 10px 16px;
  background: rgba(237, 243, 247, 0.84);
  border: 1px solid var(--pi-border-soft);
  border-radius: 999px;
  color: var(--pi-heading);
  font-size: 29px;
  font-weight: 820;
  text-align: center;
}

.alert-list {
  grid-column: 1 / -1;
  color: var(--pi-warn);
  font-size: 18px;
  font-weight: 720;
}

.alert-summary {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 10px 12px;
  background: rgba(255, 246, 235, 0.86);
  border: 1px solid rgba(184, 107, 53, 0.22);
  border-radius: var(--pi-radius-md);
  color: var(--pi-warn);
}

.alert-summary span {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(184, 107, 53, 0.12);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.alert-summary strong {
  min-width: 0;
  font-size: 16px;
  font-weight: 760;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alert-detail {
  display: grid;
  gap: 6px;
  max-height: 5.2em;
  overflow: hidden;
}

.service-subway.zone-size-medium .primary-text {
  font-size: 27px;
}

.service-subway.zone-size-medium .train-times span {
  font-size: 26px;
}

.density-compact .zone-card {
  border-radius: 28px;
}

.density-compact .weather-temp {
  font-size: 82px;
}

.density-compact .service-weather.zone-size-medium .weather-temp {
  font-size: 52px;
}

.density-compact .service-weather.zone-size-medium h2 {
  font-size: 25px;
}

.density-compact .weather-service {
  gap: 10px;
}

.density-compact .service-weather.zone-size-medium .weather-service {
  gap: 7px;
}

.density-compact .weather-metric {
  padding-top: 2px;
  padding-bottom: 4px;
}

.density-compact .weather-hour {
  padding: 6px 7px;
}

.density-compact .weather-metric span,
.density-compact .weather-hour span,
.density-compact .weather-forecast-row span {
  font-size: 18px;
}

.density-compact .service-weather.zone-size-medium .weather-metric span,
.density-compact .service-weather.zone-size-medium .weather-hour span,
.density-compact .service-weather.zone-size-medium .weather-forecast-row span {
  font-size: 16px;
}

.density-compact .service-weather.zone-size-medium .weather-context {
  font-size: 11px;
}

.density-compact .weather-forecast-row {
  padding: 5px 0;
}

.density-compact .service-weather.zone-size-medium .weather-forecast-row {
  padding: 3px 0;
}

.density-spacious .weather-service {
  gap: 18px;
}

.density-spacious .weather-hour {
  padding-top: 14px;
  padding-bottom: 14px;
}

.density-compact .subway-route {
  width: 72px;
  height: 72px;
  font-size: 46px;
}

.density-spacious .list-service li,
.density-spacious .news-list li {
  padding: 15px 0;
}

.density-compact .service-weather.zone-size-medium .weather-layout-tall .weather-temp {
  font-size: 68px;
}

.density-compact .service-weather.zone-size-medium .weather-layout-tall .weather-current-copy .primary-text {
  font-size: 24px;
}

.density-compact .service-weather.zone-size-medium .weather-layout-tall .weather-metric span {
  font-size: 18px;
}

.density-compact .service-weather.zone-size-medium .weather-layout-tall .weather-hour span {
  font-size: 19px;
}

.density-compact .service-weather.zone-size-medium .weather-layout-tall .weather-forecast-row span {
  font-size: 16px;
}

.density-compact .service-weather.zone-size-medium .weather-layout-tall .weather-forecast-row {
  padding: 5px 0;
}

.density-compact .service-weather.zone-size-medium .weather-layout-tall .weather-status-grid {
  gap: 10px;
}

.density-compact .service-weather.zone-size-medium .weather-layout-tall .weather-metrics {
  padding: 11px 0;
}

.density-spacious .service-weather.zone-size-medium .weather-layout-tall .weather-current {
  gap: 20px;
}

.density-spacious .service-weather.zone-size-medium .weather-layout-tall .weather-temp {
  font-size: 84px;
}

.feature-service h3,
.message-service h3 {
  margin: 0 0 14px;
  color: var(--pi-accent-2);
  font-size: 37px;
  font-weight: 780;
  line-height: 1.08;
}

.feature-service p,
.message-service p {
  margin: 0 0 12px;
  color: var(--pi-heading);
  font-size: 28px;
  font-weight: 640;
  line-height: 1.28;
}

.feature-image {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: var(--pi-card-strong);
  border-radius: var(--pi-radius-lg);
}

.image-service {
  display: grid;
  place-items: center;
  background: rgba(237, 243, 247, 0.66);
  border-radius: var(--pi-radius-lg);
}

.image-service img {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  border-radius: var(--pi-radius-lg);
}

.image-fit-contain img {
  object-fit: contain;
}

.image-fit-cover img {
  object-fit: cover;
}

.service-message.zone-size-large .message-service p,
.zone-hero .message-service p {
  font-size: 38px;
}
