/* Palette taken from the launch poster: periwinkle field, mint bolts, ice-blue lettering, taupe drop shadow. */
:root {
  --periwinkle: #8b91d6;
  --periwinkle-deep: #5d63c4;
  --periwinkle-soft: #e9eafa;
  --mint: #8fd39a;
  --mint-deep: #2f8a4a;
  --ice: #d7e9ee;
  --taupe: #7a6d68;
  --ink: #23224a;
  /* Punch colours: used as tile fills and highlights, always with ink text on top. */
  --violet: #5a48e0;
  --coral: #ff8a6b;
  --sun: #ffcd4d;
  --sky: #74c8f5;
  --lilac: #c9c3ff;

  --bg: #f2f0ff;
  --surface: #ffffff;
  --text: var(--ink);
  --muted: #4f5180;
  --border: #d6d3f5;
  --accent: var(--violet);
  --container: 1440px;
  --gutter: clamp(16px, 4vw, 56px);
  --accent-text: #ffffff;
  --good: #23743d;
  --warn: #8a5a00;
  --bad: #b42318;
  --good-bg: #dff3e3;
  --warn-bg: #fdf1d6;
  --bad-bg: #fde4e1;
  --radius: 14px;
  --font-display: "Titan One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1c3a;
    --surface: #26285a;
    --text: #e6eff3;
    --muted: #b3b8e0;
    --border: #3a3d78;
    --accent: var(--mint);
    --accent-text: #16182f;
    --periwinkle-soft: #2d2f66;
    --good: #8fd39a;
    --warn: #f0c35a;
    --bad: #ff9a8f;
    --good-bg: #1f3b2b;
    --warn-bg: #3d3212;
    --bad-bg: #44201f;
  }
}

:root[data-theme="dark"] {
  --bg: #1b1c3a;
  --surface: #26285a;
  --text: #e6eff3;
  --muted: #b3b8e0;
  --border: #3a3d78;
  --accent: var(--mint);
  --accent-text: #16182f;
  --periwinkle-soft: #2d2f66;
  --good: #8fd39a;
  --warn: #f0c35a;
  --bad: #ff9a8f;
  --good-bg: #1f3b2b;
  --warn-bg: #3d3212;
  --bad-bg: #44201f;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font-body);
  overflow-x: hidden;
}

a { color: var(--accent); text-underline-offset: 2px; }

h1, h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.01em; }

.kicker {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
}

/* Hero band: periwinkle field with mint bolts and chunky ice lettering. */
.hero {
  position: relative;
  overflow: hidden;
  margin: 0 -16px 24px;
  padding: 40px 16px 44px;
  background: linear-gradient(180deg, #a3a8e2 0%, var(--periwinkle) 45%, #7a80cd 100%);
  color: var(--ink);
  text-align: center;
  border-radius: 0 0 28px 28px;
}
.hero .bolts { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero > *:not(.bolts) { position: relative; }
.hero .kicker { color: var(--ink); font-weight: 700; margin: 0 0 12px; }
.hero h1 {
  font-size: clamp(2.1rem, 9vw, 3.6rem);
  line-height: 1.02;
  margin: 0 auto 16px;
  max-width: 14ch;
  color: #ffffff;
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 6px 7px 0 var(--ink);
}
.hero .tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--taupe);
  background: var(--ice);
  border: 2px solid var(--ink);
  padding: 4px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
}
.hero p { max-width: 36rem; margin: 0 auto; font-weight: 500; }
@media (min-width: 992px) {
  .hero { margin: 0 0 28px; border-radius: 28px; }
}

