/* Tesla Vroom — dark, high-contrast, big touch targets for the Tesla screen */
:root {
  --bg: #0b0f14;
  --card: #141a22;
  --line: #26303c;
  --text: #eef2f6;
  --dim: #8b98a8;
  --accent: #f79728;   /* warm orange — muscle-car vibe */
  --accent2: #e5533b;
  --green: #3fb950;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, "Open Sans", sans-serif;
  -webkit-user-select: none; user-select: none;
}
header {
  padding: 14px 18px 6px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: 0.02em; }
h1 span { color: var(--accent); }
.status { font-size: 0.85rem; color: var(--dim); text-align: right; }
main { max-width: 760px; margin: 0 auto; padding: 8px 14px 40px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}
.card h2 {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--dim); margin-bottom: 10px;
}

/* ---- dashboard ---- */
.dash { text-align: center; padding: 20px 16px 14px; }
.speedwrap { display: inline-flex; align-items: baseline; gap: 8px; }
.speed { font-size: 4.6rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.speedunit { font-size: 1.1rem; color: var(--dim); font-weight: 600; }
.rpmwrap { margin: 14px 8px 4px; }
.rpmbar { height: 10px; border-radius: 6px; background: #202a36; overflow: hidden; }
.rpmfill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--green), var(--accent) 65%, var(--accent2));
  border-radius: 6px;
  transition: width 120ms linear;
}
.rpmnum { margin-top: 6px; font-size: 0.9rem; color: var(--dim); font-variant-numeric: tabular-nums; }

/* ---- profiles ---- */
.profiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 560px) { .profiles { grid-template-columns: repeat(2, 1fr); } }
.profile {
  padding: 12px 10px;
  background: #0e141b;
  border: 2px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-size: 0.95rem; font-weight: 700;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 2px;
  text-align: left;
}
.profile small { font-weight: 500; color: var(--dim); font-size: 0.72rem; }
.profile.selected { border-color: var(--accent); background: #1a1510; }
.profile.selected small { color: var(--accent); }

/* ---- controls ---- */
.row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.btn {
  flex: 1; min-height: 56px; padding: 12px 14px;
  border: 2px solid var(--line); border-radius: 12px;
  background: #0e141b; color: var(--text);
  font-size: 1.05rem; font-weight: 700; cursor: pointer;
}
.btn.big { background: var(--accent); border-color: var(--accent); color: #14100a; font-size: 1.2rem; }
.btn.big.running { background: var(--accent2); border-color: var(--accent2); color: #fff; }
.btn:active { transform: scale(0.98); }
.volrow { margin-bottom: 0; }
.volrow label { font-size: 0.85rem; color: var(--dim); width: 60px; }
input[type="range"] { flex: 1; accent-color: var(--accent); height: 34px; }
.demo { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.demo label { font-size: 0.85rem; color: var(--dim); }
.demo input[type="range"] { margin-top: 6px; }
.check { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }

/* ---- info ---- */
.info summary { font-size: 0.9rem; color: var(--dim); cursor: pointer; font-weight: 600; }
.info ul { margin: 10px 0 0 18px; font-size: 0.85rem; color: var(--dim); line-height: 1.55; }
.info b { color: var(--text); }
