/* ResponseIQ Wraps. Tokens follow staff/DESIGN.md (cool paper, white ruled cards, slate inks, logo blue).
   The wrap sheet sits on a dark "screen" plate because that is where a wrap is seen: on the car's display. */
:root {
  --paper: #F3F5F8; --card: #FFFFFF; --strip: #F8FAFC; --sunk: #EEF1F5;
  --ink: #1F2630; --slate: #49525F; --meta: #5B6574; --field: #8C98A9;
  --rule: #D3DAE3; --rule-2: #C3CCD7;
  --blue: #2578FE; --blue-ink: #1A5FD6; --blue-press: #154EB3; --blue-tint: #EAF2FF; --blue-line: #BCD3FB;
  --danger: #C93636; --danger-tint: #FCEDED; --placeholder: #6B7684;
  --screen: #12161D; --screen-2: #1B2029; --screen-rule: #2C3340; --screen-ink: #E7ECF3; --screen-meta: #9AA6B6; --screen-link: #9CC4FF;
  --studio: #DCE1E8; --studio-2: #B9C1CC; --studio-card: #C7CED8;   /* the plate for dark paint, which vanishes on --screen */
  --r-sm: 4px; --r-md: 6px; --r-lg: 8px; --r-frame: 12px; --r-sheet: 18px;
  --font: "Public Sans", -apple-system, "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(16px, 4vw, 40px);
}

@font-face {
  font-family: 'Montserrat';
  src: url('/wraps/assets/fonts/montserrat-var.woff2') format('woff2-variations'), url('/wraps/assets/fonts/montserrat-var.woff2') format('woff2');
  font-weight: 100 900; font-display: swap; font-style: normal;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }   /* component display rules must never beat the hidden attribute */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--font); font-feature-settings: "ss01"; }
::selection { background: var(--blue-tint); color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-press); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
code { font: 0.9em ui-monospace, "SF Mono", Menlo, monospace; background: var(--sunk); padding: .08em .35em; border-radius: var(--r-sm); }
h1, h2, h3 { margin: 0; letter-spacing: -0.015em; text-wrap: balance; }
h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); font-weight: 800; line-height: 1.2; margin-bottom: 1.1rem; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: .75rem .9rem; border-radius: var(--r-md); z-index: 10; }
.skip:focus { left: 8px; }
.ico { flex: none; }
.num { font-variant-numeric: tabular-nums; }

/* ── Top bar ── */
.top { background: var(--card); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 5; }
.top__in { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; min-height: 44px; text-decoration: none; }
.brand img { height: 34px; width: auto; }
.brand__tag { font-weight: 700; color: var(--slate); padding-left: .7rem; border-left: 1px solid var(--rule-2); line-height: 1.1; }
.top__nav { display: flex; gap: .2rem; }
.top__nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--slate); font-weight: 600; font-size: .92rem; text-decoration: none; padding: 0 .7rem; border-radius: var(--r-md); }
.top__nav a:hover { color: var(--ink); background: var(--strip); }

main { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.notice { display: flex; gap: .55rem; align-items: center; margin: 1.2rem 0 0; padding: .75rem 1rem; background: var(--blue-tint); border: 1px solid var(--blue-line); border-radius: var(--r-lg); color: var(--ink); }

/* ── Stage: copy + live sheet ── */
.stage { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3.5rem); padding: clamp(1.75rem, 4vw, 3.25rem) 0 clamp(2.5rem, 5vw, 4rem); align-items: start; }
.stage__copy { min-width: 0; }
.stage h1 { font-size: clamp(2rem, 4.1vw, 3.35rem); font-weight: 800; line-height: 1.04; letter-spacing: -0.03em; max-width: 13ch; }
.truth { color: var(--slate); font-size: 1.08rem; margin: 1rem 0 1.5rem; max-width: 46ch; }
.truth strong { color: var(--ink); }

