:root {
  color-scheme: dark;
  --bg: #061522;
  --bg-deep: #03101b;
  --surface: #0b2234;
  --surface-raised: #102b40;
  --surface-glass: rgba(7, 25, 40, 0.76);
  --border: rgba(176, 214, 236, 0.17);
  --border-strong: rgba(190, 224, 243, 0.31);
  --text: #f5f9fc;
  --text-muted: #a9bdca;
  --text-subtle: #7f9baa;
  --brand: #ec1937;
  --brand-dark: #b90f29;
  --cyan: #55c6ff;
  --cyan-soft: #a6e2ff;
  --green: #36d3a2;
  --amber: #f1b85b;
  --shadow-lg: 0 28px 70px rgba(0, 7, 14, 0.42);
  --shadow-md: 0 14px 36px rgba(0, 7, 14, 0.28);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --page-width: 1440px;
  --header-height: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.site-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #0b2d45;
  pointer-events: none;
}

.site-background-video,
.site-background-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.site-background-fallback {
  background:
    radial-gradient(circle at 70% 26%, rgba(99, 180, 211, 0.38), transparent 29%),
    radial-gradient(circle at 38% 82%, rgba(16, 91, 101, 0.72), transparent 32%),
    linear-gradient(145deg, #112f48 0%, #17455b 42%, #092133 100%);
}

.site-background-video {
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  transition: opacity 600ms ease;
}

.site-background-video.is-ready {
  opacity: 1;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

button,
input {
  font: inherit;
}

button,
a,
input[type="range"] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button,
a {
  color: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
iframe:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

img,
video,
svg {
  display: block;
}

h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3,
.brand-name,
.temperature {
  font-family: "Manrope", "DM Sans", sans-serif;
}

.icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.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;
  top: 10px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 9px;
  background: white;
  color: #061522;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

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

.page-width {
  width: min(calc(100% - 48px), var(--page-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(4, 17, 28, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(1.3);
}

.header-inner {
  width: min(calc(100% - 48px), var(--page-width));
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  flex: 0 0 auto;
}

.brand-mark {
  display: block;
  width: 72px;
  height: auto;
  aspect-ratio: 17 / 9;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 9px 22px rgba(203, 12, 42, 0.28);
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.desktop-nav {
  align-self: stretch;
  display: flex;
  align-items: stretch;
  gap: 32px;
}

.desktop-nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--brand);
  transform: scaleX(0);
  transition: transform 220ms var(--ease);
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--text);
}

.desktop-nav a.active::after,
.desktop-nav a:hover::after {
  transform: scaleX(1);
}

.header-actions {
  position: relative;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search {
  position: relative;
  width: clamp(190px, 18vw, 290px);
  height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(17, 43, 63, 0.78);
  color: var(--text-muted);
  transition: border-color 180ms ease, background 180ms ease;
}

.search:focus-within {
  border-color: rgba(85, 198, 255, 0.55);
  background: var(--surface-raised);
}

.search .icon {
  width: 18px;
  height: 18px;
}

.search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.search input::placeholder {
  color: var(--text-subtle);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  display: none;
  padding: 6px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #0a2133;
  box-shadow: var(--shadow-md);
}

.search-results.show {
  display: block;
}

.search-results button {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.search-results button:hover,
.search-results button:focus-visible {
  background: var(--surface-raised);
}

.search-results button strong,
.search-results button small {
  display: block;
}

.search-results button strong {
  font-size: 14px;
  line-height: 1.35;
}

.search-results button small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
}

.search-status {
  padding: 12px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.icon-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(17, 43, 63, 0.8);
  transition: background 180ms ease, border-color 180ms ease;
}

.icon-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-raised);
}

.menu-button,
.mobile-nav {
  display: none;
}

.close-icon {
  display: none;
}

.hero {
  position: relative;
  min-height: clamp(650px, calc(100svh - var(--header-height)), 860px);
  overflow: hidden;
  isolation: isolate;
  background: transparent;
}

.hero-video,
.hero-fallback,
.hero-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-video {
  z-index: -3;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 600ms ease;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  contain: strict;
}

.hero-video.is-ready {
  opacity: 1;
}

.hero-fallback {
  z-index: -4;
  background:
    radial-gradient(circle at 70% 26%, rgba(99, 180, 211, 0.38), transparent 29%),
    radial-gradient(circle at 38% 82%, rgba(16, 91, 101, 0.72), transparent 32%),
    linear-gradient(145deg, #112f48 0%, #17455b 42%, #092133 100%);
}

.hero-scrim {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(2, 12, 22, 0.89) 0%, rgba(3, 18, 31, 0.66) 42%, rgba(3, 15, 26, 0.4) 67%, rgba(2, 12, 21, 0.73) 100%),
    linear-gradient(0deg, rgba(3, 15, 25, 0.84), transparent 52%);
}

.mode-day .hero-scrim {
  background: linear-gradient(90deg, rgba(4, 20, 31, 0.82), rgba(4, 25, 38, 0.42) 63%, rgba(4, 18, 29, 0.68));
}

.mode-storm .hero-scrim {
  background: linear-gradient(90deg, rgba(1, 7, 14, 0.94), rgba(2, 13, 24, 0.54) 60%, rgba(1, 8, 16, 0.83));
}

.mode-night .hero-scrim {
  background: linear-gradient(90deg, rgba(2, 6, 17, 0.93), rgba(4, 10, 25, 0.58) 62%, rgba(2, 7, 18, 0.83));
}

.hero-inner {
  position: relative;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 72px 62px;
}

.hero-toolbar {
  position: absolute;
  top: 22px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar-label {
  color: rgba(255, 255, 255, 0.67);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mode-switch {
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(5, 20, 32, 0.72);
  backdrop-filter: blur(16px);
}

.mode-switch button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 600;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.mode-switch button .icon {
  width: 18px;
  height: 18px;
}

.mode-switch button:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.mode-switch button.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 8px 20px rgba(193, 16, 45, 0.33);
  color: white;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.84fr) minmax(520px, 1.16fr);
  align-items: center;
  gap: clamp(30px, 5vw, 88px);
}

.glass-panel {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--surface-glass);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px) saturate(1.18);
}

.current-weather {
  max-width: 520px;
  padding: clamp(24px, 3vw, 40px);
  border-radius: var(--radius-lg);
}

.eyebrow {
  color: var(--cyan-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(54, 211, 162, 0.12);
}

.location-button {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 0;
  background: transparent;
  color: white;
  text-align: left;
}

.location-button > .icon:first-child {
  width: 25px;
  height: 25px;
  color: var(--cyan);
}

.location-button span {
  display: grid;
}

.location-button strong {
  font-family: "Manrope", sans-serif;
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 800;
}

.location-button small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 13px;
}

.location-button .chevron {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.temperature-row {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 24px;
}

.weather-art {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--cyan-soft);
}

.weather-art .icon {
  width: 52px;
  height: 52px;
  stroke-width: 1.4;
}

.temperature {
  display: flex;
  align-items: flex-start;
  font-size: clamp(74px, 7vw, 108px);
  font-weight: 700;
  letter-spacing: -0.075em;
  line-height: 0.9;
}

.temperature sup {
  margin: 6px 0 0 9px;
  font-size: 0.27em;
  font-weight: 600;
  letter-spacing: 0;
}

.current-weather h1 {
  margin-top: 22px;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.2;
}

.summary {
  max-width: 440px;
  margin-top: 16px;
  color: #d6e3eb;
  font-size: 15px;
  line-height: 1.65;
}

.weather-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.weather-metrics div:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.13);
}

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

.weather-metrics dd {
  margin-top: 5px;
  font-size: 17px;
  font-weight: 700;
}

.data-note {
  margin-top: 17px;
  color: var(--text-subtle);
  font-size: 11px;
}

.forecast-card {
  min-width: 0;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius-lg);
}

.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.card-heading h2 {
  margin-top: 5px;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.25;
}

.card-heading h3 {
  margin-top: 4px;
  font-size: 19px;
}

.text-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 4px 0 12px;
  background: transparent;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
}

.text-button .icon {
  width: 18px;
  height: 18px;
  transition: transform 180ms var(--ease);
}

.text-button:hover .icon {
  transform: translateX(3px);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  margin-top: 24px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  background: rgba(2, 15, 27, 0.36);
}

.tabs button {
  min-height: 42px;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  transition: background 180ms ease, color 180ms ease;
}

.tabs button.active {
  background: rgba(236, 25, 55, 0.96);
  color: white;
  box-shadow: 0 7px 18px rgba(188, 12, 39, 0.22);
}

.hourly-forecast {
  display: grid;
  grid-template-columns: repeat(6, minmax(62px, 1fr));
  gap: 6px;
  margin-top: 16px;
}

.hour-card {
  min-height: 132px;
  padding: 12px 5px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--text);
  text-align: center;
  transition: background 180ms ease, border-color 180ms ease;
}

.hour-card:hover,
.hour-card.active {
  border-color: rgba(120, 201, 241, 0.28);
  background: rgba(27, 70, 99, 0.63);
}

.hour-card .time {
  color: var(--text-muted);
  font-size: 10px;
}

.hour-card .icon {
  width: 28px;
  height: 28px;
  margin: 12px auto 9px;
  color: var(--cyan-soft);
}

.hour-card strong {
  display: block;
  font-size: 17px;
}

.hour-card small {
  display: block;
  margin-top: 7px;
  color: #77d1ff;
  font-size: 10px;
}

.forecast-chart {
  width: 100%;
  height: 64px;
  margin-top: 4px;
  overflow: visible;
}

.forecast-chart polyline {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 2.2;
}

.forecast-chart circle {
  fill: white;
  stroke: var(--cyan);
  stroke-width: 2;
}

.weekly-forecast {
  margin-top: 14px;
}

.week-row {
  display: grid;
  grid-template-columns: 74px 32px minmax(100px, 1fr) 72px;
  align-items: center;
  gap: 12px;
  min-height: 45px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
}

.week-row .icon {
  width: 21px;
  height: 21px;
  color: var(--cyan-soft);
}

