/* Self-hosted Outfit + Lora (latin, latin-ext subsets).
   Replaces the fonts.googleapis.com request: the site now makes no
   third-party call that would expose a visitor's IP address. */

/* latin-ext */
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/lora-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/lora-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/lora-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/lora-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/lora-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/lora-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/outfit-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/outfit-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/outfit-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/outfit-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/outfit-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/outfit-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/outfit-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/outfit-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ========================================
   HomeKit Directory — design system
   Tokens from design_handoff_homekit_directory/README.md
   ======================================== */

:root {
    /* Surfaces */
    --bg:            #f7f3ee;
    --surface:       #fffdfa;
    --soft:          #f1ebe3;

    /* Borders */
    --border:        #ebe4db;
    --border-strong: #e0d7cc;
    --border-input:  #dcd2c6;
    --border-header: #e8e0d6;

    /* Text */
    --text:          #1f1b17;
    --text-2:        #5c534b;
    --text-nav:      #4a433c;
    --muted:         #7a7068;
    --muted-2:       #8a8078;
    --faint:         #9a9088;

    --accent:        oklch(0.55 0.13 40);

    /* Radii */
    --r-pill:  999px;
    --r-btn:   10px;
    --r-input: 12px;
    --r-tile:  16px;
    --r-card:  20px;
    --r-panel: 24px;

    /* Shadows */
    --shadow-search: 0 8px 30px -18px rgba(60, 40, 20, .35);
    --shadow-hover:  0 14px 30px -18px rgba(60, 40, 20, .4);
    --shadow-tile:   0 10px 24px -16px rgba(60, 40, 20, .4);

    --container: 1200px;
    --gutter: 32px;
    --header-h: 68px;

    /* Neutral fallback for pages without a category hue */
    --cat-h: 60;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }

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

.serif { font-family: 'Lora', Georgia, 'Times New Roman', serif; }

/* --- Screen-reader only --- */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.sr-only:focus {
    position: absolute; width: auto; height: auto; padding: .5rem 1rem;
    margin: 0; overflow: visible; clip: auto; white-space: normal;
    top: .5rem; left: .5rem; z-index: 60;
    background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-search);
}

/* --- Layout --- */
.container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

main { flex: 1; }

.section { padding-block: 40px; }
.section-last { padding-bottom: 80px; }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.section-title {
    font-family: 'Lora', Georgia, serif;
    font-weight: 500;
    font-size: 34px;
    letter-spacing: -0.01em;
    line-height: 1.15;
    text-wrap: pretty;
}

.section-more {
    font-size: 15px;
    font-weight: 500;
    color: var(--muted);
    white-space: nowrap;
}

/* --- Striped placeholder --- */
.ph {
    background-color: oklch(0.93 0.045 var(--cat-h));
    background-image: repeating-linear-gradient(135deg, transparent 0 12px, rgba(255,255,255,.35) 12px 24px);
}
.ph-label {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    color: oklch(0.42 0.11 var(--cat-h));
    background: rgba(255, 255, 255, .7);
    padding: 4px 8px;
    border-radius: 6px;
}

/* ========================================
   Header
   ======================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(247, 243, 238, .92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-header);
}

.header-inner {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 32px;
}

.site-logo { display: flex; align-items: center; flex-shrink: 0; }
.site-logo img { height: 30px; width: auto; }

.nav-desktop ul { display: flex; gap: 26px; }
.nav-desktop a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-nav);
}
.nav-desktop a:hover { color: var(--accent); }
.nav-desktop a[aria-current="page"] { color: var(--text); }

/* Header search pill */
.header-search {
    margin-left: auto;
    position: relative;
    width: 300px;
    flex-shrink: 0;
}
.search-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border-header);
    border-radius: var(--r-pill);
    padding: 0 14px;
    height: 40px;
}
.search-pill:focus-within { border-color: var(--border-input); }
.search-pill svg { width: 15px; height: 15px; color: var(--faint); flex-shrink: 0; }
.search-pill input {
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
    width: 100%;
    color: var(--text);
    min-width: 0;
}
.search-pill input::placeholder { color: var(--faint); }

