/* EudyRentals — component styles. Every value comes from tokens.json via tokens.css.
   Separation is a 1px frame border, never a shadow: see "Space, shape, depth" in the brand book. */

.vd-root { font-family: var(--font-text); color: var(--ink); }

/* ---------- grain: the one texture in the system ---------- */
.vd-grain { position: relative; isolation: isolate; }
.vd-grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  opacity: .085; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dusk"] .vd-grain::after { mix-blend-mode: screen; opacity: .11; }

/* ---------- focus: one ring, offset onto the page ground ---------- */
.vd-root :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-xs); }

/* ---------- label / eyebrow ---------- */
.vd-label { font-family: var(--font-mono); font-size: 12px; line-height: 1; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); }

/* ---------- Button ---------- */
.vd-btn {
  font-family: var(--font-text); font-size: 16px; font-weight: 600; line-height: 1;
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 14px var(--space-5); border-radius: var(--radius-md);
  border: 2px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background-color .12s ease, box-shadow .12s ease;
}
.vd-btn:active { transform: translateY(1px); }
.vd-btn--book { background: var(--hivis); color: var(--on-hivis); }
.vd-btn--book:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.vd-btn--primary { background: var(--bush); color: var(--on-bush); }
.vd-btn--primary:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.vd-btn--outline { background: transparent; color: var(--ink); border-color: var(--frame); }
.vd-btn--outline:hover { border-color: var(--ink); }
.vd-btn--quiet { background: transparent; color: var(--river); padding-inline: var(--space-2); }
.vd-btn--quiet:hover { text-decoration: underline; text-underline-offset: 3px; }
.vd-btn--sm { font-size: 14px; padding: 9px var(--space-4); }
.vd-btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- Pill / chip ---------- */
.vd-pill { display: inline-flex; align-items: center; gap: var(--space-1);
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; padding: 5px var(--space-3); border-radius: var(--radius-full);
  background: var(--paper-sunk); color: var(--ink); }
.vd-pill--open   { background: var(--season-low);  color: var(--ink); }
.vd-pill--warn   { background: var(--season-peak); color: var(--ink); }
.vd-pill--info   { background: var(--river); color: var(--on-river); }
.vd-pill--accent { background: var(--hivis); color: var(--on-hivis); }

/* ---------- Plate: the signature sign shape ---------- */
.vd-plate { background: var(--bush); color: var(--on-bush); border-radius: var(--radius-plate);
  padding: var(--space-5); }
.vd-plate .vd-label { color: var(--on-bush); opacity: .75; }

/* ---------- FleetCard ---------- */
.vd-fleet { background: var(--paper-raised); border: 1px solid var(--frame); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .14s ease, transform .14s ease; }
.vd-fleet:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
/* Square, because the photo library is portrait phone frames — a 4:3 landscape box throws half of each away.
   Revisit when the fleet is shot in landscape. */
.vd-fleet__media { position: relative; aspect-ratio: 1 / 1; background: var(--paper-sunk);
  border-bottom: 1px solid var(--frame); }
.vd-fleet__media img { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: var(--vd-crop, 50% 55%); display: block; }
.vd-fleet__tags { position: absolute; left: var(--space-3); top: var(--space-3); z-index: 3;
  display: flex; gap: var(--space-2); flex-wrap: wrap; }
.vd-fleet__body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.vd-fleet__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.vd-fleet__name { font-family: var(--font-display); font-size: 36px; line-height: 1.02; font-weight: 700;
  letter-spacing: -.02em; color: var(--ink); margin: 0; }
.vd-fleet__model { font-family: var(--font-text); font-size: 15px; color: var(--ink-muted); }
.vd-fleet__rate { text-align: right; font-variant-numeric: tabular-nums; }
.vd-fleet__rate b { font-family: var(--font-mono); font-size: 22px; font-weight: 700; color: var(--ink); display: block; }
.vd-fleet__rate span { font-size: 12px; color: var(--ink-muted); }
.vd-fleet__specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2) var(--space-4); margin: 0; padding: var(--space-4) 0 0; border-top: 1px solid var(--rule); }
.vd-fleet__specs div { display: flex; justify-content: space-between; gap: var(--space-2);
  font-size: 14px; font-family: var(--font-text); }
.vd-fleet__specs dt { color: var(--ink-muted); }
.vd-fleet__specs dd { margin: 0; color: var(--ink); font-family: var(--font-mono); font-size: 13px;
  font-variant-numeric: tabular-nums; }
.vd-fleet__foot { margin-top: auto; padding-top: var(--space-4); display: flex; gap: var(--space-3); align-items: center; }

/* empty state — a van that is not in the fleet yet */
.vd-fleet--soon { border: 1px dashed var(--frame); background: transparent; }
.vd-fleet--soon:hover { transform: none; box-shadow: none; }
.vd-fleet--soon .vd-fleet__media { display: grid; place-items: center; background: transparent;
  border-bottom: 1px dashed var(--frame); }