.temp-bar {
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(90deg, #4dc9ee, #f0bd68);
}

.temp-bar.fade-0 { opacity: 1; }
.temp-bar.fade-1 { opacity: 0.94; }
.temp-bar.fade-2 { opacity: 0.88; }
.temp-bar.fade-3 { opacity: 0.82; }
.temp-bar.fade-4 { opacity: 0.76; }
.temp-bar.fade-5 { opacity: 0.7; }
.temp-bar.fade-6 { opacity: 0.64; }

.week-row b {
  text-align: right;
  white-space: nowrap;
}

.forecast-detail {
  min-height: 18px;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 11px;
}

.dashboard {
  position: relative;
  isolation: isolate;
  padding-block: 40px 48px;
  content-visibility: auto;
  contain-intrinsic-size: 820px;
  background: transparent;
}

.dashboard-video,
.dashboard-scrim {
  position: absolute;
  inset: 0 calc(50% - 50vw);
  width: 100vw;
  height: 100%;
}

.dashboard-video {
  z-index: -3;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 600ms ease;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.dashboard-video.is-ready {
  opacity: 1;
}

.dashboard-scrim {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(20, 52, 58, 0.18), rgba(4, 18, 27, 0.56)),
    linear-gradient(90deg, rgba(1, 10, 18, 0.35), transparent 62%);
  pointer-events: none;
}

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

.section-heading h2 {
  margin-top: 7px;
  font-size: clamp(29px, 3vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-heading > p {
  max-width: 450px;
  color: var(--text-muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(500px, 1fr) 340px;
  gap: 16px;
  align-items: stretch;
}

.side-nav,
.map-card,
.info-card {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: linear-gradient(145deg, rgba(221, 233, 229, 0.2), rgba(12, 43, 51, 0.34));
  box-shadow: 0 24px 56px rgba(0, 10, 16, 0.22);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
  backdrop-filter: blur(16px) saturate(1.12);
}

.side-nav {
  align-self: start;
  display: grid;
  gap: 5px;
  padding: 9px;
  border-radius: var(--radius-md);
}

.side-nav button {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border-radius: 11px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  transition: background 180ms ease, color 180ms ease;
}

.side-nav button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.side-nav button.selected {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: white;
  box-shadow: 0 8px 18px rgba(190, 14, 43, 0.24);
}

.side-nav .icon {
  width: 21px;
  height: 21px;
}

.map-card {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.map-header {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
}

.map-header h3 {
  font-size: 17px;
  line-height: 1.2;
}

.map-title,
.map-meta {
  display: flex;
  align-items: center;
}

.map-title {
  min-width: 0;
  gap: 10px;
}

.map-title-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(151, 222, 255, 0.2);
  border-radius: 10px;
  background: rgba(85, 198, 255, 0.1);
  color: var(--cyan-soft);
}

.map-title-icon .icon {
  width: 18px;
  height: 18px;
}

.map-meta {
  gap: 7px;
}

.source-badge {
  padding: 5px 10px;
  border: 1px solid rgba(85, 198, 255, 0.22);
  border-radius: 999px;
  background: rgba(85, 198, 255, 0.08);
  color: var(--cyan-soft);
  font-size: 11px;
  font-weight: 700;
}

.map-frame {
  position: relative;
  height: 440px;
  background: #073653;
}

.map-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.map-fallback .icon {
  width: 42px;
  height: 42px;
}

.timeline-control {
  min-height: 68px;
  display: grid;
  grid-template-columns: 44px 68px minmax(90px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
}

.timeline-control .icon-button {
  background: var(--brand);
  border-color: transparent;
  border-radius: 50%;
}

.timeline-control > span {
  font-size: 12px;
  font-weight: 700;
}

.timeline-control small {
  color: var(--text-subtle);
  font-size: 10px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--brand);
  cursor: pointer;
}

.insights {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 16px;
}

.info-card {
  padding: 21px;
  border-radius: var(--radius-md);
}

.card-heading.compact .icon-button {
  width: 40px;
  height: 40px;
}

.air-quality {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-top: 20px;
}

.air-gauge {
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
  display: grid;
  place-content: center;
  justify-items: center;
  border: 9px solid rgba(67, 101, 123, 0.4);
  border-top-color: var(--aqi-color, var(--green));
  border-left-color: var(--aqi-color, var(--green));
  border-radius: 50%;
}

.air-gauge.aqi-good { --aqi-color: #40d6a2; }
.air-gauge.aqi-moderate { --aqi-color: #b8d94a; }
.air-gauge.aqi-unhealthy { --aqi-color: #f6bd4b; }
.air-gauge.aqi-very-unhealthy { --aqi-color: #f0784f; }
.air-gauge.aqi-hazardous { --aqi-color: #d94f93; }

.air-gauge span {
  font-family: "Manrope", sans-serif;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.air-gauge small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 9px;
  text-align: center;
}

#kualiti:not(.is-featured) .air-gauge span {
  font-size: 22px;
}

#kualiti:not(.is-featured) .air-gauge small {
  max-width: 56px;
  justify-self: center;
  font-size: 8px;
  line-height: 1.05;
  text-wrap: balance;
}

.air-quality strong {
  font-size: 15px;
}

.air-quality p,
.activity-card p,
.alert-card p {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.air-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  margin-top: 18px;
}

.air-scale span {
  height: 5px;
  border-radius: 8px;
}

.air-scale span:nth-child(1) { background: #30d0a0; }
.air-scale span:nth-child(2) { background: #bed843; }
.air-scale span:nth-child(3) { background: #f1bc43; }
.air-scale span:nth-child(4) { background: #ee6a4a; }
.air-scale span:nth-child(5) { background: #cb3d74; }

.scale-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--text-subtle);
  font-size: 9px;
}

.air-details {
  display: none;
}

.air-detail-card {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(3, 24, 35, 0.32);
}

.air-detail-card > span {
  display: block;
  margin-bottom: 8px;
  color: var(--cyan-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.air-detail-card strong {
  display: block;
  font-size: 17px;
  line-height: 1.25;
}

.air-detail-card p {
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.air-detail-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text-subtle);
  font-size: 10px;
  line-height: 1.5;
}

.activity-card,
.alert-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.activity-summary {
  display: contents;
}

.activity-planner {
  display: none;
}

.activity-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: rgba(85, 198, 255, 0.1);
  color: var(--cyan-soft);
}

.activity-icon .icon {
  width: 31px;
  height: 31px;
}

.activity-card h3,
.alert-card h3 {
  margin-top: 3px;
  font-size: 16px;
}

.alert-card {
  align-items: flex-start;
  border-color: rgba(241, 184, 91, 0.38);
  background: linear-gradient(145deg, rgba(241, 184, 91, 0.16), rgba(12, 43, 51, 0.34));
}

.alert-summary {
  display: contents;
}

.alert-summary > .icon {
  width: 26px;
  height: 26px;
  margin-top: 3px;
  color: var(--amber);
}

.alert-summary > div {
  flex: 1;
}

.alert-summary > a {
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  margin: -8px -8px 0 0;
  border-radius: 50%;
}

.warning-list {
  display: none;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: #062b50;
  color: #d5e0ec;
}

.site-footer .page-width {
  padding-block: 36px 22px;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(400px, auto);
  align-items: start;
  gap: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.footer-logo {
  display: inline-flex;
  width: 132px;
}

.footer-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.footer-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-social-links a {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: #f3f6fa;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.footer-social-icon {
  width: 15px;
  height: 15px;
  fill: currentColor;
  stroke: none;
}

.footer-social-links a:hover,
.footer-social-links a:focus-visible {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.12);
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 18px 30px;
  padding-top: 8px;
}

.footer-links a {
  color: #f3f6fa;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-decoration: none;
  text-transform: uppercase;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px 36px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: #bac9d8;
  font-size: 12px;
  line-height: 1.6;
}

.footer-bottom p {
  margin: 0;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  max-width: min(360px, calc(100% - 40px));
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: #102b40;
  box-shadow: var(--shadow-lg);
  color: white;
  font-size: 13px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 220ms var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

[hidden] {
  display: none !important;
}

@media (max-width: 1180px) {
  .desktop-nav {
    gap: 18px;
  }

  .desktop-nav a {
    font-size: 11px;
  }

  .hero-grid {
    grid-template-columns: minmax(330px, 0.82fr) minmax(460px, 1.18fr);
    gap: 30px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr 320px;
  }

  .side-nav {
    grid-column: 1 / -1;
    grid-template-columns: repeat(5, 1fr);
  }

  .side-nav button {
    justify-content: center;
  }
}

@media (max-width: 930px) {
  :root {
    --header-height: 64px;
  }

  .page-width,
  .header-inner {
    width: min(calc(100% - 32px), var(--page-width));
  }

  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: inline-grid;
  }

  .menu-button[aria-expanded="true"] .menu-icon {
    display: none;
  }

  .menu-button[aria-expanded="true"] .close-icon {
    display: block;
  }

  .mobile-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: grid;
    gap: 4px;
    padding: 10px 16px 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(4, 17, 28, 0.98);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 220ms var(--ease);
  }

  .mobile-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-nav a {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 9px;
    color: var(--text-muted);
    font-weight: 600;
  }

  .mobile-nav a:hover,
  .mobile-nav a.active {
    background: var(--surface-raised);
    color: var(--text);
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding-block: 88px 64px;
  }

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

  .current-weather {
    max-width: none;
  }

  .hero-toolbar {
    top: 18px;
    right: 0;
    left: 0;
    justify-content: center;
  }

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

  .side-nav,
  .map-card,
  .insights {
    grid-column: auto;
  }

  .insights {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
  }

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

@media (max-width: 680px) {
  .page-width,
  .header-inner {
    width: min(calc(100% - 32px), var(--page-width));
  }

  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 62px;
  }

  .brand-name {
    font-size: 16px;
  }

  .search {
    width: 44px;
    padding: 0 12px;
    transition: width 220ms var(--ease);
  }

  .search:focus-within {
    position: absolute;
    right: 54px;
    width: min(270px, calc(100vw - 112px));
  }

  .search input {
    width: 0;
    opacity: 0;
  }

  .search:focus-within input {
    width: 100%;
    opacity: 1;
  }

  .hero-inner {
    padding-block: 96px 58px;
  }

  .toolbar-label {
    display: none;
  }

  .mode-switch {
    width: 100%;
    justify-content: stretch;
  }

  .mode-switch button {
    min-width: 0;
    flex: 1;
    justify-content: center;
    padding-inline: 10px;
  }

  .mode-switch button span {
    display: none;
  }

  .mode-switch button .icon {
    width: 20px;
    height: 20px;
  }

  .current-weather,
  .forecast-card {
    padding: 22px 18px;
    border-radius: 19px;
  }

  .temperature-row {
    gap: 14px;
  }

  .weather-art {
    width: 66px;
    height: 66px;
    border-radius: 19px;
  }

  .weather-art .icon {
    width: 42px;
    height: 42px;
  }

  .temperature {
    font-size: 76px;
  }

  .weather-metrics {
    gap: 8px;
  }

  .weather-metrics div {
    min-width: 0;
  }

  .weather-metrics dt {
    min-height: 32px;
  }

  .weather-metrics dd {
    font-size: 15px;
  }

  .card-heading {
    align-items: flex-start;
  }

  .text-button {
    padding-left: 4px;
    font-size: 11px;
  }

  .hourly-forecast {
    grid-template-columns: repeat(6, 70px);
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .forecast-chart {
    min-width: 480px;
  }

  #hoursPanel {
    overflow-x: auto;
  }

  .dashboard {
    padding-block: 44px 52px;
  }

  .section-heading {
    display: block;
    margin-bottom: 22px;
  }

  .section-heading h2 {
    font-size: clamp(30px, 9vw, 38px);
    line-height: 1.08;
  }

  .section-heading > p {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.55;
  }

  .dashboard-grid,
  .insights {
    gap: 16px;
  }

  .side-nav {
    display: flex;
    gap: 6px;
    padding: 6px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .side-nav::-webkit-scrollbar {
    display: none;
  }

  .side-nav button {
    min-width: max-content;
    min-height: 48px;
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    padding-inline: 14px;
    border-radius: 12px;
    font-size: 12px;
    scroll-snap-align: start;
  }

  .side-nav .icon {
    width: 19px;
    height: 19px;
  }

  .map-header {
    height: 68px;
    padding-inline: 16px;
  }

  .map-header h3 {
    font-size: 18px;
  }

  .map-frame {
    width: 100%;
    height: auto;
    min-height: 300px;
    aspect-ratio: 4 / 3;
  }

  .timeline-control {
    min-height: 112px;
    grid-template-columns: 44px 1fr;
    grid-template-rows: 44px auto;
    gap: 8px 12px;
    padding: 12px 14px;
  }

  .timeline-control input {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .timeline-control small {
    display: none;
  }

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

  .alert-card {
    grid-column: auto;
  }

  .info-card {
    padding: 20px;
  }

  .air-quality {
    align-items: flex-start;
    gap: 16px;
    margin-top: 16px;
  }

  .air-gauge {
    width: 80px;
    height: 80px;
    border-width: 8px;
  }

  .activity-card,
  .alert-card {
    gap: 14px;
  }

  .site-footer .page-width {
    padding-block: 28px max(20px, env(safe-area-inset-bottom));
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-links {
    justify-content: flex-start;
    gap: 14px 22px;
    padding-top: 0;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    margin-top: 24px;
    padding-top: 16px;
  }
}

/* Desktop screen-to-screen dashboard flow */
@media (min-width: 931px) and (min-height: 720px) {
  html {
    scroll-behavior: smooth;
    scroll-padding-top: 0;
    scroll-snap-type: y proximity;
    scrollbar-width: none;
  }

  html::-webkit-scrollbar {
    display: none;
  }

  .hero,
  .dashboard {
    height: 100svh;
    min-height: 720px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .hero-window {
    transform: translateY(clamp(-68px, -7svh, -44px));
  }

  .dashboard {
    position: relative;
    isolation: isolate;
    width: min(calc(100% - 48px), var(--page-width));
    padding-block: clamp(16px, 2.2vh, 24px);
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    overflow: visible;
    content-visibility: visible;
    contain-intrinsic-size: auto;
  }

  .dashboard::before {
    content: none;
  }

  .section-heading {
    min-height: 0;
    margin-bottom: clamp(14px, 2vh, 22px);
  }

  .section-heading h2 {
    margin-top: 4px;
    font-size: clamp(30px, 2.7vw, 40px);
  }

  .section-heading > p {
    max-width: 390px;
    font-size: 14px;
    line-height: 1.45;
  }

  .dashboard-grid {
    min-height: 0;
    grid-template-columns: minmax(480px, 1fr) clamp(280px, 23vw, 340px);
    gap: clamp(10px, 1.1vw, 16px);
  }

  .side-nav {
    align-self: stretch;
    grid-column: auto;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, minmax(0, 1fr));
    gap: 4px;
    min-height: 0;
    padding: 8px;
  }

  .side-nav button {
    min-height: 0;
    justify-content: flex-start;
    padding-inline: 11px;
  }

  .map-card {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-column: auto;
    grid-template-rows: clamp(58px, 8vh, 70px) minmax(0, 1fr) clamp(56px, 8vh, 66px);
  }

  .map-header {
    height: auto;
    min-height: 0;
    padding-inline: 18px;
  }

  .map-frame {
    height: auto;
    min-height: 0;
  }

  .timeline-control {
    min-height: 0;
    padding-block: 7px;
  }

  .insights {
    min-height: 0;
    grid-column: auto;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1.45fr) minmax(0, 0.78fr) minmax(0, 0.9fr);
    gap: clamp(10px, 1.1vh, 14px);
  }

  .insights .info-card {
    min-height: 0;
    overflow: hidden;
    padding: clamp(14px, 1.5vw, 19px);
  }

  .air-quality {
    gap: 14px;
    margin-top: clamp(10px, 1.5vh, 16px);
  }

  .air-gauge {
    width: clamp(76px, 8vh, 90px);
    height: clamp(76px, 8vh, 90px);
  }

  .air-scale {
    margin-top: clamp(9px, 1.4vh, 15px);
  }

  .activity-card,
  .alert-card {
    gap: 13px;
  }

  .activity-icon {
    width: 48px;
    height: 48px;
  }

}

@media (max-width: 390px) {
  .header-inner {
    gap: 8px;
  }

  .brand-name {
    display: none;
  }

  .mode-switch button {
    padding-inline: 7px;
  }

  .current-weather,
  .forecast-card {
    padding-inline: 15px;
  }

  .weather-art {
    width: 58px;
    height: 58px;
  }

  .temperature {
    font-size: 67px;
  }

  .weather-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .weather-metrics div:nth-child(2) {
    border-right: 0;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-video,
  .dashboard-video,
  .site-background-video {
    display: none;
  }
}

/* Keep the video canvas visually continuous between full-screen sections. */
.dashboard::before {
  content: none;
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -4;
  background:
    radial-gradient(circle at 70% 26%, rgba(99, 180, 211, 0.38), transparent 29%),
    radial-gradient(circle at 38% 82%, rgba(16, 91, 101, 0.72), transparent 32%),
    linear-gradient(145deg, #112f48 0%, #17455b 42%, #092133 100%);
  pointer-events: none;
}

.dashboard::after,
.news-section::after {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
  background: rgba(71, 111, 116, 0.26);
  pointer-events: none;
}

/* Immersive opening dashboard */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  background: linear-gradient(180deg, rgba(2, 14, 23, 0.72), transparent);
  border-bottom: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.hero {
  min-height: 100svh;
  padding: 98px 0 38px;
  display: grid;
  place-items: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(71, 111, 116, 0.26);
  pointer-events: none;
}

.hero-scrim,
.mode-day .hero-scrim,
.mode-storm .hero-scrim,
.mode-night .hero-scrim {
  background:
    linear-gradient(180deg, rgba(20, 52, 58, 0.18), rgba(4, 18, 27, 0.56)),
    linear-gradient(90deg, rgba(1, 10, 18, 0.35), transparent 62%);
}

.hero-inner {
  min-height: auto;
  padding: 0;
}

.hero-window {
  position: relative;
  width: 100%;
  min-height: min(730px, calc(100svh - 136px));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  isolation: auto;
  backdrop-filter: none;
}

.hero-canvas {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
}

.hero-toolbar {
  top: 20px;
  right: 24px;
  left: 24px;
  z-index: 7;
  justify-content: flex-end;
}

.weather-mode-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mode-switch {
  background: rgba(10, 34, 41, 0.45);
  border-color: rgba(255, 255, 255, 0.2);
}

.hero-grid {
  width: 100%;
  min-height: 100%;
  grid-template-columns: minmax(340px, 0.9fr) minmax(510px, 1.1fr);
  gap: clamp(28px, 4vw, 70px);
  padding: 36px clamp(24px, 3.2vw, 52px) 42px;
}

.current-weather.glass-panel {
  max-width: 560px;
  padding: 24px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.current-weather .location-button {
  margin-top: 16px;
}

.location-picker {
  position: relative;
  z-index: 30;
  width: min(100%, 390px);
  min-height: 64px;
  margin-top: 0;
}

.location-picker .location-button {
  margin-top: 0;
}

.location-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.location-actions .location-button {
  min-width: 0;
  flex: 1;
}

.locate-button {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--cyan);
  background: rgba(4, 25, 34, 0.7);
  backdrop-filter: blur(14px);
}

.locate-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.locate-button.is-loading .icon {
  animation: locate-pulse 900ms ease-in-out infinite alternate;
}

@keyframes locate-pulse {
  to { opacity: 0.35; }
}

.location-search {
  z-index: 40;
  display: none;
  width: 100%;
  height: 52px;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(4, 25, 34, 0.78);
  backdrop-filter: blur(14px);
}

.location-picker.editing .location-actions {
  display: none;
}

.location-picker.editing .location-search {
  display: flex;
}

.location-search .search-results {
  z-index: 100;
  max-height: 280px;
  overflow-y: auto;
}

.current-weather .location-button strong {
  font-size: 20px;
}

.current-weather .temperature-row {
  margin-top: 34px;
}

.current-weather .weather-art {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.current-weather .weather-art .icon {
  width: 42px;
  height: 42px;
}

.current-weather .temperature {
  font-size: clamp(74px, 7vw, 104px);
}

.current-weather h1 {
  margin-top: 28px;
  font-size: clamp(42px, 4.4vw, 68px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.weather-subtitle {
  display: block;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}

.current-weather .summary {
  max-width: 510px;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.current-weather .weather-metrics {
  max-width: 500px;
  border-top-color: rgba(255, 255, 255, 0.26);
}

.current-weather .data-note {
  color: rgba(255, 255, 255, 0.58);
}

.forecast-card.glass-panel {
  align-self: center;
  padding: clamp(22px, 2.6vw, 34px);
  border-color: rgba(255, 255, 255, 0.32);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(221, 233, 229, 0.22), rgba(12, 43, 51, 0.38));
  box-shadow: 0 26px 60px rgba(0, 10, 16, 0.25);
  backdrop-filter: blur(12px) saturate(1.08);
}

.forecast-card .tabs {
  background: rgba(4, 25, 32, 0.28);
}

.forecast-card .hour-card:hover,
.forecast-card .hour-card.active {
  background: rgba(234, 246, 244, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}

@media (max-width: 1180px) {
  .hero-grid {
    grid-template-columns: minmax(310px, 0.8fr) minmax(450px, 1.2fr);
    gap: 24px;
    padding-inline: 26px;
  }

  .current-weather h1 {
    font-size: 48px;
  }
}

@media (max-width: 930px) {
  .site-header {
    position: absolute;
  }

  .hero {
    padding: 82px 0 24px;
  }

  .hero-window {
    min-height: 0;
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .hero-canvas {
    display: block;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    padding: 36px 24px 54px;
  }

  .current-weather.glass-panel {
    max-width: none;
    padding: 24px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .forecast-card.glass-panel {
    background: rgba(20, 52, 61, 0.78);
    backdrop-filter: none;
  }

  .current-weather h1 {
    font-size: clamp(40px, 8vw, 60px);
  }
}

@media (max-width: 680px) {
  .hero {
    padding: 76px 0 16px;
  }

  .hero-inner {
    width: min(calc(100% - 16px), var(--page-width));
  }

  .hero-window {
    border-radius: 20px;
  }

  .hero-toolbar {
    top: 14px;
    right: 14px;
    left: 14px;
  }

  .weather-mode-control {
    width: 100%;
  }

  .hero-grid {
    gap: 18px;
    padding: 24px 10px 50px;
  }

  .current-weather.glass-panel,
  .forecast-card.glass-panel {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .current-weather.glass-panel {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .current-weather h1 {
    font-size: 40px;
  }

  .weather-subtitle {
    margin-top: 3px;
  }

  .location-picker,
  .location-search,
  .location-search:focus-within {
    width: 100%;
  }

  .location-search,
  .location-search:focus-within {
    position: relative;
    right: auto;
    height: 52px;
    padding: 0 14px;
  }

  .location-search input,
  .location-search:focus-within input {
    width: 100%;
    opacity: 1;
  }

  .location-search .search-results {
    max-height: min(320px, 45svh);
    padding: 8px;
  }

  .location-search .search-results button {
    min-height: 56px;
    padding: 9px 12px;
  }

  .current-weather .temperature-row {
    margin-top: 24px;
  }

}

@media (max-width: 420px) {
  .dashboard {
    padding-block: 36px 44px;
  }

  .map-frame {
    min-height: 270px;
  }

  .info-card {
    padding: 18px;
  }

  .air-quality {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .air-gauge {
    width: 72px;
    height: 72px;
  }

  .activity-icon {
    width: 48px;
    height: 48px;
  }
}

/* Interactive dashboard focus switcher */
.dashboard-grid {
  grid-template-rows: minmax(190px, 1.45fr) minmax(140px, 0.5fr) minmax(180px, 0.9fr);
}

.insights {
  display: contents;
}

[data-panel] {
  position: relative;
  min-width: 0;
  touch-action: manipulation;
  transition: border-color 180ms ease, box-shadow 220ms ease, background 220ms ease;
}

[data-panel]:not(.is-featured) {
  cursor: pointer;
}

[data-panel]:not(.is-featured):hover {
  border-color: rgba(134, 221, 255, 0.62);
  box-shadow: 0 24px 60px rgba(0, 10, 16, 0.32), 0 0 0 1px rgba(85, 198, 255, 0.12);
}

[data-panel]:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

[data-panel="map"] { view-transition-name: dashboard-map; }
[data-panel="kualiti"] { view-transition-name: dashboard-air; }
[data-panel="activity"] { view-transition-name: dashboard-activity; }
[data-panel="amaran"] { view-transition-name: dashboard-alert; }

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

#kualiti {
  grid-column: 2;
  grid-row: 1;
}

#activity {
  grid-column: 2;
  grid-row: 2;
}

#amaran {
  grid-column: 2;
  grid-row: 3;
}

#kualiti:not(.is-featured) {
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 2vw, 26px);
}

#kualiti:not(.is-featured) .air-quality {
  margin-top: clamp(18px, 2.2vh, 26px);
}

#kualiti:not(.is-featured) .air-scale {
  margin-top: auto;
  padding-top: clamp(18px, 2.2vh, 28px);
}

#kualiti:not(.is-featured) .scale-labels {
  margin-top: 8px;
  padding-bottom: 2px;
}

.dashboard-grid[data-feature="kualiti"] .map-card { grid-column: 2; grid-row: 1; }
.dashboard-grid[data-feature="kualiti"] #kualiti { grid-column: 1; grid-row: 1 / 4; }
.dashboard-grid[data-feature="activity"] .map-card { grid-column: 2; grid-row: 2; }
.dashboard-grid[data-feature="activity"] #activity { grid-column: 1; grid-row: 1 / 4; }
.dashboard-grid[data-feature="amaran"] .map-card { grid-column: 2; grid-row: 3; }
.dashboard-grid[data-feature="amaran"] #amaran { grid-column: 1; grid-row: 1 / 4; }

.info-card.is-featured {
  padding: clamp(26px, 3vw, 42px);
  background: linear-gradient(145deg, rgba(221, 233, 229, 0.25), rgba(8, 36, 45, 0.48));
}

#kualiti.is-featured {
  display: grid;
  align-content: center;
}

#kualiti.is-featured .air-quality {
  gap: clamp(22px, 3vw, 38px);
  margin-block: clamp(18px, 2.8vh, 28px);
}

#kualiti.is-featured .air-gauge {
  width: clamp(108px, 11vw, 140px);
  height: clamp(108px, 11vw, 140px);
  border-width: 12px;
}

#kualiti.is-featured .air-gauge span {
  font-size: clamp(32px, 4vw, 48px);
}

#kualiti.is-featured .air-quality strong,
.activity-card.is-featured .activity-summary h3,
.alert-card.is-featured .alert-summary h3 {
  font-size: clamp(24px, 2.4vw, 34px);
}

#kualiti.is-featured .air-quality p,
.activity-card.is-featured .activity-summary p,
.alert-card.is-featured .alert-summary p {
  max-width: 620px;
  font-size: clamp(14px, 1.15vw, 16px);
}

#kualiti.is-featured .air-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(18px, 2.8vh, 26px);
}

#kualiti.is-featured .air-detail-wide {
  grid-column: 1 / -1;
}

#activity.is-featured {
  display: grid;
  align-content: center;
  gap: clamp(22px, 3vh, 30px);
}

#activity.is-featured .activity-summary {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
}

#activity.is-featured .activity-icon {
  width: 82px;
  height: 82px;
  border-radius: 22px;
}

#activity.is-featured .activity-icon .icon {
  width: 46px;
  height: 46px;
}

#activity.is-featured .activity-planner {
  display: grid;
  gap: 14px;
}

.activity-picker {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.activity-picker > div:first-child {
  display: grid;
  gap: 5px;
}

.activity-picker strong {
  font-size: 16px;
}

.section-label,
.activity-guidance span {
  color: var(--cyan-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.activity-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.activity-option {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(4, 28, 38, 0.36);
  color: var(--text-muted);
  font: 700 12px/1 "DM Sans", sans-serif;
  cursor: pointer;
  transition: background-color 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease);
}

.activity-option:hover,
.activity-option:focus-visible {
  border-color: rgba(134, 221, 255, 0.7);
  color: var(--white);
}

.activity-option:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}

.activity-option.active {
  border-color: rgba(85, 198, 255, 0.7);
  background: rgba(85, 198, 255, 0.18);
  color: var(--white);
}

.activity-result {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  align-items: center;
  gap: 24px;
  padding: 20px;
  border: 1px solid rgba(151, 222, 255, 0.18);
  border-radius: 18px;
  background: rgba(4, 28, 38, 0.42);
}

.activity-status {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--cyan-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.activity-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 16%, transparent);
}

.activity-status.is-good { color: #70e3bb; }
.activity-status.is-caution { color: #ffd16f; }
.activity-status.is-avoid { color: #ff8a72; }

.activity-verdict h4 {
  margin-top: 8px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.25;
}

.activity-card.is-featured .activity-verdict p {
  max-width: 580px;
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.activity-conditions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.activity-conditions div {
  min-width: 0;
  padding: 11px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

.activity-conditions dt {
  color: var(--text-subtle);
  font-size: 9px;
  text-transform: uppercase;
}

.activity-conditions dd {
  margin-top: 4px;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

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

.activity-guidance > div {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 15px;
  background: rgba(4, 28, 38, 0.28);
}

.activity-guidance strong {
  display: block;
  margin-top: 7px;
  font-size: 15px;
  line-height: 1.25;
}

.activity-card.is-featured .activity-guidance p {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
}

.activity-card.is-featured .activity-note {
  margin: 0;
  color: var(--text-subtle);
  font-size: 10px;
  line-height: 1.4;
}

.activity-sponsor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 214, 112, 0.28);
  border-radius: 16px;
  background: linear-gradient(105deg, rgba(250, 185, 71, 0.12), rgba(15, 50, 57, 0.3));
}

.activity-sponsor[hidden] {
  display: none;
}

.activity-sponsor-copy {
  min-width: 0;
}

.activity-sponsor-label {
  color: #ffd16f;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.activity-sponsor strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.3;
}

.activity-sponsor p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
}

.activity-sponsor-link {
  flex: 0 0 auto;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(255, 209, 111, 0.42);
  border-radius: 12px;
  color: #ffe4a1;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.activity-sponsor-link:hover,
.activity-sponsor-link:focus-visible {
  border-color: rgba(255, 209, 111, 0.78);
  background: rgba(255, 209, 111, 0.12);
  transform: translateY(-1px);
}

.activity-sponsor-link[hidden] {
  display: none;
}

@media (max-width: 600px) {
  .activity-sponsor {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}

#amaran.is-featured {
  display: grid;
  align-content: center;
  gap: clamp(18px, 2.5vh, 26px);
}

#amaran.is-featured .alert-summary {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

#amaran.is-featured .alert-summary > .icon {
  width: 54px;
  height: 54px;
  margin: 0;
}

#amaran.is-featured .alert-summary > a {
  margin: 0;
}

#amaran.is-featured .warning-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.warning-item {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(4, 28, 38, 0.52);
}

.warning-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 17px;
}

.warning-heading span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(241, 184, 91, 0.14);
  color: var(--amber);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.warning-clear .warning-heading span {
  background: rgba(64, 214, 162, 0.12);
  color: #70e3bb;
}

.warning-heading h4 {
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  text-align: right;
}

.warning-preview {
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 10px;
  border-block: 1px solid rgba(255, 255, 255, 0.12);
  background: #fff;
}

.warning-preview img {
  width: 100%;
  height: 210px;
  display: block;
  object-fit: contain;
}

.warning-image-fallback {
  display: none;
  max-width: 280px;
  color: #294553;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.warning-preview.is-unavailable img {
  display: none;
}

.warning-preview.is-unavailable .warning-image-fallback {
  display: block;
}

.warning-footer {
  display: grid;
  gap: 7px;
  padding: 14px 17px 16px;
}

.warning-footer a {
  width: fit-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan-soft);
  font-size: 13px;
  font-weight: 800;
}

.warning-footer a .icon {
  width: 17px;
  height: 17px;
}

.alert-card.is-featured .warning-footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
}

@media (min-width: 931px) {
  .dashboard {
    width: min(calc(100% - 64px), 1480px);
  }

  .dashboard-grid {
    width: 100%;
    height: min(800px, calc(100svh - 88px));
    align-self: center;
    margin-inline: auto;
  }

  .info-card.is-featured {
    width: min(100%, 1060px);
    max-height: 740px;
    align-self: center;
    justify-self: center;
    overflow: auto;
  }

  #kualiti.is-featured .air-detail-card {
    padding: 15px 17px;
  }

  #kualiti.is-featured .air-detail-card strong {
    font-size: 15px;
  }

  .dashboard-grid:not([data-feature="map"]) .map-card {
    display: grid;
    grid-template-rows: 52px minmax(0, 1fr);
  }

  .dashboard-grid:not([data-feature="map"]) .map-card .map-header {
    height: 52px;
    padding-inline: 16px;
  }

  .dashboard-grid:not([data-feature="map"]) .map-card .map-header h3 {
    font-size: 16px;
  }

  .dashboard-grid:not([data-feature="map"]) .map-card .map-frame {
    height: auto;
    min-height: 0;
  }

  .dashboard-grid:not([data-feature="map"]) .map-card .timeline-control,
  .dashboard-grid:not([data-feature="map"]) .map-card .source-badge {
    display: none;
  }
}

