/* Toyota of Pullman — public service menu + package builder.
   Mobile-first. No external requests: the one webfont is served from this origin.
   Token names mirror docs/design/design-system.md so the two worlds stay related. */

@font-face {
  font-family: 'Pit Display';
  src: url('../fonts/pit-display-bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #eb0a1e;         /* graphical / large only */
  --red-fill: #c20812;    /* button fills — AA with white */
  --red-fill-hover: #a50710;
  --red-ink: #bd0a18;     /* red at body size on light */
  --red-wash: #fdeced;
  --red-line: #f0b8bd;

  --ink: #1b1b1f;
  --ink-2: #4c4c55;
  --ink-3: #74747e;
  --ground: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #f0eeea;
  --line: #e3ded7;
  --line-strong: #cec9c0;

  --ok: #1a7a37;
  --warn: #8a5a00;
  --warn-wash: #fdf4e3;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --touch: 44px;

  --display: 'Pit Display', 'Arial Narrow', system-ui, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --shadow: 0 8px 24px rgba(20, 20, 25, 0.07);
  --shadow-sm: 0 2px 6px rgba(20, 20, 25, 0.06);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 5.5rem; /* clearance for the cart ribbon */
}

.num { font-variant-numeric: tabular-nums; }
.dim { color: var(--ink-3); }
.sep { color: var(--line-strong); padding: 0 0.35em; }

a { color: var(--red-ink); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #7aa7d9;
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------- topbar -- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem clamp(0.75rem, 4vw, 1.25rem);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar__brand { text-decoration: none; }
.topbar__nav {
  display: flex;
  gap: clamp(0.5rem, 3vw, 1.25rem);
  font-size: 0.9rem;
}
.topbar__nav a {
  color: var(--ink-2);
  text-decoration: none;
  padding: 0.5rem 0.25rem;
  min-height: var(--touch);
  display: inline-flex;
  align-items: center;
}
.topbar__nav a:hover { color: var(--ink); }

.wordmark { display: inline-flex; flex-direction: column; line-height: 1; }
.wordmark__toyota {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: var(--red);
}
.wordmark__pullman {
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--ink-2);
  margin-top: 0.15em;
}

/* ------------------------------------------------------------------ page -- */

.page {
  max-width: 34rem;
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 1.75rem) clamp(0.75rem, 4vw, 1.25rem);
}

.hero { margin: 0 0 1.25rem; }
.hero--tight { margin-bottom: 0.75rem; }
.hero__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 7vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin: 0 0 0.4rem;
}
.hero__sub { margin: 0; color: var(--ink-2); }

.eyebrow {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 4vw, 1.35rem);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.card__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
}
.card__note { margin: 0 0 1rem; color: var(--ink-3); font-size: 0.9rem; }
.card--hint { background: var(--surface-2); box-shadow: none; }
.card--warn { border-color: var(--red-line); background: var(--red-wash); }

/* ---------------------------------------------------------------- fields -- */

.field { display: block; margin-bottom: 1rem; }
.field:last-child { margin-bottom: 0; }
.field__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 0.35rem;
}
.field__hint { display: block; margin-top: 0.4rem; font-size: 0.85rem; color: var(--ink-3); }

.input {
  width: 100%;
  min-height: var(--touch);
  padding: 0.6rem 0.75rem;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}
.input--big {
  font-family: var(--display);
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  padding: 0.5rem 0.75rem;
}
/* Placeholders must not read as an already-entered value — a customer glancing
   at "67,000" in the odometer box would otherwise think we knew their mileage. */
.input::placeholder { color: var(--ink-3); opacity: 0.65; font-weight: 400; }
select.input { appearance: none; background-image: none; }

.vin-row { display: flex; gap: 0.5rem; }
.vin-row .input { text-transform: uppercase; letter-spacing: 0.05em; }
.vin-row .btn { flex: 0 0 auto; }

.picker { display: grid; grid-template-columns: 1.6fr 1fr; gap: 0.75rem; }
.field--inline { margin-bottom: 0; }

.or {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  color: var(--ink-3);
  font-size: 0.85rem;
}
.or::before, .or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.msg { color: var(--ink-2); }
.msg--warn { color: var(--warn); font-weight: 600; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--touch);
  padding: 0.65rem 1.1rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red-fill); color: #fff; }