.tiers { border: 0; margin: 0 0 1.25rem; padding: 0; display: grid; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--card); overflow: hidden; }
.tier { display: block; cursor: pointer; position: relative; }
.tier + .tier { border-top: 1px solid var(--rule); }
.tier input { position: absolute; opacity: 0; }
.tier__body { display: grid; grid-template-columns: 22px 1fr auto; column-gap: .75rem; row-gap: .1rem; padding: .85rem 1rem; transition: background .15s; }
.tier__body::before { content: ""; grid-row: 1 / span 2; width: 18px; height: 18px; margin-top: .2rem; border: 1.5px solid var(--field); border-radius: 50%; background: var(--card); transition: border-color .15s, box-shadow .15s; }
.tier__name { font-weight: 700; font-size: 1.05rem; }
.tier__price { font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.tier__line { grid-column: 2 / span 2; color: var(--meta); font-size: .92rem; }
.tier:hover .tier__body { background: var(--strip); }
.tier input:checked + .tier__body { background: var(--blue-tint); }
.tier input:checked + .tier__body::before { border-color: var(--blue-ink); box-shadow: inset 0 0 0 4px var(--card), inset 0 0 0 9px var(--blue-ink); }
.tier input:focus-visible + .tier__body { outline: 2px solid var(--blue); outline-offset: -2px; }

.panel { display: grid; gap: 1rem; }
.tier-note { display: none; margin: -.4rem 0 0; color: var(--meta); font-size: .9rem; }
.car-row { display: flex; align-items: baseline; gap: .6rem; padding: .7rem .9rem; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); }
.car-row__label { font-size: .72rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--meta); }
.car-row__value { font-weight: 600; flex: 1; min-width: 0; }
.link { background: none; border: 0; padding: .25rem .1rem; font: 600 .95rem var(--font); color: var(--blue-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; min-height: 44px; min-width: 44px; }
.link:hover { color: var(--blue-press); }

.drop { position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: .9rem; align-items: center; padding: 1.15rem 1.1rem; border: 1.5px dashed var(--blue-line); border-radius: var(--r-frame); background: var(--card); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.is-over { border-color: var(--blue); background: var(--blue-tint); }
.drop:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.drop__icon { grid-row: span 2; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--blue-ink); color: #fff; }
.drop__main { font-weight: 700; font-size: 1.08rem; }
.drop__sub { color: var(--meta); font-size: .9rem; }
.drop.has-logo { border-style: solid; border-color: var(--rule); }
.drop.has-logo .drop__icon { background: var(--sunk); color: var(--slate); }
.drop.is-busy .drop__icon svg { animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .35; } }

.controls { display: grid; gap: .95rem; padding: 1rem; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); }
.control__label { display: block; font-size: .95rem; font-weight: 600; color: var(--slate); margin-bottom: .45rem; }
.control__hint { font-weight: 400; color: var(--meta); font-size: .88rem; }
.swatches { display: flex; flex-wrap: wrap; gap: .45rem; }
.swatch { width: 44px; height: 44px; border-radius: 10px; border: 1px solid rgba(20, 24, 31, .18); background: var(--sw); cursor: pointer; position: relative; padding: 0; }
.swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--blue-ink); }
.swatch--logo { background: conic-gradient(from 0deg, var(--sw, var(--blue)) 0 50%, var(--card) 50% 100%); }
.swatch--custom { display: grid; place-items: center; background: conic-gradient(#E84B4B, #E3A72F, #1F9D55, #2578FE, #8B5CF6, #E84B4B); overflow: hidden; }
.swatch--custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: 0; padding: 0; }
.swatch--custom.is-on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--blue-ink); }
/* Style picker: each card is that style already drawn with the visitor's logo, on the screen plate. */
.control--styles { margin: 0; }
.styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.style-card { display: grid; gap: .3rem; padding: .3rem .3rem .4rem; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--card); cursor: pointer; text-align: left; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s; }
.style-card:hover { border-color: var(--rule-2); }
.style-card[aria-checked="true"] { border-color: var(--blue-ink); box-shadow: 0 0 0 1px var(--blue-ink); }
.style-card__img { display: grid; place-items: center; aspect-ratio: 3 / 1; overflow: hidden; border-radius: var(--r-md); background: var(--screen); padding: 2px; }
.style-card__img img { width: 100%; height: auto; transition: opacity .2s var(--ease); }
.styles.is-loading .style-card__img img { opacity: .55; }
.styles[data-paint="dark"] .style-card__img { background: var(--studio-card); }
.style-card__name { font-weight: 700; font-size: .9rem; color: var(--ink); padding: 0 .2rem; }
.style-card[aria-checked="true"] .style-card__name { color: var(--blue-ink); }
.lettering { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.lettering label { font-size: .88rem; font-weight: 600; color: var(--slate); }

.pay { display: grid; gap: .85rem; }
.field { display: grid; gap: .35rem; min-width: 0; }
.field label { font-weight: 600; font-size: .95rem; }
.field__hint { font-weight: 400; color: var(--meta); font-size: .85rem; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
input[type=text], input[type=email], input:not([type]), input[inputmode], textarea {
  font: 400 16px/1.4 var(--font); color: var(--ink); background: var(--card); border: 1px solid var(--field); border-radius: var(--r-md);
  padding: .65rem .75rem; min-height: 44px; width: 100%; transition: border-color .15s;
}
textarea { resize: vertical; min-height: 120px; }
input:hover, textarea:hover { border-color: var(--slate); }
input:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
::placeholder { color: var(--placeholder); }
input[type=file] { font: 500 .92rem var(--font); color: var(--slate); padding: .55rem; border: 1px dashed var(--rule-2); border-radius: var(--r-md); background: var(--card); width: 100%; }
input[type=file]::file-selector-button { font: 600 .9rem var(--font); margin-right: .7rem; padding: .45rem .8rem; border: 1px solid var(--rule-2); border-radius: var(--r-md); background: var(--strip); color: var(--ink); cursor: pointer; }
.field--captcha { max-width: 260px; }
.check { display: flex; gap: .6rem; align-items: center; min-height: 44px; font-size: .95rem; cursor: pointer; }   /* the whole row is the target */
.check input { appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border: 1.5px solid var(--field); border-radius: 6px; background: var(--card); display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--blue-ink); border-color: var(--blue-ink); }
.check input:checked::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.check--quiet { color: var(--slate); font-size: .9rem; margin-top: -.35rem; }
.form-error { margin: 0; padding: .7rem .9rem; border-radius: var(--r-lg); background: var(--danger-tint); color: var(--danger); font-weight: 600; font-size: .95rem; }
.fine { margin: -.2rem 0 0; color: var(--meta); font-size: .85rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 50px; padding: .7rem 1.25rem; border-radius: var(--r-lg); font: 700 1.02rem var(--font); cursor: pointer; border: 1px solid transparent; text-decoration: none; transition: background .15s, transform .1s; }
.btn--primary { background: var(--blue-ink); color: #fff; }
.btn--primary:hover { background: var(--blue-press); color: #fff; }
.btn--primary:active { transform: translateY(1px); }
.btn--primary[disabled] { background: var(--field); cursor: progress; }
.btn--ghost { background: var(--card); color: var(--ink); border-color: var(--rule-2); }
.btn--ghost:hover { background: var(--strip); color: var(--ink); }

/* ── The sheet ── */
.sheet { margin: 0; position: sticky; top: 84px; }
.sheet__plate { position: relative; background: radial-gradient(120% 90% at 30% 0%, var(--screen-2), var(--screen) 70%); border-radius: var(--r-sheet); padding: clamp(14px, 2.4vw, 28px) 0; }
.sheet__stage { position: relative; }
/* "Made for Tesla Paint Shop": Tesla's own micro-label move (Montserrat 600, uppercase, wide tracking) in place of
   Tesla's logo, which is their trademark. Montserrat is used only for these Tesla references. */
.tesla-badge { display: inline-flex; align-items: center; font: 600 .62rem/1 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--screen-ink); border: 1px solid rgba(231, 236, 243, .32); border-radius: var(--r-sm); padding: .45rem .6rem .42rem; white-space: nowrap; }
.sheet__plate--badged { padding-top: calc(clamp(14px, 2.4vw, 28px) + 30px); }   /* a status-bar strip, so the badge never sits on the file */
.sheet__plate > .tesla-badge { position: absolute; left: clamp(12px, 2vw, 22px); top: clamp(10px, 1.6vw, 16px); z-index: 1; }
.sheet__frame { position: relative; width: 72%; margin: 0 auto; }
.sheet__frame--car { width: 92%; }
/* Dark paint would vanish into the screen plate: the plate turns to a light studio grey for it. */
.sheet__plate[data-paint="dark"] { background: radial-gradient(120% 90% at 30% 0%, var(--studio), var(--studio-2) 75%); }
.sheet__plate[data-paint="dark"] > .tesla-badge { color: var(--ink); border-color: rgba(31, 38, 48, .3); }
.sheet__plate.has-views { padding-top: calc(clamp(14px, 2.4vw, 28px) + 50px); }
.view-switch { position: absolute; right: clamp(12px, 2vw, 22px); top: clamp(8px, 1.4vw, 14px); z-index: 1; display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(231, 236, 243, .1); border: 1px solid var(--screen-rule); }
.view-switch button { min-height: 44px; padding: 0 1rem; border: 0; border-radius: 999px; background: none; color: var(--screen-meta); font: 700 .86rem/1 var(--font); cursor: pointer; }
.view-switch button[aria-pressed="true"] { background: var(--screen-ink); color: var(--screen); }
.sheet__plate[data-paint="dark"] .view-switch { background: rgba(31, 38, 48, .08); border-color: rgba(31, 38, 48, .2); }
.sheet__plate[data-paint="dark"] .view-switch button { color: var(--slate); }
.sheet__plate[data-paint="dark"] .view-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.sheet__img { width: 100%; height: auto; transition: opacity .25s var(--ease), filter .25s var(--ease); }
.sheet__img.is-swapping { opacity: .25; filter: blur(6px); }

.sheet__pins { position: absolute; inset: 0; pointer-events: none; }
.pin { position: absolute; display: flex; align-items: center; transform: translateY(-50%); }
.pin__label { flex: none; font-size: .72rem; font-weight: 700; color: var(--screen-ink); letter-spacing: .01em; padding: 0 .45rem; white-space: nowrap; }
.pin__line { flex: 1; height: 1px; background: rgba(231, 236, 243, .55); min-width: 8px; }
.pin::after { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 2px var(--screen), 0 0 0 3.5px rgba(78, 167, 253, .9); }
.pin--right { flex-direction: row-reverse; }
.pin--right .pin__label { text-align: left; }
.sheet__busy { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: .5rem; color: var(--screen-ink); font-weight: 700; font-size: .9rem; background: rgba(18, 22, 29, .8); padding: .45rem .8rem; border-radius: 999px; }
.sheet__busy span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--screen-meta); border-top-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sheet__cap { margin: .75rem .25rem 0; color: var(--meta); font-size: .88rem; display: flex; gap: .8rem; align-items: center; }

/* ── Free wraps carousel (data in lib/free.php) ──
   One large slide with the next one peeking, snap scrolling, previous/next buttons and dots. When every slide
   fits (wide screens, few wraps) the controls hide themselves. */
.free { padding: clamp(2.25rem, 5vw, 3.5rem) 0; border-top: 1px solid var(--rule); }
.fw-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.fw-bar h2 { margin: 0; }
.fw-nav { display: flex; align-items: center; gap: .45rem; }
.fw-count { font-variant-numeric: tabular-nums; color: var(--meta); font-weight: 600; font-size: .95rem; margin-right: .35rem; white-space: nowrap; }
.fw-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-md); border: 1px solid var(--rule-2); background: var(--card); color: var(--ink); cursor: pointer; transition: background .15s, opacity .15s; }
.fw-btn:hover:not([disabled]) { background: var(--strip); }
.fw-btn[disabled] { opacity: .38; cursor: default; }
.fw-track { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 86%; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scroll-behavior: smooth; padding-bottom: .4rem; scrollbar-width: thin; scrollbar-color: var(--rule-2) transparent; align-items: start; }
.fw-track:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: var(--r-frame); }
.fw-slide { scroll-snap-align: start; display: grid; grid-template-rows: auto 1fr; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-frame); overflow: hidden; }
.fw-media { position: relative; aspect-ratio: 16 / 9; background: var(--screen); }
.fw-render { width: 100%; height: 100%; object-fit: cover; }
.fw-plate { position: absolute; inset: 0; padding: 10px; }
.fw-plate img { width: 100%; height: 100%; object-fit: contain; }
.fw-tag { position: absolute; left: 10px; bottom: 10px; font-size: .72rem; font-weight: 700; color: var(--screen-ink); background: rgba(18, 22, 29, .72); padding: .3rem .5rem; border-radius: var(--r-sm); }
.fw-body { display: grid; gap: .8rem; align-content: start; padding: 1rem 1.1rem 1.15rem; }
.fw-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem .8rem; }
.fw-head h3 { margin: 0; font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; }
.fw-file { display: flex; align-items: center; gap: .45rem; color: var(--meta); font-size: .88rem; white-space: nowrap; }
.fw-file img { width: 44px; height: 44px; padding: 3px; background: var(--sunk); border: 1px solid var(--rule); border-radius: var(--r-md); }
.fw-file--dark img { background: var(--screen); border-color: var(--screen); }
.fw-blurb { margin: 0; color: var(--slate); max-width: 62ch; }
.fw-meta { color: var(--meta); font-size: .88rem; font-variant-numeric: tabular-nums; }
.fw-slide .fine { margin: 0; }
.free__downloads { display: flex; flex-wrap: wrap; gap: .6rem; }
.fw-dots { display: flex; justify-content: center; margin-top: .4rem; }
.fw-dot { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; cursor: pointer; }
.fw-dot::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--rule-2); transition: background .2s var(--ease); }
.fw-dot[aria-current="true"]::before { width: 22px; background: var(--blue-ink); }
.free.is-static .fw-nav, .free.is-static .fw-dots { display: none; }
.free__note { margin-top: 1rem; }
@media (min-width: 900px) {
  .fw-track { grid-auto-columns: 74%; }
  /* Renders are wide studio shots: a side-by-side column would crop the car, so the photo spans the slide. */
  .fw-media { aspect-ratio: 21 / 9; }
  .fw-render { object-position: center 45%; }
  .fw-body { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: .7rem 2rem; padding: 1.3rem 1.5rem 1.4rem; }
  .fw-head, .fw-blurb { grid-column: 1; }
  .free__downloads { grid-column: 2; grid-row: 1 / span 2; align-self: center; flex-direction: column; align-items: stretch; }
  .fw-slide .fine { grid-column: 1 / -1; }
}