/* A calm, consistent desktop rail for secondary dashboard cards. */
@media (min-width: 931px) {
  .dashboard-grid {
    grid-template-rows: repeat(4, minmax(0, 1fr));
  }

  #kualiti:not(.is-featured),
  #activity:not(.is-featured),
  #traffic:not(.is-featured),
  #amaran:not(.is-featured),
  .dashboard-grid .map-card:not(.is-featured) {
    width: 100%;
    height: 112px;
    min-height: 112px;
    align-self: center;
    padding: 16px 18px;
    overflow: hidden;
    border: 1px solid rgba(210, 239, 246, 0.24);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(137, 159, 155, 0.64), rgba(40, 65, 63, 0.72));
    box-shadow: 0 14px 34px rgba(2, 21, 26, 0.13);
  }

  #kualiti:not(.is-featured),
  #activity:not(.is-featured) .activity-summary,
  #traffic:not(.is-featured) .traffic-summary,
  #amaran:not(.is-featured) .alert-summary {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    height: 100%;
  }

  #kualiti:not(.is-featured) .card-heading {
    display: contents;
  }

  #kualiti:not(.is-featured) .card-heading > div:first-child {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  #kualiti:not(.is-featured) .card-heading-actions {
    grid-column: 3;
    grid-row: 1;
  }

  #kualiti:not(.is-featured) .air-quality {
    display: contents;
    margin: 0;
  }

  #kualiti:not(.is-featured) .air-gauge {
    grid-column: 1;
    grid-row: 1;
    width: 48px;
    height: 48px;
    border-width: 5px;
  }

  #kualiti:not(.is-featured) .air-gauge strong {
    font-size: 20px;
  }

  #kualiti:not(.is-featured) .air-quality > div:last-child,
  #kualiti:not(.is-featured) .eyebrow,
  #activity:not(.is-featured) .eyebrow,
  #activity:not(.is-featured) .activity-copy p,
  #traffic:not(.is-featured) .eyebrow,
  #traffic:not(.is-featured) .traffic-copy p,
  #amaran:not(.is-featured) .eyebrow,
  #amaran:not(.is-featured) .alert-copy p {
    display: none;
  }

  #kualiti:not(.is-featured) h3,
  #activity:not(.is-featured) h3,
  #traffic:not(.is-featured) h3,
  #amaran:not(.is-featured) h3,
  .dashboard-grid .map-card:not(.is-featured) h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #activity:not(.is-featured) .activity-icon,
  #traffic:not(.is-featured) .traffic-icon {
    width: 48px;
    height: 48px;
    margin: 0;
    border-radius: 14px;
  }

  #activity:not(.is-featured) .activity-summary > div:nth-child(2),
  #traffic:not(.is-featured) .traffic-summary > div:nth-child(2),
  #amaran:not(.is-featured) .alert-summary > div:nth-child(2) {
    min-width: 0;
  }

  #traffic:not(.is-featured) .traffic-status {
    margin: 0;
    justify-self: end;
  }

  #amaran:not(.is-featured) {
    border-color: rgba(255, 192, 70, 0.34);
  }

  #amaran:not(.is-featured) .alert-summary > .icon {
    width: 48px;
    height: 48px;
    box-sizing: border-box;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 184, 45, 0.1);
  }

  #amaran:not(.is-featured) .alert-summary > a {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.06);
  }

  .dashboard-grid .map-card:not(.is-featured) {
    display: grid;
    grid-template-rows: 1fr;
  }

  .dashboard-grid .map-card:not(.is-featured) .map-header {
    height: 100%;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
  }

  .dashboard-grid .map-card:not(.is-featured) .map-title {
    min-width: 0;
    gap: 14px;
  }

  .dashboard-grid .map-card:not(.is-featured) .map-title > span {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 14px;
  }

  .dashboard-grid .map-card:not(.is-featured) .map-live {
    flex: 0 0 auto;
  }
}

