/* Polly Track — minisito. «L'atlante sul serbatoio»: carta calda, inchiostro, legenda da atlante.
   Colori da DESIGN.md (PollyPalette giorno/notte). Font di sistema, nessuna risorsa esterna. */

:root {
  color-scheme: light dark;
  --ground: #ece6d6;
  --sheet: #f7f3ea;
  --field: #fffdf8;
  --track: #e6dfcf;
  --rule: #d8cdb6;
  --ink: #1f2937;
  --ink-muted: #4b5563;
  --action: #b3410a;
  --action-pressed: #8f3408;
  --action-text: #a33b08;
  --on-action: #fffaf3;
  --route: #e8590c;
  --start: #1d4ed8;
  --asphalt: #f2c14e;
  --dirt: #8a6a3b;
  --banned: #c2185b;
  --camera: #1e3a8a;
  --contour: #8a6a3b;
  --contour-alpha: 0.16;
  --band: #1f2937;
  --on-band: #f4efe4;
  --on-band-muted: #c9c2b2;
  --shadow: #d8cdb6;

  --f-display: "Avenir Next Condensed", "AvenirNextCondensed-Bold", "Roboto Condensed", "Arial Narrow",
    "Helvetica Neue Condensed", system-ui, sans-serif;
  --f-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;

  --step--1: clamp(0.86rem, 0.83rem + 0.12vw, 0.94rem);
  --step-0: clamp(1.02rem, 0.98rem + 0.2vw, 1.13rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.25rem + 1.1vw, 2.1rem);
  --step-3: clamp(1.95rem, 1.45rem + 2.2vw, 3.1rem);
  --step-4: clamp(2.5rem, 1.6rem + 4.2vw, 4.9rem);

  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --wide: 72rem;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #14161a;
    --sheet: #1c1f24;
    --field: #262a30;
    --track: #30353c;
    --rule: #3b414a;
    --ink: #edeff2;
    --ink-muted: #b2bac4;
    --action: #c24a10;
    --action-pressed: #a33b08;
    --action-text: #ff9a62;
    --on-action: #fffaf3;
    --route: #ff7a33;
    --contour: #c8a774;
    --contour-alpha: 0.12;
    --band: #0b0d10;
    --on-band: #edeff2;
    --on-band-muted: #b2bac4;
    --shadow: #0b0d10;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--step-0) / 1.6 var(--f-body);
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
picture { display: contents; }
picture > source { display: none; }

a { color: var(--action-text); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.14em; }
:focus-visible { outline: 3px solid var(--route); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--f-display);
  font-stretch: condensed;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.2; letter-spacing: 0; }
p { margin: 0 0 1em; max-width: 64ch; text-wrap: pretty; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--ink); color: var(--ground); padding: 0.6rem 1rem; border-radius: 8px;
}
.skip:focus { top: 1rem; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; }

/* ——— Testata ——— */
.top {
  background: var(--sheet);
  border-bottom: 1px solid var(--rule);
}
.top .wrap {
  display: flex; align-items: center; gap: 0.75rem 1.5rem; flex-wrap: wrap;
  padding-block: 0.7rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--ink); text-decoration: none; margin-right: auto;
}
.brand img { width: 44px; height: 44px; border-radius: 50%; }
.wordmark {
  font-family: var(--f-display); font-stretch: condensed; font-weight: 800;
  font-size: 1.45rem; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1;
}
.wordmark b { color: var(--route); font-weight: 900; }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem; font-weight: 650; font-size: var(--step--1); }
.nav a {
  color: var(--ink); text-decoration: none; padding: 0.55rem 0.7rem; border-radius: 10px;
  min-height: 44px; display: inline-flex; align-items: center;
}
.nav a:hover { background: var(--track); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--sheet); }
.nav .lang { border: 1.5px solid var(--rule); }

