/* ==========================================================================
   VINtoGlass: the same visual language as the AutoGlazer marketing site.
   Design tokens first, then base, then components in page order, then the app's own pieces.
   Inter and Inter Tight (SIL OFL 1.1) are served from this origin, so the strict CSP stays 'self'.
   ========================================================================== */

@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter Tight'; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url(/fonts/inter-tight-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Brand ramp */
  --brand-50: #eff5ff; --brand-100: #dbe7fe; --brand-200: #bfd4fe; --brand-300: #93b4fd; --brand-500: #3b76f6; --brand-600: #2563eb; --brand-700: #1d4ed8; --brand-800: #1e40af;
  /* Ink ramp */
  --ink-900: #0a1220; --ink-800: #111c2e; --ink-700: #1f2a3c; --ink-600: #334155; --ink-500: #4a5768; --ink-400: #667585; --ink-300: #94a3b8;
  /* Surfaces and lines */
  --surface: #ffffff; --surface-2: #f7f9fc; --surface-3: #eef3f9; --navy: #0b1626; --navy-soft: #142239; --line: #e3e8ef; --line-soft: #eef2f7;
  /* Status */
  --ok: #0b6b45; --ok-bg: #e7f7f0; --warn: #92400e; --warn-bg: #fff4e0; --bad: #b42318; --bad-bg: #fdeaea;
  /* Elevation: deliberately restrained */
  --shadow-sm: 0 1px 2px rgba(11, 22, 38, .05);
  --shadow-md: 0 2px 4px rgba(11, 22, 38, .04), 0 6px 16px rgba(11, 22, 38, .06);
  --shadow-lg: 0 4px 8px rgba(11, 22, 38, .04), 0 16px 40px rgba(11, 22, 38, .09);
  --shadow-xl: 0 8px 16px rgba(11, 22, 38, .05), 0 32px 64px rgba(11, 22, 38, .12);
  /* Type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Motion and rhythm */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --radius-sm: 6px; --radius: 10px; --radius-lg: 14px; --radius-xl: 20px;
  --gutter: 1.5rem; --maxw: 1180px;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6rem; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-family: var(--font-sans); font-size: 1rem; line-height: 1.6; color: var(--ink-500); background: var(--surface);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: 'cv05' 1, 'cv11' 1; }
h1, h2, h3, h4, h5 { font-family: var(--font-display); color: var(--ink-900); line-height: 1.15; letter-spacing: -.021em; font-weight: 600; margin: 0 0 .5rem; }
h1 { font-size: 1.875rem; letter-spacing: -.028em; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.0625rem; }
p { margin: 0 0 1rem; }
a { color: var(--brand-700); }
img, svg { max-width: 100%; }
::selection { background: var(--brand-200); color: var(--ink-900); }
:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 3px; border-radius: 3px; }
code { font-family: var(--font-mono); font-size: .9em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--ink-400); }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink-900); color: #fff; padding: .75rem 1.25rem; z-index: 2000; border-radius: 0 0 var(--radius) 0; text-decoration: none; }
.skip-link:focus { left: 0; }
[hidden] { display: none !important; }

