/* ==========================================================================
   SugarFlag — shared site styles
   Tokens and components from the 2026-10 redesign handoff.
   Every page links this file; per-page <style> blocks are gone.
   ========================================================================== */

:root {
  /* Colors */
  --bg: #FFF8EE;
  --ink: #1C2A20;
  --muted: #5A6B5F;
  --muted-2: #3C4A41;
  --green: #2E7D32;
  --green-dark: #1B5E20;
  --green-soft: #E0F2E9;
  --green-light: #7BC47F;
  --flag: #D84B3A;
  --flag-dark: #A8362A;
  --flag-soft: #FBE8E4;
  --line: #E8DFD0;
  --sand: #F6F1EA;
  --white: #FFFFFF;
  --on-green-2: rgba(255, 255, 255, 0.85);
  --on-ink: #FFF8EE;
  --on-ink-2: rgba(255, 248, 238, 0.78);

  /* Aliases read by css/consent.css */
  --primary: var(--green);
  --primary-dark: var(--green-dark);
  --primary-soft: var(--green-soft);
  --surface: var(--white);
  --border: var(--line);
  --text-secondary: var(--muted);

  /* Type */
  --font-body: 'Albert Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Young Serif', Georgia, 'Times New Roman', serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Layout */
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(48px, 7vw, 96px);

  /* Shape */
  --r-pill: 999px;
  --r-photo: 22px;
  --r-hero: 28px;
  --r-panel: 32px;
  --r-tile: 12px;
  --r-callout: 18px;
  --r-code: 16px;

  /* Shadows */
  --shadow-hero: 0 30px 60px -30px rgba(28, 42, 32, 0.35);
  --shadow-pin: 0 8px 24px -8px rgba(28, 42, 32, 0.4);
  --shadow-btn: 0 10px 24px -10px rgba(46, 125, 50, 0.6);
  --shadow-card: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
pre {
  margin: 0;
}

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

h1 {
  letter-spacing: -0.015em;
}

h3,
h4 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

a {
  color: var(--green);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

a:hover {
  color: var(--green-dark);
}

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

img {
  height: auto;
}

strong {
  font-weight: 600;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 0;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 0 0 var(--r-tile) 0;
}

.skip-link:focus {
  top: 0;
  color: var(--on-ink);
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  padding-top: var(--section);
}

.section-last {
  padding-bottom: var(--section);
}

.page {
  padding-top: clamp(24px, 5vw, 56px);
  padding-bottom: var(--section);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.section-head h2 {
  font-size: clamp(30px, 3.6vw, 46px);
}

.section-head p {
  color: var(--muted);
  font-size: 16px;
}

.lead {
  color: var(--muted);
  font-size: 18px;
  text-wrap: pretty;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-weight: 600;
  font-size: 16px;
}

.text-link svg {
  width: 16px;
  height: 16px;
}

.text-link-sm {
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: relative;
  padding: 18px var(--gutter);
}

.site-nav {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.logo:hover {
  color: var(--ink);
}

.logo-icon {
  width: 30px;
  height: 30px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--green);
}

.nav-links a.is-active {
  font-weight: 600;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--green);
  color: var(--white);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 26px;
  border: 0;
  border-radius: var(--r-pill);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background: var(--green-dark);
  color: var(--white);
}

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

.btn-ink:hover {
  background: var(--green);
  color: var(--white);
}

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

.btn-inverted:hover {
  background: var(--white);
  color: var(--ink);
}

.btn-sm {
  font-size: 15px;
  padding: 13px 22px;
}

.btn-sm svg {
  width: 16px;
  height: 16px;
}

.btn-xs {
  font-size: 14px;
  padding: 11px 18px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn:focus-visible {
  outline-color: currentColor;
}

/* Small store text links under a primary button */
.store-links {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
}

.store-links a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.store-links a:hover {
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Flag icon
   -------------------------------------------------------------------------- */

.flag-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--flag);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--white);
}

.flag-dot svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.flag-dot-green {
  background: var(--green);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px var(--gutter) 32px;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 280px;
}

.footer-brand .logo {
  font-size: 17px;
}

.footer-brand .logo-icon {
  width: 26px;
  height: 26px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--muted);
}

