:root {
  --ink: #0d1530;
  --muted: #5b6380;
  --bg: #ffffff;
  --soft: #f6f4ef;
  --line: #e6e3db;
  --sun: #ffb23d;
  --sun2: #ff7a3d;
  --sky: #bfe3ff;
  --night: #0f1d4a;
  --radius: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Inter', system-ui, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, .logo, .wordmark, .metrics strong, .score strong { font-family: 'DM Sans', sans-serif; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 6vw, 4.2rem); line-height: 1.05; margin: 0 0 16px; font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.1; margin: 0 0 12px; }
h3 { margin: 0 0 6px; font-size: 1.2rem; }
a { color: inherit; }
img { max-width: 100%; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--sun2); margin: 0 0 10px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer; font: 600 1rem 'Inter', sans-serif; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-2px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1d2a55; }
.btn-light { background: #fff; color: var(--ink); }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; margin-top: 12px; }
.btn-sm { padding: 9px 18px; font-size: .9rem; }

/* Top bar & header */
.topbar { background: var(--ink); color: #dfe3f0; font-size: .78rem; text-align: center; padding: 7px 16px; }
.topbar a { color: var(--sun); }
.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.35rem; text-decoration: none; }
.logo em { font-style: normal; font-weight: 500; color: var(--sun2); }
.sun-dot { flex: none; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe08a, var(--sun) 55%, var(--sun2)); box-shadow: 0 0 18px rgba(255,178,61,.6); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:not(.btn):hover { color: var(--sun2); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--ink); }