/* Search icon toggle (mobile) */
.search-toggle {
    display: none;
    margin-left: auto;
    width: 44px; height: 44px;
    align-items: center; justify-content: center;
    border: 1px solid var(--border-header);
    background: var(--surface);
    border-radius: var(--r-pill);
    color: var(--text-nav);
}
.search-toggle svg { width: 18px; height: 18px; }

.mobile-menu-btn {
    display: none;
    width: 44px; height: 44px;
    align-items: center; justify-content: center;
    border: 1px solid var(--border-header);
    background: var(--surface);
    border-radius: var(--r-pill);
    color: var(--text-nav);
}

#mobile-menu { display: none; }
#mobile-menu.open {
    display: block;
    border-top: 1px solid var(--border-header);
    background: var(--bg);
    padding: 8px var(--gutter) 20px;
}
#mobile-menu ul { display: flex; flex-direction: column; }
#mobile-menu a {
    display: flex;
    align-items: center;
    min-height: 44px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-nav);
    border-bottom: 1px solid var(--border);
}

/* --- Typeahead results --- */
.typeahead {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-tile);
    box-shadow: var(--shadow-search);
    overflow: hidden;
    z-index: 40;
    max-height: 60vh;
    overflow-y: auto;
}
.typeahead:empty { display: none; }
.typeahead a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}
.typeahead a:last-child { border-bottom: 0; }
.typeahead a:hover, .typeahead a.is-active { background: var(--soft); color: var(--text); }
.typeahead .ta-name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.typeahead .ta-meta {
    font-size: 12px;
    color: var(--muted-2);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 600;
}
.typeahead .ta-all {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    background: var(--soft);
}
.typeahead .ta-empty { padding: 14px; font-size: 14px; color: var(--muted); }

/* ========================================
   Breadcrumbs
   ======================================== */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
}
.breadcrumbs li { display: flex; align-items: center; gap: 8px; }
.breadcrumbs li + li::before { content: "/"; color: var(--faint); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .current a { color: var(--text); }

.breadcrumb-bar { border-bottom: 1px solid var(--border); background: var(--bg); }
.breadcrumb-bar-inner {
    max-width: var(--container);
    margin-inline: auto;
    padding: 12px var(--gutter);
}

/* ========================================
   Home — hero
   ======================================== */
.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: center;
    padding-block: 72px 56px;
}

.hero-copy { display: flex; flex-direction: column; gap: 22px; }

.eyebrow {
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}

.hero h1 {
    font-family: 'Lora', Georgia, serif;
    font-weight: 500;
    font-size: 60px;
    line-height: 1.05;
    letter-spacing: -0.01em;
    text-wrap: pretty;
}

.hero-sub {
    font-size: 19px;
    line-height: 1.5;
    color: var(--text-2);
    max-width: 520px;
    text-wrap: pretty;
}

.hero-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border-input);
    border-radius: var(--r-tile);
    padding: 6px 6px 6px 20px;
    height: 60px;
    box-shadow: var(--shadow-search);
    max-width: 560px;
    position: relative;
}
.hero-search input {
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 17px;
    flex: 1;
    color: var(--text);
    min-width: 0;
}
.hero-search input::placeholder { color: var(--faint); }
.hero-search .typeahead { top: calc(100% + 10px); }

.btn-dark {
    height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: var(--r-input);
    background: var(--text);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    flex-shrink: 0;
}
.btn-dark:hover { background: var(--accent); color: #fff; }

.popular {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 14px;
    color: var(--muted);
}
.chip {
    padding: 6px 12px;
    border-radius: var(--r-pill);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text-nav);
    font-weight: 500;
}
.chip:hover { border-color: var(--text); color: var(--text); }

.hero-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 180px 180px;
    gap: 14px;
}
.hero-tile {
    border-radius: var(--r-card);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 16px;
    background-color: oklch(0.93 0.045 var(--cat-h));
}
.hero-tile:first-child { grid-row: 1 / 3; }
.hero-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-tile span {
    position: relative;
    font-size: 12px;
    font-weight: 600;
    color: oklch(0.42 0.11 var(--cat-h));
    background: rgba(255, 255, 255, .78);
    padding: 4px 10px;
    border-radius: var(--r-pill);
}
.hero-tile:hover img { transform: scale(1.03); }
.hero-tile img { transition: transform .3s ease; }