@media (max-width: 930px) {
  .dashboard-grid {
    display: flex;
    flex-direction: column;
  }

  .dashboard-grid [data-panel],
  .dashboard-grid [data-panel].is-featured {
    order: initial;
  }

  .info-card.is-featured {
    min-height: 360px;
  }

  .activity-picker {
    align-items: stretch;
    flex-direction: column;
  }

  .activity-options {
    justify-content: flex-start;
  }

  .activity-result {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  #kualiti.is-featured .air-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #kualiti.is-featured .air-detail-wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .map-header {
    padding-inline: 14px;
  }

  .map-header h3 {
    font-size: 15px;
  }

  .map-title {
    gap: 8px;
  }

  .map-title-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .map-header .source-badge {
    display: none;
  }

  #activity.is-featured .activity-summary {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
  }

  #activity.is-featured .activity-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
  }

  #activity.is-featured .activity-icon .icon {
    width: 32px;
    height: 32px;
  }

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

  .activity-option {
    min-height: 44px;
    padding-inline: 10px;
  }

  .activity-result {
    padding: 16px;
  }

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

  .activity-guidance {
    grid-template-columns: 1fr;
  }

  #amaran.is-featured .alert-summary {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
  }

  #amaran.is-featured .alert-summary > .icon {
    width: 42px;
    height: 42px;
  }

  #amaran.is-featured .warning-list {
    grid-template-columns: 1fr;
  }

  .warning-preview {
    min-height: 190px;
  }

  .warning-preview img {
    height: 180px;
  }

  #kualiti.is-featured .air-details {
    grid-template-columns: 1fr;
  }

  #kualiti.is-featured .air-detail-wide {
    grid-column: auto;
  }
}

