/* Compline dashboard: the one stylesheet. Brand tokens match getcompline.app
   (css/site.css): true black, white ink, white-alpha text and hairlines,
   muted purple accent #a898c9, soft rose #f3c7c7 for warnings. Inter only.
   Risk colors: Quiet = ink, Watchful = accent, Elevated/Hot = rose.
   Do not add hex colors below; use these variables. */
:root {
  --bg: #000000;
  --ink: #ffffff;
  --text: rgba(255, 255, 255, 0.82);
  --muted: rgba(255, 255, 255, 0.56);
  --faint: rgba(255, 255, 255, 0.35);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --surface-1: #0d0d0d;
  --surface-2: #171717;
  --surface-3: #242424;
  --accent: #a898c9;
  --rose: #f3c7c7;
  --brand: var(--accent);
  --danger: var(--rose);
  --risk-quiet: var(--ink);
  --risk-watchful: var(--accent);
  --risk-elevated: var(--rose);
  --risk-hot: var(--rose);
  --risk-none: rgba(255, 255, 255, 0.2);
  color-scheme: dark;
}

/* ---- from style.css ---- */
/* Tesla-like dark UI. Brand hex var(--accent) stays in the file and is not used as a fill.
   Satoshi is loaded from Fontshare (weights 300 and 400). system-ui is the fallback. */


* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-font-smoothing: antialiased; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.5 "Inter", system-ui, sans-serif;
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 40;
}

body.auth .top { display: none; }
body.auth main { padding-top: 2.75rem; }

.brand-row { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.brand-icon { width: 28px; height: 28px; flex: none; }
.brand-word { height: 22px; width: auto; max-width: 42vw; }
.tag {
  display: none;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 300;
  white-space: nowrap;
}

.lockup {
  display: block;
  width: min(100%, 15rem);
  height: auto;
  margin: 0.25rem 0 1.75rem;
}

.icon, .icon * {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon { width: 22px; height: 22px; flex: none; display: block; }
.with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.with-icon .icon { width: 18px; height: 18px; }

nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  gap: 0;
  margin: 0;
  background: var(--bg-raised);
  border-top: 1px solid var(--line);
  padding: 0.3rem 0.2rem calc(0.4rem + env(safe-area-inset-bottom));
}
nav form { margin: 0; display: flex; }
nav a, nav button.linkish {
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0.2rem 0.15rem;
  font: inherit;
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  min-width: 4.4rem;
  min-height: 48px;
}
nav a.active { color: var(--ink); }
nav a:hover, nav button.linkish:hover { color: var(--ink); text-decoration: none; }

body:has(nav) .foot { padding-bottom: 5.6rem; }

main {
  max-width: 32rem;
  margin: 0 auto;
  padding: 1.6rem 1.25rem 2.5rem;
}

h1, h2, legend { font-weight: 300; color: var(--ink); letter-spacing: -0.03em; }
h1 { font-size: 2.125rem; line-height: 1.12; margin: 0 0 0.7rem; }
h2 { font-size: 1.2rem; line-height: 1.25; margin: 0 0 0.7rem; }
strong { font-weight: 400; }
p { margin: 0 0 1rem; }
.lede {
  margin: 0 0 1.6rem;
  color: var(--muted);
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.45;
}

form { margin: 0; }
fieldset {
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
  margin: 0 0 1.5rem;
  padding: 0 0 0.35rem;
  min-inline-size: 0;
}
legend {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
}

.choice {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 0.95rem 1.1rem;
  margin: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
}
.choice > span { flex: 1; min-width: 0; order: 1; }
.choice input { order: 2; }
.choice input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin: 0 0 0 auto;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--muted);
  background: transparent;
  cursor: pointer;
}
.choice input[type="radio"]:checked {
  border-color: var(--ink);
  background: radial-gradient(circle, var(--ink) 0 5px, transparent 5.5px);
}
.choice:has(input:checked) strong { color: var(--ink); }

fieldset .choice,
section .choice {
  margin-left: -1.1rem;
  margin-right: -1.1rem;
  border-top: 1px solid var(--line);
}
fieldset .choice:last-of-type { margin-bottom: -0.15rem; }

/* Onboarding pickers sit directly in the form, so the form is the card. */
form:not(section form):has(> .choice) {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0 0 1rem;
  margin: 0 0 1rem;
}
form:not(section form):has(> .choice) .choice {
  margin: 0;
  border-top: 1px solid var(--line);
}
form:not(section form):has(> .choice) .choice:first-of-type { border-top: 0; }
form:not(section form):has(> .choice) button[type="submit"] {
  width: calc(100% - 2.2rem);
  margin-left: 1.1rem;
  margin-right: 1.1rem;
}

/* Operating mode is the one purple switch. */
.mode .choice input[type="radio"] {
  position: relative;
  width: 51px;
  height: 31px;
  border: 0;
  border-radius: 999px;
  background: var(--line-strong);
}
.mode .choice input[type="radio"]::after {
  content: "";
  position: absolute;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--ink);
  top: 2px;
  left: 2px;
  transition: transform 0.18s ease;
}
.mode .choice input[type="radio"]:checked {
  background: var(--ink);
}
.mode .choice input[type="radio"]:checked::after {
  background: var(--surface-2);
}
.mode .choice input[type="radio"]:checked::after { transform: translateX(20px); }

.hint, .meta { display: block; color: var(--muted); font-size: 0.92rem; font-weight: 400; }
.meta { margin-top: 0.35rem; font-size: 0.82rem; }
.pill {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 0.15rem;
}

label.stack {
  display: block;
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}

input[type="email"],
input[type="text"],
input[type="tel"],
input[type="time"],
input[type="password"],
input[type="number"] {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0.2rem 0 0.95rem;
  padding: 0.85rem 0.9rem;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-raised);
  font: inherit;
  font-weight: 400;
  color: var(--ink);
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--bg-raised) inset;
  caret-color: var(--ink);
}
::placeholder { color: var(--muted); }

.threshold label.stack,
.threshold .pending { text-align: center; }
.threshold input[type="number"] {
  font-size: 3.5rem;
  font-weight: 300;
  letter-spacing: -0.045em;
  text-align: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  margin: 0.1rem 0 0.15rem;
  padding: 0;
  min-height: 0;
  line-height: 1;
}
.threshold input[type="number"]:focus { outline: none; }
.threshold-slider {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 2px;
  margin: 1.1rem 0 0.85rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ink) var(--pct, 55%), var(--line-strong) var(--pct, 55%));
  cursor: pointer;
}
.threshold-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.06);
}
.threshold-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
}
.threshold-slider::-moz-range-track {
  height: 2px;
  background: transparent;
}