/* ========================================
   Category tiles (home)
   ======================================== */
.type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.type-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--r-tile);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    transition: transform .15s, box-shadow .15s;
}
.type-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-tile);
    color: var(--text);
}
.type-swatch {
    width: 44px;
    height: 44px;
    border-radius: var(--r-input);
    background: oklch(0.93 0.045 var(--cat-h));
    color: oklch(0.42 0.11 var(--cat-h));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 17px;
    flex-shrink: 0;
    overflow: hidden;
}
.type-swatch img { width: 26px; height: 26px; object-fit: contain; }
.type-tile-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.type-tile-name { font-size: 15px; font-weight: 600; line-height: 1.25; text-wrap: pretty; }
.type-tile-count { font-size: 13px; color: var(--muted-2); }

/* ========================================
   Product card
   ======================================== */
.card-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    overflow: hidden;
    transition: transform .15s, box-shadow .15s;
}
.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.product-media {
    height: 180px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 12px;
    position: relative;
    background-color: oklch(0.94 0.035 var(--cat-h));
    background-image: repeating-linear-gradient(135deg, transparent 0 12px, rgba(255,255,255,.4) 12px 24px);
}
.product-media.is-tall { height: 190px; }
.product-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.badge-homekey {
    position: relative;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: var(--r-pill);
    background: var(--text);
    color: #fff;
}
.media-label {
    position: relative;
    margin-left: auto;
    align-self: flex-end;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    color: oklch(0.42 0.11 var(--cat-h));
    background: rgba(255, 255, 255, .7);
    padding: 4px 8px;
    border-radius: 6px;
}

.product-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.product-eyebrow {
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted-2);
    font-weight: 600;
}
.product-name {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    text-wrap: pretty;
}
.product-name a::after {
    content: "";
    position: absolute;
    inset: 0;
}
.product-card { position: relative; }

.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 9px;
    border-radius: var(--r-pill);
    background: var(--soft);
    color: var(--text-2);
}
.tag-hub {
    background: oklch(0.93 0.06 var(--cat-h));
    color: oklch(0.42 0.11 var(--cat-h));
}

.product-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 6px;
}
.product-price { display: flex; flex-direction: column; }
.product-price b { font-weight: 600; font-size: 16px; }
.product-price span { font-size: 12px; color: var(--muted-2); }

.btn-buy {
    position: relative;
    z-index: 1;
    height: 38px;
    padding: 0 16px;
    border-radius: var(--r-btn);
    border: 0;
    background: var(--text);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.btn-buy:hover { background: var(--accent); color: #fff; }

/* ========================================
   Brand pills
   ======================================== */
.brand-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.brand-pill {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--r-pill);
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
}
.brand-pill:hover { border-color: var(--text); color: var(--text); }
.brand-pill span { font-size: 12px; color: var(--faint); }

/* ========================================
   Article cards
   ======================================== */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.article-card { display: flex; flex-direction: column; gap: 14px; color: var(--text); }
.article-card:hover { color: var(--text); }
.article-card:hover .article-card-title { color: var(--accent); }
.article-thumb {
    height: 200px;
    border-radius: var(--r-card);
    overflow: hidden;
    background-color: oklch(0.93 0.045 var(--cat-h));
    display: flex;
    align-items: flex-end;
    padding: 12px;
    position: relative;
}
.article-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.article-meta { font-size: 13px; color: var(--muted-2); }
.article-card-title {
    font-family: 'Lora', Georgia, serif;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 500;
    text-wrap: pretty;
    transition: color .15s;
}

/* ========================================
   Trust panel
   ======================================== */
.trust-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-panel);
    padding: 48px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}
.trust-item { display: flex; flex-direction: column; gap: 10px; }
.trust-item h2 {
    font-family: 'Lora', Georgia, serif;
    font-size: 24px;
    font-weight: 500;
}
.trust-item p { color: var(--text-2); line-height: 1.55; font-size: 15px; }

/* ========================================
   Category listing
   ======================================== */
