/*
Theme Name: Before You Buy
Theme URI: https://beforeyoubuyguide.com
Author: BYB Editorial Team
Description: Apple-derived editorial theme for affiliate buying guides. Custom-built for beforeyoubuyguide.com.
Version: 1.5.0
Requires at least: 6.4
Requires PHP: 7.4
License: Proprietary
Text Domain: byb
*/

/* ==========================================================================
   Before You Buy Guide — design system
   Apple-derived visual language applied to an editorial review site.
   Tokens first, then layout, then components.
   ========================================================================== */

:root {
  /* Apple's actual surface palette: near-white page, warm-grey alternate band. */
  --c-bg:          #ffffff;
  --c-bg-alt:      #f5f5f7;
  --c-bg-dark:     #1d1d1f;

  --c-text:        #1d1d1f;
  --c-text-2:      #6e6e73;
  --c-text-3:      #86868b;
  --c-text-invert: #f5f5f7;

  --c-accent:      #0071e3;
  --c-accent-hover:#0077ed;
  --c-border:      #d2d2d7;
  --c-border-soft: #e8e8ed;

  /* Ratings are the one place colour is allowed to appear. */
  --c-score:       #1d1d1f;
  --c-pro:         #1d7f3f;
  --c-con:         #b32d1f;

  /* Apple ships SF via the system stack; this resolves to it on Mac/iOS
     and degrades to Segoe/Roboto elsewhere without a webfont request. */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Helvetica Neue", "Segoe UI", Roboto, sans-serif;

  --w-page:  1240px;
  --w-text:  692px;   /* ~68 chars at 17px — Apple's reading measure */

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 980px;    /* Apple's literal pill radius value */

  --nav-h: 48px;

  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47059;
  letter-spacing: -0.022em;      /* Apple tracks body text slightly tight */
  color: var(--c-text);
  background: var(--c-bg);
}

img { max-width: 100%; display: block; }
a   { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

/* Visible focus ring — Apple uses a wide soft-blue halo, not a hairline. */
:focus-visible {
  outline: 4px solid rgba(0, 113, 227, 0.4);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--w-page);
  margin-inline: auto;
  padding-inline: 22px;
}

.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;
}

/* --------------------------------------------------------------------------
   Type scale
   -------------------------------------------------------------------------- */

/* Large display type gets progressively tighter tracking — the core trick
   that makes big Apple headlines read as "designed" rather than just big. */
.t-hero {
  font-size: clamp(40px, 5.6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.t-section {
  font-size: clamp(28px, 3.2vw, 40px);
  letter-spacing: -0.028em;
  line-height: 1.1;
}

.t-card {
  font-size: 21px;
  line-height: 1.24;
  letter-spacing: -0.021em;
  font-weight: 600;
}

.t-card-lg {
  font-size: 28px;
  line-height: 1.16;
  letter-spacing: -0.024em;
  font-weight: 600;
}

.t-lead {
  font-size: 21px;
  line-height: 1.42;
  letter-spacing: -0.021em;
  color: var(--c-text-2);
  font-weight: 400;
}

/* Category eyebrow. Wide tracking here is the deliberate counterpoint to the
   tight headline tracking directly beneath it. */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.meta {
  font-size: 13px;
  letter-spacing: -0.01em;
  color: var(--c-text-3);
}

/* --------------------------------------------------------------------------
   Navigation — translucent, blurred, 48px. Apple's global header proportions.
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--c-border-soft);
}

.nav__inner {
  max-width: var(--w-page);
  margin-inline: auto;
  padding-inline: 22px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__brand {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--c-text);
  white-space: nowrap;
}
.nav__brand:hover { text-decoration: none; opacity: 0.75; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0; padding: 0;
  list-style: none;
  flex: 1;
  min-width: 0;                 /* lets the flex child actually shrink */
  overflow-x: auto;
  scrollbar-width: none;        /* nav scrolls, but never shows a bar */
  -ms-overflow-style: none;
}
.nav__links::-webkit-scrollbar { display: none; }

/* Items must never wrap — a two-line header breaks the 48px rhythm. */
.nav__links li { flex: 0 0 auto; }
.nav__links a { white-space: nowrap; }

/* 12px nav links are unusually small by web convention — that restraint is
   precisely what signals the Apple register. */
.nav__links a {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--c-text);
  opacity: 0.8;
  transition: opacity 0.24s var(--ease);
}
.nav__links a:hover { opacity: 1; text-decoration: none; }

