/* ==========================================================================
   Self-hosted webfonts — Raleway (latin subset), served from our own origin.
   No external font requests at runtime; font-display: swap keeps text visible
   while the files load.
   ========================================================================== */

@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/raleway-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/raleway-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/raleway-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   Comparison / Listicle Page Template — BeautyFella
   --------------------------------------------------------------------------
   Visual design matched to the approved reference page; code architecture
   is ours (BEM classes, tokens, no inline styles).

   THEME: all theme-feel values — colors, font families/sizes, spacing,
   radii, shadows, meter height, border treatments — are tokens in the
   :root block below; edit only that block to retheme.
   Structural values (grid columns, breakpoints, column widths) are
   intentionally left inline in their rules.
   ========================================================================== */

:root {
  /* ---- Colors (extracted from reference) ---- */
  --color-bg: #ffffff;                       /* page background */
  --color-text: #303030;                     /* body text */
  --color-text-strong: #000000;              /* bold lead sentences, H1 */
  --color-text-muted: #555555;               /* byline, microcopy */
  --color-accent: #0197b2;                   /* teal — section titles, featured card figures */
  --color-topbar-bg: rgba(1, 151, 178, 0.02);/* topbar tint */
  --color-topbar-border: #dfdfdf;            /* topbar bottom border */
  --color-press-bg: #000000;                 /* "As Seen On" strip */
  --color-press-text: #ffffff;

  --color-card-shell: #e8e8e8;               /* gray card background */
  --color-panel: #ffffff;                    /* white sub-cards / content panel */
  --color-badge-gold: #d9a441;               /* #1 rank badge */
  --color-badge-silver: #a9adb1;             /* other rank badges */
  --color-badge-text: #ffffff;

  --color-cta: #f1c232;                      /* gold CTA buttons */
  --color-cta-text: #000000;
  --color-cta-border: #000000;               /* button bottom edge */

  --color-star: #f6bf58;                     /* filled stars */
  --color-star-empty: #c2c2c2;               /* unfilled stars */

  --color-meter-fill: #6aa84f;               /* green score bars */
  --color-meter-track: #eeeeee;
  --color-divider: #cfcfcf;                  /* hairlines inside cards */
  --color-section-rule: #ededed;             /* rules between sections */

  --color-pros: #14c649;                     /* PROS heading */
  --color-cons: #d0021b;                     /* CONS heading */
  --color-check: #6aa84f;                    /* checklist marks */

  --color-banner-bg: #eeeeee;                /* buying-guide title strip */
  --color-guide-good-bg: #d9ead3;            /* green guide panel */
  --color-guide-bad-bg: #f4cccc;             /* red guide panel */

  --color-offer-bg: #fffced;                 /* cream top-pick box */
  --color-offer-border: #033167;             /* navy dashed border */

  --color-footer-bg: #f0f0f0;
  --color-footer-text: #252a32;

  /* ---- Typography (Raleway self-hosted from fonts/ — see @font-face rules
         at the top of this file; system stack is the loading fallback) ---- */
  --font-body: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;

  --fs-body: 18px;        /* body copy */
  --fs-small: 16px;       /* urgency lines */
  --fs-tiny: 14px;        /* topbar link, terms microcopy, footer fineprint */
  --fs-h1: 42px;          /* desktop; scaled down in base/mobile rules */
  --fs-h1-mobile: 30px;
  --fs-lede: 20px;
  --fs-h2: 32px;          /* section titles */
  --fs-h2-lg: 38px;       /* "Our Top 5 …" ranking title */
  --fs-card-title: 30px;  /* card titles #2–#5 */
  --fs-card-title-lg: 34px; /* featured #1 card title */
  --fs-card-subtitle: 22px;
  --fs-score-label: 26px; /* "Overall Grade" / "Rating" */
  --fs-grade: 72px;       /* A+ / B+ … */
  --fs-rating: 50px;      /* 9.7/10 */
  --fs-stars: 30px;
  --fs-btn: 28px;
  --fs-btn-compact: 20px;

  --lh-body: 1.5;
  --lh-tight: 1.2;

  /* ---- Spacing scale ---- */
  --space-1: 5px;
  --space-2: 10px;
  --space-3: 15px;
  --space-4: 20px;
  --space-5: 25px;
  --space-6: 40px;
  --space-7: 60px;

  /* ---- Radii, shadows, component metrics ---- */
  --radius-btn: 8px;
  --radius-round: 999px;
  --shadow-panel: 0 0 10px #c9c9c9;          /* white sub-card shadow */
  --meter-height: 25px;                      /* green bar thickness */
  --btn-edge-width: 2px;                     /* button bottom border */
  --offer-border-width: 3px;                 /* dashed top-pick border */
  --rule-width: 2px;                         /* section rules */
}