button[type="submit"]:not(.linkish),
a.button {
  display: block;
  width: 100%;
  background: var(--ink);
  color: var(--bg);
  border: 0;
  border-radius: 12px;
  padding: 0.75rem 1.1rem;
  min-height: 48px;
  font: inherit;
  font-weight: 400;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
button[type="submit"]:not(.linkish):hover,
a.button:hover { background: var(--text); color: var(--bg); }

button[type="submit"].ghost:not(.linkish),
a.button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
button[type="submit"].ghost:not(.linkish):hover,
a.button.ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

button[type="submit"].danger:not(.linkish) {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(243, 199, 199, 0.45);
}
button[type="submit"].danger:not(.linkish):hover {
  background: rgba(243, 199, 199, 0.08);
  color: var(--danger);
}

.follow, .oauth, section { margin-top: 0; }
.follow {
  margin-top: 1.85rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.oauth {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

main > section,
.danger-zone,
.preview {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.1rem;
  margin: 0 0 1.15rem;
}
.preview { margin-top: 1.75rem; }
.preview h2 {
  font-size: 1.35rem;
  font-weight: 300;
}
.danger-zone { background: var(--card); }

.error, .saved, .lock, .pending, .readonly, .mock-line {
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin: 0 0 1rem;
}
.error, .saved, .lock, .pending {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
}
.error { border-color: rgba(243, 199, 199, 0.45); color: var(--rose); }
.saved { color: var(--ink); }
.lock { color: var(--rose); }
.pending { color: var(--muted); }
fieldset .pending,
fieldset .hint,
fieldset .lock,
section .hint {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0.2rem 0 0.55rem;
  margin: 0;
}
.readonly {
  background: transparent;
  border: 0;
  border-radius: 0;
  font-weight: 300;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  padding: 0.15rem 0 0.35rem;
  margin: 0 0 0.35rem;
}
.mock-line {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 0.9rem 0 0.2rem;
  margin: 0.4rem 0 0.8rem;
  font-weight: 300;
  font-size: 1.05rem;
  color: var(--ink);
}

.table-wrap {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.preview .table-wrap {
  background: transparent;
  border: 0;
  border-radius: 0;
  margin: 0.2rem -1.1rem -0.35rem;
}
table { width: 100%; border-collapse: collapse; background: transparent; }
th, td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-weight: 400;
}
th {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
tr:last-child td { border-bottom: 0; }
code { font-family: ui-monospace, "SF Mono", monospace; font-size: 0.82em; color: var(--text); }

a { color: var(--ink); }
main a:not(.button) {
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-color: rgba(255, 255, 255, 0.35);
}
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
input:focus-visible,
.threshold-slider:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-color: var(--brand);
}

.progress-label {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
progress {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  margin: 0 0 1.35rem;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--line-strong);
  color: var(--ink);
}
progress::-webkit-progress-bar { background: var(--line-strong); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--ink); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--ink); border-radius: 999px; }

.plain, .steps {
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0.15rem 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.plain li, .steps li {
  margin: 0;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.plain li:last-child, .steps li:last-child { border-bottom: 0; }
section .plain {
  background: transparent;
  border: 0;
  border-radius: 0;
  margin: 0 -1.1rem 0.8rem;
}
ol.steps { counter-reset: item; }
ol.steps li {
  counter-increment: item;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
ol.steps li::before {
  content: counter(item);
  flex: none;
  width: 1.45rem;
  height: 1.45rem;
  margin-top: 0.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text);
}

.map {
  position: relative;
  z-index: 0;
  isolation: isolate;
  height: 16rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin: 0.35rem 0 0.45rem;
  background: var(--bg-raised);
  overflow: hidden;
}
.map .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(0.88) contrast(0.92);
}
.leaflet-bar a,
.leaflet-bar a:hover {
  background-color: var(--surface-3) !important;
  color: var(--ink) !important;
  border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}
.leaflet-control-attribution {
  background: rgba(0, 0, 0, 0.55) !important;
  color: var(--text) !important;
}
.leaflet-control-attribution a { color: var(--text) !important; }

.qr {
  display: inline-block;
  margin: 0.35rem 0 1rem;
  padding: 0.75rem;
  background: var(--ink);
  border-radius: 16px;
}
.qr svg { width: min(100%, 12rem); height: auto; display: block; }

.draft {
  display: inline-block;
  margin: 0 0 0.85rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-weight: 400;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

.foot {
  max-width: 32rem;
  margin: 0 auto;
  padding: 0.25rem 1.25rem 2rem;
  display: flex;
  gap: 1.25rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }

@media (max-width: 719px) {
  table, thead, tbody { display: block; width: 100%; }
  thead tr {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    padding: 0.85rem 1rem 0.7rem;
  }
  /* Column names live on each row once there is data. */
  table:not(:has(tbody:empty)) thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
  }
  th { border: 0; padding: 0; white-space: nowrap; }
  tbody tr {
    display: block;
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--line);
  }
  td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border: 0;
    padding: 0.28rem 0;
    white-space: normal;
  }
  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    flex: none;
  }
  tbody tr:last-child { border-bottom: 0; }
}

@media (min-width: 720px) {
  .tag { display: inline; }
  .brand-icon { width: 32px; height: 32px; }
  .brand-word { height: 26px; }
  main, .foot { max-width: 40rem; }
  h1 { font-size: 2.75rem; }
  nav {
    position: static;
    background: transparent;
    border: 0;
    padding: 0;
    justify-content: flex-end;
    gap: 1.15rem;
  }
  nav a, nav button.linkish {
    flex-direction: row;
    font-size: 0.95rem;
    min-width: 0;
    min-height: 0;
    gap: 0.4rem;
    padding: 0;
    color: var(--text);
  }
  nav a.active, nav a:hover, nav button.linkish:hover { color: var(--ink); }
  body:has(nav) .foot { padding-bottom: 2rem; }
}

