/* =========================================================
   Voltline / Direction 2 / "Current"
   Renting a truck should feel as light as booking a ride.
   ========================================================= */

:root {
  /* ---- core palette ---- */
  --slate: #1a2b34;
  --slate-raised: #24363f;
  --slate-line: #354b55;

  --teal: #18c6b4;
  --teal-press: #12b3a3;
  --teal-deep: #0b6f66;      /* 5.9:1 on off-white, for text and links */
  --teal-strong: #0e9b8e;    /* 3.3:1 on off-white, large display text only */
  --teal-soft: #d5f2ee;
  --teal-wash: #eefaf8;

  --offwhite: #fbfcfb;
  --mist: #e6efee;
  --mist-deep: #d2e1df;
  --mist-line: #cddedb;

  --coral: #ff6b5c;
  --coral-deep: #c33a2c;     /* 5.1:1 on off-white */
  --coral-wash: #fff0ee;

  /* ---- text, each checked against the surface it sits on ---- */
  --on-light: #1a2b34;       /* 14.2:1 on off-white */
  --on-light-muted: #4a636e; /* 6.2:1 on off-white, 7.8:1 on mist */
  --on-slate: #eef4f5;       /* 13.6:1 on slate */
  --on-slate-muted: #b9cdd2; /* 8.8:1 on slate */

  /* ---- type ---- */
  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --body: "Source Sans 3", system-ui, sans-serif;

  --fs-hero: clamp(2.75rem, 7vw, 5.25rem);
  --fs-h2: clamp(1.875rem, 3.6vw, 2.875rem);
  --fs-h3: 1.375rem;
  --fs-lead: clamp(1.0625rem, 1.5vw, 1.3125rem);
  --fs-small: 0.9375rem;
  --fs-tiny: 0.8125rem;

  /* ---- geometry ---- */
  --r-xl: 32px;
  --r-lg: 24px;
  --r: 18px;
  --r-sm: 12px;
  --pill: 999px;

  --gutter: clamp(1.125rem, 4vw, 2.5rem);
  --stack: clamp(4rem, 10vw, 9rem);
  --maxw: 1140px;

  /* ---- depth ---- */
  --lift-1: 0 1px 2px rgba(26, 43, 52, 0.04), 0 4px 12px -4px rgba(26, 43, 52, 0.08);
  --lift-2: 0 2px 4px rgba(26, 43, 52, 0.04), 0 18px 44px -14px rgba(26, 43, 52, 0.16);
  --lift-3: 0 4px 8px rgba(26, 43, 52, 0.05), 0 32px 70px -20px rgba(26, 43, 52, 0.22);

  --ease: 260ms cubic-bezier(0.22, 1, 0.36, 1);
  --snap: 140ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================================
   Base
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--offwhite);
  color: var(--on-light);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}

p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--teal-deep);
  outline-offset: 3px;
  border-radius: 6px;
}

.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: 1rem; top: -5rem; z-index: 60;
  background: var(--slate); color: var(--on-slate);
  padding: 0.875rem 1.25rem; border-radius: var(--pill);
  text-decoration: none; transition: top var(--snap);
}
.skip:focus { top: 1rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4375rem 0.9375rem;
  border-radius: var(--pill);
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-size: var(--fs-tiny);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal-deep); flex: none;
}

.lead { font-size: var(--fs-lead); color: var(--on-light-muted); }

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.9375rem 1.5rem;
  border: 0;
  border-radius: var(--pill);
  background: var(--teal);
  color: var(--slate);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--snap), transform var(--snap), box-shadow var(--ease);
  box-shadow: 0 1px 2px rgba(26, 43, 52, 0.08);
}
.btn:hover { background: var(--teal-press); transform: translateY(-1px); box-shadow: var(--lift-1); }
.btn:active { transform: translateY(0); }

.btn--quiet {
  background: transparent;
  color: var(--slate);
  box-shadow: inset 0 0 0 1.5px var(--mist-line);
}
.btn--quiet:hover { background: var(--mist); box-shadow: inset 0 0 0 1.5px var(--mist-deep); }

