/* Copart shortlist v5. One neutral palette, one accent, one page scroll. */

:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --line: #e6e2db;
  --line-strong: #d3cec5;
  --text: #1f1d1a;
  --muted: #645f57;
  --faint: #8d877d;
  --accent: #b4530a;
  --accent-ink: #8a3d05;
  --accent-tint: #fbefe3;
  --radius: 12px;
  --toast-bottom: 16px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}

body.lb-open { overflow: hidden; }

a { color: inherit; }

h1, h2, h3 { margin: 0; line-height: 1.2; }

button, input, select { font: inherit; color: inherit; }

[hidden] { display: none !important; }

.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- header ---------- */

.top {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.top-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px 16px;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
}

.source {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  flex: 1 1 260px;
}

.src-label { color: var(--text); }

.report {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 16px 12px;
  font-size: 14px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 16px 64px;
}

/* ---------- buttons ---------- */

.btn, .btn-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn { background: var(--text); color: #fff; border: 1px solid var(--text); }
.btn:hover { background: #3a3631; }
.btn[disabled] { opacity: 0.4; cursor: default; }

.btn-quiet { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); }
.btn-quiet:hover { border-color: var(--text); }

.btn.wide { width: 100%; min-height: 46px; }

.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  font-size: inherit;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- top of the list: the chosen day and "Add today's sales list" ---------- */

.list-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-bottom: 16px;
}

.add-list { margin-left: auto; }

.day-pick { position: relative; }

.day-pick summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  font-size: 16px;
  cursor: pointer;
  user-select: none;
}

.day-pick summary::-webkit-details-marker { display: none; }
.day-pick summary:hover { border-color: var(--text); }
.day-pick .caret { margin-left: 4px; color: var(--muted); font-size: 13px; transition: transform 0.15s; }
.day-pick[open] .caret { transform: rotate(180deg); }

