/* ==========================================================================
   TRIESTEMETRO — restyling 2026 (proposta A "Evoluzione")
   Caricato dopo i CSS del tema: tutte le classi nuove hanno prefisso .tsm-
   Obiettivo accessibilità: WCAG 2.1 AA
   Coded by Divulgando Srl
   ========================================================================== */

:root {
  --tsm-ink: #121921;        /* antracite della testata originale */
  --tsm-text: #23292f;       /* testo su bianco 14:1 */
  --tsm-muted: #4f5761;      /* testo secondario 7.2:1 */
  --tsm-line: #e1e4e8;
  --tsm-soft: #f3f5f7;
  --tsm-paper: #ffffff;
  --tsm-accent: #c41a2e;     /* rosso TSM scurito: bianco su rosso 5.9:1, rosso su bianco 5.9:1 */
  --tsm-accent-dark: #9e1222;
  --tsm-focus: #1a5fb4;
  --tsm-l1: #ec663c; --tsm-l2: #f9ae00; --tsm-l3: #47b1bc; --tsm-l4: #715593;
  --tsm-l5: #60b15e; --tsm-l6: #005c92; --tsm-l7: #e32238; --tsm-l8: #2483c6;
  --tsm-hdr-h: 76px;
  --tsm-maxw: 1200px;
  --tsm-radius: 10px;
  --route: var(--tsm-accent);
}

/* ---------- base (tutto il sito) ---------- */
html { scroll-padding-top: calc(var(--tsm-hdr-h) + 70px); }
body.tsm { font-size: 1rem; line-height: 1.6; color: var(--tsm-text); background: var(--tsm-paper); }
body.tsm p { color: inherit; }
body.tsm a { color: var(--tsm-accent); }
body.tsm a:hover { color: var(--tsm-accent-dark); }
body.tsm a:focus, body.tsm button:focus, body.tsm input:focus, body.tsm select:focus { outline: none; }
body.tsm a:focus-visible, body.tsm button:focus-visible, body.tsm input:focus-visible,
body.tsm select:focus-visible, body.tsm summary:focus-visible, body.tsm [tabindex]:focus-visible {
  outline: 3px solid var(--tsm-focus); outline-offset: 2px; border-radius: 4px;
}
body.tsm #preloader { display: none !important; }          /* non nasconde più la pagina */
body.tsm nav#menu { display: none !important; }            /* richiesto solo da main.js */

.tsm-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.tsm-skip { position: absolute; left: 16px; top: -120px; z-index: 10000; padding: 12px 20px; border-radius: 8px;
  background: var(--tsm-ink); color: #fff !important; font-weight: 600; text-decoration: none; }
.tsm-skip:focus { top: 12px; }
.tsm-wrap { max-width: var(--tsm-maxw); margin: 0 auto; padding-left: 20px; padding-right: 20px; }

/* ---------- testata ---------- */
header.tsm-hdr { position: sticky; top: 0; z-index: 1000; padding: 0; margin: 0; height: auto; background: var(--tsm-paper); box-shadow: 0 1px 0 var(--tsm-line); }
.tsm-hdr__in { box-sizing: border-box; }
.tsm-hdr__in { max-width: 1320px; margin: 0 auto; min-height: var(--tsm-hdr-h); padding: 0 24px; display: flex; align-items: center; gap: 24px; }
.tsm-logo { display: inline-flex; flex: none; }
.tsm-logo img { height: 40px; width: auto; }
.tsm-nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.tsm-nav__list, .tsm-langs, .tsm-sub { list-style: none; margin: 0; padding: 0; }
.tsm-nav__list { display: flex; align-items: center; gap: 4px; }
.tsm-nav__list > li { position: relative; display: flex; align-items: center; }
.tsm-nav__list > li > a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  color: var(--tsm-text) !important; font-size: 1rem; font-weight: 500; text-decoration: none; border-radius: 6px; }
.tsm-nav__list > li > a:hover { background: var(--tsm-soft); }
.tsm-nav__list > li > a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--tsm-accent); border-radius: 0; }
.tsm-subbtn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 44px; margin-left: -6px;
  border: 0; background: transparent; color: var(--tsm-text); cursor: pointer; border-radius: 6px; }
