/* ============================================================================
   Thunder Mounts — storefront design system
   ----------------------------------------------------------------------------
   One stylesheet, no build step: it must run on Hostinger shared hosting where
   there is no npm, no bundler and no CDN dependency.

   The look is the approved prototype's (pietechnologies.github.io/
   thundermountdemo1): the same tokens, the same type scale, the same section
   rhythm. Colours and the body font can also be set in Admin > Settings >
   Branding; the storefront layout emits those after this file, so the values
   below are the defaults, not the last word.

   Conventions
   - Written small-screen first. Every layout is one column until a min-width
     query says otherwise, so a phone never has to undo a desktop grid.
   - Breakpoints: 600 (large phone), 768 (tablet), 900 (two-column layouts),
     1100 (the full header menu), 1200 and 1300 (header extras).
   - Nothing may be wider than the viewport. Grid and flex children that hold
     text get `min-width: 0`; images get `max-width: 100%`; tables scroll inside
     their own wrapper. A page that scrolls sideways on a phone is a bug.
   - Focus is never removed: every interactive element gets :focus-visible.
   - Motion is opt-out via prefers-reduced-motion.
   - Colours are only ever set through the custom properties below, so a
     rebrand is a token change, not a find-and-replace.

   Contents
     1. Tokens and font          8. Home sections        15. Cart and checkout
     2. Reset and type           9. Product grid/card    16. Sign-in and dealer pages
     3. Layout utilities        10. Shop listing         17. Account and dealer portal
     4. Buttons                 11. Product page         18. Dialogs, toast, cookie notice
     5. Forms                   12. Content pages        19. Print
     6. Badges and messages     13. Blog and portfolio
     7. Header, drawer, footer  14. Contact and resources
   ========================================================================== */

/* ---------------------------------------------------------------- 1. tokens */

/* Inter, self-hosted. The prototype loads it from Google Fonts; this site's
   Content-Security-Policy allows no third-party origin, and a font request to
   another company on every page view is not something a shop needs. One
   variable file covers every weight from 100 to 900 in 48 KB. `swap` shows the
   fallback immediately, so text is never invisible while the font arrives.
   Licence: SIL Open Font License 1.1 (public/assets/fonts/OFL.txt). */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter-latin-wght-normal.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 */
    --red: #C82026;
    --red-dark: #A5181E;
    --red-tint: #FCF0F0;
    --ink: #181818;
    --graphite: #292929;
    --graphite-2: #32373D;

    /* Neutrals */
    --white: #FFFFFF;
    --gray-50: #F8F9FA;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --steel: #A7ADB4;
    --gray-600: #5B6168;
    --gray-700: #3F444A;

    /* Status */
    --green: #1F8A4C;
    --green-soft: #E6F4EC;
    --amber: #B7791F;
    --amber-soft: #FDF3E1;
    --blue: #1D5FB4;
    --blue-soft: #E6EEF9;

    /* The names the templates and the older rules were written against. Kept as
       aliases so an inline `var(--muted)` in a view keeps meaning something. */
    --red-soft: var(--red-tint);
    --ink-soft: var(--gray-700);
    --muted: var(--gray-600);
    --line: var(--gray-200);
    --line-strong: var(--gray-300);
    --bg: var(--white);
    --bg-alt: var(--gray-100);
    --bg-dark: var(--ink);
    --success: var(--green);
    --success-tint: var(--green-soft);
    --warn: #8A6100;
    --warn-tint: #FFF7D6;

    /* Shape */
    --radius: 6px;
    --radius-sm: 4px;
    --radius-lg: 10px;
    --shadow: 0 1px 2px rgba(23, 25, 28, .06), 0 4px 14px rgba(23, 25, 28, .06);
    --shadow-lg: 0 10px 40px rgba(23, 25, 28, .18);

    /* Layout */
    --container: 1240px;
    --maxw: var(--container);
    --gutter: 16px;
    --header-h: 64px;

    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: var(--font);
}

@media (min-width: 600px) { :root { --gutter: 24px; } }
@media (min-width: 1100px) { :root { --header-h: 72px; } }

