/* «Meteo» (#meteo, web/weather.js): «Creuza a colori» cards with the ink outline, phone first, wider on desktop. */
a.home-weather { position: relative; color: inherit; text-decoration: none; width: fit-content; border-radius: var(--r-pill); }
a.home-weather::after { content: ""; position: absolute; inset: -6px 0; }
a.home-weather:focus-visible { outline: 3px solid var(--sea); outline-offset: 3px; }

.wx-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; max-width: 980px; }
.wx-page > * { min-width: 0; }
.wx-page .app-section-title { margin: 0 0 10px; }
.wx-page .app-section-title h2 { font: 800 var(--type-body-s-size)/1.2 var(--font); letter-spacing: .12em; text-transform: uppercase; margin: 0; color: var(--ink-2); }
.wx-i { width: 26px; height: 26px; flex: none; }
.wx-i-sm { width: 15px; height: 15px; flex: none; vertical-align: -2px; }

.wx-now { background: var(--sea-soft); border: var(--card-border); box-shadow: var(--card-shadow); border-radius: var(--r-xl); padding: 16px 18px; color: var(--ink); }
.wx-now .app-kicker { color: var(--ink-2); margin: 0 0 4px; }
.wx-now-main { display: flex; align-items: center; gap: 12px; }
.wx-now-temp { font: 900 76px/.9 var(--display); font-stretch: var(--display-stretch); letter-spacing: -.02em; }
.wx-now-sky { width: 54px; height: 54px; flex: none; }
.wx-now-copy { display: grid; gap: 2px; font-size: var(--type-label-size); font-weight: 600; color: var(--ink-2); }
.wx-now-copy strong { font-size: var(--type-title-size); font-weight: 800; color: var(--ink); }
.wx-summary { font-size: var(--type-title-size); font-weight: 750; line-height: 1.3; margin: 12px 0 0; }
.wx-status { font-size: var(--type-caption-size); color: var(--ink-2); margin: 8px 0 0; }
.wx-status.is-offline { font-weight: 700; }

.wx-calm { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--type-body-s-size); font-weight: 650; color: var(--ink-2); }
.wx-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); flex: none; }
.wx-alert { border: var(--card-border); box-shadow: var(--card-shadow); border-radius: var(--r-lg); padding: 14px 16px; background: var(--gold); color: var(--color-block-yellow-text); }
.wx-alert.is-arancione { background: #f08a24; }
.wx-alert.is-rossa { background: #b3261e; color: #ffffff; }
.wx-alert h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font: 900 var(--type-display-m-size)/1 var(--display); font-stretch: var(--display-stretch); text-transform: uppercase; }
.wx-alert p, .wx-alert li { margin: 4px 0 0; font-size: var(--type-body-size); font-weight: 650; line-height: 1.35; }
.wx-alert ul { margin: 4px 0 0; padding-left: 18px; }
.wx-alert .wx-alert-zone { font-size: var(--type-caption-size); font-weight: 500; }
.wx-alert-link { display: inline-block; margin-top: 8px; color: inherit; font-weight: 800; text-decoration: underline; }

.wx-hours { list-style: none; margin: 0; padding: 12px 8px; display: flex; overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain;
  background: var(--surface); border: var(--card-border); box-shadow: var(--card-shadow); border-radius: var(--r-lg); }
.wx-hours:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; }
.wx-hour { flex: 0 0 54px; display: grid; justify-items: center; gap: 4px; scroll-snap-align: start; font-size: var(--type-caption-size); color: var(--muted); }
.wx-hour.is-new-day { border-left: 2px solid var(--line); margin-left: 4px; padding-left: 4px; }
.wx-hour.is-now .wx-hour-time, .wx-hour.is-new-day .wx-hour-time { color: var(--ink); font-weight: 850; }
.wx-hour-time { text-transform: uppercase; font-weight: 650; }
.wx-hour .wx-i { color: var(--ink-2); }
.wx-hour b { font-size: var(--type-body-size); color: var(--ink); }
.wx-bar { height: 46px; width: 14px; display: flex; align-items: flex-end; }
.wx-bar i { display: block; width: 14px; min-height: 0; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--sea) 45%, transparent); transform-origin: bottom; animation: wx-grow .42s var(--ease) both; }
.wx-bar i.is-wet { background: var(--sea); }
.wx-hour small { font-weight: 750; min-height: 14px; }

