/* ==========================================================================
   torqueworks — "Clean Industrial Garage" brand layer over modern-retail.

   Ported from the Google Stitch export
   (docs/templates/pending/stitch_27_torqueworks_e_commerce_interface — the
   "TorqueWorks Industrial Core" DESIGN.md is the design-system source). The
   design system: a graphite near-black canvas, Signal Orange reserved for
   CTAs / critical accents, steel-grey hairline dividers instead of shadows
   ("Hairline Precision"), a 45° orange/graphite hazard-stripe trim on
   promo tiles, heavy uppercase italic Poppins headlines ("stamped metal")
   and a minimal 4px corner radius ("machined, not pointy").

   This stylesheet has two jobs:
     (a) style torqueworks' OWN sections (tw-* — featured, info-cards,
         stocked, cats, journal head, newsletter);
     (b) restyle the INHERITED `mr-*` surfaces — chiefly by re-pointing the
         base neutral tokens at the graphite palette and drawing the hairline
         structure. This is the only reason shop / PDP / cart / checkout /
         account / blog turn dark without a single page override.

   Everything is scoped under `body.tw-theme` and reads the 5 customizer
   tokens (--bs-primary, --bs-primary-rgb, --ll-accent, --ll-font-headings,
   --ll-font-body, --ll-btn-radius) with theme.json-default fallbacks, so the
   customizer + live preview keep working: change the primary colour and
   every orange surface follows.

   Contrast decisions (approximate WCAG ratios, checked against the palette):
     - Signal Orange #f26419 as TEXT measures ~5.9:1 on the #111317 canvas
       and ~5.6:1 on the lifted bands — clears AA-normal, so orange keyline
       links / prices / active states are safe. On the #2a2e35 carbon card it
       is ~4.3:1, used there only for BOLD/large price type (3:1 floor).
     - White on an orange FILL is ~3.2:1 (fails AA-normal) — the export
       itself prints GRAPHITE on orange buttons (text-graphite, ~5.6:1), so
       --tw-ink-on-fill is the graphite literal and every base rule that
       hardcodes #fff over a --bs-primary fill is re-inked below (the
       light-primary guard block — see gotchas "pulse, 2026-07-22").
   ========================================================================== */

