/* ==========================================================================
   Garden Robot Atlas — public stylesheet

   Written as a small design system: tokens first, then primitives, then
   components. No framework, no external fonts, no runtime CSS — the whole
   file is a single cached request.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
    /* Greens carry the garden association; the ink is a very dark green so
       body text feels part of the palette rather than pure black on white. */
    --ink:            #16241c;
    --ink-soft:       #3d4f45;
    --muted:          #5f7167;
    /* Was #8a9a90, which measured 2.96:1 on white. "Not published" spec values
       use this token, so the site's most honest text was also its least
       readable. This tone clears 4.5:1. */
    --muted-light:    #647569;

    --paper:          #fbfbf9;
    --surface:        #ffffff;
    --surface-alt:    #f4f6f2;
    --surface-sunken: #eef1ec;

    --line:           #e2e7de;
    --line-strong:    #cdd5c8;

    --brand:          #1f7a4d;
    --brand-dark:     #14603b;
    --brand-darker:   #0f4a2d;
    --brand-tint:     #e8f4ed;
    --brand-tint-2:   #d3ebde;

    /* A single warm accent, used sparingly for data highlights. */
    --accent:         #b8622a;
    --accent-tint:    #fbf0e7;

    /* Text drawn ON a filled button. In dark mode the brand and accent tokens
       become light tints, so white lettering on them collapses to ~2:1 — these
       tokens flip to dark ink there instead of being hard-coded to #fff. */
    --on-brand:       #ffffff;
    --on-accent:      #ffffff;
    --cta-bg:         #a85520;
    --cta-bg-hover:   #8c4416;

    --warn:           #8a6100;
    --warn-tint:      #fdf5e2;
    --danger:         #9b2c2c;
    --danger-tint:    #fdeaea;
    --info:           #1f5f8b;
    --info-tint:      #e8f2f9;

    --radius-sm:  6px;
    --radius:     10px;
    --radius-lg:  16px;
    --radius-xl:  24px;

    --shadow-sm:  0 1px 2px rgba(22, 36, 28, .06);
    --shadow:     0 2px 8px rgba(22, 36, 28, .07);
    --shadow-lg:  0 12px 32px rgba(22, 36, 28, .10);

    --container:  1180px;
    --container-narrow: 760px;

    --step--1: clamp(.82rem, .8rem + .1vw, .88rem);
    --step-0:  clamp(1rem, .97rem + .15vw, 1.06rem);
    --step-1:  clamp(1.15rem, 1.1rem + .25vw, 1.3rem);
    --step-2:  clamp(1.38rem, 1.28rem + .5vw, 1.7rem);
    --step-3:  clamp(1.7rem, 1.5rem + .9vw, 2.3rem);
    --step-4:  clamp(2.1rem, 1.7rem + 1.7vw, 3.2rem);

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
            Arial, "Noto Sans", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --ink:            #e8ede9;
        --ink-soft:       #c3cec7;
        --muted:          #9aa8a0;
        --muted-light:    #7a8a81;

        --paper:          #101613;
        --surface:        #16201b;
        --surface-alt:    #1b2721;
        --surface-sunken: #202d26;

        --line:           #2a3a31;
        --line-strong:    #3a4d42;

        --brand:          #4caf7d;
        --brand-dark:     #6cc496;
        --brand-darker:   #8ad4b0;
        --brand-tint:     #172c22;
        --brand-tint-2:   #1d3a2c;

        --accent:         #d98d54;
        --accent-tint:    #2b2018;

        --on-brand:       #08120d;
        --on-accent:      #241206;
        --cta-bg:         #e2a06a;
        --cta-bg-hover:   #f0b787;

        --warn:           #d9b04a;
        --warn-tint:      #2a2417;
        --danger:         #e08585;
        --danger-tint:    #2c1a1a;
        --info:           #74b3dd;
        --info-tint:      #172630;

        --shadow-sm:  0 1px 2px rgba(0, 0, 0, .3);
        --shadow:     0 2px 8px rgba(0, 0, 0, .35);
        --shadow-lg:  0 12px 32px rgba(0, 0, 0, .45);
    }
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: var(--step-0);
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    margin: 0 0 .5em;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -.015em;
    color: var(--ink);
    text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a {
    color: var(--brand-dark);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
a:hover { color: var(--brand-darker); }

img, svg, video { max-width: 100%; height: auto; display: block; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin-bottom: .35em; }

code {
    font-family: var(--font-mono);
    font-size: .9em;
    background: var(--surface-sunken);
    padding: .12em .38em;
    border-radius: var(--radius-sm);
}

blockquote {
    margin: 1.5em 0;
    padding: .2em 0 .2em 1.2em;
    border-left: 3px solid var(--brand-tint-2);
    color: var(--ink-soft);
}

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

:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 2px;
    border-radius: 3px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--brand-dark);
    color: #fff;
    padding: .8rem 1.2rem;
    z-index: 200;
    border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

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

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section--tight { padding-block: clamp(1.75rem, 4vw, 3rem); }
.section--alt { background: var(--surface-alt); }