/* Home is type on black. Color lives only in the status glow. */
body.home .top,
body.home .foot { display: none; }
body.home main {
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}
.stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem 9rem;
  text-align: center;
}
.glow {
  width: 62%;
  height: 2px;
  margin: 1.1rem auto 1.4rem;
  border-radius: 999px;
  background: var(--glow, var(--line-strong));
  box-shadow: 0 0 22px 6px var(--glow, var(--line-strong));
}
.glow-quiet { --glow: var(--ink); }
.glow-watchful,
.glow-elevated { --glow: var(--rose); }
.glow-hot { --glow: var(--rose); }
.glow-none { --glow: var(--line-strong); }
.spot-name {
  margin: 0;
  font-weight: 400;
  font-size: 1.35rem;
  color: var(--ink);
}
.seen, .when, .level, .ended {
  color: var(--muted);
  font-weight: 300;
}
.stage .verdict {
  margin: 0.85rem 0 0;
  font-weight: 300;
  font-size: 2.75rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.glow, .stage .verdict { animation: status-fade 0.45s ease; }
@keyframes status-fade {
  from { opacity: 0.2; }
  to { opacity: 1; }
}
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 72vh;
  overflow: auto;
  background: var(--bg);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.35rem 1.25rem 1.5rem;
}
.sheet summary {
  list-style: none;
  cursor: pointer;
  text-align: center;
  color: var(--muted);
  font-weight: 300;
  padding: 0.35rem 0 0.8rem;
}
.sheet summary::-webkit-details-marker { display: none; }
.sheet summary::before {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  margin: 0.15rem auto 0.55rem;
  border-radius: 999px;
  background: var(--line-strong);
}
.sheet-body .verdict { font-size: 1.35rem; text-align: left; }
.parks { list-style: none; margin: 0; padding: 0; }
.parks a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.parks .verdict {
  font-weight: 300;
  font-size: 1.5rem;
  color: var(--ink);
}
.parks .level { text-align: right; }
.parks .place { grid-column: 1; }
.parks .when, .parks .ended { grid-column: 2; text-align: right; }
.report h1 {
  font-size: 2.75rem;
  font-weight: 300;
  margin-top: 0.4rem;
}
.report .overall {
  font-size: 1.35rem;
  font-weight: 300;
  color: var(--ink);
}
.report h2 {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 1.15rem;
  font-weight: 400;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
}
.score-line,
.metric,
.mix li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-weight: 300;
}
.fold { border-bottom: 1px solid var(--line); }
.fold-nested { margin-left: 0.15rem; }
.fold-toggle {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 0;
  padding: 0.95rem 1.4rem 0.95rem 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 300;
  font-size: 1.2rem;
  text-align: left;
  cursor: pointer;
  position: relative;
}
.fold-nested .fold-toggle { font-size: 1.02rem; color: var(--text); }
.fold-score { color: var(--muted); font-weight: 300; }
.fold-toggle::after {
  content: "";
  position: absolute;
  right: 0.15rem;
  top: 1.25rem;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
}
.fold.open > .fold-toggle::after { transform: rotate(-135deg); top: 1.4rem; }
.fold-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s ease;
}
.fold.open > .fold-body { grid-template-rows: 1fr; }
.fold-inner { overflow: hidden; }
.fold-inner > p:first-child { margin-top: 0.15rem; }
.chart { width: 100%; height: auto; display: block; margin: 0.4rem 0 0.2rem; }
.chart .bar { fill: var(--line-strong); }
.chart .bar-on { fill: var(--ink); }
.chart .track { fill: var(--surface-3); }
.chart .line { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.chart.map { width: 9rem; height: 9rem; border: 1px solid rgba(255, 255, 255, 0.14); }
.mix { list-style: none; margin: 0; padding: 0; }
@media (prefers-reduced-motion: reduce) {
  .fold-body { transition: none; }
}
.confidence { color: var(--muted); }
.swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 0.55rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  vertical-align: -2px;
}
.swatch-pearl-white { background: var(--ink); }
.swatch-solid-black { background: var(--surface-2); }
.swatch-stealth-grey { background: var(--muted); }
.swatch-ultra-red { background: var(--rose); }
.swatch-deep-blue { background: var(--accent); }
.swatch-quicksilver { background: var(--text); }
main > section,
.danger-zone,
.preview,
form:not(section form):has(> .choice) {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
main > section,
.danger-zone,
.preview {
  padding: 0 0 1.2rem;
  margin: 0 0 1.2rem;
  border-bottom: 1px solid var(--line);
}

/* Parking-type segmented control (Tesla-style), settings + history. */
main > section.parking-picker { margin: 1.75rem 0 1.5rem; padding: 1.25rem 0 1rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.parking-picker h2 { font-size: 1.15rem; margin: 0 0 0.35rem; line-height: 1.3; }
.parking-picker .hint { margin: 0 0 0.75rem; }
.seg {
  display: flex; gap: 2px; padding: 3px;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 12px;
}
.seg button.seg-btn[type="submit"]:not(.linkish) {
  flex: 1 1 0; min-width: 0; margin: 0; width: auto;
  padding: 0.55rem 0.25rem; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted);
  font-size: 0.92rem; font-weight: 500; letter-spacing: 0; box-shadow: none;
}
.seg button.seg-btn[type="submit"]:not(.linkish):hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }
.seg button.seg-btn.on[type="submit"]:not(.linkish) { background: var(--line-strong); color: var(--ink); }
.seg-sm button.seg-btn[type="submit"]:not(.linkish) { padding: 0.3rem 0.2rem; min-height: 0; font-size: 0.82rem; }
.parks li { border-bottom: 1px solid var(--line); }
.parks li > a { border-bottom: 0; }
.parks .park-type { padding: 0 0 0.85rem; }
.empty { color: var(--muted); }
.unavailable { margin: 0.4rem 0 0.2rem; color: var(--muted); font-size: 0.9rem; }
.unavailable summary { cursor: pointer; list-style: none; padding: 0.35rem 0; }
.unavailable summary::-webkit-details-marker { display: none; }
.unavailable summary::after { content: " ›"; }
.unavailable[open] summary::after { content: " ⌄"; }
.unavailable .hint { margin: 0 0 0.3rem; }

.parks .density { display: inline-flex; align-items: center; gap: 0.4rem; justify-content: flex-end; font-size: 0.75rem; color: var(--muted); }
.parks .dbars { display: inline-flex; gap: 2px; align-items: flex-end; }
.parks .dbars i { display: block; width: 4px; height: 10px; border-radius: 1px; background: var(--line-strong); }
.parks .dbars i:nth-child(1) { height: 5px; }
.parks .dbars i:nth-child(2) { height: 8px; }
.parks .dbars i.on { background: var(--ink); }