.nav__search {
  background: none; border: 0; padding: 4px;
  cursor: pointer; color: var(--c-text); opacity: 0.8;
}
.nav__search:hover { opacity: 1; }

/* --------------------------------------------------------------------------
   Hero — full-bleed lead story
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  background: var(--c-bg-dark);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%; height: 100%;
}

/* Gradient scrim rather than a flat overlay — keeps the image bright at the
   top while guaranteeing text contrast at the bottom. */
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.82) 0%,
    rgba(0,0,0,0.55) 32%,
    rgba(0,0,0,0.12) 62%,
    rgba(0,0,0,0) 100%
  );
}

.hero__content {
  position: relative;
  max-width: var(--w-page);
  margin-inline: auto;
  padding: 0 22px 64px;
  width: 100%;
}

.hero__inner { max-width: 780px; }

.hero .eyebrow { color: #6ab7ff; }

.hero h1 {
  color: #fff;
  margin: 14px 0 18px;
}

.hero__dek {
  font-size: 21px;
  line-height: 1.4;
  letter-spacing: -0.021em;
  color: rgba(255,255,255,0.82);
  margin: 0 0 22px;
  max-width: 620px;
}

.hero__meta { color: rgba(255,255,255,0.6); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.022em;
  border-radius: var(--r-pill);
  border: 0;
  cursor: pointer;
  transition: background 0.24s var(--ease), transform 0.14s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--c-accent);
  color: #fff;
}
.btn--primary:hover { background: var(--c-accent-hover); }

.btn--ghost {
  background: rgba(255,255,255,0.14);
  color: #fff;
  backdrop-filter: blur(12px);
}
.btn--ghost:hover { background: rgba(255,255,255,0.24); }

.btn--sm { padding: 8px 16px; font-size: 14px; }

/* Text link with chevron — Apple's standard inline CTA pattern. */
.link-more {
  font-size: 17px;
  letter-spacing: -0.022em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.link-more::after {
  content: "›";
  font-size: 20px;
  line-height: 1;
  transition: transform 0.24s var(--ease);
}
.link-more:hover { text-decoration: none; }
.link-more:hover::after { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding: 88px 0; }
.section--alt { background: var(--c-bg-alt); }
.section--tight { padding: 56px 0; }

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Article cards
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: 40px 32px;
  grid-template-columns: repeat(3, 1fr);
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card { display: flex; flex-direction: column; }

.card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-bg-alt);
  margin-bottom: 18px;
}

.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.card:hover .card__media img { transform: scale(1.04); }

.card__title {
  margin: 8px 0 10px;
  color: var(--c-text);
}
.card__title a { color: inherit; }
.card__title a:hover { color: var(--c-accent); text-decoration: none; }

.card__dek {
  font-size: 15px;
  line-height: 1.5;
  color: var(--c-text-2);
  margin: 0 0 12px;
}

.card__meta { margin-top: auto; }

/* Score chip that floats over review thumbnails. */
.score-chip {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(29, 29, 31, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  padding: 5px 11px;
  border-radius: var(--r-pill);
}

/* --------------------------------------------------------------------------
   Category pills
   -------------------------------------------------------------------------- */

.pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0; padding: 0;
}