.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 2rem; }

.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }

.cluster { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
}
.section-head h2 { margin-bottom: .15em; }
.section-head p { color: var(--muted); margin: 0; max-width: 62ch; }

.lede {
    font-size: var(--step-1);
    color: var(--ink-soft);
    max-width: 68ch;
    line-height: 1.55;
}

/* --------------------------------------------------------------------------
   4. Header & navigation
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(1px)) {
    .site-header { background: var(--paper); }
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 68px;
}

/* Wordmark: an inline SVG mark plus type, so no image request is needed. */
.wordmark {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
    color: var(--ink);
    font-weight: 700;
    letter-spacing: -.02em;
    font-size: 1.12rem;
    flex-shrink: 0;
}
.wordmark:hover { color: var(--ink); }
.wordmark__mark {
    width: 34px; height: 34px;
    flex-shrink: 0;
    border-radius: 9px;
    background: linear-gradient(145deg, var(--brand) 0%, var(--brand-darker) 100%);
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-sm);
}
.wordmark__mark svg { width: 20px; height: 20px; }
.wordmark__text { display: flex; flex-direction: column; line-height: 1.05; }
.wordmark__text small {
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--muted);
}

.nav { display: flex; align-items: center; gap: .2rem; }
.nav a {
    padding: .5rem .7rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--ink-soft);
    font-weight: 550;
    font-size: .95rem;
    white-space: nowrap;
}
.nav a:hover { background: var(--surface-alt); color: var(--ink); }
.nav a[aria-current="page"] {
    color: var(--brand-dark);
    background: var(--brand-tint);
}

.header-actions { display: flex; align-items: center; gap: .5rem; }

.nav-toggle {
    display: none;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    padding: .5rem .7rem;
    cursor: pointer;
    color: var(--ink);
    font: inherit;
    font-size: .9rem;
    align-items: center;
    gap: .4rem;
}

@media (max-width: 900px) {
    .nav-toggle { display: inline-flex; }
    .header-actions { display: none; }
    .nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: .1rem;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        padding: .6rem clamp(1rem, 4vw, 2rem) 1.1rem;
        box-shadow: var(--shadow-lg);
    }
    .nav.is-open { display: flex; }
    .nav a { padding: .7rem .6rem; font-size: 1rem; }
    .site-header__inner { position: relative; gap: .75rem; }
    .wordmark { min-width: 0; font-size: 1rem; }
    .wordmark__text > span { white-space: nowrap; }
}

@media (max-width: 360px) {
    .wordmark__text small { display: none; }
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .7rem 1.15rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    font-size: .96rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
    text-align: center;
}
.btn:focus-visible { outline-offset: 3px; }

.btn--primary { background: var(--brand-dark); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-darker); color: var(--on-brand); }

