/* ============================================================
   TrustSift UI v3 — complete redesign
   Principles: premium editorial look, bulletproof compatibility
   (no color-mix, no background-clip, no :has, no backdrop-filter),
   mobile-first responsive.
   ============================================================ */

/* ---------- Tokens: dark (default) ---------- */
:root {
    color-scheme: dark;

    --bg: #0a0e17;
    --surface: #111726;
    --surface-2: #1a2134;
    --border: #263046;
    --text: #eef2f9;
    --text-muted: #94a0b8;
    --primary: #5b8cff;
    --primary-2: #8a5cff;
    --link: #5b8cff;
    --success: #34d17b;
    --warning: #f5b041;
    --danger: #ff6b6b;

    --primary-soft: rgba(91, 140, 255, 0.13);
    --success-soft: rgba(52, 209, 123, 0.13);
    --warning-soft: rgba(245, 176, 65, 0.15);
    --danger-soft: rgba(255, 107, 107, 0.13);
    --header-bg: #0e1322;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 36px;
    --space-7: 52px;
    --space-8: 72px;

    --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 999px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] {
    color-scheme: light;

    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-2: #eef1f8;
    --border: #dde2ee;
    --text: #131a2a;
    --text-muted: #55617a;
    --primary: #2f5fd0;
    --primary-2: #6a44e0;
    --link: #2f5fd0;
    --success: #1d9e63;
    --warning: #b97d10;
    --danger: #cf4444;

    --primary-soft: rgba(47, 95, 208, 0.08);
    --success-soft: rgba(29, 158, 99, 0.10);
    --warning-soft: rgba(185, 125, 16, 0.10);
    --danger-soft: rgba(207, 68, 68, 0.08);
    --header-bg: #ffffff;

    --shadow-sm: 0 1px 3px rgba(19, 26, 42, 0.07);
    --shadow-md: 0 12px 32px rgba(19, 26, 42, 0.12);
}

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

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

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

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

h1 { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 1.05rem + 1vw, 1.6rem); }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    color: var(--primary-2);
}

p {
    margin-bottom: var(--space-3);
}

code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2px 6px;
    word-break: break-word;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ---------- Container ---------- */
.page {
    max-width: 1140px;
    margin: 0 auto;
    padding: var(--space-5) var(--space-4) var(--space-8);
}

.muted { color: var(--text-muted); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    flex-wrap: wrap;
}

.brand {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--primary);
    white-space: nowrap;
}

.site-nav {
    display: flex;
    gap: var(--space-1);
    flex-wrap: wrap;
}

.site-nav a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    transition: background 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
    color: var(--text);
    background: var(--surface-2);
}

.search-wrap {
    position: relative;
    margin-left: auto;
    min-width: 210px;
    flex: 1;
    max-width: 320px;
}

.header-search input {
    width: 100%;
    padding: 9px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
}

.header-search input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-drop {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 200;
    overflow: hidden;
}

.search-drop a {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 10px 14px;
    color: var(--text);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
}

.search-drop a:last-child { border-bottom: none; }
.search-drop a:hover { background: var(--surface-2); }
.drop-price { color: var(--text-muted); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 12px 22px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    text-align: center;
    transition: filter 0.15s ease, transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #ffffff;
    box-shadow: 0 6px 18px var(--primary-soft);
}

