/* Clima de Hoy - tools.css. All selectors prefixed .cdh-. Loaded after theme.css.
   Uses theme vars with fallbacks: --brand --accent --bg --text (optional --surface --border --muted). */
.cdh {
  --c-brand: var(--brand, #1e3a8a); --c-accent: var(--accent, #38bdf8); --c-bg: var(--bg, #f3f8ff); --c-text: var(--text, #0f172a);
  --c-surface: var(--surface, #ffffff); --c-border: var(--border, #cfe0f5); --c-muted: var(--muted, #475569);
  --c-soft: color-mix(in srgb, var(--c-accent) 14%, var(--c-surface));
  --c-err: #b91c1c; --c-ok: #15803d;
  box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 1100px; margin: 0 auto; padding: 12px;
  height: min(calc(100vh - var(--cdh-header-h, 64px)), 640px); height: min(calc(100dvh - var(--cdh-header-h, 64px)), 640px); min-height: 440px;
  background: var(--c-surface); color: var(--c-text); border: 1px solid var(--c-border); border-radius: 14px; font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cdh { --c-surface: var(--surface, #0f1b33); --c-text: var(--text, #e2e8f0); --c-border: var(--border, #25365a); --c-muted: var(--muted, #a8b5cc); --c-brand: var(--brand, #93c5fd); --c-err: #fca5a5; --c-ok: #86efac; }
}
:root[data-theme="dark"] .cdh { --c-surface: var(--surface, #0f1b33); --c-text: var(--text, #e2e8f0); --c-border: var(--border, #25365a); --c-muted: var(--muted, #a8b5cc); --c-brand: var(--brand, #93c5fd); --c-err: #fca5a5; --c-ok: #86efac; }
.cdh *, .cdh *::before, .cdh *::after { box-sizing: border-box; }
.cdh :focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; border-radius: 4px; }
.cdh a { color: var(--c-brand); text-underline-offset: 2px; }
.cdh h2, .cdh h3, .cdh p, .cdh dl, .cdh dd, .cdh ul { margin: 0; padding: 0; }
.cdh ul { list-style: none; }
.cdh-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; flex: none; }
.cdh-searchwrap { flex: 1 1 160px; min-width: 0; position: relative; }
.cdh-search { display: flex; gap: 6px; }
.cdh-input, .cdh-select { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; font: inherit; color: var(--c-text); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 10px; }
.cdh-btn { min-height: 44px; padding: 8px 14px; font: inherit; font-weight: 600; color: var(--c-brand); background: var(--c-surface); border: 1px solid var(--c-brand); border-radius: 10px; cursor: pointer; }
.cdh-btn:hover { background: var(--c-soft); }
.cdh-btn:disabled { opacity: .6; cursor: wait; }
.cdh-btn--pri { color: #fff; background: #1e3a8a; border-color: #1e3a8a; }
.cdh-btn--pri:hover { background: #172e6e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cdh-btn--pri { background: #2563eb; border-color: #2563eb; } }
.cdh-btn--ghost { border-color: var(--c-border); font-weight: 500; }
.cdh-btn--big { width: 100%; min-height: 56px; font-size: 1.15rem; }
.cdh-hint { font-size: .9rem; color: var(--c-muted); margin-top: 4px; }
.cdh-results { position: absolute; z-index: 5; left: 0; right: 0; top: 48px; max-height: 240px; overflow: auto; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 23, 42, .2); }
.cdh-res { display: block; width: 100%; min-height: 44px; padding: 8px 12px; text-align: left; font: inherit; color: inherit; background: none; border: 0; border-bottom: 1px solid var(--c-border); cursor: pointer; }
.cdh-res:hover { background: var(--c-soft); }
.cdh-res span { color: var(--c-muted); font-size: .9rem; }
.cdh-chips { flex: 1 1 100%; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.cdh-chip { flex: none; min-height: 44px; padding: 6px 12px; font: inherit; font-size: .92rem; color: var(--c-text); background: var(--c-soft); border: 1px solid var(--c-border); border-radius: 999px; cursor: pointer; white-space: nowrap; }
.cdh-chip:hover { border-color: var(--c-brand); }
.cdh-status { flex: none; min-height: 0; font-size: .92rem; color: var(--c-muted); }
.cdh-status:empty { display: none; }
.cdh-status--err { color: var(--c-err); }
.cdh-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.cdh-foot { flex: none; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding-top: 8px; border-top: 1px solid var(--c-border); font-size: .82rem; color: var(--c-muted); }
.cdh-foot-r { display: flex; gap: 6px; align-items: center; }
.cdh-foot .cdh-btn { min-height: 44px; font-size: .85rem; }
.cdh-segs { display: inline-flex; border: 1px solid var(--c-border); border-radius: 10px; overflow: hidden; }
.cdh-seg { min-height: 44px; padding: 6px 12px; font: inherit; font-size: .88rem; color: var(--c-text); background: var(--c-surface); border: 0; cursor: pointer; }
.cdh-seg + .cdh-seg { border-left: 1px solid var(--c-border); }
.cdh-seg[aria-pressed="true"] { color: #fff; background: #1e3a8a; font-weight: 600; }
.cdh-ph { margin-bottom: 6px; }
.cdh-place { font-size: 1.25rem; line-height: 1.2; color: var(--c-brand); }
.cdh-acc { font-size: .85rem; color: var(--c-muted); }
.cdh-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.cdh-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cdh-now { background: var(--c-soft); border-radius: 12px; padding: 10px 12px; }
.cdh-now-main { display: flex; align-items: center; gap: 12px; }
.cdh-ico { flex: none; }
.cdh-temp { font-size: 2.6rem; font-weight: 700; line-height: 1; }
.cdh-now--big .cdh-temp { font-size: 3.2rem; }
.cdh-cond { font-weight: 600; }
.cdh-feels { font-size: .88rem; color: var(--c-muted); }
.cdh-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px 12px; margin-top: 8px; }
.cdh-d dt { font-size: .78rem; color: var(--c-muted); }
.cdh-d dd { font-weight: 600; }
.cdh-sum { font-size: 1rem; }
.cdh-h3 { font-size: .95rem; color: var(--c-muted); font-weight: 600; }
.cdh-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.cdh-hr { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; background: var(--c-soft); border-radius: 10px; font-size: .85rem; text-align: center; }
.cdh-hr-t { color: var(--c-muted); font-size: .78rem; }
.cdh-hr-v { font-weight: 700; }
.cdh-hr-p { font-size: .75rem; color: var(--c-muted); display: inline-flex; align-items: center; gap: 2px; }
.cdh-drop { vertical-align: -1px; }
.cdh-alertlink { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.cdh-alertlink--on { color: var(--c-err); }
.cdh-lead, .cdh-note, .cdh-empty { font-size: .92rem; color: var(--c-muted); }
.cdh-empty { padding: 14px 4px; }
.cdh-fb { flex: 1 1 100%; } .cdh-fb summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--c-brand); font-weight: 600; }
.cdh-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; }
.cdh-lbl { font-weight: 600; }
.cdh-error { padding: 14px; border: 1px solid var(--c-err); border-radius: 10px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.cdh-skels { display: flex; flex-direction: column; gap: 10px; }
.cdh-skel { height: 64px; border-radius: 12px; background: linear-gradient(90deg, var(--c-soft), var(--c-border), var(--c-soft)); background-size: 200% 100%; animation: cdh-sh 1.4s linear infinite; }
.cdh-skel--0 { height: 110px; } .cdh-skel--2 { height: 48px; }
.cdh-skeltxt { color: var(--c-muted); }
@keyframes cdh-sh { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .cdh-skel { animation: none; } .cdh * { scroll-behavior: auto !important; transition: none !important; } }
.cdh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cdh-sr-mobile { display: none; }
/* tables */
.cdh-scroll { overflow: auto; max-height: 300px; border: 1px solid var(--c-border); border-radius: 10px; margin-top: 6px; }
.cdh-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cdh-table th, .cdh-table td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--c-border); white-space: nowrap; }
.cdh-table thead th { position: sticky; top: 0; background: var(--c-soft); z-index: 1; }
.cdh-table td svg { vertical-align: middle; }
.cdh-dayrow th { background: var(--c-soft); color: var(--c-brand); font-size: .82rem; }
.cdh-rowbest > * { background: color-mix(in srgb, #22c55e 22%, var(--c-surface)); }
.cdh-best-msg { padding: 8px 10px; border-left: 4px solid var(--c-ok); background: color-mix(in srgb, #22c55e 14%, var(--c-surface)); border-radius: 6px; font-size: .95rem; }
.cdh-chart { width: 100%; height: auto; max-height: 170px; margin-top: 6px; }
.cdh-chart .cdh-line { stroke: #ea580c; stroke-width: 2.5; stroke-linejoin: round; }
.cdh-chart .cdh-bar { fill: var(--c-accent); opacity: .55; }
.cdh-chart .cdh-best { fill: #22c55e; opacity: .18; }
.cdh-chart .cdh-grid-l { stroke: var(--c-border); stroke-width: 1; }
.cdh-chart .cdh-ax { fill: var(--c-muted); font-size: 11px; }
/* week */
.cdh-tabs { display: flex; gap: 4px; margin-bottom: 8px; border-bottom: 1px solid var(--c-border); }
.cdh-tab { min-height: 44px; padding: 6px 14px; font: inherit; color: var(--c-text); background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer; }
.cdh-tab[aria-selected="true"] { color: var(--c-brand); font-weight: 700; border-bottom-color: var(--c-brand); }
.cdh-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.cdh-dc { padding: 10px; background: var(--c-soft); border-radius: 12px; display: flex; flex-direction: column; gap: 4px; }
.cdh-dc-d { font-weight: 700; font-size: .9rem; }
.cdh-dc-main { display: flex; gap: 8px; align-items: center; }
.cdh-dc-c, .cdh-dc-p, .cdh-dc-n { font-size: .82rem; color: var(--c-muted); }
/* units */
.cdh-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.cdh-field { display: flex; flex-direction: column; gap: 4px; } .cdh-field label { font-size: .85rem; font-weight: 600; }
.cdh-field .cdh-input { font-size: 1.3rem; font-weight: 700; }
.cdh-rl { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 4px; font-size: .88rem; color: var(--c-muted); }
.cdh-range { width: 100%; min-height: 44px; accent-color: var(--c-brand); }
.cdh-conv-out { font-size: 1.1rem; font-weight: 700; }
.cdh-formulas { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .9rem; margin: 6px 0; }
/* places */
.cdh-split { display: grid; grid-template-columns: 1fr; gap: 10px; height: 100%; }
.cdh-listpane, .cdh-detailpane { min-height: 0; min-width: 0; }
.cdh-detailpane { display: none; }
.cdh-split--detail .cdh-listpane { display: none; } .cdh-split--detail .cdh-detailpane { display: block; }
.cdh-scroll.cdh-list { max-height: none; height: 100%; margin-top: 0; }
.cdh--places .cdh-body { display: flex; flex-direction: column; } .cdh--places .cdh-split { flex: 1; min-height: 0; height: auto; }
.cdh--places .cdh-detailpane { overflow: auto; }
.cdh-back { margin-bottom: 8px; }
.cdh-link { padding: 0; min-height: 44px; font: inherit; font-weight: 600; color: var(--c-brand); background: none; border: 0; text-decoration: underline; cursor: pointer; text-align: left; }
.cdh-table--places th small { display: block; font-weight: 400; color: var(--c-muted); margin-top: -10px; }
.cdh-table--places th, .cdh-table--places td { white-space: normal; }
.cdh-links { margin: 6px 0; font-size: .92rem; }
/* radar */
.cdh-radarbox { margin: 6px 0; min-height: 120px; }
.cdh-radar { display: block; width: 100%; max-width: 520px; max-height: 38vh; height: auto; object-fit: contain; margin: 0 auto; border: 1px solid var(--c-border); border-radius: 10px; background: #0b1220; }
.cdh-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2px 12px; font-size: .85rem; margin: 6px 0; }
.cdh-legend li { display: flex; gap: 8px; align-items: center; } .cdh-sw { width: 16px; height: 16px; border-radius: 4px; flex: none; border: 1px solid rgba(0, 0, 0, .3); }
.cdh-agencies { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 12px; margin-top: 8px; }
.cdh-agencies li { min-height: 32px; font-size: .92rem; }
/* alerts */
.cdh-emerg { flex: 1 1 100%; padding: 8px 10px; background: color-mix(in srgb, #ef4444 14%, var(--c-surface)); border-left: 4px solid #ef4444; border-radius: 6px; font-size: .92rem; }
.cdh-count { font-weight: 700; margin-bottom: 6px; }
.cdh-alert { margin-bottom: 6px; border: 1px solid var(--c-border); border-left-width: 6px; border-radius: 10px; background: var(--c-surface); }
.cdh-alert summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 44px; padding: 8px 10px; cursor: pointer; }
.cdh-sev0 { border-left-color: #7f1d1d; } .cdh-sev1 { border-left-color: #dc2626; } .cdh-sev2 { border-left-color: #f59e0b; } .cdh-sev3 { border-left-color: #3b82f6; } .cdh-sev4 { border-left-color: #94a3b8; }
.cdh-badge { padding: 2px 8px; font-size: .75rem; font-weight: 700; color: #fff; background: #64748b; border-radius: 999px; }
.cdh-sev0 .cdh-badge { background: #7f1d1d; } .cdh-sev1 .cdh-badge { background: #b91c1c; } .cdh-sev2 .cdh-badge { background: #b45309; } .cdh-sev3 .cdh-badge { background: #1d4ed8; }
.cdh-al-e { font-size: .82rem; color: var(--c-muted); margin-left: auto; }
.cdh-al-b { padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 8px; font-size: .9rem; }
.cdh-al-b pre, .cdh-pre { white-space: pre-wrap; font: inherit; margin: 0; word-break: break-word; }
/* wider screens */
@media (min-width: 700px) {
  .cdh { padding: 16px; gap: 10px; }
  .cdh-grid { grid-template-columns: minmax(280px, 5fr) 6fr; }
  .cdh-split { grid-template-columns: minmax(280px, 5fr) 6fr; }
  .cdh-detailpane { display: block; } .cdh-split--detail .cdh-listpane { display: block; } .cdh-back { display: none; }
  .cdh-temp { font-size: 3rem; } .cdh-now--big .cdh-temp { font-size: 3.6rem; }
  .cdh-scroll { max-height: 220px; }
}
@media (min-width: 700px) and (max-height: 760px) { .cdh-scroll { max-height: 170px; } .cdh-chart { max-height: 130px; } }
/* compact: short viewports */
@media (max-height: 700px) {
  .cdh { padding: 8px; gap: 6px; }
  .cdh-place { font-size: 1.1rem; } .cdh-temp { font-size: 2.2rem; } .cdh-now--big .cdh-temp { font-size: 2.4rem; }
  .cdh-now { padding: 8px 10px; } .cdh-details { margin-top: 4px; gap: 2px 10px; }
  .cdh-hr { padding: 4px 1px; } .cdh-hr-p { font-size: .7rem; }
  .cdh-chip { min-height: 44px; }
  .cdh-scroll { max-height: 190px; } .cdh-chart { max-height: 110px; }
  .cdh-lead { font-size: .85rem; }
}
@media (max-width: 520px) {
  .cdh-table .cdh-sr-mobile { display: none; }
  .cdh-search .cdh-btn { padding: 8px 10px; }
  .cdh-al-e { margin-left: 0; }
}
.cdh a.cdh-btn { display: inline-flex; align-items: center; text-decoration: none; }
.cdh a.cdh-btn--pri { color: #fff; }
/* week: CPC maps, climate */
.cdh-chart .cdh-line--lo { stroke: #2563eb; }
.cdh-lg { display: inline-block; width: 14px; height: 4px; border-radius: 2px; vertical-align: middle; background: #ea580c; }
.cdh-lg--lo { background: #2563eb; } .cdh-lg--bar { height: 10px; background: var(--c-accent); opacity: .6; }
.cdh-fig { margin: 6px 0; } .cdh-cpc { display: block; width: 100%; height: auto; max-width: 660px; border: 1px solid var(--c-border); border-radius: 10px; background: #fff; }
.cdh-fig .cdh-error { margin: 0; }
.cdh-panel:focus-visible { outline-offset: -2px; }
@media (max-width: 420px) { .cdh-tab { padding: 6px 8px; font-size: .9rem; } }
/* ===== animated + colourful weather (v2). transform/opacity only; all motion lives in prefers-reduced-motion: no-preference ===== */
.cdh { --cdh-t0: #2563eb; --cdh-t1: #0f766e; --cdh-t2: #15803d; --cdh-t3: #b45309; --cdh-t4: #c2410c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cdh { --cdh-t0: #60a5fa; --cdh-t1: #2dd4bf; --cdh-t2: #4ade80; --cdh-t3: #fbbf24; --cdh-t4: #fb923c; } }
:root[data-theme="dark"] .cdh { --cdh-t0: #60a5fa; --cdh-t1: #2dd4bf; --cdh-t2: #4ade80; --cdh-t3: #fbbf24; --cdh-t4: #fb923c; }
.cdh-t0 { color: var(--cdh-t0); } .cdh-t1 { color: var(--cdh-t1); } .cdh-t2 { color: var(--cdh-t2); } .cdh-t3 { color: var(--cdh-t3); } .cdh-t4 { color: var(--cdh-t4); }
.cdh-tv { font-weight: 700; }
.cdh-bt0 { border-top: 3px solid var(--cdh-t0); } .cdh-bt1 { border-top: 3px solid var(--cdh-t1); } .cdh-bt2 { border-top: 3px solid var(--cdh-t2); } .cdh-bt3 { border-top: 3px solid var(--cdh-t3); } .cdh-bt4 { border-top: 3px solid var(--cdh-t4); }
.cdh-swt0 { background: var(--cdh-t0); } .cdh-swt1 { background: var(--cdh-t1); } .cdh-swt2 { background: var(--cdh-t2); } .cdh-swt3 { background: var(--cdh-t3); } .cdh-swt4 { background: var(--cdh-t4); }
.cdh-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .85); }
.cdh-band { font-size: .85rem; font-weight: 600; margin-top: 2px; }
/* scene cards */
.cdh-sc { position: relative; overflow: hidden; isolation: isolate; color: #0f172a; }
.cdh-sc > :not(.cdh-fx) { position: relative; z-index: 1; }
.cdh-sc .cdh-place, .cdh-sc .cdh-sum, .cdh-sc .cdh-cond, .cdh-sc .cdh-dc-d { color: inherit; }
.cdh-sc .cdh-feels, .cdh-sc .cdh-d dt, .cdh-sc .cdh-acc, .cdh-sc .cdh-dc-c, .cdh-sc .cdh-dc-p { color: inherit; opacity: .9; }
.cdh-sc .cdh-link { color: inherit; }
.cdh-sc-clear { background: linear-gradient(160deg, #7cc4ff 0%, #a9dbff 45%, #ffe08a 100%); }
.cdh-sc-night { background: linear-gradient(160deg, #0b1030 0%, #1e1b6b 60%, #312e81 100%); color: #f8fafc; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
.cdh-sc-partly { background: linear-gradient(160deg, #8fcbff 0%, #cfe3f4 60%, #f4e3b0 100%); }
.cdh-sc-partlyn { background: linear-gradient(160deg, #101a3f 0%, #2b3a73 70%, #3b4a85 100%); color: #f8fafc; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
.cdh-sc-cloud { background: linear-gradient(160deg, #c3d1e2 0%, #9fb2c8 100%); }
.cdh-sc-cloudn { background: linear-gradient(160deg, #3b4a60 0%, #1e293b 100%); color: #f8fafc; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
.cdh-sc-rain { background: linear-gradient(170deg, #0b3a5b 0%, #0f5a7a 55%, #0f766e 100%); color: #f8fafc; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.cdh-sc-snow { background: linear-gradient(160deg, #eaf5ff 0%, #bcd6f5 100%); }
.cdh-sc-storm { background: linear-gradient(165deg, #2b1458 0%, #1e1b4b 55%, #3b2a7a 100%); color: #f8fafc; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.cdh-sc-fog { background: linear-gradient(160deg, #ddd9d4 0%, #b8b2ab 100%); }
.cdh-now--hdr { padding: 10px 12px; margin-bottom: 6px; }
.cdh-now--hdr .cdh-cond { font-size: 1.05rem; }
.cdh-dc.cdh-sc { border: 0; }
/* effect layers */
.cdh-fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.cdh-fx i { position: absolute; display: block; }
.cdh-fx-rain i, .cdh-fx-storm i { top: -24px; width: 1.5px; height: 16px; border-radius: 2px; background: linear-gradient(to bottom, rgba(190, 230, 255, 0), rgba(190, 230, 255, .75)); will-change: transform; }
.cdh-fx-snow i { top: -8px; width: 5px; height: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(100, 150, 200, .4); will-change: transform; }
.cdh-fx-night i, .cdh-fx-partlyn i { width: 2px; height: 2px; border-radius: 50%; background: #fef3c7; opacity: .8; }
.cdh-fx-night i:nth-child(3n), .cdh-fx-partlyn i:nth-child(3n) { width: 3px; height: 3px; }
.cdh-fx-cloud i, .cdh-fx-partly i, .cdh-fx-cloudn i { width: 120px; height: 34px; border-radius: 40px; background: rgba(255, 255, 255, .5); }
.cdh-fx-cloudn i { background: rgba(148, 163, 184, .22); }
.cdh-fx-cloud i:nth-child(1), .cdh-fx-partly i:nth-child(1), .cdh-fx-cloudn i:nth-child(1) { top: 8%; }
.cdh-fx-cloud i:nth-child(2), .cdh-fx-partly i:nth-child(2), .cdh-fx-cloudn i:nth-child(2) { top: 42%; }
.cdh-fx-cloud i:nth-child(3), .cdh-fx-partly i:nth-child(3), .cdh-fx-cloudn i:nth-child(3) { top: 74%; }
.cdh-fx-fog i { left: -30% !important; width: 160%; height: 26%; background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0)); }
.cdh-fx-fog i:nth-child(1) { top: 10%; } .cdh-fx-fog i:nth-child(2) { top: 40%; } .cdh-fx-fog i:nth-child(3) { top: 68%; }
.cdh-fx-clear i { left: auto !important; right: -34px; top: -34px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 236, 150, .9), rgba(255, 236, 150, 0) 65%); }
.cdh-sc-storm::after { content: ""; position: absolute; inset: 0; z-index: 0; background: rgba(225, 225, 255, .9); opacity: 0; pointer-events: none; }
/* meters */
.cdh-gauge { display: block; height: 4px; width: 100%; max-width: 56px; background: rgba(56, 189, 248, .25); border-radius: 3px; overflow: hidden; }
.cdh-gauge-f { display: block; height: 100%; background: #0284c7; border-radius: 3px; }
.cdh-table .cdh-gauge, .cdh-dc-p .cdh-gauge { display: inline-block; width: 40px; vertical-align: middle; margin-left: 4px; }
.cdh-hr .cdh-gauge { max-width: 80%; }
.cdh-uv { display: inline-block; padding: 1px 8px; border-radius: 999px; font-weight: 700; font-size: .85rem; text-shadow: none; }
.cdh-wind { display: inline-flex; align-items: center; gap: 4px; }
.cdh-sway { display: inline-flex; }
.cdh-chart .cdh-area { opacity: .2; }
.cdh-chart .cdh-line--lo { stroke-dasharray: 6 4; stroke-width: 2; }
.cdh-lg--hi { background: #475569; } .cdh-lg--lo { height: 0; background: none; border-top: 3px dashed #475569; }
.cdh-key { margin-top: 6px; font-size: .9rem; }
.cdh-key summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--c-brand); font-weight: 600; }
.cdh-key .cdh-legend { margin: 2px 0 6px; }
.cdh-banner { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 10px; border-radius: 10px; background: var(--c-soft); border: 1px solid var(--c-border); font-size: .85rem; line-height: 1.3; }
.cdh-banner[hidden] { display: none; }
.cdh-badge-geo { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #1e3a8a; color: #fff; font-weight: 700; font-size: .78rem; text-shadow: none; }
.cdh-link--inline { display: inline-flex; align-items: center; min-height: 44px; }
.cdh-busy { opacity: .55; transition: opacity .2s; }
.cdh-skel { animation-duration: 1.9s; }
.cdh-paused *, .cdh-paused *::before, .cdh-paused *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  .cdh-fx-rain i, .cdh-fx-storm i, .cdh-fx-snow i, .cdh-fx-fog i { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  @keyframes cdh-fall { from { transform: translateY(0); } to { transform: translateY(260px); } }
  @keyframes cdh-snowfall { 0% { transform: translate(0, 0); } 50% { transform: translate(10px, 130px); } 100% { transform: translate(-4px, 260px); } }
  @keyframes cdh-twk { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
  @keyframes cdh-drift { from { transform: translateX(-30px); } to { transform: translateX(40px); } }
  @keyframes cdh-glow { 0%, 100% { transform: scale(.92); opacity: .75; } 50% { transform: scale(1.08); opacity: 1; } }
  @keyframes cdh-flash { 0%, 58%, 100% { opacity: 0; } 60% { opacity: .5; } 62% { opacity: .05; } 65% { opacity: .38; } 70% { opacity: 0; } }
  @keyframes cdh-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  @keyframes cdh-spin { to { transform: rotate(360deg); } }
  @keyframes cdh-pulse { 0%, 100% { transform: scale(.94); } 50% { transform: scale(1.06); } }
  @keyframes cdh-cdrift { from { transform: translateX(-1.5px); } to { transform: translateX(2.5px); } }
  @keyframes cdh-idrop { 0% { transform: translate(0, -4px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(-2px, 8px); opacity: 0; } }
  @keyframes cdh-iflake { 0% { transform: translate(0, -4px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(2px, 6px); opacity: 0; } }
  @keyframes cdh-ibolt { 0%, 55%, 100% { opacity: .35; } 58%, 66% { opacity: 1; } 62% { opacity: .3; } }
  @keyframes cdh-ifog { from { transform: translateX(-3px); } to { transform: translateX(4px); } }
  @keyframes cdh-iwind { from { transform: translateX(-2px); opacity: .6; } to { transform: translateX(4px); opacity: 1; } }
  @keyframes cdh-sway { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
  .cdh-fx-rain i, .cdh-fx-storm i { animation: cdh-fall .9s linear infinite; }
  .cdh-fx-storm i { animation-duration: .7s; }
  .cdh-fx-snow i { animation: cdh-snowfall 6s linear infinite; }
  .cdh-fx-night i, .cdh-fx-partlyn i { animation: cdh-twk 3s ease-in-out infinite; }
  .cdh-fx-cloud i, .cdh-fx-partly i, .cdh-fx-cloudn i, .cdh-fx-fog i { animation: cdh-drift 16s ease-in-out infinite alternate; }
  .cdh-fx-clear i { animation: cdh-glow 5s ease-in-out infinite; }
  .cdh-sc-storm::after { animation: cdh-flash 6s linear infinite; }
  .cdh-fresh > * { animation: cdh-rise .45s ease-out both; }
  .cdh-fresh > *:nth-child(2) { animation-delay: .06s; } .cdh-fresh > *:nth-child(3) { animation-delay: .12s; } .cdh-fresh > *:nth-child(n+4) { animation-delay: .18s; }
  .cdh-ico--anim .cdh-a-rays { transform-box: fill-box; transform-origin: center; animation: cdh-spin 24s linear infinite; }
  .cdh-ico--anim .cdh-a-pulse { transform-box: fill-box; transform-origin: center; animation: cdh-pulse 3s ease-in-out infinite; }
  .cdh-ico--anim .cdh-a-cloud { animation: cdh-cdrift 6s ease-in-out infinite alternate; }
  .cdh-ico--anim .cdh-a-drop { animation: cdh-idrop .9s linear infinite; }
  .cdh-ico--anim.cdh-heavy .cdh-a-drop { animation-duration: .6s; } .cdh-ico--anim.cdh-light .cdh-a-drop { animation-duration: 1.5s; }
  .cdh-ico--anim .cdh-a-drop.d1 { animation-delay: .3s; } .cdh-ico--anim .cdh-a-drop.d2 { animation-delay: .6s; } .cdh-ico--anim .cdh-a-drop.d3 { animation-delay: .15s; }
  .cdh-ico--anim .cdh-a-flake { animation: cdh-iflake 2.6s linear infinite; } .cdh-ico--anim .cdh-a-flake.f1 { animation-delay: .8s; } .cdh-ico--anim .cdh-a-flake.f2 { animation-delay: 1.6s; }
  .cdh-ico--anim .cdh-a-bolt { animation: cdh-ibolt 3s linear infinite; }
  .cdh-ico--anim .cdh-a-fog { animation: cdh-ifog 4s ease-in-out infinite alternate; } .cdh-ico--anim .cdh-a-fog.f1 { animation-delay: -1.3s; } .cdh-ico--anim .cdh-a-fog.f2 { animation-delay: -2.6s; }
  .cdh-ico--anim .cdh-a-wind { animation: cdh-iwind 1.8s ease-in-out infinite alternate; } .cdh-ico--anim .cdh-a-wind.w1 { animation-delay: -.6s; } .cdh-ico--anim .cdh-a-wind.w2 { animation-delay: -1.2s; }
  .cdh-ico--anim .cdh-a-star { animation: cdh-twk 2.4s ease-in-out infinite; } .cdh-ico--anim .cdh-a-star.s1 { animation-delay: .8s; } .cdh-ico--anim .cdh-a-star.s2 { animation-delay: 1.6s; }
  .cdh-sway { animation: cdh-sway 1.8s ease-in-out infinite alternate; }
}
/* ===== layout fixes: full column width, places table, 44px targets ===== */
.cdh { max-width: none; margin: 0 0 22px; }
.cdh-table--places th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--c-surface); min-width: 120px; }
.cdh-table--places thead th:first-child { left: 0; z-index: 2; }
.cdh-scroll { max-width: 100%; }
.cdh-src a, .cdh-links a, .cdh-note a, .cdh-agencies a, .cdh-key a, .cdh-fig a, .cdh-al-b a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; }
.cdh-links { min-height: 44px; display: flex; align-items: center; flex-wrap: wrap; gap: 0 8px; }
.cdh-agencies li { min-height: 44px; display: flex; align-items: center; flex-wrap: wrap; gap: 0 4px; }
.cdh-legend li { min-height: 28px; }
.cdh-foot-l { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; }
/* ===== day strip, hourly timeline, detail cards ===== */
.cdh-sumline { font-size: .95rem; margin-top: 6px; }
.cdh-days { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 8px; margin: 6px 0; scroll-snap-type: x proximity; scrollbar-width: thin; max-width: 100%; }
.cdh-tile { flex: 0 0 72px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 104px; padding: 8px 4px; font: inherit; color: var(--c-text); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 12px; cursor: pointer; text-decoration: none; }
div.cdh-tile { cursor: default; }
.cdh-tile:hover { border-color: var(--c-brand); }
.cdh-tile[aria-pressed="true"] { background: var(--c-soft); border: 2px solid var(--c-brand); padding: 7px 3px; }
.cdh-tile-d { font-size: .82rem; font-weight: 600; white-space: nowrap; }
.cdh-tile-hi { font-weight: 800; font-size: 1.05rem; }
.cdh-tile-lo { font-size: .88rem; opacity: .75; }
.cdh-tile--more { justify-content: center; color: var(--c-brand); border-style: dashed; }
.cdh-tlwrap { margin: 6px 0; }
.cdh-tlbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cdh-tlbtns { display: flex; gap: 6px; }
.cdh-arrow { min-width: 44px; padding: 4px 10px; font-size: 1.4rem; line-height: 1; }
.cdh-tlbox { overflow-x: auto; border: 1px solid var(--c-border); border-radius: 10px; scroll-snap-type: x proximity; scroll-padding-left: 84px; max-width: 100%; background: var(--c-surface); }
.cdh-tl { border-collapse: separate; border-spacing: 0; font-size: .88rem; width: max-content; }
.cdh-tl th, .cdh-tl td { width: 68px; min-width: 68px; max-width: 68px; padding: 6px 2px; text-align: center; vertical-align: middle; white-space: nowrap; border-bottom: 1px solid var(--c-border); scroll-snap-align: start; }
.cdh-tl tbody tr:last-child > * { border-bottom: 0; }
.cdh-tl th.cdh-tl-l, .cdh-tl th.cdh-tl-corner { position: sticky; left: 0; z-index: 2; width: 84px; min-width: 84px; max-width: 84px; text-align: left; padding-left: 8px; background: var(--c-surface); font-size: .78rem; font-weight: 600; color: var(--c-muted); border-right: 1px solid var(--c-border); scroll-snap-align: none; }
.cdh-tl thead th { background: var(--c-soft); font-weight: 700; }
.cdh-tl thead th.cdh-tl-corner { background: var(--c-soft); }
.cdh-tl tr.cdh-tl-r:nth-child(1) > * { height: 40px; }
.cdh-tl td svg { vertical-align: middle; }
.cdh-tdn { background: color-mix(in srgb, #1e3a8a 10%, var(--c-surface)); }
.cdh-tl thead th.cdh-tdn { background: color-mix(in srgb, #1e3a8a 16%, var(--c-soft)); }
.cdh-tnow { background: color-mix(in srgb, var(--c-accent) 28%, var(--c-surface)); font-weight: 700; }
.cdh-tl thead th.cdh-tnow { background: color-mix(in srgb, var(--c-accent) 40%, var(--c-soft)); }
.cdh-nowtag { display: block; font-size: .7rem; font-weight: 700; color: var(--c-brand); }
.cdh-cellrain, .cdh-wcell { display: inline-flex; align-items: center; gap: 3px; }
.cdh-cellrain .cdh-drop { flex: none; }
.cdh-dcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.cdh-dcard { background: var(--c-soft); border: 1px solid var(--c-border); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.cdh-dcard-h { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.cdh-dcard-h h4 { margin: 0; font-size: .9rem; }
.cdh-dcard-v { font-weight: 700; font-size: .95rem; }
.cdh-info-b { flex: none; width: 44px; height: 44px; margin: -8px -8px 0 0; display: inline-flex; align-items: center; justify-content: center; color: var(--c-brand); background: none; border: 0; border-radius: 50%; cursor: pointer; }
.cdh-info { font-size: .82rem; color: var(--c-muted); }
.cdh-spark { width: 100%; height: 36px; }
.cdh-spark-l { stroke: var(--c-brand); }
.cdh-dview-wrap { min-height: 120px; }
@media (max-width: 520px) { .cdh-tile { flex-basis: 68px; } }
/* ===== auto height: the page scrolls, never an inner vertical scrollbar in the tool ===== */
.cdh { height: auto; min-height: 420px; overflow: visible; }
.cdh-body { flex: 1 0 auto; min-height: 0; overflow: visible; }
.cdh--places .cdh-split { height: auto; }
.cdh--places .cdh-detailpane { overflow: visible; }
.cdh-scroll.cdh-list { height: auto; max-height: 460px; }
.cdh-radar { max-height: 60vh; }
.cdh { position: relative; overflow-x: clip; }
.cdh-tlbox, .cdh-scroll, .cdh-key, .cdh-dcard { position: relative; }

/* forecast block on radar / alerts / units pages */
.cdh-fc{margin-top:1.25rem;padding-top:1rem;border-top:1px solid rgba(11,29,110,.15)}
.cdh-fc-top{display:flex;justify-content:flex-end;margin-bottom:.5rem}
.cdh-fc-t{margin:0;font-size:1.25rem}
.cdh-met{margin-top:1rem}

.cdh-badge-geo--ip{background:#fef3c7;color:#78350f}
