/* ============================================================
   RxRanking — shared stylesheet
   Premium editorial: Fraunces display + Inter body
   ============================================================ */

:root {
  --ink: #14263c;            /* deep navy — headings, footer */
  --ink-soft: #3d4f66;       /* body text */
  --ink-faint: #74839a;      /* meta text */
  --paper: #f7f6f2;          /* warm page background */
  --card: #ffffff;
  --line: #e6e3da;
  --teal: #0e7c66;           /* brand accent */
  --teal-dark: #0a5f4e;
  --teal-tint: #e9f4f0;
  --amber: #f0a626;          /* stars / highlight */
  --cta: #14263c;            /* CTA base */
  --cta-hover: #0e7c66;
  --gold-tint: #fdf4e3;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(20, 38, 60, 0.07);
  --shadow-md: 0 6px 24px rgba(20, 38, 60, 0.09);
  --shadow-lg: 0 14px 44px rgba(20, 38, 60, 0.14);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink-soft);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* ---------- Disclosure bar ---------- */
.disclosure-bar {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  text-align: center;
  padding: 7px 16px;
  line-height: 1.4;
}
.disclosure-bar a { color: #ffffff; text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
}
.logo-mark {
  width: 36px; height: 36px;
  background: var(--ink);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
}
.logo-word {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.logo-word em { font-style: normal; color: var(--teal); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  color: var(--ink-soft);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
}
.nav a:hover { color: var(--teal); }
.nav-cta {
  background: var(--teal);
  color: #fff !important;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--teal-dark); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle svg { width: 26px; height: 26px; stroke: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, #10233c 0%, #14304a 55%, #0e5a4b 130%);
  color: #fff;
  padding: 56px 0 120px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -140px; top: -140px;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 124, 102, 0.35), transparent 65%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8fd6c5;
  margin-bottom: 18px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(32px, 4.6vw, 52px);
  max-width: 720px;
  margin-bottom: 18px;
}
.hero h1 em { font-style: italic; color: #ffd98a; }
.hero-sub {
  max-width: 640px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 26px;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.72);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta svg { width: 15px; height: 15px; flex: none; }

/* ---------- Layout: list + sidebar ---------- */
.page-body { margin-top: -72px; padding-bottom: 40px; position: relative; z-index: 2; }
.page-body.no-pull { margin-top: 0; padding-top: 8px; }
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}
.rank-list { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Rank card ---------- */
.rank-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 190px;
  position: relative;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.rank-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.rank-card.is-top {
  border: 2px solid var(--teal);
  box-shadow: var(--shadow-lg);
}
.top-ribbon {
  position: absolute;
  top: -13px; left: 22px;
  background: var(--teal);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.top-ribbon svg { width: 12px; height: 12px; }
.rank-num {
  position: absolute;
  top: 50%; left: -14px;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--card);
  border: 1.5px solid var(--line);
  color: var(--ink-faint);
  font-size: 13.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}
.rank-card.is-top .rank-num {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.card-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 26px 18px;
  border-right: 1px solid var(--line);
}
.brand-logo {
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-align: center;
  line-height: 1.1;
}
.brand-logo small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 4px;
}
.offer-chip {
  background: var(--gold-tint);
  border: 1px dashed #e3c27c;
  color: #8a6215;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  padding: 5px 10px;
  text-align: center;
  line-height: 1.35;
}

.card-info { padding: 26px 26px 22px; }
.card-tagline {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}
.benefits { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.benefits li {
  position: relative;
  padding-left: 24px;
  font-size: 14px;
  color: var(--ink-soft);
}
.benefits li::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--teal-tint) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%230e7c66" stroke-width="3.4" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') center/9px no-repeat;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.card-tags span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-faint);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}