/* Hero: sunrise sky */
.hero { position: relative; overflow: hidden; padding: 110px 0 120px; background: linear-gradient(180deg, var(--sky) 0%, #e3f1ff 38%, #fff1d6 72%, #ffd9a8 100%); text-align: center; }
.sky { position: absolute; inset: 0; pointer-events: none; }
.sun { position: absolute; left: 50%; bottom: -170px; width: 380px; height: 380px; margin-left: -190px; border-radius: 50%; background: radial-gradient(circle, #ffe08a 0%, var(--sun) 45%, rgba(255,122,61,.0) 70%); filter: blur(2px); animation: rise 3s ease-out both; }
@keyframes rise { from { transform: translateY(120px); opacity: 0; } to { transform: none; opacity: 1; } }
.hero-in { position: relative; }
.hero-sub { font-size: 1.15rem; color: #34405f; margin: 0 0 28px; }

/* Metrics */
.metrics { border-bottom: 1px solid var(--line); }
.metrics-in { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.metrics-in div { padding: 34px 10px; border-right: 1px solid var(--line); }
.metrics-in div:last-child { border-right: 0; }
.metrics strong { display: block; font-size: 2.3rem; background: linear-gradient(90deg, var(--sun2), var(--sun)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.metrics span { color: var(--muted); font-size: .9rem; }

/* Sections */
section { scroll-margin-top: 80px; }
.ranking, .criteria, .faq { padding: 90px 0; }
.sec-head { text-align: center; max-width: 700px; margin: 0 auto 44px; }
.ranking { background: var(--soft); }

/* Cards */
.cards { display: grid; gap: 18px; }
.card { position: relative; display: grid; grid-template-columns: 200px 1fr 210px; gap: 28px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 30px 28px 56px; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 18px 40px rgba(13,21,48,.08); transform: translateY(-2px); }
.card-top { border: 2px solid var(--sun); box-shadow: 0 18px 40px rgba(255,178,61,.18); }
.rank { position: absolute; left: 16px; top: 24px; font: 700 1rem 'DM Sans', sans-serif; color: var(--muted); }
.badge { display: inline-block; font-size: .72rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: #fff1d6; color: #a14f00; margin-bottom: 10px; }
.wordmark { font-size: 2rem; font-weight: 700; line-height: 1; }
.card-body p { margin: 0 0 10px; color: #34405f; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; font-size: .9rem; }
.ticks li::before { content: '✓'; color: var(--sun2); font-weight: 700; margin-right: 8px; }
.card-cta { display: flex; flex-direction: column; align-items: stretch; gap: 10px; text-align: center; }
.score strong { font-size: 2.2rem; display: block; line-height: 1; }
.score span, .card-cta small { color: var(--muted); font-size: .8rem; }

/* How it works: day-to-night */
.how { --p: 0; padding: 90px 0; color: var(--ink); background: linear-gradient(180deg, #fff1d6, #ffd9a8 30%, #6f7fc0 70%, var(--night)); }
.how .sec-head h2 { color: var(--ink); }
.daynight { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.daynight::before { content: ''; position: absolute; left: 4%; right: 4%; top: 22px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #ffe08a, var(--sun2), #6f7fc0, var(--night)); }
.step { position: relative; padding: 60px 22px 26px; border-radius: var(--radius); background: rgba(255,255,255,.82); backdrop-filter: blur(6px); transform: translateY(calc((1 - var(--p)) * 20px)); transition: transform .2s linear; }
.step::before { content: ''; position: absolute; top: 12px; left: 22px; width: 24px; height: 24px; border-radius: 50%; }
.s1::before { background: #ffe08a; box-shadow: 0 0 16px #ffe08a; }
.s2::before { background: var(--sun); box-shadow: 0 0 16px var(--sun); }
.s3::before { background: var(--sun2); box-shadow: 0 0 16px var(--sun2); }
.s4::before { background: #dfe6ff; box-shadow: 0 0 16px #dfe6ff; }
.s4 { background: rgba(15,29,74,.85); color: #fff; }
.s4 p { color: #c8d0ef; }
.time { display: block; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--sun2); margin-bottom: 6px; }
.step p { margin: 0; font-size: .95rem; color: #34405f; }

/* Criteria */
.two-col { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: start; }
.crit-list { list-style: none; margin: 0; padding: 0; }
.crit-list li { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.crit-list span { color: var(--muted); }

/* FAQ */
.faq { background: var(--soft); }
.faq-list { display: grid; gap: 12px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 0 24px; }
.faq-item summary { list-style: none; cursor: pointer; padding: 20px 36px 20px 0; position: relative; font: 600 1.05rem 'DM Sans', sans-serif; }
.faq-item summary::-webkit-details-marker { display: none; }
.plus { position: absolute; right: 0; top: 50%; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%; background: var(--ink); }
.plus::before, .plus::after { content: ''; position: absolute; left: 7px; right: 7px; top: 11px; height: 2px; background: #fff; transition: transform .2s; }
.plus::after { transform: rotate(90deg); }
.faq-item[open] .plus::after { transform: rotate(0); }
.faq-item p { margin: 0 0 20px; color: #34405f; }

/* CTA band */
.cta-band { padding: 80px 0; text-align: center; color: #fff; background: radial-gradient(circle at 50% 120%, var(--sun2), #3a2a6a 45%, var(--night) 75%); }
.cta-band h2 { margin-bottom: 24px; }

/* Inner pages */
.page-hero { padding: 70px 0 40px; background: linear-gradient(180deg, var(--sky), #fff1d6); }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.page-body { padding: 50px 0 80px; }
.prose h2 { font-size: 1.4rem; margin-top: 34px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }

/* Footer */
.footer { background: var(--night); color: #c8d0ef; padding: 60px 0 30px; font-size: .92rem; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.footer h4 { color: #fff; margin: 0 0 12px; }
.footer .foot-grid a:not(.logo) { display: block; text-decoration: none; margin-bottom: 8px; }
.footer a:hover { color: var(--sun); }
.footer .muted { color: #95a0c8; }
.logo-light { color: #fff; }
.disclaimer { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 22px; font-size: .8rem; color: #95a0c8; }

/* Cookie */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 520px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 10px 10px 10px 22px; box-shadow: 0 10px 30px rgba(13,21,48,.15); font-size: .85rem; }
.cookie[hidden] { display: none; }

/* Hero extras: trust row + quick picks */
.trust { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; padding: 0; margin: 0 0 40px; font-size: .9rem; font-weight: 500; color: #34405f; }
.trust li::before { content: '✓'; color: var(--sun2); font-weight: 700; margin-right: 6px; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 900px; margin: 0 auto; }
.quick-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.quick-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(13,21,48,.1); }
.quick-top { border: 2px solid var(--sun); }
.quick-rank { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: #a14f00; }
.quick-logo { height: 48px; display: flex; align-items: center; }
.quick-logo .wordmark { font-size: 1.7rem; }
.quick-score { font-size: .9rem; color: var(--muted); }
.quick-score strong { font: 700 1.3rem 'DM Sans', sans-serif; color: var(--ink); }
.offer { display: inline-block; margin: 0 0 10px; padding: 4px 12px; border-radius: 8px; background: #e7f8f1; color: #0b6b4f; font-size: .85rem; font-weight: 600; }

/* Brand logos */
/* Fixed height so SVGs without intrinsic dimensions still render; width follows the aspect ratio */
.brand-logo { display: block; height: 40px; width: auto; max-width: 160px; object-fit: contain; }
.logo-box { min-height: 52px; display: flex; align-items: center; }
.stars { margin-top: 8px; color: #d9d5cc; letter-spacing: 2px; font-size: 1.05rem; }
.stars .full { color: var(--sun); }
.stars .half { background: linear-gradient(90deg, var(--sun) 50%, #d9d5cc 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -20px 0 28px; }
.chip { font: 500 .9rem 'Inter', sans-serif; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.card[hidden] { display: none; }
.center { text-align: center; }

/* Card details */
.specs { display: grid; gap: 4px; margin: 14px 0 0; font-size: .88rem; }
.specs div { display: flex; gap: 8px; }
.specs dt { font-weight: 600; min-width: 96px; }
.specs dd { margin: 0; color: #34405f; }
.proscons { margin-top: 12px; font-size: .9rem; }
.proscons summary { cursor: pointer; font-weight: 600; color: var(--sun2); }
.pc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; }
.pc-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pros li::before { content: '+'; color: #1fb38a; font-weight: 700; margin-right: 8px; }
.cons li::before { content: '−'; color: #ff5d6c; font-weight: 700; margin-right: 8px; }

/* Comparison table */
.compare { padding: 90px 0; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.ctable { width: 100%; border-collapse: collapse; min-width: 820px; font-size: .92rem; }
.ctable th, .ctable td { padding: 14px 16px; text-align: center; border-bottom: 1px solid var(--line); }
.ctable thead th { background: var(--soft); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ctable tbody tr:last-child > * { border-bottom: 0; }
.ctable tbody th { text-align: left; }
.t-brand { text-decoration: none; display: inline-flex; }
.t-brand .brand-logo { max-height: 30px; max-width: 110px; }
.t-brand .wordmark { font-size: 1.15rem; }
.yes { color: #1fb38a; font-weight: 700; }
.no { color: #b8b4aa; }

/* Medications */
.meds { padding: 90px 0; background: var(--soft); }
.med-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.med { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.med-brand { margin: 0 0 14px; color: var(--sun2); font-weight: 600; font-size: .9rem; }
.med dl { margin: 0; display: grid; gap: 10px; font-size: .9rem; }
.med dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.med dd { margin: 0; font-weight: 600; }
.med-note { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: .88rem; color: #34405f; }
.warn { margin: 24px 0 0; padding: 16px 20px; border-radius: 14px; background: #fff4f0; border: 1px solid #ffd2c2; font-size: .92rem; }

/* Guide */
.guide { padding: 90px 0 60px; }
.guide .prose h3 { margin-top: 30px; font-size: 1.3rem; }
.cause-grid, .alt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 18px auto 10px; max-width: 1000px; }
.alt-grid { grid-template-columns: repeat(3, 1fr); }
.cause, .alt { border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.cause h4, .alt h4 { margin: 0 0 8px; }
.cause ul { margin: 0; padding-left: 18px; font-size: .9rem; color: #34405f; }
.alt p { margin: 0; font-size: .9rem; color: #34405f; }

/* References */
.refs { padding: 50px 0 70px; font-size: .85rem; }
.refs h2 { font-size: 1.3rem; }
.refs li { margin-bottom: 6px; color: var(--muted); }

/* Sticky CTA */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(13,21,48,.08); }
.sticky-cta[hidden] { display: none; }
.sticky-in { display: flex; align-items: center; gap: 16px; height: 68px; }
.sticky-logo .brand-logo { max-height: 32px; max-width: 110px; }
.sticky-logo .wordmark { font-size: 1.3rem; }
.sticky-text { flex: 1; font-size: .9rem; color: var(--muted); }
.sticky-text strong { color: var(--ink); }
.sticky-x { background: none; border: 0; font-size: 1.5rem; line-height: 1; color: var(--muted); cursor: pointer; }
.has-sticky .cookie { bottom: 84px; }
.has-sticky .footer { padding-bottom: 100px; }

/* Responsive */
@media (max-width: 960px) {
  .card { grid-template-columns: 1fr; padding: 28px 24px; text-align: left; gap: 16px; }
  .rank { left: auto; right: 22px; }
  .daynight { grid-template-columns: 1fr 1fr; }
  .daynight::before { display: none; }
  .two-col { grid-template-columns: 1fr; gap: 30px; }
  .med-grid, .cause-grid { grid-template-columns: 1fr 1fr; }
  .alt-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .header .logo { font-size: 1.1rem; }
  .nav { display: none; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 12px; }
  .hero { padding: 80px 0 100px; }
  .metrics-in { grid-template-columns: 1fr 1fr; }
  .metrics-in div:nth-child(2) { border-right: 0; }
  .metrics-in div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .ticks { grid-template-columns: 1fr; }
  .daynight { grid-template-columns: 1fr; }
  .crit-list li { grid-template-columns: 1fr; gap: 4px; }
  .foot-grid { grid-template-columns: 1fr; }
  .cookie { border-radius: 18px; }
  .quick { grid-template-columns: 1fr; max-width: 360px; }
  .pc-grid, .med-grid, .cause-grid, .alt-grid { grid-template-columns: 1fr; }
  .sticky-text { display: none; }
  .sticky-in { justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