/* ——— Hero ——— */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--rule); }
.contours {
  position: absolute; inset: 0; pointer-events: none;
  background: var(--contour); opacity: var(--contour-alpha);
  -webkit-mask: url(/assets/img/contours.svg) center / cover no-repeat;
  mask: url(/assets/img/contours.svg) center / cover no-repeat;
}
.hero .wrap {
  position: relative;
  display: grid; gap: clamp(2rem, 4vw, 4rem); align-items: center;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(2rem, 5vw, 4.5rem);
}
.kicker {
  display: inline-flex; flex-wrap: wrap; gap: 0.35rem 0.9rem;
  font-weight: 700; font-size: var(--step--1); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-muted); margin-bottom: 1.1rem;
}
.kicker span::before {
  content: ""; display: inline-block; width: 0.7em; height: 0.7em; border-radius: 50%;
  margin-right: 0.45em; vertical-align: 0.02em; background: var(--k, var(--route));
}
.hero h1 em { font-style: normal; color: var(--action-text); }
.lede { font-size: var(--step-1); line-height: 1.45; color: var(--ink); max-width: 36ch; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 56px; padding: 0 1.4rem; border-radius: var(--radius);
  font-weight: 750; font-size: var(--step-0); text-decoration: none;
  border: 2px solid transparent; transition: background-color 160ms ease-out, transform 160ms ease-out;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-primary:hover { background: var(--action-pressed); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--track); }

.hero-art { position: relative; justify-self: center; width: min(100%, 22rem); }
.phone {
  border: 7px solid var(--ink); border-radius: 30px; overflow: hidden; background: var(--ink);
  box-shadow: 12px 12px 0 var(--shadow);
}
.phone img { width: 100%; }
.hero-art .polly {
  position: absolute; width: 66%; left: -52%; bottom: -10%;
  filter: drop-shadow(0 6px 0 color-mix(in srgb, var(--ground) 70%, transparent));
}

/* ——— Immagini dei gruppi (pagina funzioni) ——— */
.group-figs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1.5rem; margin: 1.2rem 0 1.8rem; }
.group-figs .phone { width: min(44%, 13rem); border-width: 5px; border-radius: 22px; box-shadow: 8px 8px 0 var(--shadow); }
.group-figs .tablet { width: min(100%, 34rem); border-width: 6px; border-radius: 16px; box-shadow: 8px 8px 0 var(--shadow); }

/* ——— Tablet ——— */
.tablet {
  border: 8px solid var(--ink); border-radius: 22px; overflow: hidden; background: var(--ink);
  box-shadow: 12px 12px 0 var(--shadow);
}
.tablet img { width: 100%; }
.wide-shot { margin: 2rem 0 0; max-width: 56rem; }
.wide-shot figcaption, .soon-grid figcaption { font-size: var(--step--1); color: var(--ink-muted); margin-top: 0.9rem; }
.side-polly { justify-self: center; width: min(100%, 17rem); }
.soon-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; margin: 2rem 0 1.5rem;
}
.soon-grid figure { margin: 0; }
.soon-grid figcaption b { color: var(--ink); }
.tablet.muted { border-style: dashed; border-color: var(--ink-muted); box-shadow: none; }

/* ——— Striscia del fondo (legenda) ——— */
.strip {
  display: grid; grid-template-columns: 3fr 1.2fr 2fr 0.6fr 1.6fr 2.4fr 1fr; height: 12px;
}
.strip i { display: block; }
.strip .a { background: var(--asphalt); }
.strip .d { background: repeating-linear-gradient(90deg, var(--dirt) 0 14px, transparent 14px 20px); }
.strip .v { background: var(--banned); }
.legend {
  display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; font-size: var(--step--1); color: var(--ink-muted);
  padding-block: 0.7rem 0;
}
.legend span::before {
  content: ""; display: inline-block; width: 1.6em; height: 0.5em; margin-right: 0.45em; border-radius: 2px;
  background: var(--c);
}
.legend .d::before { background: repeating-linear-gradient(90deg, var(--dirt) 0 6px, transparent 6px 9px); }