.btn--secondary {
    background: var(--surface);
    border-color: var(--line-strong);
    color: var(--ink);
}
.btn--secondary:hover { background: var(--surface-alt); color: var(--ink); border-color: var(--muted-light); }

.btn--ghost { background: transparent; color: var(--brand-dark); padding-inline: .5rem; }
.btn--ghost:hover { background: var(--brand-tint); }

/* The commercial call to action. Warm accent separates it from navigation. */
.btn--cta {
    background: var(--cta-bg);
    color: var(--on-accent);
    box-shadow: var(--shadow-sm);
}
.btn--cta:hover { background: var(--cta-bg-hover); color: var(--on-accent); }

.btn--sm { padding: .45rem .8rem; font-size: .88rem; }
.btn--lg { padding: .9rem 1.6rem; font-size: 1.05rem; }
.btn--block { display: flex; width: 100%; }

.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* --------------------------------------------------------------------------
   6. Cards
   -------------------------------------------------------------------------- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.4rem;
    box-shadow: var(--shadow-sm);
}
.card--flush { padding: 0; overflow: hidden; }
.card--link { transition: border-color .15s ease, box-shadow .15s ease; }
.card--link:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }

/* Mower card ---------------------------------------------------------------- */
.mower-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.mower-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }

.mower-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--surface-alt);
    display: grid;
    place-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}
.mower-card__media img { width: 100%; height: 100%; object-fit: cover; }

.mower-card__body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; flex: 1; gap: .6rem; }
.mower-card__brand {
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}
.mower-card__title { font-size: 1.08rem; margin: 0; line-height: 1.3; }
.mower-card__title a { text-decoration: none; color: var(--ink); }
.mower-card__title a:hover { color: var(--brand-dark); text-decoration: underline; }

.mower-card__specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem .8rem;
    margin: .2rem 0;
    padding: .7rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.mower-card__spec { min-width: 0; }
.mower-card__spec dt {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: .1rem;
}
.mower-card__spec dd { margin: 0; font-weight: 650; font-size: .93rem; }
.mower-card__spec dd.is-unknown { color: var(--muted-light); font-weight: 500; font-style: italic; }

.mower-card__footer { margin-top: auto; display: flex; flex-direction: column; gap: .5rem; }
.mower-card__price { font-size: 1.12rem; font-weight: 700; }
.mower-card__price small { font-size: .76rem; font-weight: 500; color: var(--muted); display: block; }
.mower-card__price.is-untracked { font-size: .9rem; font-weight: 500; color: var(--muted); }

/* --------------------------------------------------------------------------
   7. Badges & pills
   -------------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .22rem .55rem;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 650;
    letter-spacing: .01em;
    line-height: 1.4;
    background: var(--surface-sunken);
    color: var(--ink-soft);
    border: 1px solid transparent;
    white-space: nowrap;
}
.badge--brand   { background: var(--brand-tint); color: var(--brand-darker); }
.badge--accent  { background: var(--accent-tint); color: var(--accent); }
.badge--warn    { background: var(--warn-tint); color: var(--warn); }
.badge--danger  { background: var(--danger-tint); color: var(--danger); }
.badge--info    { background: var(--info-tint); color: var(--info); }
.badge--outline { background: transparent; border-color: var(--line-strong); color: var(--muted); }

a.badge {
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .12s ease;
}
a.badge:hover {
    text-decoration: none;
    filter: brightness(.95);
    transform: translateY(-1px);
}
a.badge--brand:hover {
    background: var(--brand-tint-2);
    color: var(--brand-darker);
}
a.badge--outline:hover {
    background: var(--surface-alt);
    border-color: var(--muted);
    color: var(--ink);
}

.pill-row { display: flex; flex-wrap: wrap; gap: .4rem; }

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    padding-block: clamp(2.5rem, 7vw, 5rem);
    background:
        radial-gradient(1100px 500px at 78% -10%, var(--brand-tint) 0%, transparent 62%),
        linear-gradient(180deg, var(--surface-alt) 0%, var(--paper) 100%);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}
.hero__grid {
    display: grid;
    gap: clamp(2rem, 5vw, 3.5rem);
    align-items: center;
}
@media (min-width: 940px) {
    .hero__grid { grid-template-columns: 1.15fr .85fr; }
}
.hero h1 { margin-bottom: .35em; }
.hero__lede { font-size: var(--step-1); color: var(--ink-soft); max-width: 56ch; margin-bottom: 1.6rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.4rem; }
.hero__note { font-size: .88rem; color: var(--muted); display: flex; align-items: center; gap: .45rem; }

/* Quick lawn-size selector sitting in the hero. */
.hero__panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
}
.hero__panel h2 { font-size: var(--step-1); margin-bottom: .2em; }
.hero__panel > p { color: var(--muted); font-size: .92rem; margin-bottom: 1.1rem; }

