/* Acme Connect: My Vehicles, tester board for the Churnkey Cancel Flow demo.
 *
 * Two registers, kept visibly apart:
 *  - tan "tag" surfaces are test tools (persona, Try this, Open in Stripe, New test customer)
 *  - white surfaces are what the customer sees (the Acme Connect account page)
 * The page sits on a primer gray bench. Type is the DIN family the platform
 * already ships (DIN Alternate on Apple systems, Bahnschrift on Windows), so
 * no font is downloaded. Status chips borrow dashboard telltale colors.
 */

:root {
  --primer: #e2e5df;
  --primer-line: #cbd2ca;
  --paper: #ffffff;
  --ink: #1b2632;
  --ink-soft: #4b5765;
  --line: #dce1dc;
  --petrol: #0e5a6b;
  --petrol-deep: #0a4351;
  --petrol-wash: #e5f0f2;
  --glass: #cde2e7;
  --tag: #f0e2b6;
  --tag-edge: #d8c483;
  --tag-ink: #45360c;
  --tag-soft: #f8f0d6;
  --focus: #1f55c6;
  --ok: #1d7343;
  --ok-wash: #e1f2e7;
  --warn: #7f4a00;
  --warn-wash: #fcefd2;
  --info: #1e4e96;
  --info-wash: #e4ecf9;
  --off: #535d68;
  --off-wash: #e8ebee;
  --alert: #9e2a1d;
  --alert-wash: #fae5e1;
  --font-din: "DIN Alternate", "Bahnschrift", "DIN 2014", "D-DIN", system-ui, sans-serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 24px;
  --max: 1320px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--primer);
  color: var(--ink);
  font: 15px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
ul {
  margin: 0;
}

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

a {
  color: inherit;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.boot-note {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--gutter);
  color: var(--ink-soft);
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ------------------------------------------------------------------ */
/* Tester bar                                                          */
/* ------------------------------------------------------------------ */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--tag);
  border-bottom: 1px solid var(--tag-edge);
  color: var(--tag-ink);
}

.bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px var(--gutter);
}

.bar-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-din);
  font-size: 1.05rem;
}

.ck-word {
  font-family: var(--font-din);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.bar-sub {
  font-weight: 400;
}

.mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border: 1px solid var(--tag-edge);
  border-radius: 999px;
  background: var(--tag-soft);
  font-size: 0.8125rem;
  font-weight: 600;
}

.mode-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
}

.bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-left: auto;
}

.label-short {
  display: none;
}

.bar-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ------------------------------------------------------------------ */
/* Tools (tan register)                                                */
/* ------------------------------------------------------------------ */

.tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--tag-ink);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.tool:hover {
  border-color: var(--tag-edge);
  background: rgba(69, 54, 12, 0.07);
}

.tool:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.tool .icon-out {
  width: 12px;
  height: 12px;
}

.tool-chip {
  min-height: 30px;
  padding: 0 10px;
  border: 1px dashed var(--tag-edge);
  border-radius: 999px;
  background: var(--tag-soft);
  font-size: 0.78rem;
}

.tool-quiet {
  margin-left: auto;
  font-weight: 500;
}

.tool-solid {
  border-color: var(--tag-ink);
  background: var(--tag-ink);
  color: var(--tag);
  min-height: 38px;
  padding: 0 14px;
}

.tool-solid:hover {
  background: #2e2408;
}

.tool-note {
  color: var(--tag-ink);
  font-size: 0.75rem;
  line-height: 1.35;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--tag-soft);
  border: 1px dashed var(--tag-edge);
}

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */

.board {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) 48px;
}

.board:focus {
  outline: none;
}

.hero {
  padding: 32px 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--petrol);
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.brand-mark rect {
  fill: var(--petrol);
}