.footer-cols {
  display: flex;
  gap: clamp(24px, 5vw, 72px);
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}

.footer-heading {
  font-weight: 600;
}

.footer-col a {
  color: var(--muted);
}

.footer-col a:hover {
  color: var(--green);
}

.footer-bottom {
  max-width: var(--container);
  margin: 32px auto 0;
  font-size: 13px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Landing — hero
   -------------------------------------------------------------------------- */

.hero {
  padding-top: clamp(32px, 6vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero h1 {
  font-size: clamp(40px, 5.2vw, 68px);
  line-height: 1.02;
}

.hero h1 .flag-word {
  color: var(--flag);
}

.hero .lead {
  font-size: clamp(17px, 1.4vw, 20px);
  max-width: 440px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.hero-note {
  font-size: 14px;
  color: var(--muted);
}

.hero-visual {
  position: relative;
}

.hero-photo {
  border-radius: var(--r-hero);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--line);
  box-shadow: var(--shadow-hero);
}

.hero-photo img,
.hero-photo picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  color: var(--pin, var(--flag));
}

.pin-label {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border-radius: var(--r-pill);
  padding: 8px 12px 8px 10px;
  box-shadow: var(--shadow-pin);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.pin-label .flag-dot {
  background: currentColor;
}

.pin-label .flag-dot svg {
  fill: var(--white);
}

.pin-label b {
  color: var(--ink);
  font-weight: 600;
}

.pin-label em {
  font-style: normal;
  color: currentColor;
}

.pin-stem {
  width: 2px;
  height: 22px;
  background: var(--white);
}

.pin-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 0 3px currentColor;
}

/* Landing — fact strip */

.fact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.fact-stat {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.fact-stat .flag-word {
  color: var(--flag);
}

.fact-text {
  font-size: 17px;
  color: var(--muted);
  max-width: 460px;
  text-wrap: pretty;
}

/* Landing — how it works */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.step-photo {
  border-radius: var(--r-photo);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--line);
}

.step-photo picture,
.step-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.step-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.step-num {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--green);
  line-height: 1.2;
  min-width: 28px;
}

.step h3 {
  font-size: 20px;
  margin-bottom: 6px;
}

.step p {
  color: var(--muted);
  font-size: 15px;
  text-wrap: pretty;
}

/* Landing — scan result panel */

.scan-panel {
  background: var(--ink);
  color: var(--on-ink);
  border-radius: var(--r-panel);
  padding: clamp(28px, 4vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}

.scan-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.scan-copy h2 {
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.08;
}

.scan-copy p {
  color: var(--on-ink-2);
  font-size: 17px;
  max-width: 420px;
  text-wrap: pretty;
}

.dot-list {
  list-style: none;
  padding: 0;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 15px;
}

.dot-list li {
  display: flex;
  gap: 12px;
  align-items: center;
}

.dot-list li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-light);
  flex-shrink: 0;
}

.scan-card {
  background: var(--white);
  color: var(--ink);
  border-radius: 24px;
  padding: 24px;
  max-width: 420px;
  width: 100%;
  justify-self: center;
  box-shadow: var(--shadow-card);
}

.scan-product {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.scan-thumb {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--line);
}

.scan-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 40%;
}

.scan-name {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.scan-time {
  font-size: 14px;
  color: var(--muted);
}

.scan-verdict {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--flag);
  color: var(--white);
  border-radius: var(--r-tile);
  padding: 12px 14px;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 14px;
}

.scan-verdict svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.scan-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.scan-stat {
  background: var(--sand);
  border-radius: var(--r-tile);
  padding: 12px 14px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.scan-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.scan-bar {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--sand);
  overflow: hidden;
  margin-bottom: 16px;
}

.scan-bar span {
  display: block;
  height: 100%;
  width: 77%;
  background: var(--flag);
  border-radius: var(--r-pill);
}