/* ——— Sezioni ——— */
.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section + .section { padding-top: 0; }
.eyebrow {
  font-weight: 750; font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--action-text); margin-bottom: 0.6rem;
}
.split {
  display: grid; gap: clamp(1.75rem, 5vw, 5rem); align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 17rem);
}
.split.flip { grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); }
.split.flip > .shot { order: -1; }
.shot { justify-self: center; width: min(100%, 17rem); }
.shot figcaption { font-size: var(--step--1); color: var(--ink-muted); margin-top: 0.9rem; text-align: center; }
.ticks { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: 0.55rem; max-width: 60ch; }
.ticks li { padding-left: 1.6rem; position: relative; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.62em; width: 0.9rem; height: 4px; border-radius: 2px;
  background: var(--route);
}

/* ——— Le quattro domande (indice da atlante) ——— */
.ask {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0;
  border-top: 2px solid var(--ink); margin-top: 2rem;
}
.ask div { padding: 1.2rem 1.2rem 1.3rem 0; border-right: 1px solid var(--rule); }
.ask div + div { padding-left: 1.2rem; }
.ask div:last-child { border-right: 0; }
.ask b { display: block; font-family: var(--f-display); font-stretch: condensed; font-size: var(--step-2); line-height: 1.1; }
.ask small { display: block; color: var(--ink-muted); font-size: var(--step--1); margin-top: 0.2rem; letter-spacing: 0.02em; }
.ask p { margin: 0.7rem 0 0; font-size: var(--step--1); }

/* ——— Roadbook (elenco funzioni) ——— */
.roadbook { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 10px; counter-reset: rb; }
.roadbook li {
  display: grid; grid-template-columns: 5.2rem minmax(0, 1fr) 3.4rem; align-items: stretch;
  background: var(--field); border: 2px solid var(--ink); border-radius: 12px; overflow: hidden;
}
.roadbook .km {
  display: grid; place-items: center; border-right: 2px solid var(--ink);
  font-family: var(--f-display); font-stretch: condensed; font-weight: 800; font-size: 1.7rem;
}
.roadbook .note { padding: 0.85rem 1rem; }
.roadbook .note h3 { margin: 0 0 0.25rem; }
.roadbook .note p { margin: 0; font-size: var(--step--1); color: var(--ink-muted); max-width: 70ch; }
.roadbook .note p + p { margin-top: 0.35rem; }
.roadbook .tulip { display: grid; place-items: center; border-left: 1px dashed var(--rule); color: var(--ink); }
.roadbook .tulip svg { width: 30px; height: 40px; }
.tag {
  display: inline-block; font: 700 0.72rem/1 var(--f-body); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.3rem 0.45rem; border-radius: 6px; vertical-align: 0.2em; margin-left: 0.4rem;
  background: var(--track); color: var(--ink);
}
.tag.soon { background: transparent; border: 1.5px dashed var(--ink-muted); color: var(--ink-muted); }

.group { margin-top: clamp(2.5rem, 5vw, 4rem); }
.group:first-of-type { margin-top: 0; }
.group > p { color: var(--ink-muted); }

/* ——— Banda scura: gratis e offline ——— */
.band { background: var(--band); color: var(--on-band); }
.band .wrap { padding-block: clamp(3rem, 7vw, 5.5rem); }
.band h2 { color: var(--on-band); }
.band p { color: var(--on-band-muted); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 2rem; margin-top: 2rem; }
.facts b {
  display: block; font-family: var(--f-display); font-stretch: condensed; font-size: var(--step-2);
  color: var(--on-band); line-height: 1.1; margin-bottom: 0.4rem;
}
.facts b::before {
  content: ""; display: block; width: 2.2rem; height: 5px; border-radius: 3px; background: var(--route);
  margin-bottom: 0.9rem;
}
.facts p { margin: 0; font-size: var(--step--1); }

/* ——— Offerte ——— */
.tips { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin-top: 1.5rem; list-style: none; padding: 0; }
.tips li { display: flex; align-items: center; gap: 0.8rem; }
.tips img { width: 76px; height: 76px; border-radius: 50%; background: var(--track); }
.tips b { display: block; font-size: var(--step-1); }
.tips span { color: var(--ink-muted); font-size: var(--step--1); }