.card-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 26px 22px;
  border-left: 1px solid var(--line);
  text-align: center;
}
.score-num {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.score-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
}
.stars { display: flex; gap: 2px; }
.stars svg { width: 15px; height: 15px; fill: var(--amber); }
.stars svg.half { fill: url(#half-grad); }
.stars svg.empty { fill: #ddd8cc; }
.review-count { font-size: 12px; color: var(--ink-faint); }
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--cta);
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
  border-radius: 999px;
  padding: 13px 18px;
  margin-top: 6px;
  width: 100%;
  white-space: nowrap;
  transition: background 0.18s ease, transform 0.18s ease;
  text-decoration: none !important;
}
.btn-cta:hover { background: var(--cta-hover); transform: translateY(-1px); }
.btn-cta svg { width: 15px; height: 15px; transition: transform 0.18s ease; }
.btn-cta:hover svg { transform: translateX(3px); }
.rank-card.is-top .btn-cta { background: var(--teal); }
.rank-card.is-top .btn-cta:hover { background: var(--teal-dark); }

/* ---------- Inline promo banner ---------- */
.promo-strip {
  background: var(--teal-tint);
  border: 1px solid #cbe5dc;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 24px;
}
.promo-strip .promo-brand {
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
  flex: none;
}
.promo-strip .promo-text { font-size: 14.5px; font-weight: 600; color: var(--teal-dark); }
.btn-secondary {
  flex: none;
  display: inline-block;
  background: var(--teal);
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 22px;
  text-decoration: none !important;
}
.btn-secondary:hover { background: var(--teal-dark); }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 86px; }
.side-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}
.side-card h3 { font-size: 18px; margin-bottom: 12px; }
.side-offer { text-align: center; border: 2px solid var(--teal); }
.side-offer .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 10px;
}
.side-offer .side-brand { font-size: 30px; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.side-offer .side-deal {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  background: var(--gold-tint);
  border-radius: 10px;
  padding: 10px;
  margin: 12px 0 14px;
}
.side-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.side-list li { display: flex; gap: 10px; font-size: 13.5px; }
.side-list .n {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--teal-tint);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-top: 1px;
}
.side-reads { list-style: none; display: flex; flex-direction: column; }
.side-reads li { border-bottom: 1px solid var(--line); padding: 11px 0; }
.side-reads li:last-child { border-bottom: 0; padding-bottom: 0; }
.side-reads li:first-child { padding-top: 0; }
.side-reads a { color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.4; }
.side-reads a:hover { color: var(--teal); }
.side-reads .read-meta { font-size: 12px; color: var(--ink-faint); margin-top: 3px; }
.social-proof {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 13.5px;
}
.social-proof .pulse {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--teal-tint);
  display: grid;
  place-items: center;
  color: var(--teal);
}
.social-proof strong { color: var(--ink); }