/* --------------------------------------------------------------------------
   9. Tiles (lawn size / use case / technology shortcuts)
   -------------------------------------------------------------------------- */
.tiles { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }

.tile {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding: .9rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--ink);
    transition: border-color .15s ease, background-color .15s ease;
}
.tile:hover { border-color: var(--brand); background: var(--brand-tint); color: var(--ink); }
.tile__label { font-weight: 650; font-size: .97rem; }
.tile__meta { font-size: .8rem; color: var(--muted); }
.tile.is-empty { opacity: .55; }
.tile.is-empty:hover { border-color: var(--line); background: var(--surface); }

/* --------------------------------------------------------------------------
   10. Tables
   -------------------------------------------------------------------------- */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}
.table-scroll table { margin: 0; border: 0; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .94rem;
}
th, td {
    padding: .75rem .9rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
thead th {
    background: var(--surface-alt);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }

.spec-table th { width: 38%; font-weight: 600; color: var(--ink-soft); }
.spec-table td { font-weight: 550; }
.spec-table .is-unknown { color: var(--muted-light); font-style: italic; font-weight: 400; }

.spec-group-title {
    background: var(--surface-sunken);
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    color: var(--muted);
}

/* Comparison table ---------------------------------------------------------- */
.compare-table { min-width: 640px; }
.compare-table th:first-child { width: 200px; min-width: 160px; }
.compare-table thead th { text-transform: none; font-size: .9rem; letter-spacing: 0; color: var(--ink); }
.compare-table thead th a { color: var(--ink); text-decoration: none; }
.compare-table thead th a:hover { color: var(--brand-dark); text-decoration: underline; }
.compare-table td.is-best {
    background: var(--brand-tint);
    font-weight: 700;
    color: var(--brand-darker);
    position: relative;
}
.compare-table td.is-unknown { color: var(--muted-light); font-style: italic; }

@media (min-width: 720px) {
    .compare-table th:first-child {
        position: sticky;
        left: 0;
        background: var(--surface);
        z-index: 1;
    }
    .compare-table thead th:first-child { background: var(--surface-alt); }
}

/* --------------------------------------------------------------------------
   11. Forms & filters
   -------------------------------------------------------------------------- */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }

input[type="text"], input[type="search"], input[type="number"], input[type="email"],
input[type="password"], input[type="url"], input[type="date"], select, textarea {
    width: 100%;
    padding: .6rem .75rem;
    font: inherit;
    font-size: .95rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    transition: border-color .15s ease, box-shadow .15s ease;
}
input:hover, select:hover, textarea:hover { border-color: var(--muted-light); }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint-2);
}
textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235f7167' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    padding-right: 2.2rem;
}

.field { margin-bottom: 1.1rem; }
.field__help { font-size: .84rem; color: var(--muted); margin-top: .3rem; line-height: 1.5; }
.field__error { font-size: .86rem; color: var(--danger); margin-top: .3rem; font-weight: 600; }