/* ——— In arrivo ——— */
.soon-list { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: 0.6rem; }
.soon-list li {
  padding: 0.85rem 1rem; border: 1.5px dashed var(--ink-muted); border-radius: 12px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.2rem 1rem;
}
.soon-list span { color: var(--ink-muted); font-size: var(--step--1); }

/* ——— Galleria ——— */
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(11rem, 14rem); gap: 1.25rem;
  overflow-x: auto; padding: 0.5rem 0.25rem 1.5rem; scroll-snap-type: x mandatory;
  margin-top: 1.5rem; overscroll-behavior-x: contain;
}
.gallery figure { margin: 0; scroll-snap-align: start; }
.gallery .phone { border-width: 5px; border-radius: 22px; box-shadow: 8px 8px 0 var(--shadow); }
.gallery figcaption { font-size: var(--step--1); margin-top: 0.7rem; color: var(--ink-muted); }

/* ——— Download ——— */
.stores { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.store-slot {
  min-width: 15rem; min-height: 4.5rem; padding: 0.9rem 1.2rem; border-radius: 14px;
  border: 2px dashed var(--ink-muted); display: grid; align-content: center;
}
.store-slot b { font-size: var(--step-1); }
.store-slot span { color: var(--ink-muted); font-size: var(--step--1); }

/* ——— Pagine di testo (privacy, supporto, crediti) ——— */
.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem); position: relative; overflow: hidden; }
.page-head .wrap { position: relative; }
.page-head p { font-size: var(--step-1); line-height: 1.45; max-width: 46ch; }
.prose { padding-bottom: clamp(3rem, 7vw, 6rem); }
.prose h2 { font-size: var(--step-2); margin-top: 2.6rem; }
.prose h3 { margin-top: 1.8rem; }
.prose ul { padding-left: 1.2rem; max-width: 64ch; }
.prose li { margin-bottom: 0.4rem; }
.prose .updated { color: var(--ink-muted); font-size: var(--step--1); }
.callout {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px;
  padding: 1.1rem 1.25rem; max-width: 64ch; margin: 1.5rem 0;
}
.callout p:last-child { margin-bottom: 0; }

.table-scroll { overflow-x: auto; margin: 1rem 0 1.5rem; }
table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: var(--step--1); }
th, td { text-align: left; vertical-align: top; padding: 0.65rem 0.8rem 0.65rem 0; border-bottom: 1px solid var(--rule); }
th { font-weight: 750; border-bottom: 2px solid var(--ink); }

details {
  border-bottom: 1px solid var(--rule); max-width: 64ch;
}
details:first-of-type { border-top: 2px solid var(--ink); }
summary {
  cursor: pointer; list-style: none; padding: 1rem 2.2rem 1rem 0; position: relative;
  font-weight: 700; font-size: var(--step-0); min-height: 56px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 0.4rem; top: 0.75rem;
  font: 400 1.6rem/1 var(--f-body); color: var(--action-text);
}
details[open] summary::after { content: "–"; }
details > div { padding: 0 0 1rem; }

.mail {
  display: inline-flex; align-items: center; gap: 0.6rem; font-size: var(--step-1); font-weight: 700;
  padding: 0.9rem 1.2rem; border-radius: 14px; background: var(--field); border: 2px solid var(--ink);
  text-decoration: none; color: var(--ink); margin: 0.5rem 0 1rem;
}

/* ——— Piede ——— */
.foot { background: var(--sheet); border-top: 1px solid var(--rule); font-size: var(--step--1); color: var(--ink-muted); }
.foot .wrap { padding-block: 2rem 2.5rem; display: grid; gap: 1.2rem; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; justify-content: flex-end; align-content: start; }
.foot nav a { color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; }
.foot p { margin: 0 0 0.4rem; }

