/* GTS Auto theme tokens — layered over the Modernist sheet. */
html { scrollbar-gutter: stable; }
:root, [data-theme] {
  /* "Nuit Rive-Sud" tokens: navy night stage, one red signal line, white logo plate. */
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-pill: 999px;
  --radius-sm: 10px; --radius-md: 14px; --radius-lg: 20px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --as-red: #d93a40; --as-green: #1f9d63;
  --as-red-badge: #c8161e;
  --as-brand: #2563eb; /* default — the dealer’s own comes from dealers.json → brand.colors (Worker) */
  --as-brand-btn: #1d4ed8;
  --as-signal: #c8161e; /* the red line of the logo: rules, active tab, small accents only (never body text) */
  --as-on-brand: #ffffff;
  --as-logo-plate: #ffffff; /* the logo has dark lettering: it always sits on a white plate */
  --fs-xs: 12.5px; --fs-sm: 14px; --fs-md: 16px; --fs-lg: 19px; --fs-xl: clamp(24px, 2.6vw, 32px); --fs-2xl: clamp(30px, 3.6vw, 46px); --fs-3xl: clamp(38px, 6vw, 76px);
  --gap-section: clamp(56px, 7vw, 88px); --gap-col: clamp(14px, 1.6vw, 20px); --pad-card: clamp(18px, 2vw, 26px); --btn-h: 48px;
  --container: 1440px; --side: 32px;
}
:root, [data-theme="light"] {
  --color-bg: #f5f6fa; --color-surface: #ffffff; --as-surface-2: #eceff6;
  --color-text: #0c1530; --as-muted: #4c5570;
  --color-divider: rgba(12, 21, 48, .10); --as-line-strong: rgba(12, 21, 48, .2);
  --as-ink: var(--as-brand-btn); --as-on-ink: #ffffff;
  --as-bar: #ffffff; --as-night: #081536; --as-night-2: #0d1f4d; --as-on-night: #eef2fb; --as-on-night-muted: #b4c1e2;
  --color-accent: var(--as-brand); --color-accent-100: #e8effd; --color-accent-800: #1e3a8a;
  --as-stripe: rgba(12, 21, 48, .05);
  --shadow-sm: 0 1px 2px rgba(8, 21, 54, .07);
  --shadow-md: 0 10px 28px rgba(8, 21, 54, .09);
  --shadow-lg: 0 26px 64px rgba(8, 21, 54, .18);
}
[data-theme="dark"] {
  --color-bg: #070d1f; --color-surface: #0e1730; --as-surface-2: #16213f;
  --color-text: #eef2fb; --as-muted: #a3aecb;
  --color-divider: rgba(238, 242, 251, .09); --as-line-strong: rgba(238, 242, 251, .2);
  --as-ink: var(--as-brand-btn); --as-on-ink: #ffffff;
  --as-bar: #0a1430; --as-night: #050b1c; --as-night-2: #0b1a40; --as-on-night: #eef2fb; --as-on-night-muted: #b4c1e2;
  --color-accent: #6f9cf0; --color-accent-100: #1a2236; --color-accent-800: #9db8f8;
  --as-stripe: rgba(238, 242, 251, .05);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, .4);
  --shadow-lg: 0 0 0 1px rgba(238, 242, 251, .06), 0 30px 70px rgba(0, 0, 0, .6);
}

@media (max-width: 819px) { :root, [data-theme] { --side: 16px; } }

html, body { margin: 0; background: var(--color-bg); }

[data-skip-link] { position: fixed; left: 12px; top: 12px; z-index: 4000; transform: translateY(-160%); padding: 12px 16px; border-radius: 12px; background: var(--as-ink); color: var(--as-on-ink); font: 700 14px/1 var(--font-body); text-decoration: none; transition: transform .18s var(--ease); }
[data-skip-link]:focus { transform: translateY(0); outline: 3px solid var(--color-text); outline-offset: 3px; }