.tsm-subbtn:hover { background: var(--tsm-soft); }
.tsm-subbtn svg { width: 16px; height: 16px; transition: transform .15s ease; }
.tsm-subbtn[aria-expanded="true"] svg { transform: rotate(180deg); }
.tsm-sub { position: absolute; top: 100%; left: 0; min-width: 280px; padding: 8px; background: #fff; border: 1px solid var(--tsm-line);
  border-radius: var(--tsm-radius); box-shadow: 0 12px 30px rgba(18,25,33,.14); display: none; z-index: 10; }
.tsm-sub.is-open { display: block; }
.tsm-sub a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 12px; border-radius: 6px;
  color: var(--tsm-text) !important; text-decoration: none; font-weight: 500; }
.tsm-sub a:hover { background: var(--tsm-soft); }
.tsm-sub a i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.tsm-langs { display: flex; gap: 4px; }
.tsm-langs a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 40px; padding: 0 8px;
  border: 1px solid #c9ced5; border-radius: 6px; color: var(--tsm-text) !important; font-size: .85rem; font-weight: 600; text-decoration: none; }
.tsm-langs a:hover { border-color: var(--tsm-ink); }
.tsm-langs a[aria-current="true"] { background: var(--tsm-ink); border-color: var(--tsm-ink); color: #fff !important; }
.tsm-burger { display: none; margin-left: auto; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 1px solid #c9ced5; border-radius: 8px; background: #fff; color: var(--tsm-text); font: 600 .95rem/1 "Poppins", sans-serif; cursor: pointer; }
.tsm-burger svg { width: 20px; height: 20px; }
.tsm-stripe { display: flex; height: 4px; }
.tsm-stripe i { flex: 1; }
.tsm-stripe i:nth-child(1){background:var(--tsm-l1)} .tsm-stripe i:nth-child(2){background:var(--tsm-l2)} .tsm-stripe i:nth-child(3){background:var(--tsm-l3)} .tsm-stripe i:nth-child(4){background:var(--tsm-l4)}
.tsm-stripe i:nth-child(5){background:var(--tsm-l5)} .tsm-stripe i:nth-child(6){background:var(--tsm-l6)} .tsm-stripe i:nth-child(7){background:var(--tsm-l7)} .tsm-stripe i:nth-child(8){background:var(--tsm-l8)}

@media (max-width: 1100px) {
  :root { --tsm-hdr-h: 64px; }
  .tsm-hdr__in { padding: 0 16px; }
  .tsm-logo img { height: 34px; }
  .tsm-burger { display: inline-flex; }
  .tsm-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 12px;
    padding: 12px 16px 20px; background: #fff; border-top: 1px solid var(--tsm-line); box-shadow: 0 16px 30px rgba(18,25,33,.14);
    max-height: calc(100vh - var(--tsm-hdr-h)); overflow-y: auto; }
  .tsm-nav.is-open { display: flex; }
  .tsm-nav__list { flex-direction: column; align-items: stretch; }
  .tsm-nav__list > li { flex-wrap: wrap; }
  .tsm-nav__list > li > a { flex: 1; min-height: 48px; font-size: 1.05rem; }
  .tsm-nav__list > li > a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--tsm-accent); }
  .tsm-subbtn { width: 48px; height: 48px; }
  .tsm-sub { position: static; width: 100%; box-shadow: none; border: 0; padding: 0 0 6px 12px; }
  .tsm-langs a { min-height: 44px; min-width: 52px; }
}

/* ---------- pulsanti e componenti ---------- */
.tsm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 8px;
  background: var(--tsm-ink); color: #fff !important; font-weight: 600; text-decoration: none !important; border: 2px solid var(--tsm-ink); }
.tsm-btn:hover { background: #000; }
.tsm-btn--accent { background: var(--tsm-accent); border-color: var(--tsm-accent); }
.tsm-btn--accent:hover { background: var(--tsm-accent-dark); border-color: var(--tsm-accent-dark); }
.tsm-btn--ghost { background: transparent; color: var(--tsm-ink) !important; }
.tsm-btn--ghost:hover { background: var(--tsm-ink); color: #fff !important; }
.tsm-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 14px; border-radius: 999px;
  background: var(--tsm-soft); color: var(--tsm-text); font-size: .9rem; font-weight: 600; }
.tsm-h2 { font-size: 1.6rem; font-weight: 700; color: var(--tsm-ink); margin: 0 0 12px; line-height: 1.25; }
.tsm-crumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: .9rem; }
.tsm-crumb li + li::before { content: "›"; margin-right: 8px; opacity: .8; }
.tsm-crumb a { text-decoration: underline; text-underline-offset: 3px; }
.tsm-crumb [aria-current="page"] { font-weight: 600; }