/* ——— Movimento ——— */
@media (prefers-reduced-motion: no-preference) {
  .hero-text > * { animation: rise 640ms cubic-bezier(0.22, 1, 0.36, 1) both; }
  .hero-text > *:nth-child(2) { animation-delay: 70ms; }
  .hero-text > *:nth-child(3) { animation-delay: 140ms; }
  .hero-text > *:nth-child(4) { animation-delay: 210ms; }
  .hero-art { animation: rise 800ms 180ms cubic-bezier(0.22, 1, 0.36, 1) both; }
  .hero-art .polly { animation: ride 900ms 520ms cubic-bezier(0.16, 1, 0.3, 1) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ride { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }

/* ——— Schermi stretti ——— */
@media (max-width: 52rem) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero-art { width: min(78%, 18rem); margin-left: 18%; }
  .split, .split.flip { grid-template-columns: minmax(0, 1fr); }
  .split.flip > .shot { order: 0; }
  .soon-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-art .polly { width: 42%; left: -20%; bottom: -10%; }
  .side-polly { width: min(60%, 12rem); }
  .ask { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ask div:nth-child(even) { border-right: 0; }
  .ask div:nth-child(odd) { padding-left: 0; }
  .ask div:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .foot .wrap { grid-template-columns: minmax(0, 1fr); }
  .foot nav { justify-content: flex-start; }
}
@media (max-width: 30rem) {
  .roadbook li { grid-template-columns: 3.9rem minmax(0, 1fr); }
  .roadbook .km { font-size: 1.35rem; }
  .roadbook .tulip { display: none; }
  .ask { grid-template-columns: minmax(0, 1fr); }
  .ask div, .ask div + div { padding-left: 0; border-right: 0; }
  .ask div + div { border-top: 1px solid var(--rule); }
  .nav a { padding-inline: 0.55rem; }
}

@media print {
  .top .nav, .skip, .contours { display: none; }
  body { background: #fff; color: #000; }
}

/* ——— Tablet dentro split e galleria ——— */
.split:has(> .shot.wide) { grid-template-columns: minmax(0, 1fr) minmax(0, 28rem); }
.shot.wide { width: 100%; }
.gallery figure:has(> .tablet) { grid-column: span 2; }
.gallery .tablet { border-width: 5px; border-radius: 16px; box-shadow: 8px 8px 0 var(--shadow); }
@media (max-width: 52rem) {
  .split:has(> .shot.wide) { grid-template-columns: minmax(0, 1fr); }
}

/* ——— Roadbook rally, tablet a coppie, auto ——— */
.rb-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 14rem); gap: 2rem; align-items: end; margin-top: 2rem; }
.rb-grid figure, .duo figure { margin: 0; }
.rb-grid figcaption, .duo figcaption { font-size: var(--step--1); color: var(--ink-muted); margin-top: 0.9rem; }
.rb-more { margin-top: 2.5rem; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); }
.rb-more .ticks li { margin-bottom: 0.4rem; }
.note { font-size: var(--step--1); color: var(--ink-muted); margin-top: 1rem; }
.shot.pdf { width: min(100%, 20rem); }
.paper { background: #fff; border: 1px solid var(--rule); border-radius: 6px; padding: 0.4rem; box-shadow: 8px 8px 0 var(--shadow); transform: rotate(-1.5deg); }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; margin-top: 2rem; }
.caption-note { font-size: var(--step--1); color: var(--ink-muted); margin-top: 1rem; }
.split.wide-left { grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); }
@media (max-width: 52rem) {
  .rb-grid, .rb-more, .duo, .split.wide-left { grid-template-columns: minmax(0, 1fr); }
  .rb-grid .phone { width: min(70%, 15rem); }
}