/* ===== Icons (inline SVG sprite) ===== */
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -.125em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ===== Top bar: header (and, for staff, their section bar) ===== */
.topbar { position: sticky; top: 0; z-index: 1000; }
header.site { background: rgba(255, 255, 255, .88); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.topbar.is-scrolled header.site { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
header.site .nav { height: 4.5rem; display: flex; align-items: center; gap: 2rem; }
.brand { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand img { height: 2.25rem; width: auto; display: block; }
.menu { display: flex; align-items: center; gap: 2rem; margin-left: auto; }
nav.main { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
nav.main a { display: block; color: var(--ink-600); text-decoration: none; font-weight: 500; font-size: .9375rem; padding: .5rem .75rem; border-radius: var(--radius-sm); transition: all .12s var(--ease); }
nav.main a:hover { color: var(--ink-900); background: var(--surface-2); }
nav.account { display: flex; align-items: center; gap: .5rem; padding-left: 1.25rem; border-left: 1px solid var(--line); }
nav.account a:not(.button) { color: var(--ink-700); text-decoration: none; font-weight: 500; font-size: .9375rem; padding: .5rem .75rem; border-radius: var(--radius-sm); white-space: nowrap; transition: all .12s var(--ease); }
nav.account a:not(.button):hover { color: var(--ink-900); background: var(--surface-2); }
nav.account .who { font-size: .9375rem; color: var(--ink-500); padding: 0 .25rem; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
nav.account form { margin: 0; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: .5rem; font-size: 1.375rem; color: var(--ink-800); cursor: pointer; line-height: 1; border-radius: var(--radius-sm); }
.nav-toggle:hover { background: var(--surface-2); }

.staffbar { background: var(--navy); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.staffbar .wrap { display: flex; gap: .25rem 1rem; flex-wrap: wrap; min-height: 2.75rem; align-items: center; }
.staffbar a { color: rgba(255, 255, 255, .72); text-decoration: none; font-weight: 500; font-size: .875rem; padding: .25rem .5rem; border-radius: var(--radius-sm); }
.staffbar a:hover, .staffbar a.on { color: #fff; background: rgba(255, 255, 255, .08); }

/* ===== Buttons ===== */
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .6875rem 1.25rem; border-radius: var(--radius);
  font-family: var(--font-sans); font-weight: 600; font-size: .9375rem; line-height: 1.4; cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--brand-600); color: #fff; border: 1px solid var(--brand-600); box-shadow: var(--shadow-sm); transition: all .12s var(--ease); }
button:hover, .button:hover { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
button:active, .button:active { background: var(--brand-800); }
button.ghost, .button.ghost { background: var(--surface); color: var(--ink-800); border-color: var(--line); }
button.ghost:hover, .button.ghost:hover { background: var(--surface-2); border-color: var(--ink-300); color: var(--ink-900); }
button.link { background: none; border: 0; box-shadow: none; padding: .5rem .75rem; color: var(--ink-700); font-weight: 500; }
button.link:hover { background: var(--surface-2); color: var(--ink-900); }
button.danger { background: var(--bad-bg); color: var(--bad); border-color: #f6cfcb; box-shadow: none; }
button.danger:hover { background: #fbdcd9; color: var(--bad); border-color: #f1b8b2; }
.button.onDark { background: rgba(255, 255, 255, .07); color: #fff; border-color: rgba(255, 255, 255, .22); box-shadow: none; }
.button.onDark:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .38); }
.button.lg { padding: .9375rem 1.75rem; font-size: 1rem; }
button.copy { padding: .25rem .75rem; font-size: .8125rem; font-weight: 500; }

main { flex: 1 0 auto; }

/* ===== Hero (the home page) ===== */
.hero { position: relative; padding: 5.5rem 0 5rem; background: var(--navy); color: #fff; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(900px 480px at 12% -10%, rgba(37, 99, 235, .30) 0%, transparent 60%), radial-gradient(760px 420px at 92% 8%, rgba(14, 165, 233, .16) 0%, transparent 62%); }
.hero::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 64px 64px; -webkit-mask-image: radial-gradient(900px 560px at 30% 0%, #000 0%, transparent 78%); mask-image: radial-gradient(900px 560px at 30% 0%, #000 0%, transparent 78%); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 4rem; align-items: center; }
.hero-copy { max-width: 34rem; }
.hero .eyebrow { color: var(--brand-300); }
.hero h1 { font-size: clamp(2.25rem, 1.4rem + 3.1vw, 3.5rem); color: #fff; line-height: 1.08; letter-spacing: -.032em; margin-bottom: 1.25rem; }
.hero h1 em { font-style: normal; color: var(--brand-300); }
.hero .lead { font-size: 1.1875rem; line-height: 1.6; color: rgba(255, 255, 255, .74); margin-bottom: 2rem; }
.hero-buttons { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 2rem; }
.hero-checks { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .875rem; color: rgba(255, 255, 255, .6); list-style: none; padding: 0; margin: 0; }
.hero-checks li { display: flex; align-items: center; gap: .5rem; }
.hero-checks .icon { color: var(--brand-300); width: 1.05em; height: 1.05em; }
.hero-visual { position: relative; min-width: 0; }

/* A browser-style frame around a made-up example result */
.device { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, .08); overflow: hidden; color: var(--ink-500); }
.device-bar { display: flex; align-items: center; gap: .75rem; padding: .625rem .875rem; background: var(--surface-3); border-bottom: 1px solid var(--line); }
.device-dots { display: flex; gap: .375rem; }
.device-dots i { width: .6875rem; height: .6875rem; border-radius: 50%; background: var(--ink-300); opacity: .55; display: block; }
.device-url { flex: 1; font-family: var(--font-mono); font-size: .75rem; color: var(--ink-400); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .25rem .875rem; text-align: center; }
.device-body { padding: 1.25rem; display: grid; gap: 1rem; background: var(--surface-2); }
.sample-search { display: flex; align-items: center; gap: .75rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .5rem .5rem .875rem; }
.sample-search small { font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-300); }
.sample-search strong { flex: 1; font-family: var(--font-mono); font-size: 1rem; letter-spacing: .06em; color: var(--ink-900); font-weight: 600; }
.sample-go { background: var(--brand-600); color: #fff; font-weight: 600; font-size: .8125rem; padding: .4375rem .875rem; border-radius: var(--radius-sm); }
.sample-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.125rem 1.25rem; }
.sample-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; margin-bottom: .875rem; }
.sample-head small { display: block; font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-300); margin-bottom: .125rem; }
.sample-head h3 { margin: 0; font-size: 1.125rem; }
.sample-part { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: .875rem 0; border-block: 1px solid var(--line-soft); }
.sample-part small { display: block; font-size: .75rem; color: var(--ink-400); margin-bottom: .125rem; }
.sample-part strong { font-family: var(--font-mono); font-size: 1.25rem; letter-spacing: .02em; color: var(--ink-900); }
.sample-opts { display: flex; flex-wrap: wrap; gap: .375rem; padding-top: .875rem; }

/* ===== Sections ===== */
.section { padding: 5.5rem 0; }
.section-alt { background: var(--surface-2); border-block: 1px solid var(--line); }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-700); margin-bottom: 1rem; }
.section-head { max-width: 640px; margin-bottom: 3rem; }
.section-head.centre { margin-inline: auto; text-align: center; }
.section-title { font-size: clamp(1.875rem, 1.2rem + 2.2vw, 2.75rem); letter-spacing: -.028em; margin-bottom: .875rem; }
.section-sub { font-size: 1.125rem; line-height: 1.65; max-width: 62ch; margin-bottom: 0; }
.section-head.centre .section-sub { margin-inline: auto; }

/* Assurance strip */
.assurance { background: var(--surface-2); border-block: 1px solid var(--line); padding: 2.25rem 0; }
.assurance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.5rem 2rem; }
.assurance-item { display: flex; gap: .875rem; align-items: flex-start; }
.assurance-item .icon { width: 1.375rem; height: 1.375rem; color: var(--brand-600); margin-top: .1rem; }
.assurance-term { display: block; font-family: var(--font-display); font-weight: 600; color: var(--ink-900); font-size: .9375rem; letter-spacing: -.01em; }
.assurance-desc { font-size: .875rem; color: var(--ink-400); line-height: 1.5; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.75rem; counter-increment: step; }
.step::before { content: counter(step); display: flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; margin-bottom: 1.125rem; border-radius: 50%;
  background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100); font-family: var(--font-display); font-weight: 600; }
.step h3 { font-size: 1.0625rem; margin-bottom: .5rem; }
.step p { margin: 0; font-size: .9375rem; }

/* Feature cards */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.feature-card { background: var(--surface); padding: 1.75rem; border-radius: var(--radius-lg); border: 1px solid var(--line); transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.feature-card:hover { border-color: var(--brand-200); box-shadow: var(--shadow-md); }
.feature-icon { width: 2.75rem; height: 2.75rem; margin: 0 0 1.125rem; background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; }
.feature-icon .icon { width: 1.3125rem; height: 1.3125rem; }
.feature-card h3 { font-size: 1.0625rem; margin-bottom: .5rem; }
.feature-card p { margin: 0; font-size: .9375rem; }

/* API panel */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 4rem; align-items: center; }
.split .checklist { list-style: none; padding: 0; margin: 1.5rem 0 2rem; display: grid; gap: .75rem; }
.split .checklist li { display: flex; gap: .75rem; align-items: flex-start; color: var(--ink-600); font-size: .9375rem; }
.split .checklist .icon { color: var(--brand-600); margin-top: .2rem; width: 1.0625rem; height: 1.0625rem; }
pre.code { margin: 0; background: var(--navy); color: #d7e2f3; border-radius: var(--radius-lg); padding: 1.5rem; overflow-x: auto; font-family: var(--font-mono); font-size: .8125rem; line-height: 1.75; box-shadow: var(--shadow-lg); }
pre.code .c { color: #7e90ab; }
pre.code .k { color: var(--brand-300); }
pre.code .s { color: #8fd3ff; }

/* Closing band */
.cta { background: var(--navy); color: #fff; border-radius: var(--radius-xl); padding: 3.5rem 2rem; text-align: center; position: relative; overflow: hidden; }
.cta::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(700px 320px at 50% -20%, rgba(37, 99, 235, .35) 0%, transparent 65%); }
.cta > * { position: relative; }
.cta h2 { color: #fff; font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.25rem); letter-spacing: -.028em; margin-bottom: .75rem; }
.cta p { color: rgba(255, 255, 255, .72); max-width: 52ch; margin: 0 auto 1.75rem; font-size: 1.0625rem; }

/* ===== Pages ===== */
.page { padding-top: 3.25rem; padding-bottom: 5rem; }
.page-head { margin-bottom: 1.75rem; }
.narrow { max-width: 460px; margin: 0 auto; }
.narrow > h1, .narrow > h1 + p, .narrow > p { text-align: center; }
.narrow > .card, .narrow > form.card { box-shadow: var(--shadow-md); text-align: left; padding: 1.75rem; margin-bottom: 1.25rem; }
.narrow > h1 { margin-bottom: .75rem; }
.narrow-wide { max-width: 640px; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2rem; font-size: 1.1875rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.card h2, .card h3 { margin-top: 0; }
.grid3 { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 1.5rem 0; }
.grid2 { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin: 1.25rem 0; }
.mt { margin-top: 1.25rem; }
.mb { margin-bottom: 1.25rem; }
.m0 { margin: 0; }
.stack > * + * { margin-top: 1.25rem; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.wide-field { min-width: 14rem; }

.draft { background: var(--warn-bg); color: var(--warn); padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-size: .9375rem; border: 1px solid #f3dcae; }
.messages { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.messages li { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: .5rem; background: var(--ok-bg); color: var(--ok); border: 1px solid #c4ebd8; font-size: .9375rem; }
.messages li.ok { background: var(--ok-bg); color: var(--ok); }
.messages li.error { background: var(--bad-bg); color: var(--bad); border-color: #f6cfcb; }
.messages li.warning { background: var(--warn-bg); color: var(--warn); border-color: #f3dcae; }

/* ===== Forms ===== */
form .row { margin-bottom: 1.125rem; }
label { display: block; font-size: .875rem; font-weight: 600; color: var(--ink-800); margin-bottom: .4375rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; font-family: var(--font-sans); font-size: 1rem; color: var(--ink-900); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .625rem .75rem; transition: all .12s var(--ease); }
textarea { resize: vertical; min-height: 7rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-100); }
input::placeholder, textarea::placeholder { color: var(--ink-300); }
.input-validation-error { border-color: var(--bad) !important; }
.field-validation-error, .validation-summary-errors { color: var(--bad); font-size: .875rem; display: block; margin-top: .375rem; }
.validation-summary-errors ul { list-style: none; padding: 0; margin: 0 0 .75rem; }
.helptext { color: var(--ink-400); font-size: .8125rem; margin-top: .375rem; }
.helptext ul { padding-left: 1.125rem; margin: .25rem 0 0; }
.compact input[type=text], .compact input[type=number], .compact input[type=email], .compact select { width: auto; min-width: 8rem; padding: .4375rem .625rem; font-size: .9375rem; }
.checks { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
label.check { font-weight: 500; display: inline-flex; gap: .5rem; align-items: center; margin: 0; color: var(--ink-600); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand-600); width: 1.0625rem; height: 1.0625rem; }
.inline { display: inline; margin: 0; }
.actions { display: flex; gap: .625rem; flex-wrap: wrap; align-items: center; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.searchbar { display: flex; gap: .5rem; margin-bottom: 1rem; max-width: 480px; }
.searchbar.full { max-width: none; }
.searchbar input { flex: 1; }

/* ===== Tables ===== */
table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
th, td { text-align: left; padding: .75rem .875rem; border-top: 1px solid var(--line-soft); vertical-align: middle; }
th { color: var(--ink-400); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; border-top: 0; background: var(--surface-2); }
th:first-child { border-top-left-radius: var(--radius-sm); }
th:last-child { border-top-right-radius: var(--radius-sm); }
tbody tr:hover td, table tr:hover td { background: var(--surface-2); }
td .muted, td small { font-size: .8125rem; }
.card > table, .card > div > table { margin: 0; }
table + p, table + a, .card > table + p { margin-top: 1rem; display: block; }

/* ===== Tags ===== */
.tag { display: inline-block; padding: .125rem .625rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--surface-3); color: var(--ink-500); border: 1px solid var(--line); line-height: 1.5; }
.tag.ok { background: var(--ok-bg); color: var(--ok); border-color: #c4ebd8; }
.tag.warn { background: var(--warn-bg); color: var(--warn); border-color: #f3dcae; }
.tag.bad { background: var(--bad-bg); color: var(--bad); border-color: #f6cfcb; }
.tag.plain { background: var(--surface-3); color: var(--ink-500); }
mark { background: var(--warn-bg); color: var(--warn); padding: .0625rem .5rem; border-radius: var(--radius-sm); font-weight: 600; font-size: .8125rem; display: inline-block; margin: .0625rem .125rem .0625rem 0; }
.note { background: var(--warn-bg); color: var(--warn); padding: .5rem .75rem; border-radius: var(--radius); font-size: .9375rem; border: 1px solid #f3dcae; }

/* ===== The lookup pages ===== */
input.vin { font-family: var(--font-mono); font-weight: 600; font-size: 1.125rem; letter-spacing: .06em; text-transform: uppercase; }
.position { margin-bottom: 1.25rem; }
.poshead { display: flex; align-items: center; gap: .625rem; flex-wrap: wrap; margin-bottom: .75rem; }
.poshead h3 { margin: 0; font-size: 1.125rem; }
.part { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: .5rem 0; }
.part strong { font-family: var(--font-mono); font-weight: 600; font-size: 1.625rem; letter-spacing: .02em; color: var(--ink-900); }
.argic { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .5rem; }
.argic h4 { margin: .5rem 0; color: var(--ink-400); text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; font-family: var(--font-sans); font-weight: 600; }
.waiting h2 { margin-top: 0; }
.big { font-family: var(--font-display); font-size: 1.875rem; font-weight: 600; letter-spacing: -.02em; color: var(--ink-900); }
pre.raw { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; overflow: auto; max-height: 420px; font-size: .8125rem; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .375rem 1.25rem; margin: 0; }
dl.facts dt { color: var(--ink-400); }
dl.facts dd { margin: 0; color: var(--ink-800); }
ul.codes { list-style: none; columns: 2; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: .875rem 1.125rem; margin: 0 0 1rem; font-size: 1.0625rem; line-height: 1.8; letter-spacing: .04em; }
img.qr { margin: .625rem 0; background: #fff; padding: .375rem; border-radius: var(--radius-sm); border: 1px solid var(--line); }

/* ===== Footer ===== */
footer.site { background: var(--navy); color: rgba(255, 255, 255, .62); padding: 4rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(2, 1fr); gap: 2.5rem; padding-bottom: 3rem; }
.footer-logo { height: 2.25rem; width: auto; margin-bottom: 1rem; display: block; }
.footer-about { font-size: .875rem; line-height: 1.6; color: rgba(255, 255, 255, .55); max-width: 34ch; margin: 0; }
.footer-title { font-size: .8125rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: rgba(255, 255, 255, .45); margin: 0 0 1rem; font-family: var(--font-sans); }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .625rem; }
footer.site a { color: rgba(255, 255, 255, .72); text-decoration: none; font-size: .875rem; }
footer.site a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 1.25rem 0 1.75rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .8125rem; color: rgba(255, 255, 255, .45); }

/* ===== Smaller screens ===== */
@media (max-width: 960px) {
  .hero-grid, .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero { padding: 3.5rem 0 3.5rem; }
  .section { padding: 4rem 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  header.site .nav { height: auto; min-height: 4rem; gap: 1rem; flex-wrap: wrap; align-content: center; }
  .menu { display: none; flex-basis: 100%; width: 100%; flex-direction: column; align-items: stretch; gap: .5rem; margin: 0; padding: .5rem 0 1rem; border-top: 1px solid var(--line); }
  .topbar.nav-open header.site { background: #fff; border-bottom-color: var(--line); box-shadow: var(--shadow-md); }
  .topbar.nav-open .menu { display: flex; }
  nav.main { flex-direction: column; align-items: stretch; }
  nav.account { flex-wrap: wrap; border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: .75rem; }
}
@media (max-width: 600px) {
  :root { --gutter: 1rem; }
  .page { padding-top: 1.75rem; padding-bottom: 3.5rem; }
  .hero-buttons .button { flex: 1; }
  .sample-part { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta { padding: 2.5rem 1.25rem; }
  .card { padding: 1.125rem; }
  table { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* small helpers that replace inline styles (the CSP allows none) */
.card.ok-border { border-color: #8fd4b4; }
code.token { word-break: break-all; font-size: 1.0625rem; }

/* make logos: beside a vehicle in lists and headings, and as tiles on the home page */
.make-logo { height: 26px; width: auto; max-width: 64px; object-fit: contain; vertical-align: middle; margin-right: .6rem; }  /* the files are trimmed to the artwork, so this is the logo's real height */
.make-logo-lg { height: 48px; max-width: 120px; margin-right: .9rem; }
h1.with-logo { display: flex; align-items: center; flex-wrap: wrap; }
.vehicle-cell { white-space: nowrap; }
.makes-section { padding: 4.25rem 0; }
.makes-section .section-head { margin-bottom: 2rem; }
.make-grid { list-style: none; margin: 0 auto 1.5rem; padding: 0; max-width: 62rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem 2.25rem; }
.make-grid li { display: flex; align-items: center; justify-content: center; width: 5.5rem; height: 3.25rem; }
.make-tile { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.fineprint { font-size: .8125rem; color: var(--ink-400); max-width: 40rem; margin: 0 auto; }
.fineprint.centre { text-align: center; }
@media (max-width: 640px) { .makes-section { padding: 3rem 0; } .make-grid { gap: 1rem 1.25rem; } .make-grid li { width: 4.25rem; height: 2.75rem; } }

/* the trademark notice that sits above the copyright line on every page */
.footer-legal { font-size: .75rem; line-height: 1.65; color: rgba(255, 255, 255, .5); max-width: 78ch; margin: 0; padding: 0 0 1.5rem; }
footer.site .footer-legal a { font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* the glass picker: the vehicle from above, panes as buttons, beside the list of checkboxes */
.glass-choice { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: 1.25rem 2.25rem; align-items: start; }
.glass-picker { text-align: center; }
.glass-car { display: block; width: 100%; max-width: 14rem; height: auto; margin: 0 auto; }
.glass-car .car-body { fill: var(--surface-3); stroke: none; }
.glass-car .car-lights { fill: #fdecc0; stroke: none; }
.glass-car .car-mirrors { fill: #c3ccd8; stroke: none; }
.glass-car .glass-path { fill: var(--brand-100); stroke: var(--brand-300); stroke-width: 1; cursor: pointer; transition: fill .15s var(--ease), stroke .15s var(--ease); }
.glass-car .glass-path:hover, .glass-car .glass-path.hover { fill: var(--brand-200); stroke: var(--brand-600); stroke-width: 1.6; }
.glass-car .glass-path.selected { fill: var(--brand-600); stroke: var(--brand-700); stroke-width: 1.6; }
.glass-car .glass-path.selected.hover, .glass-car .glass-path.selected:hover { fill: var(--brand-700); }
.glass-car .glass-path:focus { outline: none; }
.glass-car .glass-path:focus-visible { stroke: var(--ink-900); stroke-width: 2.2; }
.glass-hint { font-size: .8125rem; color: var(--ink-400); margin: .5rem 0 0; }
.glass-choice .checks { display: grid; gap: .55rem; }
@media (max-width: 640px) { .glass-choice { grid-template-columns: minmax(0, 1fr); } .glass-car { max-width: 11rem; } }
@media (prefers-reduced-motion: reduce) { .glass-car .glass-path { transition: none; } }
