:root {
  --bg: #07090d;
  --panel: #121820;
  --panel2: #1a222d;
  --text: #eef3f8;
  --muted: #8b9bb0;
  --accent: #00a3e0;
  --accent2: #ff6b00;
  --excel-red: #e30613;
  --excel-yellow: #ffd200;
  --excel-blue: #0057b8;
  --nankang: #c41230;
  --ok: #2ecc71;
  --warn: #f1c40f;
  --danger: #e74c3c;
  --radius: 14px;
  --nav-h: 68px;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Barlow Condensed", "DM Sans", system-ui, sans-serif;
  font-family: var(--font);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); min-height: 100%; }
body {
  padding-bottom: calc(var(--nav-h) + 16px);
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, rgba(227, 6, 19, 0.18), transparent 55%),
    radial-gradient(ellipse 80% 40% at 100% 20%, rgba(0, 163, 224, 0.12), transparent 50%),
    radial-gradient(ellipse 70% 40% at 0% 80%, rgba(255, 210, 0, 0.08), transparent 45%),
    var(--bg);
}
.hidden { display: none !important; }

/* Auth */
#auth-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(7,9,13,.55) 0%, rgba(7,9,13,.94) 75%),
    url("../assets/photos/nankang-2026/hero-grid.jpg") center/cover no-repeat;
}
.auth-card {
  width: min(420px, 100%);
  background: rgba(20, 27, 36, 0.92);
  border: 1px solid rgba(255, 210, 0, 0.25);
  border-radius: 18px;
  padding: 24px 22px 28px;
  box-shadow: 0 20px 50px rgba(0,0,0,.55), 0 0 0 1px rgba(227,6,19,.15);
  backdrop-filter: blur(12px);
}
.auth-logo {
  display: block;
  width: min(280px, 100%);
  height: auto;
  margin: 0 auto 12px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.5));
}
.brand {
  font-weight: 800;
  letter-spacing: .02em;
  font-size: 1.35rem;
  color: var(--excel-yellow);
  text-align: center;
}
.auth-card h1 { font-size: 1.2rem; margin: 8px 0 6px; text-align: center; }
.muted { color: var(--muted); font-size: .92rem; }
.small { font-size: .8rem; }
input, textarea, select {
  width: 100%;
  background: var(--panel2);
  border: 1px solid #2c3b4f;
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 1rem;
  margin: 8px 0 12px;
}
textarea { min-height: 90px; resize: vertical; }

