/* Due SP · public Metro/CPTM status page */
:root {
  --bg0: #070B16;
  --bg1: #0B1224;
  --panel: rgba(255, 255, 255, .055);
  --panel2: rgba(255, 255, 255, .09);
  --border: rgba(255, 255, 255, .10);
  --text: rgba(255, 255, 255, .94);
  --muted: rgba(255, 255, 255, .70);
  --muted2: rgba(255, 255, 255, .50);

  --brand: #E11D48;
  --brand2: #3B82F6;

  --normal: #22C55E;
  --warning: #F59E0B;
  --critical: #EF4444;
  --closed: #8B9BB4;
  --nodata: rgba(255, 255, 255, .14);

  --radius: 18px;
  --shadow: 0 18px 60px rgba(0, 0, 0, .5);
  --max: 1160px;
  --display: "Baloo 2", ui-rounded, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg0), var(--bg1) 60%, var(--bg0));
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.01em; line-height: 1.1; margin: 0; }
[hidden] { display: none !important; }

.wrap { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--brand2); outline-offset: 2px; border-radius: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--panel); font-weight: 700; cursor: pointer; text-decoration: none;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, opacity .2s;
}
.btn:hover { background: var(--panel2); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, #F43F5E, #E11D48); border-color: transparent; box-shadow: 0 8px 24px rgba(225, 29, 72, .35); }
.btn-primary:hover { background: linear-gradient(135deg, #FB7185, #E11D48); }
.btn-ghost { background: transparent; }
.btn-small { padding: 8px 14px; font-size: 14px; border-radius: 12px; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn.spin svg { animation: spin .8s linear infinite; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 11, 22, .72); border-bottom: 1px solid rgba(255, 255, 255, .07);
  padding-top: env(safe-area-inset-top);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 22px; }
.brand img { width: 40px; height: 40px; border-radius: 11px; }
.live-pill {
  display: inline-flex; align-items: center; gap: 6px; font: 700 11px/1 system-ui, sans-serif; text-transform: uppercase; letter-spacing: .08em;
  padding: 5px 8px; border-radius: 99px; background: rgba(239, 68, 68, .16); color: #FCA5A5; border: 1px solid rgba(239, 68, 68, .35);
}
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: #EF4444; animation: blink 1.6s ease-in-out infinite; }
nav { display: flex; gap: 4px; }
nav a { text-decoration: none; color: var(--muted); font-weight: 600; padding: 8px 12px; border-radius: 10px; font-size: 15px; }
nav a:hover { color: var(--text); background: var(--panel); }
@media (max-width: 820px) { nav { display: none; } }
@media (max-width: 420px) { .live-pill { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 44px 0 92px; isolation: isolate; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 11, 22, .55) 0%, rgba(7, 11, 22, .82) 55%, var(--bg0) 100%),
    url("/assets/web/bg-luz-night.jpg") center 35% / cover no-repeat;
  animation: kenburns 30s ease-in-out infinite alternate;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(700px 380px at 20% 30%, var(--hero-glow, rgba(59, 130, 246, .18)), transparent 70%);
  transition: background .6s ease;
}
.eyebrow { margin: 0 0 12px; color: var(--muted); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; }

.hero-status { display: flex; align-items: center; gap: 20px; }
.hero-status h1 { font-size: clamp(30px, 5.4vw, 56px); font-weight: 800; }
.hero-sub { margin: 8px 0 0; color: var(--muted); font-size: clamp(15px, 2vw, 18px); max-width: 640px; }
.hero-icon { position: relative; flex: 0 0 auto; width: clamp(64px, 10vw, 96px); aspect-ratio: 1; display: grid; place-items: center; }
.hero-icon svg { position: absolute; inset: 0; width: 100%; height: 100%; display: none; fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.hero-icon svg circle { stroke-width: 3; }
.hero-icon .dot { fill: currentColor; stroke: none; }
.hero-icon::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--lvl, transparent); opacity: .18; transform: scale(1);
}
.hero-status[data-level="normal"]   { --lvl: var(--normal); }
.hero-status[data-level="warning"]  { --lvl: var(--warning); }
.hero-status[data-level="critical"] { --lvl: var(--critical); }
.hero-status[data-level="closed"]   { --lvl: var(--closed); }
.hero-status[data-level="unknown"]  { --lvl: var(--closed); }
.hero-status[data-level="unknown"] .i-warn,
.hero-status[data-level="normal"] .i-ok,
.hero-status[data-level="warning"] .i-warn,
.hero-status[data-level="critical"] .i-crit,
.hero-status[data-level="closed"] .i-closed { display: block; color: var(--lvl); stroke: var(--lvl); }
.hero-status[data-level="normal"] .i-ok path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .7s .2s ease forwards; }
.hero-status[data-level="warning"] .hero-icon::before,
.hero-status[data-level="critical"] .hero-icon::before { animation: ripple 1.8s ease-out infinite; }
.hero-status[data-level="critical"] .hero-icon svg { animation: shake 3.5s ease-in-out infinite; }
.spinner { display: none; width: 60%; height: 60%; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .15); border-top-color: var(--brand2); animation: spin .9s linear infinite; }
.hero-status[data-level="loading"] .spinner { display: block; }
.hero-status[data-level="loading"] .hero-icon::before { background: var(--brand2); }