.btn--onslate {
  background: transparent;
  color: var(--on-slate);
  box-shadow: inset 0 0 0 1.5px var(--slate-line);
}
.btn--onslate:hover { background: var(--slate-raised); box-shadow: inset 0 0 0 1.5px var(--teal); }

.btn--sm { padding: 0.625rem 1.125rem; font-size: 0.9375rem; }
.btn--block { width: 100%; }
.btn--lg { padding: 1.125rem 1.75rem; font-size: 1.0625rem; }

.btn[disabled] { opacity: 0.42; cursor: not-allowed; transform: none; box-shadow: none; }

/* =========================================================
   Header
   ========================================================= */

.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--offwhite) 82%, transparent);
  backdrop-filter: blur(12px) saturate(1.2);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 80px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.045em;
  text-decoration: none;
  color: var(--slate);
}
.brand-mark {
  width: 34px; height: 34px; flex: none;
  border-radius: 11px;
  background: var(--slate);
  display: grid; place-items: center;
}
.brand-mark svg { width: 16px; height: 16px; }

.nav-links { display: flex; align-items: center; gap: 1.75rem; margin-left: auto; }
.nav-links a {
  text-decoration: none;
  color: var(--on-light-muted);
  font-size: var(--fs-small);
  font-weight: 500;
  transition: color var(--snap);
}
.nav-links a:hover { color: var(--slate); }
.nav-links .btn { color: var(--slate); }

/* =========================================================
   Hero: one statement, one pill, one truck
   ========================================================= */

.hero {
  position: relative;
  text-align: center;
  padding-block: clamp(3rem, 7vw, 6rem) 0;
  overflow: hidden;
}

/* the aura: single hue, quiet, derived from the teal */
.hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -22%;
  width: min(1200px, 130vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(24, 198, 180, 0.20) 0%, rgba(24, 198, 180, 0.07) 34%, transparent 62%);
  pointer-events: none;
  z-index: -1;
}

.hero h1 {
  font-size: var(--fs-hero);
  font-weight: 700;
  max-width: 15ch;
  margin: 1.75rem auto 1.5rem;
  letter-spacing: -0.045em;
}
/* solid fallback first: without background-clip, transparent text would vanish.
   Both gradient stops clear 3:1 on the off-white for large display text. */
.hero h1 .accent { color: var(--teal-deep); }

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .hero h1 .accent {
    background: linear-gradient(180deg, var(--teal-deep), #0f8a7e);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.hero-sub {
  font-size: var(--fs-lead);
  color: var(--on-light-muted);
  max-width: 52ch;
  margin-inline: auto;
}

/* ---- SIGNATURE: the pill quote bar ---- */

.quote {
  margin: clamp(2rem, 4vw, 3.25rem) auto 0;
  max-width: 940px;
  text-align: left;
}

.quotebar {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr 0.95fr 0.85fr auto;
  align-items: center;
  gap: 0;
  padding: 0.5rem;
  background: var(--offwhite);
  border-radius: var(--pill);
  box-shadow: var(--lift-2), inset 0 0 0 1px var(--mist-line);
}

.qfield {
  display: grid;
  gap: 0.125rem;
  padding: 0.625rem 1.125rem;
  border-right: 1px solid var(--mist-line);
  min-width: 0;
}
.qfield:last-of-type { border-right: 0; }
.qfield label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--on-light-muted);
  letter-spacing: 0.01em;
}
.qfield .control {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: var(--slate);
  color-scheme: light;
}
.qfield .control:focus-visible { outline-offset: 4px; }
select.control { appearance: none; cursor: pointer; }

.quotebar .btn { justify-self: end; }

/* results */
.quote-out { margin-top: 1.25rem; }

.quote-card {
  background: var(--mist);
  border-radius: var(--r-lg);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
}
.quote-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.quote-head h2 { font-size: 1.25rem; font-weight: 600; }
.quote-head span { font-size: var(--fs-small); color: var(--on-light-muted); }