.cat-hero {
    background: oklch(0.93 0.045 var(--cat-h));
    border-bottom: 1px solid var(--border-header);
}
.cat-hero-inner {
    max-width: var(--container);
    margin-inline: auto;
    padding: 32px var(--gutter) 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
}
.cat-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 640px;
}
.cat-hero h1 {
    font-family: 'Lora', Georgia, serif;
    font-weight: 500;
    font-size: 52px;
    line-height: 1.05;
    letter-spacing: -0.01em;
    text-wrap: pretty;
}
.cat-hero-desc {
    font-size: 18px;
    line-height: 1.5;
    color: var(--text-2);
    text-wrap: pretty;
}
.cat-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 14px;
    color: var(--muted);
    padding-top: 4px;
}
.cat-stats b { color: var(--text); font-weight: 600; }
.cat-hero-img {
    width: 260px;
    height: 170px;
    border-radius: var(--r-card);
    overflow: hidden;
    flex-shrink: 0;
    background-color: oklch(0.86 0.07 var(--cat-h));
    display: flex;
    align-items: flex-end;
    padding: 12px;
    position: relative;
}
.cat-hero-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cat-body {
    max-width: var(--container);
    margin-inline: auto;
    padding: 32px var(--gutter) 80px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    align-items: start;
}

/* --- Buying guide, last on the page, below the table and the grid --- */
.cat-guide-wrap { padding-block: 40px 0; }
/* Capped independently of .container: the guide is prose and wants a reading
   measure, while the table and grid above it want the full 1200px. */
.cat-guide { max-width: 860px; }
.cat-guide .affiliate-note { margin-top: 0; margin-bottom: 28px; }
.cat-guide h2:first-of-type { margin-top: 1.2em; }

/* --- Filter sidebar --- */
.filters {
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: sticky;
    top: calc(var(--header-h) + 24px);
}
.filter-group { display: flex; flex-direction: column; gap: 10px; }
.filter-legend {
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted-2);
    font-weight: 600;
}
.filter-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--r-btn);
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    width: 100%;
    min-height: 40px;
    transition: border-color .15s, background .15s;
}
.filter-btn:hover { border-color: var(--muted); }
.filter-btn[aria-pressed="true"] {
    border-color: var(--text);
    background: var(--surface);
}
.filter-btn .filter-count { font-size: 12px; color: var(--faint); }

.clear-filters {
    align-self: flex-start;
    border: 0;
    background: transparent;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    padding: 0;
}
.clear-filters[hidden] { display: none; }

.filters-toggle { display: none; }

/* --- Results --- */
.results { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.results-count { font-size: 15px; color: var(--text-2); }
.results-count b { color: var(--text); font-weight: 600; }
.sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--muted);
}
.sort-wrap select {
    height: 38px;
    border-radius: var(--r-btn);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    padding: 0 12px;
    font-size: 14px;
    color: var(--text);
}

.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 16px;
}
.empty-state[hidden] { display: none; }
.empty-state button {
    border: 0;
    background: transparent;
    color: var(--accent);
    font-weight: 600;
    font-size: 16px;
    padding: 0;
}

.show-more-wrap { display: flex; justify-content: center; padding-top: 12px; }
.show-more-wrap[hidden] { display: none; }
.btn-outline {
    height: 46px;
    padding: 0 24px;
    border-radius: var(--r-input);
    border: 1px solid var(--border-input);
    background: var(--surface);
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}
.btn-outline:hover { border-color: var(--text); color: var(--text); }

.product-card[hidden] { display: none; }

/* ========================================
   Footer
   ======================================== */
.site-footer {
    border-top: 1px solid var(--border-header);
    background: var(--soft);
    margin-top: auto;
}
.footer-inner {
    max-width: var(--container);
    margin-inline: auto;
    padding: 40px var(--gutter) 48px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-logo img { height: 26px; width: auto; }
.footer-nav ul {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-nav);
}
.footer-disclaimer {
    font-size: 12px;
    line-height: 1.6;
    color: var(--muted);
    max-width: 900px;
}

/* ========================================
   Interior pages (product, article, brand, list)
   ======================================== */