.btn--primary:hover { background: var(--red-fill-hover); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink-3); }
.btn--added { background: var(--surface-2); color: var(--ok); border-color: var(--line-strong); }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.actions { display: flex; flex-direction: column; gap: 0.6rem; margin: 1.25rem 0; }

.linkish {
  background: none;
  border: 0;
  padding: 0.25rem;
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink-3);
  text-decoration: underline;
  cursor: pointer;
}
.linkish:hover { color: var(--red-ink); }

/* ------------------------------------------------------- vehicle strip --- */

.vstrip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  margin-bottom: 1rem;
  background: var(--surface-2);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.vstrip__text { min-width: 0; }
.vstrip__edit { flex: 0 0 auto; font-size: 0.85rem; }

/* ------------------------------------------------------ vehicle confirm --- */

.confirm__vehicle {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 6.5vw, 2rem);
  line-height: 1.1;
  margin: 0 0 1rem;
}
.confirm__fixed { margin: 0 0 0.75rem; color: var(--ink-2); font-weight: 600; }

.chipset { border: 0; padding: 0; margin: 0 0 1rem; }
.chipset legend { padding: 0; }
.chip { display: inline-block; margin: 0 0.4rem 0.4rem 0; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.chip input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.chip input:focus-visible + span { outline: 3px solid #7aa7d9; outline-offset: 2px; }

.ask {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  color: var(--warn);
  background: var(--warn-wash);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
}

.driveline {
  border-left: 4px solid var(--red);
  background: var(--surface-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.85rem 1rem;
  margin-top: 0.5rem;
}
.driveline__label {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.driveline__name { margin: 0; font-family: var(--display); font-size: 1.15rem; }
.driveline__detail { margin: 0.2rem 0 0; font-size: 0.9rem; color: var(--ink-2); }
.driveline__fluid { margin: 0.4rem 0 0; font-size: 0.9rem; font-weight: 600; }
.driveline__note {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--warn);
  background: var(--warn-wash);
  padding: 0.4rem 0.55rem;
  border-radius: var(--radius-sm);
}

.decoded { margin-top: 1rem; font-size: 0.88rem; }
.decoded summary { cursor: pointer; color: var(--ink-3); min-height: var(--touch); display: flex; align-items: center; }
.decoded dl { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.75rem; margin: 0.5rem 0; }
.decoded dt { color: var(--ink-3); }
.decoded dd { margin: 0; }
.decoded__note { color: var(--ink-3); margin: 0.5rem 0 0; }

/* -------------------------------------------------------------- timeline -- */

.timeline { margin: 0 0 1.5rem; }
.timeline__bar {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
}
.timeline__you {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--surface);
  transform: translateY(-50%);
  box-shadow: var(--shadow-sm);
}
.timeline__marks {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.05em;
}

/* -------------------------------------------------------------- packages -- */

.pkg {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 4vw, 1.35rem);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.pkg--due { border-left: 4px solid var(--red); box-shadow: var(--shadow); }
.pkg--focus { border-color: var(--red-line); box-shadow: var(--shadow); }

.pkg__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.pkg__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.15;
  margin: 0;
}
.pkg__price { text-align: right; flex: 0 0 auto; }
.pkg__blurb { margin: 0 0 0.85rem; color: var(--ink-2); font-size: 0.93rem; }
.pkg__empty { margin: 0 0 0.85rem; color: var(--ink-3); font-size: 0.9rem; font-style: italic; }

.pkg__items { list-style: none; margin: 0 0 1rem; padding: 0; border-top: 1px solid var(--line); }
.pkg__items li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.price {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  color: var(--red-ink);
  white-space: nowrap;
}
.price--tbd { font-family: var(--sans); font-size: 0.85rem; font-weight: 600; color: var(--ink-3); }
.save {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ok);
}
.fluid {
  font-size: 0.78rem;
  color: var(--ink-3);
  white-space: nowrap;
}

/* ---------------------------------------------------------- à-la-carte --- */