.quote-rows { display: grid; gap: 0.625rem; }

.qrow {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--offwhite);
  border-radius: var(--r);
  transition: transform var(--snap), box-shadow var(--ease);
}
.qrow:hover { transform: translateY(-2px); box-shadow: var(--lift-1); }

.qrow-art { color: var(--slate); }
.qrow-art svg { width: 64px; height: 30px; }

.qrow-main { display: grid; gap: 0.125rem; min-width: 0; }

.qrow-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.qrow-spec { font-size: var(--fs-tiny); color: var(--on-light-muted); }

.qrow-price { text-align: right; }
.qrow-price strong {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}
.qrow-price span { font-size: var(--fs-tiny); color: var(--on-light-muted); }

.qrow .btn { padding: 0.625rem 1.125rem; font-size: 0.9375rem; }

/* pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--pill);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.pill--ok { background: var(--teal-soft); color: var(--teal-deep); }
.pill--low { background: var(--coral); color: var(--slate); }
.pill--none { background: var(--mist-deep); color: var(--on-light-muted); }

/* states */
.state {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.75rem;
  padding: clamp(2rem, 4vw, 3rem) 1.5rem;
  background: var(--mist);
  border-radius: var(--r-lg);
}
.state-mark {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--offwhite);
  color: var(--teal-deep);
}
.state-mark svg { width: 24px; height: 24px; }
.state h3 { font-size: 1.375rem; font-weight: 600; }
.state p { color: var(--on-light-muted); max-width: 46ch; font-size: var(--fs-small); }
.state-actions { display: flex; gap: 0.625rem; flex-wrap: wrap; justify-content: center; margin-top: 0.5rem; }

.state--error { background: var(--coral-wash); box-shadow: inset 0 0 0 1.5px #f7c6c0; }
.state--error .state-mark { color: var(--coral-deep); }
.state--error h3 { color: var(--coral-deep); }
.state--error p { color: #7d3228; }

/* loading */
.loading { display: none; }
#quote.htmx-request .quote-results { display: none; }
#quote.htmx-request .loading { display: block; }

.loading-card {
  background: var(--mist);
  border-radius: var(--r-lg);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
}
.loading-note {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: var(--fs-small);
  color: var(--on-light-muted);
  margin-bottom: 1rem;
}
.pulse {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--teal-deep);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

.skel {
  height: 78px;
  border-radius: var(--r);
  background: linear-gradient(90deg, var(--offwhite) 0%, #f3f8f7 50%, var(--offwhite) 100%);
  background-size: 220% 100%;
  animation: shimmer 1.4s linear infinite;
}
.skel + .skel { margin-top: 0.625rem; }
@keyframes shimmer { to { background-position: -220% 0; } }

/* ---- the hero truck + charge halo ---- */

.hero-truck {
  position: relative;
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  padding-bottom: clamp(2rem, 5vw, 4rem);
}
.hero-truck svg { width: 100%; height: auto; }

.halo circle { transform-box: view-box; transform-origin: 118px 128px; }
.halo .ring-1 { animation: halo 3.2s cubic-bezier(0.2, 0, 0, 1) infinite; }
.halo .ring-2 { animation: halo 3.2s cubic-bezier(0.2, 0, 0, 1) 1.05s infinite; }
.halo .ring-3 { animation: halo 3.2s cubic-bezier(0.2, 0, 0, 1) 2.1s infinite; }
@keyframes halo {
  0% { transform: scale(0.35); opacity: 0; }
  18% { opacity: 0.75; }
  100% { transform: scale(1); opacity: 0; }
}

.charge-chip {
  position: absolute;
  left: 50%;
  bottom: clamp(1.5rem, 4vw, 3rem);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--pill);
  background: var(--offwhite);
  box-shadow: var(--lift-2);
  font-size: var(--fs-small);
  font-weight: 600;
  white-space: nowrap;
}
.charge-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); }

/* =========================================================
   Section furniture
   ========================================================= */

.section { padding-block: var(--stack); }

