/* ScanToolAdvisor.com - Motorsport Night Theme
   Locked palette - 2026-10-29
   Layout rebuilt 2026-10-29 to match the approved homepage mockup
*/

:root {
    /* Core Palette */
    --bg-deep: #0A0A0A;
    --bg-surface: #1A1A1A;
    --bg-card: #141414;
    --border: #333333;

    --accent-red: #FF1111;
    --accent-orange: #FF6B00;
    --accent-green: #00C853;
    --accent-amber: #FFAB00;

    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
    --text-muted: #777777;

    /* Spacing & Radius */
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --max-width: 1280px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ========== NAVIGATION ========== */
.navbar {
    background: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #1f1f1f;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.9rem 0;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text-primary);
    flex-shrink: 0;
}

.logo-icon {
    width: 34px;
    height: 34px;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.03em;
}

.logo-accent {
    color: var(--accent-red);
}

.logo-tld {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-left: 1px;
}

.nav-links {
    display: flex;
    gap: 1.75rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-primary);
    opacity: 0.85;
    transition: color 0.2s, opacity 0.2s;
    position: relative;
    padding-bottom: 6px;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
}

.nav-links a:hover {
    color: var(--accent-red);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-red);
}

.nav-toggle {
    display: none;                         /* shown at 1180px and below (see RESPONSIVE) */
    align-items: center;
    gap: 0.6rem;
    margin-left: auto;
    padding: 0.55rem 0.8rem;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.nav-toggle:hover,
.nav-toggle[aria-expanded="true"] {
    border-color: var(--accent-red);
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--accent-orange);
    outline-offset: 2px;
}

.nav-toggle-bars {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 14px;
}

.nav-toggle-bars span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s, top 0.2s;
}

.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 6px; background: var(--accent-red); }
.nav-toggle-bars span:nth-child(3) { top: 12px; }

/* open: the three bars become an X */
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

.nav-cta {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Eight menu items + the tagline don't fit below 1500px: the tagline goes first,
   then the links tighten a little, then the Menu button takes over at 1180px. */
@media (max-width: 1499px) { .nav-cta { display: none; } }
@media (min-width: 1181px) and (max-width: 1320px) { .nav-links { gap: 1.35rem; } }

.nav-slashes {
    color: var(--accent-red);
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.12em;
    margin-right: 0.4rem;
}

/* ========== HERO (full-width photo, text left) ========== */
.hero {
    position: relative;
    min-height: 540px;
    display: flex;
    align-items: center;
    padding: 4rem 1.5rem 6rem;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 75% 75%, rgba(255,17,17,0.22) 0%, transparent 55%),
        var(--bg-deep);
}

/* The photo sits on the right and fades into black on its left edge,
   so there is no hard seam behind the headline. */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 62%;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: brightness(0.75) contrast(1.1) saturate(1.1);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 40%);
            mask-image: linear-gradient(90deg, transparent 0%, #000 40%);
    z-index: 0;
}

/* Rotating photos (E040): each slide sits exactly where the ::before photo
   does, with the same fade and colour, and crossfades in over it. */
.hero-slides {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero-slide {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 62%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.75) contrast(1.1) saturate(1.1);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 40%);
            mask-image: linear-gradient(90deg, transparent 0%, #000 40%);
    opacity: 0;
}

.hero-slide.show { opacity: 1; }

/* While another photo is showing, hide the first photo underneath – otherwise
   it shows through the faded left edge of the other photos (Scott spotted its
   orange cable behind every slide, 2026-10-31). */
.hero.first-photo-hidden::before { opacity: 0; }

/* Photos change behind a dark "curtain": the curtain fades in over the
   current photo, the photos swap while it's dark, then it fades away. So two
   photos never show at once (a straight crossfade looked like a double
   exposure). The text sits above it, so only the picture dims. */
.hero-curtain {
    position: absolute;
    inset: 0;
    z-index: 1;
    /* exactly the hero's own background, so "closed" looks like the hero with no photo */
    background:
        radial-gradient(ellipse at 75% 75%, rgba(255,17,17,0.22) 0%, transparent 55%),
        var(--bg-deep);
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.hero-curtain.closed { opacity: 1; }

/* Fade the bottom of the hero into the cards */
.hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 35%;
    background: linear-gradient(0deg, var(--bg-deep) 0%, rgba(10,10,10,0) 100%);
    z-index: 0;
}

.hero-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.hero-content {
    max-width: 700px;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-red);
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: clamp(2.4rem, 4.6vw, 3.9rem);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 1.1rem;
}