::view-transition-group(dashboard-map),
::view-transition-group(dashboard-air),
::view-transition-group(dashboard-activity),
::view-transition-group(dashboard-alert) {
  animation-duration: 280ms;
  animation-timing-function: var(--ease);
}

@keyframes dashboard-panel-content-out {
  from { opacity: 1; }
  to { opacity: 0.28; }
}

@keyframes dashboard-panel-content-in {
  from { opacity: 0.2; }
  to { opacity: 1; }
}

@media (max-width: 930px) and (prefers-reduced-motion: no-preference) {
  [data-panel]:not(.is-featured):active {
    transform: scale(0.985);
    transition-duration: 120ms;
  }

  ::view-transition-group(dashboard-map),
  ::view-transition-group(dashboard-air),
  ::view-transition-group(dashboard-activity),
  ::view-transition-group(dashboard-alert) {
    animation-duration: 460ms;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  }

  ::view-transition-old(dashboard-map),
  ::view-transition-old(dashboard-air),
  ::view-transition-old(dashboard-activity),
  ::view-transition-old(dashboard-alert) {
    animation: dashboard-panel-content-out 150ms ease-in both;
    mix-blend-mode: normal;
  }

  ::view-transition-new(dashboard-map),
  ::view-transition-new(dashboard-air),
  ::view-transition-new(dashboard-activity),
  ::view-transition-new(dashboard-alert) {
    animation: dashboard-panel-content-in 360ms 70ms cubic-bezier(0.22, 1, 0.36, 1) both;
    mix-blend-mode: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(dashboard-map),
  ::view-transition-group(dashboard-air),
  ::view-transition-group(dashboard-activity),
  ::view-transition-group(dashboard-alert) {
    animation-duration: 0.01ms;
  }
}

/* Immersive AWANI news section */
.news-section {
  position: relative;
  isolation: isolate;
  min-height: 760px;
  padding-block: clamp(74px, 8vw, 112px);
  display: grid;
  align-items: center;
  background: transparent;
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}

.news-video,
.news-scrim {
  position: absolute;
  inset: 0 auto 0 50%;
  width: 100vw;
  height: 100%;
  transform: translateX(-50%);
}

.news-video {
  z-index: -3;
  object-fit: cover;
  opacity: 0;
  transition: opacity 700ms var(--ease);
}

.news-video.is-ready {
  opacity: 1;
}

.news-scrim {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(20, 52, 58, 0.18), rgba(4, 18, 27, 0.56)),
    linear-gradient(90deg, rgba(1, 10, 18, 0.35), transparent 62%);
  pointer-events: none;
}

.news-shell {
  width: min(100%, 1320px);
  margin-inline: auto;
  display: grid;
  gap: clamp(18px, 2vw, 26px);
}

.news-header {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.news-header h2 {
  margin-top: 5px;
  font-size: clamp(30px, 3.2vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.news-header > div:first-child > p:last-child {
  max-width: 610px;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: clamp(14px, 1.3vw, 17px);
}

.news-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.news-header-actions > a,
.news-read-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 800;
  white-space: nowrap;
}

.news-header-actions > a:hover,
.news-read-link:hover {
  color: var(--cyan-soft);
}

.news-header-actions .icon,
.news-read-link .icon {
  width: 18px;
  height: 18px;
  transition: transform 180ms var(--ease);
}

.news-header-actions > a:hover .icon,
.news-read-link:hover .icon {
  transform: translateX(3px);
}

.news-feed-status {
  min-height: 34px;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(6, 23, 36, 0.68);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.news-feed-status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(241, 184, 91, 0.12);
}

.news-feed-status.is-live > span {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(54, 211, 162, 0.12);
}

.news-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.72fr);
  gap: clamp(14px, 1.4vw, 20px);
}

.featured-news,
.news-list-card {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: linear-gradient(145deg, rgba(221, 233, 229, 0.2), rgba(12, 43, 51, 0.34));
  box-shadow: 0 24px 56px rgba(0, 10, 16, 0.22);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
  backdrop-filter: blur(16px) saturate(1.12);
}

.featured-news {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.featured-news:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

.featured-news-media,
.featured-news-overlay {
  position: absolute;
  inset: 0;
}

.featured-news-media {
  background:
    radial-gradient(circle at 72% 24%, rgba(85, 198, 255, 0.22), transparent 36%),
    linear-gradient(145deg, rgba(37, 74, 92, 0.58), rgba(7, 27, 41, 0.52) 68%);
}

.featured-news-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 300ms ease;
}

.featured-news-media.has-image:not(.is-unavailable) img {
  opacity: 0.66;
}

.news-image-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(166, 226, 255, 0.22);
}

.news-image-fallback .icon {
  width: min(26vw, 260px);
  height: min(26vw, 260px);
  stroke-width: 0.75;
}

.featured-news-media.has-image:not(.is-unavailable) .news-image-fallback {
  display: none;
}

.featured-news-overlay {
  background:
    linear-gradient(180deg, rgba(3, 15, 24, 0.02) 18%, rgba(3, 15, 24, 0.32) 52%, rgba(3, 15, 24, 0.91) 100%),
    linear-gradient(90deg, rgba(3, 15, 24, 0.58), transparent 76%);
}

.featured-news-content {
  position: absolute;
  inset: auto clamp(24px, 4vw, 52px) clamp(25px, 4vw, 46px);
  z-index: 1;
  max-width: 810px;
  display: grid;
  justify-items: start;
  gap: 11px;
}

.news-category,
.news-list-category {
  color: #ff7890;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.news-category {
  padding-left: 11px;
  border-left: 3px solid var(--brand);
}

.featured-news-content h3 {
  max-width: 780px;
  font-size: clamp(26px, 3.2vw, 47px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.featured-news-content > p {
  max-width: 700px;
  color: #c4d3dc;
  font-size: clamp(14px, 1.25vw, 17px);
  line-height: 1.55;
}

.featured-news-content time,
.news-list-copy time {
  color: var(--text-subtle);
  font-size: 12px;
}

.news-list {
  min-width: 0;
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.news-list-card {
  min-width: 0;
  min-height: 112px;
  padding: 10px;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 14px;
  border-radius: 17px;
  color: var(--text);
  text-align: left;
  transition: transform 180ms var(--ease), border-color 180ms ease, background 180ms ease;
}

.news-list-card:hover {
  transform: translateY(-2px);
  border-color: rgba(85, 198, 255, 0.52);
  background: linear-gradient(145deg, rgba(221, 233, 229, 0.27), rgba(12, 43, 51, 0.46));
}

.news-list-card:active {
  transform: translateY(0) scale(0.99);
}

.news-list-media {
  position: relative;
  width: 108px;
  height: 82px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #31596c, #0b2638);
}

.news-list-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-list-fallback {
  position: absolute;
  color: var(--cyan-soft);
  opacity: 0.58;
}

.news-list-media.is-unavailable img {
  display: none;
}

.news-list-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.news-list-copy strong {
  overflow: hidden;
  display: -webkit-box;
  color: var(--text);
  font-family: "Manrope", "DM Sans", sans-serif;
  font-size: 14px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.news-list-arrow {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(85, 198, 255, 0.09);
  color: var(--cyan-soft);
}

.news-list-arrow .icon {
  width: 16px;
  height: 16px;
}

.news-source-note {
  color: var(--text-subtle);
  font-size: 11px;
}

::view-transition-group(featured-news) {
  animation-duration: 260ms;
  animation-timing-function: var(--ease);
}

#featuredNews {
  view-transition-name: featured-news;
}

@media (min-width: 931px) and (min-height: 720px) {
  .hero,
  .dashboard,
  .news-section {
    height: 100svh;
    min-height: 720px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .hero {
    height: auto;
    min-height: 100svh;
    overflow: visible;
  }

  .news-section {
    padding-block: clamp(28px, 4vh, 48px);
    content-visibility: visible;
    contain-intrinsic-size: auto;
  }

  .news-layout {
    height: min(520px, calc(100svh - 240px));
  }

  .featured-news {
    min-height: 0;
  }

  .news-header h2 {
    font-size: clamp(32px, 2.6vw, 42px);
  }

  .featured-news-content h3 {
    font-size: clamp(28px, 2.5vw, 42px);
  }
}

@media (max-width: 1050px) {
  .news-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.8fr);
  }

  .news-list-card {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .news-list-media {
    width: 86px;
    height: 72px;
  }

  .news-list-arrow {
    display: none;
  }
}

@media (max-width: 930px) {
  .news-section {
    min-height: auto;
    padding-block: 72px;
  }

  .news-header {
    display: block;
  }

  .news-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .news-layout {
    grid-template-columns: 1fr;
  }

  .featured-news {
    min-height: 540px;
  }

  .news-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }
}

@media (max-width: 600px) {
  .news-section {
    padding-block: 58px;
  }

  .news-header-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .featured-news {
    min-height: 500px;
    border-radius: 20px;
  }

  .featured-news-content {
    inset-inline: 20px;
    inset-bottom: 22px;
  }

  .featured-news-content h3 {
    font-size: clamp(24px, 8vw, 34px);
  }

  .featured-news-content > p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

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

  .news-list-card {
    min-height: 108px;
    grid-template-columns: 88px minmax(0, 1fr) 30px;
  }

  .news-list-media {
    width: 88px;
    height: 72px;
  }

  .news-list-arrow {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-video {
    display: none;
  }

  ::view-transition-group(featured-news) {
    animation-duration: 0.01ms;
  }
}

/* Mobile usability and safe-area polish */
@media (max-width: 930px) {
  :root {
    --header-height: calc(64px + env(safe-area-inset-top));
  }

  .site-header {
    position: fixed;
    height: var(--header-height);
    padding-top: env(safe-area-inset-top);
    background: rgba(2, 15, 25, 0.86);
    border-bottom: 1px solid rgba(176, 214, 236, 0.14);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    backdrop-filter: blur(18px) saturate(1.2);
  }

  .header-inner {
    height: 64px;
  }

  .mobile-nav {
    max-height: calc(100svh - var(--header-height));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .mobile-nav a:active {
    background: rgba(85, 198, 255, 0.14);
    color: var(--text);
  }

  #utama,
  #peta,
  #berita {
    scroll-margin-top: var(--header-height);
  }

  .hero {
    padding-top: calc(var(--header-height) + 12px);
  }

  .info-card.is-featured {
    min-height: 0;
    padding: 22px;
    align-content: start;
  }

  #kualiti.is-featured,
  #activity.is-featured,
  #amaran.is-featured {
    align-content: start;
  }
}

@media (max-width: 600px) {
  .page-width,
  .header-inner,
  .hero-inner {
    width: min(calc(100% - 24px), var(--page-width));
  }

  .brand-name {
    font-size: 15px;
  }

  .hero {
    padding-bottom: 12px;
  }

  .hero-grid {
    gap: 16px;
    padding: 18px 4px 36px;
  }

  .current-weather.glass-panel,
  .forecast-card.glass-panel {
    padding: 20px 16px;
  }

  .current-weather .temperature {
    font-size: clamp(64px, 20vw, 76px);
  }

  .current-weather h1 {
    margin-top: 22px;
    font-size: clamp(34px, 10vw, 40px);
    line-height: 1.08;
  }

  .current-weather .summary {
    font-size: 14px;
    line-height: 1.55;
  }

  .weather-metrics {
    margin-top: 20px;
  }

  .forecast-card .card-heading h2 {
    font-size: 21px;
  }

  .hourly-forecast {
    grid-template-columns: repeat(6, 76px);
    gap: 8px;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
  }

  .hour-card {
    min-height: 118px;
    scroll-snap-align: start;
  }

  #hoursPanel {
    overflow-x: hidden;
  }

  .forecast-chart {
    min-width: 0;
  }

  .dashboard {
    padding-block: 28px 40px;
  }

  .dashboard-grid,
  .insights {
    gap: 12px;
  }

  .map-card,
  .info-card,
  .info-card.is-featured {
    border-radius: 18px;
  }

  .info-card,
  .info-card.is-featured {
    padding: 18px;
  }

  .map-frame {
    min-height: 250px;
  }

  .timeline-control {
    min-height: 96px;
  }

  #kualiti.is-featured .air-quality {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 16px;
    margin-block: 16px;
  }

  #kualiti.is-featured .air-gauge {
    width: 88px;
    height: 88px;
    border-width: 9px;
  }

  #kualiti.is-featured .air-gauge span {
    font-size: 24px;
  }

  #kualiti.is-featured .air-quality strong,
  .activity-card.is-featured .activity-summary h3,
  .alert-card.is-featured .alert-summary h3 {
    font-size: 21px;
  }

  .air-detail-card {
    padding: 14px;
  }

  #activity.is-featured {
    gap: 18px;
  }

  .activity-result {
    gap: 16px;
    padding: 15px;
  }

  .activity-guidance > div {
    padding: 14px;
  }

  #amaran.is-featured {
    gap: 18px;
  }

  .warning-preview,
  .warning-preview img {
    min-height: 0;
    height: 160px;
  }

  .news-section {
    padding-block: 40px;
  }

  .news-shell {
    gap: 16px;
  }

  .news-header {
    padding: 0;
    border-radius: 0;
  }

  .news-header h2 {
    font-size: 30px;
  }

  .featured-news {
    min-height: 460px;
  }

  .news-list {
    gap: 10px;
  }

  .news-source-note {
    padding-inline: 4px;
    line-height: 1.5;
  }

  .site-footer .page-width {
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  .toast {
    bottom: max(16px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 380px) {
  .brand-name {
    display: none;
  }

  .current-weather .temperature {
    font-size: 64px;
  }

  .weather-art,
  .current-weather .weather-art {
    width: 58px;
    height: 58px;
  }

  .news-list-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 11px;
  }

  .news-list-media {
    width: 72px;
    height: 66px;
  }

  .news-list-arrow {
    display: none;
  }
}

/* Weather-aware traffic planner */
.traffic-card {
  display: flex;
  align-items: center;
  gap: 16px;
  border-color: rgba(85, 198, 255, 0.28);
}

.traffic-summary {
  display: contents;
}

.traffic-summary > div {
  min-width: 0;
  flex: 1;
}

.traffic-summary h3 {
  margin-top: 3px;
  font-size: 16px;
}

.traffic-summary p {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.traffic-icon {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: rgba(85, 198, 255, 0.11);
  color: var(--cyan-soft);
}

.traffic-icon .icon {
  width: 28px;
  height: 28px;
}

.traffic-state,
.traffic-condition {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.traffic-state {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid rgba(85, 198, 255, 0.22);
  background: rgba(85, 198, 255, 0.08);
  color: var(--cyan-soft);
}

.traffic-planner {
  display: none;
}

#traffic.is-featured {
  display: grid;
  align-content: center;
  gap: clamp(20px, 2.8vh, 28px);
}

#traffic.is-featured .traffic-summary {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

#traffic.is-featured .traffic-icon {
  width: 64px;
  height: 64px;
  border-radius: 19px;
}

#traffic.is-featured .traffic-icon .icon {
  width: 36px;
  height: 36px;
}