/* ── Car picker ── */
.picker { background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-frame); margin: 0 0 3rem; }
.picker__in { padding: 1.1rem; }
.picker__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.picker__head h2 { margin: 0; font-size: 1.3rem; }
.models { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .2rem; margin-bottom: 1rem; scrollbar-width: thin; }
.models button { flex: none; min-height: 44px; padding: 0 1rem; border-radius: var(--r-md); border: 1px solid var(--rule-2); background: var(--card); font: 600 .95rem var(--font); color: var(--slate); cursor: pointer; }
.models button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.variants { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .7rem; }
.variant { display: grid; grid-template-rows: auto auto 1fr; text-align: left; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--card); padding: 0; overflow: hidden; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s; }
.variant img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: center 62%; background: var(--screen); }
.variant__name { padding: .6rem .75rem 0; font-weight: 700; }
.variant__detail { padding: 0 .75rem .7rem; color: var(--meta); font-size: .88rem; }
.variant__note { display: block; margin-top: .2rem; color: var(--meta); font-size: .88rem; }
.variant:hover { border-color: var(--slate); }
.variant[aria-pressed="true"] { border-color: var(--blue-ink); box-shadow: 0 0 0 2px var(--blue-ink); }
.variant__soon { display: inline-block; margin-top: .3rem; font-size: .75rem; font-weight: 700; color: var(--slate); background: var(--sunk); padding: .05rem .4rem; border-radius: var(--r-sm); }