.section-head {
  display: grid;
  gap: 1rem;
  max-width: 42ch;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}
.section-head h2 { font-size: var(--fs-h2); font-weight: 700; }
.section-head p { color: var(--on-light-muted); }

.section-head--split {
  max-width: none;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  align-items: end;
  gap: 2rem;
}
.section-head--split p { margin-left: auto; }

/* =========================================================
   Fleet
   ========================================================= */

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  margin-bottom: 2rem;
}
.segset { border: 0; padding: 0; margin: 0; }
.segset legend {
  font-size: var(--fs-tiny);
  font-weight: 600;
  color: var(--on-light-muted);
  margin-bottom: 0.625rem;
  padding: 0;
}
.segs {
  display: inline-flex;
  padding: 5px;
  border-radius: var(--pill);
  background: var(--mist);
  gap: 3px;
  flex-wrap: wrap;
}
.seg { position: relative; }
.seg input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.seg span {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: var(--pill);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--on-light-muted);
  transition: background var(--snap), color var(--snap);
}
.seg:hover span { color: var(--slate); }
.seg input:checked + span {
  background: var(--offwhite);
  color: var(--slate);
  box-shadow: var(--lift-1);
}
.seg input:focus-visible + span { outline: 3px solid var(--teal-deep); outline-offset: 2px; }

.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 1.5rem;
}
#fleet-zone.htmx-request .fleet-grid { display: none; }
#fleet-zone.htmx-request .loading { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 1.5rem; }
.skel--card { height: 470px; border-radius: var(--r-lg); }

.truck {
  display: flex;
  flex-direction: column;
  background: var(--offwhite);
  border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px var(--mist-line);
  overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease);
}
.truck:hover { transform: translateY(-4px); box-shadow: var(--lift-2), inset 0 0 0 1px transparent; }

.truck-art {
  position: relative;
  margin: 12px 12px 0;
  padding: 1.25rem 0.75rem 0.5rem;
  border-radius: 16px;
  background: linear-gradient(170deg, var(--teal-wash) 0%, var(--mist) 100%);
}
.truck-art svg { width: 100%; height: auto; }
.truck-art .pill { position: absolute; top: 0.875rem; right: 0.875rem; }

.truck-body { display: grid; gap: 1.25rem; padding: 1.5rem; flex: 1; align-content: start; }
.truck-body h3 { font-size: 1.625rem; font-weight: 700; margin-bottom: 0.375rem; }
.truck-note { color: var(--on-light-muted); font-size: var(--fs-small); }

.spec-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.spec-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.375rem;
  padding: 0.4375rem 0.75rem;
  border-radius: var(--pill);
  background: var(--mist);
  font-size: var(--fs-tiny);
}
.spec-chip b { font-weight: 600; }
.spec-chip span { color: var(--on-light-muted); }

.truck-foot {
  margin-top: auto;
  display: grid;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--mist);
}
.price { display: flex; align-items: baseline; gap: 0.5rem; }
.price strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.125rem;
  letter-spacing: -0.045em;
}
.price span { color: var(--on-light-muted); font-size: var(--fs-small); }
.truck-fine { font-size: var(--fs-tiny); color: var(--on-light-muted); }

.fleet-note {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1.125rem 1.375rem;
  border-radius: var(--r);
  background: var(--teal-wash);
  color: var(--on-light-muted);
  font-size: var(--fs-small);
}
.fleet-note svg { width: 20px; height: 20px; flex: none; color: var(--teal-deep); }

.empty { grid-column: 1 / -1; }

/* =========================================================
   How it works
   ========================================================= */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
}
.step { display: grid; gap: 0.875rem; align-content: start; }
.step-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 3.5rem;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--teal-strong);
}
.step h3 { font-size: var(--fs-h3); font-weight: 600; }
.step p { color: var(--on-light-muted); font-size: var(--fs-small); }

/* =========================================================
   Lots
   ========================================================= */

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