/* ==========================================================================
   Base
   ========================================================================== */

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-body);
  line-height: var(--lh-tight);
  overflow-wrap: break-word;
}

p {
  margin: 0 0 var(--space-4);
}

ul {
  margin: 0 0 var(--space-4);
  padding: 0;
}

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

figure {
  margin: 0;
}

a {
  color: var(--color-accent);
}

strong {
  color: var(--color-text-strong);
}

/* ==========================================================================
   Topbar (single slim bar — no separate site header)
   ========================================================================== */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding: 14px 10px;
  background: var(--color-topbar-bg);
  border-bottom: 1px solid var(--color-topbar-border);
}

.topbar__brand {
  margin: 0;
  color: var(--color-accent);
  font-size: var(--fs-lede);
  font-weight: 700;
}

.topbar__meta {
  margin: 0;
  font-size: var(--fs-tiny);
  color: var(--color-text);
}

.topbar__ad-label {
  margin-right: var(--space-2);
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.topbar__link {
  color: var(--color-text);
  text-decoration: underline;
}

/* ==========================================================================
   Page layout — single 850px article column like the reference
   ========================================================================== */

.page {
  padding: var(--space-4) var(--space-3) 50px;
}

.article {
  max-width: 850px;
  margin: 0 auto;
}

.section {
  margin: var(--space-6) 0;
}

.section--ruled {
  border-top: var(--rule-width) solid var(--color-section-rule);
  padding-top: var(--space-5);
}

.section__title {
  color: var(--color-accent);
  font-size: var(--fs-h2);
  font-weight: 700;
}

.section__title--lg {
  font-size: var(--fs-h2-lg);
}

.section__title--dark {
  color: var(--color-text-strong);
}

.section__title--banner {
  color: var(--color-text-strong);
  background: var(--color-banner-bg);
  padding: var(--space-4);
  /* Full-bleed must equal .page side padding (--space-3), or the page scrolls sideways on mobile */
  margin-left: calc(-1 * var(--space-3));
  margin-right: calc(-1 * var(--space-3));
}

/* Bold-label paragraph rows (criteria, "Why it's #1", guide items) */
.lead-item {
  margin-bottom: var(--space-4);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding-top: var(--space-4);
}

.hero__title {
  color: var(--color-text-strong);
  font-size: var(--fs-h1-mobile);
  font-weight: 700;
}

.hero__lede {
  color: var(--color-text-strong);
  font-size: var(--fs-lede);
  line-height: 1.4;
}

.byline {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-4) 0;
}

.byline__avatar {
  border-radius: var(--radius-round);
  flex-shrink: 0;
}

.byline__text {
  margin: 0;
  font-size: var(--fs-tiny);
  line-height: 1.3;
  color: var(--color-text-muted);
}

.hero__media {
  margin-top: var(--space-4);
}

.hero__media img {
  width: 100%;
}

/* ---- Press strip ("As Seen On" black band) ---- */

.press {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
  padding: var(--space-4);
  background: var(--color-press-bg);
  color: var(--color-press-text);
}

.press__label {
  margin: 0;
  font-size: var(--fs-small);
  font-weight: 700;
  text-transform: uppercase;
}

.press__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  margin: 0;
  list-style: none;
}

.press__item {
  font-size: var(--fs-small);
  font-weight: 700;
  opacity: 0.9;
}

/* ==========================================================================
   Product cards — gray shell, white sub-cards (reference design)
   ========================================================================== */

.card {
  position: relative;
  margin: var(--space-4) 0 var(--space-6);
  padding: var(--space-4);
  background: var(--color-card-shell);
}

.card__header {
  position: relative;
  padding: var(--space-2) var(--space-7) var(--space-2) var(--space-2);
  text-align: center;
}

