/* ==========================================================================
   decent.reviews — shared stylesheet
   Colors and fonts live in the tokens below; change them here to restyle
   the whole site.
   ========================================================================== */

:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --ink: #131a26;
  --ink-2: #4f5a6d;
  --line: #dce3ee;
  --accent: #1f5fd1;        /* brand blue */
  --accent-ink: #ffffff;
  --accent-soft: #e4edfc;
  --warn-soft: #fbeae5;
  --warn: #b3412a;
  --gold: #b7862b;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 12px;
  --max: 1120px;
  --shadow: 0 1px 2px rgba(19, 26, 38, .06), 0 4px 16px rgba(19, 26, 38, .05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141c;
    --surface: #161d28;
    --surface-2: #1d2633;
    --ink: #eef2f8;
    --ink-2: #a3aec0;
    --line: #2b3646;
    --accent: #6fa6ff;
    --accent-ink: #0a1730;
    --accent-soft: #172a4a;
    --warn-soft: #3a211b;
    --warn: #ef8a72;
    --gold: #e0b35a;
    --shadow: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
}

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

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 700; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 6px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; }

.logo {
  font-family: var(--serif); font-weight: 700; font-size: 1.35rem;
  color: var(--ink); text-decoration: none; letter-spacing: -.01em;
}
.logo span { color: var(--accent); }

.nav { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* ---------- Buttons & badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: .95rem; text-decoration: none;
  padding: 11px 18px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform .1s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-block { width: 100%; }

.badge {
  display: inline-block; font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.badge-gold { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold); }
.badge-plain { background: var(--surface-2); color: var(--ink-2); }

/* ---------- Placeholders (swap for real content) ---------- */
.placeholder-img {
  aspect-ratio: 4 / 3; width: 100%; border-radius: 10px;
  background:
    repeating-linear-gradient(45deg, transparent 0 12px, color-mix(in srgb, var(--line) 55%, transparent) 12px 13px),
    var(--surface-2);
  display: grid; place-items: center; color: var(--ink-2); font-size: .85rem; text-align: center;
  border: 1px dashed var(--line);
}
.ph { background: color-mix(in srgb, var(--gold) 16%, transparent); border-radius: 4px; padding: 0 3px; }

/* ---------- Home ---------- */
.hero { padding: 72px 0 48px; }
.hero p.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 620px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.section { padding: 48px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head h2 { margin: 0; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card .placeholder-img { border-radius: 0; border: 0; border-bottom: 1px solid var(--line); aspect-ratio: 16 / 9; }
.card .meta { margin-top: auto; font-size: .85rem; color: var(--ink-2); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink); text-decoration: none; font-size: .95rem;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

.steps { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.step { padding: 20px; border-top: 3px solid var(--accent); background: var(--surface); border-radius: 0 0 var(--radius) var(--radius); }
.step::before { counter-increment: step; content: "0" counter(step); font-family: var(--serif); font-size: 1.6rem; color: var(--accent); display: block; }

/* ---------- Comparison page ---------- */
.crumbs { font-size: .85rem; color: var(--ink-2); padding-top: 28px; }
.crumbs a { color: var(--ink-2); }

.article-head { padding: 16px 0 24px; }
.byline { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .9rem; color: var(--ink-2); }

.disclosure {
  font-size: .85rem; color: var(--ink-2); background: var(--surface-2);
  border-radius: 8px; padding: 10px 14px; margin: 16px 0 0;
}

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 24px 0; }
.toc ol { margin: 8px 0 0; padding-left: 20px; columns: 2 220px; }
.toc li { margin-bottom: 4px; }

/* Quick picks */
.picks { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 24px 0; }
.pick { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.pick.is-top { border: 2px solid var(--accent); }
.pick .placeholder-img { aspect-ratio: 16 / 10; }
.pick h3 { margin: 0; font-size: 1.15rem; }
.pick p { margin: 0; font-size: .95rem; color: var(--ink-2); }
.pick .btn { margin-top: auto; }

/* Score */
.score { display: inline-flex; align-items: baseline; gap: 4px; font-family: var(--serif); font-weight: 700; }
.score b { font-size: 1.5rem; color: var(--accent); }
.score small { color: var(--ink-2); font-family: var(--sans); font-weight: 500; font-size: .8rem; }

/* Comparison table */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 20px 0; -webkit-overflow-scrolling: touch; }
.compare { border-collapse: collapse; width: 100%; min-width: 720px; font-size: .95rem; }
.compare th, .compare td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.compare thead th { background: var(--surface-2); font-family: var(--serif); font-size: 1rem; vertical-align: bottom; }
.compare thead th .badge { margin-bottom: 6px; }
.compare tbody th { text-align: left; font-weight: 600; color: var(--ink-2); background: var(--surface); position: sticky; left: 0; white-space: nowrap; }
.compare tbody tr:last-child td, .compare tbody tr:last-child th { border-bottom: 0; }
.compare .col-top { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.yes { color: var(--accent); font-weight: 700; }
.no { color: var(--warn); font-weight: 700; }

/* Product review blocks */
.product { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 28px 0; box-shadow: var(--shadow); scroll-margin-top: 84px; }
.product-top { display: grid; gap: 24px; grid-template-columns: minmax(0, 280px) 1fr; align-items: start; }
.product-top .rank { font-family: var(--serif); color: var(--ink-2); font-size: .95rem; }
.product-top h3 { font-size: 1.6rem; margin: 6px 0 8px; }
.product-top .cta-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }

.proscons { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; margin-top: 20px; }
.proscons > div { border-radius: 10px; padding: 14px 18px; }
.pros { background: var(--accent-soft); }
.cons { background: var(--warn-soft); }
.proscons h4 { margin: 0 0 6px; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; }
.pros h4 { color: var(--accent); }
.cons h4 { color: var(--warn); }
.proscons ul { margin: 0; padding-left: 20px; }
.proscons li { margin-bottom: 4px; }

.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 20px; }
.specs div { background: var(--surface); padding: 10px 14px; }
.specs dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.specs dd { margin: 2px 0 0; font-weight: 600; }

.verdict { border-left: 4px solid var(--accent); background: var(--surface); padding: 20px 24px; border-radius: 0 var(--radius) var(--radius) 0; margin: 24px 0; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 40px 0; font-size: .9rem; color: var(--ink-2); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 2fr 1fr 1fr; }
.site-footer h4 { color: var(--ink); margin: 0 0 8px; font-size: .95rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { padding: 44px 0 28px; }
  .product { padding: 18px; }
  .product-top { grid-template-columns: 1fr; }
  .proscons { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav { gap: 14px; margin-left: 0; width: 100%; padding-bottom: 10px; }
}

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