/*
  Sign-brown accent: the colour US highway departments reserve for cultural and
  historical guide signs. Dark by default, because this is used in a car.
*/
:root {
  --ground: #131110;
  --surface: #1C1917;
  --surface-2: #241F1A;
  --ink: #F1EDE5;
  --ink-2: #C6BFB2;
  --muted: #948C7E;
  --line: #302B24;
  --line-strong: #4A4238;
  --accent: #D08650;
  --accent-soft: #33231A;
  --on-accent: #1B1410;

  --display: "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: Charter, "Iowan Old Style", Palatino, Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ground: #FAF8F4;
    --surface: #FFFFFF;
    --surface-2: #F2EEE6;
    --ink: #1B1815;
    --ink-2: #4A443B;
    --muted: #756E62;
    --line: #E2DCD0;
    --line-strong: #C9C0AF;
    --accent: #7A3A12;
    --accent-soft: #F0E3D6;
    --on-accent: #FFF6EE;
  }
}

* { box-sizing: border-box; }

/*
  A class that sets `display` outranks the `hidden` attribute, so any element
  styled with flex or grid stays visible when hidden. The player did exactly
  that on the entry screen.
*/
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* Room for the pinned player plus the home indicator. */
  padding-bottom: calc(11rem + env(safe-area-inset-bottom));
}

/* ---- masthead ---- */
.mast-inner { max-width: 34rem; margin: 0 auto; }
.mast {
  padding: calc(1rem + env(safe-area-inset-top)) 1.1rem 0.9rem;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--ground);
  z-index: 5;
}
.mast-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
h1 {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0;
}
.route { margin: .25rem 0 0; font-size: .92rem; color: var(--muted); }

.ghost {
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  font-family: var(--display);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .4rem .7rem;
  border-radius: 3px;
}
.ghost:disabled { opacity: .5; }

/* ---- timeline ---- */
.timeline { list-style: none; margin: 0 auto; padding: .5rem 1.1rem 1rem; max-width: 34rem; }

.seg {
  display: grid;
  grid-template-columns: 3.4rem 1.1rem 1fr;
  gap: .55rem;
  padding: .8rem 0;
  align-items: start;
  /* The whole row is the tap target; forty-four points minimum. */
  min-height: 3rem;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  width: 100%;
}
.seg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.seg-dist {
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--muted);
  text-align: right;
  padding-top: .3rem;
  font-variant-numeric: tabular-nums;
}
.seg-rail { position: relative; justify-self: center; width: 1px; background: var(--line-strong); align-self: stretch; }
.seg-rail::after {
  content: "";
  position: absolute;
  top: .38rem; left: 50%;
  width: 7px; height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: var(--ground);
  border: 1.5px solid var(--line-strong);
}
.seg.playing .seg-rail::after {
  background: var(--accent);
  border-color: var(--accent);
  width: 10px; height: 10px;
  margin-left: -5px; top: .32rem;
}
.seg.past { opacity: .42; }

.seg-title { display: block; font-family: var(--display); font-size: 1.02rem; font-weight: 600; line-height: 1.25; }
.seg-hook { display: block; font-size: .86rem; color: var(--ink-2); line-height: 1.4; margin-top: .1rem; }
.seg-meta {
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .3rem;
  display: block;
}
.seg.playing .seg-meta { color: var(--accent); }

.empty { padding: 3rem 1.5rem; color: var(--muted); text-align: center; }