.pill {
  display: inline-block;
  padding: 8px 18px;
  border-radius: var(--r-pill);
  background: var(--c-bg-alt);
  color: var(--c-text);
  font-size: 14px;
  letter-spacing: -0.016em;
  transition: background 0.24s var(--ease);
}
.pill:hover { background: #e8e8ed; text-decoration: none; }
.section--alt .pill { background: #fff; }
.section--alt .pill:hover { background: #ebebf0; }

/* --------------------------------------------------------------------------
   Newsletter — the traffic hedge. Deliberately given full-band prominence.
   -------------------------------------------------------------------------- */

.newsletter {
  background: var(--c-bg-dark);
  color: var(--c-text-invert);
  padding: 88px 0;
  text-align: center;
}

.newsletter h2 { color: #fff; margin-bottom: 14px; }

.newsletter p {
  color: rgba(245,245,247,0.7);
  font-size: 19px;
  line-height: 1.42;
  max-width: 520px;
  margin: 0 auto 32px;
}

.newsletter__form {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin-inline: auto;
}

.newsletter__form input {
  flex: 1;
  padding: 13px 20px;
  font-family: inherit;
  font-size: 17px;
  letter-spacing: -0.022em;
  color: #fff;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r-pill);
}
.newsletter__form input::placeholder { color: rgba(255,255,255,0.45); }
.newsletter__form input:focus {
  outline: none;
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.15);
}

.newsletter__note {
  font-size: 13px;
  color: rgba(245,245,247,0.45);
  margin: 18px auto 0;
}

/* --------------------------------------------------------------------------
   Affiliate disclosure — legally required, styled to be readable not hidden.
   -------------------------------------------------------------------------- */

.disclosure {
  background: var(--c-bg-alt);
  border-radius: var(--r-sm);
  padding: 14px 18px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--c-text-2);
  margin: 0 0 32px;
}
.disclosure strong { color: var(--c-text); font-weight: 600; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  background: var(--c-bg-alt);
  padding: 56px 0 40px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--c-text-2);
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--c-border);
}

.footer h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--c-text);
  margin-bottom: 12px;
}

.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer li a { color: var(--c-text-2); }
.footer li a:hover { color: var(--c-text); }

.footer__legal { padding-top: 24px; }
.footer__legal p { margin: 0 0 10px; max-width: 900px; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 734px) {
  .section { padding: 56px 0; }
  .grid, .grid--2 { grid-template-columns: 1fr; gap: 36px; }
  .hero { min-height: 480px; }
  .hero__content { padding-bottom: 40px; }
  .nav__links { gap: 20px; }
  .newsletter__form { flex-direction: column; }
  .newsletter__form .btn { width: 100%; }
}

/* Respect reduced-motion: kill transforms, keep opacity changes. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover .card__media img { transform: none; }
}

/* ==========================================================================
   Article + review components
   ========================================================================== */

.article-head {
  padding: 56px 0 40px;
  max-width: var(--w-text);
  margin-inline: auto;
}

.article-head h1 {
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.07;
  letter-spacing: -0.028em;
  margin: 14px 0 20px;
}

.article-head .t-lead { margin: 0 0 28px; }

.byline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--c-text-2);
}

.byline__avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c9d2dc, #9aa8b8);
  flex: 0 0 auto;
}

.byline strong { color: var(--c-text); font-weight: 600; }

/* Full-bleed article image */
.article-media {
  margin: 0 0 48px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-bg-alt);
}
.article-media img { width: 100%; }

.article-media figcaption {
  font-size: 13px;
  color: var(--c-text-3);
  padding: 14px 4px 0;
}

/* --------------------------------------------------------------------------
   Verdict card — the commercial centre of gravity on every review.
   Sits high on the page because most readers never reach the bottom.
   -------------------------------------------------------------------------- */

.verdict {
  background: var(--c-bg-alt);
  border-radius: var(--r-lg);
  padding: 36px;
  margin: 0 0 48px;
}

.verdict__top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--c-border);
}

.score-ring {
  position: relative;
  width: 104px; height: 104px;
  flex: 0 0 auto;
}
.score-ring svg { transform: rotate(-90deg); }
.score-ring__val {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 600; letter-spacing: -0.03em;
}

.verdict h2 {
  font-size: 24px;
  letter-spacing: -0.022em;
  margin-bottom: 8px;
}

.verdict__summary {
  font-size: 17px;
  line-height: 1.5;
  color: var(--c-text-2);
  margin: 0;
}