.check {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .7rem .85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    font-weight: 500;
    margin-bottom: 0;
    transition: border-color .15s ease, background-color .15s ease;
}
.check:hover { border-color: var(--line-strong); }
.check:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.check input { width: 18px; height: 18px; margin: .15rem 0 0; flex-shrink: 0; accent-color: var(--brand-dark); }
.check__text { display: flex; flex-direction: column; gap: .1rem; }
.check__text strong { font-weight: 650; font-size: .95rem; }
.check__text small { color: var(--muted); font-size: .82rem; line-height: 1.45; }

.check-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }

/* Search box in the header/hero */
.searchbox { display: flex; gap: .5rem; }
.searchbox input { flex: 1; }

/* Filter bar --------------------------------------------------------------- */
.filters {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    margin-bottom: 1.75rem;
}
.filters__grid {
    display: grid;
    gap: .9rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
    align-items: end;
}
.filters__actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.filters .field { margin-bottom: 0; }

.active-filters { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-bottom: 1.2rem; }
.active-filters__label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .65rem;
    background: var(--brand-tint);
    color: var(--brand-darker);
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
}
.chip:hover { background: var(--brand-tint-2); color: var(--brand-darker); }
.chip span[aria-hidden] { font-size: 1.05em; line-height: 1; opacity: .7; }

.chip--btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background-color .15s ease, transform .1s ease;
}
.chip--btn:hover {
    transform: translateY(-1px);
}
.chip--btn:active {
    transform: translateY(0);
}

/* Calculator helpers (Finder & Guides) ------------------------------------- */
.calc-helper {
    margin-top: .6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-sunken);
    overflow: hidden;
}
.calc-helper__toggle {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    padding: .5rem .75rem;
    font: inherit;
    font-size: .84rem;
    color: var(--ink-soft);
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background-color .15s ease, color .15s ease;
}
.calc-helper__toggle:hover {
    background: var(--surface-alt);
    color: var(--brand-darker);
}
.calc-helper__arrow {
    margin-left: auto;
    font-size: .9rem;
    transition: transform .2s ease;
}
.calc-helper__toggle[aria-expanded="true"] .calc-helper__arrow {
    transform: rotate(180deg);
}
.calc-helper__drawer {
    padding: .75rem;
    border-top: 1px solid var(--line);
    background: var(--surface);
}
.calc-helper__inputs {
    display: flex;
    align-items: flex-end;
    gap: .5rem;
    flex-wrap: wrap;
}
.calc-helper__inputs .field {
    flex: 1 1 110px;
}
.calc-helper__mult {
    padding-bottom: .6rem;
    font-weight: 700;
    color: var(--muted);
    font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   12. Notices
   -------------------------------------------------------------------------- */
.notice {
    display: flex;
    gap: .8rem;
    padding: 1rem 1.15rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface-alt);
    font-size: .93rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}
.notice__icon { flex-shrink: 0; font-size: 1.05rem; line-height: 1.5; }
.notice__body { min-width: 0; }
.notice__body strong { display: block; margin-bottom: .15rem; }
.notice p:last-child { margin-bottom: 0; }

.notice--info    { background: var(--info-tint);   border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.notice--warn    { background: var(--warn-tint);   border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.notice--danger  { background: var(--danger-tint); border-color: color-mix(in srgb, var(--danger) 28%, transparent); }
.notice--success { background: var(--brand-tint);  border-color: var(--brand-tint-2); }

/* The demo-data banner has to be impossible to miss. */
.notice--demo {
    background: repeating-linear-gradient(
        45deg,
        var(--warn-tint), var(--warn-tint) 12px,
        color-mix(in srgb, var(--warn-tint) 70%, var(--surface)) 12px,
        color-mix(in srgb, var(--warn-tint) 70%, var(--surface)) 24px
    );
    border-color: var(--warn);
    border-width: 2px;
}

/* Affiliate disclosure ------------------------------------------------------ */
.disclosure {
    font-size: .83rem;
    color: var(--muted);
    line-height: 1.55;
    padding: .7rem .9rem;
    background: var(--surface-alt);
    border-left: 3px solid var(--line-strong);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 1rem;
}
.disclosure a { color: var(--muted); }

/* --------------------------------------------------------------------------
   13. Breadcrumbs & pagination
   -------------------------------------------------------------------------- */
.breadcrumbs {
    font-size: .85rem;
    color: var(--muted);
    padding-block: .9rem;
}
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li { display: flex; align-items: center; gap: .35rem; margin: 0; }
.breadcrumbs li + li::before { content: "›"; color: var(--muted-light); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand-dark); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--ink-soft); font-weight: 600; }