#traffic.is-featured .traffic-summary h3 {
  font-size: clamp(24px, 2.4vw, 34px);
}

#traffic.is-featured .traffic-summary p {
  max-width: 620px;
  font-size: clamp(14px, 1.15vw, 16px);
}

#traffic.is-featured .traffic-planner {
  display: grid;
  gap: 16px;
}

.traffic-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.traffic-form label {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: var(--cyan-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.traffic-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 13px;
  outline: 0;
  background: rgba(3, 24, 35, 0.48);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.traffic-form input:focus {
  border-color: rgba(85, 198, 255, 0.72);
  background: rgba(3, 24, 35, 0.66);
  box-shadow: 0 0 0 3px rgba(85, 198, 255, 0.12);
}

.traffic-autocomplete {
  position: relative;
  display: block;
  min-width: 0;
}

.traffic-suggestions {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 80;
  width: 100%;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(158, 221, 239, 0.28);
  border-radius: 14px;
  background: rgba(5, 29, 39, 0.98);
  box-shadow: 0 20px 46px rgba(0, 12, 18, 0.48);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.traffic-suggestions[hidden] {
  display: none;
}

.traffic-suggestion {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 9px 11px;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  transition: background-color 160ms ease, color 160ms ease;
}

.traffic-suggestion:hover,
.traffic-suggestion.is-active {
  background: rgba(85, 198, 255, 0.13);
  color: white;
}

.traffic-suggestion > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.traffic-suggestion strong,
.traffic-suggestion small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: normal;
  text-transform: none;
}

.traffic-suggestion strong {
  font-size: 12px;
  line-height: 1.35;
}

.traffic-suggestion small,
.traffic-suggestion-status {
  color: var(--text-subtle);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
}

.traffic-suggestion-status {
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 10px 11px;
  letter-spacing: normal;
  text-transform: none;
}

.traffic-swap,
.traffic-submit {
  min-height: 46px;
  border-radius: 13px;
}

.traffic-swap {
  width: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(85, 198, 255, 0.2);
  background: rgba(85, 198, 255, 0.08);
  color: var(--cyan-soft);
}

.traffic-swap .icon {
  width: 19px;
  height: 19px;
  transform: rotate(180deg);
}

.traffic-submit {
  padding-inline: 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: white;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(190, 14, 43, 0.24);
}

.traffic-submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

.traffic-result {
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(260px, 1fr);
  gap: 16px 22px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(3, 24, 35, 0.38);
}

.traffic-route-head {
  display: grid;
  align-content: center;
  justify-items: start;
}

.traffic-condition {
  padding: 6px 10px;
  background: rgba(148, 177, 194, 0.11);
  color: var(--text-muted);
}

.traffic-condition > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.traffic-condition.is-clear { background: rgba(64, 214, 162, 0.12); color: #8eeac9; }
.traffic-condition.is-moderate { background: rgba(246, 189, 75, 0.13); color: #f6cc76; }
.traffic-condition.is-heavy,
.traffic-condition.is-unavailable { background: rgba(241, 66, 91, 0.13); color: #ff8ca0; }

.traffic-route-head > strong {
  margin-top: 12px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1;
}

.traffic-route-head > p {
  margin-top: 9px;
  color: var(--text-muted);
  font-size: 12px;
}

.traffic-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.traffic-metrics div {
  min-width: 0;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
}

.traffic-metrics dt {
  color: var(--text-subtle);
  font-size: 10px;
}

.traffic-metrics dd {
  margin-top: 5px;
  font-size: 17px;
  font-weight: 800;
}

.traffic-metrics .traffic-recommended-metric {
  border: 1px solid rgba(85, 198, 255, 0.18);
  background: rgba(85, 198, 255, 0.075);
}

.traffic-recommended-metric dd {
  color: var(--cyan-soft);
}

.traffic-recommended-metric small {
  display: block;
  margin-top: 3px;
  color: var(--text-subtle);
  font-size: 9px;
  line-height: 1.2;
}

.traffic-flow {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.traffic-flow span {
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 177, 194, 0.22);
}

.traffic-flow[data-level="clear"] span { background: #40d6a2; }
.traffic-flow[data-level="moderate"] span:nth-child(-n+3) { background: #f6bd4b; }
.traffic-flow[data-level="moderate"] span:nth-child(n+4) { background: #ee8b4a; }
.traffic-flow[data-level="heavy"] span:nth-child(-n+2) { background: #f6bd4b; }
.traffic-flow[data-level="heavy"] span:nth-child(n+3) { background: #f1425b; }

.traffic-weather {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan-soft);
}

.traffic-weather .icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.traffic-weather p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.traffic-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.traffic-actions a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(85, 198, 255, 0.24);
  border-radius: 12px;
  color: var(--cyan-soft);
  font-size: 12px;
  font-weight: 800;
}

.traffic-actions a[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.42;
}

.traffic-actions .icon {
  width: 16px;
  height: 16px;
}

.traffic-actions small {
  color: var(--text-subtle);
  font-size: 10px;
}

[data-panel="traffic"] { view-transition-name: dashboard-traffic; }

::view-transition-group(dashboard-traffic) {
  animation-duration: 280ms;
  animation-timing-function: var(--ease);
}

@media (min-width: 931px) {
  .dashboard-grid {
    grid-template-rows: minmax(165px, 1.1fr) minmax(120px, 0.62fr) minmax(135px, 0.7fr) minmax(170px, 0.95fr);
  }

  .map-card { grid-column: 1; grid-row: 1 / 5; }
  #kualiti { grid-column: 2; grid-row: 1; }
  #activity { grid-column: 2; grid-row: 2; }
  #traffic { grid-column: 2; grid-row: 3; }
  #amaran { grid-column: 2; grid-row: 4; }

  .dashboard-grid[data-feature="kualiti"] .map-card { grid-column: 2; grid-row: 1; }
  .dashboard-grid[data-feature="kualiti"] #kualiti { grid-column: 1; grid-row: 1 / 5; }
  .dashboard-grid[data-feature="activity"] .map-card { grid-column: 2; grid-row: 2; }
  .dashboard-grid[data-feature="activity"] #activity { grid-column: 1; grid-row: 1 / 5; }
  .dashboard-grid[data-feature="traffic"] .map-card { grid-column: 2; grid-row: 3; }
  .dashboard-grid[data-feature="traffic"] #traffic { grid-column: 1; grid-row: 1 / 5; }
  .dashboard-grid[data-feature="amaran"] .map-card { grid-column: 2; grid-row: 4; }
  .dashboard-grid[data-feature="amaran"] #amaran { grid-column: 1; grid-row: 1 / 5; }
}

@media (max-width: 930px) and (prefers-reduced-motion: no-preference) {
  ::view-transition-group(dashboard-traffic) {
    animation-duration: 460ms;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  }

  ::view-transition-old(dashboard-traffic) {
    animation: dashboard-panel-content-out 150ms ease-in both;
    mix-blend-mode: normal;
  }

  ::view-transition-new(dashboard-traffic) {
    animation: dashboard-panel-content-in 360ms 70ms cubic-bezier(0.22, 1, 0.36, 1) both;
    mix-blend-mode: normal;
  }
}

@media (max-width: 700px) {
  #traffic.is-featured .traffic-summary {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
  }

  #traffic.is-featured .traffic-state {
    grid-column: 2;
    justify-self: start;
  }

  .traffic-form {
    grid-template-columns: 1fr 44px;
  }

  .traffic-form label {
    grid-column: 1;
  }

  .traffic-form label:first-of-type {
    grid-row: 1;
  }

  .traffic-form label:nth-of-type(2) {
    grid-row: 2;
  }

  .traffic-swap {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    transform: rotate(90deg);
  }

  .traffic-submit {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .traffic-result {
    grid-template-columns: 1fr;
    padding: 16px;
  }

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

  .traffic-flow,
  .traffic-weather,
  .traffic-actions {
    grid-column: 1;
  }

  .traffic-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(dashboard-traffic) {
    animation-duration: 0.01ms;
  }
}

@media (max-width: 930px) and (max-height: 600px) and (orientation: landscape) {
  .hero {
    padding-top: calc(var(--header-height) + 8px);
  }

  .hero-grid {
    padding-bottom: 28px;
  }

  .map-frame {
    min-height: 230px;
    aspect-ratio: 16 / 9;
  }

  .featured-news {
    min-height: 400px;
  }
}

/* Shareable report cards */
.weather-card-toolbar,
.card-heading-actions,
.share-dialog-header,
.share-dialog-actions {
  display: flex;
  align-items: center;
}

.weather-card-toolbar,
.share-dialog-header {
  justify-content: space-between;
  gap: 16px;
}

.card-heading-actions {
  gap: 8px;
}

.card-share-button,
.share-action-primary,
.share-action-secondary {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(166, 226, 255, 0.28);
  border-radius: 999px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  transition: background-color 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.card-share-button {
  padding: 0 14px;
  background: rgba(85, 198, 255, 0.09);
}

.card-share-button:hover,
.card-share-button:active {
  border-color: rgba(166, 226, 255, 0.55);
  background: rgba(85, 198, 255, 0.17);
}

.card-share-button .icon,
.share-dialog-actions .icon {
  width: 18px;
  height: 18px;
}

.compact-share-button {
  flex: 0 0 auto;
}

.activity-summary > div:nth-child(2) {
  min-width: 0;
}

#activity.is-featured .activity-summary {
  grid-template-columns: 82px minmax(0, 1fr) auto;
}

#activity:not(.is-featured) {
  gap: 12px;
  padding: 14px 16px;
}

#activity:not(.is-featured) .activity-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
}

#activity:not(.is-featured) .activity-icon .icon {
  width: 24px;
  height: 24px;
}

#activity:not(.is-featured) .eyebrow {
  white-space: nowrap;
}

#activity:not(.is-featured) h3 {
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.3;
}

#activity:not(.is-featured) p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#activity:not(.is-featured) .compact-share-button {
  width: 44px;
  padding: 0;
}

#activity:not(.is-featured) .compact-share-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.share-dialog {
  width: min(920px, calc(100% - 32px));
  max-height: min(880px, calc(100dvh - 32px));
  padding: 0;
  overflow: auto;
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  background: #071b2a;
  box-shadow: 0 30px 100px rgba(0, 7, 14, 0.72);
  color: var(--text);
}