.wx-days { list-style: none; margin: 0; padding: 0; background: var(--surface); border: var(--card-border); box-shadow: var(--card-shadow); border-radius: var(--r-lg); overflow: hidden; }
.wx-day { display: grid; grid-template-columns: 70px 28px 56px 36px 1fr 36px; align-items: center; gap: 6px; padding: 11px 14px; border-top: 1px solid var(--line); font-size: var(--type-body-size); }
.wx-day:first-child { border-top: 0; }
.wx-day-name { font-weight: 750; }
.wx-day-rain { display: inline-flex; align-items: center; justify-content: center; gap: 1px; color: var(--sea); font-size: var(--type-caption-size); font-weight: 750; white-space: nowrap; }
.wx-day-min { text-align: right; color: var(--muted); font-weight: 600; }
.wx-day-max { font-weight: 850; }
.wx-range { position: relative; height: 8px; border-radius: var(--r-pill); background: var(--surface-3); }
.wx-range i { position: absolute; top: 0; bottom: 0; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--sea), var(--gold)); }
.wx-range i.is-hot { background: linear-gradient(90deg, var(--sea), var(--accent)); }

.wx-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wx-card { background: var(--surface); border: var(--card-border); box-shadow: var(--shadow-1); border-radius: var(--r-lg); padding: 12px 14px 14px; min-width: 0; }
.wx-card h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font: 800 var(--type-kicker-size)/1.2 var(--font); letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.wx-card-value { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.wx-card-value strong { font-size: 22px; font-weight: 850; line-height: 1.1; overflow-wrap: break-word; min-width: 0; }
.wx-card p { margin: 3px 0 0; font-size: var(--type-body-s-size); font-weight: 600; color: var(--ink-2); line-height: 1.3; }
.wx-arrow { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; color: var(--sea); flex: none; }
.wx-arrow svg { fill: currentColor; }
.wx-air { display: flex; align-items: flex-end; gap: 3px; flex: none; }
.wx-air i { width: 8px; height: 12px; border-radius: 3px; background: var(--surface-3); }
.wx-air i.is-on { height: 22px; outline: 1px solid var(--color-outline); }
.wx-air i.l1.is-on { background: #50c8a0; } .wx-air i.l2.is-on { background: #7bc96f; } .wx-air i.l3.is-on { background: #f2c94c; }
.wx-air i.l4.is-on { background: #f08a24; } .wx-air i.l5.is-on { background: #d64541; } .wx-air i.l6.is-on { background: #8e3b8e; }

.wx-advice { background: var(--gold-soft); border: var(--card-border); box-shadow: var(--card-shadow); border-radius: var(--r-lg); padding: 16px; color: var(--ink); }
.wx-advice.is-wet { background: var(--sea-soft); }
.wx-advice strong { font-size: var(--type-title-size); font-weight: 800; }
.wx-advice p { margin: 4px 0 0; color: var(--ink-2); font-size: var(--type-label-size); }
.wx-advice-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.wx-ideas { display: grid; gap: 12px; margin-top: 12px; }
.wx-ideas:empty { display: none; }
.wx-sources { display: flex; gap: 8px; align-items: flex-start; font-size: var(--type-caption-size); color: var(--muted); line-height: 1.45; margin: 0; }

@keyframes wx-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .wx-bar i { animation: none; } }
@media (min-width: 760px) {
  .wx-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wx-ideas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wx-day { grid-template-columns: 90px 32px 64px 40px 1fr 40px; }
}
@media (max-width: 360px) {
  .wx-now-temp { font-size: 60px; }
  .wx-day { grid-template-columns: 58px 24px 48px 30px 1fr 30px; padding: 10px; font-size: var(--type-label-size); }
}