.vd-fleet--soon .vd-fleet__name { color: var(--ink-muted); }

/* ---------- Calendar ---------- */
.vd-cal { background: var(--paper-raised); border: 1px solid var(--frame); border-radius: var(--radius-lg);
  padding: var(--space-5); }
.vd-cal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  margin-bottom: var(--space-4); }
.vd-cal__month { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.vd-cal__nav { display: flex; gap: var(--space-2); }
.vd-cal__nav button { width: 36px; height: 36px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--frame); background: var(--paper-raised); color: var(--ink); font-size: 15px; line-height: 1; }
.vd-cal__nav button:hover { background: var(--paper-sunk); }
.vd-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.vd-cal__dow { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-muted); text-align: center; padding-bottom: var(--space-2); }
.vd-cal__day { position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums; border: 1px solid var(--rule);
  background: var(--paper-sunk); color: var(--ink); cursor: pointer; }
.vd-cal__day b { font-size: 14px; font-weight: 600; }
.vd-cal__day i { font-style: normal; font-size: 11px; color: var(--ink-muted); }
.vd-cal__day--low  { background: var(--season-low); }
.vd-cal__day--mid  { background: var(--season-mid); }
.vd-cal__day--peak { background: var(--season-peak); }
.vd-cal__day--out  { background: transparent; color: var(--ink-muted); opacity: .4; cursor: default; }
.vd-cal__day--booked { background: repeating-linear-gradient(135deg,
    var(--paper-sunk) 0 5px, var(--rule) 5px 10px); color: var(--ink-muted); cursor: not-allowed; }
.vd-cal__day--booked b { text-decoration: line-through; }
.vd-cal__day--sel { border-color: var(--frame); box-shadow: inset 0 0 0 2px var(--frame); }
.vd-cal__key { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4);
  margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--rule); }
.vd-cal__key span { display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: 13px; color: var(--ink-muted); font-family: var(--font-text); }
.vd-cal__key i { width: 14px; height: 14px; border-radius: var(--radius-xs); display: inline-block; }

/* ---------- PriceBreakdown ---------- */
.vd-price { background: var(--paper-raised); border: 1px solid var(--frame); border-radius: var(--radius-lg);
  padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }
.vd-price__rows { display: flex; flex-direction: column; }
.vd-price__row { display: grid; grid-template-columns: 1fr auto; gap: var(--space-4);
  padding: var(--space-3) 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.vd-price__row:last-child { border-bottom: 0; }
.vd-price__row dt { font-size: 15px; }
.vd-price__row small { display: block; font-size: 13px; color: var(--ink-muted); margin-top: 2px; }
.vd-price__row dd { margin: 0; font-family: var(--font-mono); font-size: 16px; font-weight: 600;
  font-variant-numeric: tabular-nums; text-align: right; }
.vd-price__row--save dd { color: var(--bush); }
:root[data-theme="dusk"] .vd-price__row--save dd { color: var(--season-low); color: var(--bush); }
.vd-price__row--save dd::before { content: "− "; }
.vd-price__total { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4);
  background: var(--bush); color: var(--on-bush); border-radius: var(--radius-plate); padding: var(--space-4) var(--space-5); }
.vd-price__total b { font-family: var(--font-mono); font-size: 40px; font-weight: 700; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; line-height: 1; }
.vd-price__total .vd-label { color: var(--on-bush); opacity: .8; }
.vd-price__note { font-size: 13px; color: var(--ink-muted); line-height: 1.45; margin: 0; }

/* ---------- InsuranceOption ---------- */
.vd-ins { display: grid; gap: var(--space-3); }
.vd-ins__opt { display: grid; grid-template-columns: 22px 1fr auto; gap: var(--space-4);
  align-items: start; padding: var(--space-5); border-radius: var(--radius-lg);
  border: 1px solid var(--frame); background: var(--paper-raised); cursor: pointer; }
.vd-ins__opt:hover { background: var(--paper-sunk); }
.vd-ins__opt--on { border-width: 2px; padding: calc(var(--space-5) - 1px); }
.vd-ins__radio { width: 22px; height: 22px; border-radius: var(--radius-full); border: 2px solid var(--frame);
  display: grid; place-items: center; margin-top: 2px; }
.vd-ins__opt--on .vd-ins__radio { border-color: var(--ink); }
.vd-ins__opt--on .vd-ins__radio::after { content: ""; width: 10px; height: 10px;
  border-radius: var(--radius-full); background: var(--ink); }
.vd-ins__name { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -.01em;
  margin: 0 0 var(--space-1); }
