/* Panorama · sezione inverno (/sci). Si appoggia a tokens.css e landing.css (font, bottoni, nav, footer, FAQ). */
:root { --run-blue: var(--action); --run-red: #c8372d; --run-black: var(--ink); --av-1: #ccff66; --av-2: #ffff00; --av-3: #ff9900; --av-4: #ff0000; --av-5: #600000; }

.sci { padding: 96px 0 var(--section-y); }
.num { font-variant-numeric: tabular-nums; }
.s-src { font: 500 12.5px/18px var(--font-sans); color: var(--ink-3); }
.s-src a { color: inherit; }
.s-foot { font: 500 13.5px/20px var(--font-sans); color: var(--ink-3); }
.s-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
a.s-card { text-decoration: none; color: var(--ink); transition: border-color .18s, transform .18s var(--ease); }
a.s-card:hover { border-color: var(--action); transform: translateY(-1px); }
.pill--soon { background: var(--warning-soft); color: var(--warning); }
.pill--info { background: var(--action-soft); color: var(--action-pressed); }
.pill--light { background: rgba(255, 255, 255, .92); color: var(--ink); }

/* Testata */
.s-hero { position: relative; display: flex; align-items: flex-end; min-height: clamp(280px, 42vw, 420px); margin-top: var(--space-2); border-radius: var(--radius-xl); overflow: hidden; color: var(--on-photo); background: linear-gradient(135deg, var(--ink) 0%, var(--action-pressed) 100%); isolation: isolate; }
.s-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.s-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 22, 38, .05) 20%, rgba(11, 22, 38, .82) 100%); }
.s-hero__body { display: flex; flex-direction: column; gap: var(--space-3); padding: clamp(20px, 4vw, 36px); width: 100%; }
.s-hero__credit { position: absolute; right: var(--space-3); top: var(--space-3); max-width: 60%; padding: 2px 8px; border-radius: var(--radius-pill); background: rgba(11, 22, 38, .55); font: 500 11px/16px var(--font-sans); color: var(--on-photo-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-hero__credit a { color: inherit; }
.s-h1 { font-weight: 800; font-size: clamp(32px, 5vw, 54px); line-height: 1.04; letter-spacing: -0.03em; text-wrap: balance; }
.s-h1--ink { color: var(--ink); }
.s-meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); font: 600 15px/22px var(--font-sans); color: var(--on-photo-2); }
.s-pills { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.s-answer { font-size: clamp(16px, 1.5vw, 18.5px); line-height: 1.6; color: var(--ink); border-left: 3px solid var(--action); padding: 2px 0 2px var(--space-4); max-width: 68ch; }
.s-intro { display: flex; flex-direction: column; gap: var(--space-3); max-width: 860px; }

/* Impaginazione: colonna principale e laterale */
.s-layout { display: grid; gap: var(--space-8); padding-top: var(--space-8); align-items: start; }
.s-main { display: flex; flex-direction: column; gap: var(--space-12); min-width: 0; }
.s-aside { display: flex; flex-direction: column; gap: var(--space-4); }
/* Card app: nel corpo della scheda su telefono, nella colonna laterale da 1000px in su (una sola per schermo). */
.s-app-corpo { margin: var(--space-6) 0; }
@media (max-width: 999px) { .s-aside--scheda > .apromo-wrap { display: none; } }
@media (min-width: 1000px) { .s-app-corpo { display: none; } }
@media (min-width: 1000px) { .s-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-10); } .s-aside { position: sticky; top: 92px; } }

.s-sec { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; scroll-margin-top: 92px; }
.s-sec-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--space-2) var(--space-3); }
.s-sec-h a { font: 700 14px/20px var(--font-sans); color: var(--action); text-decoration: none; }
.s-h2 { font-weight: 800; font-size: clamp(21px, 2.2vw, 26px); line-height: 1.2; letter-spacing: -0.02em; }