/* ----------------------------------------------------------- 2. reset, type */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* Anchors (#apply, #notify, #request-quote) must not land under the sticky
       header. */
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* A long SKU, an email address or a URL in running text must wrap rather
       than push the page wider than the phone. */
    overflow-wrap: break-word;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
picture { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

h1, h2, h3, h4, h5 {
    margin: 0 0 .5em;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.01em;
}

h1 { font-size: clamp(1.85rem, 4vw, 3.25rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p  { margin: 0 0 1em; }

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { margin: 0 0 1em; padding-left: 1.2em; }

hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .9em; background: var(--gray-100); padding: 1px 5px; border-radius: 4px;
}

:focus-visible {
    outline: 3px solid rgba(200, 32, 38, .5);
    outline-offset: 2px;
    border-radius: 3px;
}

::selection { background: var(--red); color: #fff; }

/* -------------------------------------------------------- 3. layout helpers */
.container {
    width: 100%; max-width: var(--container); margin: 0 auto;
    padding-left: var(--gutter); padding-right: var(--gutter);
}
.container--narrow { max-width: 908px; }

.sr-only, .u-sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Parked above the page rather than 9999px to its left: an element positioned
   far outside the viewport widens the scrollable area in some browsers, and
   the page then slides sideways under a thumb. */
.skip-link {
    position: absolute; left: 8px; top: 8px; z-index: 200;
    background: var(--red); color: #fff; padding: 9px 14px; border-radius: var(--radius-sm);
    font-weight: 700; transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: #fff; text-decoration: none; }

.stack > * + * { margin-top: 12px; }
.text-muted, .muted { color: var(--muted); }
.text-center { text-align: center; }
.lead { font-size: 1.05rem; color: var(--gray-700); }
.no-print { }

/* The selector is doubled on purpose. Nearly every band styles its own
   paragraphs (".hero__copy p", ".dealer-hero p", ".section__head p") and an
   eyebrow is a paragraph, so a plain .eyebrow lost its size, its red and its
   gap to whichever band it happened to sit in. Twice the class outranks any
   "band p" rule without each band having to remember the exception. */
.eyebrow.eyebrow {
    display: block; margin: 0 0 10px;
    font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
    color: var(--red);
}

/* padding-block, not the shorthand: .section almost always sits beside
   .container, whose horizontal padding is the page gutter. The shorthand zeroed
   that gutter, so every CMS page ran its text to the edge of a phone screen. */
.section { padding-block: 48px; }
.section--tight { padding-block: 32px; }
.section--alt { background: var(--gray-100); }
.section--dark { background: var(--ink); color: #fff; }
.section--dark h2, .section--dark h3 { color: #fff; }
@media (min-width: 900px) {
    .section { padding-block: 72px; }
    .section--tight { padding-block: 40px; }
}
/* An empty spacer section some templates end with: keep the rhythm, lose the
   double gap. */
.section:empty { padding-block: 20px; }

/* A section head: eyebrow and heading on the left, the section's own action or
   a line of supporting copy on the right, bottom-aligned. On a phone the two
   stack. */
.section__head {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
    gap: 14px 24px; margin: 0 0 24px; text-align: left;
}
.section__head-text { min-width: 0; max-width: 720px; }
.section__head h2 { margin: 0; }
/* :not(.eyebrow) — the eyebrow is a <p> too. Without it these rules outranked
   .eyebrow, so every section label on the page lost its red and its gap. */
.section__head p:not(.eyebrow) { margin: 0; color: var(--muted); }
.section__head > p { max-width: 560px; }
.section__head .btn { flex: none; }
.section__head--center { justify-content: center; text-align: center; }
.section--dark .section__head p:not(.eyebrow) { color: #C9CED4; }
.section--dark .eyebrow { color: #F3A1A4; }
@media (min-width: 900px) { .section__head { margin-bottom: 32px; } }

.grid-2, .grid-3 { display: grid; gap: 20px; }
@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Inline icons. They ship with a viewBox and no size, and an unsized SVG is
   300 by 150 pixels; 1.1em keeps each one in proportion to the text beside it. */
.icon {
    width: 1.1em; height: 1.1em; flex: none; display: inline-block; vertical-align: -.16em;
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* --------------------------------------------------------------- 4. buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; min-height: 44px;
    border-radius: var(--radius); border: 1.5px solid transparent;
    font-weight: 700; font-size: .92rem; line-height: 1.15; letter-spacing: .005em;
    text-align: center; text-decoration: none; cursor: pointer;
    background: var(--red); color: #fff;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .05s ease;
}
.btn:hover { background: var(--red-dark); color: #fff; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

.btn--primary { background: var(--red); color: #fff; border-color: transparent; }
.btn--primary:hover { background: var(--red-dark); color: #fff; }

.btn--secondary, .btn--outline { background: #fff; color: var(--ink); border-color: var(--gray-300); }
.btn--secondary:hover, .btn--outline:hover { background: #fff; color: var(--ink); border-color: var(--ink); }

.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--graphite-2); color: #fff; }

.btn--light { background: var(--gray-100); color: var(--ink); }
.btn--light:hover { background: var(--gray-200); color: var(--ink); }

.btn--outline-light { background: transparent; border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn--outline-light:hover { background: rgba(255, 255, 255, .08); border-color: #fff; color: #fff; }

.btn--ghost { background: transparent; color: var(--gray-700); border-color: transparent; }
.btn--ghost:hover { background: var(--gray-100); color: var(--ink); }

.btn--danger { background: #fff; color: var(--red); border-color: #F3B6B9; }
.btn--danger:hover { background: var(--red-tint); color: var(--red-dark); }

.btn--sm { padding: 8px 14px; min-height: 36px; font-size: .82rem; }
.btn--lg { padding: 15px 28px; min-height: 52px; font-size: 1rem; }
.btn--block { width: 100%; }

.btn--link {
    background: none; border: 0; padding: 0; min-height: 0; color: var(--muted);
    font-size: .82rem; font-weight: 500; text-decoration: underline;
}
.btn--link:hover { background: none; color: var(--red); }

.icon-btn {
    display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none;
    border-radius: var(--radius); border: 0; background: transparent;
    color: var(--ink); position: relative; cursor: pointer;
}
.icon-btn:hover { background: var(--gray-100); }
.icon-btn svg { width: 22px; height: 22px; }

/* ----------------------------------------------------------------- 5. forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field > label, .field-label {
    font-size: .8rem; font-weight: 700; color: var(--gray-700); letter-spacing: .02em;
}
.field .hint, .hint { font-size: .78rem; color: var(--muted); }
.field > p.hint { margin: 0; }

input[type="text"], input[type="email"], input[type="tel"], input[type="search"],
input[type="password"], input[type="number"], input[type="url"], input[type="date"],
input[type="file"], select, textarea {
    width: 100%; max-width: 100%; min-width: 0;
    padding: 11px 13px; min-height: 44px;
    border: 1.5px solid var(--gray-300); border-radius: var(--radius);
    background: #fff; color: var(--ink);
    /* 16px, not the 15px body size: iOS Safari zooms the whole page in when a
       focused field's text is smaller than 16px, and never zooms back out. */
    font-size: 16px; line-height: 1.3;
    transition: border-color .15s ease, box-shadow .15s ease;
}
@media (min-width: 900px) {
    input[type="text"], input[type="email"], input[type="tel"], input[type="search"],
    input[type="password"], input[type="number"], input[type="url"], input[type="date"],
    input[type="file"], select, textarea { font-size: 15px; }
}
input[type="file"] { padding: 9px 10px; background: var(--gray-50); }
textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}
input::placeholder, textarea::placeholder { color: #9AA0A6; }
input:focus, select:focus, textarea:focus {
    outline: 0; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23, 25, 28, .1);
}
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] {
    border-color: var(--red); background-color: var(--red-tint);
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--red); width: 17px; height: 17px; flex: none; }
.field-error { display: block; color: var(--red); font-size: .8rem; margin-top: 2px; font-weight: 600; }

.checkbox, .radio { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; cursor: pointer; }
.checkbox input, .radio input { margin-top: 2px; }
/* A tick box that is the last thing before the button: the button is not part
   of the same line of thought, so it stands off like it does from a field. */
.checkbox + .btn, .checkbox + .form-actions { margin-top: 16px; }

/* Server-only honeypot field: hidden from people, visible to bots. Clipped in
   place rather than moved off-screen, for the same reason as the skip link. */
.hp-field {
    position: absolute !important; width: 1px !important; height: 1px !important;
    overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap; margin: -1px; padding: 0; border: 0;
}

.form-row { display: grid; gap: 0 16px; grid-template-columns: minmax(0, 1fr); }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) {
    .form-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid .span-2 { grid-column: 1 / -1; }
}

/* reCAPTCHA v2 checkbox: Google's iframe is a fixed 304px wide, so on a
   narrow phone it needs to be allowed to shrink rather than push the page
   sideways. */
.recaptcha-wrap { margin: 14px 0 16px; max-width: 100%; overflow-x: auto; }
.recaptcha-wrap .g-recaptcha { min-width: 0; }
.footer .recaptcha-wrap { margin: 10px 0 0; }

/* Submit row of a standalone form: the button and the reassurance beside it. */
.form-actions { display: flex; align-items: center; gap: 12px 14px; flex-wrap: wrap; margin-top: 4px; }
.form-actions .text-muted { margin: 0; }

.fieldset { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; margin: 0 0 20px; min-width: 0; }
.fieldset legend { font-weight: 700; padding: 0 8px; }

.links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 16px; font-size: .88rem; margin-top: 18px; }
.links a { font-weight: 600; }

/* Quantity stepper */
.qty {
    display: inline-flex; align-items: stretch; width: fit-content; flex: none;
    border: 1.5px solid var(--gray-300); border-radius: var(--radius); overflow: hidden; background: #fff;
}
.qty button { width: 40px; min-height: 44px; border: 0; background: #fff; font-size: 1.1rem; font-weight: 700; color: var(--ink); }
.qty button:hover { background: var(--gray-100); }
.qty input, .qty input[type="number"] {
    width: 50px; min-height: 44px; border: 0; border-radius: 0; padding: 0; text-align: center; font-weight: 700;
    -moz-appearance: textfield; appearance: textfield; box-shadow: none;
}
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* The dealer catalogue and bulk grid put the same class on a bare number
   field. As the stepper's frame it grew to the full default width of an input
   and sat on top of the price beside it; as a field it is a small box. */
input.qty {
    display: inline-block; width: 68px; min-height: 38px; padding: 6px 8px; text-align: right;
    border: 1.5px solid var(--gray-300); border-radius: var(--radius); overflow: visible; font-weight: 600;
}
/* A line that cannot be ordered: the box is there, and visibly switched off. */
input.qty:disabled { background: var(--gray-100); border-color: var(--gray-200); color: var(--gray-600); cursor: not-allowed; }
input.qty:disabled::placeholder { color: transparent; }

/* -------------------------------------------------- 6. badges and messages */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 9px; border-radius: 999px;
    font-size: .7rem; font-weight: 700; letter-spacing: .03em; white-space: nowrap;
    background: var(--ink); color: #fff;
}
.badge--stock    { background: var(--green-soft); color: var(--green); }
.badge--low      { background: var(--amber-soft); color: var(--amber); }
.badge--out      { background: var(--gray-100);   color: var(--gray-700); }
.badge--preorder { background: var(--blue-soft);  color: var(--blue); }
.badge--quote    { background: var(--blue-soft);  color: var(--blue); }
.badge--sale     { background: var(--red);        color: #fff; }
.badge--soft     { background: var(--gray-100);   color: var(--gray-700); }

.flash {
    border-radius: var(--radius); padding: 12px 14px; margin: 0 0 20px;
    font-size: .9rem; border: 1px solid transparent;
}
.flash--success { background: var(--green-soft); border-color: #B9E0C7; color: #145A32; }
.flash--error   { background: var(--red-tint);   border-color: #F3B6B9; color: #7A1217; }
.flash--warning { background: var(--warn-tint);  border-color: #F3DF8F; color: #5E4600; }
/* Messages printed by the layout for a page that has no place of its own for
   them: a strip under the header, as wide as the page content. */
.flash-stack { padding-top: 16px; }
.flash-stack > .flash:last-child, .flash-stack > .errors:last-child { margin-bottom: 0; }

.errors {
    background: var(--red-tint); border: 1px solid #F3B6B9; border-radius: var(--radius);
    padding: 12px 14px; margin: 0 0 20px; color: #7A1217; font-size: .9rem;
}
.errors ul { margin: 0; padding-left: 18px; }

/* Generic notice, used by account, checkout and dealer screens. */
.alert {
    border: 1px solid var(--gray-300); border-left: 4px solid var(--ink);
    background: var(--gray-50); border-radius: var(--radius);
    padding: 12px 16px; margin: 0 0 16px; font-size: .9rem;
}
.alert > p { margin: 0; }
.alert > p + p { margin-top: 8px; }
.alert a { font-weight: 700; }
.alert--warn { border-left-color: var(--amber); background: var(--warn-tint); }
.alert--bad, .alert--error { border-left-color: var(--red); background: var(--red-tint); }
.alert--ok, .alert--success { border-left-color: var(--green); background: var(--green-soft); }

.alert-inline {
    border: 1px solid #F3B6B9; border-left: 4px solid var(--red); background: var(--red-tint); color: #7A1217;
    padding: 12px 14px; border-radius: var(--radius); margin-bottom: 16px; font-size: .9rem;
}
.alert-inline--info { border-color: #C7D9F2; border-left-color: var(--blue); background: var(--blue-soft); color: #143E78; }
.alert-inline--ok { border-color: #B9E0C7; border-left-color: var(--green); background: var(--green-soft); color: #145A32; }

.empty-state {
    text-align: center; padding: 48px 20px; border: 1px dashed var(--gray-300);
    border-radius: var(--radius-lg); background: var(--gray-50); color: var(--muted);
}
.empty-state h1, .empty-state h2 { color: var(--ink); font-size: 1.3rem; }

/* Surfaces */
.card {
    background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
    box-shadow: var(--shadow); padding: 22px; min-width: 0;
}
.card > :last-child { margin-bottom: 0; }

/* ------------------------------------------------ 7. header, drawer, footer */
.announcement {
    background: var(--ink); color: #fff; text-align: center;
    font-size: .8rem; font-weight: 600; letter-spacing: .02em;
    padding: 9px var(--gutter);
}
.announcement a { color: #fff; text-decoration: underline; text-underline-offset: 2px; margin-left: 6px; white-space: nowrap; }
.announcement a:hover { color: #fff; }

/* A white bar with a 3px red rule under it — the one line that makes the
   prototype read as "tools, not lifestyle". */
.header {
    position: sticky; top: 0; z-index: 60; background: #fff;
    border-bottom: 3px solid var(--red);
}
/* A three-column grid, not a flex row of six things. The grid is what stops the
   overflow: the middle column may shrink (min-width: 0) and the actions column
   is pinned to its own width, so a long menu can never push the cart off the
   edge of the screen. The bar shares the page container, so the wordmark lines
   up with the left edge of every heading below it. */
.header__bar {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center; gap: 12px;
    min-height: var(--header-h);
}
@media (min-width: 1100px) { .header__bar { gap: 20px; } }

/* The same bar without the menu: the dealer portal, the staff sign-in and the
   error page when the full header cannot be drawn. Logo left, a few controls
   right. */
.header__plain, .portal-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: var(--header-h);
}
.portal-bar__brand { gap: 12px; }
.portal-bar__tag {
    display: none; font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
    color: var(--gray-600); border-left: 1px solid var(--gray-300); padding-left: 12px; white-space: nowrap;
}
@media (min-width: 600px) { .portal-bar__tag { display: inline; } }
.portal-bar__links { display: flex; align-items: center; gap: 4px; flex: none; }
.portal-bar__links form { margin: 0 0 0 6px; }
.portal-bar__link {
    display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 10px;
    border-radius: var(--radius); color: var(--gray-700); font-size: .88rem; font-weight: 600;
}
.portal-bar__link:hover, .portal-bar__link[aria-current="page"] { color: var(--ink); background: var(--gray-100); text-decoration: none; }
.portal-bar__link svg { width: 19px; height: 19px; flex: none; }
/* Icons alone on a phone: the logo, two words and a button do not fit 360px. */
@media (max-width: 599px) {
    .portal-bar__link { padding: 0; width: 40px; justify-content: center; }
    .portal-bar__link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand picture { display: block; line-height: 0; }
/* The lockup is 4.6:1 (645x140), so it is sized by width and the height follows.
   Declaring both the width and a height limit made the browser letterbox it
   inside a box wider than the picture — which is what read as a small, lost
   logo. */
.brand__logo {
    width: clamp(132px, 36vw, 164px); height: auto;
    object-fit: contain; display: block;
}
@media (min-width: 768px) { .brand__logo { width: 184px; } }
@media (min-width: 1100px) { .brand__logo { width: clamp(168px, 14vw, 188px); } }
/* The shipped square mark, used only when the configured logo is not on this
   server. Sized by height so it sits on the bar's centre line instead of
   stretching to the lockup's width. */
.brand__logo--mark { width: auto; height: 40px; border-radius: 4px; }
.brand__mark {
    width: 36px; height: 36px; border-radius: 8px; background: var(--red); color: #fff;
    display: grid; place-items: center; font-weight: 900; font-size: 15px; letter-spacing: -.04em; flex: none;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand__name { font-weight: 900; font-size: 1.1rem; letter-spacing: -.01em; }
.brand__tag { font-size: .6rem; letter-spacing: .2em; font-weight: 700; color: var(--gray-600); text-transform: uppercase; margin-top: 3px; }

.nav { display: none; min-width: 0; justify-content: center; }
.nav__list { display: flex; flex-wrap: nowrap; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__item { position: relative; }
.nav__link {
    display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: var(--radius);
    color: var(--gray-700); font-size: .92rem; font-weight: 600; white-space: nowrap;
}
/* The entries that open a panel are <button>s (they open, they do not
   navigate), and a button inherits the browser's border and background unless
   the reset says otherwise. */
button.nav__link { border: 0; background: transparent; cursor: pointer; font: inherit; font-size: .92rem; font-weight: 600; }
.nav__link:hover, .nav__link[aria-expanded="true"] { background: var(--gray-100); color: var(--ink); text-decoration: none; }
.nav__link[aria-current="page"], .nav__link.is-active { color: var(--ink); background: var(--gray-100); }
.nav__caret { width: 14px; height: 14px; margin-left: 2px; opacity: .7; transition: transform .15s ease; }
.nav__link[aria-expanded="true"] .nav__caret { transform: rotate(180deg); }

.nav__dropdown {
    position: absolute; top: 100%; left: 0; min-width: 230px; background: #fff;
    border: 1px solid var(--gray-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    padding: 8px; list-style: none; margin: 6px 0 0; z-index: 70;
}
.nav__dropdown[hidden] { display: none; }
/* Without JavaScript nothing removes `hidden`, so the panel opens on hover and
   on keyboard focus instead. */
html:not(.js) .nav__item:hover > .nav__dropdown,
html:not(.js) .nav__item:focus-within > .nav__dropdown { display: block; }
.nav__dropdown a {
    display: block; padding: 9px 12px; border-radius: var(--radius);
    color: var(--gray-700); font-size: .88rem; font-weight: 600;
}
.nav__dropdown a:hover { background: var(--gray-100); color: var(--ink); text-decoration: none; }

.header__actions { display: flex; align-items: center; gap: 2px; justify-self: end; }
.header__phone {
    display: none; align-items: center; gap: 7px; padding: 8px 10px; border-radius: var(--radius);
    font-weight: 700; font-size: .85rem; color: var(--gray-700); white-space: nowrap;
}
.header__phone:hover { background: var(--gray-100); color: var(--ink); text-decoration: none; }
/* "Dealer login" is the first thing to go when space is tight: it is in the
   drawer, in the footer and one click from /dealer-program, whereas the cart is
   the control a shopper reaches for. */
.header__dealer { display: none; margin-left: 6px; }

/* Account entry point (FR-108). The icon is always there; the label joins it
   when the bar has room. */
.account-link {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-width: 42px; height: 42px; padding: 0 9px; border-radius: var(--radius);
    font-size: .85rem; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap;
}
.account-link svg { width: 22px; height: 22px; flex: none; }
.account-link:hover { background: var(--gray-100); color: var(--ink); text-decoration: none; }
/* The label ("Sign in", or the customer's name) is read out but not drawn.
   The page container is 1192px wide however wide the window is, and the
   wordmark, six menu items, the phone number, the cart and the dealer button
   fill it: with the label drawn as well, the menu ran into the phone number. */
.account-link__label {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

.cart-count {
    position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px;
    padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff;
    font-size: .65rem; font-weight: 800; display: grid; place-items: center;
}
.cart-count[hidden] { display: none; }

.nav-toggle { display: inline-grid; }

/* What the bar shows is staged so that it always fits, with room to spare,
   whatever the width (measured from 320px to 1920px):
     below 768px   wordmark, account, cart, menu button
     from 768px    + the phone number — the call a customer is most likely to make
     from 1100px   + the full menu, in place of the menu button
     from 1300px   + the dealer button
   Anything not in the bar is in the drawer, so nothing overlaps and nothing is
   cut. The menu links are a little closer together until 1200px, which is what
   lets the phone number stay when the menu arrives. */
@media (min-width: 768px) {
    .header__phone { display: inline-flex; }
}
@media (min-width: 1100px) {
    .nav { display: flex; }
    .nav-toggle { display: none; }
    .nav__link { padding: 10px 9px; }
}
@media (min-width: 1200px) {
    .nav__link { padding: 10px 11px; }
}
@media (min-width: 1300px) {
    .header__dealer { display: inline-flex; }
}
@media (max-width: 479px) {
    .header__bar { gap: 8px; }
    /* 42px squares are right for a mouse and wrong for a 360px bar: three of
       them plus the wordmark do not fit. 40px is still a comfortable target. */
    .icon-btn, .account-link { width: 40px; min-width: 40px; height: 40px; padding: 0; }
}
@media (max-width: 359px) {
    .header__bar { gap: 4px; }
    .brand__logo { width: 116px; }
    .icon-btn, .account-link { width: 36px; min-width: 36px; height: 36px; }
    .icon-btn svg, .account-link svg { width: 20px; height: 20px; }
}

/* ---- Drawers: the mobile menu and the cart -------------------------------
   Closed, a drawer is slid off the right edge AND made invisible. Sliding it
   alone was not enough: its shadow is cast to the left, back into the page, and
   showed as a grey gradient down the right-hand edge of every screen; and its
   links stayed in the tab order of a page that could not show them.
   `visibility` waits for the slide to finish on the way out, so the panel still
   animates closed. */
.drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 92vw); max-width: 100%;
    background: #fff; z-index: 120; display: flex; flex-direction: column;
    transform: translateX(100%); visibility: hidden; box-shadow: none;
    transition: transform .25s ease, visibility 0s linear .25s;
    overscroll-behavior: contain;
}
.drawer[data-open="true"] {
    transform: none; visibility: visible; box-shadow: var(--shadow-lg);
    transition: transform .25s ease, visibility 0s;
}
.drawer__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px; border-bottom: 1px solid var(--gray-200); flex: none;
}
.drawer__head strong { font-size: 1.05rem; }
.drawer__brand { display: flex; align-items: center; text-decoration: none; color: var(--ink); min-width: 0; }
.drawer__logo { width: 150px; height: auto; display: block; }
.drawer__body { padding: 14px 16px 28px; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.drawer__list { list-style: none; margin: 0; padding: 0; }
.drawer__list > li { border-bottom: 1px solid var(--gray-100); }
.drawer__list a, .drawer__list button {
    display: block; width: 100%; text-align: left; padding: 14px 4px; background: none; border: 0;
    font-size: 1rem; font-weight: 600; color: var(--ink); cursor: pointer;
}
.drawer__list a:hover { color: var(--red); text-decoration: none; }
.drawer__sublist { list-style: none; margin: -4px 0 10px; padding: 0 0 0 14px; }
.drawer__sublist a { font-weight: 500; font-size: .92rem; color: var(--gray-700); padding: 8px 4px; }
/* A short rule in front of each child link. Drawn, because the arrow that was
   here is not in the page font and showed as an empty box on some phones. */
.drawer__sublist a::before {
    content: ""; display: inline-block; width: 8px; height: 1.5px; margin-right: 8px;
    background: var(--gray-300); vertical-align: middle;
}
.drawer__cta { display: grid; gap: 10px; margin-top: 18px; }
/* Search lives in the drawer, not the header bar. Given the width of a phone
   the drawer has room for a labelled control, which is easier to hit and
   easier to understand than the icon it replaced. */
.drawer__search {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px;
    padding: 12px 14px; margin-bottom: 8px;
    border: 1.5px solid var(--gray-300); border-radius: var(--radius);
    background: var(--gray-50); color: var(--gray-700);
    font-size: .95rem; font-weight: 600; text-align: left;
}
.drawer__search:hover { border-color: var(--ink); }
.drawer__search svg { width: 19px; height: 19px; flex: none; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(23, 25, 28, .5); z-index: 110; }
.drawer-backdrop[hidden] { display: none; }

/* search dialog */
.search-modal { position: fixed; inset: 0; z-index: 130; display: none; }
.search-modal[data-open="true"] { display: block; }
.search-modal .drawer-backdrop { z-index: 0; }
.search-modal__panel {
    position: relative; z-index: 1; background: #fff; padding: 16px var(--gutter);
    border-bottom: 1px solid var(--gray-200); box-shadow: var(--shadow-lg);
}
.search-modal__form { display: flex; flex-wrap: wrap; gap: 10px; max-width: var(--container); margin: 0 auto; }
/* On a phone the field takes the whole first row: beside the button it was
   too narrow to show its own placeholder. */
.search-modal__form input { flex: 1 1 100%; }
.search-modal__form .btn { flex: 1 1 0; }
@media (min-width: 600px) {
    .search-modal__form input { flex: 1 1 220px; }
    .search-modal__form .btn { flex: none; }
}
.search-modal__results { background: #fff; max-height: 60vh; overflow-y: auto; }
.search-results { max-width: var(--container); margin: 0 auto; padding: 8px var(--gutter) 24px; }
.search-result { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--gray-200); }
.search-result__thumb { width: 48px; height: 48px; border-radius: var(--radius); background: var(--gray-100); flex: none; }
.search-result__title { font-weight: 700; color: var(--ink); }
.search-result__meta { font-size: .8rem; color: var(--muted); }

/* ------------------------------------------------------------- breadcrumb */
.breadcrumb { font-size: .8rem; color: var(--gray-600); padding: 0; margin: 0 0 10px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.breadcrumb a { color: var(--gray-600); }
.breadcrumb a:hover { color: var(--ink); text-decoration: none; }
.breadcrumb [aria-current="page"] { color: var(--gray-600); }

/* ----------------------------------------------------------------- footer */
.footer {
    background: var(--ink); color: #C9CED4; font-size: .9rem; padding: 40px 0 24px;
    border-top: 3px solid var(--red);
}
.footer a { color: #C9CED4; }
.footer a:hover { color: #fff; text-decoration: none; }
@media (min-width: 900px) { .footer { padding: 64px 0 24px; } }

/* Newsletter: a raised panel at the head of the footer, as in the prototype,
   so the signup is not buried in the fourth column where nobody looks. */
.footer__newsletter {
    display: grid; gap: 20px; align-items: center; margin-bottom: 40px;
    background: var(--graphite); color: #fff; border-radius: var(--radius-lg);
    padding: 24px 20px;
}
.footer__newsletter > * { min-width: 0; }
.footer__newsletter h2 { color: #fff; font-size: clamp(1.25rem, 2.4vw, 1.75rem); margin: 0 0 8px; }
.footer__newsletter p { margin: 0; font-size: .88rem; color: #C9CED4; max-width: 56ch; }
.footer__form { display: flex; gap: 10px; flex-wrap: wrap; }
.footer__form input { flex: 1 1 200px; border-color: transparent; }
.footer__form .btn { flex: 0 0 auto; }
.footer__band { }
@media (min-width: 900px) {
    .footer__newsletter { grid-template-columns: 1.2fr 1fr; gap: 32px; padding: 40px; margin-bottom: 56px; }
}
@media (max-width: 479px) { .footer__form .btn { flex: 1 1 100%; } }

.footer__top { display: grid; gap: 32px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 36px; }
.footer__brand { grid-column: 1 / -1; }
@media (min-width: 768px) {
    .footer__top { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
    .footer__brand { grid-column: auto; }
}
.footer h4 { color: #fff; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin: 0 0 9px; }
.footer li:last-child { margin-bottom: 0; }
/* The link is the words and a little space around them — a target big enough
   to hit, but never wider than the words it is written in. It used to be a
   block with padding, so the whole of the row was a target and a click in the
   empty space beside a link still opened it. The negative margin gives the
   padding back to the layout, so the column is spaced exactly as before
   while the target is eight pixels taller and ten pixels wider. */
.footer li a {
    display: inline-block;
    padding: 4px 5px;
    margin: -4px -5px;
    border-radius: 4px;
}
.footer li a:hover {
    background: rgba(255, 255, 255, .09); color: #fff; text-decoration: none;
}
.footer li a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
/* The phone number and the address are the two links a visitor on a phone is
   most likely to press, so they get the same treatment. */
.footer__contact a {
    display: inline-block; padding: 3px 4px; margin: -3px -4px; border-radius: 4px;
}
.footer__contact a:hover { background: rgba(255, 255, 255, .09); }
.footer__brand p { margin: 0 0 12px; max-width: 36ch; }
/* The artwork is a wordmark on white, and the footer is near-black: set
   straight on it, the logo reads as a white slab. A light plate keeps the mark
   legible. */
.footer__logo {
    width: 190px; max-width: 100%; height: auto; display: block;
    margin: 0 0 14px; padding: 6px 10px; background: #fff; border-radius: var(--radius);
}
.footer__contact { display: flex; flex-direction: column; gap: 3px; font-size: .86rem; }
.footer__contact a { color: #fff; font-weight: 700; }
.footer__contact span:nth-child(n+2) a { font-weight: 500; color: #C9CED4; }
/* The copyright, the legal links and the attribution all keep to the left of
   the foot of the page (the attribution is centred on its own line below).
   The assistant's button floats in the bottom-right corner, and a page whose
   last row runs under it hides a link behind a button. */
.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 20px;
    display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
    font-size: .78rem; color: var(--steel);
}
.footer__credit {
    margin: 14px 0 0; text-align: center;
    font-size: .78rem; color: var(--steel);
}
/* On a phone the assistant's button is a small mark in the corner, so the
   attribution keeps clear of it instead of running underneath it. */
@media (max-width: 700px) {
    .footer__credit { text-align: left; padding-right: 66px; }
}
.footer__credit a {
    color: #C9CED4; font-weight: 700; letter-spacing: .06em;
    padding: 4px 6px; border-radius: 4px;
}
.footer__credit a:hover { background: rgba(255, 255, 255, .09); color: #fff; text-decoration: none; }
.footer__credit a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.footer__copyright { max-width: 96ch; }
/* The legal links and the social buttons share one row on a wide screen and
   stack on a narrow one. The buttons are brand marks, not words, so they get
   their own block rather than sitting in the middle of the legal row. */
.footer__foot {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 12px 24px; width: 100%;
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.footer__legal a {
    color: var(--steel); display: inline-block;
    padding: 3px 4px; margin: -3px -4px; border-radius: 4px;
}
.footer__legal a:hover { background: rgba(255, 255, 255, .09); color: #fff; text-decoration: none; }
.footer__legal a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
/* The social buttons: a square of ink with the brand mark in it. The mark is
   a filled glyph, so it takes the colour of the button — the row reads as one
   set rather than as thirty different logos pasted side by side. */
.socialicon { width: 18px; height: 18px; flex: none; fill: currentColor; stroke: none; display: inline-block; vertical-align: -.16em; }
.footer__social { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* Under the logo, in the brand column: the row of marks sits between the
   wordmark and the tagline, so it needs a little air on both sides. */
.footer__social--brand { margin: 0 0 18px; }
.footer__socialbtn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 8px;
    background: rgba(255, 255, 255, .07);
    color: #C9CED4;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}
.footer__socialbtn svg { width: 17px; height: 17px; display: block; }
.footer__socialbtn:hover {
    background: var(--red); color: #fff; text-decoration: none; transform: translateY(-1px);
}
.footer__socialbtn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* --------------------------------------------------------- 8. home sections */

/* ---- Hero ----------------------------------------------------------------
   A full-bleed ink band: copy on the left, the photograph on the right with a
   gradient bleeding it into the copy so the type never sits on a busy part of
   the picture. Under 900px the photograph follows the copy as a landscape band
   rather than a full-height slab, so the hero does not fill the whole first
   screen of a phone. */
.hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; }
.hero__inner { display: grid; gap: 0; align-items: center; }
.hero__copy { padding: 40px 0 28px; min-width: 0; }
.hero .eyebrow { color: #F3A1A4; }
.hero__copy h1 {
    font-size: clamp(2.05rem, 4.6vw, 3.9rem); font-weight: 900; letter-spacing: -.02em;
    line-height: 1.08; color: #fff; margin: 0 0 18px;
}
/* The red phrase is a real <span>, because only part of the sentence carries
   the accent. */
.hero__copy h1 em, .hero__copy h1 span { font-style: normal; color: var(--red); }
.hero__copy p:not(.eyebrow), .hero__lead {
    font-size: 1.02rem; color: #C9CED4; max-width: 520px; margin: 0;
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero__stats {
    display: flex; flex-wrap: wrap; gap: 18px 28px; margin-top: 30px; padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, .15);
}
.hero__stat { min-width: 0; }
.hero__stat strong { display: block; font-size: 1.15rem; font-weight: 900; color: #fff; letter-spacing: -.02em; }
.hero__stat span { font-size: .72rem; color: var(--steel); text-transform: uppercase; letter-spacing: .08em; }
.hero__media {
    position: relative; overflow: hidden; min-height: 260px; aspect-ratio: 16 / 10;
    margin: 0 calc(-1 * var(--gutter));
    background: linear-gradient(135deg, #2a2a2a, #0d0d0d);
    display: grid; place-items: center;
}
.hero__media picture { position: absolute; inset: 0; }
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero__media > .placeholder { position: absolute; inset: 0; }
/* Bleed the photograph into the copy so the join is never a hard edge. */
.hero__media::after {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(180deg, var(--ink) 0%, rgba(23, 25, 28, 0) 40%);
}
.hero__caption {
    position: absolute; right: 12px; bottom: 12px; z-index: 2; margin: 0;
    font-size: .72rem; color: #fff; background: rgba(23, 25, 28, .8);
    padding: 6px 10px; border-radius: 4px;
}
@media (min-width: 600px) {
    .hero__copy { padding: 56px 0 32px; }
    .hero__copy p:not(.eyebrow), .hero__lead { font-size: 1.1rem; }
    .hero__stat strong { font-size: 1.3rem; }
    .hero__stat span { font-size: .78rem; }
}
@media (min-width: 900px) {
    .hero__inner { grid-template-columns: 1.05fr 1fr; gap: 40px; min-height: 620px; }
    .hero__copy { padding: 80px 0; }
    .hero__stats { gap: 32px; margin-top: 36px; padding-top: 28px; }
    .hero__media {
        aspect-ratio: auto; min-height: 420px; height: 100%; align-self: stretch;
        margin: 0 calc(-1 * var(--gutter)) 0 0;
    }
    .hero__media::after {
        background: linear-gradient(90deg, var(--ink) 0%, rgba(23, 25, 28, .1) 30%, rgba(23, 25, 28, 0) 60%);
    }
    .hero__caption { right: 16px; bottom: 16px; }
}
/* Past the container width the photograph keeps running to the edge of the
   window instead of stopping in mid-air beside an empty margin. */
@media (min-width: 1288px) {
    .hero__media { margin-right: calc(-1 * (100vw - var(--container)) / 2 - var(--gutter)); }
}

/* The hero with no photograph and no stats (a homepage with nothing published
   yet): one column of copy, as tall as its content. */
.hero--plain .hero__inner { grid-template-columns: minmax(0, 1fr); min-height: 0; }
.hero--plain .hero__copy { max-width: 760px; }
@media (min-width: 900px) { .hero--plain .hero__copy { padding: 96px 0; } }

/* ---- VSS strip -----------------------------------------------------------
   A red band, not a dark one: this is the only place the accent colour carries
   a block of text, which is what makes the three letters read as a mark. */
.vss { background: var(--red); color: #fff; padding: 0; }
.section.vss { padding-block: 0; }
.vss__grid { display: grid; gap: 0; text-align: left; }
.vss__item {
    display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center;
    padding: 18px 0; border-bottom: 1px solid rgba(255, 255, 255, .2);
}
.vss__item:last-child { border-bottom: 0; }
.vss__letter {
    grid-row: 1 / span 2; font-size: 2rem; font-weight: 900; color: #fff; opacity: .5; line-height: 1; margin: 0;
    width: 1.1em; text-align: center;
}
.vss__item h3 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; margin: 0; color: #fff; align-self: end; }
.vss__item p { color: #fff; opacity: .92; font-size: .84rem; margin: 2px 0 0; align-self: start; }
@media (min-width: 900px) {
    .vss__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .vss__item { padding: 22px 24px; border-bottom: 0; border-right: 1px solid rgba(255, 255, 255, .2); }
    .vss__item:first-child { padding-left: 0; }
    .vss__item:last-child { border-right: 0; padding-right: 0; }
}

/* ---- Categories ----------------------------------------------------------
   The card is the photograph. Name and count sit on a gradient that fades out
   upward, so they stay readable over any picture without a solid caption bar.
   Two across on a phone (one per row made the homepage five screens taller for
   no gain), three on a tablet, all five on a desktop. */
.cat-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 600px) { .cat-grid { gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
/* An odd number of cards leaves the last one alone beside a hole. In the
   two-column layout it takes the whole row instead, as a wide band. (The
   three-column layout is left alone: five cards there end in a pair.) */
@media (max-width: 599px) {
    .cat-grid > .cat-card:last-child:nth-child(odd) { grid-column: 1 / -1; aspect-ratio: 2.1 / 1; }
}
/* Six categories in a five-column row leaves one alone on a second line. */
@media (min-width: 1100px) { .cat-grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.cat-card {
    position: relative; display: flex; flex-direction: column; justify-content: flex-end;
    aspect-ratio: 1 / 1.05; overflow: hidden; background: var(--gray-100);
    border: 1px solid var(--gray-200); border-radius: var(--radius-sm); color: #fff;
    text-decoration: none;
}
.cat-card:hover, .cat-card:focus-visible { text-decoration: none; color: #fff; }
.cat-card__media { position: absolute; inset: 0; background: #fff; }
.cat-card__media picture { position: absolute; inset: 0; }
.cat-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.cat-card__media > .placeholder { position: absolute; inset: 0; }
.cat-card:hover .cat-card__media img { transform: scale(1.04); }
/* The gradient is the caption plate, and it is deliberately taller than the
   text: white on a photograph without headroom is the classic unreadable card. */
.cat-card__body {
    position: relative; z-index: 1; margin-top: auto; padding: 40px 12px 12px;
    background: linear-gradient(0deg, rgba(23, 25, 28, .92), rgba(23, 25, 28, 0));
}
.cat-card__name { display: block; font-weight: 700; font-size: .9rem; color: #fff; line-height: 1.25; }
.cat-card__count { display: block; font-size: .75rem; color: #C9CED4; margin-top: 2px; }
.cat-card__blurb { display: none; }
@media (min-width: 600px) {
    .cat-card__body { padding: 40px 14px 14px; }
    .cat-card__name { font-size: .95rem; }
}

/* ---- Before / after ------------------------------------------------------
   The label rides on the picture as a plate, ink for "before" and red for
   "after": the whole point of the section is the pair, and a caption underneath
   makes the reader look away from the difference to find out which is which. */
.before-after { display: grid; gap: 14px; }
/* The Before is a portrait, the After a wider view of both mounts. At 3:4
   column widths their frames share a baseline without clipping either fixing. */
@media (min-width: 700px) { .before-after { grid-template-columns: minmax(0, 3fr) minmax(0, 4fr); gap: 20px; } }
.before-after figure { position: relative; margin: 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--gray-100); }
.before-after__frame { position: relative; aspect-ratio: 9 / 10; background: var(--gray-100); }
.before-after .is-after .before-after__frame { aspect-ratio: 6 / 5; }
.before-after__frame picture { position: absolute; inset: 0; }
.before-after__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.before-after__frame > .placeholder { position: absolute; inset: 0; }
.before-after figcaption {
    position: absolute; top: 14px; left: 14px; margin: 0; padding: 7px 12px;
    background: var(--ink); color: #fff;
    font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    border-radius: 4px;
}
.before-after figure.is-after figcaption { background: var(--red); }

.comparison-video {
    display: grid; align-items: center; gap: 20px; margin: 20px 0 0;
    padding: clamp(18px, 3vw, 36px); background: var(--gray-50);
    border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.comparison-video h3 { font-size: clamp(1.25rem, 2.3vw, 1.85rem); }
.comparison-video__description { max-width: 44ch; margin: 0; color: var(--muted); }
.comparison-video video { width: 100%; aspect-ratio: 1; background: var(--ink); border-radius: var(--radius); }
@media (min-width: 700px) { .comparison-video { grid-template-columns: minmax(0, 1fr) min(42%, 400px); } }

/* ---- Benefits ------------------------------------------------------------ */
.benefit-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .benefit-grid { gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .benefit-grid { gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.benefit {
    padding: 22px; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); background: #fff; min-width: 0;
}
@media (min-width: 900px) { .benefit { padding: 28px; } }
.benefit__icon {
    width: 46px; height: 46px; border-radius: 10px; background: var(--red-tint); color: var(--red);
    display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
    font-weight: 900; font-size: 1.1rem;
}
.benefit__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.benefit h3 { font-size: 1.05rem; margin: 0 0 6px; }
.benefit p { margin: 0; font-size: .92rem; color: var(--gray-600); }
.section--dark .benefit { background: var(--graphite); border-color: #3A3F45; }
.section--dark .benefit__icon { background: #fff; }
.section--dark .benefit h3 { color: #fff; }
.section--dark .benefit p { color: #C9CED4; }

/* ---- Split block --------------------------------------------------------- */
.split { display: grid; gap: 28px; align-items: center; }
.split > * { min-width: 0; }
.split__media { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden; background: var(--gray-100); }
.split__media picture { position: absolute; inset: 0; }
.split__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split__media > .placeholder { position: absolute; inset: 0; }
.split__content h2 { margin-bottom: 10px; }
.split__content > p:not(.eyebrow) { color: var(--gray-600); }
.split__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) { .split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; } }

.checklist { list-style: none; padding: 0; margin: 0 0 20px; }
.checklist li { display: flex; gap: 10px; padding: 8px 0; align-items: flex-start; }
.checklist li::before {
    content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%; margin-top: 1px;
    background: var(--red-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C82026' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* ---- Reviews ------------------------------------------------------------- */
.review-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .review-grid { gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .review-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.review { border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 24px; background: #fff; min-width: 0; }
/* Drawn stars (see the stars() helper): filled for the rating, an outline for
   the rest. */
.stars { display: inline-flex; align-items: center; gap: 2px; color: #F2A900; vertical-align: -.16em; }
.stars .icon { width: 16px; height: 16px; }
.stars__on { fill: currentColor; }
.stars__off { color: var(--gray-300); }
.review blockquote, .review p { font-size: .95rem; margin: 12px 0 0; line-height: 1.6; }
.review h3 { font-size: 1rem; margin: 10px 0 0; }
.review__author { font-size: .82rem; color: var(--gray-600); margin-top: 14px; }
.review__author strong { color: var(--ink); }

/* ---- Article cards (homepage, /resources) -------------------------------- */
.post-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .post-grid { gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Exactly three cards: one row from a tablet up, rather than two and one. */
@media (min-width: 700px) { .post-grid--trio { gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .post-grid--trio { gap: 24px; } }
.post-card {
    position: relative; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden;
    background: #fff; display: flex; flex-direction: column; min-width: 0;
    transition: box-shadow .2s ease, transform .2s ease;
}
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
/* A percentage height resolved against an aspect-ratio box is indefinite, so a
   portrait photograph kept its own ratio and painted itself over the text
   underneath. Absolute positioning against the ratio box is the reliable fix. */
.post-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--gray-100); }
.post-card__media picture { position: absolute; inset: 0; }
.post-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__media > .placeholder { position: absolute; inset: 0; }
.post-card__body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card__meta { font-size: .65rem; font-weight: 800; color: var(--red); letter-spacing: .14em; text-transform: uppercase; margin: 0; }
.post-card__title { font-size: 1rem; font-weight: 800; margin: 0; line-height: 1.3; }
.post-card__title a { color: var(--ink); }
/* The whole card is the link: the title's anchor is stretched over it, so the
   photograph and the excerpt are clickable without nesting interactive
   elements. */
.post-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.post-card__title a:hover { color: var(--red); text-decoration: none; }
.post-card__excerpt { font-size: .88rem; color: var(--gray-600); margin: 0; }
.post-card__more { font-size: .85rem; font-weight: 700; color: var(--ink); margin: auto 0 0; padding-top: 4px; }
.post-card__more .icon { margin-left: 2px; transition: transform .15s ease; }
.post-card:hover .post-card__more .icon { transform: translateX(3px); }
.post-card__date { font-size: .78rem; color: var(--gray-600); margin: auto 0 0; }

/* ----------------------------------------------- 9. product grid and card */
.product-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .product-grid { gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* A multiple of four: two columns on a tablet instead of three and one over. */
@media (min-width: 700px) and (max-width: 999px) { .product-grid--fours { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Beside the filter panel there is room for three, as in the prototype. */
@media (min-width: 960px) { .shop-layout .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 700px) and (max-width: 959px) { .shop-layout .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* A 320px phone cannot hold two cards with a readable price and a tappable
   button in each. */
@media (max-width: 339px) { .product-grid { grid-template-columns: minmax(0, 1fr); } }

/* Card geometry follows the prototype: a square photograph on white, contained
   rather than cropped so a long mount is not chopped to its middle; a category
   eyebrow; the model/SKU line; price and stock; then one full-width action. */
.product-card {
    border: 1px solid var(--gray-200); border-radius: var(--radius-sm); background: #fff;
    display: flex; flex-direction: column; overflow: hidden; position: relative; min-width: 0;
    transition: box-shadow .2s ease, transform .2s ease;
}
.product-card:hover, .product-card:focus-within { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.product-card__media {
    position: relative; aspect-ratio: 1 / 1; background: #fff;
    overflow: hidden; border-bottom: 1px solid var(--gray-100);
}
/* The link and the picture fill the square explicitly. Sizing them with
   height:100% alone resolved against an indefinite row height, so a portrait
   photograph overflowed the box and every card showed a sliver of it. */
.product-card__media a.product-card__image-link { position: absolute; inset: 0; display: block; }
.product-card__media picture { position: absolute; inset: 0; display: block; }
/* Edge to edge, as in the prototype. A photograph is shown whole (contained)
   unless the card says it is a moderate portrait, which fills the square and
   loses a little sky and floor instead of standing between two white bars. */
.product-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.product-card__media--fill img { object-fit: cover; }
.product-card__media .placeholder { position: absolute; inset: 0; }
.product-card__badges {
    position: absolute; top: 8px; left: 8px; z-index: 2; pointer-events: none;
    display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
}
.product-card__body { padding: 12px 12px 0; display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.product-card__cat { font-size: .64rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gray-600); font-weight: 700; margin: 0; }
.product-card__name { font-size: .9rem; font-weight: 800; margin: 0; line-height: 1.25; letter-spacing: 0; }
.product-card__name a { color: var(--ink); }
.product-card__name a:hover { color: var(--red); text-decoration: none; }
.product-card__sku { font-size: .72rem; color: var(--gray-600); margin: 0; }
.product-card__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: auto 0 0; padding-top: 8px; }
.product-card__actions { display: flex; gap: 8px; padding: 12px; }
.product-card__actions form { display: flex; flex: 1; min-width: 0; margin: 0; }
.product-card__actions .btn { flex: 1; min-width: 0; padding-inline: 10px; }
@media (min-width: 700px) {
    .product-card__badges { top: 10px; left: 10px; }
    .product-card__body { padding: 16px 16px 0; gap: 6px; }
    .product-card__cat { font-size: .7rem; }
    .product-card__name { font-size: 1rem; }
    .product-card__sku { font-size: .75rem; }
    .product-card__actions { padding: 14px 16px 16px; }
}

/* Quick view. On a device with a real pointer it is the prototype's control: a
   button that rises over the foot of the photograph when the card is hovered or
   focused. On a touch screen there is no hover to reveal it, and a second
   button under every card made two-column cards on a phone taller than the
   screen was wide — the photograph and the title already open the product, so
   there it is simply not shown. */
.product-card__quick { display: none; }
@media (hover: hover) and (pointer: fine) {
    .product-card__quick {
        display: flex; position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 3;
        min-height: 38px; padding: 8px 12px; font-size: .82rem;
        background: #fff; color: var(--ink); border: 1.5px solid var(--gray-300); box-shadow: var(--shadow);
        opacity: 0; transform: translateY(6px);
        transition: opacity .2s ease, transform .2s ease, border-color .15s ease;
    }
    .product-card__quick:hover { background: #fff; color: var(--ink); border-color: var(--ink); }
    .product-card:hover .product-card__quick,
    .product-card:focus-within .product-card__quick,
    .product-card__quick:focus-visible { opacity: 1; transform: none; }
}

.price { font-weight: 800; font-size: 1rem; color: var(--ink); }
.price--was, .price-old, .price--old { font-weight: 500; font-size: .82rem; color: var(--gray-600); text-decoration: line-through; }
.price--sale { color: var(--red); }
@media (min-width: 700px) { .price { font-size: 1.05rem; } .price--was, .price-old, .price--old { font-size: .85rem; } }

/* Stock state: a coloured dot reads faster than a word alone, and the words
   stay for anyone who cannot rely on colour. */
.stock { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; margin: 0; }
.dot, .stock .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; display: inline-block; }
.stock-in { color: var(--green); }
.stock-low { color: var(--amber); }
.stock-out { color: var(--gray-600); }
.stock-pre { color: var(--blue); }

/* Shown when a photograph is not there. It draws the brand mark on a tinted
   panel, so the state reads as designed rather than as a hole. */
.placeholder {
    width: 100%; height: 100%; min-height: 120px; display: grid; place-items: center;
    background: linear-gradient(160deg, #FAF7F7, var(--gray-100));
    color: var(--muted); font-size: .75rem; text-align: center; padding: 16px;
}
.placeholder__inner { display: grid; justify-items: center; gap: 6px; }
.placeholder__mark { width: clamp(44px, 22%, 76px); height: auto; display: block; opacity: .9; margin-bottom: 2px; }
.placeholder__code { font-weight: 800; letter-spacing: .08em; color: var(--ink); font-size: .8rem; }
.placeholder__label { letter-spacing: .04em; text-transform: uppercase; font-size: .66rem; color: var(--muted); }
.placeholder--dark { color: rgba(255, 255, 255, .55); background: linear-gradient(135deg, #262626, #101010); }
/* On a dark panel the flag would disappear into the background, so it sits on a
   small light plate — the same trade as the footer logo. */
.placeholder--dark .placeholder__mark { background: #fff; border-radius: 4px; padding: 5px; width: clamp(44px, 20%, 68px); }
.placeholder--dark .placeholder__code { color: #fff; }
.placeholder--dark .placeholder__label { color: rgba(255, 255, 255, .55); }

/* ------------------------------------------------------- 10. shop listing */

/* The head of an inner page: breadcrumb, title, one line of introduction. */
/* The head of an inner page: a band, so the title is clearly the top of the
   page rather than the first line of a long one. The tint fades out before
   the content begins. */
.page-head {
    padding: 26px 0 18px;
    background: linear-gradient(180deg, var(--gray-50) 0%, rgba(248, 249, 250, 0) 100%);
}
.page-head h1 { font-size: clamp(1.75rem, 3.6vw, 2.75rem); margin: 0; letter-spacing: -.02em; }
.page-head__lead { margin: 10px 0 0; color: var(--gray-600); max-width: 70ch; font-size: 1rem; }
.page-head__lead a { text-decoration: underline; text-underline-offset: 2px; }
.page-head .eyebrow { margin: 6px 0 8px; }
.page-head .breadcrumb:last-child { margin-bottom: 0; }
.page-head--narrow .container { max-width: 908px; }
/* A page whose photograph is too small (or too tall) for the wide band: it
   sits beside the heading at no more than its own size, instead of being
   stretched. Under the heading on a phone, where the column is narrow enough
   for it. See partials/page-head.php. */
.page-head__figure {
    position: relative; margin: 16px 0 0; overflow: hidden; background: var(--gray-100);
    border-radius: var(--radius-lg); aspect-ratio: 16 / 9;
}
.page-head__figure picture { position: absolute; inset: 0; }
.page-head__figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 600px) {
    .page-head--media > .container {
        display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 28px; align-items: center;
    }
    .page-head__figure { margin: 0; aspect-ratio: 4 / 3; }
}
@media (min-width: 900px) {
    .page-head--media > .container { grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; }
}
@media (min-width: 900px) { .page-head { padding: 40px 0 24px; } }
/* A page head that holds only the breadcrumb (the product page, whose title
   sits beside the photograph) does not need a title's worth of space under it. */
.page-head--crumbs { padding-bottom: 14px; }
@media (min-width: 900px) { .page-head--crumbs { padding: 28px 0 18px; } }

/* The band under a page head. Tighter than a homepage section: the head above
   it has already spent the white space. */
.page-body { padding: 14px 0 56px; }
@media (min-width: 900px) { .page-body { padding: 16px 0 80px; } }

.shop-layout { display: grid; gap: 20px; align-items: start; grid-template-columns: minmax(0, 1fr); }
.shop-layout > * { min-width: 0; }
@media (min-width: 960px) { .shop-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 36px; } }

/* Filters. On a desktop they are the left rail, always open. On a phone they
   sat between the heading and the first product and pushed the catalogue off
   the first screen, so there they fold behind one button. */
.filters { min-width: 0; }
.filters__toggle { display: none; }
.filters__title, .filters h2, .filter-group legend {
    font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
    color: var(--gray-600); margin: 0 0 10px; padding: 0;
}
.filters__block { margin: 0 0 22px; }
.filters__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.filters__list a {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 8px 10px; border-radius: var(--radius);
    font-weight: 600; font-size: .92rem; color: var(--gray-700);
}
.filters__list a:hover { background: var(--gray-100); color: var(--ink); text-decoration: none; }
.filters__list a[aria-current="page"], .filters__list a.is-active { background: var(--ink); color: #fff; }
.filters__list a span { font-size: .75rem; opacity: .7; font-weight: 600; }

.filter-group { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.filter-group label {
    display: flex; gap: 9px; align-items: center; padding: 6px 10px; border-radius: var(--radius);
    font-size: .92rem; font-weight: 600; color: var(--gray-700); cursor: pointer;
}
.filter-group label:hover { background: var(--gray-100); }
.filter-count { margin-left: auto; color: var(--gray-600); font-size: .75rem; font-weight: 600; }

/* Length is a set of chips, as in the prototype: four values read faster side
   by side than as a list. Each chip is a real checkbox, so the filter still
   works as a plain form. */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    position: relative; display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--gray-300);
    background: #fff; color: var(--gray-700); font-size: .82rem; font-weight: 600; cursor: pointer;
}
.chip:hover { border-color: var(--ink); }
.chip input { position: absolute; opacity: 0; width: 100%; height: 100%; inset: 0; margin: 0; cursor: pointer; }
.chip:has(input:checked), .chip.is-active, .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip:has(input:focus-visible) { outline: 3px solid rgba(200, 32, 38, .5); outline-offset: 2px; }
.filter-group .chip { padding: 6px 12px; border-radius: 999px; }
.filter-group .chip:hover { background: #fff; }
.filter-group .chip:has(input:checked):hover { background: var(--ink); }

.filters__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 22px; font-size: .88rem; }
.filters__actions a { font-weight: 600; }
.filters__help {
    background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
    padding: 16px; font-size: .86rem;
}
.filters__help strong { display: block; margin-bottom: 4px; }
.filters__help p { margin: 0; color: var(--gray-600); }
.filters__help a { font-weight: 700; }

/* Below the two-column layout the panel is a bordered card. With JavaScript
   (the layout marks <html class="js"> before first paint) it folds behind the
   button; without it there is nothing to open the panel, so it is simply
   shown and the button is not. */
.filters__toggle {
    align-items: center; justify-content: space-between; gap: 10px; width: 100%;
    min-height: 46px; padding: 11px 14px; border: 1.5px solid var(--gray-300);
    border-radius: var(--radius); background: #fff; font-weight: 700; font-size: .95rem; color: var(--ink);
}
.filters__toggle span { display: inline-flex; align-items: center; gap: 8px; }
.filters__toggle[aria-expanded="true"] { border-color: var(--ink); }
.filters__caret { width: 18px; height: 18px; transition: transform .15s ease; }
.filters__toggle[aria-expanded="true"] .filters__caret { transform: rotate(180deg); }
@media (max-width: 959px) {
    .filters {
        border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
        padding: 18px 16px 4px; background: #fff;
    }
    .js .filters__toggle { display: flex; }
    .js .filters { display: none; }
    .js .filters[data-open="true"] { display: block; }
}

/* The results column of the two-column shop: it may shrink, so a long product
   name cannot push the grid wider than the screen. */
.shop-results { min-width: 0; }
.shop-toolbar {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}
.shop-toolbar__count { font-size: .85rem; color: var(--gray-600); margin: 0; white-space: nowrap; }
.shop-toolbar__end { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.shop-toolbar select { width: auto; min-width: 0; padding: 9px 36px 9px 12px; min-height: 42px; }
.shop-toolbar form { margin: 0; }
.shop-search { position: relative; flex: 1 1 240px; max-width: 360px; }
.shop-search svg {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; color: var(--gray-600); pointer-events: none;
}
.shop-search input, .shop-search input[type="search"] { padding-left: 36px; min-height: 42px; }
@media (max-width: 599px) {
    .shop-search { flex: 1 1 100%; max-width: none; }
    .shop-toolbar__end { width: 100%; justify-content: space-between; margin-left: 0; }
}

/* ------------------------------------------------------------- pagination */
.pagination { display: flex; gap: 6px; justify-content: center; align-items: center; margin: 32px 0 0; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 40px; height: 40px; padding: 0 10px; display: grid; place-items: center;
    border: 1.5px solid var(--gray-300); border-radius: var(--radius); font-size: .88rem; font-weight: 600; color: var(--ink);
}
.pagination a:hover { border-color: var(--ink); text-decoration: none; }
.pagination .is-current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination .is-disabled { opacity: .4; }
.pagination__summary { text-align: center; font-size: .8rem; color: var(--gray-600); margin: 12px 0 0; }

/* ------------------------------------------------------- 11. product page */
.pdp { display: grid; gap: 24px; align-items: start; grid-template-columns: minmax(0, 1fr); }
.pdp > * { min-width: 0; }
@media (min-width: 900px) { .pdp { grid-template-columns: 1.1fr 1fr; gap: 48px; } }

@media (min-width: 900px) { .pdp__gallery { position: sticky; top: calc(var(--header-h) + 20px); } }
.pdp__main {
    position: relative; aspect-ratio: 1 / 1; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
    overflow: hidden; background: #fff;
}
.pdp__main picture { position: absolute; inset: 0; }
.pdp__main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.pdp__main > .placeholder { position: absolute; inset: 0; }
/* The thumbnails scroll sideways inside their own row on a phone: wrapping
   five of them pushed the price and the button a full row further down. */
.pdp__thumbs { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.pdp__thumb {
    position: relative; flex: none; width: 64px; height: 64px; border: 2px solid var(--gray-200); border-radius: 8px;
    background: #fff; cursor: pointer; padding: 0; overflow: hidden;
}
.pdp__thumb picture { position: absolute; inset: 0; }
.pdp__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pdp__thumb:hover { border-color: var(--steel); }
.pdp__thumb[aria-current="true"] { border-color: var(--ink); }
@media (min-width: 600px) { .pdp__thumb { width: 76px; height: 76px; } }

.pdp__info .eyebrow { margin-bottom: 8px; }
.pdp__info h1 { font-size: clamp(1.55rem, 3vw, 2rem); margin: 0 0 6px; }
.pdp__sku, .pdp__model { font-size: .82rem; color: var(--gray-600); margin: 0 0 12px; }
.pdp__status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 4px; }
.pdp__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 12px 0; }
.pdp__price .price { font-size: 1.7rem; letter-spacing: -.01em; }
.pdp__price .price--was { font-size: 1rem; }
.pdp__lead { font-size: 1.02rem; color: var(--gray-700); margin: 0 0 4px; }

/* Quantity, then one wide button: on a phone the button takes the rest of the
   row, so the thing a shopper came to press is never the small control. */
.pdp__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 10px; align-items: stretch; }
.pdp__actions .btn { flex: 1 1 200px; min-width: 0; min-height: 48px; font-size: 1rem; }
.pdp__actions input[type="email"] { flex: 1 1 220px; min-width: 0; }
.pdp__actions .qty button, .pdp__actions .qty input { min-height: 46px; }
.pdp__note { font-size: .86rem; color: var(--gray-600); margin: 8px 0 0; }
.pdp__wishlist { margin: 10px 0 0; }
.pdp__compat { font-size: .88rem; margin: 16px 0 0; color: var(--gray-700); }

.cart-feedback { margin: 8px 0 0; font-size: .88rem; font-weight: 600; color: var(--green); min-height: 1.2em; }
.cart-feedback:empty { margin: 0; min-height: 0; }

.trust-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 20px 0 0; }
.trust-row > * {
    display: flex; gap: 8px; align-items: center; min-width: 0;
    background: var(--gray-100); border-radius: var(--radius); padding: 10px 12px;
    font-size: .78rem; font-weight: 600; color: var(--ink);
}
.trust-row svg { width: 16px; height: 16px; color: var(--red); flex: none; }
.trust-row a { color: inherit; }
@media (min-width: 520px) { .trust-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Tabs. Seven of them do not fit a phone, so the list scrolls sideways in its
   own strip rather than wrapping into three ragged rows. */
.tabs { margin-top: 36px; }
.tabs__list {
    display: flex; gap: 4px; border-bottom: 1px solid var(--gray-200);
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.tabs__tab {
    flex: none; border: 0; background: none; padding: 12px 14px; font-weight: 700; font-size: .92rem;
    color: var(--gray-600); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs__tab:hover { color: var(--ink); }
.tabs__tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--red); }
.tabs__panel { padding: 24px 0 8px; max-width: 860px; }
.tabs__panel[hidden] { display: none; }
@media (min-width: 900px) { .tabs { margin-top: 40px; } .tabs__tab { padding: 12px 16px; } }

.spec-table { width: 100%; border-collapse: collapse; margin: 4px 0 0; font-size: .9rem; }
.spec-table th, .spec-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--gray-200); vertical-align: top; }
.spec-table thead th {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-600);
    border-bottom: 2px solid var(--gray-300); background: none; white-space: nowrap;
}
.spec-table tbody th { width: 40%; font-weight: 600; color: var(--gray-600); background: none; }
.spec-table a { font-weight: 700; }
/* A table of model numbers (the sizing chart): columns share the width evenly
   instead of the first taking 40%, and a model number never breaks at its
   hyphen ("TMMRT-" / "12"). */
.spec-table--models tbody th { width: auto; white-space: nowrap; }
.spec-table--models td { white-space: nowrap; }
/* On a phone all four columns have to fit: the headings may take two lines
   (the model numbers under them may not), with less air between columns. */
@media (max-width: 599px) {
    .spec-table--models { font-size: .84rem; }
    .spec-table--models th, .spec-table--models td { padding: 10px 5px; }
    .spec-table--models thead th { white-space: normal; letter-spacing: .04em; vertical-align: bottom; }
}
@media (max-width: 359px) {
    .spec-table--models { font-size: .74rem; }
    .spec-table--models th, .spec-table--models td { padding: 9px 3px; }
    .spec-table--models thead th { font-size: .62rem; letter-spacing: 0; }
}
.spec-unverified { font-size: .7rem; color: var(--amber); font-weight: 700; margin-left: 6px; white-space: nowrap; }
/* A table is the one thing that may be wider than a phone; it scrolls inside
   this wrapper so the page itself never does. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }

/* Reviews inside the product tabs: a list, not the home page's three-up grid. */
.review-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 16px; }
.review-list { display: grid; gap: 14px; }
.review__reply {
    background: var(--gray-100); border-left: 3px solid var(--red); border-radius: 0 var(--radius) var(--radius) 0;
    padding: 10px 14px; font-size: .9rem;
}
.review-form { max-width: 600px; }
.review-form h3 { font-size: 1.1rem; margin: 0 0 14px; }

/* Related products: a grey band, full width, under the tabs. */
.related { background: var(--gray-100); padding: 44px 0 52px; margin-top: 40px; }
@media (min-width: 900px) { .related { padding: 64px 0 72px; margin-top: 56px; } }
/* After a block that already ends in its own white space (an article). */
article + .related { margin-top: 0; }

/* ------------------------------------------------------ 12. content pages */

/* The photograph of a content page: one wide rounded band under the page head,
   inside the container, as in the prototype. 21:8 on a desktop; taller on a
   phone, where 21:8 is a sliver. */
.page-figure {
    position: relative; margin: 0; overflow: hidden; background: var(--gray-100);
    border-radius: var(--radius-lg); aspect-ratio: 16 / 9;
}
.page-figure picture { position: absolute; inset: 0; }
.page-figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 600px) { .page-figure { aspect-ratio: 21 / 9; } }
@media (min-width: 900px) { .page-figure { aspect-ratio: 21 / 8; } }

/* Kept for templates and saved CMS blocks that still use the older name. */
.page-hero { padding: 26px 0 18px; }
.page-hero h1 { margin: 0 0 8px; font-size: clamp(1.75rem, 3.6vw, 2.75rem); }
.page-hero p { color: var(--gray-600); max-width: 70ch; margin: 0; }
.page-hero--image { padding-block: clamp(48px, 9vw, 110px); color: #fff; background-color: var(--ink); background-size: cover; background-position: center; }
.page-hero--image h1 { color: #fff; }
.page-hero--image p { color: rgba(255, 255, 255, .92); }
@media (min-width: 900px) { .page-hero { padding: 40px 0 24px; } }

/* The reading column. 860px, centred: a wall-to-wall paragraph on a desktop is
   unreadable, and a narrow column pinned to the left edge leaves half the page
   empty. */
.page-content { padding: 28px 0 56px; }
@media (min-width: 900px) { .page-content { padding: 40px 0 80px; } }
.page-content > .container { max-width: 908px; }
.page-content--wide > .container { max-width: var(--container); }

.prose { font-size: 1.02rem; color: var(--ink); max-width: none; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p, .prose li { color: var(--gray-700); }
.prose h2 { margin-top: 1.6em; font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
.prose h3 { margin-top: 1.4em; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose img { border-radius: var(--radius-lg); margin: 24px 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose strong { color: var(--ink); }
.prose table { display: block; overflow-x: auto; max-width: 100%; margin: 24px 0; font-size: .92rem; -webkit-overflow-scrolling: touch; }
.prose td, .prose th { border-bottom: 1px solid var(--gray-200); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-600); white-space: nowrap; }
.prose blockquote {
    margin: 24px 0; padding: 14px 18px; border-left: 4px solid var(--red);
    background: var(--gray-50); border-radius: 0 var(--radius) var(--radius) 0;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose iframe, .prose video { max-width: 100%; }
@media (min-width: 900px) { .prose { font-size: 1.05rem; } }

.divider { border: 0; border-top: 1px solid var(--gray-200); margin: 36px 0; }

/* The three words the brand stands on, as cards under the About copy. */
.value-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .value-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.page-cta {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
    margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--gray-200);
}

/* Questions and answers: bordered rows, as in the prototype. */
.faq-list { display: grid; gap: 10px; margin-top: 8px; }
.faq-item { border: 1px solid var(--gray-200); border-radius: var(--radius); background: #fff; }
.faq-item h3 { margin: 0; font-size: 1rem; }
.faq-item__q {
    width: 100%; text-align: left; background: none; border: 0; padding: 14px 18px;
    font-weight: 700; font-size: .98rem; cursor: pointer; color: var(--ink);
    display: flex; justify-content: space-between; align-items: flex-start; gap: 14px;
}
.faq-item__q > span:last-child { color: var(--gray-600); font-size: 1.2rem; line-height: 1; flex: none; }
.faq-item__q[aria-expanded="true"] > span:last-child { transform: rotate(45deg); }
.faq-item__a { padding: 0 18px 16px; color: var(--gray-700); }
.faq-item__a[hidden] { display: none; }
.faq-group { margin-top: 32px; }
.faq-group h2 { font-size: 1.15rem; margin-bottom: 12px; }

/* ----------------------------------------------- 13. blog and portfolio */
.blog-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.blog-filter {
    display: inline-block; padding: 6px 13px; border: 1.5px solid var(--gray-300);
    border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--gray-700); background: #fff;
}
.blog-filter:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }
.blog-filter.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
/* The number of photographs in a section, in its own pill. */
.blog-filter__count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px;
    border-radius: 999px; background: var(--gray-100); color: var(--gray-600);
    font-size: .7rem; font-weight: 700; letter-spacing: .02em;
}
.blog-filter:hover .blog-filter__count { background: var(--gray-200); color: var(--ink); }
.blog-filter.is-active .blog-filter__count { background: rgba(255, 255, 255, .2); color: #fff; }

/* .blog-grid/.blog-card are the older names for .post-grid/.post-card and are
   kept as aliases, so a saved fragment or a cached page still lays out. */
.blog-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .blog-grid { gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.blog-card {
    border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden;
    background: #fff; display: flex; flex-direction: column; min-width: 0;
}
.blog-card__thumb { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--gray-100); }
.blog-card__thumb picture { position: absolute; inset: 0; }
.blog-card__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card__body { padding: 18px; }
.blog-card__title { font-size: 1rem; margin: 6px 0 8px; line-height: 1.3; }
.blog-card__title a { color: var(--ink); }
.blog-card__title a:hover { color: var(--red); text-decoration: none; }

.article { max-width: 860px; margin: 0 auto; }
.article__header { margin-bottom: 20px; }
.article__header h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin: 0 0 8px; }
.article__meta { color: var(--gray-600); font-size: .9rem; margin: 10px 0 0; }
.article__hero {
    width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block;
    border-radius: var(--radius-lg); margin: 0 0 24px; background: var(--gray-100);
}
@media (min-width: 700px) { .article__hero { aspect-ratio: 21 / 9; } }
.article__lead { font-size: 1.15rem; color: var(--gray-700); margin: 0 0 20px; font-weight: 500; }
.article__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 28px 0 0; font-size: .85rem; }
.article__foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--gray-200); }
.article-more { margin-top: 48px; }

/* Portfolio. Equal frames: the photographs are the content, so they are given
   the room and the captions stay out of the way underneath. */
.gallery-intro { max-width: 70ch; margin-bottom: 24px; }
.gallery-section { margin-top: 36px; }
.gallery-section:first-of-type { margin-top: 8px; }
.gallery-section__title {
    font-size: 1.25rem; margin: 0 0 16px;
    display: flex; align-items: baseline; gap: 14px;
}
/* The rule fills the space to the right of the title, so the sections read as
   a list rather than as headings that happen to follow each other. */
.gallery-section__title::after {
    content: ""; flex: 1 1 auto; height: 1px; background: var(--gray-200);
}
.gallery-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .gallery-grid { gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gallery-item { margin: 0; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; background: #fff; min-width: 0; }
.gallery-item picture { display: block; }
.gallery-item img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-item .placeholder { aspect-ratio: 4 / 3; height: auto; }
.gallery-item figcaption { padding: 10px 12px; font-size: .82rem; color: var(--gray-600); border-top: 1px solid var(--gray-200); }
.gallery-item.is-featured { border-color: var(--gray-300); }

/* The link that opens the photograph in the viewer. It covers the whole
   frame, so the picture itself is the target — not a small "enlarge" button
   in the corner that has to be found. */
.gallery-item__open {
    position: relative; display: block; overflow: hidden; background: var(--gray-100);
    transition: transform .2s ease, box-shadow .2s ease;
}
.gallery-item__open picture { display: block; }
.gallery-item__open img { transition: transform .35s ease; }
.gallery-item__open:hover img,
.gallery-item__open:focus-visible img { transform: scale(1.04); }
.gallery-item__open:focus-visible { outline: 3px solid var(--red); outline-offset: -3px; }

/* The enlarge mark, hidden until the picture is pointed at: a permanent badge
   on every photograph is noise once the visitor knows what the pictures do. */
.gallery-item__zoom {
    position: absolute; right: 10px; bottom: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 999px;
    background: rgba(24, 24, 24, .72); color: #fff;
    opacity: 0; transform: translateY(4px);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
}
.gallery-item__zoom .icon { width: 17px; height: 17px; }
@media (hover: hover) and (pointer: fine) {
    .gallery-item__open:hover .gallery-item__zoom,
    .gallery-item__open:focus-visible .gallery-item__zoom { opacity: 1; transform: translateY(0); }
}
/* A touch device has no hover, so the mark is simply not drawn. */
@media (hover: none) { .gallery-item__zoom { display: none; } }

/* -------------------------------------------- 14. contact and resources */
/* A form as a grid item cannot shrink below the intrinsic width of its widest
   control (a file picker is about 390px), which pushed the booking form past a
   390px viewport. min-width: 0 is the guard for exactly that. */
.contact-grid { display: grid; gap: 20px; align-items: start; grid-template-columns: minmax(0, 1fr); }
.contact-grid > * { min-width: 0; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.3fr 1fr; gap: 24px; } }
.contact-cards { display: grid; gap: 12px; }
.contact-card {
    border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 20px;
    background: #fff; box-shadow: var(--shadow); min-width: 0;
}
.contact-card h2, .contact-card h3, .contact-card h4 {
    display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 0 0 10px;
}
.contact-card h2 svg, .contact-card h3 svg, .contact-card h4 svg { width: 18px; height: 18px; color: var(--red); flex: none; }
.contact-card p { margin: 0 0 6px; }
.contact-card p:last-child { margin-bottom: 0; }
.contact-card__big { font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; }
.contact-card__big a { color: var(--ink); }
.contact-card .btn { margin-top: 8px; }
.contact-card a { font-weight: 700; }

/* /resources is a destination, not a paragraph: two columns of reference
   material, then the articles that exist. */
/* The page body from the admin, as an introduction above the cards. */
.resource-intro { max-width: 72ch; margin: 0 0 20px; }
.resource-intro > :last-child { margin-bottom: 0; }
.resource-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
.resource-grid + .resource-grid { margin-top: 16px; }
@media (min-width: 900px) { .resource-grid + .resource-grid { margin-top: 24px; } }
.resource-grid .card h2 { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; margin: 0 0 8px; }
.resource-grid .card h2 svg { width: 20px; height: 20px; color: var(--red); flex: none; }
.resource-grid .card > p:last-child { margin-bottom: 0; }

.download-list { list-style: none; margin: 0 0 16px; padding: 0; }
.download-list li {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 12px;
    padding: 12px 0; border-bottom: 1px solid var(--gray-200); font-size: .9rem;
}
.download-list li:first-child { border-top: 1px solid var(--gray-200); }
.download-list li > span { flex: 1 1 200px; min-width: 0; }

/* Installation request (/book-online). */
.booking { display: grid; gap: 24px; align-items: start; grid-template-columns: minmax(0, 1fr); }
.booking > * { min-width: 0; }
.booking__form .fieldset:last-of-type { margin-bottom: 16px; }
@media (min-width: 960px) { .booking { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; } }

/* -------------------------------------------------- 15. cart and checkout */
/* Used twice: inside the header drawer (fetched) and on /cart. */
.cart-list { list-style: none; margin: 0 0 18px; padding: 0; }
.cart-item {
    display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px 14px;
    padding: 14px 0; border-bottom: 1px solid var(--gray-200);
}
.cart-item:first-child { border-top: 1px solid var(--gray-200); }
.cart-item__media {
    position: relative; width: 72px; height: 72px; border: 1px solid var(--gray-200); border-radius: 8px;
    background: #fff; overflow: hidden;
}
.cart-item__media picture { position: absolute; inset: 0; }
.cart-item__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.cart-item__body { min-width: 0; }
.cart-item__name { margin: 0 0 2px; font-size: .92rem; font-weight: 700; line-height: 1.3; }
.cart-item__name a { color: var(--ink); }
.cart-item__name a:hover { color: var(--red); text-decoration: none; }
.cart-item__sku { margin: 0 0 4px; font-size: .75rem; color: var(--gray-600); }
.cart-item__price { margin: 0 0 8px; font-size: .82rem; color: var(--gray-700); }
.cart-item__end { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cart-item__end strong { font-size: .95rem; }
.cart-item__end form { margin: 0; }
.cart-item .qty button { width: 34px; min-height: 36px; font-size: 1rem; }
.cart-item .qty input, .cart-item .qty input[type="number"] { width: 42px; min-height: 36px; font-size: .9rem; }

.cart-summary {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    padding: 14px 0; border-top: 2px solid var(--ink); font-size: .95rem;
}
.cart-summary strong { font-size: 1.25rem; }
.cart-note { font-size: .8rem; color: var(--gray-600); margin: 0 0 14px; }
.cart-actions { display: grid; gap: 10px; }
.cart-empty { text-align: center; padding: 36px 12px; color: var(--gray-600); }
.cart-empty > svg { width: 44px; height: 44px; color: var(--gray-300); margin: 0 auto 12px; display: block; }
.cart-empty p { margin: 0 0 8px; }
.cart-empty strong { color: var(--ink); font-size: 1.05rem; }
.cart-empty .btn { margin-top: 8px; }
.cart-aside .totals { margin: 0 0 16px; border-top: 0; }
.cart-aside .cart-note { margin: 14px 0 0; }
.checkout__summary .cart-note { margin: 14px 0 0; text-align: right; }

/* /cart: the lines on the left, a summary card that follows the page on the
   right. One column on a phone, summary last. */
.cart-layout { display: grid; gap: 24px; align-items: start; grid-template-columns: minmax(0, 1fr); }
.cart-layout > * { min-width: 0; }
@media (min-width: 900px) { .cart-layout { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; } }
.cart-page { min-width: 0; }
@media (min-width: 560px) {
    .cart-page .cart-item { grid-template-columns: 88px minmax(0, 1fr) auto; }
    .cart-page .cart-item__media { width: 88px; height: 88px; }
    .cart-page .cart-item__end { grid-column: 3; display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-start; gap: 6px; }
}
.cart-aside { position: static; }
@media (min-width: 900px) { .cart-aside { position: sticky; top: calc(var(--header-h) + 20px); } }
.cart-aside h2 { font-size: 1.1rem; margin: 0 0 12px; }

/* Checkout. Sections are fieldsets, each a card with a numbered legend. They
   are blocks, not flex rows: a flex fieldset put every label and input on one
   line, which gave the form a minimum width of about 770px and made a phone
   lay the whole page out as a desktop. */
.checkout { display: grid; gap: 24px; align-items: start; grid-template-columns: minmax(0, 1fr); }
.checkout > * { min-width: 0; }
@media (min-width: 960px) { .checkout { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; } }
#checkout-form, #checkout-quote { max-width: 760px; min-width: 0; }
/* The short form shown instead of the order form when shipping has to be
   quoted first. Same card, same fields; one legend and no step numbers. */
.checkout-quote__lead { margin: 12px 0 2px; color: var(--gray-700); font-size: .95rem; line-height: 1.55; }
.checkout-quote .btn + .btn { margin-top: 10px; }
.checkout__main { min-width: 0; max-width: 760px; }
.checkout__main > .flash { margin: 0 0 16px; }
.checkout-step {
    display: block; min-width: 0; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
    padding: 16px 16px 20px; margin: 0 0 16px; background: #fff; box-shadow: var(--shadow);
    font-size: .95rem; font-weight: 400; color: var(--ink);
}
@media (min-width: 600px) { .checkout-step { padding: 20px 24px 24px; margin-bottom: 20px; } }
.checkout-step legend {
    display: flex; align-items: center; gap: 10px; padding: 0 8px; margin-left: -8px;
    font-size: 1.02rem; font-weight: 800; color: var(--ink);
}
.checkout-step label:not(.checkbox):not(.radio) {
    display: block; margin: 14px 0 6px; font-size: .8rem; font-weight: 700; color: var(--gray-700); letter-spacing: .02em;
}
.checkout-step > label.checkbox { display: flex; margin: 14px 0; }
/* Twelve columns from a tablet up, so City / State / ZIP share a row and the
   two contact fields sit side by side. One column on a phone. */
.checkout-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 14px; }
.checkout-field { min-width: 0; }
@media (min-width: 600px) {
    .checkout-fields { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .checkout-field { grid-column: span 12; }
    .checkout-field--half, .checkout-field--name, .checkout-field--company,
    .checkout-field--city, .checkout-field--country { grid-column: span 6; }
    .checkout-field--state { grid-column: span 2; }
    .checkout-field--postal-code { grid-column: span 4; }
    #billing-fields .checkout-field--name { grid-column: span 12; }
}
/* "Same as my shipping address": the billing fields fold away. Only when
   JavaScript is there to unfold them again. */
.js #billing-fields[data-collapsed="true"] { display: none; }
/* A shipping or payment choice is a whole row you can press, with the ink
   border on the one that is selected. */
.checkout-step > label.radio {
    display: flex; gap: 12px; align-items: flex-start; margin: 10px 0 0; padding: 14px;
    border: 1.5px solid var(--gray-300); border-radius: var(--radius); cursor: pointer;
}
.checkout-step > label.radio:has(input:checked) { border-color: var(--ink); background: var(--gray-50); }
.checkout-step > label.radio input { accent-color: var(--red); flex: none; margin-top: 3px; }
.radio__body { flex: 1; min-width: 0; }
.radio__body strong { display: block; font-size: .92rem; }
.radio__body .muted { display: block; font-size: .8rem; }
.radio__price { font-weight: 800; white-space: nowrap; }
.checkout-step .btn { margin-top: 18px; width: 100%; min-height: 52px; font-size: 1rem; }
.checkout-step .hint { display: block; margin-top: 6px; }
.checkout-step > .hint:last-child { text-align: center; margin-top: 10px; }
.checkout-step__num {
    display: inline-grid; place-items: center; width: 24px; height: 24px;
    border-radius: 50%; background: var(--ink); color: #fff; font-size: .75rem; font-weight: 700; flex: none;
}
/* Beside the form on a desktop, where it follows the page; above the form on
   a phone, so the first thing on the screen is what is being bought. */
.checkout__summary { position: static; order: -1; }
@media (min-width: 960px) { .checkout__summary { position: sticky; top: calc(var(--header-h) + 20px); order: 0; } }
.checkout__summary h2 { font-size: 1.1rem; margin: 0 0 12px; }
.summary-list { list-style: none; margin: 0 0 14px; padding: 0; }
.summary-list li {
    display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center;
    padding: 10px 0; border-bottom: 1px solid var(--gray-100); font-size: .86rem;
}
.summary-list__media { position: relative; width: 52px; height: 52px; border: 1px solid var(--gray-200); border-radius: 6px; overflow: hidden; background: #fff; }
.summary-list__media picture { position: absolute; inset: 0; }
.summary-list__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.summary-list strong { display: block; line-height: 1.3; }
.summary-list span { color: var(--gray-600); font-size: .78rem; }

/* A coupon champion row: applied code chip beside a one-button removal. The
   form version is .inline-form; this is the outcome of a successful POST. */
.coupon-applied { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 9px 12px; border: 1px dashed var(--gray-300); border-radius: 8px; background: var(--gray-50); font-size: .86rem; }
.coupon-applied__code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .08em; }
.coupon-applied__note { color: var(--gray-600); font-size: .78rem; }
.coupon-applied__invalid .coupon-applied__code { text-decoration: line-through; }
tr[data-discount-row][hidden] { display: none; }

/* Order totals block: a table at checkout, a definition list on the cart. */
dl.totals { margin: 0; }
dl.totals > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; }
dl.totals dt { color: var(--gray-700); }
dl.totals dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.totals { width: 100%; border-top: 1px solid var(--gray-200); margin-top: 16px; font-size: .92rem; }
.totals th, .totals td { padding: 7px 0; text-align: left; font-weight: 400; color: var(--gray-700); border: 0; }
.totals td { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.totals tr:first-child th, .totals tr:first-child td { padding-top: 14px; }
.totals__grand th, .totals__grand td, .totals__grand {
    font-size: 1.1rem; font-weight: 900; color: var(--ink);
}
.totals__grand th, .totals__grand td { border-top: 1px solid var(--gray-200); padding-top: 12px; }
.order-number { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; }
.next-steps { padding-left: 20px; }
.next-steps li { margin-bottom: 8px; }

/* The confirmation after an order or a form: a green tick, then the facts. */
.confirm { text-align: center; padding: 24px 0 8px; }
.confirm__mark {
    width: 72px; height: 72px; border-radius: 50%; background: var(--green-soft); color: var(--green);
    display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.confirm__mark svg { width: 36px; height: 36px; }
.confirm h1 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin: 0 0 8px; }
.confirm p { margin: 0; color: var(--gray-700); }
.confirm__lead { text-align: center; color: var(--gray-600); max-width: 60ch; margin: 12px auto 28px; }
.confirm__notice { max-width: 60ch; margin: 16px auto 0; text-align: left; }
.confirm__receipt { margin-bottom: 20px; }
.confirm__totals { max-width: 340px; margin-left: auto; }
.confirm__next h2 { font-size: 1.1rem; margin: 0 0 10px; }
.confirm__next .next-steps { margin: 0; }

/* ----------------------------------------- 18. dialogs, toast, cookie notice */
/* The quick view dialog is built by assets/js/app.js, so these styles have no
   markup of their own in the templates. */
.quick-view-backdrop {
    position: fixed; inset: 0; z-index: 150; background: rgba(23, 25, 28, .55);
    display: grid; place-items: center; padding: var(--gutter); overflow-y: auto;
}
.quick-view-backdrop[hidden] { display: none; }
.quick-view-dialog {
    position: relative; width: 100%; max-width: 880px; max-height: calc(100vh - 2 * var(--gutter)); overflow: auto;
    background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 20px;
}
@media (min-width: 720px) { .quick-view-dialog { padding: 28px; } }
.quick-view-close { position: absolute; top: 8px; right: 8px; z-index: 2; font-size: 1.4rem; background: #fff; }

/* ---- Lightbox ----------------------------------------------------------
   The viewer for the portfolio photographs. It is built by assets/js/app.js,
   so these styles have no markup of their own in the templates.

   The page stays behind it: the visitor keeps their place in the set, and
   the Back button is not needed to get out of a photograph. */
.lightbox {
    position: fixed; inset: 0; z-index: 200;
    display: grid; place-items: center;
    padding: clamp(10px, 2.5vw, 28px);
}
.lightbox[hidden] { display: none; }
.lightbox__backdrop {
    position: absolute; inset: 0;
    background: rgba(10, 11, 13, .92);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.lightbox__dialog {
    position: relative; z-index: 1;
    width: 100%; max-width: 1280px;
    display: grid; grid-template-rows: auto 1fr; gap: 12px;
    max-height: 100%;
}
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lightbox__counter {
    margin: 0; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
    color: rgba(255, 255, 255, .62);
}
.lightbox__close {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; padding: 0; border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.lightbox__close:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .38); transform: translateY(-1px); }
.lightbox__figure { margin: 0; display: grid; gap: 14px; align-content: center; justify-items: center; min-height: 0; }
.lightbox__image {
    display: block; max-width: 100%;
    max-height: calc(100vh - 190px);
    object-fit: contain;
    border-radius: var(--radius-lg);
    background: #0E1013;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
}
.lightbox__caption {
    max-width: 72ch; text-align: center; font-size: .92rem; line-height: 1.5;
    color: rgba(255, 255, 255, .82);
}
.lightbox__caption[hidden] { display: none; }
.lightbox__nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer;
    transition: background .18s ease, border-color .18s ease;
}
.lightbox__nav:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .4); }
.lightbox__nav--prev { left: 0; }
.lightbox__nav--next { right: 0; }
@media (max-width: 767px) {
    .lightbox { padding: 10px; }
    .lightbox__image { max-height: calc(100vh - 150px); }
    .lightbox__nav { top: auto; bottom: 4px; transform: none; width: 40px; height: 40px; }
    .lightbox__nav--prev { left: 10px; }
    .lightbox__nav--next { right: 10px; }
}

.quick-view { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.quick-view > * { min-width: 0; }
@media (min-width: 720px) { .quick-view { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: start; } }
.quick-view__media {
    position: relative; aspect-ratio: 1 / 1; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
    overflow: hidden; background: #fff;
}
.quick-view__media picture { position: absolute; inset: 0; }
.quick-view__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.quick-view__media > .placeholder { position: absolute; inset: 0; }
.quick-view__body h2 { margin: 0 0 8px; font-size: 1.4rem; padding-right: 36px; }
.quick-view__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.quick-view__actions .btn { flex: 1 1 180px; }

/* Confirmation for actions taken in a grid, where there is no line of text
   nearby to put a message in. */
.toast {
    position: fixed; z-index: 160; left: 50%; bottom: 20px; transform: translate(-50%, 12px);
    background: var(--ink); color: #fff; font-size: .88rem; font-weight: 600;
    padding: 12px 18px; border-radius: var(--radius); box-shadow: var(--shadow-lg);
    width: max-content; max-width: min(92vw, 420px); text-align: center; pointer-events: none;
    opacity: 0; visibility: hidden; transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.toast[data-open="true"] { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .18s ease, transform .18s ease, visibility 0s; }

.cookie-notice {
    position: fixed; z-index: 100; left: 12px; right: 12px; bottom: 12px;
    background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); padding: 12px 14px; display: flex; flex-wrap: wrap;
    gap: 10px 14px; align-items: center; justify-content: space-between;
}
.cookie-notice[hidden] { display: none; }
.cookie-notice p { margin: 0; font-size: .82rem; line-height: 1.45; color: var(--gray-700); flex: 1 1 220px; }
.cookie-notice__actions { display: flex; gap: 8px; flex: none; }
.cookie-notice .btn { flex: none; }
@media (min-width: 768px) { .cookie-notice { left: auto; right: 24px; bottom: 24px; max-width: 520px; padding: 16px 18px; } }

/* ---------------------------------------- 16. sign-in and dealer pages */

/* Sign-in, registration and password screens: the prototype's two halves.
   Ink on the left says who the account is for; the form sits on grey on the
   right, in a card. On a phone the form comes FIRST — somebody who opened
   "Sign in" on a phone wants the two fields, not four bullet points to scroll
   past — and the pitch follows it. */
.auth-wrap { display: grid; grid-template-columns: minmax(0, 1fr); }
.auth-wrap > * { min-width: 0; }
.auth-form {
    order: 1; background: var(--gray-50); padding: 28px var(--gutter) 36px;
    display: flex; align-items: flex-start; justify-content: center;
}
.auth-side {
    order: 2; position: relative; overflow: hidden; background: var(--ink); color: #fff;
    padding: 36px var(--gutter) 40px; display: flex; flex-direction: column; justify-content: center;
}
.auth-side::after {
    content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px;
    border-radius: 50%; background: radial-gradient(circle, rgba(200, 32, 38, .35), transparent 70%); pointer-events: none;
}
.auth-side > * { position: relative; z-index: 1; max-width: 520px; }
.auth-side .eyebrow { color: #F3A1A4; }
.auth-side h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); color: #fff; margin: 0 0 12px; }
.auth-side p { color: #C9CED4; }
.auth-side .checklist { color: #C9CED4; margin-bottom: 0; }
.auth-side .checklist li::before { background-color: rgba(255, 255, 255, .12); }
.auth-side a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.auth-side__foot { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .92rem; }
.auth-side .checklist + .auth-side__foot { margin-top: 18px; }
/* The staff sign-in has no footer under it, so the two halves fill the screen. */
.auth-page { display: flex; flex-direction: column; min-height: 100vh; }
.auth-page .auth-wrap { flex: 1; }
@media (min-width: 900px) {
    .auth-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: calc(100vh - var(--header-h) - 40px); }
    .auth-side { order: 1; padding: 64px; }
    .auth-form { order: 2; padding: 64px; align-items: center; }
    .auth-side > * { margin-left: auto; margin-right: 0; width: 100%; }
}

.auth-card {
    width: 100%; max-width: 460px; background: #fff; border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 24px 20px;
}
.auth-card--wide { max-width: 560px; }
@media (min-width: 600px) { .auth-card { padding: 32px; } }
/* The heading is followed either by a lead paragraph or straight by the form.
   With 6px beneath it the first label sat against the heading. */
.auth-card h1 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); margin: 0 0 18px; }
.auth-card h1 + .auth-card__lead, .auth-card h1 + p:not(.flash):not(.alert) { margin-top: -10px; }
.auth-card__lead { color: var(--gray-600); margin: 0 0 20px; }
/* The sign-in views are bare label/input pairs, written before this layout
   existed; these rules give them the same rhythm as a .field without touching
   seven templates. */
.auth-card form > label:not(.checkbox):not(.radio),
.auth-card .field > label {
    display: block; margin: 0 0 6px; font-size: .8rem; font-weight: 700; color: var(--gray-700); letter-spacing: .02em;
}
.auth-card form > input, .auth-card form > select, .auth-card form > textarea { margin: 0 0 16px; }
.auth-card form > .checkbox { margin: 2px 0 18px; }
/* A hint follows the field it describes and sits close under it (the field
   leaves 16px; this takes 10 of them back). */
.auth-card form > .hint { display: block; margin: -10px 0 16px; }
.auth-card form > .btn, .auth-card form > button.btn { width: 100%; min-height: 48px; font-size: 1rem; }
.auth-card .links { border-top: 1px solid var(--gray-200); padding-top: 18px; margin-top: 22px; }

/* An error page: the status as a quiet watermark, then what happened and the
   ways out, centred under the header. */
.error-page { padding: 48px 0 72px; text-align: center; }
.error-page > .container { max-width: 640px; }
.error-page__code {
    font-size: clamp(4rem, 16vw, 7.5rem); font-weight: 900; line-height: 1; letter-spacing: -.04em;
    color: var(--gray-200); margin: 0 0 8px;
}
.error-page h1 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin: 0 0 12px; }
.error-page p { color: var(--gray-600); margin: 0 auto 24px; max-width: 52ch; }
.error-page .actions { justify-content: center; gap: 10px; }
.error-page__debug {
    text-align: left; margin: 28px 0 0; padding: 14px 16px; overflow-x: auto; font-size: .8rem;
    background: var(--gray-100); border: 1px solid var(--gray-200); border-radius: var(--radius); white-space: pre-wrap;
}
@media (min-width: 900px) { .error-page { padding: 88px 0 112px; } }

/* Dealer programme (/dealer-program): the pitch on ink, the form on grey. */
.dealer-hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; padding: 40px 0 44px; }
.dealer-hero::after {
    content: ""; position: absolute; right: -140px; bottom: -160px; width: 480px; height: 480px;
    border-radius: 50%; background: radial-gradient(circle, rgba(200, 32, 38, .32), transparent 70%); pointer-events: none;
}
.dealer-hero > .container { position: relative; z-index: 1; }
.dealer-hero .eyebrow { color: #F3A1A4; }
.dealer-hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 3rem); max-width: 18ch; margin: 0 0 14px; }
.dealer-hero p { color: #C9CED4; max-width: 62ch; font-size: 1.02rem; margin: 0; }
.dealer-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.dealer-benefits { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); margin-top: 32px; }
@media (min-width: 600px) { .dealer-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1000px) { .dealer-benefits { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dealer-benefit {
    background: var(--graphite); border: 1px solid #3A3F45; border-radius: var(--radius-lg); padding: 20px; min-width: 0;
}
.dealer-benefit .benefit__icon { background: #fff; margin-bottom: 14px; width: 42px; height: 42px; }
.dealer-benefit h3 { color: #fff; font-size: 1rem; margin: 0 0 6px; }
.dealer-benefit p { margin: 0; color: #C9CED4; font-size: .88rem; }
@media (min-width: 900px) { .dealer-hero { padding: 72px 0 76px; } }

.dealer-apply { display: grid; gap: 24px; align-items: start; grid-template-columns: minmax(0, 1fr); }
.dealer-apply > * { min-width: 0; }
@media (min-width: 960px) { .dealer-apply { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 48px; } }
.dealer-apply__intro h2 { margin-bottom: 10px; }
.dealer-apply__intro p { color: var(--gray-600); }
.dealer-apply__status { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--gray-200); font-size: .92rem; }
.dealer-apply .card > form > .checkbox { margin: 4px 0 18px; }
.steps { list-style: none; margin: 20px 0 0; padding: 0; counter-reset: step; display: grid; gap: 14px; }
.steps li { position: relative; padding-left: 40px; counter-increment: step; color: var(--gray-700); }
.steps li::before {
    content: counter(step); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%;
    background: var(--ink); color: #fff; font-size: .78rem; font-weight: 700; display: grid; place-items: center;
}
.steps strong { display: block; color: var(--ink); }

/* An inline "label, field, button" row (application status, coupon, search). */
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline-form .field { flex: 1 1 220px; margin: 0; }
.inline-form .btn { flex: 0 0 auto; }
@media (max-width: 479px) { .inline-form .btn { flex: 1 1 100%; } }

/* ------------------------------------ 17. account and dealer portal */
/* Same tokens as the storefront; these blocks exist because a portal is a
   different shape of page: a sidebar shell, dense data tables, a bulk-order
   grid that has to stay readable at 200 rows, and an invoice that the
   browser's "Save as PDF" must render cleanly. */
.portal { padding: 26px 0 56px; background: var(--gray-50); min-height: 60vh; }
@media (min-width: 900px) { .portal { padding: 40px 0 80px; } }
.portal__grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.portal__grid > * { min-width: 0; }
/* The content column: tables inside it scroll within their own wrapper rather
   than widening the page. */
.portal__main { overflow-wrap: anywhere; }
.portal__main > :first-child { margin-top: 0; }
.portal__head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.portal__head h1, .portal__head h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); }
.portal__head p { margin: 4px 0 0; color: var(--gray-600); }
.portal__head form { margin: 0; }

/* The portal menu is a strip that scrolls sideways on a phone (seven links do
   not wrap into anything readable) and a rail on a desktop. */
.portal__nav {
    display: flex; gap: 4px; margin: 0; padding: 6px; list-style: none;
    background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.portal__nav li { flex: none; }
.portal__nav a {
    display: block; padding: 9px 12px; border-radius: var(--radius); white-space: nowrap;
    font-size: .88rem; font-weight: 600; color: var(--gray-700); text-decoration: none;
}
.portal__nav a:hover { color: var(--ink); background: var(--gray-100); }
.portal__nav a[aria-current="page"] { color: #fff; background: var(--ink); }
@media (min-width: 900px) {
    .portal__grid { grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; }
    .portal__nav { flex-direction: column; overflow: visible; padding: 10px; position: sticky; top: calc(var(--header-h) + 20px); }
    .portal__nav a { white-space: normal; padding: 10px 12px; }
    .portal__nav .portal__nav-end { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--gray-200); }
}

.panel {
    background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
    box-shadow: var(--shadow); padding: 18px 16px; min-width: 0;
}
@media (min-width: 600px) { .panel { padding: 24px; } }
.panel + .panel { margin-top: 20px; }
.panel > :last-child { margin-bottom: 0; }
.panel__head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel__head h2, .panel__head h3 { margin: 0; font-size: 1.1rem; }
.panel__foot { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--gray-200); color: var(--gray-600); font-size: .88rem; }
.panel--muted { background: var(--gray-50); box-shadow: none; }

.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1000px) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
/* Each card measures itself, so the figure in it can be sized to the card
   rather than to the screen: inside a panel on a phone a card is 100px across,
   and "$3,988.99" at full size broke after the first decimal. */
.stat { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 16px 18px; min-width: 0; container-type: inline-size; }
.stat__value { font-size: 1.6rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; overflow-wrap: normal; }
.stat__value { font-size: clamp(.95rem, 15cqi, 1.6rem); }
/* A date in a stat, not an amount: twenty characters do not fit on one line at
   the size of a price, and ran out of the card and off the page on a phone.
   It is smaller and may break, between the date and the time only. */
.stat__value--text { white-space: normal; font-size: clamp(.95rem, 9.5cqi, 1.2rem); line-height: 1.25; letter-spacing: -.01em; }
.stat__value--text > span { white-space: nowrap; }
.stat__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--gray-600); margin-top: 6px; }
.stat--accent { background: var(--red-tint); border-color: #F3B6B9; }

.data-table { width: 100%; font-size: .88rem; }
.data-table th, .data-table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--gray-200); vertical-align: middle; }
.data-table thead th, .data-table th {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-600); font-weight: 700;
    background: var(--gray-50);
}
/* The grand total closes a column of figures: it was drawn as a column
   heading, the smallest and greyest line of the four. */
.data-table .total-row th {
    font-size: 1rem; font-weight: 800; letter-spacing: 0; text-transform: none; color: var(--ink);
    background: none; border-top: 2px solid var(--ink); border-bottom: 0; padding-top: 13px;
}
.data-table tbody th { white-space: nowrap; }
/* The account pages break a long word anywhere (".portal__main": an email
   address in a narrow card). Inherited by a table, that let every column
   shrink to a letter: on a phone an order number read "T / M- / 00 / 00 / 2"
   down the page. Inside a table words stay whole; headings, and every column
   after the first, stay on one line; the first column (a product name) may
   wrap; and whatever still does not fit scrolls inside the wrapper. */
.data-table th, .data-table td { overflow-wrap: normal; word-break: normal; }
.data-table thead th, .data-table td + td, .data-table .nowrap { white-space: nowrap; }
.data-table td.wrap { white-space: normal; }
.data-table tbody tr:hover { background: var(--gray-50); }
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
/* The wrapper scrolls; the table inside keeps its natural width so a phone
   gets a swipeable table rather than five columns crushed to one word each. */
.data-table__wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
/* A column that is detail rather than substance: dropped on a phone so the
   columns that matter fit without scrolling sideways. */
@media (max-width: 599px) {
    .data-table .col-wide { display: none; }
    .data-table { font-size: .82rem; }
    .data-table th, .data-table td { padding: 10px 6px; }
    .data-table thead th { letter-spacing: .04em; }
}
/* 360 is the commonest phone width there is; the date column goes on the
   narrowest (the order itself shows it). */
@media (max-width: 379px) {
    .data-table { font-size: .78rem; }
    .data-table th, .data-table td { padding: 9px 4px; }
}
@media (max-width: 339px) { .data-table .col-mid { display: none; } }
.data-table a { color: var(--ink); font-weight: 700; }
.data-table a:hover { color: var(--red); }

.status {
    display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap;
    background: var(--gray-100); color: var(--gray-700); text-transform: capitalize;
}
.status--paid, .status--completed, .status--approved, .status--delivered { background: var(--green-soft); color: var(--green); }
.status--pending, .status--new, .status--processing, .status--preparing { background: var(--amber-soft); color: var(--amber); }
.status--cancelled, .status--rejected, .status--suspended, .status--failed { background: var(--red-tint); color: var(--red-dark); }
.status--shipped, .status--in_transit, .status--fulfilled { background: var(--blue-soft); color: var(--blue); }

.bulk-grid { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bulk-grid table { min-width: 720px; }
.bulk-grid .qty { width: 84px; }
@media (max-width: 599px) {
    .bulk-grid table { min-width: 0; }
    .bulk-grid .qty { width: 64px; }
}
.bulk-grid td, .bulk-grid th { padding: 8px 10px; }
.bulk-grid__total {
    position: sticky; bottom: 0; background: #fff; border-top: 2px solid var(--ink);
    display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 0;
}
.bulk-grid__total strong { font-size: 1.25rem; }
.bulk-grid__total > div { flex: 1 1 96px; min-width: 0; }
.bulk-grid__total .btn { flex: 0 0 auto; }
.bulk-grid__note { font-size: .8125rem; color: var(--gray-600); line-height: 1.3; }
/* The bar stays on screen while the grid scrolls. Stacked, it took a fifth of
   a phone: there the total and the button share one line. */
@media (max-width: 599px) {
    .bulk-grid__total { gap: 10px; padding: 10px 0; }
    .bulk-grid__total .btn { padding: 10px 14px; font-size: .875rem; }
    .bulk-grid__note { font-size: .75rem; }
}
.bulk-grid__bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.bulk-grid__bar .table-filter { flex: 1 1 300px; max-width: 460px; margin-bottom: 0; }

/* Search box (and sort) above a portal table: one line where there is room. */
.table-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.table-filter input[type="search"] { flex: 1 1 200px; width: auto; min-width: 0; }
.table-filter select { flex: 0 1 200px; width: auto; min-width: 0; }
.table-filter .btn { flex: 0 0 auto; }

/* Quantity + Add in a catalogue row. On a phone the button goes under the box,
   which leaves the product name twice the width. */
.row-add { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
@media (max-width: 599px) {
    .row-add { flex-direction: column; align-items: stretch; width: 68px; margin-left: auto; }
    .row-add .btn { padding-left: 0; padding-right: 0; }
}

.dealer-price { display: flex; flex-direction: column; line-height: 1.25; }
.dealer-price__now { font-weight: 800; }
.dealer-price__was { font-size: .75rem; color: var(--gray-600); text-decoration: line-through; }
.dealer-price__save { font-size: .75rem; color: var(--green); font-weight: 700; }

.a-statusbar__actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* Order progress (FR-212). A row on wide screens, a list on a phone, where
   four across is unreadable at 320px. */
.progress-strip { border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 16px; background: #fff; }
.progress-strip + .stat-grid { margin-top: 16px; }
.progress-strip__steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 600px) { .progress-strip__steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; } }
.progress-strip__step { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--gray-600); min-width: 0; }
.progress-strip__dot {
    flex: none; width: 24px; height: 24px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--gray-300); background: #fff; color: var(--gray-600);
    font-size: .72rem; font-weight: 700;
}
.progress-strip__step.is-done .progress-strip__dot { background: var(--green); border-color: var(--green); color: #fff; }
.progress-strip__step.is-done { color: var(--ink); }
.progress-strip__step.is-current .progress-strip__dot { border-color: var(--red); color: var(--red); box-shadow: 0 0 0 4px var(--red-tint); }
.progress-strip__step.is-current .progress-strip__label { font-weight: 700; color: var(--ink); }
.progress-strip__note { margin: 14px 0 0; font-size: .82rem; color: var(--gray-600); }
.progress-strip__halted { margin: 0; font-size: .9rem; }
.progress-strip__halted--cancelled { color: var(--red-dark); }
.progress-strip__halted--on_hold { color: var(--amber); }

.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--gray-200); }
.timeline li { position: relative; padding: 0 0 16px 14px; }
.timeline li::before {
    content: ""; position: absolute; left: -25px; top: 6px; width: 10px; height: 10px;
    border-radius: 50%; background: var(--red); border: 2px solid #fff;
}
.timeline__when { font-size: .75rem; color: var(--gray-600); }
.timeline__what { font-weight: 600; }

.thread { display: grid; gap: 12px; }
.note { border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 12px 14px; background: #fff; min-width: 0; }
.note--admin { background: var(--gray-50); }
.note--internal { border-style: dashed; background: #FFFDF5; }
.note__meta { font-size: .75rem; color: var(--gray-600); display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.note__body { white-space: pre-wrap; margin: 0; }

.address-card { border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 16px; background: #fff; min-width: 0; }
.address-card__label { font-weight: 800; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.address-list { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .address-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.invoice-print { max-width: 900px; margin: 0 auto; padding: 32px 0; }
.invoice-print__head {
    display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
    border-bottom: 2px solid var(--ink); padding-bottom: 16px; margin-bottom: 20px;
}
.invoice-print__totals { margin-left: auto; width: 100%; max-width: 320px; }
.invoice-print .data-table th { background: transparent; }

/* ---------------------------------------------------------------- 19. print */
@media print {
    .no-print, .header, .announcement, .footer, .drawer, .drawer-backdrop, .cookie-notice, .toast, .skip-link { display: none !important; }
    body { background: #fff; }
    .portal { background: #fff; padding: 0; }
    a { color: inherit; text-decoration: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* The two controls above a printable invoice; never printed. */
.print-bar { display: flex; justify-content: center; gap: 10px; margin: 16px 0 0; }

/* ------------------------------------------------------- spacing utilities */
/* Last in the sheet on purpose. They are one class, like the components they
   are added to, so a tie is settled by order: declared early, "mt-lg" on a
   ".section__head" lost to that rule's own margin and did nothing. */
.mt-0 { margin-top: 0; }
.mt-md { margin-top: 24px; }
.mt-lg { margin-top: 40px; }
.mb-0 { margin-bottom: 0; }

/* Inventor story, installation resources and assistant */
.inventor-layout{display:grid;grid-template-columns:minmax(220px, .8fr) 1.2fr;gap:clamp(2rem,6vw,6rem);padding-top:4rem;padding-bottom:5rem;align-items:start}
.inventor-photo{background:#181818;color:#fff}.inventor-photo img{display:block;width:100%;height:auto}.inventor-photo p{padding:1.2rem 1.5rem;margin:0;font-weight:700}.inventor-photo span{font-size:.85rem;color:#bbb;font-weight:400}.inventor-story h2{margin-top:0}.inventor-story h2:not(:first-child){margin-top:2rem}.inventor-eyebrow{color:#c82026;text-transform:uppercase;letter-spacing:.12em;font-size:.78rem;font-weight:800}.instruction-download{margin:2rem 0}.instruction-chart{display:block;max-width:100%;height:auto;margin-top:1.5rem}
@media(max-width:700px){.inventor-layout{grid-template-columns:1fr;padding-top:2rem;gap:2rem}.inventor-photo{max-width:440px}}

/* ------------------------------------------------------- 20. the assistant */
/* The assistant in the corner of every page.

   It is a panel, not a popover: the page keeps its place behind it, the
   conversation is read from top to bottom, and the answer is followed by the
   pages it was drawn from. Everything here is drawn by the stylesheet; the
   behaviour is in assets/js/chat.js.

   The shape follows the approved reference: a black head with a red kicker
   over the title, a short line saying where the answers come from, the
   conversation, the field with a red Send button, and a row of small print
   under it. The floating button is a black pill that says what it does and
   breathes at the edge of the page. */
.tm-chat {
    position: fixed; right: 20px; bottom: 20px; left: 20px; z-index: 90;
    display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
    font-size: .9rem; line-height: 1.5;
    /* The container spans the width between the margins so that the panel can
       be measured against the space it really has. `100vw` is no use for that:
       it counts the browser's scrollbar, so a panel sized with it is wider
       than the screen by exactly the width of the scrollbar and hangs off
       the left edge. The container takes no clicks of its own — the panel
       and the button do. */
    pointer-events: none;
}
.tm-chat__panel, .tm-chat__toggle { pointer-events: auto; }

/* The button in the corner. Black, because the head of the panel is black
   and the two are one object; it pulses, because a button that sits still
   in the corner of every page is a button nobody presses. */
.tm-chat__toggle {
    display: inline-flex; align-items: center; gap: 10px; flex: none;
    border: 0; border-radius: 999px; cursor: pointer;
    background: var(--ink); color: #fff;
    padding: 11px 20px 11px 13px; font: inherit; font-weight: 700; font-size: .92rem;
    box-shadow: 0 8px 24px rgba(24, 24, 24, .3);
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
    animation: tm-chat-pulse 2.6s ease-out infinite;
}
.tm-chat__toggle:hover { background: #000; transform: translateY(-1px); box-shadow: 0 12px 30px rgba(24, 24, 24, .36); }
.tm-chat__toggle:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
/* The mark sits in a ring of its own, the way the reference draws it. */
.tm-chat__toggle-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; flex: none; border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, .55);
}
.tm-chat__toggle-icon .icon { width: 16px; height: 16px; }
/* The words stay on one line: a button that wraps says two things at once. */
.tm-chat__toggle-label { white-space: nowrap; }
/* Once the panel is open the button has done its job — a pulse behind an
   open conversation is noise, not a hint. */
.tm-chat__toggle[aria-expanded="true"] { animation: none; }
@keyframes tm-chat-pulse {
    0%   { box-shadow: 0 8px 24px rgba(24, 24, 24, .3), 0 0 0 0 rgba(200, 32, 38, .5); }
    70%  { box-shadow: 0 8px 24px rgba(24, 24, 24, .3), 0 0 0 14px rgba(200, 32, 38, 0); }
    100% { box-shadow: 0 8px 24px rgba(24, 24, 24, .3), 0 0 0 0 rgba(200, 32, 38, 0); }
}
@media (prefers-reduced-motion: reduce) { .tm-chat__toggle { animation: none; } }

/* The panel itself. */
.tm-chat__panel {
    width: min(384px, 100%);
    height: min(520px, calc(100vh - 150px));
    display: flex; flex-direction: column; overflow: hidden;
    background: #fff; color: var(--ink);
    border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.tm-chat__panel[hidden] { display: none; }

/* The head: a black bar, a red kicker over the title, and the close
   button. The kicker is a lighter red than the brand's, because the brand
   red on black is not legible at this size. */
.tm-chat__head {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 15px 16px 14px; background: var(--ink); color: #fff;
}
.tm-chat__headings { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 2px; }
.tm-chat__kicker {
    font-size: .66rem; font-weight: 700; letter-spacing: .16em;
    text-transform: uppercase; color: #F2545A;
}
.tm-chat__title { font-size: 1.05rem; font-weight: 700; line-height: 1.25; }
.tm-chat__close {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; padding: 0; border: 0; border-radius: 999px;
    background: transparent; color: #fff; cursor: pointer;
    transition: background .18s ease;
}
.tm-chat__close:hover { background: rgba(255, 255, 255, .18); }
.tm-chat__close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tm-chat__close .icon { width: 17px; height: 17px; }

/* Two sentences, above the conversation: the visitor should know what the
   answers are before they ask, not afterwards. */
.tm-chat__intro {
    margin: 0; padding: 13px 16px 0;
    font-size: .78rem; line-height: 1.55; color: var(--gray-600);
}

/* The conversation. */
.tm-chat__messages {
    flex: 1; overflow-y: auto; overscroll-behavior: contain;
    padding: 14px 16px; background: #fff;
    display: flex; flex-direction: column; gap: 12px;
}
.tm-chat__row { display: flex; gap: 8px; align-items: flex-start; }
/* The assistant's row is the default one, and it is named so that the two
   sides read symmetrically in the stylesheet: a change to the visitor's row
   cannot quietly move the assistant's. */
.tm-chat__row--bot { justify-content: flex-start; }
.tm-chat__row--user { justify-content: flex-end; align-items: flex-end; }
/* A grey block of text, the way the reference draws it. No mark beside it:
   the panel's own head says who is talking. */
.tm-chat__bubble {
    max-width: 88%; padding: 13px 15px;
    background: var(--gray-100); border: 0;
    border-radius: 12px;
}
.tm-chat__row--user .tm-chat__bubble {
    background: var(--red-tint); border-radius: 12px;
}
.tm-chat__text { margin: 0; color: var(--ink); font-size: .88rem; white-space: pre-wrap; overflow-wrap: anywhere; }

/* The pages an answer came from. */
.tm-chat__sources { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tm-chat__sources a {
    display: inline-block; padding: 4px 10px;
    border: 1px solid var(--gray-200); border-radius: 999px;
    background: #fff; color: var(--ink);
    font-size: .74rem; font-weight: 600; text-decoration: none;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.tm-chat__sources a:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* The suggested questions under the opening message: short labels, because a
   row of long questions wraps into a block of text. */
.tm-chat__chips { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tm-chat__chips[hidden] { display: none; }
.tm-chat__chips button {
    border: 1px solid var(--gray-300); border-radius: 999px; background: #fff; color: var(--ink);
    padding: 6px 13px; font: inherit; font-size: .78rem; cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.tm-chat__chips button:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.tm-chat__chips button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* The three dots that say the answer is on its way. */
.tm-chat__bubble--typing { padding: 15px 17px; }
.tm-chat__dots { display: inline-flex; gap: 4px; }
.tm-chat__dots i {
    width: 6px; height: 6px; border-radius: 999px; background: var(--gray-300);
    animation: tm-chat-dot 1.1s infinite ease-in-out;
}
.tm-chat__dots i:nth-child(2) { animation-delay: .15s; }
.tm-chat__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes tm-chat-dot {
    0%, 60%, 100% { transform: translateY(0); opacity: .45; }
    30% { transform: translateY(-3px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .tm-chat__dots i { animation: none; } }

/* The field and the Send button. The rules the site gives every input are
   attribute selectors, and an input with no type attribute matches none of
   them — which is why the type is written out on the element and these rules
   exist here at all. */
.tm-chat__form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--gray-200); background: #fff; }
.tm-chat__form input {
    flex: 1 1 auto; min-width: 0;
    width: 100%; max-width: 100%;
    padding: 11px 13px; min-height: 44px;
    border: 1.5px solid var(--gray-300); border-radius: 6px;
    background: #fff; color: var(--ink);
    font-size: 16px; line-height: 1.3;
    transition: border-color .15s ease, box-shadow .15s ease;
}
@media (min-width: 900px) { .tm-chat__form input { font-size: 15px; } }
.tm-chat__form input::placeholder { color: var(--gray-600); }
.tm-chat__form input:focus {
    outline: 0; background: #fff;
    border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23, 25, 28, .1);
}
.tm-chat__send {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    padding: 0 18px; min-height: 44px; border: 0; border-radius: 6px;
    background: var(--red); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
    transition: background .18s ease;
}
.tm-chat__send:hover { background: var(--red-dark); }
.tm-chat__send:disabled { opacity: .5; cursor: default; }
.tm-chat__send:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* The small print under the field: start again, who built the assistant,
   and the way to reach a person instead of an assistant. The credit takes a
   line of its own, so that "Talk to our team" never ends up wrapped away
   from the right-hand edge it belongs on. */
.tm-chat__links {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 4px 10px;
    padding: 0 16px 13px; background: #fff;
}
.tm-chat__clear {
    order: 1;
    padding: 3px 0; border: 0; background: none; color: var(--gray-600);
    font: inherit; font-size: .74rem; cursor: pointer;
    transition: color .16s ease;
}
.tm-chat__clear:hover { color: var(--ink); text-decoration: underline; }
.tm-chat__clear:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 4px; }
.tm-chat__team {
    order: 2;
    font-size: .76rem; font-weight: 700; color: var(--red); text-decoration: none;
    white-space: nowrap; display: inline-flex; align-items: center; gap: 2px;
}
.tm-chat__team:hover { color: var(--red-dark); text-decoration: underline; }
.tm-chat__team:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 4px; }
.tm-chat__arrow { display: inline-flex; align-items: center; }
.tm-chat__arrow .icon { width: 13px; height: 13px; stroke-width: 2.2; }
.tm-chat__credit {
    order: 3; flex: 0 0 100%; text-align: center;
    font-size: .66rem; color: var(--gray-600); text-decoration: none;
}
.tm-chat__credit:hover { color: var(--ink); text-decoration: underline; }
.tm-chat__credit:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 4px; }

@media (max-width: 700px) {
    .tm-chat { right: 10px; bottom: 10px; left: 10px; }
    /* The panel takes the width of the phone and the height of what the
       browser is actually showing: dvh is the viewport with the address bar
       and the on-screen keyboard taken out of it, and vh is neither. The
       second line is for the browsers that do not know dvh yet. */
    .tm-chat__panel { width: 100%; height: min(70vh, 520px); height: min(70dvh, 520px); }
    /* A phone is narrow, so the bubble takes more of the width and the
       suggested questions are asked in fewer words. */
    .tm-chat__messages { padding: 12px; }
    /* The scroll bar is hidden here: the panel runs to the edge of the
       screen, and a bar drawn inside it looks like a part of the panel
       that has gone wrong. */
    .tm-chat__messages { scrollbar-width: none; -ms-overflow-style: none; }
    .tm-chat__messages::-webkit-scrollbar { display: none; }
    .tm-chat__bubble { max-width: 94%; }
    .tm-chat__chips button { font-size: .74rem; padding: 5px 10px; }
    .tm-chat__intro { padding: 12px 12px 0; }
    .tm-chat__form { padding: 10px 12px; }
    .tm-chat__links { padding: 0 12px 12px; }
    /* The button keeps its words on a phone too: a visitor who never opens
       the panel should still be able to read what the corner of the screen
       is offering. It is smaller here, so that a pill with words in it does
       not lie across the foot of the page. */
    .tm-chat__toggle { padding: 10px 16px 10px 10px; font-size: .84rem; gap: 8px; }
    .tm-chat__toggle-icon { width: 26px; height: 26px; }
    .tm-chat__toggle-icon .icon { width: 15px; height: 15px; }
}

/* The cookie notice sits at the foot of the window, so the assistant steps
   above it while it is there rather than under it. */
body:has([data-cookie-notice]:not([hidden])) .tm-chat { bottom: 136px; }
@media (min-width: 768px) { body:has([data-cookie-notice]:not([hidden])) .tm-chat { bottom: 150px; } }
/* The notice floats over the foot of the page, so while it is up the footer
   is given room to keep its last line — the attribution — clear of it. */
body:has([data-cookie-notice]:not([hidden])) .footer { padding-bottom: 150px; }
@media (min-width: 768px) { body:has([data-cookie-notice]:not([hidden])) .footer { padding-bottom: 128px; } }

/* Dealer dashboard: pair short panels on wide screens so the page reads as a
   dashboard rather than one long column. Long tables stay full width. */
.portal-dash__cols { display: grid; gap: 20px; margin-top: 20px; }
.portal-dash__cols > .panel { margin-top: 0; }
.portal-dash__cols + .panel { margin-top: 20px; }
@media (min-width: 900px) {
    .portal-dash__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
