/* Weight Loss Reviewed — design system
   Editorial "tested & ranked" review site. Deliberately leaner than a
   content-card comparison layout: a scannable scoring chart is the hero. */

:root {
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-soft: #eef2f6;
  --bg: #ffffff;
  --bg-soft: #f7f9fb;
  --bg-sink: #f1f5f9;

  --brand: #0d9488;        /* teal */
  --brand-dark: #0f766e;
  --brand-tint: #ecfdf9;
  --accent: #f59e0b;       /* amber — scores */
  --accent-dark: #b45309;
  --good: #16a34a;
  --bad: #dc2626;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px -12px rgba(15,23,42,.18);
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 2px 8px -4px rgba(15,23,42,.12);
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; color: var(--ink); letter-spacing: -0.02em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 2em 0 .6em; }
h3 { font-size: 1.2rem; margin: 1.5em 0 .4em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.12rem; color: var(--ink); letter-spacing: -0.03em; }
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  display: grid; place-items: center; color: #fff; font-weight: 900; font-size: .95rem;
}
.brand em { color: var(--brand-dark); font-style: normal; }
.nav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--ink-soft); font-weight: 600; font-size: .93rem; }
.nav a:hover { color: var(--brand-dark); text-decoration: none; }
.nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav { position: fixed; inset: 64px 0 auto 0; flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 0; display: none; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 24px; width: 100%; }
  .nav-toggle { display: block; margin-left: auto; background: none; border: 1px solid var(--line);
    border-radius: 8px; width: 40px; height: 38px; font-size: 1.2rem; cursor: pointer; color: var(--ink); }
}