/* Numeri */
.s-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
@media (min-width: 760px) { .s-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.s-stat { padding: var(--space-4); display: flex; flex-direction: column; gap: 6px; }
.s-stat .k { font: 700 12.5px/16px var(--font-sans); color: var(--ink-3); }
.s-stat .v { font-weight: 800; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.s-stat .v small { font-size: 14px; font-weight: 700; color: var(--ink-3); letter-spacing: 0; }

/* Stato di oggi (in attesa dei dati live) */
.s-live { display: grid; gap: var(--space-4); padding: var(--space-5); }
@media (min-width: 760px) { .s-live { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } }
.s-live b { font: 700 17px/24px var(--font-sans); display: block; margin-bottom: 4px; }
.s-live p { color: var(--ink-2); font-size: 15px; }

/* Link ufficiali */
.s-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--space-3); }
.s-link { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); min-height: 60px; }
.s-link span { display: flex; flex-direction: column; min-width: 0; }
.s-link b { font: 700 15px/20px var(--font-sans); }
.s-link small { font: 500 12.5px/16px var(--font-sans); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-link .ic { color: var(--action); }

/* Piste */
.s-runs { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.s-bar { display: flex; height: 14px; gap: 2px; border-radius: 7px; overflow: hidden; background: var(--surface-sunken); }
.s-bar i { display: block; }
.s-legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); font: 600 14px/20px var(--font-sans); }
.s-legend span { display: inline-flex; align-items: center; gap: 6px; }
.s-legend i { width: 12px; height: 12px; border-radius: 3px; display: block; }
.s-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 0; }
.s-kv div { display: flex; flex-direction: column; gap: 2px; padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); }
.s-kv dt { font: 700 12.5px/16px var(--font-sans); color: var(--ink-3); }
.s-kv dd { margin: 0; font: 700 16px/22px var(--font-sans); font-variant-numeric: tabular-nums; }

/* Tabelle */
.s-scroll { overflow-x: auto; min-width: 0; }
.s-tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.s-tbl th { font: 700 12px/16px var(--font-sans); color: var(--ink-3); text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg); white-space: nowrap; }
.s-tbl td { padding: 11px 16px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; vertical-align: middle; }
.s-tbl tr:last-child td { border-bottom: 0; }
.s-tbl .r { text-align: right; white-space: nowrap; }
.s-tbl a { font-weight: 700; color: var(--ink); text-decoration: none; }
.s-tbl a:hover { color: var(--action); }
.s-tbl small { display: block; font: 500 12.5px/16px var(--font-sans); color: var(--ink-3); }

/* Meteo per quota */
.s-wx th[scope="row"] { white-space: nowrap; }
.s-wx th[scope="row"] span { display: block; font-weight: 600; }
.s-wx td { white-space: nowrap; }
.s-wx .t { font-weight: 800; color: var(--ink); }
.s-wx .w { display: inline-flex; align-items: center; gap: 8px; }
.s-wx .snow { font: 700 12px/16px var(--font-sans); color: var(--snow-2); }
.s-wxi { width: 24px; height: 24px; flex: none; }
.s-wx[aria-busy="true"] td { color: var(--ink-3); }

/* Webcam (solo link al gestore) */
.s-cams { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: var(--space-3); }
.s-cam { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-4); }
.s-cam__ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--action-soft); color: var(--action); flex: none; }
.s-cam b { display: block; font: 700 14.5px/20px var(--font-sans); }
.s-cam small { font: 500 12.5px/16px var(--font-sans); color: var(--ink-3); }

/* Valanghe */
.s-av { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-4); align-items: center; padding: var(--space-5); }
.s-av__scale { display: grid; grid-template-columns: repeat(5, 18px); gap: 3px; }
.s-av__scale i { height: 18px; border-radius: 4px; display: block; }
.s-av b { display: block; font: 700 16px/22px var(--font-sans); margin-bottom: 4px; }

/* Card dei comprensori (hub e regioni) */
.s-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.s-rcard { display: flex; flex-direction: column; overflow: hidden; }
.s-rcard__img { overflow: hidden; aspect-ratio: 2 / 1; background: linear-gradient(135deg, var(--brand-pale), var(--action-soft)); position: relative; }
.s-rcard__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.s-rcard__img .pill { position: absolute; left: var(--space-3); top: var(--space-3); }
.s-rcard__body { display: flex; flex-direction: column; gap: 6px; padding: var(--space-4); }
.s-rcard__body b { font: 700 17px/22px var(--font-sans); }
.s-rcard__nums { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); font: 600 13.5px/20px var(--font-sans); color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* Regioni e aperture */
.s-regions { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.s-region { display: flex; flex-direction: column; gap: 2px; padding: var(--space-4); }
.s-region b { font: 700 16px/22px var(--font-sans); }
.s-opens { list-style: none; margin: 0; padding: 0; }
.s-opens li { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: 10px var(--space-4); border-bottom: 1px solid var(--line); }
.s-opens li:last-child { border-bottom: 0; }
.s-opens time { font: 800 14px/20px var(--font-sans); color: var(--action); font-variant-numeric: tabular-nums; }
.s-opens a { font-weight: 700; color: var(--ink); text-decoration: none; }
.s-opens a:hover { color: var(--action); }

/* Chip, laterale, emergenza */
.s-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.s-chips a { text-decoration: none; }
.s-chips a:hover { border-color: var(--action); color: var(--action); }
.s-toc { padding: var(--space-4) var(--space-5); display: flex; flex-direction: column; }
.s-toc a { font: 600 14px/30px var(--font-sans); color: var(--ink-2); text-decoration: none; }
.s-toc a:hover { color: var(--action); }
.s-cta { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); background: var(--ink); border-color: var(--ink); color: var(--on-photo); }
.s-cta p { color: var(--on-photo-2); font-size: 14.5px; }
.s-cta__top { display: flex; gap: var(--space-3); align-items: center; }
.s-cta__top b { font: 800 18px/24px var(--font-sans); }
.s-sos { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; padding: var(--space-4) var(--space-5); background: var(--danger-soft); color: var(--danger); border-radius: var(--radius-md); font: 600 14.5px/20px var(--font-sans); }
.s-sos b { font-size: 22px; font-weight: 800; }
.s-faq .faq__list { border-top: 1px solid var(--line); }
.s-faq .faq__item h3 { font-size: 17px; line-height: 24px; }
.s-credits { display: flex; flex-direction: column; gap: 4px; }
.s-credits a { color: inherit; }
@media (max-width: 999px) { .s-toc { display: none; } }