.brand-mark-a {
  fill: none;
  stroke: var(--paper);
  stroke-width: 2.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.brand-mark-bar {
  stroke: var(--tag);
  stroke-width: 2.6;
  stroke-linecap: round;
}

.brand-name {
  font-family: var(--font-din);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hero-title {
  margin: 10px 0 14px;
  font-family: var(--font-din);
  font-size: clamp(2.75rem, 7vw, 4.25rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.hero-lead {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 1rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 16px;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.swatch {
  width: 22px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid var(--primer-line);
}

.swatch-tool {
  background: var(--tag);
  border-color: var(--tag-edge);
}

.swatch-paper {
  background: var(--paper);
}

/* ------------------------------------------------------------------ */
/* Notices                                                             */
/* ------------------------------------------------------------------ */

.notices:empty {
  display: none;
}

.notices {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.notice {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.875rem;
}

.notice ul {
  margin-top: 4px;
  padding-left: 18px;
}

.notice-tool {
  display: block;
  border: 1px solid var(--tag-edge);
  background: var(--tag-soft);
  color: var(--tag-ink);
}

.notice-title {
  font-weight: 700;
}

.notice-support {
  border: 1px solid var(--line);
  border-left: 4px solid var(--petrol);
  background: var(--paper);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.icon-btn:hover {
  background: rgba(27, 38, 50, 0.08);
}

/* ------------------------------------------------------------------ */
/* Board head and filters                                              */
/* ------------------------------------------------------------------ */

.board-head {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.board-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-din);
  font-size: 1.35rem;
  font-weight: 700;
}

.count {
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 500;
}

.chips-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 6px 0 12px;
  border: 1px solid var(--tag-edge);
  border-radius: 999px;
  background: var(--tag-soft);
  color: var(--tag-ink);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.filter:hover {
  background: var(--tag);
}

.filter[aria-pressed="true"] {
  border-color: var(--tag-ink);
  background: var(--tag-ink);
  color: var(--tag);
}

.filter-count {
  min-width: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(69, 54, 12, 0.12);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.filter[aria-pressed="true"] .filter-count {
  background: rgba(240, 226, 182, 0.2);
}

.filter-select-wrap {
  display: none;
  align-items: center;
  gap: 10px;
  color: var(--tag-ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.filter-select,
.filter-select-inline {
  min-height: 40px;
  max-width: 100%;
  padding: 0 10px;
  border: 1px solid var(--tag-edge);
  border-radius: 8px;
  background: var(--tag-soft);
  color: var(--tag-ink);
}

.filter-select {
  flex: 1;
  min-width: 0;
}

/* ------------------------------------------------------------------ */
/* Cards                                                               */
/* ------------------------------------------------------------------ */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 18px;
  align-items: start;
}

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--primer-line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(27, 38, 50, 0.05), 0 14px 28px -24px rgba(27, 38, 50, 0.55);
}

.card.is-fresh {
  border-color: var(--petrol);
  box-shadow: 0 0 0 2px var(--petrol-wash), 0 14px 28px -24px rgba(27, 38, 50, 0.55);
}

.card-tag {
  padding: 10px 16px 12px;
  border-bottom: 1px dashed var(--tag-edge);
  background: var(--tag);
  color: var(--tag-ink);
}

.tag-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.tag-code {
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--tag-ink);
  color: var(--tag);
  font-family: var(--font-din);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

.tag-title {
  font-weight: 700;
  font-size: 0.875rem;
}

.tag-new {
  margin-left: auto;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--petrol);
  color: var(--paper);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.6;
}

.tag-try {
  margin-top: 6px;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.card-account {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.account-head {
  display: grid;
  gap: 2px;
}

.account-name {
  font-family: var(--font-din);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.15;
}

.account-email {
  color: var(--ink-soft);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

.vehicles {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.vehicle {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.vehicle-id {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px 6px 6px;
  border-radius: 8px;
  background: var(--petrol-wash);
}

.car {
  width: 104px;
  height: auto;
  flex: none;
}

.car-body {
  fill: var(--paper);
  stroke: var(--petrol);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.car-glass {
  fill: var(--glass);
}

.car-wheel {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.6;
}

.car-hub {
  fill: var(--ink);
}

.car-ground {
  stroke: #b9c9cc;
  stroke-width: 1.4;
  stroke-linecap: round;
}

.vehicle-name {
  font-family: var(--font-din);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.vehicle-vin {
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.plan {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  border-radius: 6px;
}

.plan-name {
  font-weight: 600;
}

.plan-price {
  font-family: var(--font-din);
  white-space: nowrap;
}

.price {
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.per {
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 0.78rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px 2px 6px;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.5;
}

.chip-icon {
  width: 14px;
  height: 14px;
  stroke-width: 1.8;
}

.chip-ok {
  background: var(--ok-wash);
  color: var(--ok);
}

.chip-warn {
  background: var(--warn-wash);
  color: var(--warn);
}

.chip-info {
  background: var(--info-wash);
  color: var(--info);
}

.chip-off {
  background: var(--off-wash);
  color: var(--off);
}

.chip-alert {
  background: var(--alert-wash);
  color: var(--alert);
}

.vehicle-meta {
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

.vehicle-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-merchant,
.btn-merchant-quiet {
  border: 1.5px solid var(--petrol);
  background: var(--paper);
  color: var(--petrol);
}

.btn-merchant:hover,
.btn-merchant-quiet:hover {
  background: var(--petrol-wash);
}

.btn-merchant-quiet {
  border-style: dashed;
}

.btn-merchant-solid {
  border: 0;
  background: var(--petrol);
  color: var(--paper);
}

.btn-merchant-solid:hover {
  background: var(--petrol-deep);
}

.btn-ink {
  width: 100%;
  min-height: 44px;
  border: 0;
  background: var(--ink);
  color: var(--paper);
}

.btn-ink:hover {
  background: #0f1720;
}

.all-vehicles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.all-vehicles .tool-note {
  flex: 1 1 180px;
}

.card-bench {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 10px 12px 10px 16px;
  border-top: 1px dashed var(--tag-edge);
  background: var(--tag-soft);
  color: var(--tag-ink);
}

.bench-notes {
  display: grid;
  gap: 2px;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.lastrun-sub {
  color: var(--tag-ink);
}

.changed-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--focus);
  vertical-align: 1px;
}

.bench-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 4px;
  margin-left: -9px;
}

.bench-row + .bench-row {
  padding-top: 6px;
  border-top: 1px solid rgba(216, 196, 131, 0.55);
}

/* What changed after a run: a ring that stays, a pulse that plays once. */
.chip[data-changed="true"],
.plan[data-changed="true"] {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.plan[data-changed="true"] {
  outline-offset: 4px;
}

.is-flash [data-changed="true"] {
  animation: changed 1.1s ease-out 2;
}

@keyframes changed {
  0% {
    box-shadow: 0 0 0 0 rgba(31, 85, 198, 0.55);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(31, 85, 198, 0);
  }
}

/* ------------------------------------------------------------------ */
/* Empty state, footer                                                 */
/* ------------------------------------------------------------------ */

.empty {
  display: grid;
  gap: 8px;
  justify-items: start;
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed var(--tag-edge);
  border-radius: 14px;
  background: var(--tag-soft);
  color: var(--tag-ink);
}

.empty-title {
  font-family: var(--font-din);
  font-size: 1.2rem;
  font-weight: 700;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.page-foot {
  margin-top: 36px;
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

/* ------------------------------------------------------------------ */
/* Login                                                               */
/* ------------------------------------------------------------------ */

.login {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px 16px;
}

.login-card {
  display: grid;
  gap: 12px;
  width: min(100%, 420px);
  padding: 28px;
  border: 1px solid var(--tag-edge);
  border-radius: 16px;
  background: var(--tag);
  color: var(--tag-ink);
  box-shadow: 0 20px 40px -32px rgba(27, 38, 50, 0.6);
}

.login-kicker {
  font-size: 1.05rem;
}

.login-card h1 {
  color: var(--ink);
  font-family: var(--font-din);
  font-size: 2.25rem;
  line-height: 1;
}

.login-lead {
  font-size: 0.9375rem;
}

.login-form {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.login-form label {
  font-weight: 700;
  font-size: 0.875rem;
}

.login-form input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--tag-edge);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
}

.login-error {
  min-height: 1.4em;
  color: var(--alert);
  font-size: 0.875rem;
  font-weight: 600;
}

.fatal {
  max-width: 640px;
  margin: 0 auto;
  padding: 64px var(--gutter);
}

.fatal h1 {
  margin-bottom: 8px;
  font-family: var(--font-din);
  font-size: 2rem;
}

/* ------------------------------------------------------------------ */
/* Transfer dialog and toasts                                          */
/* ------------------------------------------------------------------ */

.transfer {
  width: min(calc(100% - 32px), 470px);
  padding: 24px;
  border: 0;
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 60px -30px rgba(27, 38, 50, 0.7);
}

.transfer::backdrop {
  background: rgba(27, 38, 50, 0.55);
}

.transfer > * + * {
  margin-top: 12px;
}

.brand-small .brand-mark {
  width: 24px;
  height: 24px;
}

.transfer-title {
  font-family: var(--font-din);
  font-size: 1.75rem;
  line-height: 1.1;
}

.transfer-note {
  padding: 10px 12px;
  border: 1px dashed var(--tag-edge);
  border-radius: 10px;
  background: var(--tag-soft);
  color: var(--tag-ink);
  font-size: 0.8125rem;
}

.transfer-actions {
  display: flex;
  justify-content: flex-end;
}

.toasts {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 40;
  display: grid;
  gap: 8px;
  width: min(calc(100% - 32px), 520px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.875rem;
  box-shadow: 0 16px 30px -18px rgba(27, 38, 50, 0.8);
  pointer-events: auto;
}

.toast p {
  flex: 1;
}

.toast-action {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--tag-edge);
  border-radius: 6px;
  background: transparent;
  color: var(--tag);
  font-weight: 700;
  cursor: pointer;
}

.toast-close {
  color: var(--paper);
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ------------------------------------------------------------------ */
/* Small screens                                                       */
/* ------------------------------------------------------------------ */

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }

  .bar {
    position: static;
  }

  .bar-inner {
    gap: 4px 10px;
    padding-top: 8px;
    padding-bottom: 6px;
  }

  .bar-actions {
    width: 100%;
    margin-left: -9px;
  }

  .label-long {
    display: none;
  }

  .label-short {
    display: inline;
  }

  .hero {
    padding: 26px 0 20px;
  }

  .chips-filter {
    display: none;
  }

  .filter-select-wrap {
    display: flex;
  }

  .car {
    width: 88px;
  }

  .card-account {
    padding: 14px;
  }

  .card-tag {
    padding: 10px 14px 12px;
  }

  .card-bench {
    padding: 10px 10px 10px 14px;
  }

  .tool {
    padding: 0 7px;
  }

  .bench-row {
    margin-left: -7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .is-flash [data-changed="true"] {
    animation: none;
  }
}

/* Static transfer page (public/transfer.html): the Redirect offer's backstop. */
.transfer-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px 16px;
}

.transfer-static {
  display: block;
}
