/* f1-components.css — component classes for the FIVESTACK-F1 UI.
   Order: shell chrome · section title · card · form · buttons · Approach
   radio-chip · dark preview panel · topbar logo · two-column layout ·
   race grid · package list · preview sidebar extras. */

/* ───── Topbar ───── */
.topbar {
  background: var(--f1-carbon);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.topbar .right { display: flex; gap: 14px; align-items: center; opacity: 0.85; }
.topbar .right .sep { opacity: 0.4; }

/* ───── Content wrap ───── */
.wrap { max-width: 1280px; margin: 32px auto; padding: 0 24px 96px; }

/* ───── Section title ─────
   Broadcast chyron: F1 display font, small caps, red chevron tick on
   the left that reads as a race-feed marker. Slightly larger than the
   previous Titillium label so each section has clear visual weight. */
.section-title {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--f1-carbon);
  margin: 36px 0 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 26px;
  height: 3px;
  background: var(--f1-red);
  clip-path: polygon(0 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
}
.section-title:first-of-type { margin-top: 16px; }

/* ───── Card ───── */
.card {
  background: var(--f1-paper);
  border: 1px solid var(--f1-chalk);
  padding: 28px;
  position: relative;
  clip-path: polygon(var(--f1-clip-card) 0, 100% 0, 100% calc(100% - var(--f1-clip-card)), calc(100% - var(--f1-clip-card)) 100%, 0 100%, 0 var(--f1-clip-card));
  margin-bottom: 18px;
}
.card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  background: var(--f1-red);
}

/* ───── Grid used inside cards ───── */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

/* ───── Form field ───── */
.field { display: block; }
.field label {
  display: block;
  font-size: 10px;
  letter-spacing: var(--f1-track-label);
  text-transform: uppercase;
  color: var(--f1-slate);
  font-weight: 700;
  margin-bottom: 8px;
}
.field input[type=text],
.field input[type=email],
.field input[type=password],
.field input[type=date],
.field textarea,
.field select {
  width: 100%;
  background: #fff;
  border: 1px solid #D0D0D2;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--f1-carbon);
  outline: none;
  transition: border-color 0.15s ease;
  border-radius: 0;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--f1-red); }
.field .hint { font-size: 11px; color: var(--f1-titanium); margin-top: 6px; letter-spacing: 0.03em; }

/* ───── Buttons ───── */
.f1-btn {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: var(--f1-track-micro);
  text-transform: uppercase;
  padding: 14px 22px;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  background: transparent;
  text-decoration: none;
  font-family: var(--f1-font);
}
.f1-btn.primary {
  background: var(--f1-red);
  color: #fff;
  clip-path: polygon(var(--f1-clip-btn) 0, 100% 0, 100% calc(100% - var(--f1-clip-btn)), calc(100% - var(--f1-clip-btn)) 100%, 0 100%, 0 var(--f1-clip-btn));
}
.f1-btn.dark {
  background: var(--f1-carbon);
  color: #fff;
  clip-path: polygon(var(--f1-clip-btn) 0, 100% 0, 100% calc(100% - var(--f1-clip-btn)), calc(100% - var(--f1-clip-btn)) 100%, 0 100%, 0 var(--f1-clip-btn));
}
.f1-btn.ghost-on-dark {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}
.f1-btn:hover { filter: brightness(1.08); }

/* ───── Radio-chip (Approach selector) ─────
   Segmented broadcast-style pills. Angular bottom-right cut echoes the
   card clip. CSS `border` can't render on a clip-path edge, so the
   outline is faked by two layers: the chip itself carries the border
   colour, and ::before paints the fill inset by 1px (also clipped) so
   a 1px strip of the outer colour shows around every edge including
   the diagonal. ::after hosts the red selection bar. */