/* ---------- HOME ---------- */
.tsm-hero { position: relative; min-height: 520px; display: flex; align-items: center; overflow: hidden; background: var(--tsm-ink); color: #fff; }
.tsm-hero__media, .tsm-hero__media video, .tsm-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tsm-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,14,20,.86) 0%, rgba(10,14,20,.55) 55%, rgba(10,14,20,.3) 100%); }
.tsm-hero__in { position: relative; z-index: 1; width: 100%; padding-top: 56px; padding-bottom: 72px; }
.tsm-hero__logo { width: min(520px, 90%); height: auto; }
.tsm-hero h1 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 700; line-height: 1.15; margin: 22px 0 22px; max-width: 18em; }
.tsm-search { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: 900px; }
.tsm-search__f { display: flex; flex-direction: column; justify-content: center; padding: 10px 18px; border-right: 1px solid var(--tsm-line); min-width: 0; }
.tsm-search__f label { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tsm-muted); }
.tsm-search__f input, .tsm-search__f select { width: 100%; border: 0; padding: 4px 0; font: 500 1rem "Poppins", sans-serif; color: var(--tsm-text); background: transparent; min-height: 32px; }
.tsm-search__f input::placeholder { color: #6b7380; }
.tsm-search button { border: 0; padding: 0 32px; background: var(--tsm-accent); color: #fff; font: 600 1.05rem "Poppins", sans-serif; cursor: pointer; min-height: 64px; }
.tsm-search button:hover { background: var(--tsm-accent-dark); }
.tsm-videobtn { position: absolute; z-index: 2; right: 24px; bottom: 22px; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px;
  border: 1px solid rgba(255,255,255,.7); border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font: 600 .9rem "Poppins", sans-serif; cursor: pointer; }
.tsm-videobtn svg { width: 16px; height: 16px; }
.tsm-videobtn[hidden] { display: none; }

.tsm-counters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tsm-counters a { display: flex; align-items: center; gap: 16px; min-height: 92px; padding: 16px 22px; border: 1px solid var(--tsm-line); border-radius: var(--tsm-radius);
  background: #fff; color: var(--tsm-text) !important; text-decoration: none; transition: border-color .15s ease; }
.tsm-counters a:hover { border-color: var(--tsm-ink); }
.tsm-counters b { font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--tsm-ink); }
.tsm-counters span { font-size: 1.05rem; font-weight: 600; }
.tsm-counters svg { margin-left: auto; width: 24px; height: 24px; color: var(--tsm-accent); flex: none; }

.tsm-section { padding-top: 56px; padding-bottom: 56px; }
.tsm-intro { max-width: 72ch; color: var(--tsm-muted); margin-bottom: 24px; }
.tsm-intro p { margin: 0; }
.tsm-lines { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.tsm-linecard { position: relative; display: flex; flex-direction: column; height: 100%; border-radius: var(--tsm-radius); overflow: hidden; background: #fff;
  border: 1px solid var(--tsm-line); color: var(--tsm-text) !important; text-decoration: none !important; transition: border-color .15s ease, box-shadow .15s ease; }
.tsm-linecard:hover { border-color: var(--route); box-shadow: 0 8px 24px rgba(18,25,33,.12); }
.tsm-linecard img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.tsm-linecard__img { position: relative; display: block; }
.tsm-linecard > span:last-child { display: flex; align-items: center; gap: 10px; padding: 14px 16px 16px; font-size: 1.05rem; font-weight: 600; line-height: 1.3; }
.tsm-linecard > span:last-child i { width: 14px; height: 14px; border-radius: 50%; background: var(--route); flex: none; }

.tsm-band { background: var(--tsm-soft); }
.tsm-band__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 40px; padding-bottom: 40px; flex-wrap: wrap; }
.tsm-band h2 { margin: 0 0 6px; font-size: 1.5rem; font-weight: 700; color: var(--tsm-ink); }
.tsm-band p { margin: 0; color: var(--tsm-muted); max-width: 60ch; }

/* tutte le guide in una fila scorrevole (anche con tastiera: la fila riceve il focus) */
.tsm-covers { list-style: none; margin: 0 0 20px; padding: 4px 2px 14px; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 80px) / 6);
  gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.tsm-covers > li { scroll-snap-align: start; }
.tsm-covers a, .tsm-covers span { display: block; border-radius: 6px; overflow: hidden; border: 1px solid var(--tsm-line); background: #fff; }
.tsm-covers img { width: 100%; height: auto; display: block; transition: transform .2s ease; }
.tsm-covers a:hover img { transform: scale(1.03); }

/* ---------- ITINERARIO ---------- */
.tsm-ihero { position: relative; min-height: 300px; display: flex; align-items: flex-end; background: var(--tsm-ink) center / cover no-repeat; color: #fff; }
.tsm-ihero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,14,20,.9) 0%, rgba(10,14,20,.45) 55%, rgba(10,14,20,.15) 100%); }
.tsm-ihero__in { position: relative; z-index: 1; width: 100%; padding-top: 48px; padding-bottom: 32px; }
.tsm-ihero .tsm-crumb, .tsm-ihero .tsm-crumb a { color: #fff !important; }
.tsm-ihero h1 { display: flex; align-items: center; gap: 16px; margin: 10px 0 0; color: #fff; font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; line-height: 1.1; }
.tsm-ihero h1 i { width: 22px; height: 22px; border-radius: 50%; background: var(--route); border: 4px solid #fff; flex: none; }

.tsm-subnav { position: sticky; top: calc(var(--tsm-hdr-h) + 4px); z-index: 900; background: #fff; border-bottom: 1px solid var(--tsm-line); }
.tsm-subnav ul { list-style: none; margin: 0 auto; padding: 0 20px; max-width: var(--tsm-maxw); display: flex; align-items: center; gap: 6px 28px; overflow-x: auto; }
.tsm-subnav a { display: inline-flex; align-items: center; gap: 8px; min-height: 56px; color: var(--tsm-text) !important; font-weight: 600; text-decoration: none; white-space: nowrap; }
.tsm-subnav a:hover { box-shadow: inset 0 -3px 0 var(--tsm-line); }
.tsm-subnav a.is-active { box-shadow: inset 0 -3px 0 var(--route); }
.tsm-subnav li.tsm-subnav__end { margin-left: auto; }
.tsm-subnav li.tsm-subnav__end a { min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--tsm-soft); box-shadow: none; }

.tsm-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 48px; align-items: start; padding-top: 40px; padding-bottom: 56px; }
.tsm-layout > * { min-width: 0; }
.tsm-block + .tsm-block { margin-top: 48px; }
.tsm-prose { font-size: 1.05rem; line-height: 1.7; max-width: 70ch; }
.tsm-prose p { margin: 0 0 1em; }

.tsm-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tsm-gallery a { display: block; position: relative; border-radius: 8px; overflow: hidden; }
.tsm-gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; transition: transform .2s ease; }
.tsm-gallery a:hover img { transform: scale(1.04); }

.tsm-stops { list-style: none; margin: 0; padding: 0; position: relative; }
.tsm-stops::before { content: ""; position: absolute; left: 35px; top: 34px; bottom: 34px; width: 10px; border-radius: 5px; background: var(--route); }
.tsm-stop { position: relative; display: grid; grid-template-columns: 80px minmax(0, 1fr); align-items: center; border-bottom: 1px solid var(--tsm-line); }
.tsm-stop__mk { justify-self: center; position: relative; z-index: 1; }
.tsm-stop__mk--main { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 7px solid var(--tsm-ink); }
.tsm-stop__mk--min { width: 22px; height: 12px; border-radius: 3px; background: #fff; }
.tsm-stop__body { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; min-width: 0; }
.tsm-stop__link { display: flex; align-items: center; gap: 16px; min-height: 76px; padding: 6px 12px; margin-left: -12px; border-radius: 8px;
  color: var(--tsm-text) !important; text-decoration: none !important; }
.tsm-stop__link:hover { background: var(--tsm-soft); }
.tsm-stop__code { flex: none; min-width: 2.6ch; font-weight: 700; font-size: 1rem; color: var(--tsm-muted); font-variant-numeric: tabular-nums; }
.tsm-stop--main .tsm-stop__code { color: var(--tsm-ink); }
.tsm-stop__name { flex: 1; min-width: 0; font-size: 1.08rem; font-weight: 600; line-height: 1.3; }
.tsm-stop__thumb { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--tsm-soft); }
.tsm-stop__chev { flex: none; width: 22px; height: 22px; color: var(--tsm-accent); }
.tsm-exit { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; min-height: 36px; padding: 4px 14px; margin-bottom: 6px;
  border-radius: 999px; background: var(--tsm-soft); color: var(--tsm-ink) !important; font-size: .9rem; font-weight: 600; text-decoration: none !important; }
.tsm-exit:hover { background: var(--tsm-line); }
.tsm-exit img { width: 16px; height: 16px; }

.tsm-map { width: 100%; height: 440px; border-radius: var(--tsm-radius); border: 1px solid var(--tsm-line); background: var(--tsm-soft); }
.tsm-map .leaflet-bar a { width: 40px; height: 40px; line-height: 40px; }
.tsm-map .leaflet-popup-content a { font-weight: 600; font-size: 1rem; display: inline-block; padding: 4px 0; }

.tsm-aside { display: flex; flex-direction: column; gap: 24px; }
@media (min-height: 860px) and (min-width: 992px) { .tsm-aside { position: sticky; top: calc(var(--tsm-hdr-h) + 72px); } }
.tsm-box { border: 1px solid var(--tsm-line); border-radius: var(--tsm-radius); padding: 18px 18px 8px; background: #fff; }
.tsm-box h2 { font-size: 1.1rem; font-weight: 700; color: var(--tsm-ink); margin: 0 0 8px; }
.tsm-links { list-style: none; margin: 0; padding: 0; }
.tsm-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 6px 4px;
  color: var(--tsm-text) !important; font-weight: 500; text-decoration: none; }
.tsm-links li + li a { border-top: 1px solid var(--tsm-line); }
.tsm-links a:hover { color: var(--tsm-accent) !important; }
.tsm-links a[aria-current="page"] { font-weight: 700; color: var(--tsm-accent) !important; }
.tsm-links svg { width: 18px; height: 18px; color: var(--tsm-accent); flex: none; }
.tsm-cover { display: block; border-radius: var(--tsm-radius); overflow: hidden; border: 1px solid var(--tsm-line); }
.tsm-cover img { width: 100%; height: auto; display: block; }

/* ---------- PUNTO ---------- */
.tsm-phead { background: var(--tsm-soft); border-bottom: 1px solid var(--tsm-line); }
.tsm-phead__in { padding-top: 26px; padding-bottom: 30px; }
.tsm-phead__row { display: flex; align-items: center; gap: 22px; margin-top: 16px; flex-wrap: wrap; }
.tsm-badge { width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none;
  background: #fff; border: 9px solid var(--route); color: var(--tsm-ink); font-size: 1.6rem; font-weight: 800; }
.tsm-phead h1 { margin: 0; font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 700; color: var(--tsm-ink); line-height: 1.15; }
.tsm-phead__addr { margin: 4px 0 0; font-size: 1.1rem; color: var(--tsm-text); }
.tsm-visit { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 8px; border-radius: 999px; background: #fff;
  border: 1px solid var(--tsm-line); font-weight: 600; font-size: .95rem; }
.tsm-visit img { width: 30px; height: 30px; }
.tsm-figure { margin: 0 0 28px; }
.tsm-figure a { display: block; border-radius: var(--tsm-radius); overflow: hidden; }
.tsm-figure img { width: 100%; height: auto; display: block; }
.tsm-curio { margin: 24px 0; padding: 18px 22px; border-left: 6px solid var(--route); background: var(--tsm-soft); border-radius: 0 var(--tsm-radius) var(--tsm-radius) 0; }
.tsm-curio p:last-child { margin-bottom: 0; }
.tsm-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tsm-pager a { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 76px; padding: 12px 16px; border-radius: var(--tsm-radius);
  background: var(--tsm-ink); color: #fff !important; text-decoration: none !important; font-size: .85rem; }
.tsm-pager a:hover { background: #000; }
.tsm-pager a b { font-size: 1rem; line-height: 1.3; }
.tsm-pager .tsm-pager__next { grid-column: 2; text-align: right; }
.tsm-near { list-style: none; margin: 0 0 10px; padding: 0; position: relative; }
.tsm-near::before { content: ""; position: absolute; z-index: 1; left: 16px; top: 26px; bottom: 26px; width: 6px; border-radius: 3px; background: var(--route); }
.tsm-near a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 8px; border-radius: 8px;
  color: var(--tsm-text) !important; text-decoration: none; }
.tsm-near a::before { content: ""; position: relative; z-index: 2; flex: none; box-sizing: border-box; width: 18px; height: 18px; margin-left: 2px;
  border-radius: 50%; background: #fff; border: 4px solid var(--tsm-ink); }
.tsm-near a:hover { background: var(--tsm-soft); }
.tsm-near a[aria-current="page"] { background: var(--tsm-soft); font-weight: 700; }
.tsm-near a[aria-current="page"]::before { background: var(--route); border-color: var(--route); box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--route); }
.tsm-near b { display: inline-block; flex: none; min-width: 3ch; font-variant-numeric: tabular-nums; }

/* ---------- footer ---------- */
.tsm-foot { background: var(--tsm-ink); color: #dfe3e8; }
.tsm-foot a { color: #fff !important; }
.tsm-foot__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; align-items: start; padding-top: 48px; padding-bottom: 32px; }
.tsm-foot img { max-width: 100%; height: auto; }
.tsm-foot h2 { font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #dfe3e8; margin: 0 0 10px; }
.tsm-foot p { margin: 0; color: #dfe3e8; font-size: .95rem; }
.tsm-social { list-style: none; margin: 14px 0 0; padding: 0; display: flex; gap: 8px; }
.tsm-social a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); text-decoration: none; font-size: 1.1rem; }
.tsm-social a:hover { background: #fff; color: var(--tsm-ink) !important; }
.tsm-foot__bottom { border-top: 1px solid rgba(255,255,255,.18); }
.tsm-foot__bottom ul { list-style: none; margin: 0; padding: 18px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; font-size: .9rem; }
.tsm-foot__bottom img { height: 22px; width: auto; vertical-align: middle; }
.tsm-totop { position: fixed; right: 20px; bottom: 20px; z-index: 950; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--tsm-ink); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.tsm-totop[hidden] { display: none; }
.tsm-totop svg { width: 22px; height: 22px; }

/* ---------- responsive ---------- */
@media (max-width: 991px) {
  .tsm-lines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tsm-covers { grid-auto-columns: calc((100% - 48px) / 4); }
  .tsm-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .tsm-aside { position: static; }
  .tsm-foot__grid { grid-template-columns: minmax(0, 1fr); text-align: left; }
}
@media (max-width: 767px) {
  .tsm-hero { min-height: 0; }
  .tsm-hero__in { padding-top: 40px; padding-bottom: 84px; }
  .tsm-search { grid-template-columns: minmax(0, 1fr); }
  .tsm-search__f { border-right: 0; border-bottom: 1px solid var(--tsm-line); }
  .tsm-search button { min-height: 52px; }
  .tsm-counters { grid-template-columns: minmax(0, 1fr); }
  .tsm-counters a { min-height: 72px; }
  .tsm-counters b { font-size: 2rem; }
  .tsm-section { padding-top: 40px; padding-bottom: 40px; }
  .tsm-lines { gap: 12px; }
  .tsm-covers { grid-auto-columns: 40%; gap: 10px; }
  .tsm-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tsm-stops::before { left: 23px; }
  .tsm-stop { grid-template-columns: 56px minmax(0, 1fr); }
  .tsm-stop__thumb { width: 52px; height: 52px; }
  .tsm-stop__chev { display: none; }
  .tsm-visit { margin-left: 0; }
  .tsm-map { height: 340px; }
}
@media (prefers-reduced-motion: reduce) {
  body.tsm *, body.tsm *::before, body.tsm *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* pagina Punti: mappa apribile */
.tsm-punti-map { margin: 8px 0 28px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.tsm-punti-map > div { width: 100%; }