.btn.ghost {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

.btn.ghost:hover {
    border-color: var(--primary);
}

.btn.sm {
    padding: 7px 14px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

/* ---------- Badges & pills ---------- */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.badge-success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge-warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge-danger  { background: var(--danger-soft);  color: var(--danger);  border-color: transparent; }

/* ---------- Cards ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* ---------- Grids ---------- */
.grid { display: grid; gap: var(--space-4); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-products { grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); }

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

@media (max-width: 620px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .page { padding: var(--space-4) var(--space-3) var(--space-7); }
    .card { padding: var(--space-4); }
}

/* ---------- Forms ---------- */
input[type="text"],
input[type="search"],
input[type="number"],
input[type="url"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

label input, label select, label textarea { margin-top: 6px; }

/* ---------- Section heads ---------- */
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin: var(--space-7) 0 var(--space-4);
}

.section-head h2 {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.section-head h2::before {
    content: "";
    width: 5px;
    height: 1.4em;
    border-radius: var(--radius-full);
    background: linear-gradient(180deg, var(--primary), var(--primary-2));
}

.section-head a {
    font-size: 0.9rem;
    font-weight: 700;
}

/* ---------- Hero (homepage) ---------- */
.hero-home {
    text-align: center;
    padding: var(--space-8) var(--space-4) var(--space-7);
    position: relative;
    background:
        radial-gradient(560px 260px at 18% 0%, var(--primary-soft), transparent 65%),
        radial-gradient(560px 260px at 82% 0%, rgba(138, 92, 255, 0.10), transparent 65%);
}

.hero-home-inner {
    max-width: 760px;
    margin: 0 auto;
}

.hero-home h1 {
    font-size: clamp(1.9rem, 1.4rem + 2.6vw, 3rem);
    margin-bottom: var(--space-4);
}

.hero-home .grad {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
    padding-bottom: 2px;
}

.hero-home .tagline {
    font-size: 1.08rem;
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto var(--space-5);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-top: var(--space-5);
}

.hero-stat {
    padding: 8px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    color: var(--text-muted);
}

.hero-stat strong { color: var(--text); }

/* ---------- Category cards ---------- */
.cat-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    color: var(--text);
    height: 100%;
}

.cat-card h3 { color: var(--text); }
.cat-card span { margin-top: auto; font-weight: 700; color: var(--primary); }

/* ---------- Product cards ---------- */
.pcard {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    height: 100%;
}

.pcard-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-2);
}

.pcard-title { font-size: 1.05rem; }
.pcard-title a { color: var(--text); }
.pcard-title a:hover { color: var(--primary); }

.pcard .stars {
    color: var(--warning);
    letter-spacing: 1px;
    font-size: 0.85rem;
}

.pcard-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.pcard-meta strong { color: var(--text); }

.pcard-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.pcard .btn { margin-top: auto; align-self: flex-start; }

/* ---------- Score badge ---------- */
.score-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 6px var(--primary-soft);
}

.score-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}

.score-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ---------- Ranked list ---------- */
.rank-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin: var(--space-4) 0;
}

.rank-item {
    display: flex;
    gap: var(--space-4);
    align-items: center;
}

.rank-num {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: var(--radius-md);
}

.rank-body { flex: 1; min-width: 0; }
.rank-body h3 { font-size: 1.05rem; margin-bottom: 2px; }
.rank-body h3 a { color: var(--text); }
.rank-body h3 a:hover { color: var(--primary); }
.rank-score { flex-shrink: 0; }

@media (max-width: 560px) {
    .rank-item { flex-wrap: wrap; }
    .rank-score .score-badge { width: 62px; height: 62px; }
}

/* ---------- Tables ---------- */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.cmp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 420px;
}

.cmp-table th,
.cmp-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.cmp-table tr:last-child th,
.cmp-table tr:last-child td { border-bottom: none; }

.cmp-table thead th {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    background: var(--surface-2);
}

.cmp-table tbody th {
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-6);
}

.pg-num {
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 700;
}

a.pg-num:hover { border-color: var(--primary); }

.pg-num.current {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border-color: transparent;
    color: #fff;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { margin-bottom: var(--space-4); }

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    list-style: none;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumbs li + li::before {
    content: "›";
    margin-right: var(--space-2);
    color: var(--text-muted);
}

.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary); }