body.tw-theme {
    /* Customizer-driven brand tokens (fallbacks match theme.json defaults) */
    --tw-orange: var(--bs-primary, #f26419);
    --tw-orange-rgb: var(--bs-primary-rgb, 242, 100, 25);
    --tw-tint: var(--ll-accent, #ffb597);
    --tw-font-head: var(--ll-font-headings, "Poppins"), system-ui, -apple-system, sans-serif;
    --tw-font-body: var(--ll-font-body, "Inter"), system-ui, -apple-system, sans-serif;

    /* Industrial Core palette (DESIGN.md YAML surface ramp + prose motifs).
       Canvas/surfaces/ink are literals by design (CLAUDE.md: never bind
       structural ink to a customizer token — there is no "ink" or "canvas"
       slot in the 5-token contract). */
    --tw-canvas: #111317;          /* surface / background */
    --tw-graphite: #17191d;        /* DESIGN.md "Graphite" — announce, on-fill ink */
    --tw-surface-low: #1a1c20;     /* surface-container-low — lifted bands */
    --tw-surface: #1e2024;         /* surface-container — trust strip */
    --tw-surface-high: #282a2e;    /* surface-container-high — dropdown hover */
    --tw-surface-highest: #333539; /* surface-container-highest — header */
    --tw-carbon: #2a2e35;          /* DESIGN.md "Carbon" — cards, tiles */
    --tw-media-bg: #0c0e12;        /* surface-container-lowest — card media, footer */
    --tw-field-bg: #0e1012;        /* DESIGN.md "Input Fields darker than the background" */
    --tw-ink: #e2e2e8;             /* on-surface — primary text */
    --tw-muted: #bec7d2;           /* secondary — supporting text */
    --tw-soft: #9aa3ad;            /* DESIGN.md "Steel Grey" — metadata, placeholders */
    --tw-warm: #e1bfb2;            /* on-surface-variant — nav / trust labels */
    /* Text printed on an orange FILL (buttons, badges, chips). The export's
       own choice (text-graphite) — ~5.6:1 on #f26419. */
    --tw-ink-on-fill: #17191d;

    /* Hairline structure — DESIGN.md "1px Steel Grey at 20% opacity" for
       standard outlines; the warm brown outline-variant frames the header/
       footer chrome; Signal Orange marks active/hover keylines. */
    --tw-line: rgba(154, 163, 173, 0.2);
    --tw-line-warm: #594138;
    --tw-line-strong: var(--tw-orange);

    /* Re-point the inherited base neutrals at the graphite palette so every
       inherited mr-* surface (bands, borders, fills, muted text) follows. */
    --mr-ink: var(--tw-ink);
    --mr-muted: var(--tw-muted);
    --mr-soft: var(--tw-soft);
    --mr-surface: var(--tw-canvas);
    --mr-band: var(--tw-surface-low);
    --mr-band-alt: var(--tw-surface);
    --mr-fill: var(--tw-surface-high);
    --mr-border: var(--tw-line);
    --mr-border-strong: var(--tw-line-strong);
    --mr-radius: 0.25rem;
    --mr-gold: var(--tw-orange);
    --mr-shadow: none;

    background-color: var(--tw-canvas);
    color: var(--tw-ink);
    font-family: var(--tw-font-body);
    font-size: 16px;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Bootstrap dark-surface tokens (the --mr-* re-point above covers every
   inherited mr-* surface, but Bootstrap's OWN components read Bootstrap's
   OWN custom properties, which nothing above ever touches: the quick-view
   modal's .modal-content, storefront::shared/reviews.blade.php's "Write a
   review" .card, and storefront::shared/product-facets.blade.php's
   h6.bg-light facet headings. None of these partials are theme-owned
   (CLAUDE.md: themes physically cannot fork them), so the only fix
   available here is re-pointing the Bootstrap tokens they read.
   Ink #e2e2e8 on --tw-surface-low #1a1c20 ≈ 13.9:1 — clears AA widely. --- */
body.tw-theme {
    --bs-body-bg: var(--tw-canvas);
    --bs-body-color: var(--tw-ink);
    --bs-modal-bg: var(--tw-surface-low);
    --bs-modal-color: var(--tw-ink);
    --bs-card-bg: var(--tw-surface-low);
    --bs-card-color: var(--tw-ink);
    --bs-secondary-bg: var(--tw-surface);
    --bs-tertiary-bg: var(--tw-surface-low);
    --bs-emphasis-color: var(--tw-ink);
    --bs-border-color: var(--tw-line);
    /* .bg-light reads --bs-light-rgb — #1a1c20 (--tw-surface-low) as r,g,b. */
    --bs-light-rgb: 26, 28, 32;
}

body.tw-theme .modal-content {
    background-color: var(--tw-surface-low);
    color: var(--tw-ink);
}

body.tw-theme .card {
    background-color: var(--tw-surface-low);
    color: var(--tw-ink);
    border-color: var(--tw-line);
}

body.tw-theme .bg-light {
    /* Bootstrap's own rule carries !important on this declaration; match it
       rather than relying solely on the --bs-light-rgb re-point above. */
    background-color: var(--tw-surface-low) !important;
}

/* --------------------------------------------------------------------------
   Shape discipline — DESIGN.md: minimal 4px radius on buttons/cards/inputs,
   ZERO drop shadows (depth = tonal layers + 1px outlines). Badges are the
   exception: "small, rectangular tags with 0px or 2px radius".
   -------------------------------------------------------------------------- */
body.tw-theme .mr-card,
body.tw-theme .mr-card__media,
body.tw-theme .mr-promo,
body.tw-theme .mr-article__media,
body.tw-theme .dropdown-menu {
    box-shadow: none !important;
    border-radius: 0.25rem;
}

body.tw-theme .mr-card__badge {
    /* Beats the 999px pill the shared theme-vars stylesheet gives badges —
       DESIGN.md is explicit that tags are rectangular. */
    border-radius: 2px !important;
}

/* --------------------------------------------------------------------------
   Typography — Poppins Bold, strictly uppercase (+ the export's italic
   racing slant on display headings); Inter for body/UI/prices.
   -------------------------------------------------------------------------- */
body.tw-theme h1,
body.tw-theme h2,
body.tw-theme h3,
body.tw-theme h4,
body.tw-theme h5,
body.tw-theme h6,
body.tw-theme .mr-display,
body.tw-theme .mr-logo {
    font-family: var(--tw-font-head);
    font-weight: 700;
    color: var(--tw-ink);
    letter-spacing: 0.02em; /* DESIGN.md headline-lg/xl: 0.02em */
}

body.tw-theme .mr-display {
    font-size: clamp(2rem, 3.4vw, 3.5rem);
    line-height: 1.1;
}

/* h2.mr-display is used ONLY for section headings plus the quick-view
   modal's product-name heading; h1.mr-display is the PDP/category page
   TITLE. DESIGN.md headlines are uppercase italic, but forcing that onto
   h1.mr-display would uppercase real product/category names — so only h2
   gets the stamped-metal treatment (circuit precedent). --------------------- */
body.tw-theme h2.mr-display {
    text-transform: uppercase;
    font-style: italic;
}

body.tw-theme .mr-eyebrow,
body.tw-theme .tw-eyebrow {
    font-family: var(--tw-font-body);
    /* DESIGN.md label-caps: Inter 600 / 12px / 0.08em, uppercase. */
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tw-orange);
}

/* A quiet tracked keyline link ("VIEW ALL PARTS") */
body.tw-theme .tw-keyline-link {
    font-family: var(--tw-font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tw-orange);
    text-decoration: none;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--tw-orange);
    transition: border-color 0.25s ease, color 0.25s ease;
}

body.tw-theme .tw-keyline-link:hover {
    color: var(--tw-ink);
    border-bottom-color: var(--tw-ink);
}

/* Section heading devices: the orange left rule (Workshop Bestsellers) and
   the leading orange dash (Just Stocked). */
body.tw-theme .tw-rule-heading {
    border-left: 4px solid var(--tw-orange);
    padding-left: 1rem;
}

body.tw-theme .tw-dash-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
}

body.tw-theme .tw-dash {
    display: inline-block;
    width: 3rem;
    height: 2px;
    background-color: var(--tw-orange);
    flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
   Buttons & form controls — solid Signal Orange fill with GRAPHITE text
   (the export's own on-fill ink), white on hover; ghost buttons keyline
   orange with a 10% orange wash on hover. No gradients.
   -------------------------------------------------------------------------- */
body.tw-theme .mr-btn,
body.tw-theme .tw-btn {
    font-family: var(--tw-font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 1rem 2.5rem;
    border: 1px solid transparent;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

body.tw-theme .mr-btn--primary,
body.tw-theme .btn-primary {
    background-color: var(--tw-orange);
    border-color: var(--tw-orange);
    color: var(--tw-ink-on-fill);
}

body.tw-theme .mr-btn--primary:hover,
body.tw-theme .mr-btn--primary:focus,
body.tw-theme .btn-primary:hover,
body.tw-theme .btn-primary:focus,
body.tw-theme .btn-primary:active {
    /* Export: hover:bg-white on the orange CTA. */
    background-color: #ffffff;
    border-color: #ffffff;
    color: var(--tw-ink-on-fill);
    filter: none;
}

/* Ghost button ("SHOP DETAILING") — 1px orange keyline, orange text, 10%
   orange wash on hover (export hover:bg-signal-orange/10). */
body.tw-theme .mr-btn--outline,
body.tw-theme .mr-btn--on-dark,
body.tw-theme .tw-btn {
    background-color: transparent;
    border-color: var(--tw-orange);
    color: var(--tw-orange);
}

body.tw-theme .mr-btn--outline:hover,
body.tw-theme .mr-btn--on-dark:hover,
body.tw-theme .tw-btn:hover {
    background-color: rgba(var(--tw-orange-rgb), 0.1);
    color: var(--tw-tint);
    border-color: var(--tw-tint);
}

body.tw-theme .mr-btn--light {
    background-color: var(--tw-ink);
    color: var(--tw-graphite);
}

body.tw-theme .mr-btn--light:hover {
    background-color: #ffffff;
    color: var(--tw-graphite);
}

/* DESIGN.md: inputs darker than the background (#0E1012) with a 1px steel
   border; on focus the border turns Signal Orange with a subtle glow. */
body.tw-theme .form-control,
body.tw-theme .form-select {
    background-color: var(--tw-field-bg);
    border: 1px solid rgba(154, 163, 173, 0.35);
    color: var(--tw-ink);
}

/* Bootstrap's caret is a background-image with a hard-coded dark stroke
   (#343a40) — invisible on this near-black field. Re-draw it in ink, and
   keep the 2.25rem caret gutter (never a padding shorthand here). */
body.tw-theme .form-select {
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23e2e2e8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    padding-inline-end: 2.25rem;
}

body.tw-theme .form-control::placeholder {
    color: var(--tw-soft);
}

body.tw-theme .form-control:focus,
body.tw-theme .form-select:focus {
    background-color: var(--tw-field-bg);
    border-color: var(--tw-orange);
    color: var(--tw-ink);
    box-shadow: 0 0 4px rgba(var(--tw-orange-rgb), 0.55) !important;
}

body.tw-theme .dropdown-menu {
    background-color: var(--tw-carbon);
    border: 1px solid var(--tw-line-warm);
}

body.tw-theme .dropdown-item {
    color: var(--tw-warm);
}

body.tw-theme .dropdown-item:hover,
body.tw-theme .dropdown-item:focus {
    background-color: var(--tw-surface-high);
    color: var(--tw-orange);
}

body.tw-theme .offcanvas {
    background-color: var(--tw-canvas);
    color: var(--tw-ink);
}

body.tw-theme .btn-close {
    filter: invert(1) grayscale(1) brightness(1.6);
}

body.tw-theme .mr-divider {
    border-color: var(--tw-line);
}

/* --------------------------------------------------------------------------
   Announcement band + header — graphite strip over a lifted, blurred
   surface-highest bar framed by the warm outline hairline.
   -------------------------------------------------------------------------- */
body.tw-theme .mr-announce {
    background-color: var(--tw-graphite);
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

body.tw-theme .mr-header {
    background-color: rgba(51, 53, 57, 0.95);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--tw-line-warm);
}

body.tw-theme .mr-logo {
    font-family: var(--tw-font-head);
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tw-ink);
}

body.tw-theme .mr-nav-link {
    font-family: var(--tw-font-body);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tw-warm);
}

body.tw-theme .mr-nav-link:hover,
body.tw-theme .mr-nav-link.is-active {
    color: var(--tw-tint);
}

body.tw-theme .mr-icon-btn {
    color: var(--tw-ink);
}

body.tw-theme .mr-icon-btn:hover {
    color: var(--tw-orange);
}

body.tw-theme .mr-search input {
    background-color: var(--tw-field-bg);
    border: 1px solid var(--tw-line-warm);
    color: var(--tw-ink);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.tw-theme .mr-search input::placeholder {
    color: var(--tw-soft);
}

body.tw-theme .mr-search input:focus {
    background-color: var(--tw-field-bg);
    border-color: var(--tw-orange);
    box-shadow: none;
}

body.tw-theme .mr-search button:hover {
    color: var(--tw-orange);
}

/* --------------------------------------------------------------------------
   Light-primary guard block — base rules that FILL with --bs-primary
   (Signal Orange here) and hard-code #fff text on top (~3.2:1, fails AA).
   Re-ink them all with the graphite on-fill pair the export's own buttons
   use (~5.6:1). See gotchas "A LIGHT primary_color breaks ~12 inherited
   base rules".
   -------------------------------------------------------------------------- */
body.tw-theme .mr-badge,
body.tw-theme .mr-page.is-active,
body.tw-theme .mr-step.is-done .mr-step__dot,
body.tw-theme .mr-acct-avatar,
body.tw-theme .mr-acct-link.is-active,
body.tw-theme .mr-rail-btn:hover,
body.tw-theme .mr-social:hover {
    color: var(--tw-ink-on-fill);
}

/* --------------------------------------------------------------------------
   Hero (inherited markup — full-bleed image + overlay + copy). The overlay
   is RE-TINTED in graphite, never removed — it is the only thing keeping
   the white <h1> readable over an arbitrary merchant photo.
   -------------------------------------------------------------------------- */
body.tw-theme .mr-hero__overlay {
    background: linear-gradient(90deg, rgba(17, 19, 23, 0.85) 0%, rgba(17, 19, 23, 0.55) 46%, rgba(17, 19, 23, 0.25) 100%);
}

body.tw-theme .mr-hero__copy h1,
body.tw-theme .mr-hero__copy .mr-display {
    color: #ffffff;
    text-transform: uppercase;
    font-style: italic;
}

/* The export's hero eyebrow ("SERVICE SEASON") is an orange CHIP with
   graphite text, not tracked orange type. */
body.tw-theme .mr-hero .mr-hero__copy .mr-eyebrow {
    display: inline-block;
    background-color: var(--tw-orange);
    color: var(--tw-ink-on-fill);
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    border-radius: 2px;
}

/* --------------------------------------------------------------------------
   Trust strip (inherited) — hairline-separated uppercase micro-labels.
   -------------------------------------------------------------------------- */
body.tw-theme .mr-trust {
    color: var(--tw-soft);
}

body.tw-theme .mr-trust strong {
    font-family: var(--tw-font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--tw-warm);
}

body.tw-theme .mr-trust span {
    color: var(--tw-soft);
    font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Promo tiles — dimmed carbon photo tiles behind the 45° hazard trim, the
   frame snapping to Signal Orange on hover.
   -------------------------------------------------------------------------- */
body.tw-theme .mr-promo {
    position: relative;
    background-color: var(--tw-carbon);
    border: 1px solid var(--tw-line-warm);
    transition: border-color 0.3s ease;
}

body.tw-theme .mr-promo::before {
    /* DESIGN.md "Hazard Trim" — a 4px 45° orange/graphite stripe along the
       tile's top edge. Decorative theme identity. */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    z-index: 2;
    background: repeating-linear-gradient(-45deg, var(--tw-orange), var(--tw-orange) 10px, var(--tw-graphite) 10px, var(--tw-graphite) 20px);
}

body.tw-theme .mr-promo:hover {
    border-color: var(--tw-orange);
}

body.tw-theme .mr-promo__img {
    opacity: 0.75;
}

body.tw-theme .mr-promo__title {
    font-family: var(--tw-font-head);
    text-transform: uppercase;
    color: #ffffff;
}

body.tw-theme .mr-promo__cta {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tw-tint);
}

body.tw-theme .mr-promo:hover .mr-promo__cta {
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   Product cards (inherited) — carbon panels with hairline keylines that
   snap orange on hover, Inter-bold names, Signal Orange price display.
   -------------------------------------------------------------------------- */
body.tw-theme .mr-card {
    background-color: var(--tw-carbon);
    border: 1px solid var(--tw-line);
    transition: border-color 0.3s ease;
}

body.tw-theme .mr-card:hover {
    border-color: var(--tw-orange);
}

body.tw-theme .mr-card__media {
    background-color: var(--tw-media-bg);
    border-bottom: 1px solid var(--tw-line);
}

body.tw-theme .mr-card__title {
    font-family: var(--tw-font-body);
    font-weight: 700;
    color: var(--tw-ink);
}

body.tw-theme .mr-card__title a:hover {
    color: var(--tw-orange);
}

body.tw-theme .mr-card__eyebrow {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tw-soft);
}

/* DESIGN.md price-display: Inter Bold, tight tracking — "Rs. 6,499" in
   Signal Orange (bold type on the carbon card ≈ 4.3:1, clears the 3:1
   large/bold floor; ~5.9:1 on the canvas bands). */
body.tw-theme .mr-card__price,
body.tw-theme .ll-price {
    font-family: var(--tw-font-body);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--tw-orange);
}

body.tw-theme .mr-card__price del,
body.tw-theme .mr-card__price s {
    color: var(--tw-soft);
}

/* 'SALE' badge — Signal Orange with graphite text, rectangular (DESIGN.md). */
body.tw-theme .mr-card__badge {
    background-color: var(--tw-orange);
    color: var(--tw-ink-on-fill);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* The slide-up "Add to Cart" button. */
body.tw-theme .mr-card__quick {
    background-color: rgba(17, 19, 23, 0.92);
    color: var(--tw-ink);
    border-top: 1px solid var(--tw-line-strong);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 600;
}

body.tw-theme .mr-card__quick:hover {
    background-color: var(--tw-orange);
    color: var(--tw-ink-on-fill);
}

/* The two floating icon affordances. `__wish` and `__quickview` are SIBLINGS
   with different names — restyle them together or the quick-view eye keeps
   the base's near-white circle. Default prints ink on a dark badge (>12:1);
   hover fills orange and swaps to the graphite on-fill ink (~5.6:1). They
   stay circular platform-wide. */
body.tw-theme .mr-card__wish,
body.tw-theme .mr-card__quickview {
    background-color: rgba(17, 19, 23, 0.82);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    color: var(--tw-ink);
    border: 1px solid var(--tw-line);
    border-radius: 9999px !important;
}

body.tw-theme .mr-card__wish:hover,
body.tw-theme .mr-card__quickview:hover {
    background-color: var(--tw-orange);
    color: var(--tw-ink-on-fill);
    border-color: var(--tw-orange);
}

body.tw-theme .mr-card__wish.is-active {
    color: var(--tw-tint);
}

/* Bordered card ⇒ its text must not sit flush against the keyline. The media
   stays full-bleed; only the copy is inset. */
body.tw-theme .mr-card > p,
body.tw-theme .mr-card > h3 {
    padding-inline: 1rem;
}

body.tw-theme .mr-card > *:last-child {
    padding-bottom: 1.15rem;
}

/* Rail chevrons (PDP related-products etc.) — hairline squares. */
body.tw-theme .mr-rail-btn {
    border-color: var(--tw-line);
    color: var(--tw-ink);
}

body.tw-theme .mr-rail-btn:hover {
    background-color: var(--tw-orange);
    border-color: var(--tw-orange);
}

/* --------------------------------------------------------------------------
   torqueworks' own home sections
   -------------------------------------------------------------------------- */
body.tw-theme .tw-featured {
    background-color: var(--tw-surface-low);
    border-top: 1px solid var(--tw-line-warm);
}

/* Info cards — centered icon / title / body columns over a hairline base. */
body.tw-theme .tw-info {
    border-bottom: 1px solid var(--tw-line-warm);
}

body.tw-theme .tw-info__card {
    text-align: center;
    padding: 0 1rem;
}

body.tw-theme .tw-info__icon {
    width: 48px;
    height: 48px;
    color: var(--tw-orange);
    margin: 0 auto 1rem;
    display: block;
}

body.tw-theme .tw-info__title {
    font-family: var(--tw-font-head);
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--tw-ink);
    margin-bottom: 0.5rem;
}

body.tw-theme .tw-info__text {
    color: var(--tw-soft);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* Just Stocked — hairline left-ruled text rows. */
body.tw-theme .tw-stocked__row {
    border-left: 1px solid var(--tw-line);
    padding: 0.5rem 0 0.5rem 1rem;
    transition: border-color 0.25s ease;
    height: 100%;
}

body.tw-theme .tw-stocked__row:hover {
    border-left-color: var(--tw-orange);
}

body.tw-theme .tw-stocked__name {
    font-family: var(--tw-font-body);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 0.35rem;
}

body.tw-theme .tw-stocked__name a {
    color: var(--tw-ink);
    text-decoration: none;
    transition: color 0.25s ease;
}

body.tw-theme .tw-stocked__name a:hover {
    color: var(--tw-orange);
}

body.tw-theme .tw-stocked__price,
body.tw-theme .tw-stocked__price .ll-price {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--tw-soft);
}

/* Shop by Category — text-only outlined carbon tiles with an orange wash. */
body.tw-theme .tw-cats__tile {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    background-color: var(--tw-carbon);
    border: 1px solid var(--tw-line-warm);
    border-radius: 0.25rem;
    text-decoration: none;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

body.tw-theme .tw-cats__tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(var(--tw-orange-rgb), 0.05);
    transition: background-color 0.3s ease;
}

body.tw-theme .tw-cats__tile:hover {
    border-color: var(--tw-orange);
}

body.tw-theme .tw-cats__tile:hover::before {
    background-color: rgba(var(--tw-orange-rgb), 0.1);
}

body.tw-theme .tw-cats__name {
    position: relative;
    z-index: 1;
    font-family: var(--tw-font-head);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    text-align: center;
    padding: 0 1rem;
    color: #ffffff;
    transition: transform 0.3s ease;
}

body.tw-theme .tw-cats__tile:hover .tw-cats__name {
    transform: scale(1.08);
}

/* Torque Journal — left heading with a hairline rule running to the edge,
   orange bordered category chips. */
body.tw-theme .tw-journal__head {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

body.tw-theme .tw-journal__head > * {
    flex: 0 0 auto;
}

body.tw-theme .tw-journal__rule {
    display: block;
    height: 1px;
    background-color: var(--tw-line);
    flex: 1 1 auto;
}

body.tw-theme .tw-journal__chip {
    display: inline-block;
    border: 1px solid var(--tw-orange);
    padding: 0.15rem 0.5rem;
    font-size: 0.65rem;
    border-radius: 2px;
}

body.tw-theme .mr-article__media {
    border: 1px solid var(--tw-line-warm);
}

body.tw-theme .mr-article__title a {
    color: var(--tw-ink);
    text-decoration: none;
}

body.tw-theme .mr-article__title a:hover {
    color: var(--tw-orange);
}

/* Newsletter ("PIT LANE UPDATES") — lifted band under an orange gradient
   hairline, joined input + Subscribe inside a single hairline frame. */
body.tw-theme .tw-cta {
    position: relative;
    background-color: #222428; /* surface-highest at ~50% over the canvas */
    padding: 6rem 0;
}

body.tw-theme .tw-cta::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--tw-orange), transparent);
}

body.tw-theme .tw-cta__title {
    color: #ffffff;
}

body.tw-theme .tw-cta__body {
    color: var(--tw-soft);
    max-width: 32rem;
    font-size: 1.05rem;
}

body.tw-theme .tw-cta__form {
    display: flex;
    align-items: stretch;
    max-width: 36rem;
    border: 1px solid var(--tw-line-warm);
    border-radius: 0.25rem;
    overflow: hidden;
}

body.tw-theme .tw-cta__form input {
    flex: 1 1 auto;
    background: var(--tw-canvas);
    border: 0;
    color: var(--tw-ink);
    padding: 1rem 1.5rem;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.tw-theme .tw-cta__form input::placeholder {
    color: var(--tw-soft);
}

body.tw-theme .tw-cta__form input:focus {
    outline: none;
}

body.tw-theme .tw-cta__btn {
    background-color: var(--tw-orange);
    color: var(--tw-ink-on-fill);
    border: 0;
    padding: 1rem 2.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background-color 0.25s ease;
}

body.tw-theme .tw-cta__btn:hover {
    background-color: #ffffff;
}

body.tw-theme .tw-cta__btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

body.tw-theme .tw-cta__note {
    color: var(--tw-muted);
    font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   Inherited component finishing — footer, tables.
   -------------------------------------------------------------------------- */
body.tw-theme .mr-footer {
    background-color: var(--tw-media-bg);
    border-top: 1px solid var(--tw-line-warm);
    color: var(--tw-muted);
}

body.tw-theme .mr-footer__brand {
    font-family: var(--tw-font-head);
    font-style: italic;
    text-transform: uppercase;
    color: var(--tw-ink);
}

body.tw-theme .mr-footer h4 {
    font-family: var(--tw-font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #ffffff;
}

body.tw-theme .mr-ulink,
body.tw-theme .mr-footer a {
    color: var(--tw-muted);
    text-decoration: none;
}

body.tw-theme .mr-ulink:hover,
body.tw-theme .mr-footer a:hover {
    color: var(--tw-orange);
}

/* `.mr-social` IS the anchor in the base footer partial — hairline squares
   that fill orange on hover (graphite icon, guard block above re-inks it). */
body.tw-theme .mr-social {
    border: 1px solid var(--tw-line-warm);
    color: var(--tw-ink);
    border-radius: 0.25rem;
}

body.tw-theme .mr-social:hover {
    background-color: var(--tw-orange);
    border-color: var(--tw-orange);
}

/* Tables (orders / account) need explicit ink on the dark canvas. */
body.tw-theme .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--tw-ink);
    --bs-table-border-color: var(--tw-line);
    color: var(--tw-ink);
}

/* --------------------------------------------------------------------------
   Motion & responsive
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    body.tw-theme .mr-reveal,
    body.tw-theme .mr-card,
    body.tw-theme .mr-promo,
    body.tw-theme .tw-keyline-link,
    body.tw-theme .tw-cats__tile,
    body.tw-theme .tw-cats__name,
    body.tw-theme .tw-stocked__row {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }

    body.tw-theme .mr-card:hover .mr-card__media img,
    body.tw-theme .mr-promo:hover .mr-promo__img,
    body.tw-theme .mr-article__media:hover img,
    body.tw-theme .tw-cats__tile:hover .tw-cats__name {
        transform: none !important;
        box-shadow: none !important;
    }
}

@media (max-width: 991.98px) {
    body.tw-theme .mr-header__bar {
        min-height: 64px;
    }

    body.tw-theme .mr-display {
        font-size: clamp(1.6rem, 6vw, 2.2rem); /* DESIGN.md headline-lg-mobile: 24px */
    }

    body.tw-theme .tw-cats__name {
        letter-spacing: 0.15em;
    }

    body.tw-theme .tw-journal__head {
        gap: 1rem;
    }

    body.tw-theme .tw-cta {
        padding: 4rem 0;
    }

    body.tw-theme .tw-cta__form {
        flex-direction: column;
        border: 0;
        gap: 0.75rem;
        overflow: visible;
    }

    body.tw-theme .tw-cta__form input {
        border: 1px solid var(--tw-line-warm);
        border-radius: 0.25rem;
    }

    body.tw-theme .tw-cta__btn {
        border-radius: 0.25rem;
    }
}