/* ── Where you see it ── */
.seen { padding: clamp(2.25rem, 5vw, 3.5rem) 0; border-top: 1px solid var(--rule); }
.seen__copy { max-width: 62ch; margin-bottom: 1.25rem; }
.seen__copy p { color: var(--slate); margin: 0; }
.seen__copy strong { color: var(--ink); }
.seen__pair { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(.75rem, 2vw, 1.25rem); align-items: start; margin: 0; }
.seen__pair img { width: 100%; height: auto; border-radius: var(--r-frame); }
.seen__pair figcaption { grid-column: 1 / -1; color: var(--meta); font-size: .85rem; }

/* ── What happens next: the world's segmented status strip, one per tier ── */
.compare, .install, .faq { padding: clamp(2.25rem, 5vw, 3.5rem) 0; border-top: 1px solid var(--rule); }
.flow { display: grid; gap: 1rem; }
.flow__tier { display: grid; grid-template-columns: 9.5rem 1fr; gap: .9rem; align-items: stretch; }
.flow__name { font-weight: 800; font-size: 1.1rem; align-self: center; }
.flow__name span { display: block; font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.strip { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1px; background: var(--rule-2); border: 1px solid var(--rule-2); border-radius: var(--r-lg); overflow: hidden; }
.strip li { background: var(--card); padding: .7rem .8rem; display: grid; gap: .15rem; align-content: start; }
.strip b { display: flex; align-items: center; gap: .45rem; font-size: .95rem; }
.strip b::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--blue-ink); flex: none; }
.strip span { color: var(--meta); font-size: .86rem; }
.strip li:last-child { background: var(--blue-tint); }