/* ---------- FAQ ---------- */
.faq {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: "+";
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.faq-item[open] summary::after { content: "−"; }

.faq-item[open] { border-color: var(--primary); }

.faq-answer {
    padding: 0 18px 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ---------- Notices ---------- */
.notice {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    border-left: 4px solid var(--text-muted);
    background: var(--surface-2);
    font-size: 0.9rem;
    margin: var(--space-4) 0;
}

.notice-info    { border-left-color: var(--primary); background: var(--primary-soft); }
.notice-warning { border-left-color: var(--warning); background: var(--warning-soft); }
.notice-danger  { border-left-color: var(--danger);  background: var(--danger-soft); }

/* ---------- Page-type shared ---------- */
.product-page section,
.compare-page section,
.best-page section,
.review-page section,
.alt-page section,
.legit-page section,
.methodology-page section,
.blog-article section { margin: var(--space-6) 0; }

.product-page section h2,
.compare-page section h2,
.best-page section h2,
.review-page section h2,
.legit-page section h2,
.methodology-page section h2,
.blog-article section h2 { margin-bottom: var(--space-3); }

/* ---------- Product hero ---------- */
.product-hero {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: var(--space-5);
    align-items: start;
}

@media (max-width: 860px) {
    .product-hero { grid-template-columns: 1fr; }
}

.product-hero-main h1 { margin-bottom: var(--space-2); }

.product-facts {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
}

.product-facts h2 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--primary);
    margin-bottom: var(--space-3);
}

.facts-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.facts-table th, .facts-table td { padding: 8px 0; border-bottom: 1px solid var(--border); text-align: left; }
.facts-table tr:last-child th, .facts-table tr:last-child td { border-bottom: none; }
.facts-table th { color: var(--text-muted); font-weight: 600; width: 45%; }

/* ---------- Checklists ---------- */
.checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.checklist li { padding-left: 26px; position: relative; }

.checklist li::before {
    position: absolute;
    left: 0;
    font-weight: 700;
}

.checklist.pros li::before { content: "✓"; color: var(--success); }
.checklist.cons li::before { content: "✗"; color: var(--danger); }

/* ---------- Verdicts ---------- */
.verdict { border-width: 2px; margin: var(--space-5) 0; }
.verdict h2 { color: var(--primary); }

.verdict-reasons { list-style: none; margin-top: var(--space-2); }
.verdict-reasons li { padding-left: 18px; position: relative; margin-bottom: var(--space-1); }
.verdict-reasons li::before { content: "•"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

.verdict-box { border-width: 2px; margin: var(--space-5) 0; }
.verdict-box h2 { font-size: 1.5rem; margin-bottom: var(--space-1); }

.verdict-legit { border-color: var(--success); }
.verdict-legit h2 { color: var(--success); }
.verdict-caution { border-color: var(--warning); }
.verdict-caution h2 { color: var(--warning); }
.verdict-avoid { border-color: var(--danger); }
.verdict-avoid h2 { color: var(--danger); }

/* ---------- Filters ---------- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: flex-end;
    margin-bottom: var(--space-4);
    padding: var(--space-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.filter-bar label { min-width: 150px; }

.cat-head { margin-bottom: var(--space-5); }
.cat-head h1 { margin-bottom: var(--space-2); }

.cat-sublinks {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

/* ---------- Compare picker ---------- */
.picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: var(--space-2);
    margin: var(--space-4) 0;
}

.picker-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    cursor: pointer;
    font-size: 0.9rem;
}

.picker-item:hover { border-color: var(--primary); }
.picker-item.checked { border-color: var(--primary); background: var(--primary-soft); }

.picker-item input { flex-shrink: 0; accent-color: var(--primary); }
.picker-name { flex: 1; font-weight: 600; }
.picker-price { color: var(--text-muted); white-space: nowrap; }

/* ---------- Share bar ---------- */
.share-bar {
    margin-top: var(--space-4);
    padding: 12px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.share-bar code { word-break: break-all; flex: 1; min-width: 200px; }

/* ---------- Search page ---------- */
.search-big {
    display: flex;
    gap: var(--space-2);
    margin: var(--space-4) 0;
}

.search-big input { flex: 1; min-width: 0; }
.search-big .btn { flex-shrink: 0; }

/* ---------- Quiz ---------- */
.quiz-question {
    margin: var(--space-4) 0;
    padding: var(--space-4);
}

.quiz-question legend {
    font-weight: 800;
    color: var(--text);
    padding: 0 6px;
    font-size: 1rem;
}

.quiz-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.quiz-option {
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--surface-2);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
}

