/**
 * Esőkép.hu – közös komponensstílusok.
 *
 * Ezek az elemek a FŐOLDALON és a VÁROSOLDALAKON is megjelennek:
 *   .wv-* / .wc-*  órás diagram, klíma-kontextus, klímaóra
 *   .cm-*          országos térkép (villámréteggel)
 *   .hm-*          HungaroMet panel (fronthatás, UV, szöveges előrejelzés)
 *   .tone-*        a diagram metrikánkénti színhangolása
 *
 * Külön fájlban vannak, mert a főoldal NEM tölti be a city-page.css-t (saját,
 * beágyazott stílusa van). Amíg ezek a szabályok ott laktak, a főoldalon a
 * térkép az SVG alapértelmezett fekete kitöltésével jelent meg, a HungaroMet
 * panel pedig formázatlan szövegként.
 *
 * A használt CSS-változókat (--surface, --muted, --line, --accent, --blue,
 * --text, --radius) mindkét oldal saját :root blokkja definiálja.
 */

/* ====================================================================
   HungaroMet hivatalos veszélyjelzés (2026-08-17)
   A saját, modellalapú riasztási kártya FÖLÖTT jelenik meg.
   ==================================================================== */

.hm-warning {
    border: 1px solid var(--line);
    border-left-width: 5px;
    border-radius: var(--radius);
    background: var(--surface);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.hm-warning[hidden] { display: none; }

.hm-title {
    margin: 0 0 .6rem;
    font-size: .95rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.hm-body { margin: 0 0 .6rem; font-size: .93rem; line-height: 1.55; }

.hm-list { list-style: none; margin: 0 0 .6rem; padding: 0; display: flex; flex-direction: column; gap: .6rem; }

.hm-item {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: .6rem .75rem;
    border-radius: 6px;
    background: var(--surface-soft);
}

.hm-badge {
    align-self: flex-start;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .12rem .5rem;
    border-radius: 999px;
    background: var(--surface-strong);
    color: var(--text);
}

.hm-event { font-size: 1rem; line-height: 1.25; }

.hm-desc { font-size: .9rem; line-height: 1.5; color: var(--muted); }

/* Fokozatok. A szinek a hivatalos sarga/narancs/piros logikat kovetik. */

.hm-warning.hm-none { border-left-color: var(--line); }

.hm-warning.hm-l1 { border-left-color: #eab308; }

.hm-warning.hm-l2 { border-left-color: #f97316; }

.hm-warning.hm-l3 { border-left-color: var(--danger); }

.hm-item.hm-l1 .hm-badge { background: rgba(234, 179, 8, .18); color: #a16207; }

.hm-item.hm-l2 .hm-badge { background: rgba(249, 115, 22, .18); color: #c2410c; }

.hm-item.hm-l3 .hm-badge { background: rgba(220, 38, 38, .18); color: var(--danger); }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .hm-item.hm-l1 .hm-badge { color: #fde047; }
    :root:not([data-theme="light"]) .hm-item.hm-l2 .hm-badge { color: #fdba74; }
}

:root[data-theme="dark"] .hm-item.hm-l1 .hm-badge { color: #fde047; }

:root[data-theme="dark"] .hm-item.hm-l2 .hm-badge { color: #fdba74; }

.hm-meta {
    margin: 0;
    font-size: .78rem;
    line-height: 1.5;
    color: var(--muted);
}

.hm-stale { color: var(--danger); }

/* --- nézetváltó --- */

.wv-tabs {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    margin-bottom: 1rem;
}

.wv-tabs button {
    min-height: 34px;
    padding: .3rem .85rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: .86rem;
    font-weight: 700;
    cursor: pointer;
}

.wv-tabs button[aria-selected="true"] {
    background: var(--surface);
    color: var(--accent-strong);
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* --- órás diagram --- */

.wv-figure { margin: 0; }

.wv-scroll {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.wv-chart { display: block; height: auto; min-width: 100%; }

.wv-line {
    fill: none;
    stroke: var(--wv-tone, var(--accent));
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wv-area { fill: color-mix(in srgb, var(--wv-tone, var(--accent)) 12%, transparent); stroke: none; }

.wv-dot { fill: var(--surface); stroke: var(--wv-tone, var(--accent)); stroke-width: 2; }

.wv-dot.is-now { fill: var(--wv-tone, var(--accent)); stroke: var(--surface); stroke-width: 2.5; }

.wv-bar { fill: color-mix(in srgb, var(--blue) 55%, transparent); }

.wv-bar.has-mm { fill: color-mix(in srgb, var(--blue) 80%, transparent); }

.wv-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }

/* Metrikankenti szinhangolas. Egy valtozot allitunk, a tobbi ebbol szarmazik. */

.tone-warm   { --wv-tone: var(--accent); }

.tone-blue   { --wv-tone: var(--blue); }

.tone-teal   { --wv-tone: #0d9488; }

.tone-violet { --wv-tone: #7c5cd6; }

.tone-slate  { --wv-tone: #64748b; }

.tone-uv     { --wv-tone: #ea8c00; }

:root[data-theme="dark"] .tone-teal,
:root:not([data-theme="light"]) .tone-teal   { --wv-tone: #2dd4bf; }

:root[data-theme="dark"] .tone-violet,
:root:not([data-theme="light"]) .tone-violet { --wv-tone: #a78bfa; }

:root[data-theme="dark"] .tone-slate,
:root:not([data-theme="light"]) .tone-slate  { --wv-tone: #94a3b8; }

:root[data-theme="dark"] .tone-uv,
:root:not([data-theme="light"]) .tone-uv     { --wv-tone: #fbbf24; }

/* Felso metrikaoszlopok (csapadek mm, UV) */

.wv-vbar { fill: color-mix(in srgb, var(--wv-tone, var(--accent)) 60%, transparent); }

/* UV-savok a WHO skala szerint – sotet modban is olvashato telitettseg */

.wv-vbar.uv1 { fill: color-mix(in srgb, #22c55e 55%, transparent); }

.wv-vbar.uv2 { fill: color-mix(in srgb, #eab308 60%, transparent); }

.wv-vbar.uv3 { fill: color-mix(in srgb, #f97316 65%, transparent); }

.wv-vbar.uv4 { fill: color-mix(in srgb, #ef4444 65%, transparent); }

.wv-vbar.uv5 { fill: color-mix(in srgb, #a855f7 70%, transparent); }

/* Szel: atlag es lokes kozotti sav */

.wv-band { fill: color-mix(in srgb, var(--wv-tone, var(--accent)) 14%, transparent); stroke: none; }

.wv-gust {
    fill: none;
    stroke: color-mix(in srgb, var(--wv-tone, var(--accent)) 55%, transparent);
    stroke-width: 1.6;
    stroke-dasharray: 5 4;
}

/* Masodlagos gorbe (hoerzet, felhozet) */

.wv-ghost {
    fill: none;
    stroke: var(--muted);
    stroke-width: 1.6;
    stroke-dasharray: 4 4;
    opacity: .75;
}

.wv-chart text {
    font-family: inherit;
    text-anchor: middle;
    dominant-baseline: middle;
}

.wv-val  { font-size: 13px; font-weight: 800; fill: var(--text); }

.wv-temp { font-size: 13px; font-weight: 800; fill: var(--text); }

.wv-hour { font-size: 11.5px; font-weight: 600; fill: var(--muted); }

.wv-prob { font-size: 11px; font-weight: 700; fill: var(--blue); }

.wv-mm   { font-size: 11px; font-weight: 800; fill: var(--blue); }

.wv-dir  { font-size: 10.5px; font-weight: 700; fill: var(--muted); }

/* ---- Metrikavalto ---- */

.wv-metrics {
    display: flex;
    gap: .4rem;
    margin: 0 0 .6rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.wv-metrics::-webkit-scrollbar { display: none; }

.wv-metrics button {
    flex: 0 0 auto;
    padding: .38rem .7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font: inherit;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.wv-metrics button:hover { color: var(--text); border-color: var(--accent); }

.wv-metrics button[aria-selected="true"] {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ---- Kurzor es buborek ---- */

.wv-plot { position: relative; }

.wv-hit { fill: transparent; }

.wv-cursor,
.wv-cursor-dot { opacity: 0; pointer-events: none; }

.wv-chart.is-hover .wv-cursor,
.wv-chart.is-hover .wv-cursor-dot { opacity: 1; }

.wv-cursor { stroke: var(--muted); stroke-width: 1.4; stroke-dasharray: 3 3; }

.wv-cursor-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2.5; }

.wv-tip {
    position: absolute;
    top: 6px;
    z-index: 3;
    min-width: 172px;
    transform: translateX(10px);
    padding: .5rem .6rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 6px 22px rgb(0 0 0 / 18%);
    pointer-events: none;
}

.wv-tip.flip { transform: translateX(calc(-100% - 10px)); }

.wv-tip-h {
    font-size: .82rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: .3rem;
    padding-bottom: .3rem;
    border-bottom: 1px solid var(--line);
}

.wv-tip-h b { color: var(--accent); }

.wv-tip-g {
    display: grid;
    grid-template-columns: auto auto;
    gap: .16rem .6rem;
    font-size: .78rem;
    line-height: 1.35;
}

.wv-tip-k { color: var(--muted); }

.wv-tip-v { color: var(--text); font-weight: 700; text-align: right; white-space: nowrap; }

.wv-tip-v em { font-style: normal; font-weight: 600; color: var(--muted); }

/* Szelesebb kepernyon ket kulcs-ertek par fer egy sorba: igy a buborek fele
   olyan magas, es nem takarja el a gorbet. Mobilon marad az egy oszlop. */

@media (min-width: 560px) {
    .wv-tip { min-width: 316px; }
    .wv-tip-g { grid-template-columns: auto auto auto auto; column-gap: .5rem; }
    .wv-tip-g .wv-tip-k:nth-child(4n+3) { padding-left: .5rem; border-left: 1px solid var(--line); }
}

.wv-caption {
    margin: .6rem 0 0;
    font-size: .84rem;
    color: var(--muted);
    line-height: 1.5;
}

/* --- Klíma-kontextus: eltérés a harmincéves normáltól --- */

.wv-ctx-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.wv-ctx {
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.wv-ctx-head {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    margin-bottom: .8rem;
}

.wv-ctx-key {
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
}

.wv-ctx-verdict { font-size: 1.06rem; line-height: 1.25; color: var(--text); }

/* A skála: középen a „szokásos", a tű mutatja az eltérést. */

.wv-ctx-scale { position: relative; height: 22px; }

.wv-ctx-track {
    position: absolute; inset: 8px 0 auto 0;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg,
        color-mix(in srgb, var(--blue) 45%, transparent) 0%,
        var(--surface-strong) 50%,
        color-mix(in srgb, var(--danger) 45%, transparent) 100%);
}

.wv-ctx-dry .wv-ctx-track,
.wv-ctx-wet .wv-ctx-track {
    background: linear-gradient(90deg,
        color-mix(in srgb, #d97706 45%, transparent) 0%,
        var(--surface-strong) 50%,
        color-mix(in srgb, var(--blue) 55%, transparent) 100%);
}

.wv-ctx-zero {
    position: absolute; left: 50%; top: 3px;
    width: 2px; height: 16px;
    margin-left: -1px;
    border-radius: 2px;
    background: var(--muted);
    opacity: .55;
}

.wv-ctx-pin {
    position: absolute; top: 1px;
    width: 18px; height: 18px;
    margin-left: -9px;
    border-radius: 999px;
    background: var(--surface);
    border: 3px solid var(--accent);
    box-shadow: 0 1px 4px rgba(0,0,0,.18);
    transition: left .4s cubic-bezier(.22,.61,.36,1);
}

.wv-ctx-warm .wv-ctx-pin { border-color: var(--danger); }

.wv-ctx-cold .wv-ctx-pin,
.wv-ctx-wet  .wv-ctx-pin { border-color: var(--blue); }

.wv-ctx-dry  .wv-ctx-pin { border-color: #d97706; }

.wv-ctx-normal .wv-ctx-pin { border-color: var(--success); }

.wv-ctx-axis {
    display: flex;
    justify-content: space-between;
    margin-top: .35rem;
    font-size: .7rem;
    color: var(--muted);
}

.wv-ctx-axis span:nth-child(2) { font-weight: 700; }

.wv-ctx-detail {
    margin: .7rem 0 0;
    font-size: .85rem;
    line-height: 1.5;
    color: var(--muted);
}

/* --- Klímaóra --- */

.wc-figure { display: flex; flex-direction: column; align-items: center; margin-bottom: 1.5rem; }

.wc-clock {
    width: min(320px, 100%);
    height: auto;
    display: block;
}

.wc-ref { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; }

.wc-slice { stroke: none; transition: fill .2s ease; }

.wc-slice.is-dry { fill: color-mix(in srgb, var(--blue) 26%, transparent); }

.wc-slice.is-wet { fill: color-mix(in srgb, var(--blue) 62%, transparent); }

.wc-slice.is-now { fill: var(--accent); }

.wc-slice:hover { fill: color-mix(in srgb, var(--accent) 55%, transparent); }

.wc-avg {
    fill: none;
    stroke: var(--muted);
    stroke-width: 1.2;
    stroke-dasharray: 4 4;
    opacity: .7;
}

.wc-avg-lbl {
    font-size: 10.5px;
    font-weight: 700;
    fill: var(--muted);
    text-anchor: start;
}

.wc-clock text {
    font-family: inherit;
    text-anchor: middle;
    dominant-baseline: middle;
}

.wc-label { font-size: 12px; font-weight: 700; fill: var(--muted); }

.wc-label.is-now { fill: var(--accent-strong); }

.wc-center-num { font-size: 30px; font-weight: 800; fill: var(--text); }

.wc-center-lbl { font-size: 11.5px; font-weight: 700; fill: var(--muted); letter-spacing: .06em; }

@media (max-width: 640px) {
    .wv-ctx-wrap { grid-template-columns: 1fr; }
    .wv-ctx-verdict { font-size: 1rem; }
    .wc-clock { width: min(280px, 100%); }
    .wc-center-num { font-size: 26px; }
}

.hourly-strip.has-chart .wv-figure { max-width: 100%; }

/* ==================================================================== *
 *  Országos térkép (assets/country-map.js)
 * ==================================================================== */

.cm-tabs {
    display: flex;
    gap: .4rem;
    margin: 0 0 .7rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.cm-tabs::-webkit-scrollbar { display: none; }

.cm-tabs button {
    flex: 0 0 auto;
    padding: .4rem .75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font: inherit;
    font-size: .84rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.cm-tabs button:hover { color: var(--text); border-color: var(--accent); }

.cm-tabs button[aria-selected="true"] {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.cm-figure { margin: 0; }

.cm-plot {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: .4rem;
}

.cm-svg { display: block; width: 100%; height: auto; }

/* Alaprajz: a hataroknak halk kontextusnak kell lenniuk, nem fokuszpontnak. */

.cm-counties {
    fill: color-mix(in srgb, var(--muted) 7%, transparent);
    stroke: color-mix(in srgb, var(--muted) 28%, transparent);
    stroke-width: 1.1;
}

.cm-outline {
    fill: none;
    stroke: color-mix(in srgb, var(--muted) 65%, transparent);
    stroke-width: 2.2;
    stroke-linejoin: round;
}

.cm-dot {
    stroke: var(--surface);
    stroke-width: 1.6;
    cursor: pointer;
}

.cm-dot.is-dim { opacity: .3; }

.cm-dot.is-active { stroke: var(--text); stroke-width: 3; }

/* Varosoldalon az eppen nezett telepules. */

.cm-dot.is-focus { stroke: var(--text); stroke-width: 3.4; }

.cm-arrow {
    fill: color-mix(in srgb, var(--text) 62%, transparent);
    stroke: var(--surface);
    stroke-width: .8;
    pointer-events: none;
}

.cm-svg text {
    font-family: inherit;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
}

.cm-val  { font-weight: 800; }

.cm-name { font-weight: 600; fill: var(--muted); }

.cm-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .3rem .5rem;
    margin: .6rem 0 0;
    font-size: .78rem;
    color: var(--muted);
}

.cm-legend-t { font-weight: 700; color: var(--text); margin-right: .2rem; }

.cm-key { display: inline-flex; align-items: center; gap: .25rem; }

.cm-key i {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: inline-block;
}

.cm-caption {
    margin: .55rem 0 0;
    font-size: .82rem;
    color: var(--muted);
    line-height: 1.5;
}

.cm-loading {
    margin: 0;
    padding: 1.6rem .8rem;
    text-align: center;
    color: var(--muted);
    font-size: .9rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}

/* Buborék: a pont mellé, a szélek felé átfordulva. */

.cm-tip {
    position: absolute;
    z-index: 4;
    min-width: 158px;
    transform: translate(14px, -50%);
    padding: .45rem .6rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 6px 22px rgb(0 0 0 / 20%);
    pointer-events: none;
}

.cm-tip.flip-x { transform: translate(calc(-100% - 14px), -50%); }

.cm-tip.flip-y { transform: translate(14px, calc(-100% + 10px)); }

.cm-tip.flip-x.flip-y { transform: translate(calc(-100% - 14px), calc(-100% + 10px)); }

.cm-tip-h {
    font-size: .84rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: .28rem;
    padding-bottom: .28rem;
    border-bottom: 1px solid var(--line);
}

.cm-tip-g {
    display: grid;
    grid-template-columns: auto auto;
    gap: .14rem .55rem;
    font-size: .77rem;
    line-height: 1.35;
}

.cm-tip-k { color: var(--muted); }

.cm-tip-v { color: var(--text); font-weight: 700; text-align: right; white-space: nowrap; }

.cm-tip-v em { font-style: normal; font-weight: 600; color: var(--muted); }

/* ==================================================================== *
 *  HungaroMet hivatalos termékek (assets/hungaromet-panel.js)
 * ==================================================================== */

.hm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: .8rem;
    align-items: start;
}

.hm-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: .85rem .95rem;
}

.hm-label {
    margin: 0 0 .45rem;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}

.hm-note {
    margin: .55rem 0 0;
    font-size: .78rem;
    line-height: 1.45;
    color: var(--muted);
}

/* ---- Fronthatás ---- */

.hm-front { border-left: 4px solid var(--hm-tone, var(--muted)); }

.hm-front-text {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--hm-tone, var(--text));
}

.hm-front.tone-calm     { --hm-tone: var(--success); }

.hm-front.tone-warm     { --hm-tone: #d97706; }

.hm-front.tone-warm-ish { --hm-tone: #ea9a3e; }

.hm-front.tone-cold     { --hm-tone: var(--blue); }

.hm-front.tone-cold-ish { --hm-tone: #5b93e6; }

.hm-front.tone-double   { --hm-tone: var(--danger); }

:root[data-theme="dark"] .hm-front.tone-warm,
:root:not([data-theme="light"]) .hm-front.tone-warm     { --hm-tone: #fbbf24; }

:root[data-theme="dark"] .hm-front.tone-warm-ish,
:root:not([data-theme="light"]) .hm-front.tone-warm-ish { --hm-tone: #fcd34d; }

/* ---- UV régiónként ---- */

.hm-uv-list { margin: 0; padding: 0; list-style: none; }

.hm-uv-row {
    display: grid;
    /* A savnak eleg 52px: a leghosszabb regionev ("Eszak-Magyarorszag") igy
       meg kifer levagas nelkul a ketoszlopos kartyaracsban. */
    grid-template-columns: minmax(0, 1fr) 52px auto;
    align-items: center;
    gap: .5rem;
    padding: .17rem 0;
    font-size: .82rem;
}

.hm-uv-name { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hm-uv-bar {
    height: 9px;
    border-radius: 5px;
    background: color-mix(in srgb, var(--muted) 18%, transparent);
    overflow: hidden;
}

.hm-uv-bar i { display: block; height: 100%; border-radius: 5px; }

.hm-uv-bar i.uv1 { background: #22c55e; }

.hm-uv-bar i.uv2 { background: #eab308; }

.hm-uv-bar i.uv3 { background: #f97316; }

.hm-uv-bar i.uv4 { background: #ef4444; }

.hm-uv-bar i.uv5 { background: #a855f7; }

.hm-uv-val { font-weight: 800; color: var(--text); white-space: nowrap; }

.hm-uv-val em { font-style: normal; font-weight: 600; color: var(--muted); font-size: .92em; }

/* ---- Szöveges előrejelzés ---- */

.hm-text { grid-column: 1 / -1; }

.hm-fc + .hm-fc { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--line); }

.hm-fc h3 {
    margin: 0 0 .35rem;
    font-size: .95rem;
    font-weight: 800;
    color: var(--text);
}

.hm-fc h3 span { font-weight: 600; color: var(--muted); }

.hm-fc blockquote {
    margin: 0;
    padding-left: .8rem;
    border-left: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
}

.hm-fc blockquote p {
    margin: 0 0 .5rem;
    font-size: .92rem;
    line-height: 1.6;
    color: var(--text);
}

.hm-fc blockquote p:last-child { margin-bottom: 0; }

.hm-issued { margin: .4rem 0 0; font-size: .74rem; color: var(--muted); }

.hm-source {
    margin: .7rem 0 0;
    font-size: .78rem;
    line-height: 1.5;
    color: var(--muted);
}

.hm-empty {
    margin: 0;
    padding: 1.4rem .8rem;
    text-align: center;
    color: var(--muted);
    font-size: .9rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}

@media (max-width: 560px) {
    .hm-uv-row { grid-template-columns: minmax(0, 1fr) 44px auto; font-size: .79rem; }
}

/* ---- Villámréteg az országos térképen ---- */

.cm-lt { stroke: none; }

.cm-lt-ic { fill: none; }

/* Városok tájékozódási pontként a villámrétegen: halkak, nem versenyeznek. */

.cm-ref { fill: color-mix(in srgb, var(--muted) 55%, transparent); }

.cm-key-ic i.ring {
    background: transparent;
    border: 2px solid var(--muted);
    border-radius: 50%;
}

/* ---- Mérési időbélyeg az országos térkép fölött ---- */
/* Egy időjárásoldalon a legfontosabb kérdés, hogy MIKORI az adat. Ezért nem a
   képaláírásba rejtjük, hanem külön jelvénybe emeljük, a korával együtt. */
.cm-stamp {
    display: inline-flex;
    align-items: baseline;
    gap: .42rem;
    margin: 0 0 .7rem;
    padding: .34rem .7rem .34rem .6rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    line-height: 1.2;
}
.cm-stamp-dot {
    align-self: center;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--stamp-tone, var(--success));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--stamp-tone, var(--success)) 22%, transparent);
}
.cm-stamp-t {
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.cm-stamp-age {
    font-size: .82rem;
    font-weight: 700;
    color: var(--stamp-tone, var(--success));
}
.cm-stamp-lbl {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
}
.cm-stamp.is-fresh { --stamp-tone: var(--success); }
.cm-stamp.is-aging { --stamp-tone: #d97706; }
.cm-stamp.is-stale { --stamp-tone: var(--danger); }
:root[data-theme="dark"] .cm-stamp.is-aging,
:root:not([data-theme="light"]) .cm-stamp.is-aging { --stamp-tone: #fbbf24; }

@media (max-width: 480px) {
    .cm-stamp { gap: .34rem; padding: .3rem .6rem .3rem .5rem; }
    .cm-stamp-lbl { display: none; }
}

/* ==================================================================== *
 *  Átvezetés a városoldalra – mérőkártya (assets/nearest-city.js)
 * ==================================================================== */

/* A többi mérőkártyával azonos alak, de kattintható és kiemelt, hogy
   ránézésre elkülönüljön a passzív adatoktól. Korábban ez egy elvethető
   sáv volt a lap tetején; aki bezárta, két hétig nem látta többé. */
/* TELE, sotet kartya – nem az akcentus halvany arnyalata.
   Az elso valtozat ugyanannak a turkiznek a 9%-os hatteret hasznalta, amit az
   oldal mindenutt: a kartya beleolvadt a tobbi, PASSZIV adatkartyaba. Ez az
   egyetlen KATTINTHATO elem a sorban, ezert most tomor tolteset kap, feher
   szoveggel – ranezesre gomb, nem adat. */
.metric-card.city-jump {
    --cj: #7c3aed;                 /* ibolya: nem szerepel mashol az oldalon */
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .1rem;
    text-decoration: none;
    border: 1px solid var(--cj);
    background: linear-gradient(140deg, var(--cj), #5b21b6);
    box-shadow: 0 3px 12px color-mix(in srgb, var(--cj) 32%, transparent);
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
:root[data-theme="dark"] .metric-card.city-jump,
:root:not([data-theme="light"]) .metric-card.city-jump {
    --cj: #8b5cf6;
    background: linear-gradient(140deg, #6d28d9, #4c1d95);
}
.metric-card.city-jump[hidden] { display: none; }
.metric-card.city-jump:hover,
.metric-card.city-jump:focus-visible {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--cj) 45%, transparent);
}
.metric-card.city-jump .metric-label { color: rgba(255, 255, 255, .82); }
.metric-card.city-jump .metric-value { color: #fff; }

.city-jump-dist {
    font-size: .76rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .78);
    line-height: 1.2;
}
.city-jump-go {
    margin-top: .18rem;
    font-size: .78rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.01em;
}

/* ==================================================================== *
 *  Alapértelmezett település (assets/favourite-city.js)
 * ==================================================================== */

.fav-city { margin-top: .55rem; }
.fav-city:empty { display: none; }

.fav-set {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    width: 100%;
    padding: .46rem .7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: .84rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}
.fav-set span { color: #eab308; font-size: 1em; }
.fav-set:hover { border-color: var(--accent); color: var(--accent); }
.fav-set:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.fav-current {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin: 0 0 .4rem;
    padding: .42rem .6rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
    font-size: .84rem;
    color: var(--text);
}
.fav-star { color: #eab308; }
.fav-current strong { font-weight: 800; }
.fav-clear {
    margin-left: auto;
    padding: .1rem .45rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
}
.fav-clear:hover { color: var(--danger); }

.fav-hint {
    margin: .35rem 0 0;
    font-size: .76rem;
    line-height: 1.4;
    color: var(--muted);
}

/* ---- Napváltás jelölése az órás diagramon ---- */
/* A "23:00 → 00:00" átmenet enélkül észrevétlen marad, és a látogató azt
   hiszi, ugyanarról a napról van szó. */
.wv-daybreak {
    stroke: var(--muted);
    stroke-width: 1.6;
    stroke-dasharray: 6 3;
    opacity: .55;
}
.wv-daylabel {
    font-size: 11px;
    font-weight: 800;
    fill: var(--muted);
    text-anchor: start;
}
.wv-hour.is-daybreak { fill: var(--text); font-weight: 800; }

/* ---- Jelmagyarázat a második görbéhez ---- */
.wv-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem 1rem;
    margin: .5rem 0 0;
}
.wv-legend-item {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    color: var(--muted);
}
.wv-legend i {
    display: inline-block;
    width: 22px;
    height: 0;
    border-top-width: 2.5px;
    border-top-style: solid;
    border-top-color: var(--wv-tone, var(--accent));
}
/* A hőmérséklet-görbe színe folyamatosan változik, ezért a jelmagyarázatban
   a teljes skálát mutatjuk – nem egyetlen, önkényesen kiragadott színt. */
.wv-legend i.is-temp {
    height: 4px;
    border: 0;
    border-radius: 2px;
    background: linear-gradient(90deg, #4a76be, #68bac4, #a3c86a, #e8c44e, #e2682f, #cd3a2e);
}
.wv-legend i.wvl-ghost {
    border-top-style: dashed;
    border-top-width: 2px;
    border-top-color: var(--muted);
}
.wv-legend i.wvl-gust {
    border-top-style: dashed;
    border-top-width: 2px;
    border-top-color: color-mix(in srgb, var(--wv-tone, var(--accent)) 55%, transparent);
}