.days {
  position: absolute;
  z-index: 15;
  top: calc(100% + 6px);
  left: 0;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.day {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 15px;
}

.day b { font-weight: 700; }
.day:hover { background: var(--bg); }
.day.on { background: var(--text); color: #fff; }

.banner {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent-tint);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 600;
}

.banner.soft { background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-weight: 500; }

/* ---------- make and model breakdown ---------- */

.breakdown {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.bd-head {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.bd {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15px;
  color: var(--muted);
}

.bd li { padding: 3px 0; break-inside: avoid; }

.bd a { text-decoration: none; }
.bd a:hover { text-decoration: underline; }
.bd-make { color: var(--text); font-weight: 600; }
.bd .n { color: var(--faint); font-weight: 400; font-size: 14px; }
.bd a.on { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- toolbar ---------- */

.toolbar { margin-bottom: 12px; }

.lanes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.lanes-label { font-size: 14px; color: var(--muted); margin-right: 4px; }

.lane-chip {
  min-width: 40px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.lane-chip.on { background: var(--text); color: #fff; border-color: var(--text); }
.lane-chip small { font-weight: 500; font-size: 12.5px; color: var(--faint); margin-left: 5px; }
.lane-chip.on small { color: #d8d3cb; }
.lane-chip.off { color: var(--line-strong); border-color: var(--line); background: transparent; cursor: default; }

.run-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  margin-bottom: 12px;
}

.run-filters .lanes { margin-bottom: 0; }

.item-range {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.item-range input {
  width: 84px;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  font-size: 15px;
}

.item-range input[disabled] { background: transparent; border-color: var(--line); }
.item-range .dash { font-size: 14px; color: var(--muted); }

.toolbar-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: end;
}

.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-size: 13px; color: var(--muted); }

.field select, .field input {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  font-size: 15px;
}

.field select { appearance: none; -webkit-appearance: none; padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 18px, calc(100% - 11px) 18px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.filters-toggle { min-height: 42px; }

/* ---------- filter panel ---------- */

.filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 600; font-size: 15px; margin-bottom: 8px; padding: 0; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  font-size: 15px;
}

.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.check .n { color: var(--faint); font-size: 13px; }
.check.strong { font-weight: 600; margin-bottom: 4px; }

.filters-foot { margin: 14px 0 0; font-size: 14px; }

/* ---------- tabs ---------- */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line-strong);
  margin: 8px 0 12px;
}

.tab {
  padding: 12px 14px 10px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 16px;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}

.tab b { font-weight: 700; color: var(--faint); margin-left: 4px; }
.tab.on { color: var(--text); border-bottom-color: var(--accent); }
.tab.on b { color: var(--text); }

.keys-hint { font-size: 13px; color: var(--faint); margin: 0 0 12px; }

@media (hover: none) { .keys-hint { display: none; } }

.note { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.note a { color: var(--accent-ink); }

.export {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}

.export p { flex-basis: 100%; margin: 0; font-size: 14px; color: var(--muted); }

.empty { color: var(--muted); padding: 32px 0; }

.removed-link { margin-top: 20px; font-size: 14px; }
.removed-link a { color: var(--muted); }

/* ---------- cards ---------- */

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card[data-status="maybe"] { box-shadow: inset 4px 0 0 #e7c3a0; }
.card[data-status="bid"] { box-shadow: inset 4px 0 0 var(--accent); }
.card.focused { outline: 2px solid var(--text); outline-offset: 2px; }

/* Three lines beside the photo: run info, the car, damage · miles · bid. */
.card-open {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  grid-template-areas: "thumb run" "thumb car" "thumb facts";
  grid-template-rows: auto auto 1fr;
  column-gap: 14px;
  row-gap: 3px;
  align-content: start;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.card-open:focus-visible { outline-offset: -2px; }

.thumb {
  grid-area: thumb;
  width: 120px;
  height: 90px;
  border-radius: 8px;
  object-fit: cover;
  background: #ece9e3;
  display: block;
}

.thumb-none {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--faint);
}

.run-line { grid-area: run; font-size: 15px; line-height: 1.35; }
.run-line .item { font-weight: 800; font-size: 17px; }
.run-line .lane { font-weight: 600; }
.run-line .est { color: var(--accent-ink); font-weight: 600; white-space: nowrap; }
.run-line .item-none, .run-line .yard-name { color: var(--muted); }
.run-line .unset { color: var(--muted); font-style: italic; }
.item { font-weight: 800; letter-spacing: -0.01em; }
.item-none { font-weight: 600; color: var(--muted); letter-spacing: 0; }
.sep { color: var(--faint); }
.lane { font-weight: 700; }
.lane-unknown { color: var(--accent-ink); }

/* ---------- one group per yard (default sort) ---------- */

.yard-group + .yard-group { margin-top: 26px; }

.yard-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin: 0 0 12px;
  padding: 0 2px 8px;
  border-bottom: 1px solid var(--line-strong);
  font-size: 17px;
  font-weight: 700;
}

.yh-time { font-size: 15px; font-weight: 600; }
.yh-time small { font-size: 13.5px; font-weight: 500; color: var(--faint); margin-left: 4px; }
.yh-time.unset { color: var(--muted); font-style: italic; }
.yh-count { margin-left: auto; font-size: 14px; font-weight: 500; color: var(--muted); }

.times-key { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.times-key .nw { white-space: nowrap; }
.times-key input {
  width: 64px;
  min-height: 32px;
  padding: 0 6px;
  margin: 0 2px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  font-size: 14px;
}

.car { grid-area: car; font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }

.facts { grid-area: facts; font-size: 14.5px; color: var(--muted); }
.fact { white-space: nowrap; }

.warn { color: var(--accent-ink); }
.odo-actual { color: inherit; }

/* The car's own Copart run status: a small tag. */
.cat {
  display: inline-block;
  margin-left: 6px;
  padding: 0 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: 0;
  color: var(--muted);
  white-space: nowrap;
  vertical-align: 1px;
}
.cat-drives { background: #e3f4e6; border-color: #9fd3a8; color: #1d6b2c; }
.cat-run { background: var(--accent-tint); border-color: #efcfae; color: var(--accent-ink); }

/* A lot or item number found on another day. */
.elsewhere-box { display: grid; gap: 6px; margin: 0 0 12px; }
.elsewhere {
  display: block;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  text-decoration: none;
  font-size: 15px;
}
.elsewhere:hover { border-color: var(--text); }
.elsewhere b { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.elsewhere span { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }

/* Phone-only and wide-only copies of the same control. */
.phone-only { display: none; }
.bd-toggle { display: none; }

.card-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.act {
  min-height: 46px;
  border: 0;
  background: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.act + .act { border-left: 1px solid var(--line); }
.act:hover { background: #faf9f7; color: var(--text); }
.act-maybe[aria-pressed="true"] { background: var(--accent-tint); color: var(--accent-ink); }
.act-bid[aria-pressed="true"] { background: var(--accent); color: #fff; }
.act-removed[aria-pressed="true"] { background: #efede9; color: var(--text); }

/* ---------- detail ---------- */

.detail-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 15px;
}

.detail-nav .back { font-weight: 600; text-decoration: none; }
.detail-nav .pos { color: var(--muted); }
.detail-nav .step { margin-left: auto; display: flex; gap: 16px; }
.detail-nav .step a { text-decoration: none; font-weight: 600; }
.detail-nav .off { color: var(--line-strong); }

.detail-grid { display: flex; flex-direction: column; gap: 16px; }
.detail-main, .detail-side { display: contents; }
.side-head { order: 1; }
.gallery { order: 2; }
.side-rest { order: 3; }
.facts-box { order: 4; }

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.ph {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: #ece9e3;
}

.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph.lead { grid-column: span 4; grid-row: span 4; aspect-ratio: auto; background-size: cover; background-position: center; }
.ph:hover img { opacity: 0.92; }

.item-big { margin: 0 0 4px; }
.item-big .item { font-size: 26px; }
.item-big .item-none { font-size: 16px; }
.item-big .lane { font-size: 20px; }
.est-big { margin: 4px 0 0; font-size: 16px; }
.est-big b { color: var(--accent-ink); }
.est-big small { color: var(--muted); font-size: 14px; }
.dist-line { margin: 6px 0 0; }
.detail-title { font-size: 22px; font-weight: 700; }
.when-big { margin: 6px 0 0; font-size: 16px; }
.when-big small { color: var(--muted); font-size: 14px; }
.bidline { font-size: 17px; margin: 6px 0 0; }

.side-rest { display: flex; flex-direction: column; gap: 10px; }

.triage { display: none; }

.fold {
  border-top: 1px solid var(--line);
  padding: 4px 0;
}

.fold summary {
  cursor: pointer;
  padding: 10px 0;
  font-weight: 600;
  font-size: 15px;
  color: var(--muted);
  list-style-position: inside;
}

.fold[open] summary { color: var(--text); }
.fold p { margin: 0 0 8px; font-size: 15px; }
.big-line { font-size: 18px; font-weight: 700; }

.maxbid { display: grid; gap: 8px; padding-bottom: 8px; }
.maxbid .answer { font-size: 18px; font-weight: 700; margin: 4px 0 0; }

.facts-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.facts-box h2 { font-size: 16px; margin-bottom: 8px; }

dl { margin: 0; }

.facts-box dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
}

.dl-item {
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

dt { color: var(--muted); font-size: 13px; }
dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.missing { color: var(--faint); font-style: italic; }

.why { margin: 0; padding-left: 18px; font-size: 14.5px; color: var(--muted); }
.why li { margin: 3px 0; }

.actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line-strong);
  z-index: 20;
}

#detail-view { padding-bottom: 80px; }
body.in-detail .toast { bottom: 92px; }

.act.big {
  min-height: 50px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
}

.act.big + .act.big { border-left: 1px solid var(--line-strong); }
.act.big.act-maybe[aria-pressed="true"] { background: var(--accent-tint); color: var(--accent-ink); border-color: #e7c3a0; }
.act.big.act-bid[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.act.big.act-removed[aria-pressed="true"] { background: #efede9; }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #121110;
}

.lb-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-stage {
  position: absolute;
  top: 8vh;
  bottom: 8vh;
  left: 3vw;
  right: 3vw;
  display: flex;
  align-items: center;
  justify-content: center;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}

.lb-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.lb-btn[disabled] { opacity: 0.25; cursor: default; }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }

.lb-close {
  position: absolute;
  top: 12px;
  right: 12px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.lb-count {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  margin: 0;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: var(--toast-bottom);
  z-index: 40;
  background: var(--text);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 15px;
  max-width: calc(100vw - 24px);
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

.toast .link { color: #ffd9b3; font-weight: 600; }

/* ---------- import ---------- */

.import { max-width: 760px; }
.import h1 { font-size: 24px; margin: 8px 0 10px; }
.import .back { text-decoration: none; font-weight: 600; }

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 170px;
  margin: 18px 0;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  padding: 16px;
}

.drop:hover { border-color: var(--accent); }
.steps { font-size: 16px; }

/* Files dragged over the page: one quiet frame says where they go. */
body.dragging::after {
  content: "Drop your sales lists to add them";
  position: fixed;
  inset: 10px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px dashed var(--accent);
  border-radius: 16px;
  background: rgba(247, 246, 243, 0.92);
  color: var(--accent-ink);
  font-size: 20px;
  font-weight: 700;
  pointer-events: none;
}
.drop b { font-size: 18px; }
.drop span { color: var(--muted); }

.map { display: grid; gap: 0; margin: 12px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 14px; }

.map-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.map-row:last-child { border-bottom: 0; }
.map-field { font-weight: 600; font-size: 15px; }
.map-row select { min-height: 40px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 8px; background: var(--surface); }
.map-sample { font-size: 13px; color: var(--faint); overflow-wrap: anywhere; }
.import-go { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.error { color: #9b1c1c; font-size: 15px; }

.noscript { max-width: 1180px; margin: 0 auto; padding: 8px 16px; color: var(--muted); }

/* ---------- small phones: the first car fits on the first screen ---------- */
/* Header, day picker and banner are smaller; the make list folds behind one
   line; the lane chips and item range move into the filter panel. */

@media (max-width: 719px) {
  .top-inner { padding: 6px 14px 7px; gap: 0 12px; }
  .brand { font-size: 15px; }
  .source { flex-basis: 100%; font-size: 12.5px; line-height: 1.35; }
  .report { padding: 6px 14px 8px; font-size: 13px; }
  .wrap { padding: 10px 14px 64px; }
  .list-top { gap: 8px; margin-bottom: 8px; }
  .day-pick summary { min-height: 38px; padding: 0 10px; font-size: 15px; }
  .add-list { min-height: 38px; padding: 0 10px; font-size: 13.5px; }
  .banner { margin-bottom: 8px; padding: 6px 10px; font-size: 13px; border-radius: 8px; }

  .breakdown { padding: 0; margin-bottom: 8px; border-radius: 10px; }
  .bd-head { display: none; }
  .bd-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 36px;
    padding: 0 12px;
    background: none;
    border: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    text-align: left;
    cursor: pointer;
  }
  .bd-show { margin-left: auto; color: var(--accent-ink); font-size: 13.5px; }
  .breakdown.open .bd-show { font-size: 0; }
  .breakdown.open .bd-show::before { content: "Hide makes"; font-size: 13.5px; }
  .bd-toggle .caret { color: var(--muted); font-size: 12px; transition: transform 0.15s; }
  .breakdown.open .bd-toggle .caret { transform: rotate(180deg); }
  .breakdown:not(.open) .bd { display: none; }
  .breakdown.open .bd { padding: 0 12px 10px; font-size: 14.5px; }

  .toolbar { margin-bottom: 8px; }
  .toolbar > .run-filters { display: none; }
  .toolbar-row { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
  .toolbar-row .field { grid-column: span 3; }
  .toolbar-row .sort-field { grid-column: span 4; order: 1; }
  .toolbar-row .filters-toggle { grid-column: span 2; order: 2; }
  .toolbar-row .search { grid-column: 1 / -1; order: 3; }
  .toolbar-row .field > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .field select, .field input { min-height: 38px; font-size: 14.5px; }
  .field select { background-position: calc(100% - 16px) 16px, calc(100% - 11px) 16px; }
  .filters-toggle { min-height: 38px; padding: 0 8px; }
  span.phone-only { display: inline; }
  fieldset.phone-only { display: block; }
  .wide-only { display: none; }

  .tabs { margin: 2px 0 8px; }
  .tab { padding: 8px 12px 7px; font-size: 15px; }
  .note { font-size: 13px; margin-bottom: 6px; }
  .times-key { font-size: 13px; margin-bottom: 8px; }
  .yard-head { font-size: 16px; margin-bottom: 8px; padding-bottom: 6px; }

  /* The run line takes the full card width, above the photo. */
  .card-open {
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-areas: "run run" "thumb car" "thumb facts";
    row-gap: 4px;
  }
  .run-line { margin-bottom: 4px; }
  .thumb { width: 96px; height: 72px; }
  .yh-count { margin-left: 0; }
  .run-filters .lanes { gap: 5px; }
  .run-filters .lanes-label { margin-right: 0; }
  .lane-chip { min-width: 34px; padding: 0 7px; font-size: 14px; }
  .lane-chip small { margin-left: 3px; font-size: 11.5px; }
}

/* ---------- wider screens ---------- */

@media (min-width: 720px) {
  .toolbar-row { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.4fr) auto; }
  .filter-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-grid .wide { grid-column: span 2; }
  .map-row { grid-template-columns: 200px 1fr; align-items: center; }
  .map-sample { grid-column: 2; }
  .wrap { padding: 28px 24px 72px; }
  .top-inner { padding: 14px 24px; }
}

@media (min-width: 960px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .bd { columns: 3; column-gap: 32px; }
  .filter-grid { grid-template-columns: repeat(4, 1fr); }
  .filter-grid .wide { grid-column: span 2; }
  .card-open { grid-template-columns: 144px 1fr; }
  .thumb { width: 144px; height: 108px; }

  .detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr);
    gap: 32px;
    align-items: start;
  }
  .detail-main { display: flex; flex-direction: column; gap: 20px; }
  .detail-side { display: flex; flex-direction: column; gap: 16px; }
  .side-head, .gallery, .side-rest, .facts-box { order: 0; }
  .gallery { grid-template-columns: repeat(6, 1fr); }
  .ph.lead { grid-column: span 3; grid-row: span 3; }
  .triage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .actionbar { display: none; }
  #detail-view { padding-bottom: 0; }
  body.in-detail .toast { bottom: var(--toast-bottom); }
  .facts-box dl { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 28px; }
}