/* Network strip: every line at a glance */
.network { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0 26px; min-height: 52px; }
.net-dot {
  position: relative; width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  background: var(--c); color: #fff; font: 800 18px/1 var(--display); text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(255, 255, 255, .12);
  animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(var(--i) * 40ms);
  transition: transform .15s ease;
}
.net-dot.dark-text { color: #1a1a1a; }
.net-dot:hover { transform: translateY(-3px); }
.net-dot .badge {
  position: absolute; right: -6px; top: -6px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; border: 2.5px solid var(--bg0); background: var(--lv);
}
.net-dot .badge svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.net-dot[data-level="warning"], .net-dot[data-level="critical"] { animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both, glow 1.8s ease-in-out infinite; animation-delay: calc(var(--i) * 40ms), 0s; }
.net-dot[data-level="closed"] { filter: saturate(.35) brightness(.75); }
.net-sep { width: 1px; align-self: stretch; background: var(--border); margin: 0 4px; }

.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.updated { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 12px; border-radius: 16px; background: rgba(0, 0, 0, .35); border: 1px solid var(--border); }
.updated strong { display: block; font-size: 17px; }
.updated small { color: var(--muted); font-size: 13px; }
.clock { position: relative; width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid var(--muted); flex: 0 0 auto; }
.clock::before, .clock::after { content: ""; position: absolute; left: 50%; bottom: 50%; width: 2.5px; background: var(--text); border-radius: 2px; transform-origin: bottom center; }
.clock::before { height: 11px; margin-left: -1.25px; animation: spin 6s linear infinite; }
.clock::after { height: 7px; margin-left: -1.25px; animation: spin 72s linear infinite; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 99px; background: rgba(0, 0, 0, .3); border: 1px solid var(--border); font-weight: 700; font-size: 14px; }
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--lv); }
.chip b { font-variant-numeric: tabular-nums; }
.stale-banner { margin-top: 16px; padding: 12px 16px; border-radius: 14px; background: rgba(245, 158, 11, .14); border: 1px solid rgba(245, 158, 11, .4); color: #FDE68A; font-weight: 600; }

/* Animated train */
.track { position: absolute; left: 0; right: 0; bottom: 26px; height: 34px; pointer-events: none; }
.rail { position: absolute; left: 0; right: 0; bottom: 4px; height: 4px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .22) 0 18px, transparent 18px 26px); }
.train { position: absolute; bottom: 9px; left: 0; display: flex; gap: 4px; animation: ride 14s linear infinite; }
.car { width: 74px; height: 22px; border-radius: 6px; background: linear-gradient(180deg, #E5E7EB, #9CA3AF); position: relative; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
.car::before { content: ""; position: absolute; left: 8px; right: 8px; top: 5px; height: 7px; border-radius: 2px; background: repeating-linear-gradient(90deg, #1E3A8A 0 12px, transparent 12px 16px); }
.car::after { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 3px; background: var(--train-stripe, var(--brand)); }
.car.head { border-radius: 6px 16px 6px 6px; }
.car.head::before { right: 14px; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .025) 20%, rgba(255, 255, 255, .025) 80%, transparent); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.section-head p { margin: 6px 0 0; color: var(--muted); }
.segmented { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); }
.segmented button { border: 0; background: transparent; padding: 8px 14px; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.segmented button.active { background: rgba(255, 255, 255, .12); color: var(--text); }
.segmented b { min-width: 22px; padding: 1px 6px; border-radius: 99px; background: var(--critical); color: #fff; font-size: 12px; }
.segmented b.zero { background: rgba(255, 255, 255, .15); }

.group-title { display: flex; align-items: center; gap: 10px; font-size: 22px; margin: 26px 0 14px; }
.g-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; font: 800 16px/1 var(--display); }
.g-icon.metro { background: #0455A1; }
.g-icon.cptm { background: #CA016B; }

/* Line cards */
.lines-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
@media (max-width: 380px) { .lines-grid { grid-template-columns: 1fr; } }
.line-card {
  --c: #64748B;
  position: relative; overflow: hidden; border-radius: var(--radius); padding: 16px 16px 14px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 22%, transparent), rgba(255, 255, 255, .03) 65%);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  transition: transform .2s ease, box-shadow .2s ease;
  animation: rise .5s ease both; animation-delay: calc(var(--i, 0) * 35ms);
}
.line-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
.line-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.line-card[data-level="warning"]  { box-shadow: 0 0 0 2px rgba(245, 158, 11, .55), 0 10px 40px rgba(245, 158, 11, .15); }
.line-card[data-level="critical"] { box-shadow: 0 0 0 2px rgba(239, 68, 68, .7), 0 10px 40px rgba(239, 68, 68, .22); }
.line-card[data-level="closed"] { filter: saturate(.6); }
.line-card.flash { animation: flash 1.4s ease 2; }
.line-card.skeleton { min-height: 150px; border-color: var(--border); background: linear-gradient(100deg, var(--panel) 30%, rgba(255, 255, 255, .1) 50%, var(--panel) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
.line-card.skeleton::before { display: none; }

.lc-top { display: flex; align-items: center; gap: 12px; }
.lc-badge { flex: 0 0 auto; min-width: 46px; height: 34px; padding: 0 8px; border-radius: 10px; display: grid; place-items: center; background: var(--c); color: #fff; font: 800 17px/1 var(--display); }
.lc-badge.dark-text { color: #1a1a1a; }
.lc-name { flex: 1; min-width: 0; }
.lc-name strong { display: block; font: 800 22px/1.1 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-name small { color: var(--muted2); font-size: 12.5px; }
.bell {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: rgba(0, 0, 0, .25);
  display: grid; place-items: center; cursor: pointer; color: var(--muted); transition: all .2s ease;
}
.bell svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bell:hover { color: var(--text); background: rgba(255, 255, 255, .08); }
.bell.on { color: #FDE68A; border-color: rgba(253, 230, 138, .5); background: rgba(253, 230, 138, .12); }
.bell.on svg { fill: currentColor; animation: ring .6s ease; }

.lc-status { display: flex; align-items: center; gap: 8px; margin: 14px 0 4px; font-weight: 800; font-size: 18px; color: var(--lv); }
.lc-status .ico { width: 24px; height: 24px; border-radius: 50%; background: var(--lv); display: grid; place-items: center; flex: 0 0 auto; }
.lc-status .ico svg { width: 13px; height: 13px; fill: none; stroke: #fff; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.line-card[data-level="warning"] .lc-status .ico,
.line-card[data-level="critical"] .lc-status .ico { animation: pulse 1.6s ease-in-out infinite; }
.lc-detail { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.lc-since { margin: 6px 0 0; color: var(--muted2); font-size: 13px; }

.lc-history { margin-top: 14px; }
.lc-history-head { display: flex; justify-content: space-between; color: var(--muted2); font-size: 12px; margin-bottom: 6px; }
.lc-history-head b { color: var(--muted); }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.bar { height: 22px; border-radius: 5px; background: var(--lv); opacity: .9; position: relative; transform-origin: bottom; animation: grow .5s ease both; animation-delay: calc(var(--d) * 50ms + 150ms); }
.bar[data-level="nodata"] { opacity: 1; }
.bar:hover { opacity: 1; outline: 2px solid rgba(255, 255, 255, .6); }
.bar-labels { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 4px; font-size: 10.5px; color: var(--muted2); text-align: center; text-transform: uppercase; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; color: var(--muted); font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.lv { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.lv.normal, [data-level="normal"] { --lv: var(--normal); }
.lv.warning, [data-level="warning"] { --lv: var(--warning); }
.lv.critical, [data-level="critical"] { --lv: var(--critical); }
.lv.closed, [data-level="closed"] { --lv: var(--closed); }
.lv.nodata, [data-level="nodata"], [data-level="unknown"] { --lv: var(--nodata); }
.lv { background: var(--lv); }
.empty-filter { text-align: center; padding: 26px; color: var(--muted); font-size: 18px; border: 1px dashed var(--border); border-radius: var(--radius); }

/* ---------- Incidents ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 26px; }
.stat { padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); }
.stat b { display: block; font: 800 clamp(26px, 6vw, 34px)/1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat span { color: var(--muted); font-size: 14px; }
.stat.hl b { color: var(--warning); }

.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 25px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--border), transparent); }
.tl-item { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 0 0 18px; animation: rise .45s ease both; animation-delay: calc(var(--i, 0) * 40ms); }
.tl-badge { position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--c); font: 800 17px/1 var(--display); color: #fff; text-decoration: none; box-shadow: 0 0 0 4px var(--bg0); }
.tl-badge.dark-text { color: #1a1a1a; }
.tl-body { padding: 12px 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--border); border-left: 4px solid var(--lv); }
.tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tl-head strong { font-size: 16px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 800; background: color-mix(in srgb, var(--lv) 22%, transparent); color: var(--lv); }
.tag.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink 1.2s ease-in-out infinite; }
.tag.done { --lv: var(--normal); }
.tl-detail { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.tl-time { margin: 6px 0 0; color: var(--muted2); font-size: 13px; font-variant-numeric: tabular-nums; }
.tl-empty { padding: 28px; text-align: center; border-radius: var(--radius); border: 1px dashed var(--border); color: var(--muted); }
.tl-empty span { display: block; font-size: 40px; margin-bottom: 6px; }
#moreIncidents { display: flex; margin: 6px auto 0; }

/* ---------- Alerts ---------- */
.alerts { display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .alerts { grid-template-columns: 1fr; } }
.alerts-copy h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin-top: 14px; }
.alerts-copy p { color: var(--muted); font-size: 17px; }
.bell-big { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(135deg, #FBBF24, #F59E0B); box-shadow: 0 12px 30px rgba(245, 158, 11, .35); }
.bell-big svg { width: 32px; height: 32px; fill: none; stroke: #1F1300; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transform-origin: 50% 10%; animation: ring 2.8s ease-in-out infinite; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; }
.ticks li { padding-left: 30px; position: relative; color: var(--muted); }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: rgba(34, 197, 94, .18); color: var(--normal); display: grid; place-items: center; font-weight: 900; font-size: 12px; }

.alerts-card { padding: 20px; border-radius: 22px; background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03)); border: 1px solid var(--border); box-shadow: var(--shadow); }
.alerts-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.alert-state { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .08); color: var(--muted); }
.alert-state.on { background: rgba(34, 197, 94, .16); color: #86EFAC; }
.line-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pick {
  --c: #64748B; display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 12px; cursor: pointer; text-align: left;
  border: 1px solid var(--border); background: rgba(0, 0, 0, .2); font-weight: 700; font-size: 14px; transition: all .15s ease;
}
.pick .sw { width: 30px; height: 24px; border-radius: 7px; background: var(--c); display: grid; place-items: center; font: 800 13px/1 var(--display); color: #fff; flex: 0 0 auto; }
.pick .sw.dark-text { color: #1a1a1a; }
.pick .pn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick .ck { margin-left: auto; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--muted2); display: grid; place-items: center; flex: 0 0 auto; }
.pick[aria-pressed="true"] { border-color: color-mix(in srgb, var(--c) 70%, white 10%); background: color-mix(in srgb, var(--c) 22%, transparent); }
.pick[aria-pressed="true"] .ck { background: var(--normal); border-color: var(--normal); }
.pick[aria-pressed="true"] .ck::after { content: "✓"; color: #fff; font-size: 13px; font-weight: 900; }
.alerts-msg { min-height: 22px; margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.alerts-msg.err { color: #FCA5A5; }
.alerts-msg.ok { color: #86EFAC; }
.alerts-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.ios-hint { display: flex; gap: 12px; margin-top: 16px; padding: 14px; border-radius: 16px; background: rgba(59, 130, 246, .1); border: 1px solid rgba(59, 130, 246, .35); }
.ios-hint img { border-radius: 11px; flex: 0 0 auto; }
.ios-hint p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- App promo ---------- */
.promo { position: relative; overflow: hidden; isolation: isolate; padding: 80px 0; }
.promo-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, var(--bg0) 0%, rgba(7, 11, 22, .86) 45%, rgba(7, 11, 22, .55) 100%),
    linear-gradient(180deg, var(--bg0) 0%, transparent 18%, transparent 82%, var(--bg0) 100%),
    url("/assets/web/bg-masp-ponte-night.jpg") center / cover no-repeat;
}
.promo-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 36px; align-items: center; }
@media (max-width: 900px) { .promo-inner { grid-template-columns: 1fr; } }
.promo-copy h2 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; }
.lead { color: var(--muted); font-size: 18px; max-width: 560px; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0; }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }
.feature { display: flex; gap: 12px; padding: 14px; border-radius: 16px; background: rgba(0, 0, 0, .35); border: 1px solid var(--border); backdrop-filter: blur(6px); }
.feature > span { font-size: 26px; line-height: 1; }
.feature strong { display: block; }
.feature small { color: var(--muted); font-size: 13.5px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.appstore { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 14px; border-radius: 14px; background: #fff; color: #000; text-decoration: none; font: 700 20px/1 system-ui, sans-serif; transition: transform .15s ease; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.appstore:hover { transform: translateY(-2px); }
.appstore svg { width: 28px; height: 28px; fill: #000; }
.appstore small { display: block; font-size: 11px; font-weight: 600; margin-bottom: 2px; }
.cta-note { color: var(--muted); font-size: 14px; }

.phones { position: relative; height: 560px; }
.phone { position: absolute; width: 230px; height: auto; border-radius: 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); border: 1px solid rgba(255, 255, 255, .15); }
.phone.p1 { left: 50%; top: 20px; transform: translateX(-50%); z-index: 3; animation: float 6s ease-in-out infinite; }
.phone.p2 { left: 8%; top: 70px; transform: rotate(-8deg); z-index: 2; opacity: .85; animation: float2 7s ease-in-out infinite; }
.phone.p3 { right: 8%; top: 70px; transform: rotate(8deg); z-index: 1; opacity: .85; animation: float3 8s ease-in-out infinite; }
@media (max-width: 900px) { .phones { height: 470px; } .phone { width: 190px; } }
@media (max-width: 520px) { .phones { height: 400px; } .phone { width: 160px; } .phone.p2 { left: 0; } .phone.p3 { right: 0; } }

/* ---------- Footer & toast ---------- */
.footer { border-top: 1px solid var(--border); padding: 32px 0 24px; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
.footer-inner > div:first-child { max-width: 680px; }
.footer strong { color: var(--text); }
.footer-links { display: flex; gap: 16px; }
.footer a { color: var(--text); }
.copy { margin-top: 18px; color: var(--muted2); font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translate(-50%, 140%);
  padding: 12px 18px; border-radius: 14px; background: #111827; border: 1px solid var(--border); box-shadow: var(--shadow);
  font-weight: 600; z-index: 60; transition: transform .35s cubic-bezier(.2, 1.2, .4, 1); max-width: calc(100% - 32px);
}
.toast.show { transform: translate(-50%, 0); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Keyframes ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: .25; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes ripple { 0% { transform: scale(.85); opacity: .45; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes shake { 0%, 86%, 100% { transform: rotate(0); } 88% { transform: rotate(-9deg); } 92% { transform: rotate(9deg); } 96% { transform: rotate(-5deg); } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes glow { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--lv) 55%, transparent), 0 6px 18px rgba(0, 0, 0, .35); } }
@keyframes pulse { 50% { transform: scale(1.18); box-shadow: 0 0 0 6px color-mix(in srgb, var(--lv) 25%, transparent); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes shimmer { to { background-position: -300% 0; } }
@keyframes ring { 0%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-14deg); } 50% { transform: rotate(0); } }
@keyframes flash { 50% { box-shadow: 0 0 0 4px #fff; } }
@keyframes ride { from { transform: translateX(-260px); } to { transform: translateX(calc(100vw + 40px)); } }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.1) translateY(-10px); } }
@keyframes float { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-14px); } }
@keyframes float2 { 0%, 100% { transform: rotate(-8deg) translateY(0); } 50% { transform: rotate(-6deg) translateY(-10px); } }
@keyframes float3 { 0%, 100% { transform: rotate(8deg) translateY(0); } 50% { transform: rotate(6deg) translateY(-12px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .train { display: none; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Line pages (/linha/{slug}/) and shared SEO blocks ---------- */
.lp-hero { padding-top: 36px; background: radial-gradient(800px 360px at 15% 0%, color-mix(in srgb, var(--c) 28%, transparent), transparent 70%); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; color: var(--muted2); font-size: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.lp-hero h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: clamp(32px, 5.5vw, 54px); font-weight: 800; margin-bottom: 24px; }
.lp-hero h1 .lc-badge { min-width: 64px; height: 50px; font-size: 26px; border-radius: 14px; }
.lp-card { max-width: 720px; padding: 20px 22px 18px; }
.lp-card:hover { transform: none; }
.lp-card .lc-status { margin-top: 0; font-size: 24px; }
.lp-card .lc-status .ico { width: 32px; height: 32px; }
.lp-card .lc-status .ico svg { width: 17px; height: 17px; }
.lp-card .lc-detail { font-size: 15.5px; }
.lp-updated { margin: 14px 0 0; color: var(--muted2); font-size: 13px; }
.lp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.lp-sub { font-size: clamp(22px, 3vw, 28px); font-weight: 800; margin-bottom: 14px; }
.lp-about { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .lp-about { grid-template-columns: 1fr; } }
.lp-about h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin-bottom: 14px; }
.lp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 22px 0 0; }
.lp-facts div { padding: 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); }
.lp-facts dt { color: var(--muted2); font-size: 12.5px; }
.lp-facts dd { margin: 2px 0 0; font-weight: 800; }
.stations { list-style: none; margin: 0; padding: 0; position: relative; }
.stations::before { content: ""; position: absolute; left: 9px; top: 12px; bottom: 12px; width: 4px; border-radius: 4px; background: var(--c); }
.stations li { position: relative; display: flex; align-items: center; gap: 8px; padding: 7px 0 7px 32px; }
.stations li::before { content: ""; position: absolute; left: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg0); border: 3px solid var(--c); }
.stations li:first-child .st-name, .stations li:last-child .st-name { font-weight: 800; }
.st-conn { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 7px; background: var(--cc); color: #fff; font: 800 12px/1 var(--display); text-decoration: none; }
.st-conn.dark-text { color: #1a1a1a; }
.lp-faq { max-width: 820px; }
.lp-faq h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin-bottom: 18px; }
.lp-faq details { border: 1px solid var(--border); background: var(--panel); border-radius: 14px; margin-bottom: 10px; }
.lp-faq summary { cursor: pointer; padding: 14px 18px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; color: var(--muted); font-weight: 800; }
.lp-faq details[open] summary::after { content: "−"; }
.lp-faq details p { margin: 0; padding: 0 18px 16px; color: var(--muted); }
.lp-app { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; }
.lp-app h2 { font-size: clamp(26px, 3.5vw, 36px); font-weight: 800; }
.line-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.line-links a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; text-decoration: none; font-weight: 700; background: var(--panel); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.line-links a:hover { background: var(--panel2); }
.line-links a[aria-current="page"] { background: color-mix(in srgb, var(--c) 22%, transparent); }
.line-links .lc-badge { min-width: 38px; height: 28px; font-size: 15px; border-radius: 8px; }
.lv-dot { margin-left: auto; width: 10px; height: 10px; border-radius: 50%; background: var(--lv, var(--nodata)); }
.line-links a[data-level="unknown"] .lv-dot { background: var(--nodata); }
.lines-more { margin-top: 30px; }
.lines-more h3 { font-size: 18px; margin-bottom: 12px; color: var(--muted); }
.lc-name a { text-decoration: none; }
.lc-name a:hover { text-decoration: underline; }

/* ---------- "No busão" announcement (links to /no-busao.html) ---------- */
.nb-banner { display: block; text-decoration: none; background: linear-gradient(90deg, rgba(255, 103, 31, .22), rgba(255, 138, 76, .1)); border-bottom: 1px solid rgba(255, 138, 76, .35); }
.nb-banner:hover { background: linear-gradient(90deg, rgba(255, 103, 31, .3), rgba(255, 138, 76, .16)); }
.nb-banner-inner { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.nb-banner-badge { flex: none; padding: 4px 9px; border-radius: 99px; background: #FF671F; color: #1A1A1A; font: 800 12px/1 var(--display); text-transform: uppercase; letter-spacing: .06em; }
.nb-banner-text { flex: 1; min-width: 0; color: var(--text); font-size: 15px; }
.nb-banner-text strong { font-family: var(--display); font-size: 17px; margin-right: 6px; }
.nb-banner-text span { color: var(--muted); }
.nb-banner-cta { flex: none; color: #FFC9AB; font-weight: 700; font-size: 15px; white-space: nowrap; }
@media (max-width: 620px) { .nb-banner-text span { display: none; } }
@media (max-width: 380px) { .nb-banner-badge { display: none; } }