/* ── Install ── */
.install__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; }
.install__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.install__steps li { display: grid; grid-template-columns: 40px 1fr; gap: .9rem; align-items: start; max-width: 62ch; }
.install__icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--rule); color: var(--blue-ink); }
.tree { display: grid; gap: .1rem; background: var(--screen); color: var(--screen-ink); border-radius: var(--r-frame); padding: 1.1rem 1.25rem; font: 500 .95rem ui-monospace, "SF Mono", Menlo, monospace; }
.tree__line { display: flex; align-items: center; gap: .5rem; padding: .2rem 0; }
.tree__line--dir { padding-left: 1.4rem; position: relative; }
.tree__line--dir::before, .tree__line--file::before { content: ""; position: absolute; left: .45rem; top: 0; bottom: 50%; width: .7rem; border-left: 1px solid var(--screen-meta); border-bottom: 1px solid var(--screen-meta); }
.tree__line--file { padding-left: 2.8rem; position: relative; color: var(--screen-link); }
.tree__line--file::before { left: 1.85rem; }
.tree__note { margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--screen-rule); color: var(--screen-meta); font: 500 .82rem var(--font); }

/* ── FAQ ── */
.faq details { border-bottom: 1px solid var(--rule); max-width: 760px; }
.faq summary { cursor: pointer; padding: 1rem 0; font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 9px; height: 9px; margin-top: .4rem; border: solid var(--meta); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .16s; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { margin: 0 0 1rem; color: var(--slate); max-width: 68ch; }

/* ── Footer ── */
.foot { border-top: 1px solid var(--rule); background: var(--card); margin-top: 2rem; }
.foot__in { max-width: 1240px; margin: 0 auto; padding: 1.5rem var(--gutter) 2rem; color: var(--meta); font-size: .86rem; }
.foot__in p { margin: 0 0 .5rem; max-width: 100ch; }

/* ── Result pages (success, order) ── */
.result { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3.5rem); padding: clamp(1.75rem, 4vw, 3.25rem) 0; align-items: start; }
.result h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.025em; }
.result__lead { color: var(--slate); font-size: 1.08rem; margin: .9rem 0 1.4rem; max-width: 46ch; }
.facts { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--card); overflow: hidden; margin: 1.25rem 0; }
.facts > div { padding: .6rem .8rem; border-top: 1px solid var(--rule); }
.facts > div:nth-child(-n+2) { border-top: 0; }
.facts > div:nth-child(even) { border-left: 1px solid var(--rule); }
.facts dt { font-size: .7rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--meta); }
.facts dd { margin: .1rem 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.status { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--status, var(--field)); }
.steps-mini { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .55rem; color: var(--slate); }
.steps-mini li { display: grid; grid-template-columns: 22px 1fr; gap: .55rem; }
.steps-mini .ico { color: var(--blue-ink); margin-top: .15rem; }
.revise { margin-top: 1.5rem; padding: 1rem; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); display: grid; gap: .7rem; }
.revise h2 { font-size: 1.15rem; margin: 0; }
.revise .fine { margin: 0; }
.result__h2 { font-size: 1.1rem; margin: 1.6rem 0 0; }
.sheet__img--car { border-radius: var(--r-frame); }


