/* Light by default; dark from the system setting or the toggle (saved as `theme`) */
:root {
  --bg: #eef3f9;
  --bg2: #f5f8fc;
  --card: #ffffff;
  --card2: #e9eff7;
  --card-end: #fbfcfe;
  --line: #d3ddeb;
  --text: #12233d;
  --muted: #566881;
  --accent: #0a6fc2;
  --accent2: #0d7d60;
  --warm: #c8640a;
  --cold: #1f6fc4;
  --glow: #d7e6fa;
  --bar-bg: rgba(255, 255, 255, .9);
  --overlay: rgba(255, 255, 255, .92);
  --map-bg: #e4eaf2;
  --error: #c62828;
  --on-accent: #fff;
  --shadow: 0 1px 2px rgba(18, 35, 61, .05), 0 8px 24px -14px rgba(18, 35, 61, .2);
  --yellow: #ffd83d;
  --amber: #ff9500;
  --red: #e5232f;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1424;
    --bg2: #0f1b30;
    --card: #13223b;
    --card2: #182a47;
    --card-end: #111e34;
    --line: #24395c;
    --text: #e8eef8;
    --muted: #93a4c0;
    --accent: #4fb3ff;
    --accent2: #7be0c3;
    --warm: #ffb35c;
    --cold: #6ab8ff;
    --glow: #17325a;
    --bar-bg: rgba(11, 20, 36, .92);
    --overlay: rgba(11, 20, 36, .88);
    --map-bg: #0e1a2d;
    --error: #ff9a9a;
    --on-accent: #04223d;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1424;
  --bg2: #0f1b30;
  --card: #13223b;
  --card2: #182a47;
  --card-end: #111e34;
  --line: #24395c;
  --text: #e8eef8;
  --muted: #93a4c0;
  --accent: #4fb3ff;
  --accent2: #7be0c3;
  --warm: #ffb35c;
  --cold: #6ab8ff;
  --glow: #17325a;
  --bar-bg: rgba(11, 20, 36, .92);
  --overlay: rgba(11, 20, 36, .88);
  --map-bg: #0e1a2d;
  --error: #ff9a9a;
  --on-accent: #04223d;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 10% -10%, var(--glow) 0%, transparent 60%), var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  min-height: 100vh;
}
a { color: var(--accent); }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.25; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.05rem; font-weight: 600; }
h3 { font-size: .9rem; font-weight: 600; color: var(--muted); margin-top: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.lead { font-size: 1.05rem; margin-bottom: .5rem; }
[hidden] { display: none !important; }

/* ---------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 2000;
  display: flex; align-items: center; gap: .6rem;
  padding: .7rem 1rem;
  background: var(--bar-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .4rem; font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.brand-icon { font-size: 1.4rem; }
.search { position: relative; flex: 1; max-width: 560px; }
.search input {
  width: 100%; padding: .6rem .9rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg2); color: var(--text); font: inherit;
}
.search input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: .3rem;
  list-style: none; background: var(--card2); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25); max-height: 60vh; overflow: auto;
}
.search-results li { padding: .55rem .7rem; border-radius: 8px; cursor: pointer; }
.search-results li:hover, .search-results li.active { background: var(--line); }
.search-results .sub { color: var(--muted); font-size: .82rem; }
.units { display: flex; gap: .3rem; }
/* Theme toggle: sun in light mode, moon in dark */
.theme-btn { margin-left: auto; display: inline-grid; place-items: center; }
.theme-btn svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}
/* Link home to meox.me: a black tile in both themes */
a.btn.home-link { display: inline-grid; place-items: center; background: #0d0e12; color: #fff; border-color: rgba(255, 255, 255, .1); }
a.btn.home-link svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
select, .btn {
  background: var(--card2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: .45rem .7rem; font: inherit; cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn.small { padding: .25rem .6rem; font-size: .82rem; }
a.btn { text-decoration: none; display: inline-block; }
.icon-btn { width: 38px; height: 38px; padding: 0; font-size: 1.1rem; border-radius: 50%; }
#favBtn.on { color: var(--yellow); }

.favourites { display: flex; gap: .4rem; flex-wrap: wrap; padding: .5rem 1rem 0; }
.favourites:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .7rem;
  border-radius: 999px; background: var(--card); border: 1px solid var(--line); cursor: pointer; font-size: .85rem;
}
.chip:hover { border-color: var(--accent); }
.chip .x { opacity: .5; } .chip .x:hover { opacity: 1; }

/* ---------- alert banner */
.alert-banner { margin: .7rem 1rem 0; display: grid; gap: .4rem; }
.banner {
  display: flex; gap: .8rem; align-items: center; padding: .7rem 1rem; border-radius: 10px;
  font-weight: 600; cursor: pointer; color: #111;
}
.banner .b-icon { font-size: 1.4rem; }
.banner .b-sub { font-weight: 400; font-size: .85rem; }
.banner.red { background: var(--red); color: #fff; animation: pulse 2s infinite; }
.banner.amber { background: var(--amber); }
.banner.yellow { background: var(--yellow); }
.banner.flood { background: #1f6fd1; color: #fff; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(229,35,47,.6); } 50% { box-shadow: 0 0 0 8px rgba(229,35,47,0); } }

/* ---------- location bar & tabs */
.location-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; padding: 1rem 1rem .4rem; flex-wrap: wrap; }
.location-right { text-align: right; }
.local-time { font-size: 1.1rem; font-weight: 600; }
.tabs {
  display: flex; gap: .2rem; padding: 0 1rem; overflow-x: auto; border-bottom: 1px solid var(--line);
  position: sticky; top: 59px; z-index: 1900; background: var(--bar-bg); backdrop-filter: blur(10px);
  scrollbar-width: none;
}
.tabs button {
  background: none; border: 0; color: var(--muted); font: inherit; font-weight: 500;
  padding: .75rem .85rem; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.pill { display: inline-block; min-width: 1.3rem; padding: 0 .35rem; border-radius: 999px; font-size: .75rem; background: var(--yellow); color: #111; font-weight: 700; text-align: center; }
.pill.amber { background: var(--amber); } .pill.red { background: var(--red); color: #fff; }

main { padding: 1rem; max-width: 1500px; margin: 0 auto; }
.panel { display: none; }
.panel.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }

/* ---------- cards & grid */
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.overview-grid .current, .overview-grid #headlineCard { grid-row: span 2; }
.card {
  background: linear-gradient(180deg, var(--card), var(--card-end));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem;
  box-shadow: var(--shadow);
  min-width: 0;
}
.grid > .card { margin-bottom: 0; }
.card.wide { grid-column: 1 / -1; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .5rem; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.skeleton { height: 120px; border-radius: 10px; background: linear-gradient(90deg, var(--card2), var(--line), var(--card2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.error { color: var(--error); }

/* ---------- current conditions */
.cur-top { display: flex; align-items: center; gap: 1rem; }
.cur-icon { font-size: 4.5rem; line-height: 1; }
.cur-temp { font-size: 4rem; font-weight: 700; line-height: 1; }
.cur-desc { font-size: 1.15rem; font-weight: 500; }
.cur-hilo { color: var(--muted); }
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin-top: 1rem; }
.metric { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem; }
.metric .label { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.metric .value { font-size: 1.15rem; font-weight: 600; }
.metric .sub { color: var(--muted); font-size: .8rem; }
/* Air quality, UV and pollen bands: deeper shades on the light theme so yellow stays readable */
.band-text { color: color-mix(in srgb, var(--band) 58%, #000); }
:root[data-theme="dark"] .band-text { color: var(--band); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .band-text { color: var(--band); } }
.wind-metric { display: flex; gap: .7rem; align-items: center; grid-column: span 2; }
.compass { width: 74px; height: 74px; flex: none; }
.bars3 { display: grid; gap: 3px; margin-top: 4px; }
.bar3 { display: grid; grid-template-columns: 34px 1fr 34px; gap: 6px; align-items: center; font-size: .75rem; color: var(--muted); }
.bar3 .track { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar3 .fill { height: 100%; background: var(--accent); }
.obs-note { margin-top: .8rem; padding: .6rem .7rem; border-radius: 10px; background: rgba(79,179,255,.08); border: 1px dashed var(--line); font-size: .85rem; }

/* ---------- hour strip & daily */
.hour-strip { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: thin; }
.hour {
  flex: none; width: 72px; text-align: center; padding: .5rem .2rem; border-radius: 10px;
  background: var(--bg2); border: 1px solid var(--line); font-size: .82rem;
}
.hour .t { color: var(--muted); }
.hour .i { font-size: 1.6rem; margin: .1rem 0; }
.hour .tp { font-weight: 600; font-size: 1rem; }
.hour .pp { color: var(--accent); }
.hour .wd { color: var(--muted); }
.hour.now { border-color: var(--accent); }

.daily-compact { display: grid; gap: .3rem; }
.dc-row { display: grid; grid-template-columns: 90px 36px 1fr 70px 1fr 110px; align-items: center; gap: .6rem; padding: .35rem .3rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
.dc-row:last-child { border-bottom: 0; }
.dc-row .ic { font-size: 1.4rem; text-align: center; }
.dc-row .desc { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.range { position: relative; height: 6px; border-radius: 3px; background: var(--line); }
.range span { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, var(--cold), var(--warm)); }

.daily-list { display: grid; gap: .6rem; }
.day {
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); overflow: hidden;
}
summary.day-head { list-style: none; }
summary.day-head::-webkit-details-marker { display: none; }
.day-head { display: grid; grid-template-columns: 130px 50px 1fr auto; gap: .8rem; align-items: center; padding: .7rem .9rem; cursor: pointer; }
.day-head:hover { background: var(--card2); }
.day-head .ic { font-size: 2rem; text-align: center; }
.day-head .name { font-weight: 600; }
.day-temps { text-align: right; white-space: nowrap; }
.day-temps .hi { font-size: 1.3rem; font-weight: 700; color: var(--warm); }
.day-temps .lo { font-size: 1.05rem; color: var(--cold); margin-left: .4rem; }
.day-stats { display: flex; flex-wrap: wrap; gap: .3rem 1rem; color: var(--muted); font-size: .84rem; margin-top: .15rem; }
.day-body { padding: .2rem .9rem 1rem; border-top: 1px solid var(--line); }
.day-body .prose { margin: .6rem 0; }
.day-hours { display: flex; gap: .4rem; overflow-x: auto; }
.badge { display: inline-block; padding: .05rem .45rem; border-radius: 6px; font-size: .72rem; font-weight: 600; background: var(--line); color: var(--text); }
.badge.uk { background: #1d4f91; color: #fff; }

/* ---------- segmented control */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.seg button { background: none; border: 0; color: var(--muted); font: inherit; font-size: .85rem; padding: .35rem .7rem; border-radius: 8px; cursor: pointer; }
.seg button.active { background: var(--accent); color: var(--on-accent); font-weight: 600; }

/* ---------- charts & tables */
.chart-box { position: relative; height: 240px; width: 100%; overflow: hidden; }
.chart-box.short { height: 140px; }
#nowcastCard { display: flex; flex-direction: column; }
#nowcastCard .chart-box { flex: 1; min-height: 140px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .85rem; white-space: nowrap; }
.data-table th, .data-table td { padding: .45rem .55rem; text-align: left; border-bottom: 1px solid var(--line); }
.data-table th { color: var(--muted); font-weight: 500; position: sticky; top: 0; background: var(--card); }
.data-table tr.day-sep td { background: var(--card2); font-weight: 600; color: var(--accent2); }
.data-table tr.clickable { cursor: pointer; }
.data-table tr.clickable:hover td { background: var(--card2); }
.data-table .raw td { white-space: normal; font-family: ui-monospace, Menlo, monospace; color: var(--muted); }
.arrow { display: inline-block; transition: transform .2s; }

/* ---------- prose / text forecasts */
.prose p { margin: 0 0 .7rem; }
.prose h3 { color: var(--accent2); margin: 1rem 0 .3rem; font-size: .95rem; }
.prose h3:first-child { margin-top: 0; }
.headline { font-size: 1.1rem; font-weight: 600; margin-bottom: .6rem; }
.text-section { margin-bottom: .8rem; }
.text-section h4 { margin: 0 0 .15rem; color: var(--accent2); font-size: .9rem; }
.text-section p { margin: 0; }
.source-line { margin-top: .7rem; font-size: .8rem; color: var(--muted); }

/* ---------- maps */
.mini-map { height: 260px; border-radius: 10px; overflow: hidden; }
.mid-map { height: 380px; border-radius: 10px; overflow: hidden; }
.map-panel { padding: .8rem; }
.map-controls { display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; margin-bottom: .7rem; align-items: flex-start; }
.control-group label:first-child { display: block; font-size: .75rem; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; margin-bottom: .25rem; }
.checks { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .88rem; }
.checks label { display: flex; gap: .3rem; align-items: center; cursor: pointer; text-transform: none !important; color: var(--text) !important; font-size: .88rem !important; letter-spacing: 0 !important; margin: 0 !important; }
.map-wrap { position: relative; }
.big-map { width: 100%; height: 68vh; min-height: 420px; border-radius: 10px; border: 0; display: block; }
.legend {
  position: absolute; z-index: 500; bottom: 12px; left: 12px; background: var(--overlay);
  padding: .45rem .6rem; border-radius: 8px; font-size: .75rem; border: 1px solid var(--line); max-width: 340px;
}
.legend:empty { display: none; }
.legend .scale { height: 10px; width: 260px; border-radius: 3px; margin: 4px 0 2px; }
.legend .ticks { display: flex; justify-content: space-between; color: var(--muted); }
.timeline { display: flex; gap: .7rem; align-items: center; margin-top: .6rem; }
.timeline input { flex: 1; accent-color: var(--accent); }
.time-label { min-width: 190px; font-variant-numeric: tabular-nums; font-weight: 600; }
.leaflet-container { background: var(--map-bg); font: inherit; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--card2); color: var(--text); }
.leaflet-popup-content { margin: .7rem .9rem; font-size: .85rem; }
.leaflet-control-layers { background: var(--card2) !important; color: var(--text); border: 1px solid var(--line) !important; }
.leaflet-bar a { background: var(--card2); color: var(--text); border-color: var(--line); }
.leaflet-control-attribution { background: var(--overlay) !important; color: var(--muted); }
.leaflet-control-attribution a { color: var(--accent); }
.wind-arrow { pointer-events: none; }
.grid-label { color: #fff; font-size: 11px; font-weight: 600; text-shadow: 0 0 3px #000, 0 0 2px #000; white-space: nowrap; pointer-events: none; }
.stn-label {
  background: rgba(11,20,36,.85); color: #fff; border-radius: 6px; padding: 1px 5px; font-size: 11px; font-weight: 700;
  border: 1px solid; white-space: nowrap; transform: translate(-50%, -50%); display: inline-block;
}
.loc-pin { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(79,179,255,.7); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 14px rgba(79,179,255,0); } 100% { box-shadow: 0 0 0 0 rgba(79,179,255,0); } }
.region-badge { border-radius: 8px; padding: 2px 6px; font-size: 11px; font-weight: 700; color: #111; white-space: nowrap; transform: translate(-50%, -50%); display: inline-block; box-shadow: 0 2px 6px rgba(0,0,0,.4); }

/* ---------- warnings */
.warnings-list { display: grid; gap: .7rem; margin-top: .7rem; }
.warning { border-radius: 12px; padding: .8rem 1rem; border-left: 6px solid; background: var(--bg2); }
.warning.yellow { border-color: var(--yellow); }
.warning.amber { border-color: var(--amber); }
.warning.red { border-color: var(--red); background: rgba(229,35,47,.12); }
.warning.mine { box-shadow: 0 0 0 1px var(--accent) inset; }
.warning h3 { margin: 0 0 .3rem; color: var(--text); font-size: 1rem; }
.warning p { margin: .3rem 0; font-size: .9rem; }
.warning .regions { font-size: .82rem; color: var(--muted); }
.lvl { display: inline-block; padding: .1rem .5rem; border-radius: 6px; font-size: .72rem; font-weight: 700; text-transform: uppercase; color: #111; margin-right: .4rem; }
.lvl.yellow { background: var(--yellow); } .lvl.amber { background: var(--amber); } .lvl.red { background: var(--red); color: #fff; }
.none-box { padding: 1rem; border-radius: 12px; background: rgba(123,224,195,.08); border: 1px solid rgba(123,224,195,.3); }
.counts { display: flex; gap: .6rem; flex-wrap: wrap; }
.count { padding: .4rem .8rem; border-radius: 10px; font-weight: 600; color: #111; }
.count.red { background: var(--red); color: #fff; } .count.amber { background: var(--amber); } .count.yellow { background: var(--yellow); }
.count.zero { background: var(--line); color: var(--muted); }
.warn-key { display: flex; gap: .4rem 1rem; flex-wrap: wrap; align-items: center; margin-top: .5rem; font-size: .8rem; color: var(--muted); }
.key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: -.6rem; }
.key.red { background: var(--red); } .key.amber { background: var(--amber); } .key.yellow { background: var(--yellow); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: -.6rem; }
.dot.metar { background: #4fb3ff; } .dot.citizen { background: #7be0c3; } .dot.gauge { background: #b18cff; } .dot.river { background: #3fd0ff; border: 2px solid #fff; }
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.level { padding: .8rem; border-radius: 10px; color: #111; }
.level p { margin: .3rem 0 0; font-size: .88rem; }
.level.yellow { background: var(--yellow); } .level.amber { background: var(--amber); } .level.red { background: var(--red); color: #fff; }
.flood { padding: .6rem .8rem; border-radius: 10px; background: var(--bg2); border-left: 5px solid #3a8dde; margin-bottom: .5rem; }
.flood.sev1 { border-color: #c0001a; } .flood.sev2 { border-color: #e5232f; } .flood.sev3 { border-color: #ff9500; } .flood.sev4 { border-color: var(--line); opacity: .7; }
.flood details { font-size: .85rem; color: var(--muted); white-space: pre-line; }

/* ---------- stations */
.river { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.river:last-child { border: 0; }
.river-bar { position: relative; height: 8px; border-radius: 4px; background: var(--line); margin: .35rem 0; }
.river-bar .typical { position: absolute; top: 0; bottom: 0; background: rgba(123,224,195,.35); }
.river-bar .now { position: absolute; top: -4px; width: 4px; height: 16px; border-radius: 2px; background: var(--accent); }

/* ---------- air / sun */
.aqi-big { display: flex; align-items: center; gap: 1rem; }
.aqi-num { font-size: 3rem; font-weight: 700; width: 90px; height: 90px; border-radius: 50%; display: grid; place-items: center; color: #111; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; margin-top: .8rem; }
.sun-arc { width: 100%; max-width: 420px; display: block; margin: 0 auto; }
.moon { font-size: 3rem; }

/* ---------- news */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .7rem; }
.news-item { display: flex; gap: .7rem; padding: .7rem; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.news-item:hover { border-color: var(--accent); }
.news-item img { width: 96px; height: 64px; object-fit: cover; border-radius: 6px; flex: none; }
.news-item .nt { font-weight: 600; font-size: .92rem; }
.news-item .nm { color: var(--muted); font-size: .78rem; margin-top: .2rem; }

.footer { padding: 1rem 1.2rem 2rem; max-width: 1500px; margin: 0 auto; }

/* ---------- responsive */
@media (max-width: 1100px) {
  .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid .current { grid-row: auto; grid-column: 1 / -1; }
  .overview-grid #headlineCard { grid-row: auto; }
}
@media (max-width: 760px) {
  .overview-grid, .grid.two { grid-template-columns: minmax(0, 1fr); }
  .topbar { flex-wrap: wrap; }
  .brand span:last-child { display: none; }
  .search { order: 5; flex-basis: 100%; max-width: none; }
  .tabs { top: 108px; }
  .dc-row { grid-template-columns: 70px 30px 60px 1fr 0 0; }
  .dc-row .desc, .dc-row .extra { display: none; }
  .day-head { grid-template-columns: 90px 40px 1fr; }
  .day-temps { grid-column: 3; text-align: left; }
  .levels { grid-template-columns: 1fr; }
  .cur-temp { font-size: 3.2rem; }
  .big-map { height: 60vh; }
  .time-label { min-width: 120px; font-size: .8rem; }
  main { padding: .6rem; }
}

/* ---------- Modern look: layered over the base styles above ---------- */
:root { --blob-a: rgba(56, 189, 248, .26); --blob-b: rgba(251, 191, 36, .16); --glass: rgba(255, 255, 255, .74); --grad: linear-gradient(100deg, #0a6fc2, #06b6d4 60%, #f59e0b); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #070e1c; --blob-a: rgba(56, 189, 248, .2); --blob-b: rgba(129, 92, 246, .14); --glass: rgba(19, 34, 59, .68); --grad: linear-gradient(100deg, #7dd3fc, #5eead4 55%, #fde68a); }
}
:root[data-theme="dark"] { --bg: #070e1c; --blob-a: rgba(56, 189, 248, .2); --blob-b: rgba(129, 92, 246, .14); --glass: rgba(19, 34, 59, .68); --grad: linear-gradient(100deg, #7dd3fc, #5eead4 55%, #fde68a); }
body { overflow-x: clip; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(62vmax 42vmax at 8% -10%, var(--blob-a), transparent 70%), radial-gradient(52vmax 36vmax at 96% -6%, var(--blob-b), transparent 70%); }
.topbar { background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); }
.icon-btn { border-radius: 12px; transition: border-color .15s, transform .15s; }
.icon-btn:hover { transform: translateY(-1px); }
.search input { border-radius: 14px; }
.location-bar h1, .location-bar h2 { letter-spacing: -.035em; font-weight: 800; }
.tabs { gap: 4px; border-bottom: 0; }
.tabs button { padding: 7px 14px; border: 0; border-radius: 12px; transition: background .15s, color .15s; }
.tabs button:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tabs button.active { color: #fff; background: linear-gradient(100deg, #0a6fc2, #06a7c9); box-shadow: 0 6px 16px -7px #0a6fc2; }
.card { background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-radius: 20px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: 0 18px 36px -26px var(--accent); }
.cur-temp { font-size: clamp(64px, 11vw, 112px); line-height: 1; font-weight: 800; letter-spacing: -.055em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cur-icon { filter: drop-shadow(0 8px 18px color-mix(in srgb, var(--accent) 40%, transparent)); }
.hour, .day, .metric { border-radius: 14px; }
.map-wrap, .big-map, .mid-map, .mini-map { border-radius: 16px; overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .card, .icon-btn { transition: none; } }