/* Smooth page-to-page transitions (cross-document View Transitions — Chrome/Edge/Safari 18+; others navigate normally) */
/* cross-document view transitions disabled — page fade is handled in theme.js + the server shell (prevents multiple flashes) */
::view-transition-old(root) { animation: as-vt-out .28s cubic-bezier(.4,0,1,1) both; }
::view-transition-new(root) { animation: as-vt-in .42s cubic-bezier(.16,1,.3,1) both; }
@keyframes as-vt-out { to { opacity: 0; transform: translateY(-10px) scale(.995); } }
@keyframes as-vt-in { from { opacity: 0; transform: translateY(16px); } }
header, [data-site-header] { view-transition-name: as-header; }
::view-transition-group(as-header) { animation-duration: 0s; }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }
html { background: var(--color-bg); }

/* Native selects: themed dropdown lists (dark mode was white-on-white) */
:root { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }
select option, select optgroup { background-color: var(--color-surface); color: var(--color-text); }

/* ===================================================================================================
   "Nuit Rive-Sud" page layer (footer, inner pages, cards, vehicle page). Tokens only — no dealer fact here.
   Class names start with nr-. Layout changes by width live in responsive.css.
   =================================================================================================== */
/* --nr-head: the sticky header bar once the page is scrolled (its top line scrolls away), measured at 1440 px */
:root { --nr-head: 62px; --nr-stick: calc(var(--nr-head) + 16px); }
.nr-wrap { width: 100%; max-width: var(--container); margin-left: auto; margin-right: auto; padding-left: var(--side); padding-right: var(--side); box-sizing: border-box; }
.nr-sec { padding-top: var(--gap-section); padding-bottom: var(--gap-section); }
.nr-kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; line-height: 1.3; color: var(--as-muted); }
.nr-kicker::before { content: ""; flex: none; width: 24px; height: 3px; background: var(--as-signal); }
.nr-night .nr-kicker { color: var(--as-on-night-muted); }
.nr-h1 { margin: 0; font-size: var(--fs-3xl); line-height: .98; font-weight: 800; letter-spacing: -0.03em; font-stretch: 110%; text-wrap: balance; }
.nr-h1-m { margin: 0; font-size: clamp(34px, 4.6vw, 60px); line-height: 1; font-weight: 800; letter-spacing: -0.03em; font-stretch: 110%; text-wrap: balance; }
.nr-h2 { margin: 0; font-size: var(--fs-2xl); line-height: 1.04; font-weight: 800; letter-spacing: -0.03em; font-stretch: 110%; text-wrap: balance; }
.nr-h3 { margin: 0; font-size: var(--fs-xl); line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; font-stretch: 105%; }
.nr-h4 { margin: 0; font-size: var(--fs-lg); line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; }
.nr-lead { margin: 0; font-size: var(--fs-lg); line-height: 1.55; color: var(--as-muted); text-wrap: pretty; }
.nr-muted { color: var(--as-muted); }
.nr-num { font-variant-numeric: tabular-nums; }
/* night stage: navy band with a soft brand-blue glow (both themes) */
.nr-night { position: relative; isolation: isolate; background-color: var(--as-night); color: var(--as-on-night); }
.nr-glow { background-image: radial-gradient(60% 80% at 85% 0%, color-mix(in srgb, var(--as-brand) 34%, transparent), transparent 70%), radial-gradient(50% 70% at 0% 100%, color-mix(in srgb, var(--as-brand) 18%, transparent), transparent 70%); }
.nr-night .nr-lead, .nr-night .nr-muted { color: var(--as-on-night-muted); }
/* cards and surfaces */
.nr-card { background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--r-lg); padding: var(--pad-card); box-shadow: var(--shadow-sm); box-sizing: border-box; min-width: 0; }
.nr-photo { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--as-surface-2); margin: 0; }
.nr-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* buttons: --btn-h tall, --r-sm corners */
.nr-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--btn-h); padding: 0 22px; border-radius: var(--r-sm); border: 1px solid transparent; font: inherit; font-size: 15px; font-weight: 800; line-height: 1.2; text-decoration: none; cursor: pointer; box-sizing: border-box; transition: transform .25s var(--ease), background-color .25s var(--ease), border-color .25s var(--ease); }
.nr-btn-p { background: var(--as-brand-btn); color: var(--as-on-brand); box-shadow: 0 8px 22px color-mix(in srgb, var(--as-brand-btn) 28%, transparent); }
.nr-btn-p:hover { transform: translateY(-1px); opacity: 1; }
.nr-btn-g { background: transparent; color: var(--color-text); border-color: var(--as-line-strong); }
.nr-btn-g:hover { border-color: var(--color-text); opacity: 1; }
.nr-night .nr-btn-g { color: var(--as-on-night); border-color: color-mix(in srgb, var(--as-on-night) 32%, transparent); }
.nr-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--color-divider); background: var(--color-surface); color: var(--color-text); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; box-sizing: border-box; }
.nr-chip:hover { border-color: var(--as-line-strong); opacity: 1; }
/* form fields: one look on every form */
.nr-label { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nr-label > span:first-child { font-size: 13px; font-weight: 700; }
[data-site] .nr-label input, [data-site] .nr-label textarea { transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease); }
[data-site] .nr-label input:focus, [data-site] .nr-label textarea:focus { border-color: var(--as-brand-btn) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--as-brand-btn) 22%, transparent); background-color: var(--color-surface) !important; }
[data-site] :is(a, button, summary, [role="tab"]):focus-visible { outline: 2px solid var(--as-brand-btn); outline-offset: 2px; }
[data-theme="dark"] :is(a, button, summary, [role="tab"]):focus-visible { outline-color: var(--color-accent-800); }
/* numbered step */
.nr-step-n { flex: none; width: 40px; height: 40px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; background: var(--color-accent-100); color: var(--color-accent-800); font-variant-numeric: tabular-nums; }
.nr-night .nr-step-n { background: color-mix(in srgb, var(--as-on-night) 10%, transparent); color: var(--as-on-night); }
.nr-dot { flex: none; width: 8px; height: 8px; border-radius: var(--r-pill); }
.nr-acc summary::-webkit-details-marker { display: none; }
/* sticky side columns sit below the sticky header (desktop only; responsive.css releases them on small screens) */
.nr-sticky { position: sticky; top: var(--nr-stick); }
/* footer */
[data-nr-footer] a { color: inherit; text-decoration: none; }
[data-nr-footer] a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
[data-nr-footer] [data-nr-flink] { display: flex; align-items: center; min-height: 40px; color: var(--as-on-night-muted); font-weight: 600; }
[data-nr-footer] [data-nr-flink]:hover { color: var(--as-on-night); }
/* vehicle page tabs */
[data-vd-tabs] [role="tab"] { position: relative; }
[data-vd-tabs] [role="tab"][aria-selected="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; background: var(--as-signal); }
[data-tabpane][hidden] { display: none !important; }
/* inventory switches: a visible track and border in both themes */
[data-theme="dark"] [data-nr-switch][data-on="0"] { background: var(--as-surface-2) !important; border-color: var(--as-line-strong) !important; }
[data-theme="dark"] [data-nr-switch][data-on="0"] > span { background: var(--as-muted) !important; }
[data-theme="dark"] [data-nr-switch][data-on="1"] { border-color: var(--color-accent) !important; }
/* chat composer: the rounded container shows the focus, never the field itself */
[data-nr-composer] textarea, [data-nr-composer] textarea:focus, [data-nr-composer] textarea:focus-visible { outline: none !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; -webkit-appearance: none; appearance: none; }
[data-nr-composer]:focus-within { border-color: var(--as-brand-btn) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--as-brand-btn) 24%, transparent) !important; }
@media (prefers-reduced-motion: reduce) { .nr-btn, [data-site] .nr-label input, [data-site] .nr-label textarea { transition: none; } }

