/* ============================================================
   WhatPowerFor.com — base styles
   Friendly/practical (Wirecutter-leaning) aesthetic
   ============================================================ */

/* --- Reset & tokens --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, picture, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; }

:root {
  /* Colors */
  --bg: #fafaf7;
  --bg-card: #ffffff;
  --bg-sub: #f3f1ea;
  --text: #1a1a1a;
  --text-muted: #5b6470;
  --text-faint: #8b929c;
  --border: #e5e3dc;
  --border-strong: #c9c7be;
  --primary: #0d4f5a;
  --primary-hover: #1a6b78;
  --primary-soft: #e3f0f2;
  --accent: #f59e0b;
  --accent-soft: #fef3d6;
  --success: #16a34a;
  --danger: #dc2626;
  --warn: #ea580c;

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

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* Shadow */
  --sh-sm: 0 1px 2px rgba(15,23,42,0.05);
  --sh-md: 0 2px 8px rgba(15,23,42,0.08);
  --sh-lg: 0 8px 24px rgba(15,23,42,0.10);

  /* Layout */
  --w-max: 1120px;
  --w-prose: 720px;
}

/* --- Base typography --- */
body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; color: var(--text); }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.625rem; margin-top: var(--s-7); margin-bottom: var(--s-4); }
h3 { font-size: 1.25rem; margin-top: var(--s-6); margin-bottom: var(--s-3); }
h4 { font-size: 1.05rem; margin-top: var(--s-5); margin-bottom: var(--s-2); }
p { margin-bottom: var(--s-4); }
a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--primary-hover); text-decoration-thickness: 2px; }
small { font-size: 0.875rem; color: var(--text-muted); }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--bg-sub); padding: 1px 5px; border-radius: 4px; }

/* --- Layout --- */
.container { max-width: var(--w-max); margin: 0 auto; padding: 0 var(--s-5); }
.prose { max-width: var(--w-prose); margin: 0 auto; padding: 0 var(--s-5); }
/* Section sets only vertical padding so it doesn't clobber .container's horizontal padding when both classes are used. */
.section { padding-top: var(--s-7); padding-bottom: var(--s-7); }
.section-sm { padding-top: var(--s-5); padding-bottom: var(--s-5); }
@media (max-width: 560px) {
  .container { padding-left: var(--s-4); padding-right: var(--s-4); }
  .prose { padding-left: var(--s-4); padding-right: var(--s-4); }
  .section { padding-top: var(--s-5); padding-bottom: var(--s-5); }
}

/* --- Header --- */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(8px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: var(--s-5);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--primary);
  text-decoration: none;
}
.brand:hover { color: var(--primary-hover); text-decoration: none; }
.brand-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
.brand-text {
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.022em;
  line-height: 1;
}
.brand-dot { color: var(--accent); }
.nav-main {
  display: flex;
  gap: var(--s-5);
  font-size: 0.95rem;
}
.nav-main a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: var(--s-2) 0;
  border-bottom: 2px solid transparent;
}
.nav-main a:hover { color: var(--primary); border-bottom-color: var(--accent); }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.nav-toggle:hover { background: var(--bg-sub); border-color: var(--border-strong); }
.nav-toggle svg { width: 22px; height: 22px; display: block; }
.nav-toggle .icon-x { display: none; }
.nav-toggle.open .icon-hamburger { display: none; }
.nav-toggle.open .icon-x { display: block; }

@media (max-width: 768px) {
  .nav-main { display: none; }
  .nav-main.open {
    display: flex;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg-card);
    flex-direction: column;
    padding: var(--s-4) var(--s-5);
    border-bottom: 1px solid var(--border);
    gap: var(--s-3);
    box-shadow: var(--sh-md);
  }
  .nav-toggle { display: inline-flex; }
}