.lot {
  position: relative;
  overflow: hidden;
  background: var(--mist);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: grid;
  gap: 1.5rem;
  align-content: start;
}
.lot-rings { position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; opacity: 0.5; pointer-events: none; }
.lot h3 { font-size: 1.75rem; font-weight: 700; }
.lot dl { display: grid; gap: 1rem; position: relative; }
.lot dl > div { display: grid; gap: 0.25rem; }
.lot dt { font-size: var(--fs-tiny); font-weight: 600; color: var(--on-light-muted); }
.lot dd { font-size: var(--fs-small); }
.lot .btn { justify-self: start; }

/* =========================================================
   Footer
   ========================================================= */

.footer {
  background: var(--slate);
  color: var(--on-slate);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  margin-top: var(--stack);
  padding-block: clamp(3rem, 6vw, 5rem) 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(auto-fit, minmax(150px, 1fr));
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--slate-line);
}
.footer .brand { color: var(--on-slate); margin-bottom: 1rem; }
.footer .brand-mark { background: var(--teal); }
.footer-blurb { color: var(--on-slate-muted); font-size: var(--fs-small); max-width: 32ch; }
.footer-col h4 { font-size: var(--fs-tiny); font-weight: 600; color: var(--on-slate-muted); margin-bottom: 1rem; letter-spacing: 0; }
.footer-col ul { display: grid; gap: 0.75rem; }
.footer-col a { color: var(--on-slate); text-decoration: none; font-size: var(--fs-small); transition: color var(--snap); }
.footer-col a:hover { color: var(--teal); }
.footer-bottom {
  padding-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  color: var(--on-slate-muted);
  font-size: var(--fs-tiny);
}

/* =========================================================
   Booking
   ========================================================= */

.page-head { padding-block: clamp(2.5rem, 5vw, 4rem) 2.5rem; text-align: center; }
.crumbs {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-size: var(--fs-tiny); color: var(--on-light-muted); margin-bottom: 1.25rem;
}
.crumbs a { color: var(--teal-deep); text-decoration: none; font-weight: 600; }
.page-head h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 700; margin-bottom: 1rem; }
.page-head p { color: var(--on-light-muted); max-width: 54ch; margin-inline: auto; font-size: var(--fs-lead); }

.book-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
  padding-bottom: var(--stack);
}
.outcome { grid-column: 1 / -1; }
.outcome:empty { display: none; }

.card {
  background: var(--offwhite);
  border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px var(--mist-line);
  padding: clamp(1.25rem, 2.5vw, 1.875rem);
  margin-bottom: 1.5rem;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.5rem;
}
.card-num {
  width: 30px; height: 30px; flex: none;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-deep);
  display: grid; place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.9375rem;
}
.card-head h2 { font-size: 1.375rem; font-weight: 600; }
.card-meta { margin-left: auto; font-size: var(--fs-tiny); color: var(--on-light-muted); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.125rem; }
.span-2 { grid-column: 1 / -1; }

.field { display: grid; gap: 0.4375rem; min-width: 0; }
.field > label { font-size: var(--fs-tiny); font-weight: 600; color: var(--on-light-muted); }

.input, .select {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--mist-line);
  background: var(--offwhite);
  color: var(--slate);
  font-size: 1rem;
  color-scheme: light;
  transition: border-color var(--snap), box-shadow var(--snap);
}
.input::placeholder { color: #7d8f97; }
.input:hover, .select:hover { border-color: var(--mist-deep); }
.input:focus-visible, .select:focus-visible {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(24, 198, 180, 0.22);
}
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--coral); }

.select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%234a636e' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px 8px;
  padding-right: 2.5rem;
}

.hint { font-size: var(--fs-tiny); color: var(--on-light-muted); }