/* Inventory and Vehicle pages: every content row sits in the same container as Home and the form pages (header and footer stay full width) */
.nr-contain > :not(dc-import):not(.sc-host):not(script):not(style) { width: 100%; max-width: var(--container); margin-left: auto !important; margin-right: auto !important; padding-left: var(--side) !important; padding-right: var(--side) !important; box-sizing: border-box; }

/* One call button with both phone lines: each number is its own tel: link, a hairline between them */
.nr-callpair { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0 2px; min-height: var(--btn-h); padding: 0 8px 0 16px; border-radius: var(--r-sm); border: 1px solid var(--as-line-strong); color: var(--color-text); font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; box-sizing: border-box; }
.nr-callpair > svg { margin-right: 6px; }
.nr-callpair > a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; border-radius: var(--r-xs); color: inherit; text-decoration: none; white-space: nowrap; }
.nr-callpair > a:hover { text-decoration: underline; text-underline-offset: 3px; }
.nr-callpair-sep { width: 1px; height: 20px; background: currentColor; opacity: .3; }
.nr-callpair-night { color: #fff; border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.06); }
.nr-callpair-brand { color: var(--as-on-brand, #fff); border-color: transparent; background: var(--as-brand-btn); }
.nr-callpair-wide { display: flex; justify-content: center; }

/* Full-width bars (frame "bars"): the band behind the header / footer copies their border; it sits over the element's own border so only one line shows */
[data-gts-head]::before { bottom: -1px !important; }
footer[data-nr-footer]::before { top: -3px !important; }

/* Vehicle page tabs on phones: every tab visible (2 × 2 grid), never a sideways-scrolling strip that cuts labels */
@media (max-width: 600px) {
  [data-vd-tabs] [role="tablist"] { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px !important; padding: 8px !important; overflow: visible !important; }
  [data-vd-tabs] [role="tab"] { min-height: 46px !important; padding: 0 10px !important; border-radius: var(--r-sm); white-space: normal !important; text-align: center; font-size: 14px !important; background: var(--color-surface) !important; box-shadow: inset 0 0 0 1px var(--color-divider); }
  [data-vd-tabs] [role="tab"][aria-selected="true"] { background: var(--as-brand-btn) !important; color: #fff !important; box-shadow: none; }
  [data-vd-tabs] [role="tab"][aria-selected="true"]::after { display: none; }
}

/* A phone number or an e-mail link never breaks across two lines */
a[href^="tel:"], a[href^="mailto:"] { white-space: nowrap; }
/* Phones: the call button with both lines is two equal halves (one number each, its own phone icon), never a ragged wrap */
@media (max-width: 600px) {
  .nr-callpair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); width: 100%; padding: 0 4px; font-size: 14.5px; }
  .nr-callpair > svg { display: none; }
  .nr-callpair > a { justify-content: center; gap: 7px; padding: 0 6px; }
  .nr-callpair > a::before { content: ""; flex: none; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / contain no-repeat; opacity: .85; }
}
@media (max-width: 359px) { .nr-callpair { font-size: 13.5px; } .nr-callpair > a { padding: 0 3px; gap: 5px; } }
/* Legal pages: the title on the left, a short "questions" card on the right (no empty half in the hero) */
.nr-legal-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 28px clamp(28px, 5vw, 80px); align-items: center; }
.nr-legal-ask { display: flex; flex-direction: column; gap: 12px; padding: var(--pad-card); border-radius: var(--r-lg); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); border-left: 3px solid var(--as-signal); color: var(--as-on-night); min-width: 0; }
.nr-legal-line { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: inherit; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.nr-legal-line:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 899px) { .nr-legal-hero { grid-template-columns: minmax(0, 1fr); } }
/* Vehicle specs: a long value without spaces (the VIN) takes two cells on a wide grid, the whole row on a phone */
[data-specs] > [data-long="1"] { grid-column: span 2; }
@media (max-width: 600px) { [data-specs] > [data-long="1"] { grid-column: 1 / -1; } }
/* Landing side column: visit card and related pages under the call-to-action (no empty column beside a long page) */
.nr-lp-visit, .nr-lp-rel { display: flex; flex-direction: column; gap: 12px; padding: var(--pad-card); }
.nr-lp-rel { gap: 10px; }

.nr-lp-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; font-size: 14.5px; font-weight: 700; color: var(--color-text); text-decoration: none; border-top: 1px solid var(--color-divider); }
.nr-lp-visit > .nr-lp-link { border-top: 1px solid var(--color-divider); margin-top: 4px; }
.nr-lp-link:hover { color: var(--as-brand); }