.hero-sub {
    font-size: 1.2rem;
    color: #d6d6d6;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.95rem 1.6rem;
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.btn-primary {
    background: linear-gradient(180deg, #ff2a2a, #d80000);
    box-shadow: 0 4px 20px rgba(255, 17, 17, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(255, 17, 17, 0.5);
}

.btn-secondary {
    background: linear-gradient(180deg, #ff7a14, #e65f00);
    box-shadow: 0 4px 20px rgba(255, 107, 0, 0.25);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(255, 107, 0, 0.4);
}

/* ========== TOP PICKS (horizontal cards) ========== */
.featured {
    padding: 0 1.5rem 5rem;
    margin-top: -3rem;          /* cards tuck up against the hero */
    position: relative;
    z-index: 2;
}

.scanner-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.scanner-card {
    background: linear-gradient(180deg, #181818, #111111);
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 1rem 1.25rem 1.25rem;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.scanner-card:hover {
    border-color: var(--accent-red);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(255, 17, 17, 0.15);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    background: #0f7a37;
    color: #ffffff;
    margin-bottom: 0.9rem;
}

.card-body {
    display: grid;
    grid-template-columns: 42% 1fr;
    gap: 1.1rem;
    align-items: center;
}

.card-body img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    background: #0d0d0d;
}

.scanner-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

.scanner-card .model {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.7rem;
}

.scanner-card p {
    font-size: 0.9rem;
    color: #d0d0d0;
    line-height: 1.45;
    margin-bottom: 1rem;
}

.card-link {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-red);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: gap 0.2s;
}

.card-link:hover {
    gap: 0.7rem;
}

.scanner-card h3 a:hover {
    color: var(--accent-red);
}

.see-all {
    max-width: var(--max-width);
    margin: 1.75rem auto 0;
    text-align: center;
}

/* ========== SHARED PAGE LAYOUT ========== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page-header {
    padding: 3.5rem 0 2rem;
    background: radial-gradient(ellipse at 80% 0%, rgba(255,17,17,0.14) 0%, transparent 55%);
    border-bottom: 1px solid #1f1f1f;
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    margin-bottom: 0.75rem;
}

.page-lead {
    color: #d0d0d0;
    font-size: 1.1rem;
    max-width: 680px;
}

/* ========== SCANNER LIST ========== */
.list-section {
    padding: 2rem 0 5rem;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin-bottom: 1.25rem;
}

.filters fieldset {
    border: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.filters legend {
    float: left;               /* keeps the label on the same line as the chips */
    margin-right: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.chip {
    font-family: inherit;
    background: transparent;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid #333;
    color: var(--text-secondary);
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.chip:hover {
    border-color: var(--accent-red);
    color: var(--text-primary);
}

.chip-on {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: #fff;
}

.result-count {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    border: 1px dashed #333;
    border-radius: 10px;
}

.empty-state p {
    margin-bottom: 0.75rem;
}

/* ========== SCANNER DETAIL ========== */
.detail {
    padding: 1.5rem 0 5rem;
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--accent-red);
}

.detail-top {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 2.5rem;
    align-items: start;
    margin-bottom: 3rem;
}

.detail-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
    background: #0d0d0d;
}

.image-note {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

.detail-intro h1 {
    font-size: clamp(2rem, 4vw, 2.9rem);
    font-weight: 900;
    margin-bottom: 0.4rem;
}

.detail-type {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.detail-summary {
    font-size: 1.1rem;
    color: #e0e0e0;
    margin-bottom: 1.5rem;
}

.buy-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.45rem;
}

.maker-link {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
}

.maker-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

@media (max-width: 520px) {
    .buy-links { align-items: flex-start; }
}

.price-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: linear-gradient(180deg, #181818, #111111);
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    margin-bottom: 1.25rem;
}

.price {
    font-size: 1.75rem;
    font-weight: 900;
}

.price-note {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.quick-facts {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quick-facts li {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    background: #1c1c1c;
    border: 1px solid #2f2f2f;
    color: #d6d6d6;
}

.quick-facts li.yes {
    border-color: rgba(0, 200, 83, 0.45);
    color: #6dffa8;
}

.quick-facts li.no {
    color: var(--text-secondary);
}

.specs h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.spec-table th,
.spec-table td {
    text-align: left;
    vertical-align: top;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #222;
}

.spec-table th {
    width: 30%;
    font-weight: 600;
    color: var(--text-secondary);
}

.spec-table tr:nth-child(odd) {
    background: #111;
}

.spec-detail {
    margin-top: 0.3rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.spec-footnote {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.back-link {
    margin-top: 2rem;
}

.detail-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

/* ========== COMPARE ========== */
.compare-section {
    padding: 2rem 0 5rem;
}

.notice {
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    border-left: 3px solid var(--accent-amber);
    background: rgba(255, 171, 0, 0.08);
    color: #ffd27a;
    border-radius: 4px;
}

.sort-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.sort-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-right: 0.35rem;
}

/* The table scrolls sideways inside this box, never the whole page */
.table-scroll {
    overflow-x: auto;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    background: #0e0e0e;
}

.table-scroll:focus-visible {
    outline: 2px solid var(--accent-red);
    outline-offset: 2px;
}

.compare-table,
.h2h-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
}

.compare-table th,
.compare-table td,
.h2h-table th,
.h2h-table td {
    padding: 0.75rem 0.7rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #1f1f1f;
}

.compare-table thead th,
.h2h-table thead th {
    background: #161616;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    white-space: nowrap;
}

.compare-table tbody tr:hover td,
.compare-table tbody tr:hover th {
    background: #171717;
}

.compare-table td {
    color: #d6d6d6;
    min-width: 6.25rem;
}

.compare-table .col-pick {
    width: 2.5rem;
    min-width: 2.5rem;
    text-align: center;
}

.compare-table input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: var(--accent-red);
    cursor: pointer;
}

/* Scanner name column stays visible while scrolling sideways */
.compare-table .col-name {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 11rem;
    background: #0e0e0e;
    box-shadow: 1px 0 0 #2a2a2a;
}

.compare-table thead .col-name {
    background: #161616;
    z-index: 2;
}

.compare-table tbody .col-name a {
    font-weight: 700;
    color: var(--text-primary);
}

.compare-table tbody .col-name a:hover {
    color: var(--accent-red);
}

.badge-sm {
    font-size: 0.62rem;
    padding: 0.15rem 0.45rem;
    margin: 0.35rem 0 0;
}

.nowrap {
    white-space: nowrap;
}

.yes-mark {
    color: #6dffa8;
    font-weight: 700;
    white-space: nowrap;
}

.no-mark {
    color: var(--text-muted);
}

.compare-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
}

.compare-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Head-to-head */
.h2h-table thead th {
    text-transform: none;
    letter-spacing: 0;
    white-space: normal;
    font-size: 0.95rem;
    color: var(--text-primary);
    min-width: 13rem;
    vertical-align: bottom;
}

.h2h-table .h2h-corner {
    min-width: 10rem;
}

.h2h-head {
    display: block;
}

.h2h-head img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.6rem;
    background: #0d0d0d;
}

.h2h-name {
    display: block;
    font-weight: 800;
    font-size: 1.05rem;
}

.h2h-head:hover .h2h-name {
    color: var(--accent-red);
}

.h2h-price {
    margin-top: 0.35rem;
    font-weight: 800;
    font-size: 1.1rem;
}

.h2h-remove {
    display: inline-block;
    margin-top: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.h2h-remove:hover {
    color: var(--accent-red);
}

.h2h-table tbody th {
    width: 14rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: #121212;
}

.h2h-table tbody td {
    color: #e0e0e0;
}

.h2h-actions td {
    display: table-cell;
}

.h2h-actions .card-link {
    display: flex;
    margin-bottom: 0.4rem;
}

/* ========== BUYER'S GUIDES ========== */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: 1.25rem;
}

.guide-card {
    background: linear-gradient(180deg, #181818, #111111);
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 1.4rem 1.5rem;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.guide-card:hover {
    border-color: var(--accent-red);
    transform: translateY(-3px);
}

.guide-card h2 {
    font-size: 1.35rem;
    margin: 0.4rem 0 0.6rem;
}

.guide-card h2 a:hover {
    color: var(--accent-red);
}

.guide-card p {
    color: #d0d0d0;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.guide-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.guide .page-header .guide-meta {
    margin-top: 0.75rem;
}

.guide .breadcrumb {
    margin-bottom: 1.25rem;
}

.guide-layout {
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 3rem;
    padding-top: 2.5rem;
    padding-bottom: 5rem;
    align-items: start;
}

.guide-toc {
    position: sticky;
    top: 5.5rem;
    font-size: 0.88rem;
    border-left: 2px solid #2a2a2a;
    padding-left: 1rem;
}

.guide-toc-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.guide-toc ul {
    list-style: none;
}

.guide-toc li {
    margin-bottom: 0.45rem;
}

.guide-toc a {
    color: var(--text-secondary);
}

.guide-toc a:hover {
    color: var(--accent-red);
}

/* Article typography */
.guide-body {
    max-width: 46rem;
    font-size: 1.05rem;
    line-height: 1.75;
    color: #dcdcdc;
}

.guide-body > * + * {
    margin-top: 1.1rem;
}

.guide-body h2 {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-top: 2.5rem;
    scroll-margin-top: 5.5rem;
}

.guide-body h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-top: 1.75rem;
}

.guide-body a {
    color: #ff5a5a;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.guide-body a:hover {
    color: var(--accent-red);
}

.guide-body ul,
.guide-body ol {
    padding-left: 1.4rem;
}

.guide-body li + li {
    margin-top: 0.4rem;
}

.guide-body strong {
    color: var(--text-primary);
}

.guide-body code {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.92em;
    background: #1c1c1c;
    border: 1px solid #2f2f2f;
    border-radius: 4px;
    padding: 0.05rem 0.35rem;
    color: #ffd27a;
}

/* "> **Tip:** ..." in Markdown becomes a callout box */
.guide-body blockquote {
    border-left: 3px solid var(--accent-orange);
    background: rgba(255, 107, 0, 0.08);
    padding: 0.9rem 1.1rem;
    border-radius: 4px;
    color: #e8e8e8;
}

.guide-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    line-height: 1.5;
    display: block;
    overflow-x: auto;
}

.guide-body th,
.guide-body td {
    text-align: left;
    vertical-align: top;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #262626;
}

.guide-body thead th {
    background: #161616;
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.guide-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.5rem !important;
    padding-top: 2rem;
    border-top: 1px solid #222;
}

.guide-cta .btn {
    text-decoration: none;
    color: #fff;
}

.guide-more h2 {
    font-size: 1.2rem;
    margin-top: 2rem;
}

/* ========== FOOTER ========== */
.footer {
    background: #050505;
    border-top: 1px solid var(--border);
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-contact {
    margin-top: 0.5rem;
}

.link-button {
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

.footer-small {
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.footer a {
    color: var(--text-secondary);
}

.footer a:hover {
    color: var(--accent-red);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1150px) {
    .nav-cta {
        display: none;
    }
}

@media (max-width: 1000px) {
    .scanner-grid {
        grid-template-columns: 1fr;
        max-width: 640px;
    }

    .list-grid {
        margin: 0;
    }
}

@media (max-width: 800px) {
    .guide-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
        padding-top: 1.5rem;
    }

    .guide-toc {
        position: static;
    }

    .detail-top {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .detail-image {
        max-width: 360px;
    }

    .spec-table th {
        width: 40%;
    }
}

@media (max-width: 1180px) {
    /* Phone & tablet menu (E022): at 1180px and below (1000px until 2026-11-01) a Menu button opens the
       links as a panel under the bar. Without JavaScript the links simply stay visible
       in a wrapped row under the logo. */
    .nav-container {
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 0.4rem 1.25rem;
        width: 100%;
    }

    .js .nav-toggle {
        display: inline-flex;
    }

    .js .nav-links {
        display: none;
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: 0.5rem 0 0.25rem;
        border-top: 1px solid #1f1f1f;
    }

    .js .nav-links.open {
        display: flex;
    }

    .js .nav-links a {
        display: block;
        font-size: 0.95rem;
        padding: 0.85rem 0.75rem;          /* 44px+ tap targets */
        border-left: 3px solid transparent;
    }

    .js .nav-links li + li a {
        border-top: 1px solid #1a1a1a;
    }

    .js .nav-links a.active {
        border-left-color: var(--accent-red);
        background: #141414;
    }

    .js .nav-links a.active::after {
        display: none;
    }
}

@media (max-width: 900px) {
    .hero {
        min-height: 460px;
    }

    .hero::before {
        width: 100%;
        filter: brightness(0.35);
        -webkit-mask-image: none;
                mask-image: none;
    }

    .hero-slide {
        width: 100%;
        filter: brightness(0.35);
        -webkit-mask-image: none;
                mask-image: none;
    }
}

@media (max-width: 480px) {
    /* keep the logo and the Menu button on one line on phones */
    .nav-container {
        padding: 0 1rem;
        column-gap: 0.75rem;
    }

    .logo-icon {
        width: 28px;
        height: 28px;
    }

    .logo-text {
        font-size: 1.15rem;
    }

    .nav-toggle {
        padding: 0.5rem 0.65rem;
        gap: 0.5rem;
    }
}

@media (max-width: 359px) {
    /* very small phones: icon only, the word stays for screen readers */
    .nav-toggle-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

@media (max-width: 600px) {
    .h2h-table .h2h-corner,
    .h2h-table tbody th {
        position: sticky;
        left: 0;
        z-index: 1;
        width: 6rem;
        min-width: 6rem;
        max-width: 6rem;
        font-size: 0.78rem;
        box-shadow: 1px 0 0 #2a2a2a;
    }

    .h2h-table .h2h-corner {
        background: #161616;
    }

    .h2h-table thead th,
    .h2h-table td {
        min-width: 8rem;
        max-width: 8rem;
        font-size: 0.85rem;
        overflow-wrap: anywhere;
    }

    .h2h-head img {
        width: 72px;
        height: 72px;
    }

    .h2h-name {
        font-size: 0.9rem;
    }

    .h2h-price {
        font-size: 0.95rem;
    }

    .h2h-table th,
    .h2h-table td {
        padding: 0.6rem 0.6rem;
        font-size: 0.85rem;
    }

    .compare-table .col-name {
        min-width: 8.5rem;
        max-width: 8.5rem;
    }

    .compare-table th,
    .compare-table td {
        padding: 0.6rem 0.65rem;
    }

    .hero {
        padding: 3rem 1rem 4.5rem;
    }

    .featured {
        padding: 0 1rem 4rem;
    }

    .container {
        padding: 0 1rem;
    }

    .spec-table th,
    .spec-table td {
        display: block;
        width: 100%;
        padding: 0.5rem 0.75rem;
    }

    .spec-table th {
        padding-bottom: 0;
        border-bottom: none;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .logo-text {
        font-size: 1.2rem;
    }
}

/* ==========================================================================
   ABOUT & CONTACT (E025)
   ========================================================================== */
.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24rem;
    gap: 3rem;
    align-items: start;
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.contact-card {
    position: sticky;
    top: 6rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent-red);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.contact-card h2 {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
}

.contact-intro,
.contact-email,
.contact-privacy {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.contact-email { margin: 1rem 0 0; }
.contact-privacy { font-size: 0.8rem; margin: 0.75rem 0 0; }

.contact-card a { color: var(--text-primary); }

.contact-form {
    display: flex;
    flex-direction: column;
    margin-top: 1rem;
}

.contact-form label {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0.75rem 0 0.3rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    font: inherit;
    font-size: 1rem;              /* 16px keeps phones from zooming in */
    color: var(--text-primary);
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.75rem;
    width: 100%;
}

.contact-form textarea { resize: vertical; min-height: 8rem; }

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: 2px solid var(--accent-orange);
    outline-offset: 1px;
    border-color: transparent;
}

.contact-form .btn {
    margin-top: 1.25rem;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.contact-form .btn:disabled { opacity: 0.6; cursor: wait; }

.contact-status { min-height: 1.2em; margin: 0.75rem 0 0; font-size: 0.9rem; }
.contact-status.ok { color: var(--accent-green); }
.contact-status.error { color: var(--accent-amber); }

@media (max-width: 900px) {
    .about-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .contact-card { position: static; }
}

.form-trap { display: none; }

/* ==========================================================================
   404 PAGE (launch prep)
   ========================================================================== */
.not-found { padding: 5rem 0 6rem; }
.not-found-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.not-found-home { margin-top: 1.5rem; }
.not-found-home a { color: var(--text-secondary); }
.not-found-home a:hover { color: var(--text-primary); }

/* ==========================================================================
   OWNER EXPERIENCE ASK (E028) – scanner pages
   ========================================================================== */
.owner-ask {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin: 2.5rem 0 1.5rem;
    padding: 1.4rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent-orange);
    border-radius: var(--radius);
}

.owner-ask h2 { font-size: 1.2rem; margin: 0 0 0.35rem; }
.owner-ask p { color: var(--text-secondary); margin: 0; max-width: 46rem; }


/* ==========================================================================
   TRENDS PAGE (E039)
   ========================================================================== */
.trends { padding-top: 2rem; padding-bottom: 4rem; }

.trend-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent-red);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2.5rem;
}

.trend-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-orange);
}

.trend-section h2 {
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0.5rem 0 0.75rem;
}

.trend-lead { color: var(--text-secondary); max-width: 46rem; margin: 0 0 1.75rem; }

.trend-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.trend-tile {
    background: var(--bg-deep);
    border: 1px solid #2a2a2a;
    border-radius: var(--radius-sm);
    padding: 1.1rem 1rem;
    text-align: center;
}

.trend-value {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.trend-label {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.trend-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 2rem;
}

.trend-chart { margin: 0 0 1.5rem; min-width: 0; }
.trend-chart.wide { margin-top: 0.5rem; }

.trend-chart figcaption {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 0.9rem;
}

.bars { display: flex; flex-direction: column; gap: 0.45rem; }

.bar-row {
    display: grid;
    grid-template-columns: minmax(7rem, 38%) minmax(0, 1fr) 3.5rem;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.88rem;
}

.bar-name { color: var(--text-secondary); overflow-wrap: anywhere; }
.bar-name code { color: var(--text-primary); font-size: 0.9rem; }
.bar-track { height: 0.7rem; background: #222; border-radius: 3px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--accent-red); border-radius: 3px; }
.bar-fill.alt { background: var(--accent-orange); }
.bar-value { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

.columns {
    display: flex;
    align-items: flex-end;
    gap: 0.35rem;
    height: 12rem;
    padding-top: 1.4rem;
    overflow-x: auto;
}

.column {
    flex: 1 0 1.6rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.column-bar { width: 100%; background: var(--accent-orange); border-radius: 3px 3px 0 0; min-height: 2px; }
.column-value { font-size: 0.7rem; color: var(--text-secondary); margin-bottom: 0.2rem; }
.column-year { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.3rem; }

.trend-note { font-size: 0.88rem; color: var(--text-secondary); margin: 0.75rem 0 0; }
.trend-note strong { color: var(--text-primary); }
.trend-note a, .trend-source a, .trend-links a, .trend-method a { color: var(--text-primary); }

.matrix-wrap { overflow-x: auto; }

.trend-matrix { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 34rem; }
.trend-matrix th, .trend-matrix td { padding: 0.7rem 0.75rem; border-bottom: 1px solid #262626; text-align: left; }
.trend-matrix thead th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); }
.trend-matrix tbody th { white-space: nowrap; }
.matrix-n { display: block; font-size: 0.75rem; font-weight: 400; color: var(--text-muted); }
.trend-matrix td { font-weight: 700; font-variant-numeric: tabular-nums; }

.matrix-bar {
    display: block;
    height: 0.45rem;
    background: #222;
    border-radius: 3px;
    margin-bottom: 0.35rem;
    overflow: hidden;
}

.matrix-bar span { display: block; height: 100%; background: var(--accent-red); }

.trend-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 1rem 0 0; font-weight: 700; }
.trend-source { font-size: 0.8rem; color: var(--text-muted); margin: 1.25rem 0 0; }
.trend-method { max-width: 46rem; }
.trend-method h2 { font-size: 1.3rem; }
.trend-method p, .trend-empty { color: var(--text-secondary); }

@media (max-width: 900px) {
    .trend-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .trend-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
    .trend-section { padding: 1.25rem; }
    .bar-row { grid-template-columns: minmax(6rem, 42%) minmax(0, 1fr) 3rem; font-size: 0.82rem; }
}
.bar-sub { display: block; font-size: 0.72rem; color: var(--text-muted); }

/* Research date + methodology link on scanner pages (E048) */
.detail-checked { font-size: 0.85rem; color: var(--text-muted); margin: -0.4rem 0 1rem; }
.detail-checked a { color: var(--text-secondary); }

/* ==========================================================================
   "X vs Y" PAGES + MATCH-UPS (E046)
   ========================================================================== */
.versus-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 2rem 0 1.25rem;
}

.versus-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}

.versus-card img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-sm); background: #111; flex-shrink: 0; }
.versus-card h2 { font-size: 1.15rem; margin: 0 0 0.25rem; }
.versus-card h2 a { color: var(--text-primary); }
.versus-type { color: var(--text-secondary); font-size: 0.88rem; margin: 0 0 0.5rem; }
.versus-actions { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.versus-table { width: 100%; min-width: 30rem; }
.versus-table thead th { text-align: left; font-size: 0.85rem; }
.versus-more { margin: 0.75rem 0 0; }
.versus-more a { color: var(--text-primary); font-weight: 700; }

.matchups { margin-top: 2.5rem; }
.matchups h2 { font-size: 1.4rem; margin-bottom: 1rem; }
.matchup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 1rem; }

.matchup-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.1rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent-red);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
}

.matchup-card:hover { border-color: var(--accent-red); }
.matchup-title { font-weight: 800; }
.matchup-desc { color: var(--text-secondary); font-size: 0.88rem; }

@media (max-width: 700px) {
    .versus-cards { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   FIND MY SCANNER QUIZ (E044)
   ========================================================================== */
/* Card beside a page heading (Trouble Codes decoder, Trends data sources) */
.page-header.has-aside .container { display: flex; align-items: center; justify-content: space-between; gap: 3rem; }
.header-main { flex: 1; min-width: 0; }
.header-aside {
    flex: none; width: 21rem;
    background: rgba(20, 20, 20, 0.85); border: 1px solid var(--border); border-radius: 10px;
    padding: 1.1rem 1.25rem;
}
.aside-title { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: #bdbdbd; font-weight: 700; margin-bottom: 0.6rem; }
.code-decoder .cd-code { font-family: ui-monospace, Consolas, monospace; font-size: 2.2rem; font-weight: 800; letter-spacing: 0.08em; margin-bottom: 0.6rem; line-height: 1.1; }
.code-decoder .c1 { color: var(--accent-red); }
.code-decoder .c2 { color: var(--accent-orange); }
.code-decoder .c3 { color: var(--accent-amber); }
.code-decoder .c4 { color: #fff; }
.code-decoder dl { margin: 0; }
.code-decoder dl > div { display: flex; gap: 0.75rem; padding: 0.45rem 0; border-top: 1px solid #2a2a2a; font-size: 0.86rem; color: #d6d6d6; line-height: 1.35; }
.code-decoder dt { font-family: ui-monospace, Consolas, monospace; font-weight: 800; width: 1.6rem; flex: none; }
.code-decoder dd { margin: 0; }
.code-decoder b, .fact-list b { color: #fff; font-weight: 700; }
.fact-list { list-style: none; margin: 0; padding: 0; }
.fact-list li { display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem 0; border-top: 1px solid #2a2a2a; color: #e6e6e6; font-size: 0.93rem; line-height: 1.3; }
.fact-list small { display: block; color: #9a9a9a; font-size: 0.78rem; margin-top: 0.1rem; }
.fact-list .fact-note { color: #bdbdbd; font-size: 0.85rem; }
.fact-list svg { width: 1.15rem; height: 1.15rem; flex: none; fill: none; stroke: var(--accent-red); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 860px) {
    .page-header.has-aside .container { flex-direction: column; align-items: stretch; gap: 1.25rem; }
    .header-aside { width: auto; }
}

/* What-to-expect card beside the quiz heading */
.quiz-header .container { display: grid; grid-template-columns: 1fr auto; column-gap: 2.5rem; align-items: center; }
.quiz-header .container > :not(.quiz-facts) { grid-column: 1; }
.quiz-facts {
    grid-column: 2; grid-row: 1 / span 3;
    list-style: none; margin: 0; padding: 0.4rem 1.2rem;
    background: rgba(20, 20, 20, 0.85); border: 1px solid var(--border); border-radius: 10px;
}
.quiz-facts li { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 0; min-width: 15rem; color: #e6e6e6; font-size: 0.95rem; }
.quiz-facts li + li { border-top: 1px solid #2a2a2a; }
.quiz-facts svg { width: 1.15rem; height: 1.15rem; flex: none; fill: none; stroke: var(--accent-red); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 760px) {
    .quiz-header .container { grid-template-columns: 1fr; }
    .quiz-facts { grid-column: 1; grid-row: auto; display: flex; margin-top: 1.25rem; padding: 0; }
    .quiz-facts li { flex: 1; flex-direction: column; gap: 0.35rem; min-width: 0; padding: 0.7rem 0.3rem; text-align: center; font-size: 0.82rem; }
    .quiz-facts li + li { border-top: 0; border-left: 1px solid #2a2a2a; }
    .quiz-facts-more { display: none; }
}

.quiz-wrap { max-width: 46rem; padding-top: 2rem; padding-bottom: 4rem; }
.quiz { display: flex; flex-direction: column; gap: 1.25rem; }

.quiz-q {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    padding: 1.1rem 1.25rem 1.25rem;
    margin: 0;
}

.quiz-q legend { font-weight: 800; font-size: 1.05rem; padding: 0 0.4rem; }

.quiz-n {
    display: inline-grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    margin-right: 0.4rem;
    border-radius: 50%;
    background: var(--accent-red);
    font-size: 0.85rem;
}

.quiz-q label {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    padding: 0.65rem 0.75rem;
    margin-top: 0.45rem;
    border: 1px solid #262626;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
}

.quiz-q label:hover { border-color: #444; color: var(--text-primary); }
.quiz-q label:has(input:checked) { border-color: var(--accent-red); color: var(--text-primary); background: #161010; }
.quiz-q input { margin-top: 0.25rem; accent-color: var(--accent-red); }
.quiz .btn { align-self: flex-start; border: none; cursor: pointer; }

.quiz-results h2 { font-size: 1.6rem; }
.quiz-list { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-direction: column; gap: 1rem; }

.quiz-match {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem;
}

.quiz-match:first-child { border-color: var(--accent-red); }
.quiz-match img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-sm); background: #111; flex-shrink: 0; }
.quiz-rank { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-orange); }
.quiz-match h3 { margin: 0.2rem 0; font-size: 1.15rem; }
.quiz-match h3 a { color: var(--text-primary); }
.quiz-meta { color: var(--text-secondary); font-size: 0.88rem; margin: 0 0 0.4rem; }
.quiz-match ul { margin: 0 0 0.5rem; padding-left: 1.1rem; color: var(--text-secondary); font-size: 0.9rem; }
.quiz-note { color: var(--text-secondary); font-size: 0.88rem; }
.quiz-note a, .quiz-after a { color: var(--text-primary); }
.quiz-after { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.quiz-after .btn { border: none; cursor: pointer; }

@media (max-width: 480px) {
    .quiz-match { flex-direction: column; }
    .quiz-match img { width: 72px; height: 72px; }
}
.quiz-cta { margin-top: 0.75rem; font-weight: 700; }
.quiz-cta a { color: var(--accent-orange); }
.quiz-results, .quiz { scroll-margin-top: 6rem; }

/* ==========================================================================
   TROUBLE-CODE PAGES (E042)
   ========================================================================== */
.code-badge {
    display: inline-block;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    background: var(--accent-red);
    color: #fff;
    padding: 0.05em 0.35em;
    border-radius: 6px;
    margin-right: 0.15em;
}

.code-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 2rem 0 0.5rem;
}

.code-fact {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 3px solid #444;
    border-radius: var(--radius-sm);
    padding: 1rem 1.1rem;
}

.code-fact-label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); }
.code-fact-value { font-size: 1.35rem; font-weight: 900; margin-top: 0.3rem; }
.code-fact-note { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.15rem; }
.code-fact.drive-soon { border-top-color: var(--accent-green); }
.code-fact.drive-caution { border-top-color: var(--accent-amber); }
.code-fact.drive-stop { border-top-color: var(--accent-red); }

.code-related { list-style: none; padding: 0; }
.code-related li { margin: 0.4rem 0; }
.code-related code { color: var(--text-primary); margin-right: 0.4rem; }
.code-disclaimer { font-size: 0.85rem; color: var(--text-muted); margin-top: 2rem; }
.code-disclaimer a { color: var(--text-secondary); }

.code-search { margin-top: 1.25rem; max-width: 34rem; }
.code-search input {
    width: 100%;
    font: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.9rem;
}

.code-search input:focus { outline: 2px solid var(--accent-orange); outline-offset: 1px; }
.code-index { padding-top: 1.5rem; padding-bottom: 4rem; columns: 2 26rem; column-gap: 2.5rem; }
.code-group { break-inside: avoid; margin-bottom: 1.75rem; }
.code-group h2 { font-size: 1.1rem; margin: 0 0 0.6rem; color: var(--accent-orange); }
.code-group ul { list-style: none; padding: 0; margin: 0; }

.code-group li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #222;
}

.code-group a { display: flex; gap: 0.7rem; color: var(--text-primary); min-width: 0; }
.code-group a code { font-weight: 800; color: var(--text-primary); flex-shrink: 0; }
.code-group a span { color: var(--text-secondary); }
.code-group a:hover span { color: var(--text-primary); }
.code-drive { font-size: 0.72rem; font-weight: 700; white-space: nowrap; padding: 0.15rem 0.45rem; border-radius: 4px; background: #1a1a1a; }
.code-drive.drive-soon { color: var(--accent-green); }
.code-drive.drive-caution { color: var(--accent-amber); }
.code-drive.drive-stop { color: #ff5a5a; }
.code-empty, .code-index .code-disclaimer { column-span: all; }

@media (max-width: 700px) {
    .code-facts { grid-template-columns: minmax(0, 1fr); }
    .code-drive { display: none; }
}
.columns.short { height: 9rem; }
.column-bar.alt { background: var(--accent-red); }

/* Long unbreakable words (e.g. "Range/Performance") may wrap rather than push the page sideways */
h1, h2, h3 { overflow-wrap: break-word; }