.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--excel-red), #a0040c);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  margin: 4px 6px 4px 0;
  box-shadow: 0 4px 14px rgba(227, 6, 19, 0.35);
}
.btn.secondary {
  background: linear-gradient(135deg, #2a3648, #1e2a38);
  box-shadow: none;
}
.btn-sm { padding: 8px 12px; font-size: .85rem; }
.btn:active { transform: scale(.98); }

/* App shell */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10,12,16,.9);
  backdrop-filter: blur(12px);
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--excel-red), var(--excel-yellow), var(--excel-blue), var(--accent)) 1;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-logo {
  height: 40px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
}
.auth-logo {
  max-height: 120px;
  object-fit: contain;
  background: transparent;
}
.topbar .brand-sm {
  font-weight: 800;
  color: var(--excel-yellow);
  font-size: .9rem;
  line-height: 1.15;
}
.topbar .brand-sm span {
  display: block;
  font-size: .68rem;
  color: var(--muted);
  font-weight: 600;
}
.offline-pill {
  font-size: .75rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: #1e2a38;
  color: var(--muted);
}
.offline-pill.live { background: #14301f; color: var(--ok); }

main { padding: 16px; max-width: 720px; margin: 0 auto; }
h2 { margin: 0 0 12px; font-size: 1.35rem; }
h3 { margin: 0 0 8px; font-size: 1.05rem; }

/* Heroes */
.hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  min-height: 160px;
  margin-bottom: 14px;
  background: #111 center/cover no-repeat;
  box-shadow: 0 12px 28px rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.08);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.78) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: 18px 16px 16px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero h2, .hero h1 {
  margin: 0 0 4px;
  font-size: 1.45rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.hero p {
  margin: 0;
  color: #d7e2ef;
  font-size: .9rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.hero.sm { min-height: 110px; }
.hero.sm .hero-inner { min-height: 110px; padding: 14px; }
.hero.sm h2 { font-size: 1.2rem; }

.hero-home { background-image: url("../assets/photos/nankang-2026/hero-grid.jpg"); }
.hero-specs { background-image: url("../assets/photos/nankang-2026/nankang-control.jpg"); background-color: #1a1a1a; }
.hero-racing { background-image: url("../assets/photos/nankang-2026/hero-paddock.jpg"); }
.hero-internet { background-image: url("../assets/photos/nankang-2026/hero-action.jpg"); }
.hero-sales { background-image: url("../assets/photos/nankang-2026/nankang-control.jpg"); }
.hero-rules { background-image: url("../assets/photos/nankang-2026/hero-paddock.jpg"); }
.hero-news { background-image: url("../assets/photos/nankang-2026/hero-action.jpg"); }
.hero-ai { background-image: url("../assets/photos/nankang-2026/hero-grid.jpg"); }
.hero-telemetry { background-image: url("../assets/photos/nankang-2026/hero-action.jpg"); }
.hero-pdf { background-image: url("../assets/photos/nankang-2026/nankang-control.jpg"); }
.hero-history { background-image: url("../assets/photos/nankang-2026/hero-grid.jpg"); }
.hero-team { background-image: url("../assets/photos/nankang-2026/hero-paddock.jpg"); }
.hero-gallery { background-image: url("../assets/photos/nankang-2026/hero-grid.jpg"); }
.hero-dso { background-image: url("../assets/photos/nankang-2026/hero-paddock.jpg"); }
.hero-kicker {
  margin: 0 0 4px;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--excel-yellow);
  font-weight: 700;
}
.hero h1, .hero h2, .brand, .brand-sm, .coming-soon-title {
  font-family: var(--font-display);
  letter-spacing: .02em;
  text-transform: uppercase;
}

.gal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.gal-item {
  margin: 0;
  background: #0a1018;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #2a384c;
}
.gal-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.gal-item figcaption {
  padding: 8px 10px;
  font-size: .75rem;
  color: var(--muted);
  line-height: 1.3;
}
.home-live-gallery img { height: 100px; }
@media (min-width: 700px) {
  .gal-grid { grid-template-columns: repeat(3, 1fr); }
  .gal-item img { height: 160px; }
}

.card {
  background: var(--panel);
  border: 1px solid #223041;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.card.highlight {
  border-color: rgba(0, 163, 224, 0.45);
  background: linear-gradient(160deg, #152433, var(--panel));
}
.card.small { padding: 10px 12px; }

.stat-grid, #home-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 12px 0;
}
.stat {
  background: linear-gradient(145deg, var(--panel2), #121820);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  border: 1px solid #243246;
}
.stat .n { display: block; font-size: 1.4rem; font-weight: 800; color: var(--excel-yellow); }
.stat .l { font-size: .78rem; color: var(--muted); }

.home-section-label {
  margin: 18px 0 10px;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}
.home-section-label::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--excel-red), var(--excel-yellow), var(--excel-blue), transparent);
  border-radius: 2px;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.tile {
  background: var(--panel);
  border: 1px solid #243246;
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  font-weight: 700;
  font-size: .92rem;
  color: var(--text);
  position: relative;
  overflow: hidden;
  min-height: 88px;
}
.tile .ico { display: block; font-size: 1.4rem; margin-bottom: 6px; position: relative; z-index: 1; }
.tile.tile-num {
  min-height: 112px;
  border: none;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.7);
  background-size: cover;
  background-position: center;
  box-shadow: 0 8px 18px rgba(0,0,0,.35);
}
.tile.tile-num::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0,0,0,.25), rgba(0,0,0,.72));
  z-index: 0;
}
.tile.tile-num > * { position: relative; z-index: 1; }
.tile.tile-specs { background-image: url("../assets/photos/hero-livery.jpg"); }
.tile.tile-racing { background-image: url("../assets/photos/hero-race.jpg"); }
.tile.tile-internet { background-image: url("../assets/photos/track-aerial.jpg"); }
.tile.tile-sales { background-image: url("../assets/photos/find-1.jpg"); }
.tile.tile-ai { background-image: url("../assets/photos/norwell.jpg"); }
.tile.tile-teams { background-image: url("../assets/photos/team.jpg"); }
.tile.tile-sim {
  background-image:
    linear-gradient(160deg, rgba(7,9,13,.35), rgba(7,9,13,.75)),
    url("../assets/photos/nankang-2026/hero-action.jpg");
  background-size: cover;
  background-position: center;
}
.tile.tile-soon {
  background-image:
    linear-gradient(160deg, rgba(7,9,13,.35), rgba(7,9,13,.75)),
    url("../assets/photos/nankang-2026/hero-grid.jpg");
  background-size: cover;
  background-position: center;
}
.hero-sim {
  background-image: linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,.75)), url("../assets/photos/nankang-2026/hero-grid.jpg");
  background-size: cover;
  background-position: center;
}
.tile.tile-racing {
  background-image:
    linear-gradient(160deg, rgba(7,9,13,.35), rgba(7,9,13,.75)),
    url("../assets/photos/nankang-2026/hero-paddock.jpg");
  background-size: cover;
  background-position: center;
}
.tile.tile-teams {
  background-image:
    linear-gradient(160deg, rgba(7,9,13,.35), rgba(7,9,13,.75)),
    url("../assets/photos/nankang-2026/hero-paddock.jpg");
  background-size: cover;
  background-position: center;
}
.tile.tile-sales {
  background-image:
    linear-gradient(160deg, rgba(7,9,13,.35), rgba(7,9,13,.75)),
    url("../assets/photos/nankang-2026/nankang-control.jpg");
  background-size: cover;
  background-position: center;
}