.pagination { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; justify-content: center; margin-top: 2.5rem; }
.pagination a, .pagination span {
    min-width: 42px;
    padding: .5rem .75rem;
    text-align: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface);
    text-decoration: none;
    color: var(--ink-soft);
    font-size: .92rem;
    font-weight: 600;
}
.pagination a:hover { border-color: var(--brand); color: var(--brand-dark); }
.pagination [aria-current="page"] { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.pagination .is-gap { border: 0; background: none; min-width: auto; padding-inline: .25rem; color: var(--muted-light); }

/* --------------------------------------------------------------------------
   14. Product page
   -------------------------------------------------------------------------- */
.product-hero { padding-block: clamp(1.5rem, 4vw, 2.5rem); }
.product-hero__grid { display: grid; gap: clamp(1.5rem, 4vw, 2.5rem); }
@media (min-width: 900px) { .product-hero__grid { grid-template-columns: 1fr 1fr; } }

.product-hero__media {
    aspect-ratio: 4 / 3;
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.product-hero__media img { width: 100%; height: 100%; object-fit: contain; }

.product-title { margin-bottom: .3em; }
.product-brand {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    display: inline-block;
    margin-bottom: .5rem;
}
.product-brand:hover { color: var(--brand-dark); }

.key-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 1.25rem 0;
}
.key-spec { background: var(--surface); padding: .85rem .9rem; }
.key-spec dt {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: .2rem;
}
.key-spec dd { margin: 0; font-size: 1.05rem; font-weight: 700; }
.key-spec dd.is-unknown { font-size: .9rem; font-weight: 500; color: var(--muted-light); font-style: italic; }

.buy-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}
.buy-box__price { font-size: var(--step-2); font-weight: 800; line-height: 1.1; margin-bottom: .15rem; }
.buy-box__price-note { font-size: .82rem; color: var(--muted); margin-bottom: 1rem; }
.buy-box__links { display: flex; flex-direction: column; gap: .55rem; }
.buy-box__merchant { font-size: .8rem; color: var(--muted); text-align: center; }

.suitability { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.suit-card {
    padding: 1.05rem 1.15rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}
.suit-card__label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: .3rem;
}
.suit-card__verdict { font-size: 1.05rem; font-weight: 700; margin-bottom: .4rem; }
.suit-card__detail { font-size: .89rem; color: var(--ink-soft); line-height: 1.55; margin: 0; }
.suit-card.is-unknown { background: var(--surface-alt); border-style: dashed; }
.suit-card.is-unknown .suit-card__verdict { color: var(--muted-light); font-weight: 600; }

/* Sources block: the trust anchor of every product page. */
.sources { background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.35rem; }
.sources ol { margin: 0; padding-left: 1.25rem; }
.sources li { margin-bottom: .55rem; font-size: .92rem; word-break: break-word; }
.sources__meta { font-size: .85rem; color: var(--muted); margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }

.verified-line {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .86rem;
    color: var(--muted);
    font-weight: 600;
}
.verified-line--ok { color: var(--brand-dark); }
.verified-line--stale { color: var(--warn); }

/* --------------------------------------------------------------------------
   15. Finder
   -------------------------------------------------------------------------- */