.radioset { display: flex; gap: 8px; }
.radio-chip {
  flex: 1;
  padding: 12px 14px 12px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s, color 0.15s;
  background: #D0D0D2;
  color: var(--f1-slate);
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  min-height: 44px;
}
.radio-chip::before {
  content: '';
  position: absolute;
  inset: 1px;
  background: #fff;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
  transition: background 0.15s;
  z-index: 0;
}
.radio-chip::after {
  content: '';
  position: absolute;
  left: 1px;
  top: 1px;
  bottom: 1px;
  width: 3px;
  background: transparent;
  transition: background 0.15s;
  z-index: 2;
}
.radio-chip:hover { background: var(--f1-slate); color: var(--f1-carbon); }
.radio-chip.selected {
  background: var(--f1-carbon);
  color: #fff;
}
.radio-chip.selected::before { background: var(--f1-carbon); }
.radio-chip.selected::after { background: var(--f1-red); }
.radio-chip .dot { display: none; }
.radio-chip .t {
  position: relative;
  z-index: 1;
  font-family: var(--f1-font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: inherit;
}

/* ───── Preview panel (dark carbon) ───── */
.preview-panel {
  background: var(--f1-carbon);
  color: #fff;
  padding: 28px;
  position: relative;
  clip-path: polygon(var(--f1-clip-card) 0, 100% 0, 100% calc(100% - var(--f1-clip-card)), calc(100% - var(--f1-clip-card)) 100%, 0 100%, 0 var(--f1-clip-card));
  margin-bottom: 18px;
}
.preview-panel::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  background: var(--f1-red);
}
.preview-panel .plabel {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.92;
  font-weight: 700;
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.preview-panel .plabel::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 3px;
  background: var(--f1-red);
  clip-path: polygon(0 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
}
.preview-panel .pbig {
  font-weight: 900;
  font-size: 42px;
  line-height: 1;
  letter-spacing: var(--f1-track-display);
}
.preview-panel .prow { display: flex; gap: 40px; margin-top: 18px; flex-wrap: wrap; }
.preview-panel .pcol .plab {
  font-size: 10px;
  letter-spacing: var(--f1-track-label);
  text-transform: uppercase;
  opacity: 0.6;
}
.preview-panel .pcol .pval { font-weight: 700; font-size: 15px; margin-top: 2px; }
.preview-panel hr { border: 0; height: 1px; background: rgba(255,255,255,0.12); margin: 20px 0; }
.preview-panel .footnote { font-size: 11px; opacity: 0.6; letter-spacing: 0.1em; text-transform: uppercase; }

/* ───── Topbar logo (SVG image) ───── */
.topbar { padding: 16px 24px; }
.topbar .logo-link { display: inline-flex; align-items: center; text-decoration: none; color: #fff; }
.topbar .topbar-logo { height: 36px; width: auto; display: block; }
.topbar .logo-link:focus-visible { outline: 2px solid var(--f1-red); outline-offset: 4px; }

/* ───── Two-column layout (main + sticky sidebar) ───── */
.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
}
.layout-main { min-width: 0; }
.layout-sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
}
@media (max-width: 1000px) {
  .layout-grid { grid-template-columns: 1fr; }
  .layout-sidebar { position: static; top: auto; }
}

/* ───── Race grid ───── */
.race-grid {
  display: grid;
  /* 210px min is enough for the widest GP short name ("Azerbaijan GP")
     + the date block on the left, so every card shows the full race
     name without an ellipsis. */
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}
.race-chip {
  border: 1px solid var(--f1-chalk);
  background: #fff;
  padding: 14px 14px 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  font: inherit;
  font-family: var(--f1-font-ui);
  color: inherit;
  min-height: 78px;
}
.race-chip:hover {
  border-color: var(--f1-carbon);
  transform: translateY(-1px);
  box-shadow: 0 4px 0 0 var(--f1-carbon);
}
.race-chip.selected {
  border-color: var(--f1-red);
  background: var(--f1-tint);
}
.race-chip.selected::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 3px;
  background: var(--f1-red);
}
.race-chip:focus-visible { outline: 2px solid var(--f1-red); outline-offset: 2px; }

/* Line 1: race name — hero, Formula1 Wide. */
.race-chip .rc-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--f1-carbon);
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Line 2: city (muted Titillium). */
.race-chip .rc-city {
  font-size: 11px;
  color: var(--f1-titanium);
  line-height: 1.3;
  white-space: normal;
}

/* Line 3: "04 – 07 Jun · 12 packages" as a single subtitle. */
.race-chip .rc-meta {
  margin-top: auto;
  padding-top: 6px;
  font-size: 11px;
  color: var(--f1-slate);
  letter-spacing: 0.01em;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
}
.race-chip .rc-dates { font-weight: 600; }
.race-chip .rc-sep   { color: var(--f1-chalk); white-space: pre; }
.race-chip .rc-count { color: var(--f1-titanium); }