.card__title {
  color: var(--color-text-strong);
  font-size: var(--fs-card-title);
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.card__title--featured {
  font-size: var(--fs-card-title-lg);
  text-decoration: underline;
}

.card__subtitle {
  margin: 0;
  color: var(--color-text-strong);
  font-size: var(--fs-card-subtitle);
}

/* Rank badge (reference uses medal/shield images; CSS circle placeholder) */
.card__badge {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-round);
  background: var(--color-badge-silver);
  color: var(--color-badge-text);
  font-size: var(--fs-lede);
  font-weight: 700;
}

.card__badge--gold {
  background: var(--color-badge-gold);
}

/* ---- Scoreboard: image / grade / rating white cells ---- */

.card__scoreboard {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-4) 0;
}

.scorecell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  background: var(--color-panel);
  box-shadow: var(--shadow-panel);
  text-align: center;
}

.scorecell--media img {
  max-width: 200px;
}

.scorecell__label {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-score-label);
  color: var(--color-text-strong);
}

.scorecell__grade {
  margin: 0;
  font-size: var(--fs-grade);
  font-weight: 700;
  line-height: 1;
  color: var(--color-text-strong);
}

.scorecell__rating {
  margin: 0;
  font-size: var(--fs-rating);
  font-weight: 500;
  line-height: 1;
  color: var(--color-text-strong);
}

/* Featured (#1) card shows its figures in the accent color */
.card--featured .scorecell__label,
.card--featured .scorecell__grade,
.card--featured .scorecell__rating {
  color: var(--color-accent);
}

/* ---- Stars (gold over gray base; partial fill via width utility) ---- */

.stars {
  position: relative;
  display: inline-block;
  margin: var(--space-2) 0 0;
  font-size: var(--fs-stars);
  line-height: 1;
  color: var(--color-star-empty);
}

.stars__base {
  display: block;
  white-space: nowrap;
}

.stars__fill {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--color-star);
}

/* ---- White content panel ---- */

.card__panel {
  padding: var(--space-4);
  background: var(--color-panel);
  box-shadow: var(--shadow-panel);
}

.card__subhead {
  color: var(--color-text-strong);
  font-size: var(--fs-body);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

/* ==========================================================================
   Score meters — green bars, value right-aligned (reference layout)
   ========================================================================== */

.meters {
  margin: var(--space-5) 0;
  padding: var(--space-5) 0;
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}

.meters__row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  margin-bottom: var(--space-3);
}

.meters__row:last-child {
  margin-bottom: 0;
}

.meters__label {
  margin: 0;
  font-weight: 700;
  color: var(--color-text-strong);
}

.meters__value {
  margin: 0;
  font-weight: 700;
  color: var(--color-text-strong);
  text-align: right;
}

.meters__track {
  grid-column: 1 / -1;
  background: var(--color-meter-track);
}

.meters__fill {
  display: block;
  height: var(--meter-height);
  background: var(--color-meter-fill);
}

/* ---- Width utilities (score percentages; reused by stars and meters) ---- */

.u-w-60  { width: 60%; }
.u-w-62  { width: 62%; }
.u-w-69  { width: 69%; }
.u-w-70  { width: 70%; }
.u-w-71  { width: 71%; }
.u-w-73  { width: 73%; }
.u-w-74  { width: 74%; }
.u-w-75  { width: 75%; }
.u-w-78  { width: 78%; }
.u-w-79  { width: 79%; }
.u-w-80  { width: 80%; }
.u-w-83  { width: 83%; }
.u-w-84  { width: 84%; }
.u-w-85  { width: 85%; }
.u-w-86  { width: 86%; }
.u-w-90  { width: 90%; }
.u-w-97  { width: 97%; }
.u-w-98  { width: 98%; }
.u-w-100 { width: 100%; }

/* ==========================================================================
   Pros / Cons — colored headings, indented items (reference layout)
   ========================================================================== */

.proslist__title {
  margin: var(--space-5) 0 var(--space-3);
  font-size: var(--fs-body);
  font-weight: 700;
  text-transform: uppercase;
}

.proslist__title--pros {
  color: var(--color-pros);
}

.proslist__title--cons {
  color: var(--color-cons);
}

.proslist {
  list-style: none;
  margin-bottom: var(--space-4);
}

.proslist__item {
  position: relative;
  padding-left: 45px;
  margin-bottom: var(--space-3);
}