.notice {
  display: none;
  gap: 0.875rem;
  align-items: flex-start;
  padding: 1rem 1.125rem;
  border-radius: var(--r-sm);
  background: var(--coral-wash);
  box-shadow: inset 0 0 0 1.5px #f7c6c0;
  color: #7d3228;
  font-size: var(--fs-small);
  margin-top: 1.125rem;
}
.notice[data-open="true"] { display: flex; }
.notice svg { width: 20px; height: 20px; flex: none; color: var(--coral-deep); margin-top: 1px; }
.notice button {
  background: none; border: 0; padding: 0; font: inherit;
  color: var(--coral-deep); font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* ---- add-ons with real switches ---- */

.addons { display: grid; gap: 0.75rem; }

.addon {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.125rem 1.25rem;
  border-radius: var(--r);
  background: var(--offwhite);
  box-shadow: inset 0 0 0 1.5px var(--mist-line);
  cursor: pointer;
  transition: box-shadow var(--snap), background var(--snap);
}
.addon:hover { box-shadow: inset 0 0 0 1.5px var(--mist-deep); }
.addon:has(input:checked) { background: var(--teal-wash); box-shadow: inset 0 0 0 1.5px var(--teal); }
.addon input { position: absolute; opacity: 0; width: 0; height: 0; }

.addon-name { display: block; font-weight: 600; font-family: var(--display); font-size: 1.0625rem; letter-spacing: -0.02em; }
.addon-note { display: block; font-size: var(--fs-tiny); color: var(--on-light-muted); }
.addon-rate { font-family: var(--display); font-weight: 600; white-space: nowrap; }
.addon-rate span { font-weight: 400; color: var(--on-light-muted); font-size: var(--fs-tiny); }

.switch {
  width: 46px; height: 28px; flex: none;
  border-radius: var(--pill);
  background: var(--mist-deep);
  position: relative;
  transition: background var(--snap);
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--offwhite);
  box-shadow: 0 1px 3px rgba(26, 43, 52, 0.28);
  transition: transform var(--ease);
}
.addon input:checked ~ .switch { background: var(--teal); }
.addon input:checked ~ .switch::after { transform: translateX(18px); }
.addon input:focus-visible ~ .switch { outline: 3px solid var(--teal-deep); outline-offset: 3px; }

/* ---- summary ---- */

.summary {
  position: sticky;
  top: 100px;
  background: var(--mist);
  border-radius: var(--r-lg);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
}
.summary h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 1.25rem; }

.sum-window {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.125rem;
  border-radius: var(--r-sm);
  background: var(--offwhite);
  margin-bottom: 1.25rem;
}
.sum-window strong { font-family: var(--display); font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.02em; }
.sum-window span { font-size: var(--fs-tiny); color: var(--on-light-muted); }

.sumlines { display: grid; gap: 0.875rem; }
.sumline { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.sumline dt { font-size: var(--fs-small); }
.sumline dd { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sumline--sub dt, .sumline--sub dd { font-size: var(--fs-tiny); color: var(--on-light-muted); font-weight: 400; }

.sum-rule { height: 1px; background: var(--mist-deep); margin-block: 1.25rem; }

.total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--r);
  background: var(--slate);
  color: var(--on-slate);
  margin-block: 1.25rem;
}
.total span { font-size: var(--fs-small); color: var(--on-slate-muted); }
.total strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.fine { font-size: var(--fs-tiny); color: var(--on-light-muted); line-height: 1.55; }
.fine + .fine { margin-top: 0.75rem; }
.summary .btn { margin-bottom: 1rem; }