/* --- Hero (homepage) --- */
.hero {
  padding: var(--s-7) 0 var(--s-6);
  background: linear-gradient(180deg, var(--primary-soft) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: 2.5rem; max-width: 720px; margin-bottom: var(--s-4); }
.hero .lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 620px;
  margin-bottom: var(--s-5);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none !important;
  border: 1px solid transparent;
  transition: transform 0.05s, box-shadow 0.15s;
}
.btn:hover { box-shadow: var(--sh-md); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-accent { background: var(--accent); color: #1a1a1a; }
.btn-accent:hover { background: #d97e0b; color: #1a1a1a; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--bg-sub); }
.btn-sm { padding: var(--s-2) var(--s-3); font-size: 0.85rem; }

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--sh-sm);
}
.card-hover:hover { box-shadow: var(--sh-md); transform: translateY(-2px); transition: 0.15s; }
.card-tight { padding: var(--s-4); }

.grid {
  display: grid;
  gap: var(--s-4);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* --- Product card (used on home, scenario pages) --- */
.pcard {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: 0.15s;
}
.pcard:hover { border-color: var(--border-strong); box-shadow: var(--sh-md); transform: translateY(-2px); }
.pcard__img {
  aspect-ratio: 4 / 3;
  background: var(--bg-sub);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.pcard__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard__img .placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 18px; box-sizing: border-box; color: white; }
.pcard__img .placeholder .ph-cap { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; margin-bottom: 4px; }
.pcard__img .placeholder .ph-model { font-size: 1.15rem; font-weight: 800; line-height: 1.05; letter-spacing: -0.01em; }
.pcard__img .placeholder .ph-wh { font-size: 0.78rem; font-weight: 600; opacity: 0.85; margin-top: 4px; }
.pcard__body { padding: var(--s-4) var(--s-5) var(--s-5); }
.pcard__brand { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.pcard__name { font-size: 1.1rem; font-weight: 700; margin: var(--s-1) 0 var(--s-3); }
.pcard__name a { color: var(--text); text-decoration: none; }
.pcard__name a:hover { color: var(--primary); }
.pcard__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2) var(--s-3);
  margin-bottom: var(--s-3);
  font-size: 0.9rem;
}
.pcard__stat { display: flex; flex-direction: column; }
.pcard__stat-label { color: var(--text-muted); font-size: 0.78rem; }
.pcard__stat-value { font-weight: 600; }
.pcard__price { font-size: 1.1rem; font-weight: 700; color: var(--primary); }

/* --- Score badge --- */
.score {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: var(--s-1) var(--s-3);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
}
.score--high { background: #dcfce7; color: #166534; }
.score--mid { background: var(--accent-soft); color: #92400e; }
.score--low { background: #fee2e2; color: #991b1b; }
.score__num { font-size: 1.1rem; }
.score__lbl { font-size: 0.75rem; opacity: 0.7; }

/* --- Product hero (product page) --- */
.phero {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--s-7);
  padding: var(--s-7) 0;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 860px) { .phero { grid-template-columns: 1fr; gap: var(--s-5); } }
.phero__img {
  aspect-ratio: 4 / 3;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.phero__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phero__img .placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 32px; box-sizing: border-box; color: white; }
.phero__img .placeholder .ph-cap { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.75; margin-bottom: 8px; }
.phero__img .placeholder .ph-model { font-size: 2rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.phero__img .placeholder .ph-wh { font-size: 1rem; font-weight: 600; opacity: 0.85; margin-top: 8px; }
.phero__img .placeholder .ph-note { font-size: 0.7rem; opacity: 0.5; margin-top: 12px; font-style: italic; }
.thumb {
  aspect-ratio: 4 / 3;
  background: var(--bg-sub);
  border-radius: var(--r-sm);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 10px; box-sizing: border-box; color: white; }
.thumb .placeholder .ph-model { font-size: 0.78rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; }
.thumb .placeholder .ph-wh { font-size: 0.65rem; font-weight: 600; opacity: 0.85; margin-top: 2px; }
.thumb-lg {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-sub);
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-bottom: var(--s-3);
}
.thumb-lg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-lg .placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 14px; box-sizing: border-box; color: white; }
.thumb-lg .placeholder .ph-model { font-size: 0.95rem; font-weight: 800; line-height: 1; letter-spacing: -0.01em; }
.thumb-lg .placeholder .ph-wh { font-size: 0.72rem; font-weight: 600; opacity: 0.85; margin-top: 4px; }

/* Scenario top-pick cards */
.scenario-pick {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: var(--s-4);
  align-items: center;
  margin-bottom: var(--s-4);
}
.scenario-pick__thumb { width: 100px; aspect-ratio: 4/3; border-radius: var(--r-sm); overflow: hidden; background: var(--bg-sub); }
.scenario-pick__thumb img, .scenario-pick__thumb .placeholder { width: 100%; height: 100%; display: block; }
.scenario-pick__thumb .placeholder { display: flex; flex-direction: column; justify-content: flex-end; padding: 10px; box-sizing: border-box; color: white; }
.scenario-pick__thumb .placeholder .ph-model { font-size: 0.78rem; font-weight: 800; line-height: 1.1; }
.scenario-pick__thumb .placeholder .ph-wh { font-size: 0.62rem; font-weight: 600; opacity: 0.85; margin-top: 2px; }
.scenario-pick__title { margin: 4px 0; font-size: 1.2rem; }
.scenario-pick__tagline { color: var(--text-muted); font-size: 0.95rem; margin: 0; }
.scenario-pick__reality { margin-top: var(--s-2); }
.scenario-pick__meta { text-align: right; min-width: 140px; }
.scenario-pick__runtime { font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.scenario-pick__sub { font-size: 0.82rem; color: var(--text-muted); }
.scenario-pick__price { margin-top: var(--s-2); font-weight: 700; }
.scenario-pick__cta { margin-top: var(--s-2); }
@media (max-width: 640px) {
  .scenario-pick {
    grid-template-columns: 72px 1fr;
    gap: var(--s-3);
  }
  .scenario-pick__thumb { width: 72px; }
  .scenario-pick__meta {
    grid-column: 1 / -1;
    text-align: left;
    min-width: 0;
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: var(--s-3);
    align-items: baseline;
    padding-top: var(--s-3);
    border-top: 1px solid var(--border);
  }
  .scenario-pick__runtime { font-size: 1.15rem; }
  .scenario-pick__price { margin-top: 0; }
  .scenario-pick__cta { margin-top: 0; justify-self: end; }
  .scenario-pick__sub { display: none; }
}

/* Guide index cards (with byline + date) */
.guide-card,
.guide-card:hover,
.guide-card:focus,
.guide-card * {
  text-decoration: none !important;
}
.guide-card {
  display: flex;
  flex-direction: column;
  padding: var(--s-5);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: inherit;
  transition: 0.15s;
}
.guide-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}
.guide-card .gc-kicker {
  font-size: 0.74rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-bottom: var(--s-2);
}
.guide-card .gc-title {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 var(--s-3);
  color: var(--text);
  letter-spacing: -0.01em;
}
.guide-card .gc-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 var(--s-4);
  flex: 1;
}
.guide-card .gc-meta {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-top: var(--s-3);
  border-top: 1px solid var(--border);
}
.guide-card .gc-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}
.guide-card .gc-author { color: var(--text); font-weight: 600; }
.guide-card .gc-sep { opacity: 0.4; padding: 0 2px; }
.guide-card .gc-date { font-variant-numeric: tabular-nums; }