/* ---- from whoop.css ---- */
/* Whoop-style layer (approved mockups, Oct 2026). Loaded after style.css.
   True black, heavy Satoshi numbers, color only signals risk.
   Brand purple var(--accent) appears only on the logo and the mode chip. */
body.w { background:var(--bg); color:var(--ink); font-family:"Inter",system-ui,sans-serif; font-weight:400; }
body.w { --g:var(--ink); --y:var(--accent); --o:var(--rose); --r:var(--rose); --n:var(--faint); --c:var(--faint); --card:var(--surface-1); --track:var(--surface-3); --muted:var(--muted); }
body.w .g { --c:var(--g); } body.w .y { --c:var(--y); } body.w .o { --c:var(--o); } body.w .r { --c:var(--r); } body.w .n { --c:var(--n); }
body.w main { max-width:430px; padding:0 22px 120px; }
body.w h1, body.w h2, body.w legend { font-weight:900; letter-spacing:-.6px; }
body.w .page-h, body.w .report-w h1 { font-size:30px; margin:0 0 4px; }
body.w .foot { padding-bottom:110px; }

/* Header */
.w-top { display:flex; justify-content:space-between; align-items:center; max-width:430px; margin:0 auto; padding:calc(18px + env(safe-area-inset-top)) 22px 22px; }
.w-logo { display:flex; align-items:center; gap:9px; text-decoration:none; }
.w-logo .w-icon { width:26px; height:26px; border-radius:8px; background:var(--accent); }
.w-logo .w-word { height:26px; width:auto; }
.w-chip { font-size:13px; font-weight:700; padding:7px 13px; border-radius:99px; background:var(--surface-2); border:1px solid var(--surface-3); color:var(--ink); text-decoration:none; }
body.w main a.w-chip { text-decoration:none; }
.w-chip b { color:var(--accent); font-weight:900; }

/* Bottom tabs */
body.w nav.w-nav { background:var(--surface-1); border-top:1px solid var(--surface-2); padding:10px 6px calc(10px + env(safe-area-inset-bottom)); }
body.w nav.w-nav a { color:var(--faint); font-size:12px; font-weight:700; min-width:4.6rem; }
body.w nav.w-nav a.on { color:var(--ink); }
body.w nav.w-nav .icon { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }

/* Cards and labels */
body.w .card { display:block; background:var(--card); border:0; border-radius:22px; padding:20px; margin:0 0 14px; color:var(--ink); text-decoration:none; }
body.w main a.card { text-decoration:none; color:var(--ink); }
body.w .lbl { display:block; font-size:12px; font-weight:700; letter-spacing:1.6px; text-transform:uppercase; color:var(--muted); }
body.w .hint { color:var(--muted); font-size:14px; font-weight:500; line-height:1.4; }
body.w .section-lbl { margin:26px 4px 10px; }

/* Rings */
.ring-track { fill:none; stroke:var(--track); }
.ring-fill { fill:none; stroke:var(--c); stroke-linecap:round; filter:drop-shadow(0 0 12px color-mix(in srgb, var(--c) 55%, transparent)); }