main, .site-header, .site-footer {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 0% 20%, rgba(143, 211, 154, 0.28), transparent 32%),
    radial-gradient(circle at 100% 10%, rgba(255, 205, 77, 0.24), transparent 30%),
    radial-gradient(circle at 100% 85%, rgba(116, 200, 245, 0.22), transparent 32%),
    radial-gradient(circle at 0% 95%, rgba(255, 138, 107, 0.18), transparent 30%);
  background-attachment: fixed;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
  /* Full-bleed periwinkle band behind a centred header. */
  background: var(--periwinkle-soft);
  box-shadow: 0 0 0 100vmax var(--periwinkle-soft);
  clip-path: inset(0 -100vmax);
  border-bottom: 3px solid var(--mint);
}

.brand { font-family: var(--font-display); font-size: 1.25rem; text-decoration: none; color: var(--accent); letter-spacing: 0.01em; }

.site-nav { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.site-footer {
  margin-top: 40px;
  padding-top: 16px;
  padding-bottom: 32px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.notice {
  background: var(--warn-bg);
  color: var(--text);
  padding: 10px 12px;
  border-radius: var(--radius);
}

h1 { font-size: 1.85rem; line-height: 1.15; margin: 22px 0 8px; }
h2 { font-size: 1.35rem; line-height: 1.2; margin: 26px 0 8px; }
h3 { font-size: 1.05rem; margin: 16px 0 6px; }

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

.btn {
  display: inline-block;
  border: 2px solid var(--ink);
  background: var(--accent);
  color: var(--accent-text);
  border-radius: 10px;
  padding: 9px 16px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.secondary { background: var(--surface); color: var(--text); }
.btn:disabled, .btn[aria-disabled] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }

.doors, .cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  min-width: 0;
}

.door {
  display: block;
  text-decoration: none;
  color: var(--text);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--taupe);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.door:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--taupe); }
.door strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; margin-bottom: 4px; color: var(--accent); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin: 12px 0;
}
.filters label { display: inline-flex; gap: 6px; align-items: center; }
select, input[type="number"], input[type="search"], input[type="text"] {
  font: inherit;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  max-width: 100%;
}

.product-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }

.product-card { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; }
.product-card h3 { margin: 0 0 2px; font-size: 1rem; }
.product-card .meta { color: var(--muted); font-size: 0.875rem; }

.score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.15rem;
  border: 3px solid var(--border);
  background: var(--surface);
}
.score.good { border-color: var(--good); color: var(--good); }
.score.warn { border-color: var(--warn); color: var(--warn); }
.score.bad { border-color: var(--bad); color: var(--bad); }

.flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; padding: 0; list-style: none; }
.flag { font-size: 0.8rem; padding: 2px 8px; border-radius: 999px; }
.flag-sources { margin: 6px 0 0; padding-left: 18px; }
.flag-sources a { color: inherit; text-decoration: underline; }
.flag.good { background: var(--good-bg); color: var(--good); }
.flag.warn { background: var(--warn-bg); color: var(--warn); }
.flag.bad { background: var(--bad-bg); color: var(--bad); }
.flag.info { background: var(--border); color: var(--text); }

.compare-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  margin: 16px -16px 0;
}

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; background: var(--surface); font-size: 0.9rem; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--border); }
thead th { position: sticky; top: 0; background: var(--surface); }
th[scope="row"] { font-weight: 600; white-space: nowrap; }

.status-msg { padding: 10px 12px; border-radius: var(--radius); background: var(--warn-bg); }

.breakdown { list-style: none; padding: 0; display: grid; gap: 6px; }
.breakdown li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--border); padding-bottom: 4px; }

.sources { font-size: 0.85rem; word-break: break-word; }

.consent { max-width: 640px; }

@media (max-width: 480px) {
  .product-card { grid-template-columns: auto 1fr; }
  .product-card .pick { grid-column: 1 / -1; }
}

/* ===== Full-width layout, v2 ===== */