/* ——— Scontrino «tutto gratis» ——— */
.free-list .split { grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); align-items: start; }
.receipt {
  background: var(--field); color: var(--ink); padding: 1.4rem 1.5rem 1.2rem; position: relative;
  box-shadow: 10px 10px 0 var(--shadow);
  --tooth: 10px;
  -webkit-mask: radial-gradient(circle at 50% 0, transparent 5px, #000 5.5px) 0 0 / var(--tooth) 51% repeat-x,
                radial-gradient(circle at 50% 100%, transparent 5px, #000 5.5px) 0 100% / var(--tooth) 51% repeat-x;
  mask: radial-gradient(circle at 50% 0, transparent 5px, #000 5.5px) 0 0 / var(--tooth) 51% repeat-x,
        radial-gradient(circle at 50% 100%, transparent 5px, #000 5.5px) 0 100% / var(--tooth) 51% repeat-x;
}
.receipt-head {
  font-family: var(--f-display); font-stretch: condensed; font-weight: 800; font-size: var(--step-1);
  text-transform: uppercase; letter-spacing: 0.04em; margin: 0.3rem 0 0.8rem;
  padding-bottom: 0.7rem; border-bottom: 2px dashed var(--rule);
}
.receipt-head span { color: var(--ink-muted); font-weight: 700; text-transform: none; letter-spacing: 0; font-family: var(--f-body); font-size: var(--step--1); }
.receipt ul { list-style: none; margin: 0; padding: 0; }
.receipt li {
  display: flex; align-items: baseline; gap: 0.6rem; padding: 0.42rem 0; font-size: var(--step--1); line-height: 1.35;
}
.receipt li span { flex: 1; }
.receipt li span::after { content: ""; }
.receipt li b { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--action-text); }
.receipt-total {
  display: flex; justify-content: space-between; align-items: baseline; margin: 0.8rem 0 0.4rem;
  padding-top: 0.8rem; border-top: 2px dashed var(--rule);
  font-family: var(--f-display); font-stretch: condensed; font-weight: 800; font-size: var(--step-3); line-height: 1;
}
.receipt-total b { color: var(--action-text); }
@media (max-width: 52rem) { .free-list .split { grid-template-columns: minmax(0, 1fr); } }

/* ——— Offrimi un caffè ——— */
.tip-cards { list-style: none; padding: 0; margin: 0 0 2.5rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; max-width: 46rem; }
.tip-cards a {
  display: grid; justify-items: center; gap: 0.2rem; padding: 1.2rem 1rem 1.1rem; text-align: center;
  background: var(--field); border: 2px solid var(--ink); border-radius: 16px; color: var(--ink); text-decoration: none;
  box-shadow: 8px 8px 0 var(--shadow); transition: transform 160ms ease-out, box-shadow 160ms ease-out;
}
.tip-cards a:hover { transform: translate(-2px, -2px); box-shadow: 10px 10px 0 var(--shadow); }
.tip-cards img { width: 8rem; height: 8rem; margin-bottom: 0.4rem; }
.tip-cards b { font-size: var(--step-1); white-space: nowrap; }
.tip-cards span { font-family: var(--f-display); font-stretch: condensed; font-weight: 800; font-size: var(--step-2); color: var(--action-text); line-height: 1.1; }
.tip-cards em { font-style: normal; font-size: var(--step--1); font-weight: 700; margin-top: 0.4rem; padding: 0.45rem 0.9rem; border-radius: 10px; background: var(--action); color: var(--on-action); }
@media (max-width: 40rem) { .tip-cards { grid-template-columns: minmax(0, 1fr); } .tip-cards a { grid-template-columns: 5rem 1fr auto; justify-items: start; align-items: center; text-align: left; column-gap: 1rem; } .tip-cards img { width: 5rem; height: 5rem; grid-row: span 2; margin: 0; } .tip-cards em { grid-column: 3; grid-row: 1 / span 2; } }

.rb-more.three { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr) minmax(0, 18rem); gap: 2rem; align-items: center; }
.rb-more.three figure { margin: 0; }
.rb-more.three figcaption { font-size: var(--step--1); color: var(--ink-muted); margin-top: 0.8rem; }
@media (max-width: 52rem) { .rb-more.three { grid-template-columns: minmax(0, 1fr); } .rb-more.three > figure:first-child { width: min(70%, 14rem); } }
.receipt li b { min-width: 1.5rem; text-align: right; }

/* ——— Pagine di dettaglio delle funzioni ——— */
.nav a[aria-current="true"] { background: var(--track); }
.crumbs { font-size: var(--step--1); color: var(--ink-muted); margin-bottom: 0.9rem; font-weight: 650; }
.crumbs a { color: var(--action-text); }
.free-note {
  display: inline-flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: var(--step--1) !important; font-weight: 700;
  color: var(--ink); margin: 0.4rem 0 0; padding: 0.5rem 0.8rem; border-radius: 10px; background: var(--sheet);
  border: 1px solid var(--rule);
}
.detail h2 { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.detail section:first-child h2 { margin-top: 0.5rem; }
.detail .where { font-size: var(--step--1); color: var(--ink-muted); }
.detail .where b { color: var(--ink); }
.figs { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1.75rem 1.5rem; margin: 1.5rem 0 2rem; }
.figs figure { margin: 0; width: min(100%, 13.5rem); }
.figs figure.wide { width: min(100%, 40rem); }
.figs figure.mid { width: min(100%, 26rem); }
.figs .phone { border-width: 5px; border-radius: 22px; box-shadow: 8px 8px 0 var(--shadow); }
.figs .tablet { border-width: 6px; border-radius: 16px; box-shadow: 8px 8px 0 var(--shadow); }
.figs figcaption { font-size: var(--step--1); color: var(--ink-muted); margin-top: 0.8rem; line-height: 1.45; }
.numbers {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: 0;
  margin: 1.2rem 0 0; border-top: 2px solid var(--ink);
}
.numbers div { padding: 0.9rem 1rem 0.9rem 0; border-bottom: 1px solid var(--rule); }
.numbers dt {
  font-family: var(--f-display); font-stretch: condensed; font-weight: 800; font-size: var(--step-2); line-height: 1.05;
}
.numbers dd { margin: 0.25rem 0 0; font-size: var(--step--1); color: var(--ink-muted); max-width: 30ch; }
.limits {
  background: var(--sheet); border: 1px solid var(--rule); border-left: 5px solid var(--banned); border-radius: 12px;
  padding: 1rem 1.25rem 1rem 2.4rem; max-width: 64ch; margin: 1rem 0 0;
}
.limits li { margin-bottom: 0.45rem; }
.steps { padding-left: 1.4rem; max-width: 64ch; }
.steps li { margin-bottom: 0.5rem; }
.pager {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: clamp(3rem, 6vw, 4.5rem);
  border-top: 2px solid var(--ink); padding-top: 1.2rem;
}
.pager a {
  display: grid; gap: 0.15rem; padding: 0.8rem 1rem; border-radius: 12px; border: 1.5px solid var(--rule);
  background: var(--field); color: var(--ink); text-decoration: none; font-weight: 700; min-height: 56px;
}
.pager a:hover { border-color: var(--ink); }
.pager small { color: var(--ink-muted); font-weight: 600; font-size: var(--step--1); }
.pager .all { text-align: center; }
.pager .next { text-align: right; grid-column: 3; }
.pager .prev { grid-column: 1; }
.pager .all { grid-column: 2; }
.detail-index {
  list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: 0.6rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}
.detail-index a {
  display: flex; align-items: center; min-height: 56px; padding: 0.7rem 1rem; border-radius: 12px;
  border: 2px solid var(--ink); background: var(--field); color: var(--ink); font-weight: 700; text-decoration: none;
}
.detail-index a::after { content: "→"; margin-left: auto; padding-left: 0.8rem; color: var(--action-text); }
.detail-index a:hover { background: var(--track); }
.more { font-weight: 700; margin-top: 1rem; }
@media (max-width: 40rem) {
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager .next, .pager .prev, .pager .all { grid-column: auto; text-align: left; }
  .figs figure { width: calc(50% - 0.75rem); }
  .figs figure.wide, .figs figure.mid { width: 100%; }
}

/* ——— Confronto con le altre app ——— */
.cmp { margin: 1.5rem 0 0.5rem; }
.cmp-scroll {
  overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--rule); border-radius: 12px; background: var(--field);
  max-width: 100%;
}
.cmp-scroll:focus-visible { outline-offset: 2px; }
.cmp table { min-width: 0; width: 100%; font-size: var(--step--1); line-height: 1.35; }
.cmp th, .cmp td { padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.cmp thead th {
  position: sticky; top: 0; background: var(--sheet); border-bottom: 2px solid var(--ink);
  font-family: var(--f-display); font-stretch: condensed; font-size: var(--step-0); white-space: nowrap;
}
.cmp tbody th {
  font-weight: 650; text-align: left; min-width: 10.5rem; max-width: 15rem;
  position: sticky; left: 0; z-index: 1; background: var(--field);
  box-shadow: 1px 0 0 var(--rule);
}
.cmp thead th:first-child { position: sticky; left: 0; z-index: 2; }
.cmp td { min-width: 7.2rem; }
.cmp .polly { background: color-mix(in srgb, var(--route) 9%, var(--field)); }
.cmp thead .polly { background: color-mix(in srgb, var(--route) 18%, var(--sheet)); color: var(--ink); }
.cmp tbody tr:last-child > * { border-bottom: 0; }
.cmp .v { display: block; font-weight: 750; white-space: nowrap; }
.cmp .v::before { display: inline-block; width: 1.1em; font-weight: 800; }
.cmp .v-yes::before { content: "✓"; color: #2f7d32; }
.cmp .v-no::before { content: "–"; color: var(--ink-muted); }
.cmp .v-paid::before { content: "€"; color: var(--action-text); }
.cmp .v-partial::before { content: "◐"; color: var(--dirt); }
.cmp .v-nv { color: var(--ink-muted); font-weight: 600; }
.cmp .v-nv::before { content: "?"; }
.cmp small { display: block; color: var(--ink-muted); font-size: 0.86em; margin-top: 0.15rem; }
.cmp-hint { font-size: var(--step--1); color: var(--ink-muted); margin: 0.5rem 0 0; }
.cmp-legend { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; font-size: var(--step--1); color: var(--ink-muted); margin: 0.8rem 0 0; padding: 0; list-style: none; }
.cmp-legend .v { display: inline; white-space: nowrap; }
.cmp-date { font-size: var(--step--1); color: var(--ink-muted); margin-top: 0.8rem; max-width: 70ch; }
.cmp-date b { color: var(--ink); }



.sources { font-size: var(--step--1); }
.sources li { overflow-wrap: anywhere; }
.compare-link { margin-top: clamp(2.5rem, 5vw, 3.5rem); font-weight: 650; }
.compare-link + .pager { margin-top: 1rem; }
@media (min-width: 60rem) { .cmp td { min-width: 0; } }
@media (prefers-color-scheme: dark) { .cmp .v-yes::before { color: #7bc67e; } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cmp .v-soon { color: var(--start); }
.cmp .v-soon::before { content: "→"; }
@media (prefers-color-scheme: dark) { .cmp .v-soon { color: #8fb0ff; } }
.cmp .v-test { color: var(--dirt); }
.cmp .v-test::before { content: "β"; }
@media (max-width: 30rem) {
  .nav { gap: 0; }
  .nav a { padding-inline: 0.42rem; }
}
.prose .cmp-legend, .prose .sources { max-width: none; }
.prose .cmp-legend { padding-left: 0; }
.prose .cmp-legend li { margin: 0; }
@media (min-width: 75rem) { .cmp:not(.cmp-wide) .cmp-hint { display: none; } }

/* Indicazione di scorrimento ben visibile per le tabelle con molte app */
.cmp-hint::before { content: "↔ "; font-weight: 800; color: var(--action-text); }
/* Pagine «vs» sul telefono: righe impilate a schede, niente scorrimento di lato */
@media (max-width: 37.5rem) {
  .cmp-pair .cmp-scroll { overflow: visible; }
  .cmp-pair table, .cmp-pair tbody, .cmp-pair tr, .cmp-pair th, .cmp-pair td { display: block; }
  .cmp-pair thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cmp-pair tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-bottom: 1px solid var(--rule); }
  .cmp-pair tbody tr:last-child { border-bottom: 0; }
  .cmp-pair tbody th { grid-column: 1 / -1; position: static; max-width: none; min-width: 0; box-shadow: none; border-bottom: 0; padding-bottom: 0.2rem; }
  .cmp-pair td { min-width: 0; border-bottom: 0; padding-top: 0.3rem; }
  .cmp-pair td::before { content: attr(data-label); display: block; font-size: 0.8em; font-weight: 700; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.15rem; }
  .cmp-pair .v { white-space: normal; }
}