/* Now */
.hero { display:flex; flex-direction:column; align-items:center; margin:4px 0 28px; text-align:center; }
.ring-xl { position:relative; width:300px; height:300px; }
.ring-xl svg, .rw svg { transform:rotate(-90deg); overflow:visible; display:block; }
.ring-n { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.ring-n b { font-size:112px; font-weight:900; letter-spacing:-5px; line-height:1; }
.ring-n b.dash { color:var(--line-strong); }
.ring-n em { text-transform:uppercase; font-style:normal; font-weight:900; font-size:16px; letter-spacing:2.5px; color:var(--c); margin-top:6px; }
.hero .sentry { font-size:40px; font-weight:900; letter-spacing:-1px; margin:26px 0 0; display:flex; align-items:center; gap:12px; color:var(--ink); }
.hero .sentry i { width:14px; height:14px; border-radius:50%; background:var(--c); box-shadow:0 0 16px var(--c); }
.hero .sentry.is-off i { background:var(--faint); box-shadow:none; }
.hero .spot { font-size:18px; font-weight:700; margin:8px 0 0; color:var(--ink); }
.hero .time { font-size:15px; color:var(--muted); margin:4px 0 0; max-width:320px; }
.duo, .rings { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px; }
.duo .card { margin:0; }
.duo .card b { display:block; font-size:40px; font-weight:900; margin-top:8px; color:var(--c); line-height:1.1; }
.duo .card small { font-size:14px; font-weight:700; color:var(--text); }
.why-card p { font-size:16px; font-weight:700; margin:8px 0 6px; }
.why-card .more, .acct-links a { font-size:14px; font-weight:700; color:var(--muted); }
.quick-mode .seg { margin:12px 0 8px; }

/* Segmented controls */
body.w .seg { display:flex; gap:4px; background:var(--surface-1); border:1px solid var(--surface-3); border-radius:14px; padding:4px; }
body.w .seg button.seg-btn[type="submit"]:not(.linkish) { flex:1; background:transparent; color:var(--muted); font-weight:700; font-size:15px; border:0; border-radius:10px; min-height:40px; }
body.w .seg button.seg-btn.on[type="submit"]:not(.linkish) { background:var(--surface-3); color:var(--ink); }
body.w .seg-sm button.seg-btn[type="submit"]:not(.linkish) { font-size:13px; min-height:30px; }

/* Report */
.report-w .sub { color:var(--muted); font-size:15px; margin:0 0 20px; }
.rec-top { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.rec h2 { font-size:28px; margin:0; }
.rec-score { margin:6px 0 0; color:var(--c); font-weight:900; font-size:15px; letter-spacing:1px; text-transform:uppercase; }
.rec-score b { font-size:22px; }
.conf { flex:none; font-size:12px; font-weight:900; letter-spacing:1.4px; padding:6px 11px; border-radius:99px; background:rgba(255, 255, 255, 0.08); color:var(--text); }
.conf-solid { background:rgba(255, 255, 255, 0.13); color:var(--ink); }
.conf-rough { background:rgba(168, 152, 201, 0.13); color:var(--accent); }
.conf-no-data { background:rgba(243, 199, 199, 0.13); color:var(--rose); }
.why { list-style:none; margin:14px 0 0; padding:0; }
.why li { font-size:16px; font-weight:700; padding:7px 0 7px 20px; position:relative; line-height:1.35; }
.why li:before { content:""; position:absolute; left:0; top:14px; width:8px; height:8px; border-radius:50%; background:var(--c); }
.rings .card { display:flex; flex-direction:column; align-items:center; padding:22px 10px; margin:0; }
.rw { position:relative; width:132px; height:132px; margin:12px 0 4px; display:block; }
.rw b { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:46px; font-weight:900; letter-spacing:-2px; }
.rings .tag { font-size:13px; font-weight:900; letter-spacing:1.5px; color:var(--c); }
.tap { margin:4px 0 4px; }

/* Driver rows (tappable bars) */
body.w .drow { border-top:1px solid var(--surface-3); border-bottom:0; padding:0; }
body.w .card .drow:first-of-type { border-top:0; }
body.w .drow > .fold-toggle, body.w div.drow { display:block; width:100%; padding:14px 0; background:none; border:0; color:var(--ink); text-align:left; font:inherit; cursor:pointer; }
body.w .drow > .fold-toggle::after { display:none; }
.rh { display:flex; justify-content:space-between; align-items:center; font-weight:700; font-size:17px; }
.rh > span { display:flex; align-items:center; gap:10px; }
.rh b { font-size:22px; font-weight:900; color:var(--c); }
.chev { display:inline-block; width:8px; height:8px; border-right:2.5px solid var(--faint); border-bottom:2.5px solid var(--faint); transform:rotate(45deg); margin-top:-4px; transition:transform .2s; }
.fold.open .chev { transform:rotate(-135deg); margin-top:4px; }
span.bar { display:block; height:8px; border-radius:9px; background:var(--track); margin-top:10px; overflow:hidden; }
span.bar i { display:block; height:100%; border-radius:9px; background:var(--c); }
.drow .fold-inner { padding:0; }
.drow.open .fold-inner { padding-bottom:14px; }
.drow .fold-inner p { font-size:15px; color:var(--text); line-height:1.4; }
.ctitle { margin:10px 0 0; font-size:12px !important; font-weight:700; letter-spacing:1.4px; text-transform:uppercase; color:var(--muted) !important; }

/* Charts in the report use the row's risk color */
body.w .chart .bar { fill:color-mix(in srgb, var(--c) 32%, var(--surface-1)); }
body.w .chart .bar-on { fill:var(--c); }
body.w .chart .track { fill:var(--track); }
body.w .chart .line { stroke:var(--c); stroke-width:2; }
body.w .chart.map { border-color:var(--surface-3); border-radius:12px; }
body.w .mix { list-style:none; padding:0; margin:6px 0 0; }
body.w .mix li, body.w .metric { display:flex; justify-content:space-between; gap:12px; font-size:14px; color:var(--text); margin:6px 0; }
body.w .metric span:last-child { font-weight:700; color:var(--ink); text-align:right; }

/* Night strip */
.strip { display:flex; gap:4px; margin-top:14px; }
.strip i { flex:1; height:34px; border-radius:6px; background:var(--c); }
.strip i.now { outline:2.5px solid var(--ink); outline-offset:2px; }
.cx { display:flex; justify-content:space-between; font-size:11px; font-weight:700; color:var(--faint); margin:6px 0 8px; }

/* Full-breakdown folds */
body.w .report-w > .fold { background:var(--card); border:0; border-radius:18px; margin:0 0 10px; padding:0 18px; }
body.w .fold-toggle { color:var(--ink); font-weight:700; }
body.w .fold-score { color:var(--c); font-weight:900; }
body.w .fold-nested .fold-toggle { color:var(--text); }
body.w .unavailable summary { color:var(--muted); font-size:14px; }

/* History */
.week-row { display:flex; justify-content:space-between; margin:14px 0 8px; }
.day { display:flex; flex-direction:column; align-items:center; gap:6px; font-size:12px; font-weight:700; color:var(--faint); }
.day i { width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-style:normal; font-weight:900; font-size:14px; color:var(--bg); background:var(--c); }
.day i.e { background:transparent; border:2px solid var(--surface-3); }
.day.today span { color:var(--ink); }
body.w .parks { list-style:none; margin:0; padding:0; }
body.w .parks li.card { padding:16px 18px; }
body.w .parks a { display:flex; align-items:center; gap:14px; color:var(--ink); text-decoration:none; padding:0; border:0; }
.park .dot { flex:none; width:14px; height:14px; border-radius:50%; background:var(--c); box-shadow:0 0 12px var(--c); }
.pmain { flex:1; min-width:0; display:flex; flex-direction:column; }
.pmain .place { font-weight:700; font-size:17px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pmain .when { color:var(--muted); font-size:14px; }
.pside { display:flex; flex-direction:column; align-items:flex-end; }
.pside b { font-size:28px; font-weight:900; color:var(--c); line-height:1; }
body.w .parks .verdict { font-size:13px; font-weight:700; color:var(--text); margin:2px 0 0; }
body.w .parks .level { font-size:11px; font-weight:900; letter-spacing:1.2px; text-transform:uppercase; color:var(--c); }
body.w .park-type { margin:12px 0 0; }

/* Modes */
body.w fieldset.card { padding:18px 20px; }
body.w fieldset.card legend { float:left; width:100%; font-size:20px; margin:0 0 6px; padding:0; }
body.w .parking-picker.card h2 { font-size:20px; }
body.w main > section.parking-picker { border:0; margin:0 0 14px; padding:20px; }
body.w button[type="submit"]:not(.linkish):not(.seg-btn) { background:var(--ink); color:var(--bg); font-weight:900; border-radius:14px; }
.acct-links { display:flex; justify-content:space-between; align-items:center; }
body.w .acct-links .linkish { background:none; border:0; color:var(--muted); font:inherit; font-weight:700; font-size:14px; cursor:pointer; }


/* Status tab + Control panel (Tesla-app mirror, Oct 2026) */
body.w nav.w-nav a { min-width:3.6rem; }
.status-banner { font-size:13px; font-weight:700; color:var(--rose); background:rgba(243, 199, 199, 0.08); border-radius:14px; padding:12px 14px; margin:0 0 14px; line-height:1.35; }
.status-car .status-hero { margin-top:10px; }
.status-motion { margin-bottom:16px; }
.status-motion b { display:block; font-size:28px; font-weight:900; letter-spacing:-.6px; }
.status-motion b.is-on { color:var(--ink); }
.status-motion b.is-off { color:var(--muted); }
.status-motion span { display:block; margin-top:4px; font-size:15px; font-weight:700; color:var(--text); }
.status-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.status-grid .lbl { margin-bottom:4px; }
.status-grid b { font-size:22px; font-weight:900; letter-spacing:-.4px; }
.status-grid b.on { color:var(--ink); }
.status-grid b.off { color:var(--muted); }
.status-score h2 { font-size:22px; margin:8px 0 0; font-weight:900; letter-spacing:-.4px; }
.wakes-left { margin:8px 0 14px; font-weight:700; color:var(--text); }
.ctrl-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:12px; }
.ctrl-btn { appearance:none; border:1px solid var(--surface-3); background:var(--surface-2); color:var(--ink); font:inherit; font-weight:800; font-size:15px; border-radius:16px; min-height:52px; padding:12px 10px; cursor:pointer; }
.ctrl-btn:active { background:var(--surface-3); }
.ctrl-btn.wake-hint { border-color:rgba(243, 199, 199, 0.33); }
.ctrl-dialog { border:0; border-radius:22px; padding:0; background:var(--surface-1); color:var(--ink); width:min(360px, calc(100vw - 32px)); box-shadow:0 20px 60px rgba(0, 0, 0, 0.80); }
.ctrl-dialog::backdrop { background:rgba(0, 0, 0, 0.67); }
.ctrl-dialog form { padding:22px; }
.ctrl-dialog-text { font-size:17px; font-weight:700; line-height:1.4; margin:0 0 18px; }
.ctrl-dialog-actions { display:flex; gap:10px; }
.ctrl-cancel, .ctrl-go { flex:1; appearance:none; border:0; border-radius:14px; min-height:46px; font:inherit; font-weight:800; font-size:15px; cursor:pointer; }
.ctrl-cancel { background:var(--surface-3); color:var(--ink); }
.ctrl-go { background:var(--accent); color:var(--ink); }
.health-list, .cmd-list { list-style:none; margin:12px 0 0; padding:0; }
.health-list li, .cmd-list li { display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-top:1px solid var(--surface-3); font-size:15px; font-weight:700; }
.health-list li:first-child, .cmd-list li:first-child { border-top:0; }
.health-list span, .cmd-meta { color:var(--muted); font-weight:600; }
.health-list b, .cmd-label { color:var(--ink); text-align:right; }
.cmd-list li { flex-direction:column; align-items:flex-start; gap:2px; }
.cmd-meta { font-size:13px; }
.status-admin { border:1px solid rgba(168, 152, 201, 0.27); }
.status-admin .lbl { color:var(--accent); }

/* UX cleanup Oct 15 — contrast, nav clearance, Rough, Car, Admin */
body.w { --muted:var(--muted); }
body.w .hint, body.w .time, body.w .sub, body.w .cmd-meta, body.w .lede { color:var(--muted); font-size:15px; }
body.w main { padding-bottom: calc(160px + env(safe-area-inset-bottom)); }
body.w .foot { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
body.w nav.w-nav { z-index: 40; }
.w-chip { font-size:13px; }
.w-chip b { color:var(--accent); }
.status-banner.subtle { font-size:14px; font-weight:700; color:var(--rose); background:rgba(243, 199, 199, 0.09); border-radius:12px; padding:10px 12px; margin:0 0 14px; }
.rough-tag { display:inline-block; font-size:11px; font-weight:900; letter-spacing:1px; text-transform:uppercase; padding:4px 9px; border-radius:99px; background:rgba(168, 152, 201, 0.13); color:var(--accent); border:0; vertical-align:middle; cursor:pointer; }
.spot-score { display:flex; align-items:center; gap:16px; margin-top:10px; }
.ring-sm { position:relative; width:88px; height:88px; flex:none; }
.ring-sm svg { transform:rotate(-90deg); display:block; }
.ring-sm b { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:28px; font-weight:900; letter-spacing:-1px; }
.spot-copy .band-word { font-size:22px; font-weight:900; margin:0 0 4px; color:var(--c); }
.spot-copy .rec-line, .rec-line { font-size:17px; font-weight:700; margin:0; color:var(--ink); }
.sub-line { display:block; margin-top:4px; font-size:15px; font-weight:600; color:var(--muted); }
.plain-grid b { font-size:20px; }
.batt-row { display:flex; align-items:center; gap:8px; margin-top:2px; }
.batt-ring { width:28px; height:28px; transform:rotate(-90deg); }
.batt-ring .ring-track, .batt-ring .ring-fill { fill:none; }
.wakes-left { margin:8px 0 14px; font-weight:700; font-size:15px; color:var(--text); }
.status-controls { margin-bottom:28px; padding-bottom:8px; }
.admin-badge { display:inline-block; font-size:11px; font-weight:900; letter-spacing:1.4px; text-transform:uppercase; padding:5px 10px; border-radius:99px; background:rgba(168, 152, 201, 0.13); color:var(--accent); margin:0 0 10px; }
.admin-w .page-h { color:var(--accent); }
.admin-user { padding:12px 0; border-top:1px solid var(--surface-3); }
.admin-user:first-of-type { border-top:0; }
.admin-fold { margin-top:12px; color:var(--muted); font-size:14px; font-weight:700; }
.admin-pre { font-size:11px; overflow:auto; max-height:240px; background:var(--surface-1); padding:10px; border-radius:12px; color:var(--text); }
body.w .hero .sentry { font-size:28px; }

body.w .park-wrong { margin: 8px 0 0; }
body.w .park-wrong .seg-btn { min-height: 30px; font-size: 13px; padding: 0 12px; background: transparent; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 10px; font-weight: 700; }
body.w .park-wrong .seg-btn.on { color: var(--rose); border-color: var(--rose); }


/* Home: score, risk, and place. No car drawing. */
.hero.is-driving {
  margin-bottom: 18px;
}
.hero .motion-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 56px 20px 28px;
  min-height: 200px;
  justify-content: center;
}
.hero .motion-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 280px;
}
.hero .motion-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-3);
  color: var(--ink);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
}
.hero .motion-line {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}
.hero .motion-line strong {
  font-weight: 900;
  letter-spacing: -0.02em;
}

