/* DriveStream web companion — layered on the marketing site's style.css. */

/* The `hidden` attribute only works because the UA stylesheet sets display:none, and ANY author
   `display` rule outranks it. Several things here are flex/grid and toggled with `hidden`, so
   without this they stay visible when hidden — the signed-out page showed its tabs and trip picker.
   Keep this above every layout rule below. */
[hidden] { display: none !important; }

.tabs { display: flex; gap: 18px; margin-left: 24px; font-size: 15px; }
.tabs a { color: var(--ink-soft); padding: 4px 0; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--coral); font-weight: 640; }
header.site .spacer { margin-left: auto; }
.who { color: var(--ink-soft); font-size: 14px; margin-right: 14px; }

.gate { text-align: center; padding: 70px 0 90px; }
.gate-icon {
  width: 88px; height: 88px; border-radius: 20px; margin-bottom: 24px;
  box-shadow: 0 6px 0 var(--shade);   /* the same slab the landing page's hero icon sits on */
}
.gate h1 { font-size: clamp(28px, 5vw, 40px); letter-spacing: -.025em; margin: 0 0 12px; font-weight: 780; }
.gate .lede { color: var(--ink-soft); max-width: 520px; margin: 0 auto 26px; }

/* Sign in with Apple. Apple's guidelines want their own mark, unaltered, on a solid black or white
   button with a corner radius under half the height — so this one deliberately doesn't inherit the
   slab shadow the other buttons carry. `currentColor` on the path keeps the mark legible if the
   button is ever flipped to the white variant. */
.gate .btn-apple {
  background: #000; color: #fff; border-color: #000;
}
.gate .btn-apple:hover { background: #1a1a1a; }
.gate .btn-apple .applemark { width: 17px; height: 17px; margin-top: -2px; }

/* `flex` rather than `inline-flex`: a flex box is block-level, so the two providers stack instead of
   racing each other for the same line on a wide screen. Same width, so neither reads as the
   afterthought. */
.gate .btn-apple, .gate #signin {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: min(280px, 100%); margin: 0 auto 10px;
}

.tripbar { display: flex; align-items: center; gap: 12px; padding: 22px 0 6px; flex-wrap: wrap; }
.tripbar label { font-size: 13px; font-weight: 650; color: var(--ink-soft); }
.tripmeta { font-size: 13.5px; color: var(--ink-faint); }

.view { padding: 18px 0 80px; }
.view h1 { font-size: clamp(24px, 4vw, 32px); letter-spacing: -.02em; margin: 0 0 4px; font-weight: 760; }
.view .sub { color: var(--ink-soft); margin: 0 0 22px; font-size: 15px; }

/* `email` and `password` were missing here when the sign-in form landed, so those two fields fell
   through to the UA default — a white box with white-ish text, unreadable in dark mode. Any new
   input type has to be added to this list; there is no bare `input` rule to catch it. */