/* ───── Package card event header ─────
   Broadcast-style identity strip that sits at the top of the package
   card once a race is picked. Keeps the selected GP's name, date window,
   circuit, and package count in the user's field of view while they
   scroll the list. Red "LIVE"-style tick on the left anchors the card to
   the page's section-title visual language. */
.pkg-event-head {
  margin: -4px 0 18px;
  padding: 0 0 14px 14px;
  border-bottom: 1px solid var(--f1-chalk);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.pkg-event-head::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 18px;
  width: 3px;
  background: var(--f1-red);
}
.peh-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.peh-name {
  font-family: var(--f1-font);
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--f1-carbon);
}
.peh-dates {
  font-family: var(--f1-font);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--f1-red);
  white-space: nowrap;
}
.peh-meta {
  font-size: 11px;
  color: var(--f1-slate);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
}
.peh-meta .peh-circuit { color: var(--f1-carbon); }
.peh-meta .peh-location { color: var(--f1-slate); }
.peh-meta .peh-count { color: var(--f1-titanium); }
.peh-sep {
  display: inline-block;
  margin: 0 8px;
  color: var(--f1-chalk);
  font-weight: 900;
}

/* ───── Package list ───── */
.package-empty {
  padding: 22px 4px;
  font-size: 12px;
  color: var(--f1-titanium);
  text-align: center;
  font-style: normal;
  letter-spacing: 0.02em;
}
.package-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.package-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 14px;
  border: 0;
  border-left: 3px solid transparent;
  border-top: 1px solid var(--f1-chalk);
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-family: var(--f1-font-ui);
  transition: background 0.1s, border-color 0.15s;
}
.package-row:first-child { border-top: 0; }
.package-row:hover { background: #FAFAFA; }
.package-row.selected { background: var(--f1-tint); border-left-color: var(--f1-red); }
.package-row:focus-visible { outline: 2px solid var(--f1-red); outline-offset: -2px; }
.package-row .pr-body { min-width: 0; }
.package-row .pr-name {
  font-weight: 700;
  font-size: 12px;
  color: var(--f1-carbon);
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.package-row .pr-cat {
  font-size: 10px;
  letter-spacing: var(--f1-track-label);
  text-transform: uppercase;
  color: var(--f1-titanium);
  font-weight: 700;
  margin-top: 3px;
}
.package-row .pr-inv {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--f1-slate);
  font-weight: 700;
  white-space: nowrap;
  /* Padding + border match .pr-visit exactly so both pills render at the
     same height, which keeps the row visually aligned across the list. */
  padding: 6px 10px;
  border: 1px solid #D0D0D2;
  background: #FAFAFA;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.package-row.in-cart .pr-inv {
  color: var(--f1-red);
  border-color: var(--f1-red);
  background: #fff;
}
.package-row .pr-price {
  font-weight: 900;
  font-size: 16px;
  color: var(--f1-carbon);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.package-row.selected .pr-price { color: var(--f1-red); }

/* ───── Preview sidebar extras ───── */
.preview-package-name {
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  line-height: 1.25;
}
.preview-package-cat {
  font-size: 10px;
  letter-spacing: var(--f1-track-label);
  text-transform: uppercase;
  color: var(--f1-red);
  font-weight: 700;
  margin-top: 4px;
}
.preview-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.preview-total .plab { opacity: 0.85; }
.preview-total-value {
  font-weight: 900;
  font-size: 30px;
  letter-spacing: -0.01em;
  color: #fff;
}
.preview-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.preview-actions .f1-btn { justify-content: center; text-align: center; width: 100%; }

/* ───── Quantity stepper + in-cart row ───── */
/* .package-row turns from a <button> radio into a plain row with a stepper. */
.package-list { list-style: none; padding: 0; margin: 0; }

.package-row {
  /* Fixed column widths for INFO / inventory / price / stepper so every
     row lines up vertically even when content differs in width
     ("19 LEFT" vs "373 LEFT", "$1,599" vs "$12,499"). */
  grid-template-columns: 1fr 70px 78px 88px auto;
}
.package-row .pr-visit { justify-self: start; }
.package-row .pr-inv   { justify-self: start; }
.package-row .pr-price { justify-self: end; text-align: right; }
.package-row.in-cart {
  background: var(--f1-tint);
  border-left-color: var(--f1-red);
}
.package-row.in-cart .pr-price { color: var(--f1-red); }

.pr-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1.5px solid var(--f1-chalk);
  background: #fff;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  user-select: none;
}
.pr-stepper.active { border-color: var(--f1-red); }
.pr-btn {
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: var(--f1-font);
  font-weight: 700;
  font-size: 15px;
  color: var(--f1-carbon);
  width: 26px;
  padding: 0;
  line-height: 1;
  transition: background 0.1s, color 0.1s;
}
.pr-btn:hover:not(:disabled) { background: var(--f1-red); color: #fff; }
.pr-btn:focus-visible { outline: 2px solid var(--f1-red); outline-offset: -4px; }
.pr-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.pr-qty {
  min-width: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
  color: var(--f1-carbon);
  font-variant-numeric: tabular-nums;
  background: #FAFAFA;
  border-left: 1px solid var(--f1-chalk);
  border-right: 1px solid var(--f1-chalk);
}
.package-row.in-cart .pr-qty { color: var(--f1-red); background: #fff; }

/* ───── Race-chip "in quote" badge ─────
   Compact red pill in the top-right corner with the total seat count
   for that race. */
.race-chip { padding-right: 40px; }
.race-chip .rc-cart-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  color: #fff;
  background: var(--f1-red);
  clip-path: polygon(3px 0, 100% 0, 100% calc(100% - 3px), calc(100% - 3px) 100%, 0 100%, 0 3px);
}
.race-chip.has-in-quote { border-color: var(--f1-red); }

/* ───── Quote summary sidebar ───── */
.quote-panel { padding-bottom: 18px; }
.quote-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.quote-counter {
  font-size: 10px;
  letter-spacing: var(--f1-track-label);
  text-transform: uppercase;
  font-weight: 700;
  color: var(--f1-red);
}

.quote-empty { padding-top: 4px; }
.quote-filled { display: flex; flex-direction: column; gap: 0; }

.quote-groups { max-height: 52vh; overflow-y: auto; padding-right: 4px; margin-right: -4px; }
.quote-groups::-webkit-scrollbar { width: 6px; }
.quote-groups::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }

.quote-race-group + .quote-race-group { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.08); }
.quote-race-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.quote-race-name {
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
  flex: 1;
}
.quote-race-dates {
  font-size: 10px;
  letter-spacing: var(--f1-track-label);
  text-transform: uppercase;
  opacity: 0.55;
  font-weight: 700;
}