/* Related articles section */
.related-articles { margin: var(--s-7) 0 var(--s-5); padding-top: var(--s-6); border-top: 1px solid var(--border); }
.related-articles h2 { margin-top: 0; }
.related-articles .related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
@media (max-width: 720px) { .related-articles .related-grid { grid-template-columns: 1fr; } }
.related-articles .rel-card {
  display: flex;
  flex-direction: column;
  padding: var(--s-4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  text-decoration: none;
  color: inherit;
  transition: 0.15s;
}
.related-articles .rel-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}
.related-articles .rel-card .rel-kicker { font-size: 0.75rem; color: var(--primary); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin-bottom: var(--s-2); }
.related-articles .rel-card .rel-title { font-size: 1.05rem; font-weight: 700; line-height: 1.3; margin-bottom: var(--s-2); color: var(--text); }
.related-articles .rel-card .rel-desc { font-size: 0.88rem; color: var(--text-muted); margin: 0; line-height: 1.5; }
.phero__brand { font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.9rem; margin-bottom: var(--s-2); }
.phero__title { font-size: 2.1rem; margin-bottom: var(--s-3); }
.phero__tagline { font-size: 1.1rem; color: var(--text-muted); margin-bottom: var(--s-4); }
.phero__keys {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
  margin: var(--s-5) 0;
  padding: var(--s-4);
  background: var(--bg-sub);
  border-radius: var(--r-md);
}
.phero__keys .pcard__stat-label { font-size: 0.82rem; }
.phero__keys .pcard__stat-value { font-size: 1.05rem; }
.phero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-4); }