select,
input[type="url"], input[type="text"], input[type="number"],
input[type="email"], input[type="password"] {
  padding: 10px 13px; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
select:focus, input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
input[type="url"], input[type="text"], input[type="email"], input[type="password"] { width: 100%; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 21px;
  /* A slab with a visible side face, like ChunkySurface in the app and the cards on the landing
     page. Zero blur on purpose — the look builds depth from adjacent flat faces, never a blend. */
  box-shadow: 0 5px 0 var(--shade);
}
.card h2 { font-size: 16.5px; font-weight: 700; margin: 0 0 3px; letter-spacing: -.01em; }
.card .sub { font-size: 13.5px; color: var(--ink-faint); margin: 0 0 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.row .btn { flex: 0 0 auto; padding: 10px 18px; font-size: 15px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* metrics */
.metrics { display: flex; gap: 10px; flex-wrap: wrap; }
.metric { flex: 1; min-width: 118px; }
.metric .value { display: block; font-size: 24px; font-weight: 780; letter-spacing: -.02em; }
.metric .label { font-size: 11.5px; font-weight: 650; color: var(--ink-faint);
                 text-transform: uppercase; letter-spacing: .04em; }

/* map */
.map { height: 460px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.map.tall { height: 560px; }
.marker {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  color: #fff; font-weight: 750; font-size: 13px; border: 2.5px solid var(--card);
  box-shadow: 0 2px 0 rgba(46,58,47,.45); cursor: default;
}
.marker.off { opacity: .45; }

/* ---------- drive replay transport ---------- */

.replay { margin-top: 14px; padding: 16px 18px; }
.replay-readouts { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.replay-readouts .value {
  display: block; font-size: 21px; font-weight: 780; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.replay-readouts .label {
  font-size: 11px; font-weight: 650; color: var(--ink-faint);
  text-transform: uppercase; letter-spacing: .04em;
}

/* Range inputs get no theming at all by default — left alone this is a grey system slider on a
   cream slab, which is the one control that would give away that the page isn't the app. */
#r-scrub {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 999px; margin: 0 0 14px;
  background: var(--bg-soft); border: 1px solid var(--line); cursor: pointer;
}
#r-scrub::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--coral);
  box-shadow: 0 2px 0 var(--shade);
}
#r-scrub::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--coral); box-shadow: 0 2px 0 var(--shade);
}

.replay-controls { display: flex; align-items: center; gap: 12px; }
.replay-controls .btn { padding: 9px 20px; font-size: 15px; line-height: 1; }
.rates { display: flex; gap: 4px; margin-left: auto; }
.rates button {
  font: inherit; font-size: 13px; font-weight: 650; cursor: pointer;
  padding: 6px 11px; border-radius: 999px;
  background: var(--bg-soft); color: var(--ink-soft); border: 1px solid transparent;
}
.rates button.on { background: var(--card); color: var(--ink); border-color: var(--line); }
.replay-note {
  margin: 12px 0 0; font-size: 12.5px; color: var(--ink-faint); text-align: center;
}

/* ---------- the scoreboard ---------- */

/* The arcade primitives themselves live in style.css, because the landing page draws them too.
   What's here is only how this app arranges them. */

.scoreboard { display: grid; gap: 14px; }
.score-line { margin: 0; font-size: 13.5px; color: var(--ink-faint); }
.score-row {
  display: grid; gap: 16px 20px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
/* Only the scoreboard's own row gets the rule above it; the stats view uses `.score-row` as a whole
   card and has the card's own edge already. */
.scoreboard .score-row { padding-top: 14px; border-top: 1px solid var(--line); }
/* The positioned ancestor the RECORD ribbon hangs off. */
.score-cell { position: relative; min-width: 0; }
.score-meta {
  margin: 3px 0 0; font-size: 12.5px; color: var(--ink-faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* A medal sitting beside a caption is furniture, not the row's subject — the 32px badge that reads
   correctly at the head of a leaderboard row is oversized next to an 11px label. */
.hero-num .cap .medal {
  --medal: 22px;
  box-shadow: 0 2px 0 var(--shade);
  box-shadow: 0 2px 0 oklch(from var(--paint) calc(l - 0.18) calc(c * 0.94) h);
}
.hero-num .cap .medal.crowned::before { display: none; }

/* member rows */
.members { list-style: none; margin: 0; padding: 0; }
.members li {
  display: flex; align-items: center; gap: 13px; padding: 13px 4px;
  border-bottom: 1px solid var(--line);
}
.members li:last-child { border-bottom: 0; }
.members li.offline,
.board li.offline { opacity: .55; }
.avatar {
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-weight: 750; font-size: 15px;
}
.who-col { flex: 1; min-width: 0; }
.who-col .name { font-size: 15.5px; font-weight: 640; }
.who-col .meta { font-size: 13px; color: var(--ink-faint); margin-top: 1px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip {
  font-size: 12.5px; font-weight: 640; padding: 3px 9px; border-radius: 999px;
  background: var(--bg-soft); color: var(--ink-soft); white-space: nowrap;
}
/* These two were literal rgba() left over from the old palette — a hot pink and a teal-mint that
   no longer exist anywhere. Derive them from the paint instead so they can never desync again. */
.chip.warn { background: color-mix(in srgb, var(--coral) 14%, transparent); color: var(--coral); }
.chip.good { background: color-mix(in srgb, var(--mint) 16%, transparent); color: var(--mint); }
.chip.pos  { color: var(--mint); }
.chip.neg  { color: var(--coral); }

/* stops list (planner) */
.stops { list-style: none; margin: 0 0 14px; padding: 0; }
.stops:empty { display: none; }
.stops li {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: var(--bg-soft);
}
.stops li.dragging { opacity: .45; }
.stops .grip { cursor: grab; color: var(--ink-faint); user-select: none; }
.stops .idx { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
              font-size: 12px; font-weight: 700; background: var(--blue); color: #fff; flex: 0 0 auto; }
.stops .name { flex: 1; min-width: 0; font-size: 15px; }
.stops .name small { display: block; color: var(--ink-faint); font-size: 12.5px;
                     overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stops .remove { border: 0; background: transparent; color: var(--ink-faint); cursor: pointer;
                 font-size: 17px; padding: 4px 6px; border-radius: 8px; }
.stops .remove:hover { color: var(--coral); background: var(--bg); }

/* generic list rows */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; gap: 14px; padding: 11px 2px;
           border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--ink-soft); }
.rows li:last-child { border-bottom: 0; }
.rows li b { color: var(--ink); font-weight: 640; }
/* The positioned ancestor the LONGEST ribbon hangs off — only the one row that carries it. */
.rows li.ribboned { position: relative; }
.rows li .nums { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

.status { font-size: 14px; color: var(--ink-soft); margin: 10px 0 0; }
.status.err { color: var(--coral); }
.status.ok  { color: var(--mint); }
.empty { text-align: center; color: var(--ink-faint); padding: 40px 12px; font-size: 15px; }
.invite-code { font-size: 30px; font-weight: 800; letter-spacing: .16em;
               font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

@media (max-width: 720px) {
  .tabs { margin-left: 0; gap: 14px; font-size: 14px; overflow-x: auto; }
  header.site .wrap { flex-wrap: wrap; height: auto; padding-block: 10px; gap: 8px; }
  .map { height: 380px; }
}

/* ---------- email sign-in (gate) ---------- */

.emailform {
  max-width: 340px; margin: 18px auto 0;
  display: flex; flex-direction: column; gap: 10px;
}
.emailform input { text-align: center; }
.emailform .row { display: flex; gap: 10px; }
.emailform .row .btn { flex: 1; text-align: center; }
.linkish {
  background: none; border: 0; padding: 4px; cursor: pointer;
  color: var(--ink-faint); font: inherit; font-size: 13.5px;
}
.linkish:hover { color: var(--ink-soft); }
.autherr {
  margin: 0; font-size: 13.5px; color: var(--coral); font-weight: 640;
}

/* ---------- admin ---------- */

.admin-summary { display: flex; gap: 10px; margin-bottom: 12px; }
.admin-summary div {
  flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; box-shadow: 0 4px 0 var(--shade);
}
.admin-summary b { display: block; font-size: 26px; font-weight: 800; line-height: 1.1; }
.admin-summary span { font-size: 12px; color: var(--ink-soft); }

.admin-note { font-size: 13px; color: var(--ink-faint); margin: 0 0 18px; }

.admin-trip {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 4px 0 var(--shade);
  padding: 16px 18px; margin-bottom: 14px;
}
.admin-trip header { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.admin-trip h3 { margin: 0; font-size: 17px; font-weight: 700; }
.admin-trip .chip {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  background: color-mix(in srgb, var(--coral) 15%, transparent); color: var(--coral);
  padding: 3px 8px; border-radius: 6px;
}
.admin-trip .chip.solo { background: color-mix(in srgb, var(--violet) 15%, transparent); color: var(--violet); }
.admin-trip .small { font-size: 12px; margin: 6px 0 10px; }

.admin-people { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.who-chip {
  font-size: 12.5px; font-weight: 600;
  background: var(--bg-soft); border: 1px solid var(--line);
  padding: 4px 9px; border-radius: 999px;
}
.who-chip i { font-style: normal; color: var(--ink-faint); font-weight: 500; margin-left: 5px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th {
  text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 700; padding: 0 8px 6px;
}
.admin-table td { padding: 7px 8px; border-top: 1px solid var(--line); }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table .dim, .admin-trip .dim { color: var(--ink-faint); }

@media (max-width: 640px) {
  .admin-summary { flex-direction: column; }
  .admin-table th:nth-child(3), .admin-table td:nth-child(3) { display: none; }
}

.admin-heading {
  font-size: 18px; font-weight: 750; letter-spacing: -.01em;
  margin: 30px 0 6px; padding-top: 20px; border-top: 1px solid var(--line);
}

.admin-table a { color: var(--blue); text-decoration: none; font-weight: 600; }
.admin-table a:hover { text-decoration: underline; }