/* ---- player ---- */
.player-inner { max-width: 34rem; margin: 0 auto; width: 100%; }
.player {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--line-strong);
  padding: .8rem 1.1rem calc(.8rem + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: .6rem;
  z-index: 10;
}
.player-text { display: flex; flex-direction: column; gap: .1rem; min-height: 2.4rem; }
.now-title { font-family: var(--display); font-size: 1rem; font-weight: 600; }
.now-hook {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.player-bar { display: flex; align-items: center; gap: .9rem; }
.round {
  width: 3rem; height: 3rem;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  display: grid;
  place-items: center;
}
.round.primary {
  width: 3.6rem; height: 3.6rem;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-size: 1.5rem;
}
.round:active { transform: scale(.96); }
.round:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.elapsed {
  margin-left: auto;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.progress { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--accent); }

@media (prefers-reduced-motion: no-preference) {
  .progress-fill { transition: width .25s linear; }
  .seg { transition: opacity .2s ease; }
}

/* ---- views ---- */
.view { max-width: 34rem; margin: 0 auto; padding: 1rem 1.1rem 0; }
h1 a { color: inherit; text-decoration: none; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field { display: flex; flex-direction: column; gap: .4rem; border: 0; padding: 0; margin: 0; }
.field-label {
  font-family: var(--display);
  font-size: .72rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0;
}

input[type="text"] {
  background: var(--ground);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--ink);
  font-family: var(--body);
  /* Sixteen pixels or larger, or iOS zooms the page on focus. */
  font-size: 1rem;
  padding: .7rem .8rem;
  width: 100%;
}
input[type="text"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }

.chips { display: flex; flex-direction: column; gap: .55rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-group {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.chip {
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-2);
  font-family: var(--display);
  font-size: .78rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .42rem .8rem;
  /* Comfortably tappable rather than merely clickable. */
  min-height: 2.2rem;
}
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.primary-btn {
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  color: var(--on-accent);
  font-family: var(--display);
  font-size: .95rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .85rem 1rem;
  min-height: 3rem;
  width: 100%;
}
.primary-btn:disabled { opacity: .6; }
.primary-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.row { display: flex; gap: .6rem; align-items: stretch; }
.row .primary-btn { flex: 1; }
.row .ghost { white-space: nowrap; }

.note { margin: 0; font-size: .84rem; color: var(--muted); line-height: 1.45; }
.section-head {
  font-family: var(--display);
  font-size: .74rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.8rem 0 .5rem;
}

.preview-summary { margin: 0; font-family: var(--display); font-size: 1.05rem; }
.preview-cost { margin: 0; font-size: .9rem; color: var(--accent); }

.history { padding-bottom: 2rem; }
.history-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.history-row { display: flex; align-items: stretch; gap: .5rem; }
.history-row .history-item { flex: 1; min-width: 0; }
.history-remove {
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--muted);
  font-family: var(--display);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 0 .85rem;
  white-space: nowrap;
  /* Thumb-sized, like everything else that gets tapped in a car park. */
  min-width: 4.5rem;
}
.history-remove.armed { border-color: var(--accent); color: var(--accent); }
.history-remove:disabled { opacity: .5; }
.history-remove:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.history-item {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .8rem .9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  text-decoration: none;
  color: inherit;
  min-height: 3rem;
}
.history-route { font-family: var(--display); font-size: 1rem; font-weight: 600; }
.history-meta { font-family: var(--mono); font-size: .66rem; color: var(--muted); }
.history-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The preview list is read, not tapped. */
#preview-list .seg { cursor: default; }

.restart { margin-left: .4rem; align-self: center; }

/* ---- what is already cached ---- */
.reuse { display: flex; flex-direction: column; gap: .4rem; }
.reuse-row {
  display: grid;
  grid-template-columns: 6.5rem 1fr auto;
  gap: .6rem;
  align-items: center;
}
.reuse-label { font-family: var(--display); font-size: .78rem; letter-spacing: .04em; }
.reuse-bar {
  height: .5rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.reuse-fill { display: block; height: 100%; background: var(--accent); }
.reuse-count {
  font-family: var(--mono);
  font-size: .62rem;
  color: var(--muted);
  white-space: nowrap;
}

.check { display: flex; align-items: center; gap: .55rem; font-size: .88rem; color: var(--ink-2); }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }

/* ---- long-running work ---- */
.working {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: .9rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 3px;
}
.working-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.working-stage { font-family: var(--display); font-size: .92rem; font-weight: 600; }
.working-clock {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.working-detail { margin: 0; font-size: .8rem; color: var(--muted); line-height: 1.45; }

/* An indeterminate stage still has to look alive. */
.progress-fill.pulsing {
  width: 100% !important;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 40% 100%;
  background-repeat: no-repeat;
  animation: sweep 1.4s ease-in-out infinite;
}
@keyframes sweep {
  from { background-position: -40% 0; }
  to { background-position: 140% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .progress-fill.pulsing { animation: none; background: var(--accent); opacity: .5; }
}

/* ---- why this place is on the list ---- */
.seg-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.tag {
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: .16rem .38rem;
  border-radius: 2px;
  background: var(--accent-soft);
  color: var(--accent);
}
/* Matched nothing chosen; it earned its place on the article alone. */
.tag-none { background: var(--surface-2); color: var(--muted); }
.seg.playing .tag { background: var(--accent); color: var(--on-accent); }

/* ---- filtering a built trip ---- */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: .8rem 0 .9rem;
  border-bottom: 1px solid var(--line);
  position: sticky;
  /*
    Sits directly under the masthead. The offset is measured rather than
    guessed: the masthead grows by the safe-area inset on a notched phone, and
    a hardcoded value put the bar underneath it — where a higher z-index made
    it invisible, on exactly the devices this is built for.
  */
  top: var(--mast-height, 4.6rem);
  background: var(--ground);
  z-index: 4;
}
.filter-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.filter-count { font-family: var(--mono); font-size: .66rem; color: var(--muted); }
.seg-hidden { display: none; }
/* Still playing, but filtered out of the list. */
.seg.filtered-out { opacity: .35; }

.version {
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .06em;
  color: var(--muted);
  opacity: .7;
}

/* ---- location ---- */
.trip-controls { display: flex; align-items: center; gap: .7rem; padding: .8rem 0 .2rem; }
.trip-controls .ghost { min-height: 2.4rem; }
.ghost.live { border-color: var(--accent); color: var(--accent); }
.ghost.blocked { opacity: .6; }
.locate-note { font-size: .76rem; color: var(--muted); line-height: 1.4; }

/* Drive mode --------------------------------------------------------------
   The status card sits above the same timeline a planned trip uses. */
.start-card { display: flex; flex-direction: column; gap: .6rem; }
.drive-link {
  display: block;
  text-align: center;
  text-decoration: none;
  margin-top: .2rem;
}
.drive-bar { margin-bottom: 1rem; }
.drive-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0.7;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 3s; }
}