.vd-ins__plain { font-size: 15px; line-height: 1.55; margin: 0 0 var(--space-3); }
.vd-ins__excess { font-family: var(--font-mono); font-size: 13px; color: var(--ink-muted);
  font-variant-numeric: tabular-nums; }
.vd-ins__cost { font-family: var(--font-mono); font-size: 22px; font-weight: 700; white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.vd-ins__cost small { display: block; font-size: 12px; font-weight: 500; color: var(--ink-muted); text-align: right; }

/* ---------- KitList ---------- */
.vd-kit { display: grid; gap: var(--space-5); }
.vd-kit__group { display: grid; gap: var(--space-3); }
.vd-kit__items { list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--space-2) var(--space-5); }
.vd-kit__items li { display: grid; grid-template-columns: 18px 1fr; gap: var(--space-3);
  align-items: baseline; font-size: 15px; padding: 5px 0; border-bottom: 1px solid var(--rule); }
.vd-kit__items li::before { content: "✓"; color: var(--bush); font-weight: 700; font-size: 13px; }
.vd-kit__items li[data-extra]::before { content: "+"; color: var(--amber); }
.vd-kit__items li[data-extra] span::after { content: " · " attr(data-extra); color: var(--ink-muted);
  font-family: var(--font-mono); font-size: 12px; }

/* ---------- StoryCard ---------- */
.vd-story { display: grid; gap: var(--space-4); background: transparent; }
.vd-story__media { position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 3 / 2; background: var(--paper-sunk); }
.vd-story__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vd-story__cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: var(--space-4);
  background: linear-gradient(to top, var(--scrim), transparent); color: #f6f8f4; }
.vd-story__cap .vd-label { color: #f6f8f4; opacity: .85; }
.vd-story h3 { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.vd-story p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-muted); }
.vd-story__meta { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ---------- Notice ---------- */
.vd-notice { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4);
  border: 1px solid var(--frame); border-radius: var(--radius-plate);
  padding: var(--space-5); background: var(--season-peak); color: var(--ink); }
.vd-notice--info { background: var(--season-low); }
.vd-notice__mark { width: 38px; height: 38px; border-radius: var(--radius-full); display: grid; place-items: center;
  background: var(--amber); color: var(--on-amber); font-family: var(--font-mono); font-weight: 700; font-size: 20px; }
.vd-notice--info .vd-notice__mark { background: var(--river); color: var(--on-river); }
.vd-notice h4 { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -.01em;
  margin: 2px 0 var(--space-2); }
.vd-notice p { margin: 0 0 var(--space-3); font-size: 15px; line-height: 1.55; max-width: 60ch; }
.vd-notice p:last-child { margin-bottom: 0; }
.vd-notice ul { margin: 0 0 var(--space-3); padding-left: 1.1em; font-size: 15px; line-height: 1.6; }

/* ---------- BookingBar ---------- */
.vd-bar { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap;
  background: var(--paper-raised); border-radius: var(--radius-plate); padding: var(--space-4) var(--space-5);
  border: 1px solid var(--frame); box-shadow: var(--shadow-bar); }
.vd-bar__field { display: grid; gap: var(--space-1); }
.vd-bar__field b { font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  font-variant-numeric: tabular-nums; }
.vd-bar__total { margin-left: auto; text-align: right; display: grid; gap: var(--space-1); }
.vd-bar__total b { font-family: var(--font-mono); font-size: 22px; font-weight: 700;
  font-variant-numeric: tabular-nums; }
.vd-bar__sep { width: 1px; align-self: stretch; background: var(--rule); }

@media (prefers-reduced-motion: reduce) {
  .vd-root *, .vd-root *::before, .vd-root *::after { transition-duration: .001ms !important; animation: none !important; }
  .vd-fleet:hover, .vd-btn:hover { transform: none; }
}

/* ---------- display type steps down on small screens ----------
   tokens.json can only carry fixed sizes, so the responsive step lives here.
   bundle.css loads after tokens.css, so these win. The brand book's
   "drops to 44px under 700px" is implemented by this block. */
@media (max-width: 860px) {
  .display-xl { font-size: 44px; letter-spacing: -.025em; }
  .display-l  { font-size: 34px; }
  .display-m  { font-size: 26px; }
  .display-s  { font-size: 20px; }
  .price-l    { font-size: 32px; }
  .lead       { font-size: 18px; }
  .vd-fleet__name { font-size: 28px; }
  .vd-ins__name   { font-size: 20px; }
  .vd-notice h4   { font-size: 20px; }
  .vd-price__total b { font-size: 30px; }
}
@media (max-width: 400px) {
  .display-xl { font-size: 36px; }
  .display-l  { font-size: 28px; }
  .vd-price__total { padding: var(--space-4); }
  .vd-notice, .vd-fleet__body, .vd-cal, .vd-price { padding: var(--space-4); }
}