/* Coming Soon cinematic stage */
.coming-soon-stage {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 72vh;
  margin-bottom: 14px;
  border: 1px solid rgba(255,210,0,.25);
  box-shadow: 0 20px 50px rgba(0,0,0,.55), 0 0 40px rgba(227,6,19,.15);
}
.coming-soon-car {
  width: 100%;
  height: 72vh;
  object-fit: cover;
  display: block;
  transform: scale(1.04);
  animation: carDrift 12s ease-in-out infinite alternate;
}
@keyframes carDrift {
  from { transform: scale(1.04) translateX(0); }
  to { transform: scale(1.08) translateX(-2%); }
}
.coming-soon-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 28px 16px 36px;
  background:
    linear-gradient(180deg, rgba(10,12,16,.15) 0%, rgba(10,12,16,.25) 40%, rgba(10,12,16,.88) 100%);
  text-align: center;
}
.coming-soon-kicker {
  margin: 0;
  font-size: .85rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--excel-yellow);
  font-weight: 800;
}
.coming-soon-title {
  margin: 8px 0 6px;
  font-size: clamp(2.4rem, 10vw, 3.6rem);
  font-weight: 900;
  letter-spacing: .08em;
  color: #fff;
  text-shadow: 0 4px 24px rgba(227,6,19,.65), 0 0 2px #000;
  animation: soonGlow 2.4s ease-in-out infinite;
}
@keyframes soonGlow {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 8px rgba(227,6,19,.4)); }
  50% { opacity: .88; filter: drop-shadow(0 0 22px rgba(255,210,0,.55)); }
}
.coming-soon-sub {
  margin: 0;
  color: #d7e2ef;
  font-size: .95rem;
  max-width: 28rem;
}
.coming-soon-pulse {
  margin-top: 16px;
  width: 48px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--excel-red), var(--excel-yellow), var(--excel-blue));
  animation: pulseBar 1.6s ease-in-out infinite;
}
@keyframes pulseBar {
  0%, 100% { transform: scaleX(.7); opacity: .7; }
  50% { transform: scaleX(1.15); opacity: 1; }
}

/* Sim hub */
.sim-tagline {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--excel-yellow);
  margin: 0 0 12px;
}
.sim-banner {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid #2a384c;
}
.sim-banner img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.sim-banner-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 12px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  font-weight: 700;
  font-size: .9rem;
}
.sim-steps { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.sim-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px;
  border-radius: 12px;
  background: var(--panel2);
  border: 1px solid #243246;
}
.sim-step-n {
  flex: 0 0 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--excel-red);
  color: #fff;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sim-map-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}
