:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f0f3f9;
  --text: #1a2233;
  --muted: #5f6b7e;
  --border: #e2e7f0;
  --primary: #2458d6;
  --primary-2: #6a3df5;
  --primary-soft: #e8efff;
  --primary-text: #ffffff;
  --good: #137a3a;
  --good-soft: #e5f5ea;
  --bad: #b3261e;
  --bad-soft: #fdecea;
  --warn-soft: #fff4dc;
  --shadow: 0 1px 2px rgba(20, 30, 60, .06), 0 4px 14px rgba(20, 30, 60, .06);
  --shadow-lg: 0 8px 24px rgba(20, 30, 60, .10), 0 2px 6px rgba(20, 30, 60, .06);
  --radius: 14px;
  --radius-sm: 9px;
  --font-display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f17;
    --surface: #141b28;
    --surface-2: #1b2433;
    --text: #e6ebf3;
    --muted: #98a4b8;
    --border: #263042;
    --primary: #6c9bff;
    --primary-2: #a684ff;
    --primary-soft: #1a2540;
    --primary-text: #0b0f17;
    --good: #5fd08a;
    --good-soft: #15301f;
    --bad: #ff8a80;
    --bad-soft: #3a1c1a;
    --warn-soft: #3a3016;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- header ---------- */
.site-header {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20;
}
.site-header .container { display: flex; align-items: center; gap: 20px; min-height: 64px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 19px; color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.logo-mark { font-size: 22px; }
.logo span { background: linear-gradient(135deg, var(--primary), var(--primary-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); font-weight: 600; font-size: 14.5px; }
.nav a.active, .nav a:hover { color: var(--text); text-decoration: none; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--primary); color: var(--primary-text); font-size: 12px; text-align: center; font-weight: 700; }

/* ---------- buttons / inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: var(--primary-text); border: 0; border-radius: var(--radius-sm);
  padding: 11px 20px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
  box-shadow: 0 4px 12px rgba(36, 88, 214, .25); transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn:hover { filter: brightness(1.06); text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(36, 88, 214, .3); }
.btn.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); box-shadow: var(--shadow); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.danger { background: var(--bad); box-shadow: none; }
.btn.good { background: var(--good); box-shadow: none; }
input[type=number], input[type=text], input[type=password], select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 11px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; }

/* ---------- hero search ---------- */
.hero { position: relative; overflow: hidden; padding: 52px 0 32px; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto -10%; height: 420px; z-index: -1;
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--primary) 22%, transparent), transparent),
    radial-gradient(closest-side at 80% 20%, color-mix(in srgb, var(--primary-2) 18%, transparent), transparent);
}
.hero h1 { font-size: 34px; }
.hero p { color: var(--muted); margin: 0 0 20px; font-size: 16px; }
.search-box {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 14px; align-items: end;
}
.search-box label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.budget-value { font-size: 22px; font-weight: 800; color: var(--text); }
input[type=range] { width: 100%; accent-color: var(--primary); }
.quick-budgets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 20px; padding: 5px 14px; font-size: 13px; cursor: pointer;
}
.chip:hover, .chip.active { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.trust-strip { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 18px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.blog-teaser { padding: 10px 16px 70px; }

/* ---------- homepage: body-type / brand / top-picks ---------- */
.section-title { font-size: 22px; margin: 0 0 16px; }
.body-type-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.body-type-chip {
  display: flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 8px 14px 8px 10px; cursor: pointer; font-size: 13.5px; font-weight: 600;
  transition: border-color .15s, background .15s, color .15s;
}
.body-type-chip input { display: none; }
.body-type-chip:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.body-type-chip .icon { font-size: 17px; }

.brand-strip, .top-picks { padding: 38px 16px 6px; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.brand-chip {
  display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer; box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.brand-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.brand-chip input { display: none; }
.brand-chip:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.brand-chip-name { font-weight: 700; font-size: 14.5px; }

/* ---------- listing layout ---------- */
.layout { display: grid; grid-template-columns: 250px 1fr; gap: 24px; padding: 24px 0 90px; }
.filters { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; align-self: start; position: sticky; top: 76px; }
.filters h3 { font-size: 15px; margin-top: 18px; }
.filters h3:first-child { margin-top: 0; }
.filters label.check { display: flex; gap: 8px; align-items: center; padding: 3px 0; cursor: pointer; }
.filters input[type=checkbox] { accent-color: var(--primary); width: 16px; height: 16px; }
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.results-head select { width: auto; }
.brand-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column; border: 1px solid transparent;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.card:hover { border-color: var(--border); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card-img { position: relative; aspect-ratio: 3 / 2; background: var(--surface-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-img .tag { position: absolute; top: 10px; left: 10px; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: var(--surface); color: var(--text); }
.tag.safety { background: var(--good-soft); color: var(--good); }
.tag.ev { background: var(--primary-soft); color: var(--primary); }
.card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { font-size: 17px; margin: 0; }
.card-body h3 a { color: var(--text); }
.brand-name { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.price { color: var(--good); font-weight: 800; font-size: 18px; }
.specs-line { display: flex; flex-wrap: wrap; gap: 6px; }
.specs-line span { background: var(--surface-2); border-radius: 6px; padding: 2px 8px; font-size: 12.5px; }
.rating { font-size: 13px; color: var(--muted); }
.rating b { color: var(--text); }
.budget-variants { font-size: 13px; background: var(--good-soft); color: var(--good); border-radius: 8px; padding: 6px 10px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); }
.compare-toggle { display: flex; gap: 6px; align-items: center; font-size: 14px; cursor: pointer; user-select: none; }
.compare-toggle input { accent-color: var(--primary); width: 16px; height: 16px; }

.empty { background: var(--surface); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--muted); box-shadow: var(--shadow); }
.alert { padding: 12px 16px; border-radius: 8px; margin: 12px 0; }
.alert.ok { background: var(--good-soft); color: var(--good); }
.alert.err { background: var(--bad-soft); color: var(--bad); }

/* ---------- compare tray ---------- */
.compare-tray {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface);
  border-top: 1px solid var(--border); box-shadow: 0 -4px 20px rgba(0, 0, 0, .12);
  transform: translateY(110%); transition: transform .2s;
}
.compare-tray.show { transform: none; }
.compare-tray .container { display: flex; align-items: center; gap: 12px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.tray-items { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.tray-item { background: var(--surface-2); border-radius: 8px; padding: 5px 10px; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.tray-item button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; }

/* ---------- detail page ---------- */
.page { padding: 24px 0 90px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 20px; }
.detail-top { display: grid; grid-template-columns: 1.1fr 1fr; gap: 26px; align-items: start; }
.detail-top img { border-radius: 10px; width: 100%; }
.detail-top .price { font-size: 26px; }
.keyfacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 16px 0; }
.keyfact { background: var(--surface-2); border-radius: 8px; padding: 8px 12px; }
.keyfact small { display: block; color: var(--muted); font-size: 12px; }
.keyfact b { font-size: 14px; }
.colours { display: flex; flex-wrap: wrap; gap: 6px; }
.verdict { border-left: 4px solid var(--primary); background: var(--primary-soft); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; position: sticky; top: 60px; background: var(--bg); z-index: 10; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--text); text-decoration: none; border-color: var(--border); }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pros li::marker { content: "✔  "; color: var(--good); }
.cons li::marker { content: "✘  "; color: var(--bad); }
.pros li, .cons li { margin-bottom: 6px; }
.pre { white-space: pre-line; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-weight: 600; }
.table-wrap { overflow-x: auto; }
details { border-bottom: 1px solid var(--border); }
details summary { cursor: pointer; font-weight: 600; padding: 11px 0; }
details[open] summary { color: var(--primary); }
details > div, details > table { margin-bottom: 12px; }
.read-more { max-height: 220px; overflow: hidden; position: relative; }
.read-more::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(transparent, var(--surface)); }
.read-more.open { max-height: none; }
.read-more.open::after { display: none; }

/* ---------- compare page ---------- */
.compare-table { table-layout: fixed; min-width: 720px; }
.compare-table td { overflow-wrap: anywhere; }
.compare-table th:first-child, .compare-table td:first-child { width: 200px; }
.compare-table th:first-child, .compare-table td:first-child { position: sticky; left: 0; background: var(--surface); min-width: 150px; font-weight: 600; z-index: 1; }
.compare-table thead th { background: var(--surface); vertical-align: bottom; min-width: 200px; }
.compare-table thead img { border-radius: 8px; width: 100%; max-width: 220px; aspect-ratio: 3 / 2; object-fit: cover; }
.compare-table tr.section td { background: var(--surface-2); font-weight: 700; color: var(--primary); }
.compare-table td.best { color: var(--good); font-weight: 700; }
.yes { color: var(--good); font-weight: 700; }
.no { color: var(--muted); }
.diff-only tr.same { display: none; }

/* ---------- admin ---------- */
.admin-header { background: #1a2233; }
.admin-header .logo, .admin-header .nav a { color: #e6ebf3; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.stat small { color: var(--muted); display: block; }
.stat b { font-size: 26px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.status-ok { color: var(--good); font-weight: 600; }
.status-miss { color: var(--bad); font-weight: 600; }
.inline { display: inline; }
.post-row.unpublished { opacity: .55; }
.form-grid { display: grid; gap: 14px; max-width: 720px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.form-grid textarea { resize: vertical; min-height: 100px; font-family: var(--font-body); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check-row { flex-direction: row !important; align-items: center; gap: 8px !important; }

/* ---------- footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 60px; padding-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; padding-bottom: 28px; }
.footer-brand p { max-width: 320px; margin-top: 10px; }
.site-footer h4 { font-size: 14px; margin-bottom: 12px; }
.site-footer .footer-grid > div > a { display: block; color: var(--muted); font-size: 14px; padding: 4px 0; }
.site-footer .footer-grid > div > a:hover { color: var(--primary); text-decoration: none; }
.footer-bottom { border-top: 1px solid var(--border); padding: 16px; text-align: center; }

/* ---------- blog ---------- */
.blog-hero { padding: 44px 0 8px; }
.blog-hero h1 { font-size: 32px; }
.tag-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 28px; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; padding-bottom: 90px; }
.blog-card { display: flex; flex-direction: column; height: 100%; color: inherit; }
.blog-card:hover { text-decoration: none; }
.blog-card .card-img { aspect-ratio: 16 / 10; }
.blog-card .card-body { gap: 8px; }
.blog-card h3 { font-size: 18px; }
.blog-card .excerpt { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-meta { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); margin-top: auto; padding-top: 8px; }
.blog-meta .tag { background: var(--primary-soft); color: var(--primary); }

.post-hero { padding: 36px 0 0; }
.post-hero .tag { background: var(--primary-soft); color: var(--primary); margin-bottom: 12px; }
.post-hero h1 { font-size: 34px; max-width: 780px; }
.post-meta { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.post-cover { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); margin-bottom: 30px; }
.post-cover img { width: 100%; max-height: 440px; object-fit: cover; display: block; }
.post-body { max-width: 720px; margin: 0 auto; font-size: 16.5px; line-height: 1.8; }
.post-body p { margin: 0 0 1.2em; }
.post-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 auto 20px; max-width: 720px; }
.related-posts { max-width: 900px; margin: 50px auto 0; }
.related-posts h2 { text-align: center; margin-bottom: 20px; font-size: 22px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .detail-top, .cols-2 { grid-template-columns: 1fr; }
  .search-box { grid-template-columns: 1fr 1fr; }
  .search-box .budget-field { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .hero h1 { font-size: 24px; }
  .search-box { grid-template-columns: 1fr; }
  .nav { gap: 12px; font-size: 14px; white-space: nowrap; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .post-hero h1 { font-size: 26px; }
}
.language-switcher{display:inline-flex;align-items:center;gap:.2rem;margin-left:.65rem;padding:.2rem;border:1px solid var(--line,#d9d9d9);border-radius:999px;font-size:.72rem;white-space:nowrap}
.language-switcher a{padding:.22rem .42rem;border-radius:999px;text-decoration:none;color:inherit}
.language-switcher a.active{background:var(--ink,#1d1d1b);color:#fff}