/* Shown only after the free part has played, so the story comes first. */
.upsell {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  opacity: 0.75;
}

/* ---- two views of one running order ---- */
.view-switch { display: flex; gap: .35rem; margin: .1rem 0 .9rem; }
.switch {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .3rem .7rem;
  border-radius: 2px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.switch.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- coverage: where each interest falls along the road ---- */
.coverage { display: flex; flex-direction: column; gap: .5rem; }
.cov-rows { display: flex; flex-direction: column; gap: .3rem; }
.cov-row { display: grid; grid-template-columns: 5.5rem 1fr; align-items: center; gap: .5rem; }
.cov-label {
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cov-row.all .cov-label { color: var(--ink); }
.cov-track {
  position: relative;
  height: 1.6rem;
  border-radius: 2px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
/* A mark is a real target, not a dot: it is how you reach a place from here. */
.cov-mark {
  position: absolute;
  top: 50%;
  /* Inset by half a mark at each end so the first and last sit fully inside. */
  left: calc(0.55rem + (100% - 1.1rem) * var(--at, 0));
  width: 1.1rem;
  height: 1.1rem;
  margin: -0.55rem 0 0 -0.55rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.cov-mark::after {
  content: "";
  display: block;
  width: .44rem;
  height: .44rem;
  margin: .33rem;
  border-radius: 50%;
  background: var(--accent);
}
.cov-row.all .cov-mark::after { width: .5rem; height: .5rem; margin: .3rem; }
.cov-mark.playing::after { background: var(--ink); transform: scale(1.35); }
.cov-mark.past::after { opacity: .38; }
.cov-mark:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Where the car is, when it is known. */
.cov-now {
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: calc(0.55rem + (100% - 1.1rem) * var(--at, 0));
  width: 2px;
  margin-left: -1px;
  background: var(--ink);
  opacity: .8;
  pointer-events: none;
}
.cov-axis {
  display: flex;
  justify-content: space-between;
  position: relative;
  font-family: var(--mono);
  font-size: .58rem;
  color: var(--muted);
  padding-left: 6rem;
}
.cov-here { color: var(--ink); }

@media (max-width: 30rem) {
  .cov-row { grid-template-columns: 4.2rem 1fr; }
  .cov-axis { padding-left: 4.7rem; }
}

/* ---- account ---- */
.mast-actions { display: flex; gap: .4rem; align-items: center; }
.account-error { color: var(--accent); }
.account-can {
  margin: .5rem 0 0;
  padding-left: 1.1rem;
  font-size: .85rem;
  color: var(--muted);
}
.account-can li { margin: .15rem 0; }
.drive-locked { text-align: center; margin-top: .4rem; }
/* Kept in the flow rather than hidden, so the feature is visible and priced
   rather than absent — a missing control reads as a broken deploy. */
.drive-link.locked { opacity: .5; }

/* ---- drive status ---- */
.drive-status { display: flex; align-items: baseline; gap: .5rem; }
.drive-mark {
  font-family: var(--mono);
  font-weight: 700;
  line-height: 1;
}
/* Found is the accent; empty is quiet because it is a normal answer on an
   empty road; failed is the only one that should catch the eye. */
.drive-found { color: var(--accent); }
.drive-empty { color: var(--muted); }
.drive-failed { color: #E0794F; }
.drive-clock {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: -.35rem;
}

/* ---- what drive mode is listening for ---- */
.drive-what { margin-top: .5rem; }
.drive-what > summary {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}
.drive-what > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.drive-what[open] > summary { margin-bottom: .6rem; color: var(--ink); }

/* What the drive has collected so far, and how much is already behind. */
.drive-tally { font-size: .85rem; color: var(--ink-2, var(--ink)); margin-top: .1rem; }
/* Passed places stay reachable, so they are dimmed rather than greyed out. */
.seg.past { opacity: .55; }

/* ---- what kind of row this is ---- */
.history-icon {
  width: 1rem;
  height: 1rem;
  flex: none;
  margin-right: .5rem;
  vertical-align: -0.16em;
  color: var(--accent);
  opacity: .85;
}
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* Sets up the two choices below it. */
/* Cards in this view stack flush against each other, so a negative margin here
   pulled the first one up over this line. Plain spacing instead. */
.lede {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .55rem;
  padding-left: .1rem;
}

/* ---- admin ---- */
.admin-map {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface-2);
}
.admin-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .5rem;
}
.admin-legend .dot {
  display: inline-block;
  border-radius: 50%;
  background: var(--accent);
  margin-right: .3rem;
  vertical-align: -0.05em;
}
.dot-small { width: .3rem; height: .3rem; }
.dot-large { width: .6rem; height: .6rem; }
.dot-liked { width: .5rem; height: .5rem; background: #3E9B76; }
.dot-disliked { width: .5rem; height: .5rem; background: #C4553B; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: .8rem;
}
.stat-cell { display: flex; flex-direction: column; }
.stat-cell b {
  font-family: var(--display);
  font-size: 1.6rem;
  line-height: 1;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stat-cell span {
  font-family: var(--mono);
  font-size: .56rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .2rem;
}
.admin-sub {
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1rem 0 .2rem;
}
.bars { display: flex; flex-direction: column; gap: .3rem; }
.bar-row { display: grid; grid-template-columns: 6rem 1fr 2rem; gap: .5rem; align-items: center; }
.bar-row span:first-child {
  font-family: var(--mono);
  font-size: .58rem;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}
.bar-fill { height: .55rem; background: var(--accent); border-radius: 2px; min-width: 2px; }
.bar-row span:last-child {
  font-family: var(--mono);
  font-size: .58rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.admin-results, .admin-feedback { list-style: none; margin: .6rem 0 0; padding: 0; }
.admin-results li, .admin-feedback li {
  padding: .55rem 0;
  border-top: 1px solid var(--line);
  font-size: .9rem;
}
.admin-feedback .meta {
  font-family: var(--mono);
  font-size: .56rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: .2rem;
}
.admin-feedback button { margin-top: .35rem; }

/* The driving views are sized for a phone held in one hand. Admin is read at a
   desk, and a coverage map squeezed to 34rem cannot show a route as a shape. */
#view-admin { max-width: 62rem; }

/* A driven road is solid; a planned one is dashed. The distinction is the whole
   point of drawing both. */
.admin-legend .line {
  display: inline-block;
  width: 1.1rem;
  height: 0;
  margin-right: .3rem;
  vertical-align: .18em;
}
.line-drive { border-top: 2.5px solid #3E9B76; }
.line-route { border-top: 2px dashed var(--accent); }

.map-tools { display: flex; gap: .35rem; align-items: center; margin-bottom: .5rem; }
.map-tools .ghost { padding: .25rem .6rem; }
.map-zoom {
  font-family: var(--mono);
  font-size: .6rem;
  color: var(--muted);
  margin-left: .2rem;
}

/* Only a zoomed map can be panned, and it should say so before being tried. */
.admin-map.pannable { cursor: grab; touch-action: none; }
.admin-map.pannable:active { cursor: grabbing; }

/* ---- signed-out pitch ---- */
.pitch { display: flex; flex-direction: column; gap: .9rem; margin-bottom: 1.4rem; }
.pitch-eyebrow {
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.pitch-head {
  font-family: var(--display);
  font-size: clamp(1.9rem, 7vw, 2.6rem);
  line-height: 1.02;
  font-weight: 600;
  margin: -.2rem 0 0;
  text-wrap: balance;
}
.pitch-lede { font-size: 1.06rem; line-height: 1.55; color: var(--ink-2, var(--ink)); margin: 0; }
.pitch-sub {
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1rem 0 -.3rem;
}
.pitch-body { margin: 0; font-size: .95rem; line-height: 1.6; }
.pitch-caption { font-size: .82rem; color: var(--muted); line-height: 1.5; margin: 0; }

.pitch-example {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 3px;
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.pitch-quote { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--accent); }

.pitch-steps { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .5rem; }
.pitch-steps li { font-size: .95rem; line-height: 1.55; }

.scroll-x { overflow-x: auto; }
.plans { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 22rem; }
.plans th, .plans td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--line); }
.plans thead th {
  font-family: var(--mono);
  font-size: .55rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}
.plans td:not(:first-child) { text-align: center; font-family: var(--mono); font-size: .72rem; }
.plans tbody td:first-child { color: var(--ink); }
.plans thead th:last-child { color: var(--accent); }

.pitch-actions { display: flex; flex-direction: column; gap: .4rem; margin-top: .6rem; }
.pitch-actions .primary-btn { text-align: center; text-decoration: none; }

/* ---- members ---- */
.members { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 30rem; }
.members th {
  text-align: left;
  font-family: var(--mono);
  font-size: .55rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
  padding: .35rem .6rem .35rem 0;
  border-bottom: 1px solid var(--line);
}
.members td { padding: .5rem .6rem .5rem 0; border-bottom: 1px solid var(--line); }
.members td:nth-child(2) { font-family: var(--mono); font-size: .72rem; }
.members td:nth-child(3), .members td:nth-child(4) {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.members select {
  font: inherit;
  font-size: .8rem;
  padding: .18rem .35rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink);
}
.members select:disabled { opacity: .5; }

.map-play { margin-top: .5rem; }
.admin-results button { margin-top: .35rem; }

/* ---- confirming an address, and changing a password ---- */
.verify {
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: .8rem .9rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin: .6rem 0;
}
.verify input {
  font-family: var(--mono);
  font-size: 1.1rem;
  letter-spacing: .3em;
  width: 7rem;
  text-align: center;
  padding: .3rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink);
}
.trial-note { color: var(--accent); }
.password-box { margin-top: .6rem; }
.password-box > summary {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}
.password-box[open] > summary { margin-bottom: .6rem; color: var(--ink); }
.password-box .field { margin-bottom: .5rem; }

.members td.suspended { text-decoration: line-through; color: var(--muted); }
.members td:last-child { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.plan-history {
  margin: .4rem 0 0;
  padding-left: 1.1rem;
  font-family: var(--mono);
  font-size: .66rem;
  color: var(--muted);
  line-height: 1.7;
}
