/* Tollino website. Italian motorway-sign green, same as the app. Light and dark follow the visitor's system setting. */
:root {
  --green: #0b7a3e; --green-ink: #ffffff;
  --bg: #f7f7f5; --surface: #ffffff; --surface-2: #f0f1ee; --text: #1b1c1a; --muted: #5c5f5a; --line: #e2e4df;
  --accent: #0b7a3e; --red: #c62828; --orange: #e65100; --amber: #b7791f; --indigo: #4a56b8;
  --radius: 18px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111312; --surface: #1a1d1b; --surface-2: #232724; --text: #e6e8e4; --muted: #a3a8a1; --line: #2e332f;
    --accent: #6fd39b; --red: #ef7b7b; --orange: #ffab70; --amber: #f2c46d; --indigo: #9fa8ff;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--accent); }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.2; margin: 0 0 10px; }
h2 { font-size: 1.35rem; margin: 40px 0 14px; }
h3 { margin: 0; font-size: 1.1rem; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* Header: white "Tollino" on a green motorway-sign plate with an inset white border */
.top { padding: 22px 0 6px; }
.top .wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sign { background: var(--green); border-radius: 10px; padding: 3px; display: inline-block; }
.sign span { display: block; border: 1.5px solid #fff; border-radius: 7px; padding: 2px 14px;
  color: #fff; font-weight: 400; font-size: 1.75rem; letter-spacing: .02em; }
.sign b { font-weight: 600; }   /* "Toll" semibold, "ino" regular: system fonts (Segoe UI, San Francisco) are heavier than the app's Roboto, so 600 here looks like the app's 700 */
.tagline { margin: 0; color: var(--muted); }

.intro { margin: 24px 0 22px; max-width: 760px; }
.intro p { margin: 0; font-size: 1.05rem; }

.map { height: 420px; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.map-note { margin: 8px 2px 0; font-size: .85rem; color: var(--muted); }
.maplibregl-popup-content { background: var(--surface); color: var(--text); border-radius: 12px; font: inherit; font-size: .9rem; }
.maplibregl-popup-tip { border-top-color: var(--surface) !important; border-bottom-color: var(--surface) !important; }

/* Road cards */
.roads { display: grid; gap: 16px; }
.road { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.road-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.shields { display: flex; gap: 6px; }
.shield { background: var(--green); color: #fff; font-weight: 700; border-radius: 8px; padding: 4px 9px; font-size: .95rem; }
.road-head h3 { flex: 1; min-width: 160px; }
.status { border-radius: 999px; padding: 4px 12px; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.status.ok { background: rgba(11, 122, 62, .14); background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.status.warn { background: rgba(230, 81, 0, .15); background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); }
.status.bad { background: rgba(198, 40, 40, .15); background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); }
.status.na { background: var(--surface-2); color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.stat { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.stat .k { font-size: .78rem; color: var(--muted); }
.stat .v { font-size: 1.2rem; font-weight: 700; }
.stat .c { font-size: .78rem; color: var(--muted); }

.incidents { list-style: none; padding: 0; margin: 0 0 14px; border-top: 1px solid var(--line); }
.incidents li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; flex: none; }
.inc-title { font-weight: 600; }
.inc-title .delay { float: right; font-size: .85rem; }
.inc-sub { font-size: .875rem; color: var(--muted); overflow-wrap: anywhere; }
.inc-time { font-size: .78rem; color: var(--muted); opacity: .85; }

.how { font-size: .92rem; margin: 0 0 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; border-radius: 12px; padding: 10px 16px; font-weight: 600; font-size: .95rem; }
.btn.primary { background: var(--green); color: #fff; }
.btn.secondary { border: 1px solid var(--line); color: var(--text); background: var(--surface); }
.btn:hover { filter: brightness(1.06); }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.contract { max-width: 760px; }
.providers a { margin-right: 14px; font-weight: 600; }

/* App + QR */
.app { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-top: 40px; }
.app-text { flex: 1 1 340px; }
.app h2 { margin-top: 0; }
.checks { padding: 0; list-style: none; }
.checks li { padding-left: 26px; position: relative; margin: 8px 0; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.play { display: inline-flex; align-items: center; min-height: 44px; background: #111; color: #fff; text-decoration: none; padding: 10px 18px; border-radius: 10px; font-weight: 600; }
.soon { margin-left: 8px; font-size: .85rem; background: var(--surface-2); padding: 3px 10px; border-radius: 999px; color: var(--muted); }
.qr { margin: 0 auto; text-align: center; }
#qr { background: #fff; padding: 12px; border-radius: 14px; width: 200px; height: 200px; }
#qr svg { width: 100%; height: 100%; display: block; }
.qr figcaption { margin-top: 8px; font-size: .85rem; color: var(--muted); }

.foot { margin-top: 40px; padding-top: 18px; padding-bottom: 40px; border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); }
.foot p { margin: 6px 0; }
.foot strong { color: var(--text); }
.play.off { opacity: .55; cursor: default; }

/* Map without WebGL2 (older phones) or when it failed to load */
.map-fallback { margin: 0; height: 100%; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 24px; color: var(--muted); font-size: .95rem; }
.providers a { display: inline-flex; align-items: center; min-height: 44px; }
.foot a { display: inline-block; padding: 4px 0; }

/* Phones */
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .top { padding-top: 16px; }
  .sign span { font-size: 1.5rem; padding: 1px 12px; }
  .tagline { font-size: .95rem; }
  .intro p { font-size: 1rem; }
  h2 { margin-top: 32px; }
  .map { height: 320px; border-radius: 14px; }
  .road { padding: 16px; border-radius: 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 9px 10px; }
  .stat .v { font-size: 1.05rem; }
  .actions .btn { flex: 1 1 auto; justify-content: center; }
  .app { padding: 18px; gap: 18px; }
}
/* Very narrow phones (320 px) */
@media (max-width: 360px) {
  .status { font-size: .78rem; padding: 3px 9px; }
  .stats { grid-template-columns: 1fr; }
}