/* Skipass: riassunto, listini per periodo (details), skipass di zona */
.s-h3 { font: 700 17px/24px var(--font-sans); margin: var(--space-2) 0 0; }
.s-stats--pass { margin-bottom: var(--space-4); }
.s-stats--pass .s-stat .v { font-size: clamp(20px, 2.2vw, 26px); }
.s-passgroup { display: grid; gap: var(--space-3); margin-bottom: var(--space-4); }
.s-pass { overflow: hidden; }
.s-pass > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-5); }
.s-pass > summary::-webkit-details-marker { display: none; }
.s-pass > summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); margin: -4px 2px 0 0; transition: transform .15s; }
.s-pass[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.s-pass > summary:focus-visible { outline: 2px solid var(--brand, currentColor); outline-offset: -2px; }
.s-pass__t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.s-pass__t b { font: 700 15.5px/22px var(--font-sans); }
.s-pass__t small { font: 500 13px/18px var(--font-sans); color: var(--ink-3); }
.s-pass__p { flex: none; font: 500 13.5px/20px var(--font-sans); color: var(--ink-2); white-space: nowrap; }
.s-pass__p b { font-size: 16px; color: var(--ink); }
.s-pass[open] > summary { border-bottom: 1px solid var(--line); }
.s-tbl--pass th small { display: block; font-weight: 500; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.s-tbl--pass tbody th { font: 600 14.5px/20px var(--font-sans); text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); background: none; color: var(--ink); white-space: nowrap; }
.s-tbl--pass tr:last-child th { border-bottom: 0; }
.s-tbl--pass td { white-space: nowrap; }
.s-tbl--pass sup { color: var(--ink-3); margin-left: 1px; }
.s-pass__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.s-pass__list li { display: flex; justify-content: space-between; gap: var(--space-4); padding: 10px var(--space-5); border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 20px; }
.s-pass__list li:last-child { border-bottom: 0; }
.s-pass__list li span { color: var(--ink-2); }
.s-pass__list li b { flex: none; font-variant-numeric: tabular-nums; }
.s-pass__note { padding: 0 var(--space-5) var(--space-3); margin: 0; }
.s-zone { display: grid; gap: var(--space-3); }
@media (min-width: 760px) { .s-zone { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.s-zone__c { padding: var(--space-4) var(--space-5); display: flex; flex-direction: column; gap: 6px; }
.s-zone__c > b { font: 700 16px/22px var(--font-sans); }
.s-zone__n { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); font-size: 14.5px; color: var(--ink-2); }
.s-zone__n b { color: var(--ink); font-size: 17px; }
.s-tbl td:first-child { min-width: 168px; }
.s-pass__line { font: 700 13px/18px var(--font-sans); color: var(--ink-2); padding: var(--space-3) 16px 0; margin: 0; border-top: 1px solid var(--line); }

/* Invito alla mappa dei comprensori (hub e regioni) */
.m-teaser { display: grid; overflow: hidden; }
.m-teaser svg { display: block; width: 100%; height: 180px; background: linear-gradient(160deg, var(--surface) 0%, var(--action-soft) 100%); }
.m-teaser circle { stroke: var(--surface); stroke-width: 1; opacity: .92; }
.m-teaser .q1 { fill: var(--brand-light); } .m-teaser .q2 { fill: var(--brand); } .m-teaser .q3 { fill: var(--snow-2); } .m-teaser .q4 { fill: var(--snow-3); }
.m-teaser__body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); padding: var(--space-4) var(--space-5) var(--space-5); }
.m-teaser__body b { font: 800 19px/24px var(--font-sans); letter-spacing: -0.01em; }
@media (min-width: 760px) { .m-teaser { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; } .m-teaser svg { height: 100%; min-height: 210px; } }