/* Hero spans the whole viewport, content sits on the container grid. */
.hero {
  margin: 0 calc(-1 * var(--gutter)) 32px;
  padding: clamp(32px, 6vw, 72px) var(--gutter);
  border-radius: 0 0 32px 32px;
  text-align: left;
}
.hero-grid {
  display: grid;
  gap: 32px;
  align-items: center;
  max-width: var(--container);
  margin: 0 auto;
}
.hero h1 { margin: 0 0 16px; max-width: 13ch; font-size: clamp(2.3rem, 6vw, 4.6rem); }
.hero .hero-lede { max-width: 60ch; margin: 16px 0 24px; font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr); }
}
@media (max-width: 899px) {
  .hero { text-align: center; }
  .hero h1, .hero .hero-lede { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
}

.btn-sun { background: var(--sun); color: var(--ink); }

.pick-card {
  display: grid;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 20px;
  transform: rotate(1.5deg);
}
.pick-card:hover { box-shadow: 10px 10px 0 var(--ink); }
.pick-head { display: flex; gap: 14px; align-items: center; }
.pick-head strong { font-size: 1.1rem; }
.pick-price { margin: 0; font-family: var(--font-display); font-size: 1.4rem; color: var(--violet); }
.pick-more { color: var(--accent); font-weight: 700; }

/* Stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 0 0 32px;
}
.stat {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 2px solid var(--ink);
  color: var(--ink);
}
.stat strong { font-family: var(--font-display); font-weight: 400; font-size: 2.2rem; line-height: 1; }
.stat span { font-weight: 600; }
.stat .stat-note { font-weight: 400; }
.stat-violet { background: var(--lilac); }
.stat-mint { background: var(--mint); }
.stat-coral { background: var(--coral); }
.stat-sun { background: var(--sun); }

/* Doors and category tiles */
.doors { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 8px; }
.doors .door { padding: 24px; font-size: 1.02rem; }
.doors .door strong { font-size: 1.5rem; }
.doors .door-mint { background: var(--mint); color: var(--ink); }
.doors .door-mint strong { color: var(--ink); }
.doors .door-violet { background: var(--violet); color: #fff; }
.doors .door-violet strong { color: #fff; }
.section-title { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 40px 0 16px; }
.cat-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.cat-tile { display: grid; gap: 8px; padding: 22px; min-height: 170px; align-content: start; color: var(--ink); }
.cat-tile strong { color: var(--ink); font-size: 1.35rem; }
.cat-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--surface); color: var(--ink); border: 2px solid var(--ink); }
.tile-meta { font-weight: 600; }
.tile-multivitamin { background: var(--coral); }
.tile-protein { background: var(--sun); }
.tile-single { background: var(--mint); }
.tile-omega3 { background: var(--sky); }

/* How it works */
.how { margin-top: 16px; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 56px 22px 22px;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--lilac);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 16px;
  left: 22px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--violet);
}
.steps strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; margin-bottom: 6px; }

/* Coloured page band for category and product pages */
.page-band {
  margin: 0 calc(-1 * var(--gutter)) 28px;
  padding: 28px var(--gutter) 24px;
  background: var(--lilac);
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
}
.page-band > * { max-width: var(--container); margin-left: auto; margin-right: auto; }
.page-band h1 { margin: 6px auto 8px; font-size: clamp(1.9rem, 4vw, 3rem); }
.page-band .band-sub { font-weight: 600; margin-top: 0; }
.page-band a, .page-band #profile-line { color: var(--ink); }
.band-multivitamin { background: var(--coral); }
.band-protein { background: var(--sun); }
.band-single { background: var(--mint); }
.band-omega3 { background: var(--sky); }

/* Two-column page layouts */
.split { display: grid; gap: 28px; align-items: start; }
.main-col { min-width: 0; }
.main-col > h2:first-child { margin-top: 0; }
@media (min-width: 960px) {
  .split-left { grid-template-columns: 300px minmax(0, 1fr); }
  .split-right { grid-template-columns: minmax(0, 1fr) 360px; }
  .side-panel { position: sticky; top: 16px; }
}
.side-panel { display: grid; gap: 16px; }
.panel-title { margin: 0 0 12px; font-size: 1.3rem; }
.filters.stack { flex-direction: column; align-items: stretch; gap: 14px; margin: 0 0 12px; }
.filters.stack label { display: grid; gap: 6px; font-weight: 600; }
.filters.stack label.check { display: flex; align-items: center; gap: 8px; }
.filters.stack select, .filters.stack input[type="number"] { width: 100%; min-height: 44px; }
.filters-card, .summary-card, .lab-card { border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--lilac); }