.quiz-option input { display: none; }

.quiz-option.selected,
.quiz-option input:checked ~ span {
    border-color: var(--primary);
    background: var(--primary-soft);
}

/* ---------- Calculators ---------- */
.calc-form { margin: var(--space-4) 0; }
.calc-form .grid { align-items: end; }

.result-box {
    border-width: 2px;
    border-color: var(--primary);
    margin: var(--space-5) 0;
}

.result-box h2 {
    font-size: 1.7rem;
    color: var(--primary);
    margin-bottom: var(--space-2);
}

/* ---------- Charts ---------- */
.line-chart { margin: var(--space-4) 0; }
.line-chart figcaption { font-weight: 700; margin-bottom: var(--space-2); }

.line-chart svg {
    width: 100%;
    height: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.chart-label { fill: var(--text-muted); font-size: 11px; }

/* ---------- Reviews ---------- */
.reviews-list {
    display: grid;
    gap: var(--space-3);
    margin: var(--space-3) 0;
}

.review-head {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-2);
}

.review-head .stars { color: var(--warning); letter-spacing: 1px; }

.review-head a {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.reviewer-block { margin: var(--space-5) 0; }

/* ---------- Blog ---------- */
.blog-index header h1,
.blog-article header h1 { margin-bottom: var(--space-2); }

.blog-body { max-width: 760px; font-size: 1.02rem; }

.blog-body h1, .blog-body h2, .blog-body h3, .blog-body h4 {
    margin: var(--space-6) 0 var(--space-3);
}

.blog-body h2 {
    border-bottom: 1px solid var(--border);
    padding-bottom: var(--space-2);
}

.blog-body p { margin: var(--space-3) 0; }

.blog-body ul, .blog-body ol {
    margin: var(--space-3) 0;
    padding-left: var(--space-6);
}

.blog-body blockquote {
    border-left: 4px solid var(--primary);
    background: var(--primary-soft);
    padding: 14px 18px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--text-muted);
    margin: var(--space-4) 0;
}

.blog-body pre {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    overflow-x: auto;
    margin: var(--space-4) 0;
}

/* ---------- Editorial ---------- */
.editorial-page { max-width: 760px; }
.editorial-page h1 { margin-bottom: var(--space-4); }
.editorial-page h2 { margin: var(--space-6) 0 var(--space-3); }
.editorial-page ul { padding-left: 0; }

/* ---------- Quiz banner ---------- */
.quiz-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-5);
    flex-wrap: wrap;
    margin-top: var(--space-8);
    padding: var(--space-6);
    background: linear-gradient(135deg, var(--primary-soft), rgba(138, 92, 255, 0.08));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
    margin-top: var(--space-8);
}

.footer-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-4) var(--space-5);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border);
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
}

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

.footer-note {
    color: var(--text-muted);
    max-width: 720px;
    font-size: 0.9rem;
}

.footer-copy { margin-top: var(--space-3); }

/* ---------- Dev design-system pages ---------- */
.ds-section {
    margin: var(--space-6) 0;
    padding: var(--space-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.ds-section h2 { margin-bottom: var(--space-4); }

.swatches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-3);
}

.swatch {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.swatch .color { height: 64px; }

.swatch .meta {
    padding: 8px 12px;
    font-size: 0.72rem;
    color: var(--text-muted);
    background: var(--surface-2);
}

.ds-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
    margin-bottom: var(--space-3);
}

.toolbar { display: flex; gap: var(--space-2); margin: var(--space-4) 0; }

.tool-page header h1,
.alt-page header h1,
.legit-page header h1 { margin-bottom: var(--space-2); }

/* ---------- Legacy hero (404/500) ---------- */
.hero {
    text-align: center;
    padding: var(--space-8) var(--space-4);
}

.hero h1 {
    font-size: clamp(2rem, 1.5rem + 2.6vw, 3rem);
    color: var(--primary);
    margin-bottom: var(--space-3);
}

.tagline {
    font-size: 1.08rem;
    color: var(--text-muted);
}