.quote-line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  column-gap: 10px;
  align-items: baseline;
  padding: 5px 0;
  font-size: 12px;
}
.quote-line .ql-qty {
  font-weight: 900;
  color: var(--f1-red);
  font-variant-numeric: tabular-nums;
  min-width: 26px;
  font-size: 13px;
}
.quote-line .ql-name {
  color: #fff;
  line-height: 1.3;
  min-width: 0;
  overflow-wrap: anywhere;
}
.quote-line .ql-cat {
  display: block;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-top: 2px;
}
.quote-line .ql-line-total {
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.quote-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.quote-total .plab {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.75;
}

/* ───── Deck-selection section (full-width row) ───── */
.layout-fullrow { grid-column: 1 / -1; margin-top: 16px; }

.deck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.deck-card {
  position: relative;
  display: block;
  cursor: pointer;
}
.deck-card .deck-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.deck-card .deck-body {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border: 1.5px solid #D0D0D2;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
  min-height: 100%;
}
.deck-card:hover .deck-body { border-color: var(--f1-red); }
.deck-input:checked ~ .deck-body { border-color: var(--f1-red); background: var(--f1-tint); }
.deck-input:focus-visible ~ .deck-body { outline: 2px solid var(--f1-red); outline-offset: 2px; }
.deck-card.is-soon { cursor: not-allowed; }
.deck-card.is-soon .deck-body { opacity: 0.55; border-style: dashed; }

.deck-icon {
  width: 44px;
  height: 44px;
  background: var(--f1-carbon);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--f1-red);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.deck-input:checked ~ .deck-body .deck-icon { background: var(--f1-red); color: #fff; }

.deck-meta { min-width: 0; }
.deck-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--f1-carbon);
  letter-spacing: 0.01em;
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.deck-desc {
  font-size: 11px;
  color: var(--f1-titanium);
  line-height: 1.5;
  margin-top: 4px;
}
.deck-chip-soon {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 3px 7px 2px;
  color: #fff;
  border: 0;
  background: var(--f1-slate);
  clip-path: polygon(3px 0, 100% 0, 100% calc(100% - 3px), calc(100% - 3px) 100%, 0 100%, 0 3px);
}

.deck-check {
  width: 20px;
  height: 20px;
  border: 2px solid #D0D0D2;
  position: relative;
  flex-shrink: 0;
}
.deck-input:checked ~ .deck-body .deck-check {
  background: var(--f1-red);
  border-color: var(--f1-red);
}
.deck-input:checked ~ .deck-body .deck-check::after {
  content: '✓';
  position: absolute;
  inset: 0;
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

/* ───── Deliverables line inside quote sidebar ───── */
.quote-deliverables {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.quote-deliverables > .plabel { opacity: 0.85; margin-bottom: 8px; }
.quote-deliverables .dl-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.quote-deliverables .dl-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: 10px;
  letter-spacing: 0.06em;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
}
.quote-deliverables .dl-chip::before {
  content: '';
  width: 4px; height: 4px;
  background: var(--f1-red);
}
.quote-deliverables .dl-none { font-size: 11px; opacity: 0.5; font-style: normal; }

/* ───── Topbar sync + logout cluster ───── */
.topbar .right { display: flex; gap: 16px; align-items: center; opacity: 1; }
.topbar .sync-cluster { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.topbar .sync-btn {
  font-family: var(--f1-font);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: var(--f1-track-label);
  text-transform: uppercase;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.28);
  padding: 6px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s, border-color 0.15s;
}
.topbar .sync-btn:hover:not(:disabled) { background: var(--f1-red); border-color: var(--f1-red); }
.topbar .sync-btn:disabled { opacity: 0.6; cursor: progress; }
.topbar .sync-btn.is-syncing .sync-icon { animation: syncSpin 0.9s linear infinite; }
.topbar .sync-btn.is-success { border-color: var(--f1-red); }
.topbar .sync-btn.is-failed  { border-color: #ff6b6b; color: #ffd1d1; }
.topbar .sync-icon { font-size: 13px; display: inline-block; }
.topbar .sync-status { font-size: 9px; letter-spacing: 0.1em; opacity: 0.55; text-transform: uppercase; font-weight: 700; }
.topbar .sync-status.is-failed { color: #ffb4b4; opacity: 1; }
@keyframes syncSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.topbar-logout { margin: 0; padding: 0; display: inline-block; }
.topbar-link {
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  font-family: var(--f1-font);
  color: inherit;
  cursor: pointer;
  letter-spacing: inherit;
  text-transform: inherit;
  opacity: 0.85;
}
.topbar-link:hover { opacity: 1; color: var(--f1-red); }
.topbar-link:focus-visible { outline: 2px solid var(--f1-red); outline-offset: 2px; }

@media (max-width: 720px) {
  .topbar .sync-cluster { display: none; }
}

/* ───── Mobile (≤ 640px) ─────
   Rightsholder page stacks the sidebar below 1000px already; this block
   handles the phone-sized layout: slimmer topbar, tighter hero, form
   grids collapsed to one column, and the package-row 5-col grid
   restructured into a two-row "card" with name/price on top and
   info/inventory/stepper controls on the bottom. */
@media (max-width: 640px) {
  /* Page shell */
  .wrap { padding: 0 14px 64px; margin: 18px auto; }
  .card { padding: 18px 16px; }
  .section-title { font-size: 12px; letter-spacing: 0.12em; margin: 26px 0 10px; }
  .section-title::before { width: 22px; height: 2px; }

  /* Topbar — strip the email + separator; keep logo + logout */
  .topbar { padding: 10px 14px; font-size: 9px; letter-spacing: 0.08em; }
  .topbar .topbar-logo { height: 24px; }
  .topbar #topbarEmail,
  .topbar .right .sep { display: none; }
  .topbar .right { gap: 10px; }

  /* Hero */
  .page-h { font-size: 26px; line-height: 1.05; letter-spacing: 0; }
  .page-sub { font-size: 12px; margin-bottom: 18px; }
  .page-kicker { flex-wrap: wrap; font-size: 10px; gap: 8px; margin-bottom: 12px; }
  .page-kicker .pk-sep { display: none; }

  /* Forms — Approach radios stack vertically so they never collide */
  .grid2 { grid-template-columns: 1fr; gap: 14px; }
  .radioset { flex-direction: column; gap: 6px; }
  .radio-chip { min-height: 40px; }

  /* Race chip — tighter internal padding */
  .race-chip { padding: 12px 12px 10px 14px; min-height: 70px; }

  /* Package card event header — stack name over dates, shrink display */
  .peh-top { flex-direction: column; align-items: flex-start; gap: 4px; }
  .peh-name { font-size: 18px; }
  .peh-dates { font-size: 11px; }
  .peh-meta { font-size: 10px; }
  .peh-sep { margin: 0 6px; }

  /* Package rows — the desktop 5-col grid can't fit at this width. Switch
     to a 4-col 2-row layout: row 1 is the product (name + category on the
     left, price on the right), row 2 is the actions (INFO / inventory /
     spacer / stepper). Readable as a card, still one row of input. */
  .package-row {
    grid-template-columns: auto auto 1fr auto;
    grid-template-areas:
      'body body body price'
      'info inv  .    stepper';
    row-gap: 12px;
    column-gap: 10px;
    padding: 14px 14px;
  }
  .package-row .pr-body    { grid-area: body;    min-width: 0; }
  .package-row .pr-visit   { grid-area: info;    justify-self: start; }
  .package-row .pr-inv     { grid-area: inv;     justify-self: start; }
  .package-row .pr-price   { grid-area: price;   justify-self: end; align-self: start; font-size: 15px; }
  .package-row .pr-stepper { grid-area: stepper; justify-self: end; }
  .package-row .pr-name    { font-size: 12px; }
  .package-row .pr-cat     { font-size: 10px; margin-top: 2px; }

  /* Deliverables — stack to a single column */
  .deck-grid { grid-template-columns: 1fr; gap: 10px; }
  .deck-card .deck-body { padding: 14px 14px; }

  /* Sidebar (quote panel) */
  .preview-panel { padding: 22px 18px; }
  .preview-panel .pbig { font-size: 34px; }
  .preview-total-value { font-size: 26px; }

  /* Quote summary scroll area — shorter on mobile */
  .quote-groups { max-height: 60vh; }
}

/* ───── Package-row outbound link pill (→ F1 Experiences) ─────
   Dedicated grid column between the name block and the inventory pill.
   Labelled so it reads as a destination, not just an arrow. */
.package-row .pr-visit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  color: var(--f1-slate);
  background: #FAFAFA;
  border: 1px solid #D0D0D2;
  text-decoration: none;
  font-size: 10px;
  line-height: 1;
  letter-spacing: var(--f1-track-label);
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.12s, border-color 0.12s, background 0.12s, transform 0.12s;
}
.package-row .pr-visit .pr-visit-arrow {
  font-size: 10px;
  line-height: 1;
}
.package-row .pr-visit:hover {
  color: #fff;
  background: var(--f1-red);
  border-color: var(--f1-red);
  transform: translate(1px, -1px);
}
.package-row .pr-visit:focus-visible {
  outline: 2px solid var(--f1-red);
  outline-offset: 2px;
}
.package-row .pr-visit-empty { visibility: hidden; }
.package-row.in-cart .pr-visit {
  color: var(--f1-red);
  border-color: var(--f1-red);
  background: #fff;
}
.package-row.in-cart .pr-visit:hover {
  color: #fff;
  background: var(--f1-red);
}

/* ───── Quote-line outbound icon (↗ inline next to name) ─────
   Icon-only link appended after the package name. Inline so it always
   sits on the last line of the name regardless of wrapping. */
.quote-line .ql-visit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.18);
  text-decoration: none;
  font-size: 10px;
  line-height: 1;
  vertical-align: 2px;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
}
.quote-line .ql-visit:hover {
  color: #fff;
  background: var(--f1-red);
  border-color: var(--f1-red);
}
.quote-line .ql-visit:focus-visible {
  outline: 2px solid var(--f1-red);
  outline-offset: 2px;
}
