/* FODMAP Scanner blog. Matches the main site (teal, Fraunces + DM Sans). */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal:     #2BBFAA;
  --teal-dk:  #1F9C8C;
  --teal-lt:  #EAF9F7;
  --text:     #111111;
  --body:     #333333;
  --muted:    #6b6b6b;
  --border:   #E8E8E8;
  --bg:       #FFFFFF;
  --warn-bg:  #FFF8E6;
  --warn-bd:  #F1DCA2;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--body);
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 1.06rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-top: 64px;
}
a { color: var(--teal-dk); text-underline-offset: 3px; }
a:hover { color: var(--text); }

/* ── NAV (same as main site) ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px; height: 64px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-brand span { font-weight: 500; font-size: 0.95rem; color: var(--text); letter-spacing: -0.01em; }
.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-link { font-size: 0.88rem; font-weight: 500; color: var(--muted); text-decoration: none; }
.nav-link:hover, .nav-link[aria-current] { color: var(--text); }
.nav-dl { position: relative; }
.nav-dl summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--teal); color: #fff; font-size: 0.82rem; font-weight: 500;
  padding: 9px 20px; border-radius: 50px; transition: background .2s;
}
.nav-dl summary::-webkit-details-marker { display: none; }
.nav-dl summary:hover { background: var(--teal-dk); }
.nav-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10); min-width: 180px;
}
.nav-dropdown a {
  display: block; padding: 12px 16px; text-decoration: none;
  font-size: 0.82rem; font-weight: 500; color: var(--text); transition: background .15s;
}
.nav-dropdown a:hover { background: var(--teal-lt); }
.nav-dropdown a + a { border-top: 1px solid var(--border); }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.wrap.wide { max-width: 1100px; }

/* ── BLOG HOME ── */
.hero { padding: 72px 0 24px; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 22px;
}
.kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; color: var(--text); letter-spacing: -0.02em; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 300; line-height: 1.08; margin-bottom: 18px; }
h1 em { font-style: italic; color: var(--teal); }
.hero p { font-size: 1.1rem; color: var(--muted); font-weight: 300; max-width: 560px; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); padding: 32px 0 88px; }
.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 18px;
  padding: 26px; display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--teal); box-shadow: 0 8px 24px rgba(43,191,170,0.12); }
.card .tag { font-size: 0.72rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-dk); }
.card h2 { font-size: 1.35rem; font-weight: 400; line-height: 1.25; margin: 10px 0 10px; }
.card p { color: var(--muted); font-size: 0.97rem; line-height: 1.65; margin-bottom: 16px; flex: 1; }
.card .meta { font-size: 0.82rem; color: var(--muted); }

/* ── ARTICLE ── */
article { padding: 56px 0 24px; }
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
article h1 { font-size: clamp(2.1rem, 4.6vw, 3rem); font-weight: 300; line-height: 1.12; margin-bottom: 14px; }
.byline { color: var(--muted); font-size: 0.9rem; margin-bottom: 34px; }
article h2 { font-size: 1.65rem; font-weight: 400; line-height: 1.25; margin: 44px 0 12px; }
article h3 { font-size: 1.2rem; font-weight: 500; margin: 28px 0 6px; }
article p, article li { margin-bottom: 16px; }
article ul, article ol { padding-left: 24px; margin-bottom: 18px; }
article li { margin-bottom: 8px; }
article strong { color: var(--text); font-weight: 500; }
.lede { font-size: 1.22rem; color: var(--muted); font-weight: 300; line-height: 1.7; }

table { width: 100%; border-collapse: collapse; margin: 20px 0 28px; font-size: 0.95rem; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--teal-lt); color: var(--teal-dk); font-size: 0.74rem; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }

.callout { background: var(--teal-lt); border-radius: 14px; padding: 18px 22px; margin: 28px 0; }
.callout p:last-child { margin-bottom: 0; }
.disclaimer {
  background: var(--warn-bg); border: 1px solid var(--warn-bd); border-radius: 14px;
  padding: 16px 20px; font-size: 0.92rem; margin: 40px 0 12px; color: var(--text);
}
.cta { border: 1px solid var(--border); border-radius: 18px; padding: 34px 26px; margin: 34px 0 56px; text-align: center; }
.cta h2 { margin: 0 0 8px; font-size: 1.6rem; font-weight: 400; }
.cta p { color: var(--muted); margin: 0 0 20px; }
.btn {
  display: inline-block; background: var(--teal); color: #fff; text-decoration: none;
  font-weight: 500; font-size: 0.9rem; padding: 12px 28px; border-radius: 50px; margin: 4px; transition: background .2s;
}
.btn:hover { background: var(--teal-dk); color: #fff; }
.btn.alt { background: transparent; color: var(--teal-dk); border: 1.5px solid var(--teal); padding: 10.5px 26.5px; }
.btn.alt:hover { background: var(--teal-lt); color: var(--teal-dk); }

.related { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border); }
.related h2 { font-size: 1.2rem; margin: 0 0 10px; font-weight: 500; }

/* ── FOOTER (same as main site) ── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 48px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.footer-brand img { width: 22px; height: 22px; border-radius: 6px; }
.footer-brand span { font-size: 0.85rem; font-weight: 500; color: var(--text); }
.footer-links { display: flex; gap: 24px; list-style: none; flex-wrap: wrap; flex-direction: row; align-items: center; }
.footer-links a { font-size: 0.8rem; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-links li { padding: 0; margin: 0; line-height: 1.4; }
.footer-links li::before { content: none; display: none; }
.footer-copy { font-size: 0.78rem; color: var(--muted); }

@media (max-width: 640px) {
  nav { padding: 0 20px; }
  .nav-right { gap: 14px; }
  .hero { padding-top: 48px; }
  footer { padding: 24px; flex-direction: column; align-items: flex-start; }
  table { font-size: 0.88rem; }
}

/* ── FOOD GUIDE ── */
.verdict {
  display: inline-block; font-size: 0.78rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 50px; color: #fff;
}
.verdict.low { background: var(--teal); }
.verdict.depends { background: #E0A23A; }
.verdict.high { background: #D9594C; }
.answer-box { border: 1px solid var(--border); border-left-width: 5px; border-radius: 14px; padding: 22px 24px; margin: 6px 0 30px; }
.answer-box.low { border-left-color: var(--teal); }
.answer-box.depends { border-left-color: #E0A23A; }
.answer-box.high { border-left-color: #D9594C; }
.answer-box .a { font-family: 'Fraunces', Georgia, serif; font-size: 1.35rem; line-height: 1.4; color: var(--text); margin: 12px 0 10px; }
.answer-box .m { font-size: 0.92rem; color: var(--muted); margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 8px; list-style: none; padding: 0; }
.chips li { margin: 0; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1px solid var(--border); border-radius: 50px; text-decoration: none; color: var(--text); font-size: 0.92rem; transition: border-color .15s, background .15s; }
.chip:hover { border-color: var(--teal); background: var(--teal-lt); color: var(--text); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot.low { background: var(--teal); }
.dot.depends { background: #E0A23A; }
.dot.high { background: #D9594C; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 0.88rem; color: var(--muted); margin-top: 18px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.food-section { margin: 40px 0 8px; }
.food-section h2 { font-size: 1.5rem; font-weight: 400; margin-bottom: 4px; }
.food-section p.sub { color: var(--muted); font-size: 0.95rem; margin-bottom: 12px; }

/* ── FAQ ── */
.faq-list { margin: 8px 0 8px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { list-style: none; cursor: pointer; padding: 18px 36px 18px 0; font-weight: 500; color: var(--text); position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 300; color: var(--teal); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding: 0 36px 20px 0; margin: 0; color: var(--body); }
article h2 + .faq-list { margin-top: 4px; }

/* ── CTA: one smart button on touch devices, both store buttons elsewhere ── */
.cta-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .cta-desktop { display: none; }
  .cta-touch { display: inline-block; }
}

/* ── Small phones: keep the top bar on one line ── */
@media (max-width: 640px) {
  nav { padding: 0 16px; }
  .nav-brand { gap: 8px; min-width: 0; }
  .nav-brand img { width: 28px; height: 28px; }
  .nav-brand span { font-size: 0.85rem; white-space: nowrap; }
  .nav-right { gap: 14px; }
  .nav-link { font-size: 0.82rem; }
  .nav-dl summary { font-size: 0.78rem; padding: 8px 14px; white-space: nowrap; line-height: 1.2; }
}
@media (max-width: 430px) {
  .nav-brand span { display: none; }
}