.product-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.product-grid .product-card { border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--lilac); height: 100%; }
@media (max-width: 420px) { .product-grid { grid-template-columns: 1fr; } }

.summary-card { display: grid; gap: 14px; }
.summary-score { display: flex; gap: 14px; align-items: center; }
.summary-score .score { min-width: 64px; height: 64px; font-size: 1.5rem; }
.summary-price { display: grid; gap: 2px; }
.summary-price strong { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; color: var(--violet); }
.summary-card .btn { text-align: center; }
.lab-card h3 { margin: 4px 0 8px; font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; }
.lab-pass, .lab-certified { background: var(--good-bg); }
.lab-fail { background: var(--bad-bg); }
.lab-expired, .lab-reported { background: var(--warn-bg); }
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }

/* Score breakdown with meters */
.breakdown li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; border-bottom: 0; padding-bottom: 8px; }
.meter { grid-column: 1 / -1; height: 10px; border-radius: 999px; background: var(--border); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--sky)); }

/* Readable measure for running text inside wide layouts */
.main-col p, .how p, .site-footer p { max-width: 75ch; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --lilac: #3b3586; --bg: #17183a; --violet: #a99cff; }
  :root:not([data-theme="light"]) body {
    background-image:
      radial-gradient(circle at 0% 20%, rgba(143, 211, 154, 0.12), transparent 32%),
      radial-gradient(circle at 100% 10%, rgba(255, 205, 77, 0.1), transparent 30%),
      radial-gradient(circle at 100% 85%, rgba(116, 200, 245, 0.1), transparent 32%);
  }
  :root:not([data-theme="light"]) .doors .door-violet { background: #4a3cc4; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .pick-card { transform: none; }
}

/* Early-access form */
.waitlist { display: grid; gap: 16px; max-width: 760px; }
.field-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.field { display: grid; gap: 6px; font-weight: 600; }
.field input, .field textarea { font: inherit; padding: 10px 12px; min-height: 44px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); width: 100%; }
.choice { display: flex; flex-wrap: wrap; gap: 10px 18px; border: 2px solid var(--ink); }
.choice legend { font-family: var(--font-display); font-size: 1.1rem; padding: 0 6px; }
.choice label { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.consent-line { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.consent-line input { margin-top: 5px; }

/* Market picker */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.market-picker select { font: inherit; min-height: 36px; padding: 4px 8px; border: 2px solid var(--ink); border-radius: 8px; background: var(--surface); color: var(--text); }

/* Worth reading */
.reads { margin: 28px 0 8px; }
.reads-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.read-card { padding: 24px; border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--taupe); background: var(--surface); }
.read-card .kicker { color: var(--accent); }
.read-card h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.4rem; line-height: 1.2; margin: 6px 0 4px; }
.read-card h3 a { color: var(--text); text-decoration: none; }
.read-card h3 a:hover { text-decoration: underline; }
.read-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

/* Sign-in form */
#auth-form { max-width: 520px; }
.linklike { font: inherit; font-weight: 700; color: var(--accent); background: none; border: 0; padding: 4px 0; min-height: 44px; text-decoration: underline; cursor: pointer; }

/* Cookie choice for Microsoft Clarity (js/analytics.js). Accept and Reject are styled alike on purpose. */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  max-width: 720px;
  margin: 0 auto;
  box-shadow: 4px 4px 0 var(--ink);
}
.cookie-banner p { margin: 0 0 12px; }
.cookie-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}