/* Pros / cons */
.proscons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 28px 0;
}

.proscons h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.proscons__pro h3 { color: var(--c-pro); }
.proscons__con h3 { color: var(--c-con); }

.proscons ul { list-style: none; margin: 0; padding: 0; }
.proscons li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.47;
}
.proscons li::before {
  position: absolute;
  left: 0; top: -1px;
  font-size: 15px;
  font-weight: 600;
}
.proscons__pro li::before { content: "+"; color: var(--c-pro); }
.proscons__con li::before { content: "−"; color: var(--c-con); }

/* Buy row */
.buy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 28px;
  border-top: 1px solid var(--c-border);
}

.buy-row__price {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.024em;
}
.buy-row__price span {
  display: block;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--c-text-3);
  margin-top: 2px;
}

.buy-row__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Subscore bars
   -------------------------------------------------------------------------- */

.subscores { padding: 28px 0 0; }

.subscore {
  display: grid;
  grid-template-columns: 190px 1fr 40px;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  font-size: 15px;
}

.subscore__label { color: var(--c-text-2); }

.subscore__track {
  height: 6px;
  border-radius: 3px;
  background: var(--c-border);
  overflow: hidden;
}
.subscore__fill {
  height: 100%;
  border-radius: 3px;
  background: var(--c-text);
}

.subscore__val {
  text-align: right;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.subscore__weight {
  font-size: 12px;
  color: var(--c-text-3);
  margin-left: 6px;
}

/* --------------------------------------------------------------------------
   Prose — article body
   -------------------------------------------------------------------------- */

.prose {
  max-width: var(--w-text);
  margin-inline: auto;
  font-size: 17px;
  line-height: 1.6;
}

.prose > * { margin-block: 0 24px; }

.prose h2 {
  font-size: 30px;
  letter-spacing: -0.024em;
  margin-block: 52px 18px;
}

.prose h3 {
  font-size: 21px;
  letter-spacing: -0.021em;
  margin-block: 36px 12px;
}

.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin-bottom: 10px; }

.prose blockquote {
  margin: 36px 0;
  padding-left: 24px;
  border-left: 3px solid var(--c-text);
  font-size: 21px;
  line-height: 1.42;
  letter-spacing: -0.021em;
}

.prose figure { margin: 40px 0; }
.prose figure img { border-radius: var(--r-md); }
.prose figcaption {
  font-size: 13px;
  color: var(--c-text-3);
  padding-top: 12px;
}

/* --------------------------------------------------------------------------
   Data tables — the original-testing moat, rendered as a first-class element
   -------------------------------------------------------------------------- */

.data-table-wrap {
  max-width: var(--w-text);
  margin: 40px auto;
  overflow-x: auto;          /* wide tables scroll, page never does */
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 520px;
}

.data-table caption {
  text-align: left;
  font-size: 13px;
  color: var(--c-text-3);
  padding-bottom: 12px;
}

.data-table th,
.data-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--c-border-soft);
}

.data-table thead th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-text-2);
  border-bottom: 1px solid var(--c-border);
}

.data-table tbody tr:hover { background: var(--c-bg-alt); }

.data-table td.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.data-table .winner {
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Inline buy box, used mid-article
   -------------------------------------------------------------------------- */

.buy-box {
  max-width: var(--w-text);
  margin: 44px auto;
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 20px;
  align-items: center;
  background: var(--c-bg-alt);
  border-radius: var(--r-md);
  padding: 20px 24px;
}

.buy-box__img {
  width: 96px; height: 96px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: #fff;
}

.buy-box h4 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.021em;
  margin: 0 0 4px;
}

.buy-box p {
  margin: 0;
  font-size: 14px;
  color: var(--c-text-2);
}

/* --------------------------------------------------------------------------
   Comparison table for roundups
   -------------------------------------------------------------------------- */

.compare {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.compare__col {
  background: #fff;
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-md);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
}

.compare__col--best {
  border-color: var(--c-text);
  box-shadow: 0 0 0 1px var(--c-text);
}

