/* ============ Tokens ============ */
:root {
  --navy: #0a1f44;
  --navy-2: #102b5c;
  --navy-3: #0c2350;
  --blue: #1d6bff;
  --blue-600: #1557e6;
  --blue-50: #eaf2ff;
  --sky: #4da3ff;
  --bg: #eaf2fc;
  --card: #ffffff;
  --line: #e2eaf5;
  --text: #0d1b36;
  --muted: #5d6d88;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 12px 32px -16px rgba(16, 42, 90, .28), 0 2px 6px -2px rgba(16, 42, 90, .06);
  --font: "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(180deg, #e3eefc 0, var(--bg) 380px, #eef4fc 100%);
  min-height: 100vh;
  line-height: 1.5;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.ic {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.container { width: min(1360px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
section[id] { scroll-margin-top: 96px; }

/* ============ Header ============ */
.site-header {
  background: linear-gradient(180deg, var(--navy) 0, var(--navy-3) 100%);
  color: #fff;
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 6px 24px -10px rgba(5, 18, 45, .6);
}
.header-row { display: flex; align-items: center; gap: 22px; height: 76px; }

.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-logo { width: 46px; height: 46px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 25px; font-weight: 800; letter-spacing: -.3px; }
.brand-text small { font-size: 12.5px; color: #a9bfe6; }

.main-nav { display: flex; gap: 4px; }
.main-nav a {
  padding: 9px 16px; border-radius: 12px;
  font-weight: 700; font-size: 16px; color: #dbe6fb;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.main-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.main-nav a.active { background: var(--blue); color: #fff; box-shadow: 0 6px 16px -6px rgba(29, 107, 255, .8); }

.header-search { flex: 1; display: flex; gap: 10px; align-items: center; min-width: 0; margin-inline-start: auto; max-width: 560px; }
.search { position: relative; flex: 1; min-width: 0; }
.search > .ic { position: absolute; inset-inline-start: 14px; top: 50%; translate: 0 -50%; color: #4a5d80; pointer-events: none; }
.search input {
  width: 100%; height: 46px;
  border: 0; border-radius: 14px;
  background: #fff; color: var(--text);
  padding-inline: 44px 14px; font-size: 15.5px;
  outline: none; box-shadow: inset 0 0 0 2px transparent;
  transition: box-shadow .15s;
}
.search input:focus { box-shadow: inset 0 0 0 2px var(--sky); }
.search input::-webkit-search-cancel-button { display: none; }
.search-results {
  position: absolute; top: calc(100% + 8px); inset-inline: 0;
  list-style: none; margin: 0; padding: 6px;
  background: #fff; color: var(--text);
  border-radius: 14px; box-shadow: 0 20px 40px -12px rgba(10, 31, 68, .35);
  max-height: 360px; overflow: auto; display: none; z-index: 20;
}
.search.open .search-results { display: block; }
.search-results li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer; font-weight: 500;
}
.search-results li .ic { width: 17px; height: 17px; color: var(--muted); }
.search-results li small { margin-inline-start: auto; color: var(--muted); font-size: 12.5px; }
.search-results li[aria-selected="true"], .search-results li:hover { background: var(--blue-50); }
.search-results .sr-head { font-size: 12px; color: var(--muted); padding: 6px 12px 4px; cursor: default; background: none !important; font-weight: 700; }
.search-results .sr-empty { color: var(--muted); cursor: default; background: none !important; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding-inline: 16px;
  border: 0; border-radius: 14px; font-weight: 700; white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 18px -8px rgba(29, 107, 255, .9); }
.btn-primary:hover { background: var(--blue-600); }

.header-tools { display: flex; gap: 10px; align-items: center; }
.icon-btn {
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 0; border-radius: 14px; background: rgba(255, 255, 255, .08); color: #fff;
  transition: background .15s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .16); }
#favBtn[aria-pressed="true"] { color: #ffc93c; }
#favBtn[aria-pressed="true"] .ic { fill: currentColor; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 7px; height: 46px; padding-inline: 12px 14px; flex: none;
  border-radius: 14px; background: rgba(255, 255, 255, .08); color: #fff; font-weight: 700; font-size: 15px; white-space: nowrap;
  transition: background .15s;
}
.lang-switch:hover { background: rgba(255, 255, 255, .16); }
.lang-switch:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.lang-switch .ic { width: 18px; height: 18px; color: #a9c8ff; }

/* ============ Page ============ */
.page { padding-block: 24px 40px; display: grid; gap: 22px; }
.page > * { min-width: 0; } /* wide rows (chip bars, scrollers) scroll inside instead of widening the page */

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid rgba(226, 234, 245, .7);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 6px; }
.card-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 20px; font-weight: 800; }
.card-head h2 .ic { color: var(--navy-2); width: 22px; height: 22px; }

/* ============ Radar layout ============ */
.radar-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  grid-template-areas: "panel map";
  gap: 22px; align-items: start;
}
.panel { grid-area: panel; }
.map-col { grid-area: map; display: grid; gap: 14px; min-width: 0; }

/* Panel */
.panel {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid rgba(226, 234, 245, .7);
  padding: 20px; display: grid; gap: 18px;
  position: sticky; top: 96px;
}
.panel-head { display: flex; justify-content: space-between; gap: 10px; }
.panel-head h1 { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.3; }
.panel-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.sheet-handle, .sheet-close { display: none; }

.layer-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 5px; background: #f1f6fd; border-radius: 16px; }
.layer-tab {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px 8px; border: 0; border-radius: 12px; background: transparent;
  color: #3c4f72; font-weight: 700; font-size: 14px;
  transition: background .15s, color .15s, box-shadow .15s;
}
.layer-tab .ic { width: 24px; height: 24px; }
.layer-tab:hover { background: #fff; }
.layer-tab.active { background: var(--blue); color: #fff; box-shadow: 0 8px 18px -8px rgba(29, 107, 255, .9); }

.options { display: grid; }
.opt {
  display: flex; align-items: center; gap: 12px; padding: 11px 2px;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.opt:last-child { border-bottom: 0; }
.opt-ic { width: 36px; height: 36px; border-radius: 11px; background: #eef4fd; color: var(--navy-2); display: grid; place-items: center; flex: none; }
.opt-ic .ic { width: 18px; height: 18px; }
.opt-txt { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.opt-txt b { font-size: 15.5px; font-weight: 700; }
.opt-txt small { color: var(--muted); font-size: 12.5px; }
.opt.is-disabled { cursor: not-allowed; opacity: .6; }
.soon { font-style: normal; font-size: 11px; font-weight: 700; background: #fff4d6; color: #a86a00; padding: 1px 7px; border-radius: 99px; margin-inline-start: 4px; }

.switch {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none;
  width: 46px; height: 26px; border-radius: 99px; background: #cfd9e8;
  position: relative; cursor: pointer; transition: background .2s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25); transition: left .2s;
}
.switch:checked { background: var(--blue); }
.switch:checked::after { left: 23px; }
.switch:disabled { cursor: not-allowed; }
.switch:focus-visible { outline: 3px solid rgba(29, 107, 255, .35); outline-offset: 2px; }

.panel-block { display: grid; gap: 10px; }
.block-title { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 16px; }
.block-title b { color: var(--blue); font-size: 14px; }

.range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px; margin: 6px 0;
  background: linear-gradient(to right, var(--blue) var(--p, 80%), #dbe4f1 var(--p, 80%));
}
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--blue); box-shadow: 0 2px 6px rgba(0, 0, 0, .2); cursor: pointer; }
.range::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 4px solid var(--blue); cursor: pointer; }

.basemaps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.basemap {
  border: 0; background: none; padding: 0; display: grid; gap: 5px; justify-items: center;
  font-size: 13px; font-weight: 700; color: #3c4f72;
}
.basemap img {
  width: 100%; aspect-ratio: 1 / .8; object-fit: cover; border-radius: 12px; display: block;
  outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s;
  background: #dfe8f5;
}
.basemap:hover img { outline-color: #b9cff3; }
.basemap.active img { outline-color: var(--blue); }
.basemap.active { color: var(--blue); }

/* Map card */
.map-card { background: var(--navy); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.map-wrap { position: relative; height: clamp(420px, 62vh, 600px); }
#map { position: absolute; inset: 0; background: #0b1730; }
.map-card:fullscreen { border-radius: 0; display: flex; flex-direction: column; }
.map-card:fullscreen .map-wrap { flex: 1; height: auto; }

.map-status {
  position: absolute; top: 14px; right: 14px; z-index: 500;
  display: flex; align-items: center; gap: 10px; padding: 6px;
  background: rgba(8, 20, 45, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; color: #fff; font-size: 14.5px;
}
.live { display: inline-flex; align-items: center; gap: 7px; background: #16a34a; padding: 5px 12px; border-radius: 10px; font-weight: 800; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #bbf7d0; box-shadow: 0 0 0 0 rgba(187, 247, 208, .8); animation: pulse 1.8s infinite; }
.live.past { background: #b7791f; }
.live.past i { animation: none; background: #fde68a; }
.upd { display: inline-flex; align-items: center; gap: 6px; padding-inline-end: 8px; }
.upd .ic { width: 16px; height: 16px; opacity: .8; }
.upd b { font-variant-numeric: tabular-nums; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(187, 247, 208, 0); } 100% { box-shadow: 0 0 0 0 rgba(187, 247, 208, 0); } }

.map-tools { position: absolute; top: 14px; left: 14px; z-index: 500; display: grid; gap: 10px; }
.tool-group { display: grid; background: #fff; border-radius: 13px; overflow: hidden; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .45); }
.tool-group button { border-radius: 0; box-shadow: none; }
.tool-group button + button { border-top: 1px solid var(--line); }
.map-tools button {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; background: #fff; color: var(--navy); border-radius: 13px;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .45);
}
.map-tools button:hover { background: #f1f6fd; }
.map-tools .ic { width: 21px; height: 21px; }

.layers-fab { display: none; }

.map-note {
  position: absolute; bottom: 14px; left: 50%; translate: -50% 0; z-index: 500;
  background: rgba(8, 20, 45, .8); color: #fff; padding: 7px 14px; border-radius: 99px; font-size: 13.5px;
  white-space: nowrap; backdrop-filter: blur(6px);
}

.map-loading {
  position: absolute; inset: 0; z-index: 600; display: grid; place-content: center; justify-items: center; gap: 12px;
  background: rgba(8, 20, 45, .55); color: #fff; font-weight: 700; transition: opacity .3s;
}
.map-loading.done { opacity: 0; pointer-events: none; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Leaflet tweaks */
.leaflet-container { font-family: var(--font); }
.leaflet-control-attribution { font-size: 10px; background: rgba(255, 255, 255, .65) !important; }
.leaflet-control-scale-line { background: rgba(8, 20, 45, .55); color: #fff; border-color: rgba(255, 255, 255, .8); font-size: 11px; }
.base-sat { filter: brightness(.68) saturate(.8) contrast(1.08); }
.base-terrain { filter: saturate(.85); }

.city-label, .data-marker { background: none; border: 0; }
.city-label .cl, .dm {
  display: flex; align-items: center; gap: 5px; transform: translate(-5px, -50%);
  white-space: nowrap; direction: ltr; cursor: pointer;
}
.city-label .cl.left, .dm.left { flex-direction: row-reverse; transform: translate(calc(-100% + 5px), -50%); }
.city-label .cl.top, .dm.top { flex-direction: column-reverse; gap: 2px; transform: translate(-50%, calc(-100% + 5px)); }
.city-label .cl.bottom, .dm.bottom { flex-direction: column; gap: 2px; transform: translate(-50%, -5px); }
.city-label .dot, .dm .dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(10, 31, 68, .75), 0 1px 4px rgba(0, 0, 0, .5); flex: none; }
.city-label .nm {
  direction: rtl; font-weight: 700; font-size: 13px; color: #fff; line-height: 1.2;
  text-shadow: 0 0 3px rgba(5, 12, 30, .95), 0 1px 2px rgba(5, 12, 30, .9), 0 0 8px rgba(5, 12, 30, .6);
}
.city-label.major .nm { font-size: 14.5px; font-weight: 800; }
.city-label.selected .dot { background: var(--sky); box-shadow: 0 0 0 3px #fff, 0 1px 6px rgba(0, 0, 0, .5); }
.city-label.selected .nm { background: var(--blue); padding: 2px 9px 3px; border-radius: 8px; text-shadow: none; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .5); }
.region-label { background: none; border: 0; pointer-events: none !important; }
.region-label span {
  display: block; transform: translate(-50%, -50%); white-space: nowrap; direction: rtl;
  font-weight: 800; color: rgba(255, 255, 255, .6); text-shadow: 0 1px 6px rgba(0, 0, 0, .6); letter-spacing: .5px;
}
.region-label.country span { font-size: 26px; color: rgba(255, 255, 255, .32); letter-spacing: 3px; }
.region-label.sea span { font-size: 13.5px; font-style: italic; color: rgba(140, 200, 255, .85); }
.region-label.neighbor span { font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .5); }
.light-base .city-label .nm { color: #0a1f44; text-shadow: 0 0 3px #fff, 0 0 6px #fff, 0 1px 2px #fff; }
.light-base .city-label.selected .nm { color: #fff; text-shadow: none; }
.light-base .city-label .dot { background: #0a1f44; box-shadow: 0 0 0 2px #fff; }
.light-base .region-label span { color: rgba(10, 31, 68, .45); text-shadow: none; }
.light-base .region-label.sea span { color: #2a6fc4; }
/* Value chips for temperature / wind / clouds layers */
.dm .chip {
  display: inline-flex; align-items: center; gap: 6px; direction: rtl; padding: 2px 3px 2px 9px;
  background: rgba(8, 18, 40, .8); border-radius: 9px; box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .7); backdrop-filter: blur(3px);
}
.dm .chip b { display: inline-flex; align-items: center; gap: 3px; direction: ltr; min-width: 30px; justify-content: center; padding: 2px 6px; border-radius: 7px; font-size: 13px; font-weight: 800; color: #0a1f44; background: var(--c); }
.dm .chip b svg { width: 12px; height: 12px; }
.dm .chip span { font-size: 12.5px; font-weight: 700; color: #fff; }
.hide-names .dm .chip span { display: none; }
.hide-names .dm .chip { padding: 2px; }
.field-img { image-rendering: auto; }
.wind-canvas { position: absolute; inset: 0; z-index: 450; pointer-events: none; }

.me-marker { background: none; border: 0; }
.me-marker span { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; transform: translate(-50%, -50%); box-shadow: 0 0 0 0 rgba(29, 107, 255, .6); animation: pulseBlue 2s infinite; }
@keyframes pulseBlue { 70% { box-shadow: 0 0 0 14px rgba(29, 107, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(29, 107, 255, 0); } }

/* Timeline: controls row + one cell per day */
.timeline {
  display: grid; gap: 10px; padding: 12px 18px 14px; background: linear-gradient(180deg, #0c2350, var(--navy));
  color: #fff; border-top: 1px solid rgba(255, 255, 255, .08);
}
.tl-ctrl { display: flex; align-items: center; gap: 10px; min-width: 0; }
.play {
  flex: none; width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--blue); color: #fff;
  display: grid; place-items: center; cursor: pointer; transition: background .15s, transform .15s; box-shadow: 0 6px 16px -6px rgba(29, 107, 255, .8);
}
.play:hover { background: var(--blue-600); transform: translateY(-1px); }
.play .ic { width: 20px; height: 20px; }
.now-btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding-inline: 12px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); color: #fff; font: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer;
}
.now-btn .ic { width: 16px; height: 16px; }
.now-btn:hover { background: rgba(255, 255, 255, .14); }
.now-btn.on { border-color: rgba(125, 186, 255, .7); background: rgba(29, 107, 255, .25); color: #cfe6ff; }
.tl-head { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.tl-head b { font-size: 15.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-badge { flex: none; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 99px; background: rgba(255, 255, 255, .12); }
.tl-badge.live { background: var(--blue); }
.tl-badge.past { background: #b7791f; }
.tl-badge.fc { background: rgba(77, 163, 255, .25); color: #cfe6ff; }
.speed { flex: none; height: 36px; min-width: 46px; padding-inline: 10px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 10px; background: rgba(255, 255, 255, .06); color: #fff; font-weight: 800; direction: ltr; cursor: pointer; }
.speed:hover { background: rgba(255, 255, 255, .14); }
.tl-bar { position: relative; height: 44px; cursor: pointer; touch-action: none; outline: none; }
.tl-bar:focus-visible { outline: 2px solid rgba(77, 163, 255, .7); outline-offset: 3px; border-radius: 10px; }
.tl-cells { position: absolute; inset: 0; }
.tl-cell {
  position: absolute; top: 0; bottom: 0; border-inline-end: 3px solid transparent; background-clip: padding-box;
  display: flex; overflow: hidden; background-color: rgba(255, 255, 255, .07); border-radius: 9px; color: #9fb3d6;
  line-height: 1.15; transition: background-color .2s, color .2s;
}
.tl-cell:hover { background-color: rgba(255, 255, 255, .12); }
.tl-cell-fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--p, 0%); background: rgba(77, 163, 255, .22); pointer-events: none; }
.tl-lab { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; pointer-events: none; }
.tl-cell b, .tl-cell small { white-space: nowrap; }
.tl-cell:first-child .tl-lab { align-items: flex-end; padding-inline-end: 10px; } /* keeps "now" clear of the cursor */
.tl-cell b { font-size: 12.5px; font-weight: 800; }
.tl-cell small { font-size: 10.5px; font-weight: 600; opacity: .8; }
.tl-cell.active { background-color: rgba(29, 107, 255, .28); color: #fff; box-shadow: inset 0 0 0 1px rgba(125, 186, 255, .55); }
.tl-cell.active .tl-cell-fill { background: rgba(77, 163, 255, .45); }
.tl-thumb { position: absolute; top: -5px; bottom: -5px; width: 3px; border-radius: 3px; background: #fff; translate: 50% 0; box-shadow: 0 0 10px rgba(255, 255, 255, .6); pointer-events: none; }
.tl-thumb::before { content: ""; position: absolute; top: -3px; left: 50%; width: 11px; height: 11px; border-radius: 50%; background: #fff; translate: -50% 0; }
.tl-tip { position: absolute; bottom: 52px; translate: 50% 0; background: #fff; color: var(--navy); font-size: 12.5px; font-weight: 800; padding: 4px 10px; border-radius: 8px; white-space: nowrap; pointer-events: none; box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .5); z-index: 2; }

/* Values at a tapped point */
.pt-popup .leaflet-popup-content-wrapper { border-radius: 14px; }
.pt-popup .leaflet-popup-content { margin: 12px 14px; font-family: inherit; direction: rtl; }
.pt-pop { display: grid; gap: 6px; min-width: 170px; color: var(--navy); }
.pt-pop small { color: var(--muted, #64748b); font-size: 11.5px; font-weight: 700; }
.pt-pop > div { display: flex; justify-content: space-between; align-items: center; gap: 14px; font-size: 13.5px; }
.pt-pop > div b { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; }
.pt-pop > div svg { width: 14px; height: 14px; color: var(--blue); }
.pt-pop > span { font-size: 12.5px; color: #475569; line-height: 1.6; }
.live.fc { background: #1d6bff; }
.live.fc i { animation: none; background: #cfe6ff; }

/* Legend */
.legend {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 12px 18px;
  border: 1px solid rgba(226, 234, 245, .7);
}
.lg-title { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 15px; white-space: nowrap; }
.lg-title .ic { width: 17px; height: 17px; color: var(--muted); }
.lg-scale { flex: 1; min-width: 240px; display: grid; gap: 4px; }
.lg-bar { height: 10px; border-radius: 99px; }
.lg-vals { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-weight: 700; direction: ltr; }
.lg-names { display: flex; justify-content: space-around; direction: ltr; font-size: 12.5px; font-weight: 800; color: var(--navy-2); }
.lg-levels { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; font-weight: 700; padding-inline-start: 18px; border-inline-start: 1px solid var(--line); }
.lg-levels span { display: inline-flex; align-items: center; gap: 6px; }
.lg-levels i { width: 12px; height: 12px; border-radius: 50%; }

/* ============ Forecasts ============ */
.forecast-grid { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(0, 2fr); gap: 22px; align-items: stretch; }
.now-col { display: grid; gap: 14px; grid-template-rows: 1fr auto; }

.now-card {
  position: relative; overflow: hidden; color: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  background: linear-gradient(180deg, #13306b 0%, #2c4f97 48%, #a8687d 82%, #f2a65e 100%);
  padding: 18px 20px 18px; display: flex; flex-direction: column; min-height: 250px;
}
.now-card.night { background: linear-gradient(180deg, #060f26 0%, #102551 55%, #233f7a 100%); }
.now-card.day { background: linear-gradient(180deg, #1f66d1 0%, #3d8cf0 55%, #8cc4ff 100%); }
.skyline { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: 110px; opacity: .9; pointer-events: none; }
.now-link { position: relative; margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; padding: 7px 14px; border-radius: 12px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); color: #fff; font-weight: 700; font-size: 14px; backdrop-filter: blur(6px); }
.now-link:hover { background: rgba(255, 255, 255, .26); }
.now-link .ic { width: 16px; height: 16px; }
.now-top { position: relative; display: flex; justify-content: space-between; align-items: center; }
.now-city { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--navy); padding: 6px 12px; border-radius: 12px; font-weight: 800; font-size: 16px; }
.now-city .ic { width: 17px; height: 17px; color: var(--blue); }
.now-label { font-weight: 700; color: #d6e4ff; }
.now-main { position: relative; display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.now-icon { width: 96px; height: 96px; flex: none; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .25)); }
.now-icon svg { width: 100%; height: 100%; }
.now-temp { font-size: 64px; font-weight: 800; line-height: 1; letter-spacing: -1px; direction: ltr; text-align: end; }
.now-desc { font-size: 20px; font-weight: 700; margin-top: 4px; }
.now-range { font-size: 14.5px; color: #e2ebff; margin-top: 2px; }
.now-range b { font-weight: 800; color: #fff; }
.now-range { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.now-range span { white-space: nowrap; }
.now-stats { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; padding-block: 12px; border-block: 1px solid rgba(255, 255, 255, .14); }
.now-stats div { display: grid; justify-items: center; gap: 2px; text-align: center; }
.now-stats div + div { border-inline-start: 1px solid rgba(255, 255, 255, .14); }
.now-stats .ic { width: 18px; height: 18px; color: #9fd0ff; }
.now-stats span { font-size: 12.5px; color: #c9d8f2; font-weight: 600; }
.now-stats em { font-style: normal; opacity: .85; }
.now-stats b { font-size: 16px; font-weight: 800; }
.now-parts { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-block: 16px 18px; }
.np {
  display: grid; justify-items: center; gap: 2px; padding: 10px 4px 9px; border-radius: 14px; text-align: center;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(6px);
}
.np small { font-size: 12.5px; font-weight: 700; color: #d6e4ff; white-space: nowrap; }
.np svg:not(.ic) { width: 40px; height: 40px; margin-block: 2px; }
.np b { font-size: 19px; font-weight: 800; direction: ltr; }
.np-rain { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; color: #b9c9e6; direction: ltr; }
.np-rain .ic { width: 12px; height: 12px; }
.np-rain.wet { color: #9fd0ff; }

.rain-status {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px;
  background: linear-gradient(90deg, #d9eaff, #eaf3ff); border: 1px solid #cfe2fb;
}
.rs-icon { width: 42px; height: 42px; border-radius: 12px; background: #fff; color: var(--blue); display: grid; place-items: center; flex: none; }
.rs-txt { display: grid; line-height: 1.35; }
.rs-txt b { font-size: 15.5px; }
.rs-txt small { color: var(--muted); font-size: 13px; }
.rain-status.wet { background: linear-gradient(90deg, #1d6bff, #4da3ff); border-color: transparent; color: #fff; }
.rain-status.wet small { color: #e3eeff; }

.card-sub { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.daily-card, .hourly-card { min-width: 0; }
.skeleton { min-height: 150px; margin: 12px 20px 20px; border-radius: 16px; background: linear-gradient(90deg, #eef3fb 25%, #f7faff 50%, #eef3fb 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; list-style: none; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* 5-day list */
.days-head, .drow {
  display: grid; align-items: center; gap: 14px;
  grid-template-columns: minmax(84px, 1fr) minmax(130px, 1.5fr) minmax(170px, 2fr) minmax(70px, .8fr) minmax(76px, .8fr) 44px;
}
.days-head { padding: 10px 20px 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.days { list-style: none; margin: 0; padding: 0 10px 12px; display: grid; gap: 4px; }
.drow {
  width: 100%; border: 1px solid transparent; background: none; text-align: start;
  padding: 10px; border-radius: 16px; transition: background .15s, border-color .15s;
}
.drow:hover { background: #f4f8fe; }
.drow.active { background: var(--blue-50); border-color: #bfd5fb; }
.d-name { display: grid; line-height: 1.25; }
.d-name b { font-size: 16px; font-weight: 800; }
.d-name small { font-size: 12.5px; color: var(--muted); }
.drow.today .d-name b { color: var(--blue); }
.d-cond { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: #33466a; min-width: 0; }
.d-cond svg { width: 42px; height: 42px; flex: none; }
.d-cond span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-range { display: flex; align-items: center; gap: 10px; direction: rtl; }
.d-range b { font-size: 18px; font-weight: 800; min-width: 34px; text-align: center; }
.d-range .lo { color: var(--muted); font-size: 16px; }
.rbar { position: relative; flex: 1; height: 7px; border-radius: 99px; background: #e8eef7; }
.rbar i { position: absolute; top: 0; bottom: 0; border-radius: 99px; }
.d-rain, .d-wind { display: grid; justify-items: start; line-height: 1.2; }
.d-rain b, .d-wind b { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 800; }
.d-rain b { color: var(--blue); }
.d-rain .ic, .d-wind .ic { width: 15px; height: 15px; }
.d-wind svg.arr { width: 15px; height: 15px; color: #0e7490; }
.d-rain small, .d-wind small { font-size: 11.5px; color: var(--muted); }
.uvb { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; font-style: normal; }

/* Hourly with temperature curve */
.hourly-card .card-head { padding-bottom: 10px; }
.scroll-btns { display: flex; gap: 8px; }
.scroll-btns button { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--navy); display: grid; place-items: center; }
.scroll-btns button:hover { background: #f1f6fd; }
.scroll-btns .ic { width: 18px; height: 18px; }
.hscroll { overflow-x: auto; padding: 0 12px 16px; scrollbar-width: thin; scroll-behavior: smooth; }
.hscroll { mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); }
.htrack { position: relative; }
.hrow { display: flex; position: relative; z-index: 1; }
.hcol { flex: 0 0 var(--col); display: grid; justify-items: center; gap: 4px; text-align: center; position: relative; }
.hrow.top .hcol { padding-top: 10px; }
.hcol .t { font-weight: 800; font-size: 14.5px; white-space: nowrap; }
.hcol .hd { position: absolute; top: -2px; font-size: 10.5px; font-weight: 800; color: var(--blue); white-space: nowrap; }
.hcol.newday { border-inline-start: 1px dashed #c9d8ee; }
.hcol.newday .t { padding-top: 8px; }
.hcol > svg { width: 38px; height: 38px; }
.hchart { display: block; position: relative; z-index: 1; overflow: visible; }
.hchart text { font: 800 15px var(--font); fill: var(--text); }
.hrow.bot .hcol { padding-bottom: 10px; gap: 6px; }
.rpill { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: rgba(29, 107, 255, var(--a)); color: var(--fg); display: inline-flex; align-items: center; gap: 2px; }
.rpill .ic { width: 11px; height: 11px; }
.hw { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 700; color: #33466a; }
.hw svg { width: 13px; height: 13px; color: #0e7490; }
.hnow { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; border-radius: 16px; background: linear-gradient(180deg, #e3eeff, #f1f6ff); border: 1px solid #c8dafa; }
.hcol.now .t { color: var(--blue); }
.rnone { display: block; height: 20px; }
.hourly-card .card-head { flex-wrap: wrap; }
.h-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-inline-start: auto; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.h-legend span { display: inline-flex; align-items: center; gap: 6px; }
.h-legend .lg-line { width: 22px; height: 3px; border-radius: 3px; background: #ff8a1c; }
.h-legend .lg-pill { width: 22px; height: 10px; border-radius: 99px; background: rgba(29, 107, 255, .45); }
.h-legend .ic { width: 15px; height: 15px; color: #0e7490; }
.d-rain.dry small { font-size: 12.5px; font-weight: 700; color: #9aabc4; }
.sun-arc { width: 100%; max-width: 240px; align-self: center; }
.sr-star { color: #f5b301; }
.upd .src { font-size: 12px; color: #a9bfe6; margin-inline-start: 2px; }

/* Details */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 22px; font-weight: 800; }
.section-head h2 .ic { width: 24px; height: 24px; color: var(--navy-2); }
.details-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.dcard { padding: 18px; display: flex; flex-direction: column; gap: 12px; min-height: 300px; }
.dhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dhead h3 { margin: 0; font-size: 16.5px; font-weight: 800; }
.dhead .dico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.dhead .dico .ic { width: 20px; height: 20px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 800; color: #fff; white-space: nowrap; }
.dnote { margin: 0; font-size: 13.5px; line-height: 1.6; color: #3c4f72; background: #f4f8fe; border-radius: 12px; padding: 10px 12px; }
.gauge { position: relative; display: grid; justify-items: center; }
.gauge svg { width: 100%; max-width: 220px; height: auto; display: block; }
.gauge .gv { position: absolute; bottom: 4px; display: grid; justify-items: center; line-height: 1.1; }
.gauge .gv b { font-size: 34px; font-weight: 800; }
.gauge .gv small { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.sun-times { display: flex; justify-content: space-between; gap: 8px; }
.sun-times div { display: grid; line-height: 1.25; }
.sun-times div:last-child { text-align: end; }
.sun-times small { font-size: 12.5px; color: var(--muted); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.sun-times .ic { width: 16px; height: 16px; }
.sun-times b { font-size: 22px; font-weight: 800; direction: ltr; }
.kv { display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding: 7px 0; border-top: 1px solid var(--line); }
.kv span { color: var(--muted); font-weight: 700; }
.kv b { font-weight: 800; }
.aq-top { display: flex; align-items: center; gap: 14px; }
.aq-num { width: 78px; height: 78px; border-radius: 22px; display: grid; place-content: center; text-align: center; color: #fff; line-height: 1; flex: none; }
.aq-num b { font-size: 28px; font-weight: 800; }
.aq-num small { font-size: 11px; font-weight: 700; opacity: .9; margin-top: 3px; }
.aq-top p { margin: 0; font-size: 13px; color: #3c4f72; line-height: 1.55; }
.aq-scale { position: relative; height: 8px; border-radius: 99px; background: linear-gradient(90deg, #22c55e, #eab308, #f97316, #ef4444, #9333ea, #7f1d1d); direction: ltr; }
.aq-scale i { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 4px solid var(--navy); translate: -50% -50%; }
.pm { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: 13.5px; }
.pm span { font-weight: 700; color: #33466a; }
.pm b { font-weight: 800; direction: ltr; }
.pm b small { font-size: 11px; color: var(--muted); font-weight: 700; }
.pm .pbar { grid-column: 1 / -1; height: 5px; border-radius: 99px; background: #e8eef7; overflow: hidden; }
.pm .pbar i { display: block; height: 100%; border-radius: 99px; }
.compass { position: relative; display: grid; place-items: center; }
.compass svg { width: 168px; height: 168px; overflow: visible; }
.compass .cv { position: absolute; display: grid; justify-items: center; line-height: 1.05; }
.compass .cv b { font-size: 28px; font-weight: 800; }
.compass .cv small { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.compass text { font: 800 12px var(--font); fill: #5d6d88; }

.mini-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.mini { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.mini .mico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.mini .mico .ic { width: 22px; height: 22px; }
.mini div { display: grid; line-height: 1.3; min-width: 0; }
.mini small { font-size: 13px; color: var(--muted); font-weight: 700; }
.mini b { font-size: 22px; font-weight: 800; }
.mini em { font-style: normal; font-size: 12.5px; color: #3c4f72; }

/* Tips */
.tips { list-style: none; margin: 0; padding: 6px 20px 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.tip { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 16px; border: 1px solid; font-size: 14.5px; font-weight: 500; line-height: 1.6; }
.tip .ic { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.tip.hot { background: #fff4ec; border-color: #fed7b5; color: #9a3412; }
.tip.uv { background: #fffaeb; border-color: #fde68a; color: #92400e; }
.tip.dust { background: #f8f3ec; border-color: #e7d6bf; color: #78501c; }
.tip.rain { background: #eef5ff; border-color: #c4dafc; color: #1e40af; }
.tip.wind { background: #ecfbfd; border-color: #b6eaf2; color: #155e75; }
.tip.cold { background: #f0f2ff; border-color: #cfd4fb; color: #3730a3; }
.tip.good { background: #effcf3; border-color: #bbf0cc; color: #166534; }

/* City cards */
.ccards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; padding: 10px 20px 20px; }
.ccards.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ccards.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ccard-wrap { position: relative; }
.ccard {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; padding-inline-end: 40px; border-radius: 14px; height: 100%;
  border: 1px solid #e6eef9; background: #f7faff; transition: border-color .15s, background .15s, box-shadow .15s;
}
.ccard:hover { border-color: #b9cff3; background: #fff; box-shadow: 0 6px 16px -10px rgba(16, 42, 90, .35); }
.ccard.active { border-color: var(--blue); background: var(--blue-50); }
.cw-icon { width: 36px; height: 36px; flex: none; }
.cw-icon svg { width: 100%; height: 100%; }
.cc-name { flex: 1; display: grid; line-height: 1.25; min-width: 0; }
.cc-name b { font-weight: 800; font-size: 15.5px; }
.cc-name small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-t { flex: none; padding-inline-start: 6px; font-size: 19px; font-weight: 800; direction: ltr; }
.fav-star::after { content: ""; position: absolute; inset: -8px; } /* larger tap area */
.fav-star { position: absolute; top: 50%; translate: 0 -50%; inset-inline-end: 8px; width: 28px; height: 28px; border: 0; border-radius: 8px; background: none; color: #b4c3da; display: grid; place-items: center; }
.fav-star:hover { background: #eaf1fc; color: #f5b301; }
.fav-star .ic { width: 17px; height: 17px; }
.fav-star[aria-pressed="true"] { color: #f5b301; }
.fav-star[aria-pressed="true"] .ic { fill: currentColor; }
.btn-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: var(--blue); white-space: nowrap; font-size: 15px; }
.btn-link .ic { width: 17px; height: 17px; }
.btn-link:hover { text-decoration: underline; }

/* Inner pages */
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); }
.breadcrumb li + li::before { content: "‹"; margin-inline-end: 6px; color: #9fb0c9; }
.breadcrumb a { color: var(--blue); font-weight: 700; }
.breadcrumb [aria-current] { color: var(--text); font-weight: 700; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: -8px; }
.page-head h1 { margin: 0; font-size: 32px; font-weight: 800; line-height: 1.25; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 15.5px; }
.filter { position: relative; width: min(360px, 100%); }
.filter .ic { position: absolute; inset-inline-start: 14px; top: 50%; translate: 0 -50%; color: var(--muted); }
.filter input { width: 100%; height: 46px; border-radius: 14px; border: 1px solid var(--line); background: #fff; padding-inline: 42px 14px; font-size: 15px; outline: none; }
.filter input:focus { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(77, 163, 255, .2); }
.city-group { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(226, 234, 245, .7); scroll-margin-top: 96px; }
.city-group h2 { display: flex; align-items: center; gap: 10px; margin: 0; padding: 18px 20px 4px; font-size: 19px; font-weight: 800; }
.city-group h2 .ic { width: 21px; height: 21px; color: var(--navy-2); }
.region-index { display: flex; flex-wrap: wrap; gap: 8px; }
.region-index a { padding: 7px 14px; border-radius: 99px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: 14px; color: #33466a; }
.region-grid { columns: 2 460px; column-gap: 22px; }
.region-grid .city-group { break-inside: avoid; margin-bottom: 22px; }
.region-grid .cc-name small { display: none; } /* the section heading already names the region */
.region-grid .ccards { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.region-index a:hover { border-color: #b9cff3; color: var(--blue); }
.no-results { text-align: center; padding: 30px; font-weight: 700; }
.city-radar .map-wrap { height: clamp(360px, 52vh, 480px); }
.about-city { padding: 4px 4px 0; }
.about-city h2 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.about-city p { margin: 0; color: var(--muted); line-height: 1.8; max-width: 900px; }
body:not([data-page="home"]) .layers-fab { display: none !important; }

/* Footer */
.site-footer { background: var(--navy); color: #c4d3ef; padding: 30px 0 18px; margin-top: 10px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.1fr 1.4fr 1.3fr 1fr; gap: 28px; }
.footer-about p { margin: 10px 0 0; line-height: 1.7; }
.footer-links b, .footer-credits b { display: block; color: #fff; font-weight: 800; margin-bottom: 8px; }
.footer-links ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.footer-links a:hover, .footer-credits a:hover { color: #fff; }
.footer-links .more { display: inline-block; margin-top: 10px; color: #8fc1ff; font-weight: 700; }
.footer-credits p { margin: 0; line-height: 1.9; }
.footer-credits a { color: #8fc1ff; }
.site-footer .copy { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 22px; padding-top: 14px; font-size: 13px; color: #9fb3d8; }
.brand-sm .brand-logo { width: 36px; height: 36px; }
.brand-sm .brand-text strong { font-size: 19px; color: #fff; }

/* Posts */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 8px 20px 20px; }
.post-grid.big { padding: 0; gap: 22px; }
.post-card {
  display: flex; flex-direction: column; background: var(--card); border-radius: 18px; overflow: hidden;
  border: 1px solid #e3ebf6; box-shadow: 0 10px 26px -18px rgba(16, 42, 90, .35); transition: transform .2s, box-shadow .2s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -18px rgba(16, 42, 90, .45); }
.pc-img { position: relative; display: block; aspect-ratio: 1200 / 630; overflow: hidden; background: #0b1d3f; }
.pc-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.post-card:hover .pc-img img { transform: scale(1.04); }
.pc-time { position: absolute; top: 12px; inset-inline-end: 12px; display: inline-flex; align-items: center; gap: 4px; background: rgba(5, 12, 30, .65); backdrop-filter: blur(4px); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.pc-time .ic { width: 13px; height: 13px; }
.pc-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.pc-body h3, .pc-body h2 { margin: 0; font-size: 17.5px; font-weight: 800; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-body h3 a:hover, .pc-body h2 a:hover { color: var(--blue); }
.pc-body p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-more { margin-top: auto; padding-top: 4px; display: inline-flex; align-items: center; gap: 2px; color: var(--blue); font-weight: 800; font-size: 14px; }
.pc-more .ic { width: 16px; height: 16px; transition: translate .2s; }
.post-card:hover .pc-more .ic { translate: -3px 0; }
.cat-chip { display: inline-block; align-self: flex-start; font-size: 13px; font-weight: 800; color: #9fd0ff; background: rgba(77, 163, 255, .16); border: 1px solid rgba(77, 163, 255, .35); padding: 4px 12px; border-radius: 99px; }

/* Blog index */
.blog-hero { background: radial-gradient(1200px 400px at 85% -10%, #1f4fa0 0, transparent 60%), linear-gradient(180deg, var(--navy-3), var(--navy)); color: #fff; padding: 22px 0 40px; }
.breadcrumb.light ol { color: #a9bfe6; }
.breadcrumb.light a { color: #cfe0ff; }
.breadcrumb.light [aria-current] { color: #fff; }
.blog-hero-head { text-align: center; max-width: 760px; margin: 18px auto 28px; }
.blog-hero-head h1 { margin: 0 0 8px; font-size: 38px; font-weight: 800; }
.blog-hero-head p { margin: 0; color: #c9d8f3; font-size: 17px; line-height: 1.8; }
.post-card.featured { flex-direction: row; max-width: 1100px; margin-inline: auto; background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); color: #fff; backdrop-filter: blur(6px); }
.post-card.featured .pc-img { flex: 1.15; align-self: center; aspect-ratio: 1200 / 630; }
.post-card.featured .pc-body { flex: 1; padding: 30px; justify-content: center; gap: 12px; }
.post-card.featured h2 { font-size: 27px; -webkit-line-clamp: 3; }
.post-card.featured p { color: #c9d8f3; font-size: 15.5px; -webkit-line-clamp: 3; }
.post-card.featured .pc-more { color: #8fc1ff; margin-top: 8px; }
.feat-label { align-self: flex-start; font-size: 13px; font-weight: 800; color: #0a1f44; background: #ffcc66; padding: 4px 12px; border-radius: 99px; }
.blog-tools { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.blog-tools .filter { width: min(420px, 100%); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { border: 1px solid var(--line); background: #fff; color: #33466a; padding: 8px 14px; border-radius: 99px; font-weight: 800; font-size: 14px; }
.chip-btn small { color: var(--muted); font-weight: 700; margin-inline-start: 2px; }
.chip-btn:hover { border-color: #b9cff3; }
.chip-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip-btn.active small { color: #dbe8ff; }
.section-title { display: grid; gap: 8px; margin-top: 4px; }
.section-title h2 { margin: 0; font-size: 24px; font-weight: 800; }
.section-title span { width: 64px; height: 5px; border-radius: 99px; background: linear-gradient(90deg, var(--blue), #4da3ff); }

/* Article */
.read-progress { position: fixed; top: 0; inset-inline: 0; height: 4px; z-index: 1100; }
.read-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #4da3ff, var(--blue)); }
.article-hero { background: radial-gradient(1000px 360px at 80% -20%, #1f4fa0 0, transparent 60%), linear-gradient(180deg, var(--navy-3), var(--navy)); color: #fff; padding: 22px 0 120px; }
.narrow-wrap { max-width: 1180px; display: grid; gap: 14px; justify-items: start; }
.narrow-wrap > :is(h1, .article-meta) { max-width: calc(100% - 322px); }
.article-hero h1 { margin: 0; font-size: 38px; font-weight: 800; line-height: 1.45; }
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; color: #c9d8f3; font-size: 14.5px; font-weight: 500; }
.article-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: #6f88b8; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: linear-gradient(135deg, #4da3ff, var(--blue)); color: #fff; font-weight: 800; font-size: 13px; flex: none; }
.article-main { padding-top: 0; max-width: 1180px; }
/* The image and the title line up with the article column (the sidebar takes 300px + gap) */
.hero-figure { margin: -100px 0 0; width: calc(100% - 322px); }
.hero-figure img { width: 100%; height: auto; display: block; border-radius: 22px; box-shadow: 0 30px 60px -30px rgba(5, 15, 40, .7); background: #0b1d3f; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.article-layout > * { min-width: 0; }
.author-card { display: flex; gap: 14px; align-items: flex-start; margin-top: 22px; padding: 16px; border-radius: 16px; background: #f4f8fe; border: 1px solid #e3ebf6; }
.author-card .avatar { width: 46px; height: 46px; font-size: 15px; }
.author-card b { font-size: 16px; }
.author-card p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.share { padding: 18px; }
.share b { display: block; font-size: 16px; font-weight: 800; margin-bottom: 10px; }
.share-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sh { display: grid; place-items: center; height: 40px; border-radius: 12px; font-weight: 800; font-size: 14px; color: #fff; border: 0; }
.sh.wa { background: #25d366; }
.sh.x { background: #0f1419; }
.sh.tg { background: #229ed9; }
.sh.copy { background: #eef3fa; color: var(--navy); }
.related { display: grid; gap: 16px; margin-top: 8px; }

/* Infographics inside articles */
.infographic { margin: 22px 0 26px; padding: 16px; border-radius: 18px; background: #f7faff; border: 1px solid #e3ebf6; }
.infographic figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); font-weight: 700; text-align: center; line-height: 1.7; }
.infographic svg { display: block; width: 100%; height: auto; }
.infographic.ig-map text { font: 800 19px var(--font); fill: #0a1f44; paint-order: stroke; stroke: #f7faff; stroke-width: 5px; }
.infographic.ig-map text.m { fill: var(--blue); font-size: 22px; }
.infographic.ig-map text.rn { font-size: 15px; fill: #fff; stroke: rgba(10, 31, 68, .55); stroke-width: 4px; }
.scale-bar { height: 16px; border-radius: 99px; background: linear-gradient(90deg, #cec087, #88ddee 10%, #00a3e0 20%, #0077aa 30%, #005588 40%, #ffee00 50%, #ffaa00 60%, #ff4400 70%, #c10000 80%, #ffaaff 90%, #ff77ff); direction: ltr; }
.scale-levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.scale-levels div { display: grid; gap: 4px; background: #fff; border: 1px solid #e3ebf6; border-radius: 14px; padding: 12px; }
.scale-levels i { width: 100%; height: 8px; border-radius: 99px; }
.scale-levels b { font-size: 16px; }
.scale-levels small { color: var(--muted); font-size: 13px; line-height: 1.6; }
.tlg-bar { display: flex; gap: 4px; border-radius: 14px; overflow: hidden; }
.tlg-bar div { display: grid; place-content: center; text-align: center; padding: 16px 6px; color: #fff; min-width: 0; }
.tlg-bar b { font-size: 17px; }
.tlg-bar small { font-size: 12.5px; opacity: .9; }
.tlg-scale { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; color: var(--muted); font-weight: 700; }
.months-graphic { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.months-graphic div { display: grid; gap: 2px; padding: 12px 8px; border-radius: 12px; background: #fff; border: 1px solid #e3ebf6; border-top: 5px solid var(--c); text-align: center; }
.months-graphic b { font-size: 15px; }
.months-graphic small { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.steps-graphic { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; counter-reset: st; }
.steps-graphic li { counter-increment: st; position: relative; display: grid; gap: 4px; padding: 44px 14px 14px; border-radius: 14px; background: #fff; border: 1px solid #e3ebf6; }
.steps-graphic li::before { content: counter(st); position: absolute; top: 12px; inset-inline-start: 14px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font-weight: 800; font-size: 14px; }
.steps-graphic b { font-size: 15.5px; line-height: 1.5; }
.steps-graphic span { font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.compare-graphic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.compare-graphic div { background: #fff; border: 1px solid #e3ebf6; border-top: 5px solid var(--c); border-radius: 14px; padding: 14px; }
.compare-graphic b { font-size: 16px; color: var(--c); }
.compare-graphic ul { margin: 8px 0 0; padding-inline-start: 18px; font-size: 14px; line-height: 1.8; color: #33466a; }

/* SEO text blocks & FAQ */
.prose-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(226, 234, 245, .7); padding: 22px 24px; }
.prose-card h2 { margin: 0 0 10px; font-size: 21px; font-weight: 800; line-height: 1.4; }
.prose-card p { margin: 0 0 10px; color: #33466a; line-height: 1.9; }
.prose-card a, .prose a, .faq a { color: var(--blue); font-weight: 700; }
.prose-card a:hover, .prose a:hover { text-decoration: underline; }
.note { background: #f1f6fd; border-inline-start: 4px solid var(--sky); padding: 10px 14px; border-radius: 10px; color: #33466a; }
.faq { padding: 0 0 8px; }
.faq h2 { display: flex; align-items: center; gap: 10px; margin: 0; padding: 18px 20px 6px; font-size: 20px; font-weight: 800; }
.faq h2 .ic { width: 22px; height: 22px; color: var(--navy-2); }
.faq-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 8px 20px 14px; } /* one column: an opened answer never leaves a hole */
.faq-item { background: #f7faff; border: 1px solid #e6eef9; border-radius: 14px; padding: 14px 16px; }
.faq-list { align-items: start; }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .ic { flex: none; width: 18px; height: 18px; color: var(--muted); transition: transform .2s; }
.faq-item[open] summary .ic { transform: rotate(180deg); }
.faq-item h3 { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.5; }
.faq-item p { margin: 8px 0 0; color: #3c4f72; font-size: 14.5px; line-height: 1.8; }

/* Article */
.article-head { display: grid; gap: 10px; margin-bottom: 8px; }
.article-head h1 { margin: 0; font-size: 32px; font-weight: 800; line-height: 1.45; }
.article { padding: 28px 32px; }
.article.narrow { max-width: 860px; width: 100%; margin-inline: auto; }
.prose { font-size: 17px; line-height: 2; color: #1f2f4d; }
.prose p { margin: 0 0 14px; }
.prose .lead { font-size: 18.5px; font-weight: 500; color: var(--text); background: linear-gradient(90deg, #eaf3ff, #f6f9ff); border-radius: 14px; padding: 16px 18px; border: 1px solid #d6e6fb; }
.prose h2 { font-size: 24px; font-weight: 800; margin: 30px 0 10px; line-height: 1.5; scroll-margin-top: 96px; }
.prose h3 { font-size: 19.5px; font-weight: 800; margin: 20px 0 8px; line-height: 1.5; }
.prose ul, .prose ol { margin: 0 0 16px; padding-inline-start: 24px; }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: start; vertical-align: top; }
.prose th { background: #f1f6fd; font-weight: 800; white-space: nowrap; }
.article .faq { box-shadow: none; border: 0; margin: 18px -12px 0; }
.article .faq-list { grid-template-columns: 1fr; }
.sources { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; line-height: 1.8; }
.sources a { color: var(--blue); }
.article-side { display: grid; gap: 16px; position: sticky; top: 96px; }
.toc, .cta { padding: 18px; }
.toc b, .cta b { display: block; font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.toc ol { margin: 0; padding-inline-start: 18px; display: grid; gap: 6px; font-size: 14px; line-height: 1.6; }
.toc a { color: #33466a; }
.toc a:hover { color: var(--blue); }
.cta { background: linear-gradient(160deg, var(--navy), #1a3c7a); color: #fff; border: 0; }
.cta p { margin: 0 0 12px; color: #c9d8f3; font-size: 14px; line-height: 1.7; }
.cta .btn { width: 100%; justify-content: center; }
.cta-cities { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.cta-cities a { color: #9fd0ff; font-weight: 700; }
.footer-links ul.one-col { grid-template-columns: 1fr; }
.site-footer .copy a { color: #8fc1ff; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; translate: -50% 20px; z-index: 3000;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700;
  box-shadow: 0 16px 32px -12px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .25s, translate .25s;
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; translate: -50% 0; }

/* ============ Responsive ============ */
@media (max-width: 1240px) {
  .main-nav a { padding-inline: 11px; font-size: 15px; }
  .btn-locate span { display: none; }
  .btn-locate { width: 46px; padding: 0; justify-content: center; }
  .forecast-grid { grid-template-columns: 1fr; }
  .now-col { grid-template-columns: 1.4fr 1fr; grid-template-rows: none; }
  .details-grid, .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .container { width: min(100% - 32px, 1360px); }
  .header-row { flex-wrap: wrap; height: auto; padding-block: 12px; gap: 12px; }
  .main-nav { order: 4; width: 100%; overflow-x: auto; scrollbar-width: none; margin-inline: -4px; }
  .header-search { order: 3; max-width: none; flex-basis: 100%; }
  .header-tools { margin-inline-start: auto; }
  .site-header { position: relative; }

  .radar-layout { grid-template-columns: 1fr; grid-template-areas: "map"; }
  .map-wrap { height: 64vh; min-height: 380px; }

  /* Panel becomes a bottom sheet */
  .panel {
    position: fixed; inset-inline: 0; bottom: 0; top: auto; z-index: 2001;
    border-radius: 24px 24px 0 0; max-height: 82vh; overflow-y: auto;
    padding: 10px 18px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(105%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
    box-shadow: 0 -20px 40px -10px rgba(10, 31, 68, .35);
  }
  .panel.open { transform: none; }
  .sheet-handle { display: block; width: 44px; height: 5px; border-radius: 99px; background: #d3ddeb; margin: 2px auto 2px; }
  .sheet-close { display: grid; background: #f1f6fd; color: var(--navy); width: 40px; height: 40px; }
  .sheet-backdrop { position: fixed; inset: 0; z-index: 2000; background: rgba(5, 15, 35, .45); }

  .layers-fab {
    display: inline-flex; align-items: center; gap: 8px; position: absolute; bottom: 14px; left: 14px; z-index: 500;
    height: 44px; padding-inline: 16px; border: 0; border-radius: 14px; background: #fff; color: var(--navy); font-weight: 800;
    box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .5);
  }
  .layers-fab .ic { color: var(--blue); }
  .map-note { bottom: 70px; }
  .leaflet-control-scale { display: none; }

  .forecast-grid { grid-template-columns: 1fr; }
  .now-col { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .hero-figure, .narrow-wrap > :is(h1, .article-meta) { width: 100%; max-width: none; }
  .post-card.featured { flex-direction: column; }
  .post-card.featured .pc-img { min-height: 0; aspect-ratio: 1200 / 630; }
  .post-grid.big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare-graphic { grid-template-columns: 1fr; }
  .article-side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .ccards.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg-levels { border: 0; padding: 0; }
}

@media (max-width: 640px) {
  .brand-text strong { font-size: 21px; }
  .brand-text small { display: none; }
  .brand-logo { width: 40px; height: 40px; }
  .icon-btn { height: 42px; }
  .icon-btn { width: 42px; }
  .lang-switch { width: 42px; height: 42px; padding: 0; justify-content: center; }
  .header-row { gap: 10px; }
  .page { padding-top: 14px; gap: 16px; }
  .map-wrap { height: 58vh; min-height: 340px; }
  .map-status { font-size: 12.5px; top: 10px; right: 10px; gap: 6px; padding: 4px; }
  .live { padding: 4px 9px; }
  .map-tools { top: 10px; left: 10px; gap: 8px; }
  .map-tools button { width: 40px; height: 40px; }
  #fullscreen { display: none; }
  .region-label.country span { font-size: 20px; }

  .timeline { gap: 8px; padding: 10px 12px 12px; }
  .tl-ctrl { gap: 8px; }
  .play { width: 40px; height: 40px; border-radius: 12px; }
  .play .ic { width: 18px; height: 18px; }
  .now-btn { height: 34px; padding-inline: 9px; font-size: 12.5px; }
  .now-btn .ic { display: none; }
  .speed { min-width: 38px; height: 34px; padding-inline: 6px; }
  .tl-head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .tl-head b { font-size: 13px; max-width: 100%; }
  .tl-badge { font-size: 10.5px; padding: 1px 8px; }
  .tl-bar { height: 40px; }
  .tl-cell { border-inline-end-width: 2px; border-radius: 7px; }
  .tl-cell b { font-size: 11.5px; }
  .tl-cell small { font-size: 10px; }

  .legend { padding: 12px 14px; gap: 10px; }
  .lg-scale { min-width: 100%; }
  .now-temp { font-size: 54px; }
  .now-icon { width: 80px; height: 80px; }
  .days-head { display: none; }
  .drow { grid-template-columns: minmax(64px, 1fr) 44px minmax(120px, 2fr) 52px; gap: 10px; padding: 10px 8px; }
  .d-cond span, .d-wind, .d-uv { display: none; }
  .d-cond svg { width: 38px; height: 38px; }
  .d-rain small { display: none; }
  .d-range b { min-width: 28px; font-size: 16px; }
  .details-grid, .mini-grid { grid-template-columns: 1fr; gap: 14px; }
  .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
  .mini b { font-size: 19px; }
  .dcard { min-height: 0; }
  .tips { grid-template-columns: 1fr; padding-inline: 14px; }
  .section-head h2 { font-size: 19px; }
  .scroll-btns { display: none; }
  .h-legend { margin-inline-start: 0; gap: 4px 12px; font-size: 11.5px; }
  .upd .src { display: none; }
  .page-head h1 { font-size: 25px; }
  .ccards, .ccards.cols-4, .ccards.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 12px; gap: 8px; }
  .ccard { padding: 9px 10px; padding-inline-end: 34px; gap: 6px; }
  .cw-icon { width: 30px; height: 30px; }
  .cw-t { font-size: 17px; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .post-grid { grid-template-columns: 1fr; padding-inline: 12px; }
  .faq-list { grid-template-columns: 1fr; padding-inline: 12px; }
  .article { padding: 20px 16px; }
  .article-head h1 { font-size: 25px; }
  .post-grid.big { grid-template-columns: 1fr; }
  .blog-hero-head h1, .article-hero h1 { font-size: 27px; }
  .post-card.featured .pc-body { padding: 18px; }
  .post-card.featured h2 { font-size: 20px; }
  .article-hero { padding-bottom: 70px; }
  .hero-figure { margin-top: -56px; }
  .hero-figure img { border-radius: 14px; }
  .scale-levels { grid-template-columns: 1fr 1fr; }
  .months-graphic { grid-template-columns: repeat(3, 1fr); }
  .tlg-bar b { font-size: 14px; }
  .tlg-bar small { font-size: 11px; }
  .infographic { padding: 12px; margin-inline: -4px; }
  .infographic.ig-map text { font-size: 24px; }
  .prose { font-size: 16.5px; }
  .prose h2 { font-size: 21px; }
  .prose-card { padding: 18px 16px; }
  .city-group h2 { font-size: 17px; padding-inline: 14px; }
  .sun-arc { max-width: 210px; }
  .card-head h2 { font-size: 18px; }
}

.notfound { max-width: 720px; width: 100%; margin: 24px auto; padding: 44px 28px; text-align: center; display: grid; justify-items: center; gap: 12px; }
.nf-code { font-size: 88px; font-weight: 800; line-height: 1; background: linear-gradient(135deg, #4da3ff, var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound h1 { margin: 0; font-size: 28px; font-weight: 800; }
.notfound p { margin: 0; color: var(--muted); line-height: 1.8; max-width: 520px; }
.nf-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.nf-links .btn { display: inline-flex; align-items: center; gap: 8px; }
.nf-links .btn .ic { width: 18px; height: 18px; }
.nf-links .btn:not(.btn-primary) { background: #fff; border: 1px solid var(--line); color: var(--navy); }
.nf-links .btn:not(.btn-primary):hover { border-color: #b9cff3; color: var(--blue); }

/* Phones: lighter detail cards and tiles */
@media (max-width: 600px) {
  .dcard { min-height: 0; padding: 16px; }
  .gauge svg { max-width: 180px; }
  .compass svg { width: 132px; height: 132px; }
  .sun-arc { max-width: 180px; }
  .ccards.cols-4 .cc-name small { display: none; }
  .now-parts { gap: 6px; }
  .np small { font-size: 11.5px; }
  .np svg:not(.ic) { width: 34px; height: 34px; }
  .np b { font-size: 17px; }
}

/* Phones: denser lists and single-row chip bars */
@media (max-width: 600px) {
  .card-head { flex-wrap: wrap; }
  .card-head > div:first-child { flex: 1 1 100%; }
  .region-grid .ccards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cc-name small { display: none; }
  .region-index, .blog-tools .chips, .chip-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .region-index a, .chip-btn { flex: none; }
  .blog-tools .chips { flex: 1 1 100%; min-width: 0; }
  .posts-card .post-grid { display: grid; grid-auto-flow: column; grid-auto-columns: 82%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 6px; }
  .posts-card .post-grid > * { scroll-snap-align: start; }
  .footer-links a { display: inline-block; padding-block: 7px; }
  .now-range { font-size: 13px; gap: 2px 10px; }
  .faq-list { grid-template-columns: 1fr; }
}

/* Phones: the language switch shows only its globe (the link carries an aria-label) */
@media (max-width: 600px) {
  .lang-switch span { display: none; }
}

/* ============ English edition (LTR) ============
   The stylesheet is written for RTL; logical properties mirror by themselves.
   These rules undo the physical tricks for <html dir="ltr">. */
/* Things centred with inset-inline-start + translate */
[dir="ltr"] .tl-thumb, [dir="ltr"] .tl-tip { translate: -50% 0; }
/* Map overlays: status at the inline start (left), tools at the inline end (right) */
[dir="ltr"] .map-status { right: auto; left: 14px; }
[dir="ltr"] .map-tools { left: auto; right: 14px; }
/* Latin text inside the LTR map container */
[dir="ltr"] .city-label .nm, [dir="ltr"] .region-label span { direction: ltr; }
[dir="ltr"] .region-label.country span { letter-spacing: 2px; }
[dir="ltr"] .dm .chip { direction: ltr; padding: 2px 9px 2px 3px; }
[dir="ltr"] .pt-popup .leaflet-popup-content { direction: ltr; }
/* Hourly strip fades on its inline end */
[dir="ltr"] .hscroll { mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
/* Sun arc: sunrise on the inline start like the times below it */
[dir="ltr"] .sun-arc { transform: scaleX(-1); }
/* "Read more" arrow nudges forward */
[dir="ltr"] .post-card:hover .pc-more .ic { translate: 3px 0; }
[dir="ltr"] .breadcrumb li + li::before { content: "›"; }
/* Day parts: two-word English names may wrap */
[dir="ltr"] .np small { white-space: normal; line-height: 1.2; min-height: 2.4em; display: grid; place-items: center; }
@media (max-width: 640px) {
  [dir="ltr"] .map-status { left: 10px; }
  [dir="ltr"] .map-tools { right: 10px; }
  /* English weekday names are longer ("Wednesday") */
  [dir="ltr"] .drow { grid-template-columns: minmax(86px, 1fr) 40px minmax(108px, 2fr) 46px; gap: 8px; }
  [dir="ltr"] .d-name b { font-size: 15px; }
}