/* ── Order queue (admin) ── */
.btn--sm { min-height: 44px; padding: .45rem .85rem; font-size: .92rem; }
.q { padding-top: 1.5rem; padding-bottom: 2rem; }
.q-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.q-head h1 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); font-weight: 800; }
.q-views { display: flex; gap: .3rem; overflow-x: auto; }
.q-views a { flex: none; display: inline-flex; gap: .4rem; align-items: center; min-height: 44px; padding: 0 .85rem; border: 1px solid var(--rule-2); border-radius: var(--r-md); background: var(--card); color: var(--slate); font-weight: 600; text-decoration: none; }
.q-views a[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
.q-views .num { font-size: .85rem; padding: 0 .35rem; border-radius: var(--r-sm); border: 1px solid currentColor; opacity: .8; }
.q-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.25rem; align-items: start; }
.q-list { background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; }
.q-row { display: grid; grid-template-columns: 6.5rem 9.5rem 1fr; grid-template-areas: "id status when" "car car car" "mail mail mail"; gap: .15rem .7rem; padding: .7rem .9rem; border-top: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.q-row:first-child { border-top: 0; }
.q-row:hover { background: var(--strip); }
.q-row.is-on { background: var(--blue-tint); }
.q-id { grid-area: id; font-weight: 800; font-variant-numeric: tabular-nums; }
.q-car { grid-area: car; color: var(--slate); font-size: .92rem; }
.q-mail { grid-area: mail; color: var(--meta); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-when { grid-area: when; justify-self: end; color: var(--meta); font-size: .85rem; }
.q-empty { margin: 0; padding: 1.25rem; color: var(--meta); }
.q-detail { background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 1.1rem; position: sticky; top: 80px; }
.q-detail h2 { font-size: 1.3rem; margin: 0 0 .25rem; }
.q-detail h3 { font-size: .72rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--meta); margin: 1.2rem 0 .45rem; }
.q-brief { white-space: normal; background: var(--strip); border: 1px solid var(--rule); border-radius: var(--r-md); padding: .7rem .85rem; margin: 0; max-width: 70ch; }
.q-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; }
.q-file { display: grid; gap: .25rem; color: var(--slate); font-size: .88rem; text-decoration: none; }
.q-file img { aspect-ratio: 1; object-fit: contain; background: var(--screen); border-radius: var(--r-md); padding: 4px; }
.q-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.q-inline { margin: 0; }
.q-upload { display: grid; gap: .4rem; margin-top: .9rem; }
.q-upload label { font-weight: 600; font-size: .92rem; }
.q-upload .btn { justify-self: start; }
.q-log { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; font-size: .88rem; color: var(--slate); }
.q-log span { color: var(--meta); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .q-body { grid-template-columns: 1fr; } .q-detail { position: static; } }