.compare__badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: var(--c-text);
  color: #fff;
  margin-bottom: 18px;
}

.compare__img {
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  object-fit: cover;
  margin-bottom: 18px;
  background: var(--c-bg-alt);
}

.compare h3 {
  font-size: 19px;
  letter-spacing: -0.021em;
  margin-bottom: 8px;
}

.compare__score {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.compare__note {
  font-size: 14px;
  line-height: 1.47;
  color: var(--c-text-2);
  margin: 0 0 20px;
}

.compare__spec {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  font-size: 14px;
}
.compare__spec li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--c-border-soft);
}
.compare__spec span:first-child { color: var(--c-text-2); }
.compare__spec span:last-child { font-weight: 500; }

.compare__cta { margin-top: auto; }
.compare__cta .btn { width: 100%; }

/* --------------------------------------------------------------------------
   Table of contents
   -------------------------------------------------------------------------- */

.toc {
  max-width: var(--w-text);
  margin: 0 auto 48px;
  background: var(--c-bg-alt);
  border-radius: var(--r-md);
  padding: 24px 28px;
}

.toc h2 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--c-text-2);
  margin-bottom: 14px;
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.9;
}

/* --------------------------------------------------------------------------
   Responsive overrides for article components
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .compare { grid-template-columns: 1fr; }
}

@media (max-width: 734px) {
  .verdict { padding: 24px; }
  .verdict__top { grid-template-columns: 1fr; gap: 18px; }
  .proscons { grid-template-columns: 1fr; gap: 24px; }
  .buy-row { flex-direction: column; align-items: stretch; }
  .buy-row__actions .btn { width: 100%; }
  .subscore { grid-template-columns: 1fr auto; gap: 8px; }
  .subscore__track { grid-column: 1 / -1; }
  .buy-box { grid-template-columns: 64px 1fr; }
  .buy-box__img { width: 64px; height: 64px; }
  .buy-box .btn { grid-column: 1 / -1; }
  .article-head h1 { font-size: 32px; }
}

/* ==========================================================================
   WordPress integration styles
   ========================================================================== */

/* WP core expects this class for a11y text */
.screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Content images from the editor */
.prose img, .single-content img { border-radius: var(--r-md); height: auto; }
.alignwide { max-width: 980px; margin-inline: auto; }
.alignfull { max-width: none; }