.status-banner.live { font-size:14px; font-weight:700; color:var(--ink); background:rgba(255, 255, 255, 0.09); border-radius:12px; padding:10px 12px; margin:0 0 14px; }
.status-progress { font-size:14px; font-weight:600; border-radius:12px; padding:10px 12px; margin:0 0 14px; line-height:1.35; background:rgba(255, 255, 255, 0.07); }
.status-progress.is-wait { color:var(--rose); }
.status-progress.is-ok { color:var(--ink); }
.status-progress.is-err { color:var(--rose); }

/* ---- from app.css ---- */
/* Phone-first layout. Black field, large numerals, hairline rows.
   Inter is the text face. Brand purple stays in style.css for the mark only. */
body.w {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 400;
  letter-spacing: 0;
  background: var(--bg);
}
body.w h1,
body.w h2,
body.w legend {
  font-weight: 500;
  letter-spacing: -0.02em;
}
body.w main {
  max-width: 390px;
  padding: 8px 0 128px;
}
body.w .page-h {
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 8px 20px 6px;
  color: var(--ink);
}
body.w .lede {
  margin: 0 20px 22px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}
.ring-fill { filter: none; }

.hero-num {
  display: block;
  font-size: 92px;
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}
.hero-num.dash { color: var(--muted); }
.ring-xl {
  width: auto;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.ring-xl em {
  font-style: normal;
  font-size: 17px;
  font-weight: 400;
  color: var(--muted);
}
.hero {
  margin: 36px 0 48px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.spot { font-size: 22px; font-weight: 500; margin: 28px 0 0; }
.time { color: var(--muted); font-size: 16px; font-weight: 400; margin-top: 6px; }

.group { margin: 0 0 28px; }
.group h2 {
  margin: 0 20px 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.fold {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.group .fold:last-of-type { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.fold summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 22px 20px;
  cursor: pointer;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary span { font-size: 17px; font-weight: 400; }
.fold summary b {
  font-size: 17px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.fold summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  margin-left: 8px;
  flex: 0 0 auto;
}
.fold[open] summary::after { transform: rotate(-135deg); margin-top: 6px; }
.fold dl { margin: 0 20px 8px; }
.fold dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 15px;
}
.fold dt { color: var(--muted); font-weight: 400; }
.fold dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.deeper, .places-link a {
  display: inline-block;
  margin: 4px 20px 18px;
  color: var(--ink);
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  padding-bottom: 2px;
}
.places-link { margin: 8px 0 28px; }

.schedule-note {
  margin: 0 20px 18px;
  color: var(--muted);
  font-size: 15px;
}
.place-list { list-style: none; margin: 8px 0 0; padding: 0; }
.place-list a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 22px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink);
  text-decoration: none;
}
.place-list b { font-weight: 500; font-variant-numeric: tabular-nums; }
.place-list small { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }
.place-list .empty { padding: 22px 20px; color: var(--muted); }
.place-form { display: flex; flex-direction: column; gap: 18px; padding: 8px 20px 12px; }
.place-form label, .place-form legend { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.place-form input[type="text"],
.place-form input:not([type="range"]):not([type="checkbox"]):not([type="hidden"]) {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--ink);
  font: 400 20px/1.3 "Inter", system-ui, sans-serif;
  padding: 8px 0;
  border-radius: 0;
}
.radius b { font-size: 40px; font-weight: 400; color: var(--ink); letter-spacing: -0.03em; }
.radius input[type="range"] { width: 100%; accent-color: var(--ink); }
.hours { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.hour { position: relative; }
.hour input { position: absolute; opacity: 0; }
.hour span {
  display: block;
  text-align: center;
  padding: 10px 0;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13px;
}
.hour input:checked + span { background: var(--ink); color: var(--bg); }
.place-form .save, button.save {
  margin-top: 8px;
  background: var(--ink);
  color: var(--bg);
  border: 0;
  border-radius: 8px;
  padding: 14px 16px;
  font: 500 16px/1 "Inter", system-ui, sans-serif;
}
.text-btn {
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 12px 20px;
  font: 400 15px/1 "Inter", system-ui, sans-serif;
}
.chart-host { margin: 12px 8px 0; min-height: 260px; }
.empty-chart { margin: 28px 20px; font-size: 28px; font-weight: 400; color: var(--muted); }
.back { margin: 8px 20px 0; }
.back a { color: var(--muted); text-decoration: none; font-size: 15px; }
.legend-key { list-style: none; display: flex; gap: 16px; margin: 8px 20px 0; padding: 0; color: var(--muted); font-size: 13px; }
.swatch { display: inline-block; width: 12px; height: 3px; margin-right: 6px; vertical-align: middle; background: var(--muted); }
.swatch.on { background: var(--ink); }
.uplot, .u-wrap { background: transparent !important; }
.u-axis { color: var(--muted); }

/* My Car: same black field, larger battery figure, flatter rows. */
body.mycar-w { background: var(--bg); }
.mycar-w .mc-card {
  background: transparent;
  border-radius: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 26px 4px;
  margin: 0;
}
.mycar-w .mc-big { font-size: 84px; font-weight: 400; letter-spacing: -0.045em; line-height: 0.9; }
.mycar-w .mc-h1 { font-size: 28px; font-weight: 500; letter-spacing: -0.03em; }
.mycar-w .mc-tile { background: transparent; border-radius: 0; padding: 8px 0; }
.mycar-w .mc-tabs a { background: transparent; border-radius: 0; color: var(--muted); font-weight: 500; }
.mycar-w .mc-tabs a.on { background: transparent; color: var(--ink); }
.mycar-w .mc-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-weight: 500;
}
.mycar-w .mc-list { display: block; }
.mycar-w .mc-group summary { font-size: 17px; }

/* Admin: same type and spacing. Purple title becomes white. */
.admin-w .page-h { color: var(--ink); }
.admin-w .card {
  background: transparent;
  border-radius: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 26px 0;
}
.admin-w .health-list li { padding: 16px 0; font-weight: 400; }
.admin-w .health-list b { font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.admin-badge { background: transparent; color: var(--muted); border-radius: 0; letter-spacing: 0.08em; font-weight: 500; }

/* ---- from mycar.css ---- */
.mycar-w main,.mycar-w .w-main{max-width:760px}
.mc-tabs{display:flex;gap:6px;margin:4px 0 12px;overflow-x:auto}
.mc-tabs a{padding:8px 14px;border-radius:18px;background:var(--surface-3);color:var(--muted);text-decoration:none;font-size:14px;white-space:nowrap}
.mc-tabs a.on{background:var(--text);color:var(--bg)}
.mc-card{background:var(--surface-2);border-radius:16px;padding:16px;margin:0 0 12px;color:var(--text)}
.mc-row{display:flex;justify-content:space-between;align-items:center;gap:10px}
.mc-h1{font-size:22px;font-weight:600;margin:0}.mc-sub,.mc-muted{color:var(--muted);font-size:13px}
.mc-big{font-size:46px;font-weight:300}.mc-right{text-align:right}.mc-mt{margin-top:12px}.mc-mt-s{margin:8px 0 0}
.mc-bar{position:relative;height:8px;background:var(--surface-3);border-radius:4px;margin-top:10px}
.mc-bar i{display:block;height:100%;border-radius:4px;background:var(--ink)}.mc-bar i.blue{background:var(--accent)}
.mc-bar em{position:absolute;top:-3px;width:2px;height:14px;background:var(--text)}
.mc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.mc-tile{background:var(--surface-3);border-radius:12px;padding:12px}.mc-tile b{display:block;font-size:17px;font-weight:500;margin-top:4px}
.mc-tag{font-size:12px;padding:3px 9px;border-radius:9px;background:var(--surface-3);color:var(--muted);text-decoration:none}
.mc-ok{color:var(--ink)}.mc-bad{color:var(--rose)}
.mc-btns{display:flex;gap:10px;margin-top:10px;flex-wrap:wrap}
.mc-btn{flex:1;min-width:90px;background:var(--surface-3);color:var(--text);border:0;border-radius:12px;padding:13px 10px;font-size:14px;cursor:pointer}
.mc-btn:hover{background:var(--surface-3)}
.mc-list{margin:10px 0 0;display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));column-gap:20px}
.mc-li{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid var(--surface-3);font-size:14px}
.mc-li dt a{color:var(--muted);text-decoration:none}.mc-li dd{margin:0;text-align:right}.mc-li.wait dd{color:var(--faint);font-style:italic}
.mc-trip{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid var(--surface-3)}
.mc-map{height:280px;border-radius:12px;margin-top:10px;background:var(--surface-1)}
.mc-chart{width:100%;height:180px;margin-top:8px;background:var(--surface-1);border-radius:10px}
.mc-form{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.mc-form select{flex:1;min-width:140px;background:var(--surface-3);color:var(--text);border:0;border-radius:10px;padding:10px}
.mc-table{width:100%;border-collapse:collapse;margin-top:10px;font-size:13px}
.mc-table td,.mc-table th{padding:6px 4px;border-bottom:1px solid var(--surface-3);text-align:left}.mc-table th{color:var(--muted);font-weight:500}
.mc-foot{margin:6px 4px 20px}
/* Mobile-first PWA (iPhone safe areas, standalone) */
body.mycar-w{background:var(--bg);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);padding-bottom:env(safe-area-inset-bottom)}
@media (display-mode: standalone){body.mycar-w{padding-top:env(safe-area-inset-top)}}
.mc-glance{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.mc-glance .mc-tile{padding:10px;text-decoration:none;color:var(--text)}.mc-glance .mc-tile b{font-size:15px}
.mc-glance .mc-tile .mc-muted{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.mc-offline-note{display:none;background:var(--surface-3);color:var(--rose);border-radius:10px;padding:8px 12px;font-size:13px;margin:0 0 10px}
body.mc-offline .mc-offline-note{display:block}
body.mc-offline .mc-btns button{opacity:.4;pointer-events:none}
@media (max-width:480px){.mc-card{padding:14px;border-radius:14px}.mc-big{font-size:40px}.mc-list{grid-template-columns:1fr}.mc-map{height:240px}}
.mc-tiles{filter:invert(1) hue-rotate(180deg) brightness(.85) contrast(.9)}

/* Phone screen: black field, large battery figure, hairline rows. */
body.mycar-w{font-family:"Inter",system-ui,sans-serif;font-weight:400}
.mycar-w main,.mycar-w .w-main{max-width:390px}
.mc-tabs{gap:0;margin:8px 0 4px}
.mc-tabs a{padding:14px 12px;border-radius:0;background:transparent;color:var(--muted);font-size:15px;font-weight:500}
.mc-tabs a.on{background:transparent;color:var(--ink);box-shadow:inset 0 -1px 0 var(--ink)}
.mc-card{background:transparent;border-radius:0;padding:28px 4px;margin:0;border-top:1px solid rgba(255, 255, 255, 0.12);color:var(--ink)}
.mc-h1{font-size:28px;font-weight:500;letter-spacing:-.03em}
.mc-big{font-size:84px;font-weight:400;letter-spacing:-.045em;line-height:.9}
.mc-tile{background:transparent;border-radius:0;padding:10px 0}
.mc-btn{background:transparent;color:var(--ink);border:1px solid rgba(255, 255, 255, 0.22);border-radius:8px;font-weight:500;padding:16px 10px}
.mc-btn:hover{background:transparent}
.mc-list{display:block}
.mc-li{padding:16px 0;font-size:15px}
.mc-glance{gap:16px}
@media (max-width:480px){
  .mc-card{padding:28px 4px;border-radius:0}
  .mc-big{font-size:84px}
  .mc-glance{grid-template-columns:repeat(2,1fr)}
  .mc-list{grid-template-columns:1fr}
}

/* ---- brand overrides ---- */
.w-logo .w-icon { background: transparent; border-radius: 0; }
.w-chip b { color: var(--accent); font-weight: 500; }
body.w h1, body.w h2, body.w legend, body.w b, body.w strong { font-weight: 500; }
body.w .g { --c: var(--risk-quiet); } body.w .y { --c: var(--risk-watchful); }
body.w .o { --c: var(--risk-elevated); } body.w .r { --c: var(--risk-hot); } body.w .n { --c: var(--risk-none); }
body.w { --g: var(--risk-quiet); --y: var(--risk-watchful); --o: var(--risk-elevated); --r: var(--risk-hot); --n: var(--risk-none); --card: var(--surface-1); --track: var(--surface-3); }
.ring-fill { filter: none; }
body.w main { padding-left: 20px; padding-right: 20px; }
body.w main .page-h, body.w main .lede { margin-left: 0; margin-right: 0; }
@media (min-width: 900px) { body.w main, .w-top { max-width: 760px; } }