/* Ricerca comprensori nell'hero: il menu esce dalla foto, quindi l'hero non taglia più il contenuto. */
.s-hero:has(.s-cerca) { overflow: visible; }
.s-hero:has(.s-cerca) img, .s-hero:has(.s-cerca)::after { border-radius: inherit; }
.s-hero:has(.s-cerca) picture { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; z-index: -2; }
.s-cerca { position: relative; max-width: 560px; margin-top: var(--space-2); }
.s-cerca .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.s-cerca input { width: 100%; box-sizing: border-box; height: 52px; padding: 0 16px 0 46px; border: 0; border-radius: var(--radius-pill); background: var(--surface); color: var(--ink); font: 500 16px var(--font-sans); box-shadow: var(--shadow-card); }
.s-cerca input:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; }
.s-cerca__ic { position: absolute; left: 16px; top: 15px; width: 22px; height: 22px; color: var(--ink-3); pointer-events: none; fill: none; stroke: currentColor; stroke-width: 2; }
.s-cerca__res { position: absolute; left: 0; right: 0; top: 58px; z-index: 5; max-height: 360px; overflow: auto; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.s-cerca__res a { display: flex; align-items: baseline; gap: 10px; padding: 10px 12px; border-radius: var(--radius-md); color: var(--ink); text-decoration: none; font: 500 15px/20px var(--font-sans); }
.s-cerca__res a small { margin-left: auto; color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.s-cerca__res a:hover, .s-cerca__res a.is-sel { background: var(--action-soft); }
.s-cerca__res p { margin: 10px 12px; color: var(--ink-3); font-size: 14px; }

/* Tabelle ordinabili e barra di ricerca (sci-tabelle.js, componente BarraTabella) */
.s-tbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 12px; }
.s-tbar[hidden] { display: none; }
.s-tbar__q { position: relative; flex: 1 1 260px; display: flex; align-items: center; }
.s-tbar__q .ic { position: absolute; left: 14px; color: var(--ink-3); pointer-events: none; }
.s-tbar__q input, .s-tbar__sel select { width: 100%; height: 44px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font: 500 15px/20px var(--font-sans); }
.s-tbar__q input { padding: 0 14px 0 40px; }
.s-tbar__sel { flex: 1 1 160px; max-width: 260px; }
.s-tbar__sel select { padding: 0 36px 0 14px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%235b6b82' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; }
.s-tbar__q input:focus, .s-tbar__sel select:focus { outline: 2px solid var(--action); outline-offset: 1px; border-color: var(--action); }
.s-tbar__geo { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font: 700 14px/20px var(--font-sans); cursor: pointer; }
.s-tbar__geo:hover { border-color: var(--action); color: var(--action); }
.s-tbar__geo[aria-pressed="true"] { background: var(--action); border-color: var(--action); color: #fff; }
.s-tbar__geo[aria-busy="true"] { opacity: .7; }
.s-tbar__n { flex: 1 0 100%; margin: 0; font: 600 13px/18px var(--font-sans); color: var(--ink-3); }
.s-tbar__hint { display: none; }
@media (min-width: 720px) { .s-tbar__n { flex: 0 0 auto; margin-left: auto; } }
.s-tbar__vuoto { margin: 12px 0 0; font: 500 14px/20px var(--font-sans); color: var(--ink-3); }
.s-anchor { display: block; position: relative; top: -90px; }

table[data-tsort] th[data-sort], table[data-tsort] th[aria-sort] { padding: 0; }
.s-th-btn { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 4px; width: 100%; padding: 12px 16px; cursor: pointer; font: inherit; color: inherit; white-space: nowrap; }
.r > .s-th-btn, th.r .s-th-btn { justify-content: flex-end; }
.s-th-btn:hover { color: var(--ink); }
.s-th-btn:focus-visible { outline: 2px solid var(--action); outline-offset: -2px; border-radius: 6px; }
.s-th-ic { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .45; flex: none; }
th.is-sorted { color: var(--action); }
th.is-sorted .s-th-ic { opacity: 1; }
th.is-sorted .s-th-ic path { d: path("M3 7.5 6 4.5l3 3"); }
th.is-sorted.is-desc .s-th-ic path { d: path("M3 4.5l3 3 3-3"); }
.s-th-btn small { display: none; }
.s-tbl .s-dist { color: var(--action); font-weight: 700; }
.s-tbar .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Link alla mappa grande in modo neve, sotto la mappa incorporata */
.nm-apri { margin: 10px 0 0; text-align: right; }
.nm-apri a { font: 700 14px/1.4 var(--font-sans); color: var(--action); text-decoration: none; }
.nm-apri a:hover { text-decoration: underline; }
.m-legend__src { display: block; margin-top: 6px; font: 500 11px/14px var(--font-sans); color: var(--ink-3); }