/* ---------- Comparison table ---------- */
.section { padding: 44px 0 8px; }
.section-head { max-width: 700px; margin-bottom: 26px; }
.section-head .kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
}
.section-head h2 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 10px; }
.table-scroll {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
table.compare { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 14px; }
.compare th, .compare td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.compare thead th {
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.compare tbody tr:last-child td { border-bottom: 0; }
.compare tbody tr:hover td { background: #fbfaf7; }
.compare .t-brand { font-weight: 700; color: var(--ink); white-space: nowrap; }
.compare .t-score { font-weight: 700; color: var(--teal-dark); }
.compare .t-link a { font-weight: 600; white-space: nowrap; }

/* ---------- Editorial / article ---------- */
.article { max-width: 720px; }
.article h2 {
  font-size: clamp(24px, 3vw, 30px);
  margin: 44px 0 14px;
  scroll-margin-top: 90px;
}
.article h3 { font-size: 19px; margin: 28px 0 10px; }
.article p { margin-bottom: 14px; font-size: 15.5px; }
.article ul, .article ol { margin: 0 0 14px 22px; font-size: 15.5px; }
.article li { margin-bottom: 6px; }
.article .lede { font-size: 17.5px; color: var(--ink-soft); }
.callout {
  background: var(--teal-tint);
  border-left: 4px solid var(--teal);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  font-size: 14.5px;
  margin: 20px 0;
}
.callout strong { color: var(--teal-dark); }

/* ---------- FAQ ---------- */
.faq { max-width: 720px; }
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--teal);
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-body { padding: 0 20px 17px; font-size: 14.5px; }

/* ---------- Bottom featured ---------- */
.bottom-feature {
  background: linear-gradient(150deg, #10233c, #14304a);
  border-radius: 18px;
  color: #fff;
  padding: 38px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  margin: 48px 0 8px;
}
.bottom-feature .bf-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #8fd6c5;
  margin-bottom: 8px;
}
.bottom-feature h2 { color: #fff; font-size: 28px; margin-bottom: 8px; }
.bottom-feature p { color: rgba(255, 255, 255, 0.8); font-size: 15px; max-width: 480px; }
.bottom-feature .btn-cta { background: var(--amber); color: var(--ink) !important; width: auto; }
.bottom-feature .btn-cta:hover { background: #ffc14d; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.66);
  margin-top: 64px;
  padding: 48px 0 28px;
  font-size: 13.5px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 34px;
}
.site-footer .logo-word { color: #fff; }
.site-footer h4 {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 13px;
}
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.site-footer a { color: rgba(255, 255, 255, 0.66); }
.site-footer a:hover { color: #fff; }
.footer-about { max-width: 320px; line-height: 1.55; }
.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 22px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.45);
}
.footer-legal p { margin-bottom: 8px; }
.legit-seal { display: inline-block; background: #fff; border-radius: 10px; padding: 8px; }
.legit-seal img { display: block; }

/* ---------- Legal / text pages ---------- */
.legal-page { max-width: 760px; margin: 0 auto; padding: 52px 0 24px; }
.legal-page h1 { font-size: clamp(30px, 4vw, 40px); margin-bottom: 8px; }
.legal-page .legal-updated { color: var(--ink-faint); font-size: 14px; margin-bottom: 30px; }
.legal-page h2 { font-size: 22px; margin: 34px 0 10px; scroll-margin-top: 90px; }
.legal-page h3 { font-size: 17px; margin: 22px 0 8px; }
.legal-page p { margin-bottom: 13px; font-size: 15px; }
.legal-page ul { margin: 0 0 13px 22px; font-size: 15px; }
.legal-page li { margin-bottom: 5px; }

/* ---------- Homepage extras ---------- */
.home-hero { padding: 76px 0 88px; text-align: center; }
.home-hero h1 { font-size: clamp(34px, 5vw, 56px); max-width: 820px; margin: 0 auto 20px; }
.home-hero .hero-sub { margin: 0 auto 30px; }
.home-hero .hero-meta { justify-content: center; }
.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--amber);
  color: var(--ink) !important;
  font-size: 16px;
  font-weight: 700;
  border-radius: 999px;
  padding: 15px 34px;
  margin-bottom: 34px;
  text-decoration: none !important;
  transition: transform 0.18s ease, background 0.18s ease;
}
.btn-hero:hover { background: #ffc14d; transform: translateY(-2px); }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.cat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 26px;
  text-decoration: none !important;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
}
.cat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.cat-card .cat-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--teal-tint);
  color: var(--teal);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.cat-card h3 { font-size: 19px; margin-bottom: 6px; }
.cat-card p { font-size: 13.5px; color: var(--ink-faint); }
.cat-card .cat-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--teal);
}
.cat-card.soon { opacity: 0.62; pointer-events: none; }
.soon-badge {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 9px;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.step-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.step-card .step-n {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 10px;
}
.step-card h3 { font-size: 17px; margin-bottom: 8px; }
.step-card p { font-size: 14px; color: var(--ink-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .cols { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .nav {
    display: none;
    position: absolute;
    top: 66px; left: 0; right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px;
    gap: 14px;
    box-shadow: var(--shadow-md);
  }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
  .rank-card { grid-template-columns: 1fr; }
  .card-brand {
    flex-direction: row;
    justify-content: space-between;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 20px 22px 16px 40px;
  }
  .card-info { padding: 20px 22px 6px; }
  .card-action {
    border-left: 0;
    padding: 14px 22px 22px;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "score cta" "stars cta" "count cta";
    column-gap: 18px;
    row-gap: 2px;
    text-align: left;
    align-items: center;
  }
  .score-num { grid-area: score; font-size: 30px; }
  .score-label { display: none; }
  .stars { grid-area: stars; }
  .review-count { grid-area: count; }
  .btn-cta { grid-area: cta; margin-top: 0; }
  .rank-num { left: 8px; top: 20px; transform: none; width: 26px; height: 26px; font-size: 12px; }
  .promo-strip { flex-wrap: wrap; }
  .bottom-feature { grid-template-columns: 1fr; padding: 30px 26px; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 108px; }
}