.sim-map-arrow { color: var(--excel-yellow); font-weight: 900; text-align: center; }
.sim-cta {
  border-color: rgba(255,210,0,.35);
  background: linear-gradient(160deg, #1a1520, var(--panel));
}
@media (max-width: 520px) {
  .sim-map-row { grid-template-columns: 1fr; }
  .sim-map-arrow { display: none; }
  .coming-soon-stage, .coming-soon-car { min-height: 58vh; height: 58vh; }
}

.brand-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.brand-pill {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  background: #1a2430;
  border: 1px solid #2c3b4f;
  color: var(--excel-yellow);
}
.home-brands { justify-content: center; }
.brands-card .brand-pill { color: var(--text); }

.pressure-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.pressure-grid input { margin: 0; }

.offline-banner {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(90deg, #8b0000, #c0392b);
  color: #fff;
  text-align: center;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .03em;
  padding: 8px 12px;
}
body.telemetry-offline .topbar {
  border-image: linear-gradient(90deg, #e74c3c, #c0392b, #e74c3c) 1;
}

.tile .num {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: .72rem;
  font-weight: 900;
  color: #111;
  background: var(--excel-yellow);
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  z-index: 2;
  text-shadow: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.tile:active { transform: scale(.98); border-color: var(--accent); }

/* Photo gallery strip */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0 4px;
}
.gallery img {
  width: 100%;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #2a384c;
  display: block;
  background: #111;
}
.gallery.wide img { height: 110px; }
.gallery.wide { grid-template-columns: repeat(2, 1fr); }

.photo-banner {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  margin-bottom: 12px;
  border: 1px solid #2a384c;
}

.row { display: flex; gap: 12px; align-items: flex-start; }
.car-num {
  background: linear-gradient(135deg, var(--excel-yellow), #e0a800);
  color: #111;
  font-weight: 900;
  border-radius: 8px;
  padding: 6px 8px;
  min-width: 48px;
  text-align: center;
}
.badge {
  margin-left: auto;
  font-size: .75rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
}
.badge.ok { background: #1a3a28; color: var(--ok); }
.badge.warn { background: #3a3214; color: var(--warn); }

.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { padding: 10px 0; border-bottom: 1px solid #1e2a38; }
.link-list a { color: var(--accent); font-weight: 700; text-decoration: none; }

#log-status { font-weight: 800; letter-spacing: .04em; }
#log-status.live { color: var(--danger); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .55; } }

#live-telemetry {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .85rem;
  background: #0a1018;
  border-radius: 10px;
  padding: 12px;
  min-height: 72px;
}

.ai-answer { line-height: 1.45; white-space: normal; }
#pdf-frame {
  width: 100%;
  height: 70vh;
  border: 1px solid #2a384c;
  border-radius: 12px;
  background: #000;
}

.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(10,12,16,.97);
  border-top: 1px solid #1e2a38;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 30;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -8px 24px rgba(0,0,0,.35);
}
.nav-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: .62rem;
  font-weight: 700;
  padding: 6px 4px;
  cursor: pointer;
}
.nav-btn.active { color: var(--excel-yellow); }
.nav-btn .ico { display: block; font-size: 1.15rem; margin-bottom: 2px; }

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 18px);
  transform: translateX(-50%) translateY(20px);
  background: #222e3f;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: .25s;
  z-index: 50;
  max-width: 90%;
  text-align: center;
  font-size: .9rem;
  border: 1px solid rgba(255,210,0,.25);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

ul { padding-left: 1.1rem; }

.stripe {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--excel-red), var(--excel-yellow), #2ecc71, var(--excel-blue), var(--accent));
  margin: 0 0 14px;
}

@media (min-width: 700px) {
  .home-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-grid, #home-stats { grid-template-columns: repeat(4, 1fr); }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .gallery img { height: 100px; }
}

/* —— DSO Command Centre (QRDC R3) —— */
.dso-mode-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 10px 12px;
  background: linear-gradient(90deg, rgba(227,6,19,.95), rgba(120,10,20,.92));
  border-bottom: 1px solid rgba(255,210,0,.35);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  position: sticky;
  top: 52px;
  z-index: 18;
}
.dso-mode-banner strong {
  background: #fff;
  color: #e30613;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: .72rem;
}
.dso-banner-text { flex: 1 1 140px; color: #fff; line-height: 1.3; }
.dso-banner-btn { margin: 0 !important; padding: 8px 12px !important; background: #111 !important; box-shadow: none !important; }
.dso-pulse {
  width: 10px; height: 10px; border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 0 0 rgba(46,204,113,.7);
  animation: dso-pulse 1.6s infinite;
}
@keyframes dso-pulse {
  0% { box-shadow: 0 0 0 0 rgba(46,204,113,.55); }
  70% { box-shadow: 0 0 0 10px rgba(46,204,113,0); }
  100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); }
}
.hero-dso {
  background:
    linear-gradient(180deg, rgba(10,12,16,.35) 0%, rgba(10,12,16,.88) 100%),
    url("../assets/photos/hero-race.jpg") center/cover no-repeat;
  min-height: 140px;
}
.dso-home-grid .tile-dso {
  border: 1px solid rgba(227,6,19,.45);
  background: linear-gradient(160deg, rgba(227,6,19,.22), rgba(20,27,36,.95));
}
.dso-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 12px 8px;
}
.dso-big {
  flex: 1 1 140px;
  min-height: 52px;
  font-size: 1rem !important;
}
.dso-voice-btn {
  width: 100%;
  min-height: 56px;
  font-size: 1.05rem !important;
  margin-bottom: 10px !important;
}
.dso-voice-btn.listening {
  background: linear-gradient(135deg, #c0392b, #e74c3c) !important;
  animation: dso-pulse 1s infinite;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}
.chip {
  appearance: none;
  border: 1px solid #2c3b4f;
  background: var(--panel2);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  min-height: 44px;
}
.chip-sm { padding: 8px 12px; min-height: 40px; font-size: .8rem; }
.chip.active {
  border-color: var(--excel-red);
  background: rgba(227,6,19,.25);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(227,6,19,.4);
}
.dso-sched-list { list-style: none; padding: 0; margin: 0; }
.dso-sched-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(44,59,79,.6);
  font-size: .92rem;
}
.dso-time { color: var(--excel-yellow); font-weight: 800; margin-right: 6px; }
.dso-tag {
  display: inline-block;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 6px;
  border-radius: 4px;
  background: #2a3648;
  color: var(--muted);
}
.dso-tag-race { background: rgba(227,6,19,.25); color: #ffb4b8; }
.dso-tag-briefing { background: rgba(0,163,224,.2); color: #8fdfff; }
.dso-tag-dso { background: rgba(255,210,0,.15); color: var(--excel-yellow); }
.dso-report-out {
  white-space: pre-wrap;
  background: #0d1218;
  border: 1px solid #2c3b4f;
  border-radius: 10px;
  padding: 12px;
  font-size: .78rem;
  max-height: 360px;
  overflow: auto;
  margin-top: 12px;
}
.dso-report-actions { margin-top: 8px; }
.dso-anchor { scroll-margin-top: 120px; }
.timing-paste { min-height: 160px; font-family: ui-monospace, Menlo, monospace; font-size: .85rem; }
.rookie-list { padding-left: 1.1rem; line-height: 1.45; }
.rookie-list li { margin: 8px 0; }
.ai-tips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.ai-answer { line-height: 1.45; }

/* Journey logger */
.journey-speed-readout {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  margin: 8px 0 4px;
}
.journey-speed-readout .unit { font-size: 1rem; color: var(--muted); margin-left: 6px; font-weight: 700; }
#journey-speed.spd-ok { color: var(--ok); }
#journey-speed.spd-warn { color: var(--warn); }
#journey-speed.spd-over { color: var(--danger); }
#journey-limit-readout { text-align: center; margin-bottom: 8px; }
.journey-speed-banner {
  margin: 0 12px 10px;
  padding: 12px;
  border-radius: 12px;
  font-weight: 800;
  text-align: center;
}
.journey-speed-banner.warn { background: rgba(241,196,15,.2); border: 1px solid var(--warn); color: var(--warn); }
.journey-speed-banner.over { background: rgba(231,76,60,.25); border: 1px solid var(--danger); color: #ffb4b8; }
.journey-stats { margin: 10px 0; }
body.journey-active .dso-mode-banner { top: 52px; }

/* ===== v3: tiers, menu, news ticker ===== */
.auth-card-v3 { max-width: 460px; }
.auth-kicker {
  text-align: center;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--excel-yellow);
  margin: 0 0 8px;
  font-weight: 700;
}
.tier-pick {
  display: grid;
  gap: 8px;
  margin: 14px 0 12px;
}
.tier-card {
  text-align: left;
  background: var(--panel2);
  border: 1px solid #2c3b4f;
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 2px;
}
.tier-card strong { font-size: .95rem; }
.tier-card.active {
  border-color: var(--excel-yellow);
  box-shadow: 0 0 0 1px rgba(255,210,0,.35), 0 8px 24px rgba(227,6,19,.2);
  background: linear-gradient(145deg, #1c2836, #15202b);
}
.tier-badge {
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--excel-yellow);
}
.tier-pill {
  font-size: .68rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  background: #1e2a38;
  color: var(--excel-yellow);
  white-space: nowrap;
}
.tier-pill[data-tier="admin"] { background: rgba(227,6,19,.25); color: #ffb4b8; }
.tier-pill[data-tier="driver"] { background: rgba(0,163,224,.2); color: #8fdfff; }
.tier-pill[data-tier="free"] { background: rgba(46,204,113,.15); color: #8dffb5; }

.menu-toggle {
  background: transparent;
  border: 1px solid #2c3b4f;
  color: var(--text);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-back {
  flex-shrink: 0;
  background: #1e2a38;
  border: 1px solid #2c3b4f;
  color: var(--excel-yellow);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.btn-back:active { transform: scale(.98); }
.tile-sim-hero {
  min-height: 88px;
  border-color: rgba(0, 163, 224, 0.45);
  box-shadow: 0 0 0 1px rgba(0, 163, 224, 0.2);
}
.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 40;
}
.side-menu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(320px, 88vw);
  background: #0e141c;
  border-right: 1px solid #2a384c;
  z-index: 50;
  padding: 14px 12px 24px;
  overflow-y: auto;
  box-shadow: 12px 0 40px rgba(0,0,0,.5);
}
.side-menu-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #243246;
}
.side-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.side-menu-nav button {
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 11px 10px;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
}
.side-menu-nav button:hover,
.side-menu-nav button:active {
  background: var(--panel2);
}
.side-menu-nav hr {
  border: none;
  border-top: 1px solid #243246;
  margin: 8px 0;
}
.side-menu-foot { margin-top: 16px; padding: 0 8px; }

.news-ticker-wrap {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 12px 0 4px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(227,6,19,.35);
  background: #0d1218;
}
.news-ticker-label {
  flex: 0 0 auto;
  background: linear-gradient(135deg, var(--excel-red), #a0040c);
  color: #fff;
  font-weight: 900;
  font-size: .7rem;
  letter-spacing: .08em;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  font-family: var(--font-display);
}
.news-ticker {
  flex: 1;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.news-ticker-track {
  display: flex;
  gap: 0;
  white-space: nowrap;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  padding: 10px 0;
}
.news-ticker-track span {
  padding-right: 3rem;
}
.news-ticker-track.is-rolling {
  animation: ticker-roll 42s linear infinite;
}
@keyframes ticker-roll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.news-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.news-source {
  font-size: .72rem;
  font-weight: 800;
  color: var(--excel-yellow);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.news-region {
  font-size: .68rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: #1e2a38;
  color: var(--muted);
  font-weight: 700;
}
.upgrade-cta h3 { color: var(--excel-yellow); }

/* Company CI */
.ci-logo-row {
  display: flex;
  justify-content: center;
  margin: 4px 0 10px;
}
.ci-logo-main {
  width: min(340px, 92%);
  height: auto;
  max-height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.45));
}
.ci-note {
  text-align: center;
  margin: 0 0 12px;
  line-height: 1.4;
}
.google-admin-btn {
  display: flex;
  justify-content: center;
  min-height: 44px;
  margin: 8px 0;
}
#auth-google-block {
  margin-top: 4px;
}
.auth-brands {
  justify-content: center;
  margin-top: 12px;
  max-height: 120px;
  overflow: auto;
}
.auth-brands .brand-pill {
  font-size: .68rem;
  padding: 4px 8px;
}
.brand-pill[title] { cursor: help; }

body.tier-free [data-tier-min="driver"],
body.tier-free [data-tier-min="admin"],
body.tier-driver [data-tier-min="admin"] {
  /* applied via JS .hidden as well */
}

/* Bottom nav: 6 items — slightly tighter */
.bottom-nav {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}
.bottom-nav .nav-btn {
  font-size: .62rem;
  padding: 6px 2px;
  min-height: 56px;
}
.bottom-nav .nav-btn .ico { font-size: 1.15rem; display: block; margin-bottom: 2px; }

@media (min-width: 720px) {
  .dso-mode-banner { font-size: .85rem; }
  .journey-speed-readout { font-size: 4rem; }
}