/* ── Responsive ── */
@media (max-width: 900px) {
  .stage, .result { grid-template-columns: 1fr; }
  .stage { row-gap: .85rem; }
  .stage__copy { display: contents; }
  .sheet__frame { width: 100%; }
  .sheet__pins { display: none; }
  .sheet__plate { padding: 12px; }
  .tier__line { display: none; }
  .tier-note { display: block; order: 4; margin: -.35rem 0 0; }
  .tiers { grid-template-columns: 1fr 1fr; }
  .tier + .tier { border-top: 0; border-left: 1px solid var(--rule); }
  .tier__body { grid-template-columns: 20px 1fr; padding: .7rem .75rem; }
  .tier__price { grid-column: 2; }
  .stage h1 { order: 1; max-width: 16ch; }
  .truth { order: 2; margin: 0; }
  .sheet { order: 3; position: relative; top: 0; }
  .tiers { order: 4; margin: 0; }
  .panel { order: 5; }
  .install__grid, .seen__pair, .flow__tier { grid-template-columns: 1fr; }
  .strip { grid-auto-flow: row; }
  body.is-building .sheet { position: sticky; top: 64px; z-index: 3; }
  body.is-building .sheet__plate { padding: 10px; border-radius: 0 0 var(--r-frame) var(--r-frame); }
  body.is-building .sheet__frame { width: min(100%, 36vh); }
  body.is-building .sheet__frame--car { width: 100%; }
  .sheet__plate.has-views { padding-top: 62px; }
  body.is-building .sheet__plate.has-views { padding-top: 60px; }
  body.is-building .sheet__cap { display: none; }
  body.is-building .sheet__plate > .tesla-badge { display: none; }
}
@media (max-width: 640px) {
  .top__nav a:not(:first-child) { display: none; }
  .styles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lettering { grid-template-columns: 1fr; }
  .field-pair { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .facts > div:nth-child(even) { border-left: 0; }
  .facts > div:nth-child(2) { border-top: 1px solid var(--rule); }
  .pin span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fw-track { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