/* ---------- hero ---------- */
.hero { background: linear-gradient(180deg, var(--brand-tint), #fff 78%); border-bottom: 1px solid var(--line-soft); }
.hero .wrap { padding-top: 54px; padding-bottom: 30px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--brand-dark);
  background: #fff; border: 1px solid #cdeee6; padding: 5px 12px; border-radius: 999px; margin-bottom: 16px; }
.hero p.lede { font-size: 1.18rem; color: var(--ink-soft); max-width: 640px; }
.updated { color: var(--muted); font-size: .85rem; margin-top: 6px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: .95rem; padding: 11px 18px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer; transition: transform .05s ease, box-shadow .15s ease; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn-sm { padding: 8px 14px; font-size: .88rem; }
.btn-block { width: 100%; }

/* ---------- comparison chart (home) ---------- */
.chart { display: flex; flex-direction: column; gap: 14px; margin: 26px 0; }
.rowcard {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden; position: relative;
  display: grid; grid-template-columns: 46px 1.6fr 1fr 150px; align-items: stretch;
}
.rowcard.top { border-color: #f4c66b; box-shadow: 0 0 0 1px #f4c66b, var(--shadow); }
.rank { display: grid; place-items: center; background: var(--bg-sink); color: var(--muted);
  font-weight: 800; font-size: 1.05rem; border-right: 1px solid var(--line-soft); }
.rowcard.top .rank { background: linear-gradient(180deg, #fde9bd, #fbdc93); color: var(--accent-dark); }
.cell { padding: 18px 18px; display: flex; flex-direction: column; justify-content: center; }
.cell-main { gap: 8px; }
.provider-name { font-weight: 800; font-size: 1.18rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.provider-name .tier { font-size: .72rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line);
  padding: 2px 7px; border-radius: 6px; letter-spacing: .02em; }
.badge-best { background: var(--accent); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.highlight { font-size: .92rem; color: var(--brand-dark); font-weight: 600; }
.bullets { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.bullets li { position: relative; padding-left: 22px; font-size: .93rem; color: var(--ink-soft); }
.bullets li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--brand); font-weight: 800; }
.cell-score { align-items: center; text-align: center; border-left: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); }
.score-num { font-size: 2.15rem; font-weight: 900; color: var(--ink); line-height: 1; letter-spacing: -0.04em; }
.score-num span { font-size: 1rem; color: var(--muted); font-weight: 700; }
.stars { color: var(--accent); font-size: .95rem; letter-spacing: 1px; margin-top: 4px; }
.score-label { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
.cell-cta { align-items: stretch; justify-content: center; gap: 8px; }

@media (max-width: 820px) {
  .rowcard { grid-template-columns: 40px 1fr; }
  .cell-score { flex-direction: row; gap: 14px; border: none; border-top: 1px solid var(--line-soft);
    justify-content: flex-start; grid-column: 2; padding-top: 12px; }
  .cell-score .score-label { margin: 0; }
  .cell-cta { grid-column: 2; border-top: 1px solid var(--line-soft); padding-top: 0; padding-bottom: 18px; }
  .rank { grid-row: 1 / span 3; }
}

/* ---------- generic sections ---------- */
section { scroll-margin-top: 80px; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section-pad { padding: 44px 0; }
.lead { font-size: 1.1rem; color: var(--ink-soft); }
.muted { color: var(--muted); }
.center { text-align: center; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.card h3 { margin-top: 0; }
.card .kicker { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-dark); }

/* pill/feature lists */
.feature-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 16px; margin: 22px 0; }
.feature { background: var(--bg-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 16px 18px; }
.feature .big { font-size: 1.5rem; font-weight: 800; color: var(--brand-dark); }

/* ---------- versus layout ---------- */
.vs-head { text-align: center; }
.vs-matchup { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; margin: 26px 0; }
.vs-col { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; box-shadow: var(--shadow-sm); }
.vs-col.win { border-color: #f4c66b; box-shadow: 0 0 0 1px #f4c66b, var(--shadow-sm); }
.vs-col .score-num { font-size: 2.6rem; }
.vs-mid { font-weight: 900; color: var(--muted); font-size: 1.4rem; }
@media (max-width: 620px){ .vs-matchup { grid-template-columns: 1fr; } .vs-mid { padding: 4px 0; } }

/* comparison table */
.table-scroll { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: var(--radius); }
table.cmp { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .95rem; }
table.cmp th, table.cmp td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line-soft); }
table.cmp thead th { background: var(--bg-sink); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
table.cmp td.attr { font-weight: 700; color: var(--ink); background: var(--bg-soft); white-space: nowrap; }
table.cmp tr:last-child td { border-bottom: none; }
.yes { color: var(--good); font-weight: 700; }
.no { color: var(--bad); font-weight: 700; }

/* verdict / callout */
.callout { border: 1px solid #cdeee6; background: var(--brand-tint); border-radius: var(--radius); padding: 22px 24px; margin: 24px 0; }
.callout.warn { border-color: #fde3b1; background: #fffaf0; }
.callout h3 { margin-top: 0; }

/* score chip inline */
.chip-score { display: inline-flex; align-items: baseline; gap: 4px; font-weight: 900; color: var(--brand-dark); }

/* article body */
.article-body { font-size: 1.06rem; color: var(--ink-soft); }
.article-body h2 { color: var(--ink); }
.article-body ul, .article-body ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.article-body li { margin-bottom: .5em; }
.article-body a { text-decoration: underline; text-decoration-color: #b7e4da; text-underline-offset: 2px; }
.meta-line { color: var(--muted); font-size: .9rem; margin-bottom: 6px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tag { background: var(--brand-tint); color: var(--brand-dark); font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }

.toc { background: var(--bg-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 16px 20px; margin: 20px 0 28px; }
.toc strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 1.1em; }
.toc a { color: var(--ink-soft); }

/* article grid (list pages) */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin: 24px 0; }
.post-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .12s ease; }
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.post-card .thumb { height: 8px; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.post-card .pc-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card h3 { margin: 0; font-size: 1.12rem; color: var(--ink); }
.post-card p { margin: 0; color: var(--muted); font-size: .93rem; }
.post-card .read { margin-top: auto; color: var(--brand-dark); font-weight: 700; font-size: .88rem; }

/* breadcrumb */
.crumbs { font-size: .85rem; color: var(--muted); padding: 14px 0 0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand-dark); }

/* pros/cons */
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 22px 0; }
.proscons .box { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.proscons .box h4 { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.proscons ul { list-style: none; padding: 0; margin: 0; }
.proscons li { padding-left: 24px; position: relative; margin-bottom: 8px; font-size: .95rem; color: var(--ink-soft); }
.proscons .pros li::before { content: "＋"; position: absolute; left: 0; color: var(--good); font-weight: 800; }
.proscons .cons li::before { content: "－"; position: absolute; left: 2px; color: var(--bad); font-weight: 800; }
@media (max-width: 560px){ .proscons { grid-template-columns: 1fr; } }

/* scorecard */
.scorecard { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 22px 0; }
.scorecard .row { display: grid; grid-template-columns: 1fr 60px 120px; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
.scorecard .row:last-child { border-bottom: none; background: var(--bg-soft); font-weight: 700; }
.scorecard .bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.scorecard .bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-dark)); border-radius: 999px; }
.scorecard .snum { font-weight: 800; text-align: right; color: var(--ink); }

/* CTA strip */
.cta-strip { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #fff; border-radius: var(--radius); padding: 30px 28px; text-align: center; margin: 30px 0; }
.cta-strip h2 { color: #fff; margin: 0 0 8px; }
.cta-strip p { color: rgba(255,255,255,.9); margin: 0 auto 18px; max-width: 520px; }
.cta-strip .btn-primary { background: #fff; color: var(--brand-dark); }
.cta-strip .btn-primary:hover { background: #f0fdfa; color: var(--brand-dark); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #cbd5e1; margin-top: 60px; font-size: .92rem; }
.site-footer .wrap { padding: 46px 20px 30px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 30px; }
.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; margin: 0 0 14px; }
.site-footer a { color: #cbd5e1; display: block; margin-bottom: 9px; }
.site-footer a:hover { color: #fff; }
.site-footer .brand { color: #fff; margin-bottom: 12px; }
.site-footer .brand em { color: #5eead4; }
.foot-disclaim { border-top: 1px solid #1e293b; margin-top: 30px; padding-top: 22px; color: #94a3b8; font-size: .82rem; line-height: 1.7; }
@media (max-width: 680px){ .foot-grid { grid-template-columns: 1fr; gap: 24px; } }

/* affiliate disclosure inline */
.disclosure-note { font-size: .82rem; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 10px 14px; margin: 16px 0; }
.disclosure-note a { color: var(--brand-dark); }