.finder-form {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: var(--shadow);
}
.finder-form__step { padding-block: 1.35rem; border-bottom: 1px solid var(--line); }
.finder-form__step:first-of-type { padding-top: 0; }
.finder-form__step:last-of-type { border-bottom: 0; padding-bottom: 0; }
.finder-form__step h3 { font-size: var(--step-1); margin-bottom: .15em; }
.finder-form__step > p { color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }

.fit-score {
    display: inline-flex;
    align-items: baseline;
    gap: .2rem;
    font-weight: 800;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--brand-dark);
}
.fit-score small { font-size: .8rem; font-weight: 600; color: var(--muted); }

.fit-bar {
    height: 7px;
    border-radius: 999px;
    background: var(--surface-sunken);
    overflow: hidden;
    margin: .5rem 0 .75rem;
}
.fit-bar__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand) 0%, var(--brand-dark) 100%); }

.result-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.result-card--top { border-color: var(--brand); border-width: 2px; box-shadow: var(--shadow); }
.result-card__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    padding: 1.2rem 1.35rem;
    border-bottom: 1px solid var(--line);
}
.result-card__body { padding: 1.2rem 1.35rem; display: grid; gap: 1.2rem; }
@media (min-width: 800px) { .result-card__body { grid-template-columns: 1.4fr 1fr; } }

.reason-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.reason-list li { display: flex; gap: .55rem; font-size: .91rem; line-height: 1.5; margin: 0; }
.reason-list li::before { content: "✓"; color: var(--brand); font-weight: 800; flex-shrink: 0; }
.reason-list--warn li::before { content: "!"; color: var(--warn); }

.pick-label {
    display: inline-flex;
    align-items: center;
    padding: .25rem .7rem;
    border-radius: 999px;
    background: var(--brand-dark);
    color: #fff;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.pick-label--alt     { background: var(--info); }
.pick-label--budget  { background: var(--brand); }
.pick-label--premium { background: var(--accent); }

/* --------------------------------------------------------------------------
   16. Article typography
   -------------------------------------------------------------------------- */
.prose { max-width: 72ch; font-size: 1.05rem; line-height: 1.75; }
.prose h2 { margin-top: 2.2em; font-size: var(--step-2); }
.prose h3 { margin-top: 1.8em; font-size: var(--step-1); }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .5em; }
.prose img { border-radius: var(--radius); margin-block: 1.5em; }
.prose table { margin-block: 1.5em; font-size: .95rem; }
.prose a { font-weight: 550; }

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: .87rem;
    color: var(--muted);
    padding-bottom: 1.2rem;
    margin-bottom: 1.8rem;
    border-bottom: 1px solid var(--line);
}

.toc {
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.1rem 1.3rem;
    margin-bottom: 2rem;
}
.toc h2 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .6rem; }
.toc ol { margin: 0; padding-left: 1.1rem; font-size: .93rem; }
.toc li { margin-bottom: .3rem; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 1.05rem 0; }
.faq summary {
    cursor: pointer;
    font-weight: 650;
    font-size: 1.02rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.35rem; color: var(--muted); font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding-top: .7rem; color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   17. Empty states
   -------------------------------------------------------------------------- */
.empty {
    text-align: center;
    padding: clamp(2rem, 6vw, 3.5rem) 1.5rem;
    background: var(--surface-alt);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-lg);
}
.empty__icon { font-size: 2.2rem; margin-bottom: .6rem; opacity: .5; }
.empty h3 { font-size: var(--step-1); margin-bottom: .4em; }
.empty p { color: var(--muted); max-width: 52ch; margin-inline: auto; }

/* --------------------------------------------------------------------------
   18. Footer
   -------------------------------------------------------------------------- */
.site-footer {
    margin-top: clamp(3rem, 8vw, 5rem);
    background: var(--surface-alt);
    border-top: 1px solid var(--line);
    padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.5rem;
    font-size: .93rem;
}
.footer-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
    margin-bottom: 2.5rem;
}
.footer-grid h3 {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--muted);
    margin-bottom: .8rem;
    font-weight: 700;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .45rem; }