.share-dialog::backdrop {
  background: rgba(1, 9, 16, 0.72);
  backdrop-filter: blur(8px);
}

.share-dialog[open] {
  animation: share-dialog-in 220ms var(--ease) both;
}

.share-dialog-shell {
  padding: clamp(18px, 3vw, 32px);
}

.share-dialog-header h2 {
  margin-top: 4px;
  font-size: clamp(21px, 3vw, 28px);
}

.share-dialog-close {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
}

.share-type-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 22px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.035);
}

.share-type-picker button {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  transition: background-color 180ms ease, color 180ms ease;
}

.share-type-picker button[aria-pressed="true"] {
  background: rgba(85, 198, 255, 0.16);
  color: white;
}

.share-card-preview {
  position: relative;
  width: min(100%, 400px);
  aspect-ratio: 4 / 5;
  margin: 24px auto 0;
  padding: clamp(24px, 5vw, 38px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 26px;
  background: linear-gradient(155deg, #123f5c 0%, #071b2a 54%, #05131f 100%);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

.share-card-preview.type-activity {
  background: linear-gradient(155deg, #155444 0%, #082b2d 54%, #05191f 100%);
}

.share-card-preview.type-air {
  background: linear-gradient(155deg, #4e3e19 0%, #17343b 54%, #071b2a 100%);
}

.share-card-video,
.share-card-image,
.share-card-video-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.share-card-video {
  z-index: -3;
  object-fit: cover;
  opacity: 0;
  transition: opacity 220ms ease;
}

.share-card-image {
  z-index: -3;
  object-fit: cover;
  opacity: 0;
  transition: opacity 220ms ease;
}

.share-card-video-scrim {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(20, 52, 58, 0.18), rgba(4, 18, 27, 0.56)),
    linear-gradient(90deg, rgba(1, 10, 18, 0.35), transparent 62%);
  opacity: 0;
}

.share-card-preview.type-weather .share-card-video,
.share-card-preview.type-weather .share-card-video-scrim {
  opacity: 1;
}

.share-card-preview.type-activity .share-card-image,
.share-card-preview.type-activity .share-card-video-scrim {
  opacity: 1;
}

.share-card-preview.type-activity .share-card-video-scrim {
  background: linear-gradient(180deg, rgba(5, 36, 29, 0.32), rgba(3, 23, 19, 0.67) 58%, rgba(2, 14, 12, 0.9));
}

.share-card-glow {
  position: absolute;
  z-index: -1;
  width: 280px;
  height: 280px;
  top: -100px;
  right: -80px;
  border-radius: 50%;
  background: rgba(85, 198, 255, 0.27);
  filter: blur(8px);
}

.type-weather .share-card-glow { opacity: 0; }
.type-activity .share-card-glow { background: rgba(54, 211, 162, 0.25); }
.type-air .share-card-glow { background: rgba(241, 184, 91, 0.25); }

.share-card-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.share-card-brand img {
  width: auto;
  height: 38px;
  object-fit: contain;
}

.share-card-brand span {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 700;
}

.share-card-kicker {
  margin-top: clamp(28px, 7vw, 48px);
  color: var(--cyan-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.share-card-value {
  display: block;
  margin-top: 8px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(48px, 13vw, 74px);
  letter-spacing: -0.055em;
  line-height: 1;
}

.share-card-preview.type-activity.status-caution .share-card-value {
  font-size: clamp(35px, 10vw, 40px);
  letter-spacing: -0.035em;
}

.share-card-preview h3 {
  margin-top: 14px;
  font-size: clamp(21px, 5.8vw, 30px);
  line-height: 1.14;
}

.share-card-summary {
  display: -webkit-box;
  margin-top: 12px;
  overflow: hidden;
  color: #d6e3eb;
  font-size: clamp(12px, 3.3vw, 14px);
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.share-card-metrics {
  position: absolute;
  right: clamp(24px, 5vw, 38px);
  bottom: 58px;
  left: clamp(24px, 5vw, 38px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.share-card-metrics div {
  min-width: 0;
}

.share-card-metrics dt {
  color: rgba(214, 227, 235, 0.7);
  font-size: 9px;
}

.share-card-metrics dd {
  margin-top: 4px;
  overflow: hidden;
  font-size: clamp(11px, 3vw, 14px);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-card-stamp {
  position: absolute;
  bottom: 24px;
  left: clamp(24px, 5vw, 38px);
  color: rgba(214, 227, 235, 0.58);
  font-size: 9px;
}

.share-dialog-actions {
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.share-action-primary,
.share-action-secondary {
  min-height: 48px;
  padding: 0 20px;
}

.share-action-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 10px 24px rgba(193, 16, 45, 0.28);
}

.share-action-secondary {
  background: rgba(255, 255, 255, 0.06);
}

.share-action-primary:disabled,
.share-action-secondary:disabled {
  cursor: wait;
  opacity: 0.5;
}

.share-dialog-note {
  margin-top: 14px;
  color: var(--text-subtle);
  font-size: 11px;
  text-align: center;
}

@keyframes share-dialog-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 600px) {
  .compact-share-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .compact-share-button {
    width: 44px;
    padding: 0;
  }

  .share-dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 20px;
  }

  .share-dialog-shell {
    padding: 16px;
  }

  .share-type-picker button {
    padding-inline: 6px;
    font-size: 11px;
  }

  .share-dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  .share-card-preview {
    border-radius: 20px;
  }

  .share-card-summary {
    -webkit-line-clamp: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .share-dialog[open] {
    animation: none;
  }

  .share-card-video {
    transition: none;
  }

  .share-card-image {
    transition: none;
  }
}

/* One fixed background treatment keeps every section visually continuous. */
.site-background::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(2, 17, 25, 0.3) 0%, rgba(3, 23, 31, 0.46) 56%, rgba(2, 15, 23, 0.64) 100%),
    linear-gradient(90deg, rgba(1, 13, 20, 0.2), rgba(5, 35, 42, 0.06) 58%, rgba(2, 17, 25, 0.18));
  pointer-events: none;
}

.site-background-fallback {
  z-index: 0;
  background:
    radial-gradient(circle at 78% 12%, rgba(74, 151, 172, 0.28), transparent 34%),
    radial-gradient(circle at 18% 62%, rgba(21, 88, 91, 0.34), transparent 42%),
    linear-gradient(165deg, #123847 0%, #0a2836 48%, #061923 100%);
}

.site-background-video {
  display: block;
  z-index: 1;
  object-position: center;
}

.hero::before,
.dashboard::after,
.news-section::after,
.hero-scrim,
.mode-day .hero-scrim,
.mode-storm .hero-scrim,
.mode-night .hero-scrim,
.dashboard-scrim,
.news-scrim {
  background: transparent;
}

/* Final compact-screen overrides: keep late component rules from defeating mobile layouts. */
@media (max-width: 930px) {

  .dashboard-grid,
  .info-card,
  .forecast-card,
  .news-layout,
  .news-list-card {
    min-width: 0;
  }
}

@media (max-width: 600px) {
  .hero-inner,
  .hero-window,
  .hero-canvas,
  .hero-grid,
  .current-weather,
  .forecast-card {
    min-width: 0;
    max-width: 100%;
  }

  .current-weather.glass-panel,
  .forecast-card.glass-panel {
    width: 100%;
  }

  #weatherHeading,
  .weather-subtitle,
  .current-weather .summary {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  #weatherHeading {
    display: block;
  }

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

  .weather-metrics dt,
  .weather-metrics dd {
    overflow-wrap: anywhere;
  }

  #activity.is-featured .activity-summary {
    grid-template-columns: 48px minmax(0, 1fr) 44px;
    align-items: start;
    gap: 12px;
  }

  #activity.is-featured .activity-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  #activity.is-featured .activity-icon .icon {
    width: 26px;
    height: 26px;
  }

  #activity.is-featured .activity-summary .eyebrow {
    font-size: 10px;
    letter-spacing: 0.1em;
    white-space: nowrap;
  }

  #activity.is-featured .activity-summary h3 {
    margin-top: 3px;
    font-size: 18px;
    line-height: 1.25;
  }

  #activity.is-featured .activity-summary p {
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.45;
  }

  .forecast-card .card-heading {
    gap: 8px;
  }

  .forecast-card .text-button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .week-row {
    grid-template-columns: minmax(62px, auto) 26px minmax(44px, 1fr) auto;
    gap: 8px;
    font-size: 12px;
  }

  .week-row .icon {
    width: 20px;
    height: 20px;
  }

  .featured-news-content {
    inset-inline: 18px;
  }
}

@media (max-width: 380px) {
  .location-actions {
    gap: 8px;
  }

  .current-weather .location-button strong {
    font-size: 18px;
  }

  .location-button .chevron {
    display: none;
  }

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

  .weather-metrics div:nth-child(2) {
    border-right: 0;
  }

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

  #activity.is-featured .activity-summary {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 8px;
  }

  #activity.is-featured .activity-icon {
    width: 44px;
    height: 44px;
  }

  #activity.is-featured .activity-summary h3 {
    font-size: 17px;
  }

  #activity.is-featured .activity-summary p {
    font-size: 12px;
  }

  .forecast-card .card-heading h2 {
    font-size: 19px;
  }

  .forecast-card .text-button {
    font-size: 10px;
  }
}