.scan-sources {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-flag {
  background: var(--flag-soft);
  color: var(--flag-dark);
  border-radius: var(--r-pill);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
}

/* Landing — sugar names */

.names {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}

.names-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.names-copy h2 {
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.08;
}

.names-copy p {
  color: var(--muted);
  font-size: 17px;
  text-wrap: pretty;
}

.names-copy .text-link {
  margin-top: 4px;
}

.chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-block;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
  border-radius: var(--r-pill);
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 500;
}

a.chip:hover {
  border-color: var(--green);
  color: var(--green);
}

/* Post cards (landing, blog index, related) */

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.post-grid-fill {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(24px, 3vw, 40px) 24px;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--ink);
}

.post-card:hover {
  color: var(--ink);
}

.post-card:hover h3 {
  color: var(--green);
}

.post-photo {
  border-radius: var(--r-photo);
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--line);
}

.post-photo picture,
.post-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-meta {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.post-card h3 {
  font-size: 20px;
  line-height: 1.3;
  text-wrap: pretty;
  transition: color 0.15s ease;
}

.post-card p {
  color: var(--muted);
  font-size: 15px;
  text-wrap: pretty;
}

/* Landing — download panel */

.download-panel {
  background: var(--green);
  color: var(--white);
  border-radius: var(--r-panel);
  padding: clamp(36px, 5vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
}

.download-panel h2 {
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.08;
  margin-bottom: 10px;
}

.download-panel p {
  font-size: 17px;
  color: var(--on-green-2);
}

.download-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.download-actions .store-links {
  color: var(--on-green-2);
}

.download-actions .store-links a:hover {
  color: var(--white);
}

/* --------------------------------------------------------------------------
   Blog index
   -------------------------------------------------------------------------- */

.page-head {
  max-width: 640px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.page-head h1 {
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.04;
  margin-bottom: 16px;
}

.featured {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  margin-bottom: clamp(40px, 6vw, 72px);
  color: var(--ink);
}

.featured:hover {
  color: var(--ink);
}

.featured-photo {
  border-radius: var(--r-hero);
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--line);
}

.featured-photo picture,
.featured-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.featured-copy h2 {
  font-size: clamp(26px, 2.8vw, 36px);
  line-height: 1.12;
  transition: color 0.15s ease;
}

.featured:hover h2 {
  color: var(--green);
}

.featured-copy p {
  color: var(--muted);
  font-size: 16px;
  text-wrap: pretty;
}

.pill-latest {
  background: var(--green-soft);
  color: var(--green-dark);
  border-radius: var(--r-pill);
  padding: 4px 10px;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Article
   -------------------------------------------------------------------------- */

.article {
  padding-top: clamp(16px, 4vw, 40px);
  padding-bottom: var(--section);
}

.article-head {
  max-width: 760px;
  margin: 0 auto 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  align-self: flex-start;
}

.back-link:hover {
  color: var(--green);
}

.back-link svg {
  width: 14px;
  height: 14px;
}

.article-head h1 {
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.06;
}

.article-sub {
  font-size: 19px;
  color: var(--muted);
  text-wrap: pretty;
}

.article-meta {
  display: flex;
  gap: 6px 12px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
}

.article-meta > * + *::before {
  content: '·';
  margin-right: 12px;
}

.article-meta .author-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.article-hero {
  border-radius: var(--r-hero);
  overflow: hidden;
  aspect-ratio: 21 / 9;
  background: var(--line);
  margin-bottom: clamp(32px, 5vw, 56px);
}

.article-hero picture,
.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-body > * {
  margin: 0;
}

.article-body h2 {
  font-size: 30px;
  line-height: 1.15;
  margin-top: 20px;
}

.article-body > h2:first-child {
  margin-top: 12px;
}

.article-body h3 {
  font-size: 22px;
  margin-top: 8px;
}

.article-body ul,
.article-body ol {
  padding-left: 22px;
}

.article-body li + li {
  margin-top: 8px;
}

.article-body li ul,
.article-body li ol {
  margin-top: 6px;
}

.article-body li::marker {
  color: var(--green);
}

.article-body pre {
  background: var(--ink);
  color: var(--on-ink);
  padding: 18px 22px;
  border-radius: var(--r-code);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
}

.article-body code {
  font-family: var(--font-mono);
}

.article-body figure {
  margin-top: 8px;
}

.article-figure {
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--line);
}

.article-figure picture,
.article-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-body figcaption {
  font-size: 14px;
  color: var(--muted);
  margin-top: 10px;
}

.article-body a:not(.btn):not(.post-card):not(.chip) {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.callout {
  background: var(--green-soft);
  border-radius: var(--r-callout);
  padding: 22px 24px;
  font-size: 17px;
}

.callout .label {
  color: var(--green-dark);
}

.callout .label-block {
  display: block;
  margin-bottom: 4px;
}

.callout-flag {
  background: var(--flag-soft);
}

.callout-flag .label {
  color: var(--flag-dark);
}

.callout p + p {
  margin-top: 8px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  font-size: 16px;
}

.info-box {
  border: 1.5px solid var(--line);
  border-radius: var(--r-callout);
  padding: 20px 22px;
  background: var(--white);
}

.info-box > strong:first-child {
  display: block;
  margin-bottom: 8px;
}

.info-box ul {
  padding-left: 20px;
  color: var(--muted);
}

.info-box li + li {
  margin-top: 4px;
}

.info-box p + p {
  margin-top: 6px;
}

.info-box p {
  color: var(--muted);
}

.info-box p strong {
  color: var(--ink);
}

.eyebrow-pill {
  align-self: flex-start;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: var(--r-pill);
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-top: 12px;
}

.eyebrow-pill + h2 {
  margin-top: 0;
}

.inline-cta {
  background: var(--green);
  color: var(--white);
  border-radius: 24px;
  padding: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 15px;
}

.inline-cta-copy {
  max-width: 420px;
}

.inline-cta strong {
  display: block;
  font-size: 19px;
  margin-bottom: 4px;
}

.inline-cta span {
  color: var(--on-green-2);
}

.inline-cta a:not(.btn) {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pull-quote {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.3;
  color: var(--green);
  text-wrap: pretty;
}

.author {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  border-top: 1px solid var(--line);
  padding-top: 28px;
  margin-top: 20px;
  font-size: 15px;
  line-height: 1.55;
}

.avatar-lg {
  width: 52px;
  height: 52px;
  font-size: 20px;
}

.author strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.author span {
  color: var(--muted);
}

.related {
  margin-top: clamp(48px, 7vw, 80px);
}

.related h2 {
  font-size: 30px;
  margin-bottom: 24px;
}

.credits {
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

/* Article — printable checklist */

.checklist {
  border: 2px solid var(--green);
  border-radius: 24px;
  padding: clamp(22px, 3vw, 32px);
  margin-top: 20px;
  background: var(--white);
}

.checklist-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.checklist-head h2 {
  font-size: 26px;
  line-height: 1.15;
  margin: 0 0 4px;
}

.checklist-head span {
  font-size: 14px;
  color: var(--muted);
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  font-size: 15px;
}

.check-box {
  background: var(--bg);
  border-radius: 16px;
  padding: 18px 20px;
}

.check-box > strong {
  display: block;
  margin-bottom: 10px;
}

.check-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.4;
}

.checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--green);
  border-radius: 5px;
  flex-shrink: 0;
  margin-top: 2px;
}

.decisions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.decision {
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  padding: 8px 14px;
}

/* Article — food list (processed foods post) */

.category {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.category > h2 {
  margin-top: 20px;
}

.category > p {
  color: var(--muted);
  font-size: 17px;
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.food-item {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--r-tile);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  line-height: 1.3;
}

.food-amt {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}

.sugar-high {
  background: var(--flag-soft);
  color: var(--flag-dark);
}

.sugar-medium {
  background: var(--sand);
  color: var(--muted-2);
}

.sugar-low {
  background: var(--green-soft);
  color: var(--green-dark);
}

.stat-panel {
  background: var(--ink);
  color: var(--on-ink);
  border-radius: var(--r-callout);
  padding: 22px 24px;
}

.stat-panel h3 {
  font-size: 16px;
  margin: 0 0 14px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat {
  background: rgba(255, 248, 238, 0.08);
  border-radius: var(--r-tile);
  padding: 12px 14px;
}

.stat .eyebrow {
  color: var(--on-ink-2);
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Article — methods (sugar testing post) */

.method {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--r-callout);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 16px;
}

.method-featured {
  border: 2px solid var(--green);
}

.method-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.method h3 {
  font-size: 20px;
  margin: 0;
}

.method ul {
  padding-left: 22px;
}

.method li + li {
  margin-top: 6px;
}

.method .callout {
  font-size: 16px;
  padding: 18px 20px;
}

.method .article-figure {
  aspect-ratio: 3 / 2;
}

.num-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 14px;
}

.pros,
.cons {
  border-radius: 14px;
  padding: 14px 16px;
}

.pros {
  background: var(--green-soft);
}

.cons {
  background: var(--flag-soft);
}

.pros strong {
  color: var(--green-dark);
}

.cons strong {
  color: var(--flag-dark);
}

.pros ul,
.cons ul {
  margin-top: 6px;
  padding-left: 18px;
}

.pros li + li,
.cons li + li {
  margin-top: 4px;
}

.method-divider {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 12px;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.4;
}

.table th,
.table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table th {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.table-highlight {
  background: var(--green-soft);
}

/* --------------------------------------------------------------------------
   Support
   -------------------------------------------------------------------------- */

.support-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.support-head h1 {
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.04;
}

.support-head > div {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.side-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: start;
}

.side-layout-legal {
  grid-template-columns: 240px minmax(0, 1fr);
}

.side-nav {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 15px;
}

.side-nav a {
  color: var(--muted);
}

.side-nav a:hover {
  color: var(--green);
}

.side-nav a.is-active {
  color: var(--ink);
  font-weight: 500;
}

.side-content {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 5vw, 64px);
  max-width: 720px;
  font-size: 17px;
  line-height: 1.65;
}

.side-content section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-content h2 {
  font-size: 30px;
  line-height: 1.15;
}

.steps {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.steps li {
  display: flex;
  gap: 14px;
}

.steps .num-circle {
  margin-top: 3px;
}

.tab-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  font-size: 15px;
  line-height: 1.5;
}

.tab-card {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--r-callout);
  padding: 20px;
}

.tab-card svg {
  width: 22px;
  height: 22px;
  stroke: var(--green);
  margin-bottom: 12px;
}

.tab-card strong {
  display: block;
  margin-bottom: 4px;
}

.tab-card span {
  color: var(--muted);
}

.faq {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.faq-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.faq-item h3 {
  font-size: 19px;
  margin: 0 0 8px;
}

.faq-item p {
  color: var(--muted);
  font-size: 16px;
}

.ink-cta {
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 24px;
  padding: clamp(24px, 3vw, 36px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 15px;
}

.ink-cta strong {
  display: block;
  font-size: 20px;
  margin-bottom: 4px;
}

.ink-cta span {
  color: rgba(255, 248, 238, 0.75);
}

/* --------------------------------------------------------------------------
   Legal
   -------------------------------------------------------------------------- */

.switch {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  font-size: 14px;
  flex-wrap: wrap;
}

.switch-item {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  color: var(--ink);
  border-radius: var(--r-pill);
  padding: 8px 16px;
  font-weight: 500;
}

a.switch-item:hover {
  border-color: var(--green);
  color: var(--green);
}

.switch-item.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
  font-weight: 600;
}

.legal-head {
  max-width: 720px;
  margin-bottom: clamp(32px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.legal-head h1 {
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.04;
}

.legal-date {
  font-size: 14px;
  color: var(--muted);
}

.toc {
  font-size: 14px;
  gap: 10px;
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.toc a {
  display: flex;
  gap: 10px;
}

.toc-num {
  color: var(--green);
  font-weight: 600;
  min-width: 20px;
}

.legal-body {
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 4vw, 48px);
  max-width: 720px;
  font-size: 16px;
  line-height: 1.7;
}

.legal-body section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legal-body h2 {
  font-size: 26px;
  line-height: 1.15;
  display: flex;
  gap: 14px;
}

.legal-body h2 .num {
  color: var(--green);
}

.legal-body h3 {
  font-size: 18px;
  margin-top: 8px;
}

.legal-body ul {
  padding-left: 22px;
  color: var(--muted-2);
}

.legal-body li + li {
  margin-top: 6px;
}

.legal-body li ul {
  margin-top: 6px;
}

.legal-foot {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-size: 15px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Utility pages (thank-you, verify, reset, delete account)
   -------------------------------------------------------------------------- */

.util {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.util-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vw, 64px) var(--gutter);
}

.util-card {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.util-card h1 {
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.08;
}

.util-card p {
  font-size: 17px;
  color: var(--muted);
  text-wrap: pretty;
}

.util-card .small {
  font-size: 14px;
}

.util-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--green-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.util-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--green);
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.util-icon-flag {
  background: var(--flag-soft);
}

.util-icon-flag svg {
  width: 30px;
  height: 30px;
  stroke: var(--flag);
  stroke-width: 2.4;
}

.spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid var(--line);
  border-top-color: var(--green);
  animation: sf-spin 0.8s linear infinite;
}

@keyframes sf-spin {
  to {
    transform: rotate(360deg);
  }
}

.util-state {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.util-state.is-active {
  display: flex;
}

.form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin-top: 8px;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.form input {
  font-family: inherit;
  font-size: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
  outline: none;
  width: 100%;
  transition: border-color 0.15s ease;
}

.form input:focus {
  border-color: var(--green);
}

.form .btn {
  margin-top: 6px;
}

.form-error {
  display: none;
  width: 100%;
  background: var(--flag-soft);
  color: var(--flag-dark);
  border-radius: var(--r-tile);
  padding: 12px 16px;
  font-size: 14px;
  text-align: left;
}

.form-error.is-visible {
  display: block;
}

.util-footer {
  padding: 24px var(--gutter);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* Delete-account: utility shell with a reading column */

.util-doc {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 40px);
  font-size: 16px;
  line-height: 1.7;
  align-self: flex-start;
}

.util-doc h1 {
  font-size: clamp(32px, 4.6vw, 48px);
  line-height: 1.06;
}

.util-doc header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.util-doc section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.util-doc h2 {
  font-size: 26px;
  line-height: 1.15;
}

.util-doc ul {
  padding-left: 22px;
  color: var(--muted-2);
}

.util-doc li + li {
  margin-top: 6px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero,
  .fact,
  .scan-panel,
  .names,
  .featured,
  .support-head,
  .download-panel,
  .side-layout,
  .side-layout-legal {
    grid-template-columns: minmax(0, 1fr);
  }

  .pin {
    display: none;
  }

  .fact {
    align-items: start;
  }

  .scan-card {
    max-width: none;
  }

  .side-nav {
    position: static;
    flex-direction: row;
    gap: 18px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    max-height: none;
    -webkit-overflow-scrolling: touch;
  }

  .toc a {
    gap: 6px;
  }
}

@media (max-width: 640px) {
  .menu-toggle {
    display: flex;
  }

  .nav-right {
    gap: 12px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 12px;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links li + li {
    border-top: 1px solid var(--line);
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 17px;
  }

  .hero-actions .btn,
  .download-actions .btn,
  .inline-cta .btn,
  .ink-cta .btn,
  .util-card .btn,
  .support-head .btn {
    width: 100%;
  }

  .download-actions,
  .support-head > div {
    align-items: stretch;
  }

  .download-actions .store-links {
    justify-content: center;
  }

  .article-body {
    font-size: 17px;
  }

  .article-body h2 {
    font-size: 27px;
  }

  .article-hero {
    aspect-ratio: 16 / 10;
  }

  .two-col,
  .pros-cons,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 28px;
  }

  .footer-cols {
    gap: 28px 40px;
  }

  .checklist-head .btn {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   Print — isolate the checklist
   -------------------------------------------------------------------------- */

@media print {
  body {
    background: #fff;
  }

  .site-header,
  .site-footer,
  .skip-link,
  .article-head,
  .article-hero,
  .related,
  .consent-banner,
  .article-body > :not(.checklist) {
    display: none !important;
  }

  .article {
    max-width: none;
    padding: 0;
  }

  .article-body {
    max-width: none;
  }

  .checklist {
    border: 1px solid #999;
    border-radius: 0;
    margin: 0;
  }
}