.proslist--pros .proslist__item::before {
  content: "\2713";
  position: absolute;
  left: var(--space-3);
  color: var(--color-pros);
  font-weight: 700;
}

.proslist--cons .proslist__item::before {
  content: "\2715";
  position: absolute;
  left: var(--space-3);
  color: var(--color-cons);
  font-weight: 700;
}

/* ==========================================================================
   CTA blocks & buttons — gold, black text, full-width (reference style)
   ========================================================================== */

.cta {
  margin: var(--space-5) 0;
  text-align: center;
}

.cta__urgency {
  margin-bottom: var(--space-2);
  font-size: var(--fs-small);
  font-weight: 700;
  font-style: italic;
  color: var(--color-text);
}

.cta__terms {
  margin: var(--space-2) 0 0;
  font-size: var(--fs-tiny);
  color: var(--color-text-muted);
}

.btn {
  display: block;
  width: 100%;
  padding: var(--space-4) 30px;
  background: var(--color-cta);
  color: var(--color-cta-text);
  border-bottom: var(--btn-edge-width) solid var(--color-cta-border);
  border-radius: var(--radius-btn);
  font-size: var(--fs-btn);
  font-weight: 500;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.btn--compact {
  display: inline-block;
  width: auto;
  padding: var(--space-3) 60px;
  font-size: var(--fs-btn-compact);
  font-weight: 700;
  text-transform: none;
  border-bottom: none;
}

/* ==========================================================================
   Buying guide panels — green / red tinted blocks (reference style)
   ========================================================================== */

.guide-panel {
  margin: var(--space-4) 0;
  padding: var(--space-4);
}

.guide-panel--good {
  background: var(--color-guide-good-bg);
}

.guide-panel--bad {
  background: var(--color-guide-bad-bg);
}

.guide-panel__title {
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--color-text-strong);
  margin-bottom: var(--space-4);
}

.guide-panel .lead-item:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Final top-pick CTA box — cream, dashed navy border (reference style)
   ========================================================================== */

.offer-box {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--color-offer-bg);
  border: var(--offer-border-width) dashed var(--color-offer-border);
}

.offer-box__media {
  align-self: center;
  justify-self: center;
}

.offer-box__media img {
  max-width: 220px;
}

.offer-box__title {
  color: var(--color-text-strong);
  font-size: var(--fs-card-subtitle);
  font-weight: 700;
}

.checklist {
  list-style: none;
  margin-bottom: var(--space-4);
}

.checklist__item {
  position: relative;
  padding-left: 35px;
  margin-bottom: var(--space-3);
}

.checklist__item::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  border: 1px solid var(--color-check);
  border-radius: var(--radius-round);
  color: var(--color-check);
  font-size: var(--fs-tiny);
  line-height: 22px;
  text-align: center;
}

.cta--compact {
  text-align: center;
  margin-bottom: 0;
}

/* ==========================================================================
   Footer — gray band, small dark-gray text (reference style)
   ========================================================================== */

.footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: var(--space-6) var(--space-4);
}

.footer__inner {
  max-width: 850px;
  margin: 0 auto;
}

.footer__brand {
  text-align: center;
  color: var(--color-accent);
  font-size: var(--fs-lede);
  font-weight: 700;
}

.footer__fineprint {
  text-align: center;
  font-size: var(--fs-tiny);
}

.footer__heading {
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--color-footer-text);
  margin: var(--space-5) 0 var(--space-3);
}

.footer__text {
  font-size: var(--fs-tiny);
}

.footer__copyright {
  margin: var(--space-5) 0 0;
  text-align: center;
  font-size: var(--fs-tiny);
}

.footer__link {
  color: var(--color-footer-text);
}

/* ==========================================================================
   Responsive — mobile-first, two breakpoints
   ========================================================================== */

@media (min-width: 40em) {
  .card__scoreboard {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .meters__row {
    grid-template-columns: 220px 1fr 70px;
  }

  .meters__track {
    grid-column: auto;
  }

  .hero__title {
    font-size: 36px;
  }

  .offer-box {
    grid-template-columns: 1fr 2fr;
    align-items: center;
  }
}

@media (min-width: 64em) {
  .hero__title {
    font-size: var(--fs-h1);
  }
}