.group { margin-bottom: 1.5rem; }
.group__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 0.5rem;
}
.svc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.svc + .svc { border-top: 1px solid var(--line); }
.svc__label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem 1rem;
  cursor: pointer;
  min-height: var(--touch);
}
.svc__label input { width: 22px; height: 22px; margin: 0.15rem 0 0; accent-color: var(--red-fill); }
.svc__text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.svc__name { font-weight: 600; }
.svc__blurb { font-size: 0.85rem; color: var(--ink-3); }
.svc__price { text-align: right; }
.svc__price .price { font-size: 1.15rem; }
.svc--included { background: var(--surface-2); }
.svc--included .svc__label { cursor: default; }
.svc__inc { font-size: 0.78rem; font-weight: 600; color: var(--ok); }

/* ------------------------------------------------------------- the ticket -- */

.banner {
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  text-align: center;
}

.ticket {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 4vw, 1.5rem);
  box-shadow: var(--shadow);
}
.ticket__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid var(--ink);
}
.ticket__kind {
  margin: 0;
  font-family: var(--display);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.ticket__meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1rem;
  margin: 0.85rem 0;
  font-size: 0.9rem;
}
.ticket__meta dt {
  color: var(--ink-3);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 0.15rem;
}
.ticket__meta dd { margin: 0; font-weight: 600; }

.ticket__label {
  margin: 1rem 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.ticket__row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}
.ticket__row > span:first-child { flex: 1; }
.ticket__row--head { font-weight: 700; border-bottom: 0; padding-bottom: 0.2rem; }
.ticket__sub { list-style: none; margin: 0 0 0.4rem; padding: 0 0 0 0.9rem; }
.ticket__sub li {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.25rem 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}
.ticket__pkg { border-bottom: 1px solid var(--line); padding-bottom: 0.5rem; }

.ticket__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 2px solid var(--ink);
  font-family: var(--display);
  font-size: 1.45rem;
}
.ticket__total .num { color: var(--red-ink); }
.ticket__note { margin: 0.35rem 0 0; font-size: 0.85rem; color: var(--ink-3); }
.ticket__fine { margin: 0.75rem 0 0; font-size: 0.75rem; color: var(--ink-3); line-height: 1.4; }

.ticket__qr { margin-top: 1.25rem; text-align: center; }
.qr { width: min(180px, 55vw); margin: 0 auto; }
.qr svg { width: 100%; height: auto; display: block; }
.qr__cap { margin: 0.5rem 0 0; font-size: 0.8rem; color: var(--ink-3); }
.qr__fail { font-size: 0.85rem; color: var(--warn); }

/* ------------------------------------------------------------ cart ribbon -- */

.cartbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: var(--ink);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.cartbar__link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 34rem;
  margin: 0 auto;
  padding: 0.85rem clamp(0.75rem, 4vw, 1.25rem);
  min-height: var(--touch);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.cartbar__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 0.4rem;
  border-radius: 13px;
  background: var(--red);
  font-size: 0.85rem;
}
.cartbar__text { color: #cfcfd6; font-weight: 400; }
.cartbar__total { margin-left: auto; font-family: var(--display); font-size: 1.15rem; }
.cartbar__go { color: #cfcfd6; font-size: 0.85rem; }

/* ------------------------------------------------------------------ foot -- */

.foot {
  max-width: 34rem;
  margin: 2rem auto 0;
  padding: 1.25rem clamp(0.75rem, 4vw, 1.25rem) 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--ink-3);
  text-align: center;
}
.foot p { margin: 0 0 0.4rem; }

/* --------------------------------------------------------------- ≥ 40rem -- */

@media (min-width: 40rem) {
  .actions { flex-direction: row; flex-wrap: wrap; }
  .actions .btn--wide { width: auto; flex: 1 1 12rem; }
}

/* ------------------------------------------------------- reduced motion --- */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .btn:active { transform: none; }
}

/* ------------------------------------------------------------------ print -- */

@media print {
  .no-print, .topbar, .cartbar, .foot { display: none !important; }
  body { background: #fff; padding: 0; }
  .page { max-width: none; padding: 0; }
  .ticket {
    border: 1px solid #000;
    border-radius: 0;
    box-shadow: none;
    padding: 0.5in;
  }
  .ticket__total .num, .price, .wordmark__toyota { color: #000; }
  .banner { background: none; color: #000; border: 1px solid #000; }
  .qr { width: 1.6in; }
  a { text-decoration: none; color: #000; }
}