/* --- Sections, spec tables --- */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  font-size: 0.95rem;
}
.spec-table th, .spec-table td {
  padding: var(--s-3) var(--s-4);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th {
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-sub);
  width: 45%;
}
.spec-table td { font-weight: 500; }
.spec-section-head {
  font-weight: 700;
  background: var(--primary-soft) !important;
  color: var(--primary) !important;
}

/* --- Runtime table --- */
.runtime-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.runtime-table th, .runtime-table td {
  padding: var(--s-3) var(--s-4);
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.runtime-table thead th { background: var(--bg-sub); font-weight: 600; }
.runtime-table tr:last-child td { border-bottom: 0; }
.runtime-table .col-num { text-align: right; font-variant-numeric: tabular-nums; }
.runtime-table .hours { font-weight: 700; color: var(--primary); }

/* --- Spec reality badge --- */
.reality {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  background: var(--bg-sub);
  font-size: 0.85rem;
  margin-left: var(--s-2);
}
.reality__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}
.reality--ok .reality__dot { background: var(--success); }
.reality--warn .reality__dot { background: var(--warn); }
.reality--bad .reality__dot { background: var(--danger); }

/* Narrow inner content wrapper — keeps reading text/forms comfortable
   while the outer .container stays at the global --w-max (1120px). */
.narrow { max-width: 760px; margin: 0 auto; }

/* --- Calculator UI --- */
.calc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  margin: var(--s-5) 0;
}
.calc__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); margin-bottom: var(--s-3); }
@media (max-width: 560px) { .calc__row { grid-template-columns: 1fr; } }
.calc__field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: var(--s-1); }
.calc__field input, .calc__field select {
  width: 100%;
  padding: var(--s-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  font-size: 1rem;
  background: var(--bg-card);
}
.calc__field input:focus, .calc__field select:focus {
  outline: 2px solid var(--primary);
  border-color: var(--primary);
}
.calc__result {
  margin-top: var(--s-5);
  padding: var(--s-5);
  background: var(--primary-soft);
  border-radius: var(--r-md);
  text-align: center;
}
.calc__result-big {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.calc__result-unit { font-size: 1.1rem; color: var(--text-muted); font-weight: 600; }
.calc__hint { font-size: 0.85rem; color: var(--text-muted); margin-top: var(--s-3); }

/* --- Tags --- */
.tag {
  display: inline-block;
  padding: 2px var(--s-3);
  border-radius: 999px;
  background: var(--bg-sub);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: var(--s-2);
}
.tag--ok { background: #dcfce7; color: #166534; }
.tag--warn { background: var(--accent-soft); color: #92400e; }
.tag--info { background: var(--primary-soft); color: var(--primary); }

/* --- Breadcrumb --- */
.crumbs {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: var(--s-3) 0;
}
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--primary); text-decoration: underline; }
.crumbs span { margin: 0 var(--s-2); color: var(--text-faint); }

/* --- Affiliate disclosure --- */
.affil-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: var(--s-3) var(--s-4);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: var(--s-4) 0;
}

/* --- Footer --- */
.site-footer {
  background: var(--bg-sub);
  border-top: 1px solid var(--border);
  padding: var(--s-7) 0 var(--s-5);
  margin-top: var(--s-8);
  font-size: 0.92rem;
  color: var(--text-muted);
}
.site-footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--s-5); }
@media (max-width: 720px) { .site-footer .container { grid-template-columns: 1fr 1fr; } }
.site-footer h5 { color: var(--text); margin-bottom: var(--s-3); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; }
.site-footer ul { display: flex; flex-direction: column; gap: var(--s-2); }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--primary); text-decoration: underline; }
.site-footer__legal {
  border-top: 1px solid var(--border);
  margin-top: var(--s-5);
  padding-top: var(--s-4);
  font-size: 0.8rem;
  text-align: center;
}

/* --- Compare strip (top of compare pages) --- */
.cstrip { display: grid; gap: var(--s-3); padding: var(--s-5) 0; }
.cstrip-2 { grid-template-columns: 1fr 1fr; }
.cstrip-3 { grid-template-columns: repeat(3, 1fr); }
.cstrip-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 720px) { .cstrip-3, .cstrip-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .cstrip-2, .cstrip-3, .cstrip-4 { grid-template-columns: 1fr; } }