/* Calm traffic states: reveal detailed metrics only after a successful route check. */
.traffic-result[data-state="idle"],
.traffic-result[data-state="loading"],
.traffic-result[data-state="unavailable"] {
  grid-template-columns: 1fr;
  padding: 18px;
}

.traffic-result[data-state="idle"] .traffic-route-head,
.traffic-result[data-state="loading"] .traffic-route-head,
.traffic-result[data-state="unavailable"] .traffic-route-head {
  min-height: 72px;
  align-content: center;
}

.traffic-result[data-state="idle"] .traffic-route-head > strong,
.traffic-result[data-state="loading"] .traffic-route-head > strong,
.traffic-result[data-state="unavailable"] .traffic-route-head > strong,
.traffic-result[data-state="idle"] .traffic-metrics,
.traffic-result[data-state="loading"] .traffic-metrics,
.traffic-result[data-state="unavailable"] .traffic-metrics,
.traffic-result[data-state="idle"] .traffic-flow,
.traffic-result[data-state="loading"] .traffic-flow,
.traffic-result[data-state="unavailable"] .traffic-flow,
.traffic-result[data-state="idle"] .traffic-weather,
.traffic-result[data-state="loading"] .traffic-weather,
.traffic-result[data-state="unavailable"] .traffic-weather,
.traffic-result[data-state="idle"] .traffic-actions,
.traffic-result[data-state="loading"] .traffic-actions,
.traffic-result[data-state="unavailable"] .traffic-actions {
  display: none;
}

.traffic-result[data-state="success"] .traffic-metrics {
  align-self: start;
}

#traffic.is-featured {
  align-content: center;
}

@media (min-width: 931px) {
  .dashboard-grid [data-panel]:not(.is-featured) {
    align-self: center;
  }

  .dashboard-grid .info-card:not(.is-featured) {
    width: 100%;
    padding: 15px 17px;
  }

  .dashboard-grid .info-card:not(.is-featured) .compact-share-button {
    display: none;
  }

  #kualiti:not(.is-featured) .air-quality {
    gap: 12px;
    margin-top: 10px;
  }

  #kualiti:not(.is-featured) .air-gauge {
    width: 58px;
    height: 58px;
    border-width: 6px;
  }

  #kualiti:not(.is-featured) .air-scale,
  #kualiti:not(.is-featured) .scale-labels {
    display: none;
  }

  #kualiti:not(.is-featured) .air-quality p,
  #activity:not(.is-featured) .activity-summary p,
  #traffic:not(.is-featured) .traffic-summary p,
  #amaran:not(.is-featured) .alert-summary p {
    display: none;
  }

  #activity:not(.is-featured),
  #traffic:not(.is-featured),
  #amaran:not(.is-featured) {
    min-height: 92px;
  }

  #traffic:not(.is-featured) .traffic-state {
    padding-inline: 8px;
  }

  .dashboard-grid:not([data-feature="map"]) .map-card:not(.is-featured) {
    display: block;
    width: 100%;
    align-self: center;
  }

  .dashboard-grid:not([data-feature="map"]) .map-card:not(.is-featured) .map-frame {
    display: none;
  }
}

@media (max-width: 600px) {
  #traffic.is-featured .traffic-summary h3 {
    font-size: 20px;
  }

  #traffic.is-featured .traffic-summary p {
    font-size: 13px;
  }

  .traffic-result[data-state="idle"],
  .traffic-result[data-state="loading"],
  .traffic-result[data-state="unavailable"] {
    padding: 14px;
  }
}

/* Balanced desktop rail: restore useful context without the original density. */
@media (min-width: 931px) {
  .dashboard-grid {
    grid-template-rows: repeat(4, minmax(130px, 1fr));
  }

  .dashboard-grid #kualiti:not(.is-featured),
  .dashboard-grid #activity:not(.is-featured),
  .dashboard-grid #traffic:not(.is-featured),
  .dashboard-grid #amaran:not(.is-featured),
  .dashboard-grid .map-card:not(.is-featured) {
    width: 100%;
    height: 100%;
    min-height: 0;
    align-self: stretch;
    padding: 18px 20px;
    border: 1px solid rgba(210, 239, 246, 0.24);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(132, 156, 151, 0.68), rgba(39, 65, 62, 0.78));
    box-shadow: 0 16px 38px rgba(2, 21, 26, 0.14);
  }

  .dashboard-grid #kualiti:not(.is-featured) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px 14px;
  }

  .dashboard-grid #kualiti:not(.is-featured) .card-heading {
    display: contents;
  }

  .dashboard-grid #kualiti:not(.is-featured) .card-heading > div:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .dashboard-grid #kualiti:not(.is-featured) .card-heading-actions {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }

  .dashboard-grid #kualiti:not(.is-featured) .air-quality {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
  }

  .dashboard-grid #kualiti:not(.is-featured) .air-gauge {
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    border-width: 6px;
  }

  .dashboard-grid #kualiti:not(.is-featured) .air-gauge strong {
    font-size: 22px;
  }

  .dashboard-grid #kualiti:not(.is-featured) .air-quality > div:last-child {
    display: block;
    min-width: 0;
  }

  .dashboard-grid #kualiti:not(.is-featured) .air-quality strong {
    display: block;
    margin-bottom: 3px;
    font-size: 15px;
  }

  .dashboard-grid #kualiti:not(.is-featured) .air-quality p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .dashboard-grid #activity:not(.is-featured) .activity-summary,
  .dashboard-grid #traffic:not(.is-featured) .traffic-summary,
  .dashboard-grid #amaran:not(.is-featured) .alert-summary {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    width: 100%;
    height: 100%;
  }

  .dashboard-grid #activity:not(.is-featured) .activity-icon,
  .dashboard-grid #traffic:not(.is-featured) .traffic-icon {
    width: 54px;
    height: 54px;
    margin: 0;
    border-radius: 16px;
  }

  .dashboard-grid #activity:not(.is-featured) .activity-summary > div:nth-child(2),
  .dashboard-grid #traffic:not(.is-featured) .traffic-summary > div:nth-child(2),
  .dashboard-grid #amaran:not(.is-featured) .alert-summary > div:nth-child(2) {
    min-width: 0;
  }

  .dashboard-grid #kualiti:not(.is-featured) .eyebrow,
  .dashboard-grid #activity:not(.is-featured) .eyebrow,
  .dashboard-grid #traffic:not(.is-featured) .eyebrow,
  .dashboard-grid #amaran:not(.is-featured) .eyebrow {
    display: block;
    margin: 0 0 5px;
    font-size: 10px;
    letter-spacing: 0.13em;
  }

  .dashboard-grid #kualiti:not(.is-featured) h3,
  .dashboard-grid #activity:not(.is-featured) h3,
  .dashboard-grid #traffic:not(.is-featured) h3,
  .dashboard-grid #amaran:not(.is-featured) h3,
  .dashboard-grid .map-card:not(.is-featured) h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.25;
    white-space: normal;
  }

  .dashboard-grid #activity:not(.is-featured) .activity-summary p:not(.eyebrow),
  .dashboard-grid #traffic:not(.is-featured) .traffic-summary p:not(.eyebrow),
  .dashboard-grid #amaran:not(.is-featured) .alert-summary p:not(.eyebrow) {
    display: -webkit-box;
    margin: 5px 0 0;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .dashboard-grid #traffic:not(.is-featured) .traffic-state {
    align-self: center;
    justify-self: end;
    margin: 0;
  }

  .dashboard-grid #amaran:not(.is-featured) {
    border-color: rgba(255, 192, 70, 0.34);
  }

  .dashboard-grid #amaran:not(.is-featured) .alert-summary > .icon {
    width: 54px;
    height: 54px;
    box-sizing: border-box;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 184, 45, 0.11);
  }

  .dashboard-grid #amaran:not(.is-featured) .alert-summary > a {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
  }

  .dashboard-grid:not([data-feature="map"]) .map-card:not(.is-featured),
  .dashboard-grid .map-card:not(.is-featured) {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    padding: 18px 20px;
  }

  .dashboard-grid .map-card:not(.is-featured) .map-header {
    height: auto;
    padding: 0;
  }

  .dashboard-grid .map-card:not(.is-featured) .map-title {
    gap: 13px;
  }

  .dashboard-grid .map-card:not(.is-featured) .map-title > span {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 14px;
  }

  .dashboard-grid .map-card:not(.is-featured)::after {
    content: "Radar hujan untuk kawasan pilihan anda";
    align-self: start;
    margin-top: 8px;
    padding-left: 61px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
  }
}

/* Shared anatomy for every card in the desktop right rail. */
@media (min-width: 931px) {
  .dashboard-grid [data-panel]:not(.is-featured) {
    transition: transform 220ms var(--ease), border-color 220ms ease, box-shadow 220ms ease;
  }

  .dashboard-grid [data-panel]:not(.is-featured):hover {
    transform: translateY(-2px);
    border-color: rgba(151, 222, 242, 0.42);
    box-shadow: 0 18px 42px rgba(2, 21, 26, 0.2);
  }

  .dashboard-grid #kualiti:not(.is-featured) {
    grid-template-columns: 54px minmax(0, 1fr) 44px;
    grid-template-rows: auto auto;
    align-content: center;
    align-items: center;
    gap: 3px 15px;
  }

  .dashboard-grid #kualiti:not(.is-featured) .air-gauge {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 54px;
    height: 54px;
    flex-basis: 54px;
    border-width: 6px;
  }

  .dashboard-grid #kualiti:not(.is-featured) .air-gauge span {
    max-width: 100%;
    font-size: 17px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.04em;
  }

  .dashboard-grid #kualiti:not(.is-featured) .air-gauge small {
    max-width: 38px;
    margin-top: 1px;
    font-size: 6.5px;
    line-height: 1;
  }

  .dashboard-grid #kualiti:not(.is-featured) .card-heading > div:first-child {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .dashboard-grid #kualiti:not(.is-featured) .card-heading-actions {
    display: none;
  }

  .dashboard-grid #kualiti:not(.is-featured) .card-heading-actions .icon-button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 14px;
  }

  .dashboard-grid #kualiti:not(.is-featured) .air-quality {
    display: contents;
  }

  .dashboard-grid #kualiti:not(.is-featured) .air-quality > div:last-child {
    grid-column: 2;
    grid-row: 2;
  }

  .dashboard-grid #kualiti:not(.is-featured) .air-quality strong {
    margin: 0;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-grid #kualiti:not(.is-featured) .air-quality p {
    display: none;
  }

  .dashboard-grid #activity:not(.is-featured) .compact-share-button {
    display: none;
  }

  .dashboard-grid #activity:not(.is-featured) .compact-share-button span {
    display: none;
  }

  .dashboard-grid #activity:not(.is-featured) .compact-share-button .icon {
    width: 19px;
    height: 19px;
  }

  .dashboard-grid #traffic:not(.is-featured) .traffic-state {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding-inline: 11px;
  }

  .dashboard-grid #amaran:not(.is-featured) {
    border-color: rgba(210, 239, 246, 0.24);
  }

  .dashboard-grid #amaran:not(.is-featured):hover {
    border-color: rgba(255, 192, 70, 0.46);
  }

  .dashboard-grid #amaran:not(.is-featured) .alert-summary > a,
  .dashboard-grid #activity:not(.is-featured) .compact-share-button,
  .dashboard-grid #kualiti:not(.is-featured) .card-heading-actions .icon-button {
    background: rgba(9, 42, 54, 0.38);
    border: 1px solid rgba(180, 226, 237, 0.18);
  }

  .dashboard-grid .map-card:not(.is-featured) .map-header {
    min-height: 54px;
  }

  .dashboard-grid .map-card:not(.is-featured) .map-title > span {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
    border-radius: 16px;
  }

  .dashboard-grid .map-card:not(.is-featured)::after {
    padding-left: 67px;
  }

  .dashboard-grid .map-card:not(.is-featured) .map-meta {
    flex: 0 0 auto;
  }

  .dashboard-grid .map-card:not(.is-featured) .source-badge {
    display: none;
  }
}