/* Pagination */
.pagination {
  display: flex; gap: 8px; justify-content: center;
  padding: 48px 0 0; font-size: 15px;
}
.pagination .page-numbers {
  padding: 8px 16px; border-radius: var(--r-pill);
  background: var(--c-bg-alt); color: var(--c-text);
}
.pagination .page-numbers.current { background: var(--c-text); color: #fff; }
.pagination a.page-numbers:hover { background: #e8e8ed; text-decoration: none; }

/* Category archive header */
.archive-head { padding: 64px 0 8px; }
.archive-head .t-lead { margin-top: 12px; }

/* Fallback nav (categories) inherits link styling */
.nav__links .cat-item a { display: block; }

/* Search form in 404/search pages */
.searchform { display: flex; gap: 10px; max-width: 460px; }
.searchform input[type="search"] {
  flex: 1; padding: 12px 20px; font-family: inherit; font-size: 17px;
  border: 1px solid var(--c-border); border-radius: var(--r-pill);
}

/* Slim FTC disclosure — legally required on link-bearing pages, kept quiet. */
.disclosure--slim {
  background: none;
  border-radius: 0;
  padding: 0 0 4px;
  margin: 0 auto 28px;
  max-width: var(--w-text);
  font-size: 12px;
  color: var(--c-text-3);
}
.disclosure--slim a { color: var(--c-text-3); text-decoration: underline; }

/* ==========================================================================
   Dark mode — token overrides. Initial data-theme set inline in <head>.
   ========================================================================== */

:root[data-theme="dark"] {
  --c-bg:          #000000;
  --c-bg-alt:      #1d1d1f;
  --c-text:        #f5f5f7;
  --c-text-2:      #a1a1a6;
  --c-text-3:      #86868b;
  --c-border:      #424245;
  --c-border-soft: #2d2d2f;
}

:root[data-theme="dark"] .nav {
  background: rgba(22, 22, 23, 0.8);
  border-bottom-color: var(--c-border-soft);
}
:root[data-theme="dark"] .compare__col { background: var(--c-bg-alt); border-color: var(--c-border-soft); }
:root[data-theme="dark"] .compare__col--best { border-color: var(--c-text); box-shadow: 0 0 0 1px var(--c-text); }
:root[data-theme="dark"] .compare__badge { background: var(--c-text); color: #000; }
:root[data-theme="dark"] .pill { background: var(--c-bg-alt); }
:root[data-theme="dark"] .pill:hover { background: #2d2d2f; }
:root[data-theme="dark"] .section--alt .pill { background: #2d2d2f; }
:root[data-theme="dark"] .subscore__fill { background: var(--c-text); }
:root[data-theme="dark"] .score-chip { background: rgba(245,245,247,0.85); color: #000; }
:root[data-theme="dark"] img { opacity: 0.94; }

/* Theme toggle button */
.nav__theme {
  background: none; border: 0; padding: 4px;
  cursor: pointer; color: var(--c-text); opacity: 0.8;
  display: inline-flex; align-items: center;
}
.nav__theme:hover { opacity: 1; }
.nav__theme .icon-sun { display: none; }
:root[data-theme="dark"] .nav__theme .icon-sun { display: block; }
:root[data-theme="dark"] .nav__theme .icon-moon { display: none; }

/* ==========================================================================
   Search overlay — Wirecutter/9to5Mac expanding pattern
   ========================================================================== */

.search-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.28s var(--ease), visibility 0.28s;
}
.search-overlay.is-open { opacity: 1; visibility: visible; }

.search-overlay__panel {
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border-soft);
  padding: 26px 22px 30px;
  transform: translateY(-12px);
  transition: transform 0.32s var(--ease);
}
.search-overlay.is-open .search-overlay__panel { transform: translateY(0); }

.search-overlay__inner {
  max-width: 720px; margin-inline: auto;
  display: flex; gap: 12px; align-items: center;
}

.search-overlay__inner input[type="search"] {
  flex: 1;
  font-family: inherit;
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: -0.022em;
  padding: 10px 4px;
  color: var(--c-text);
  background: none;
  border: 0;
  border-bottom: 2px solid var(--c-border);
}
.search-overlay__inner input[type="search"]:focus {
  outline: none;
  border-bottom-color: var(--c-accent);
}

.search-overlay__close {
  background: none; border: 0; cursor: pointer;
  font-size: 28px; line-height: 1;
  color: var(--c-text-3); padding: 6px;
}
.search-overlay__close:hover { color: var(--c-text); }

.search-overlay__hint {
  max-width: 720px; margin: 14px auto 0;
  font-size: 13px; color: var(--c-text-3);
}
body.search-open { overflow: hidden; }

/* ==========================================================================
   Motion — scroll reveals and hover lift (JS adds .will-reveal/.in-view;
   reduced-motion users never get the classes)
   ========================================================================== */

.will-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.will-reveal.in-view { opacity: 1; transform: none; }

.card .card__media,
.compare__col {
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card:hover .card__media {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.10);
}
.compare__col:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}
:root[data-theme="dark"] .card:hover .card__media,
:root[data-theme="dark"] .compare__col:hover {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   v1.4.1 polish — legibility, larger product imagery, refined CTA,
   fluid theme transitions
   ========================================================================== */

/* --- Reading comfort --- */
.prose { line-height: 1.65; }
.prose > * { margin-block: 0 26px; }
.prose h2 { margin-block: 64px 20px; }
.prose h3 { margin-block: 44px 14px; }
.article-head { padding-bottom: 48px; }
.article-head .t-lead { margin-bottom: 30px; }

/* --- Buy box v2: bigger image, explicit grid, centered CTA --- */
.buy-box {
  grid-template-columns: 150px 1fr;
  grid-template-areas: "img body" "img cta";
  gap: 10px 28px;
  padding: 26px 28px;
  border-radius: var(--r-md);
  align-items: center;
}
.buy-box__img {
  grid-area: img;
  width: 150px; height: 150px;
  border-radius: 16px;
  object-fit: cover;
}
.buy-box > div { grid-area: body; align-self: end; }
.buy-box h4 { font-size: 18px; margin-bottom: 6px; }
.buy-box p { font-size: 15px; line-height: 1.5; }
.buy-box .btn {
  grid-area: cta;
  justify-self: start;
  align-self: start;
  white-space: nowrap;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 500;
}
.buy-box .btn::after { content: "\2197"; margin-left: 6px; font-size: 0.9em; }

/* Product photos (white studio shots) get contain + white card so nothing
   crops; branded art keeps its full-bleed cover treatment. */
.buy-box__img[src*="prod-"],
.compare__img[src*="prod-"] {
  object-fit: contain;
  background: #ffffff;
  padding: 10px;
}
:root[data-theme="dark"] .buy-box__img[src*="prod-"],
:root[data-theme="dark"] .compare__img[src*="prod-"] { opacity: 1; }

/* Compare cards: larger, uncropped product presentation */
.compare__img { border-radius: var(--r-sm); }
.compare__spec { font-size: 15px; }
.compare__note { font-size: 15px; }
.compare__cta .btn { white-space: nowrap; font-weight: 500; }

/* Tables: more air */
.data-table th, .data-table td { padding: 14px 18px; }

/* --- Fluid theme switching --- */
body, .nav, .buy-box, .compare__col, .footer, .toc, .verdict, .pill,
.data-table tbody tr, .search-overlay__panel, .disclosure {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Mobile buy box: image full-left, CTA full width below */
@media (max-width: 734px) {
  .buy-box {
    grid-template-columns: 96px 1fr;
    grid-template-areas: "img body" "cta cta";
    gap: 14px 18px;
  }
  .buy-box__img { width: 96px; height: 96px; }
  .buy-box .btn { justify-self: stretch; text-align: center; display: flex; justify-content: center; }
}

/* ==========================================================================
   v1.5 — department nav with dropdowns
   ========================================================================== */

/* Dropdowns need the nav to stop clipping on desktop. */
@media (min-width: 735px) {
  .nav__links--depts { overflow: visible; }
}

.nav__links--depts .dept { position: relative; }

.nav__links--depts .dept > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 15px 0;               /* full-height hover target in 48px bar */
}

/* Chevron hint on departments with children */
.dept.has-dropdown > a::after {
  content: "";
  width: 7px; height: 7px;
  border-right: 1.4px solid currentColor;
  border-bottom: 1.4px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.55;
  transition: transform 0.24s var(--ease);
}
.dept.has-dropdown:hover > a::after,
.dept.has-dropdown:focus-within > a::after {
  transform: rotate(225deg) translateY(-1px);
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 224px;
  padding: 10px;
  margin: 0;
  list-style: none;
  background: var(--c-bg);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-md);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.14);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
  z-index: 150;
}
:root[data-theme="dark"] .dropdown {
  background: #1d1d1f;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.dept:hover > .dropdown,
.dept:focus-within > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown li a {
  display: block;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 14px !important;
  letter-spacing: -0.016em;
  color: var(--c-text);
  opacity: 0.85;
  transition: background 0.18s var(--ease), opacity 0.18s var(--ease);
}
.dropdown li a:hover {
  background: var(--c-bg-alt);
  opacity: 1;
  text-decoration: none;
}

.dropdown__all a {
  font-weight: 600;
  color: var(--c-accent) !important;
}
.dropdown__all {
  border-bottom: 1px solid var(--c-border-soft);
  margin-bottom: 6px;
  padding-bottom: 6px;
}

/* Mobile: dropdowns off, departments scroll horizontally (archive pages
   surface the subcategories as pills instead). */
@media (max-width: 734px) {
  .dropdown { display: none; }
  .dept.has-dropdown > a::after { display: none; }
}