.page-head {
    padding-block: 48px 24px;
}
.page-head h1 {
    font-family: 'Lora', Georgia, serif;
    font-weight: 500;
    font-size: 44px;
    line-height: 1.1;
    letter-spacing: -0.01em;
    text-wrap: pretty;
}
.page-head .lede {
    font-size: 18px;
    line-height: 1.5;
    color: var(--text-2);
    max-width: 720px;
    margin-top: 14px;
    text-wrap: pretty;
}

.content-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 48px;
    align-items: start;
    padding-bottom: 80px;
}

.prose {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-panel);
    padding: 40px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-2);
    min-width: 0;
}
.prose > * + * { margin-top: 1em; }
.prose h1, .prose h2, .prose h3, .prose h4 {
    font-family: 'Lora', Georgia, serif;
    color: var(--text);
    font-weight: 500;
    line-height: 1.25;
    margin-top: 1.6em;
    text-wrap: pretty;
}
.prose h2 { font-size: 28px; }
.prose h3 { font-size: 22px; }
.prose h4 { font-size: 18px; font-weight: 600; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .4em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose img { border-radius: var(--r-tile); margin-block: 1.5em; }
.prose blockquote {
    border-left: 3px solid oklch(0.86 0.07 var(--cat-h));
    padding-left: 20px;
    font-style: italic;
}
.prose code {
    background: var(--soft);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: .9em;
}
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.prose th { background: var(--soft); color: var(--text); font-weight: 600; }

.side-panel {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.side-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-tile);
    padding: 20px;
}
.side-block h2 {
    font-family: 'Lora', Georgia, serif;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 12px;
}
.side-list { display: flex; flex-direction: column; }
.side-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
}
.side-list li:last-child a { border-bottom: 0; }
.side-list span { font-size: 12px; color: var(--faint); }

.hero-band {
    background: oklch(0.93 0.045 var(--cat-h));
    border-bottom: 1px solid var(--border-header);
}
.hero-band-inner {
    max-width: var(--container);
    margin-inline: auto;
    padding: 32px var(--gutter) 40px;
}
.hero-band h1 {
    font-family: 'Lora', Georgia, serif;
    font-weight: 500;
    font-size: 46px;
    line-height: 1.08;
    letter-spacing: -0.01em;
    margin-top: 14px;
    text-wrap: pretty;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.btn {
    display: inline-flex;
    align-items: center;
    height: 46px;
    padding: 0 22px;
    border-radius: var(--r-input);
    background: var(--text);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid var(--text);
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-alt {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border-input);
}
.btn-alt:hover { background: var(--surface); border-color: var(--text); color: var(--text); }

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 32px;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: var(--r-btn);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    font-size: 14px;
    font-weight: 500;
}
.pagination a:hover { border-color: var(--text); color: var(--text); }
.pagination .pagination-active {
    background: var(--text);
    border-color: var(--text);
    color: #fff;
}

/* --- 404 --- */
.page-404 { text-align: center; padding-block: 100px 120px; }
.page-404 h1 {
    font-family: 'Lora', Georgia, serif;
    font-size: 56px;
    font-weight: 500;
    margin-bottom: 16px;
}
.page-404 p { font-size: 18px; color: var(--text-2); margin-bottom: 28px; }
.page-404-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }

/* --- Back to top --- */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 44px;
    height: 44px;
    border-radius: var(--r-pill);
    border: 1px solid var(--border-input);
    background: var(--surface);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-search);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
    z-index: 25;
}
.back-to-top:hover { border-color: var(--text); }

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    :root { --gutter: 20px; }

    .nav-desktop { display: none; }
    .header-search { display: none; }
    .search-toggle { display: inline-flex; }
    .mobile-menu-btn { display: inline-flex; margin-left: 0; }
    .header-inner { gap: 12px; }

    #mobile-search { margin-top: 16px; position: relative; }
    #mobile-search .search-pill { height: 46px; }

    .hero {
        grid-template-columns: 1fr;
        gap: 36px;
        padding-block: 40px 32px;
    }
    .hero h1 { font-size: 44px; }
    .hero-sub { font-size: 17px; }
    .hero-tiles { grid-template-rows: 140px 140px; }

    .type-grid { grid-template-columns: repeat(3, 1fr); }
    .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .card-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .article-grid { grid-template-columns: repeat(2, 1fr); }

    .trust-panel { grid-template-columns: 1fr; padding: 32px; gap: 28px; }

    .section-title { font-size: 28px; }

    /* Category page: sidebar becomes a collapsible sheet */
    .cat-body { grid-template-columns: 1fr; gap: 24px; }
    .cat-hero-inner { flex-direction: column; align-items: flex-start; gap: 24px; }
    .cat-hero h1 { font-size: 38px; }
    .cat-hero-img { width: 100%; height: 180px; }

    .filters-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        width: 100%;
        min-height: 46px;
        padding: 0 16px;
        border-radius: var(--r-input);
        border: 1px solid var(--border-input);
        background: var(--surface);
        font-size: 15px;
        font-weight: 600;
        color: var(--text);
    }
    .filters {
        position: static;
        display: none;
        gap: 20px;
        padding: 20px;
        border: 1px solid var(--border);
        border-radius: var(--r-tile);
        background: var(--surface);
        margin-top: 12px;
    }
    .filters.open { display: flex; }

    .content-wrap { grid-template-columns: 1fr; gap: 32px; }
    .side-panel { position: static; }
    .prose { padding: 28px 22px; }
    .page-head h1 { font-size: 34px; }
    .hero-band h1 { font-size: 34px; }
}

@media (max-width: 640px) {
    .hero h1 { font-size: 34px; }
    .hero-search {
        height: auto;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        gap: 10px;
    }
    .hero-search input { font-size: 16px; padding: 4px 8px; }
    .btn-dark { width: 100%; justify-content: center; display: inline-flex; align-items: center; }

    .hero-tiles { grid-template-columns: 1fr 1fr; grid-template-rows: 120px 120px; }

    .type-grid { grid-template-columns: 1fr; }
    .card-grid-4, .card-grid-3 { grid-template-columns: 1fr; }
    .article-grid { grid-template-columns: 1fr; }

    .section-title { font-size: 24px; }
    .cat-hero h1 { font-size: 30px; }
    .page-404 h1 { font-size: 38px; }
    .trust-panel { padding: 24px; }
    .results-head { align-items: flex-start; }
}

.affiliate-note {
    margin: 10px 0 0;
    font-size: .78rem;
    line-height: 1.45;
    color: var(--muted, #6b7280);
}

/* ---- Comparison table on category pages -------------------------------- */
/* The table can be wider than a phone, so it scrolls inside its own box
   rather than making the whole page scroll sideways. */
.compare-note { color: var(--text-2); font-size: 15px; margin-bottom: 16px; max-width: 70ch; }
.compare-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface); }
.compare-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare-table th, .compare-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.compare-table thead th { background: var(--soft); color: var(--text); font-weight: 600; }
.compare-table tbody th { font-weight: 500; white-space: normal; min-width: 220px; }
.compare-table tbody th a { color: var(--accent); text-decoration: none; }
.compare-table tbody th a:hover { text-decoration: underline; }
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table td { color: var(--text-2); }
/* Underlined rather than bare accent colour, unlike the product link in the row
   header: this is the only outbound link in the table and the column beside it
   is full of plain text, so colour alone is doing too much work. */
.compare-buy { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.compare-buy:hover { text-decoration: none; }
/* Disclosure sits between the note and the table itself, never inside it. */
.compare-note + .affiliate-note { margin: 0 0 16px; }
/* Sources for the hand-checked rows on a comparison page. Sits under the table
   it backs and matches the affiliate disclosure, so the two notes read as a
   pair rather than competing with the table above them. */
.versus-sources { margin: 10px 0 0; font-size: .78rem; line-height: 1.45; color: var(--muted, #6b7280); }
.versus-sources a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---- Product imagery ---------------------------------------------------- */
/* Placeholder mark on cards for products with no photograph yet. Deliberately
   faint: it marks the category, it does not pretend to be the product. */
.product-media img.media-icon {
    position: absolute;
    inset: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    opacity: .35;
    object-fit: contain;
}
.product-hero-img { margin-top: 20px; max-width: 520px; }
.product-hero-img img { width: 100%; height: auto; border-radius: var(--r-tile); background: var(--surface); }