.compare-table { overflow-x: auto; }
.compare-table table { width: 100%; min-width: 600px; }

/* ============================================================
   Rich content components (guides, FAQ, diagrams)
   ============================================================ */

/* Callouts */
.callout {
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  margin: var(--s-5) 0;
  border-left: 4px solid;
  background: var(--bg-card);
}
.callout p { margin-bottom: var(--s-2); }
.callout p:last-child { margin-bottom: 0; }
.callout > strong:first-child {
  display: block;
  margin-bottom: var(--s-2);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.callout--info { border-left-color: var(--primary); background: var(--primary-soft); }
.callout--info > strong:first-child { color: var(--primary); }
.callout--warn { border-left-color: var(--warn); background: #fff4ea; }
.callout--warn > strong:first-child { color: var(--warn); }
.callout--key { border-left-color: var(--accent); background: var(--accent-soft); }
.callout--key > strong:first-child { color: #92400e; }
.callout--tip { border-left-color: var(--success); background: #ecfdf5; }
.callout--tip > strong:first-child { color: var(--success); }

/* Pull quote */
.pullquote {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--primary);
  border-left: 4px solid var(--accent);
  padding: var(--s-3) var(--s-5);
  margin: var(--s-6) 0;
  font-style: italic;
}
.pullquote cite {
  display: block;
  font-size: 0.85rem;
  font-style: normal;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: var(--s-2);
}

/* Stat highlight block */
.stat-block {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--s-5);
  background: var(--bg-sub);
  padding: var(--s-5);
  border-radius: var(--r-md);
  margin: var(--s-5) 0;
}
.stat-block .stat-big {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-block .stat-label { font-size: 1.05rem; font-weight: 600; }
.stat-block .stat-sub { font-size: 0.9rem; color: var(--text-muted); margin-top: 4px; }

/* Step-by-step list */
.step-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-5);
  margin: var(--s-5) 0;
}
.step-box ol { counter-reset: step; list-style: none; padding-left: 0; margin: 0; }
.step-box ol li {
  counter-increment: step;
  padding-left: 56px;
  position: relative;
  min-height: 40px;
  margin-bottom: var(--s-4);
}
.step-box ol li:last-child { margin-bottom: 0; }
.step-box ol li::before {
  content: counter(step);
  position: absolute; left: 0; top: -4px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

/* Diagram container */
.diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-5);
  margin: var(--s-5) 0;
  text-align: center;
}
.diagram svg { max-width: 100%; height: auto; display: inline-block; }
.diagram figcaption {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: var(--s-3);
  text-align: center;
  font-style: italic;
}

/* Info grid (mini cards) */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-3);
  margin: var(--s-5) 0;
}
.info-card {
  padding: var(--s-4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.info-card h4 {
  font-size: 0.95rem;
  margin: 0 0 var(--s-2);
  color: var(--primary);
}
.info-card p {
  font-size: 0.92rem;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

/* FAQ accordion */
.faq { margin: var(--s-7) 0 var(--s-6); }
.faq h2 { margin-bottom: var(--s-4); }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: var(--s-2);
  background: var(--bg-card);
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.faq details[open] { box-shadow: var(--sh-sm); border-color: var(--border-strong); }
.faq summary {
  padding: var(--s-4) var(--s-5);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 56px;
  font-size: 1.02rem;
  user-select: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: var(--s-5);
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 400;
  line-height: 1;
  transition: transform 0.15s;
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { background: var(--bg-sub); }
.faq .faq-body {
  padding: var(--s-2) var(--s-5) var(--s-4);
  border-top: 1px solid var(--border);
}
.faq .faq-body p:first-child { margin-top: var(--s-3); }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* Prose styling for guide articles */
.prose > p:first-of-type { font-size: 1.18rem; color: var(--text-muted); line-height: 1.55; }
.prose h2 { padding-top: var(--s-2); }
.prose ul, .prose ol { margin: 0 0 var(--s-4) 1.5em; }
.prose ul li, .prose ol li { margin-bottom: var(--s-2); line-height: 1.6; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-6) 0; }

/* Author byline */
.byline {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: var(--s-2) 0 var(--s-5);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--border);
}
.byline .byline-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
}
.byline strong { color: var(--text); font-weight: 600; }