.footer-grid a { color: var(--ink-soft); text-decoration: none; }
.footer-grid a:hover { color: var(--brand-dark); text-decoration: underline; }

.footer-brand p { color: var(--muted); font-size: .9rem; max-width: 34ch; margin-top: .8rem; }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .86rem;
}

/* --------------------------------------------------------------------------
   19. Cookie consent

   A compact, non-blocking banner. Both choices intentionally share exactly
   the same button treatment and remain available while the page is usable.
   -------------------------------------------------------------------------- */
.consent-modal {
    position: fixed;
    z-index: 200;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    width: min(680px, calc(100vw - 2rem));
    max-height: min(78vh, 640px);
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 14px 44px rgba(12, 20, 15, .24);
    padding: clamp(1rem, 3vw, 1.4rem);
    display: none;
    text-align: left;
}
.consent-modal.is-visible { display: block; }

.consent-modal__mark { width: 38px; height: 38px; float: left; margin: 0 .75rem .35rem 0; }
.consent-modal__mark svg { width: 100%; height: 100%; }

.consent-modal__title {
    font-size: var(--step-1);
    margin: .2rem 0 .45rem;
}

.consent-modal__body { clear: both; text-align: left; }
.consent-modal__body > p {
    font-size: .92rem;
    color: var(--ink-soft);
    margin-bottom: .75rem;
}

.consent-modal__list {
    list-style: none;
    padding: 0;
    margin: 0 0 .75rem;
    display: grid;
    gap: .45rem;
}
.consent-modal__list li {
    font-size: .86rem;
    line-height: 1.45;
    color: var(--ink-soft);
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .55rem .7rem;
    margin: 0;
}
.consent-modal__list strong { color: var(--ink); }

.consent-modal__fine {
    font-size: .82rem;
    color: var(--muted);
    line-height: 1.45;
    margin-bottom: .9rem;
}

.consent-modal__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .7rem;
}
.consent-modal__btn {
    width: 100%;
    padding-block: .72rem;
    font-size: .94rem;
    color: var(--ink);
    background: var(--surface-alt);
    border-color: var(--line-strong);
}
.consent-modal__btn:hover { color: var(--ink); background: var(--brand-tint); border-color: var(--brand); }
.consent-modal__btn[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--brand); }

@media (max-width: 420px) {
    .consent-modal {
        left: .65rem;
        right: .65rem;
        bottom: max(.65rem, env(safe-area-inset-bottom));
        width: auto;
    }
    .consent-modal__actions { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   20. Utilities
   -------------------------------------------------------------------------- */
.text-muted   { color: var(--muted); }
.text-small   { font-size: .87rem; }
.text-center  { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.75rem; }
.mt-4 { margin-top: 2.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.75rem; }
.full-width { width: 100%; }

@media print {
    .site-header, .site-footer, .cookie-banner, .btn--cta, .filters { display: none !important; }
    body { background: #fff; }
    .card, .table-scroll { box-shadow: none; border-color: #ccc; }
}

/* -----------------------------------------------------------------------------
   Guide next steps
   Buying guides used to end on their last paragraph with no route onwards. This
   block is the exit: finder, catalogue, other guides.
   -------------------------------------------------------------------------- */
.next-steps {
    margin: 0 0 1.75rem;
    padding: 1.25rem 1.4rem;
    background: var(--brand-tint);
    border: 1px solid var(--line);
    border-radius: var(--radius, 10px);
}
.next-steps__title {
    font-size: var(--step-1);
    margin: 0 0 .75rem;
}
.next-steps__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .7rem;
}
.next-steps__list li {
    display: flex;
    flex-direction: column;
    gap: .1rem;
}
.next-steps__list a {
    font-weight: 600;
    color: var(--brand-dark);
}
.next-steps__list a:hover { text-decoration: underline; }