.spinner { display: none; width: 16px; height: 16px; flex: none; }
.spinner::after {
  content: "";
  display: block; width: 16px; height: 16px;
  border: 2px solid rgba(26, 43, 52, 0.25);
  border-top-color: var(--slate);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.js-submit.htmx-request .spinner { display: block; }
.js-submit.htmx-request .btn-text { opacity: 0.55; }
.js-submit.htmx-request { pointer-events: none; }

/* ---- outcome ---- */

.confirm {
  position: relative;
  overflow: hidden;
  background: var(--teal-wash);
  border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1.5px var(--teal-soft);
  padding: clamp(1.75rem, 4vw, 3rem);
  margin-bottom: 2rem;
  text-align: center;
}
.confirm::before {
  content: "";
  position: absolute;
  left: 50%; top: -60%;
  width: 720px; aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(24, 198, 180, 0.20), transparent 60%);
  pointer-events: none;
}
.confirm-mark {
  position: relative;
  width: 64px; height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: var(--teal);
  color: var(--slate);
  display: grid; place-items: center;
}
.confirm-mark svg { width: 28px; height: 28px; }
.confirm h2 { position: relative; font-size: clamp(1.625rem, 3.4vw, 2.375rem); font-weight: 700; margin-bottom: 0.75rem; }
.confirm > p { position: relative; color: var(--on-light-muted); max-width: 52ch; margin: 0 auto 1.75rem; }
.confirm-id {
  display: inline-block;
  margin-bottom: 1.25rem;
  padding: 0.375rem 0.875rem;
  border-radius: var(--pill);
  background: var(--offwhite);
  font-size: var(--fs-tiny);
  font-weight: 600;
  letter-spacing: 0.08em;
  position: relative;
}
.confirm-facts {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}
.confirm-facts li {
  background: var(--offwhite);
  border-radius: var(--r);
  padding: 1rem;
  display: grid;
  gap: 0.25rem;
}
.confirm-facts dt, .confirm-facts .k { font-size: var(--fs-tiny); color: var(--on-light-muted); }
.confirm-facts strong { font-family: var(--display); font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.02em; }
.confirm-actions { position: relative; display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

.alert {
  display: flex;
  gap: 1.125rem;
  align-items: flex-start;
  background: var(--coral-wash);
  border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1.5px #f7c6c0;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  margin-bottom: 2rem;
}
.alert svg { width: 24px; height: 24px; flex: none; color: var(--coral-deep); margin-top: 2px; }
.alert h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.375rem; color: var(--coral-deep); }
.alert p { font-size: var(--fs-small); color: #7d3228; max-width: 60ch; }

.totalbar { display: none; }

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1000px) {
  .quotebar { grid-template-columns: 1fr 1fr; border-radius: var(--r-lg); padding: 0.75rem; }
  .qfield { border-right: 0; padding: 0.75rem 1rem; }
  .qfield:first-of-type { grid-column: 1 / -1; }
  .quotebar .btn { grid-column: 1 / -1; justify-self: stretch; margin-top: 0.25rem; }

  .book-grid { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .summary .btn--block { display: none; }
  .summary .fine:last-child { display: none; }

  .totalbar {
    position: sticky; bottom: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    margin-inline: calc(var(--gutter) * -1);
    padding: 0.875rem var(--gutter);
    background: color-mix(in srgb, var(--offwhite) 92%, transparent);
    backdrop-filter: blur(10px);
    box-shadow: 0 -1px 0 var(--mist-line), 0 -12px 30px -18px rgba(26, 43, 52, 0.3);
  }
  .totalbar span { font-size: var(--fs-tiny); color: var(--on-light-muted); display: block; }
  .totalbar strong { font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.04em; }
}

@media (max-width: 820px) {
  .nav-links { gap: 1rem; }
  .nav-links a:not(.btn) { display: none; }
  .section-head--split { grid-template-columns: 1fr; }
  .section-head--split p { margin-left: 0; }
  .qrow { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0.875rem; }
  .qrow-art { display: none; }
  .qrow-price { text-align: left; }
  .qrow .btn { grid-column: 2; grid-row: 2; }
}

@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .truck:hover { transform: none; }
  .addon { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0.75rem; }
  .addon-rate { grid-column: 1; grid-row: 2; }
  .switch { grid-column: 2; grid-row: 1 / span 2; }
  .confirm-facts { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  :root { --gutter: 1rem; }
  .quotebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .spec-chips { gap: 0.375rem; }
}

/* =========================================================
   Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .halo circle { opacity: 0.3; animation: none; }
  .halo .ring-1 { opacity: 0.45; }
  .btn:hover, .truck:hover, .qrow:hover { transform: none; }
  .skel { background: var(--offwhite); }
  .pulse { opacity: 1; }
  .spinner::after { border-top-color: transparent; border-right-color: var(--slate); }
}
