/* ═══════════════════════════════════════════════════════
   DIETVOX DESIGN SYSTEM — Mobile-First
   Base: 375px → Tablet: 600px+ → Desktop: 900px+
   ═══════════════════════════════════════════════════════ */

/* ─── 1. Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
table { border-collapse: collapse; width: 100%; }

:root {
    --bg: #f7f7f8;
    --bg-warm: #faf9f7;
    --white: #ffffff;
    --border: #e8e8ec;
    --border-light: #f0f0f4;
    --text: #1a1a2e;
    --text-secondary: #4a4a5a;
    --text-muted: #8a8a9a;
    --accent: #f97316;
    --accent-dark: #ea580c;
    --red: #dc2626;
    --red-light: #fef2f2;
    --red-border: #fecaca;
    --amber: #d97706;
    --amber-light: #fffbeb;
    --amber-border: #fde68a;
    --green: #16a34a;
    --green-light: #f0fdf4;
    --green-border: #bbf7d0;
    --radius: 12px;
    --radius-lg: 16px;
    --max-width: 1140px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-section: 24px;
    --font-heading: 'Fraunces', Georgia, serif;
}

@media (min-width: 900px) {
    :root {
        --space-section: 32px;
    }
}

/* ─── 2. Typography ─── */
h1 { font-family: var(--font-heading); font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; }
h2 { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
h3 { font-size: 1.1rem; font-weight: 600; line-height: 1.3; }
p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.65; }

@media (min-width: 600px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
}
@media (min-width: 900px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.2rem; }
}

.nutrition-value { font-family: 'JetBrains Mono', monospace; font-weight: 500; }

/* ─── 3. Layout & Container ─── */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding-left: var(--space-md); padding-right: var(--space-md); }
@media (min-width: 600px) { .container { padding-left: var(--space-lg); padding-right: var(--space-lg); } }

.section { padding-top: var(--space-section); padding-bottom: var(--space-section); }
.section-heading { text-align: center; margin-bottom: var(--space-sm); }
.section-subheading { text-align: center; color: var(--text-muted); margin-bottom: var(--space-xl); }
.section-cta { text-align: center; margin-top: var(--space-xl); }
.page-header { margin-bottom: var(--space-xl); }
.page-subtitle { color: var(--text-muted); margin-top: var(--space-xs); }

.skip-link {
    position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
    z-index: 1000; padding: 12px 24px; background: var(--accent); color: var(--white);
    font-weight: 600; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; top: 0; width: auto; height: auto; overflow: visible; }

/* ─── 4. Navigation ─── */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
}
.nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 56px;
}
.nav-logo { display: flex; align-items: center; gap: 8px; }
.nav-logo img { height: 40px; width: auto; }
.nav-logo-text { font-size: 1.25rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.nav-links { display: none; }
.nav-hamburger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; align-items: center;
}
.hamburger-line {
    display: block; width: 22px; height: 2px; background: var(--text);
    border-radius: 2px; transition: transform 0.3s, opacity 0.3s;
}
.nav-hamburger.open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open .hamburger-line:nth-child(2) { opacity: 0; }
.nav-hamburger.open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu overlay */
.nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: 56px; right: 0; bottom: 0; left: 0;
    background: var(--white); padding: var(--space-lg);
    z-index: 99; overflow-y: auto;
}
.nav-links.open .nav-link {
    display: block; padding: 14px 0; font-size: 1.1rem; font-weight: 500;
    color: var(--text); border-bottom: 1px solid var(--border-light);
    min-height: 48px; line-height: 48px;
}
.nav-links.open .nav-link.active { color: var(--accent); }
.nav-links.open .nav-cta-btn {
    display: block; text-align: center; margin-top: var(--space-lg);
    padding: 14px; background: var(--accent); color: var(--white);
    border-radius: var(--radius); font-weight: 600; font-size: 1rem;
    min-height: 48px;
}
.nav-links.open .nav-lang { margin-top: var(--space-md); text-align: center; }

@media (min-width: 600px) {
    .nav-inner { height: 64px; }
    .nav-hamburger { display: none; }
    .nav-links {
        display: flex; align-items: center; gap: var(--space-lg);
    }
    .nav-link {
        font-size: 0.9rem; font-weight: 500; color: var(--text-secondary);
        padding: 8px 0; min-height: 44px; display: flex; align-items: center;
        border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s;
    }
    .nav-link:hover, .nav-link.active { color: var(--accent); border-bottom-color: var(--accent); }
    .nav-cta-btn {
        padding: 8px 18px; background: var(--accent); color: var(--white);
        border-radius: var(--radius); font-weight: 600; font-size: 0.85rem;
        min-height: 44px; display: flex; align-items: center; transition: background 0.2s;
    }
    .nav-cta-btn:hover { background: var(--accent-dark); color: var(--white); }
    .nav-lang { font-size: 0.82rem; color: var(--text-muted); }
}

/* ─── 5. Hero ─── */
.hero {
    background: linear-gradient(145deg, #fff8f0 0%, #fff5f5 50%, #fefce8 100%);
    padding: var(--space-2xl) 0;
    text-align: center;
    overflow: hidden;
}
.hero-inner {
    display: flex; flex-direction: column; align-items: center;
    max-width: var(--max-width); margin: 0 auto;
}
.hero-text { max-width: 640px; }
.hero-badge {
    display: inline-block; padding: 6px 16px; background: rgba(249,115,22,0.1);
    color: var(--accent); border-radius: 20px; font-size: 0.82rem; font-weight: 600;
    margin-bottom: var(--space-md);
}
.hero-title { font-family: var(--font-heading); font-weight: 700; margin-bottom: var(--space-md); }
.hero-subtitle { color: var(--text-secondary); margin-bottom: var(--space-lg); font-size: 1rem; }
.hero-cta-btn {
    display: inline-block; padding: 14px 32px; background: var(--accent);
    color: var(--white); border-radius: var(--radius); font-weight: 700;
    font-size: 1rem; transition: background 0.2s; min-height: 48px;
}
.hero-cta-btn:hover { background: var(--accent-dark); color: var(--white); }
.hero-visual { margin-top: var(--space-lg); }
.hero-phone {
    width: 100%; height: auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.12));
    object-fit: contain; object-position: bottom; max-height: 480px;
}

@media (min-width: 600px) {
    .hero-inner {
        flex-direction: row; text-align: left; gap: var(--space-xl);
        justify-content: space-between;
    }
    .hero-text { flex: 1 1 55%; }
    .hero-visual { flex: 0 1 40%; max-width: 380px; margin-top: 0; }
}
@media (min-width: 900px) {
    .hero { padding: 80px 0; }
    .hero-subtitle { font-size: 1.1rem; }
    .hero-visual { max-width: 420px; }
}

/* ─── 6. Carousel ─── */
.carousel { position: relative; }
.carousel-track {
    display: flex; gap: 20px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch; padding: 4px 0;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide {
    flex: 0 0 100%; scroll-snap-align: start;
}
.carousel-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: 16px; box-shadow: var(--shadow);
    overflow: hidden; transition: box-shadow 0.2s; height: 100%;
    max-width: 312px; margin: 0 auto;
}
.carousel-card:hover { box-shadow: var(--shadow-md); }
.carousel-img-wrapper {
    width: 100%; overflow: hidden;
    background: #f7f7f8;
}
.carousel-img {
    width: 100%; aspect-ratio: 9/11;
    object-fit: contain; display: block;
}
.carousel-card-body { padding: 16px; }
.carousel-step {
    display: inline-block; font-size: 0.72rem; font-weight: 700;
    color: var(--accent); text-transform: uppercase;
    letter-spacing: 0.08em; margin-bottom: 8px;
}
.carousel-card-body h3 {
    font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; color: var(--text);
}
.carousel-card-body p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.65; }
.carousel-controls {
    display: flex; align-items: center; justify-content: center;
    gap: 12px; margin-top: 28px;
}
.carousel-prev, .carousel-next {
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--white);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 1rem; color: var(--text-secondary); transition: all 0.15s;
}
.carousel-prev:hover, .carousel-next:hover {
    border-color: var(--text); color: var(--text);
}
.carousel-dots { display: flex; gap: 6px; }
.carousel-dot {
    width: 8px; height: 8px; border-radius: 50%; border: none;
    background: var(--border); transition: all 0.2s; cursor: pointer; padding: 0;
}
.carousel-dot.active {
    background: var(--accent); width: 24px; border-radius: 4px;
}

@media (min-width: 600px) {
    .carousel-card { max-width: 336px; }
}
@media (min-width: 900px) {
    .carousel-card { max-width: 384px; }
    .carousel-card-body { padding: 20px 24px; }
}

/* ─── 7. Protocol Tiles ─── */
.protocol-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
@media (min-width: 600px) { .protocol-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .protocol-grid { grid-template-columns: repeat(4, 1fr); } }

.protocol-tile {
    display: block; background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: var(--space-lg);
    box-shadow: var(--shadow); transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
    min-height: 44px; text-align: center; color: var(--text); cursor: pointer;
}
.protocol-tile:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--accent); color: var(--text); }
.protocol-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.protocol-tile-icon { font-size: 2rem; display: block; margin-bottom: var(--space-sm); }
.protocol-tile-name { margin-bottom: var(--space-xs); }
.protocol-tile-desc { font-size: 0.85rem; color: var(--text-muted); }

/* ─── 8. Food Grid & Tiles ─── */
.food-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
@media (min-width: 600px) { .food-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .food-grid { grid-template-columns: repeat(3, 1fr); } }

.food-tile {
    display: block; background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s; color: var(--text);
}
.food-tile:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); color: var(--text); }
.food-tile-image {
    width: 100%; height: 140px; background: linear-gradient(145deg, #fff8f0, #fefce8);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.food-tile-image img { width: 100%; max-height: none; object-fit: contain; padding: 8px; }
.food-tile-placeholder {
    width: 60px; height: 60px; border-radius: 50%;
    background: var(--border-light); display: flex;
    align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 700; color: var(--text-muted);
}
.food-tile-body { padding: var(--space-md); }
.food-tile-name { font-size: 1rem; font-weight: 600; margin-bottom: var(--space-xs); }
.food-tile-meta { display: flex; gap: var(--space-sm); font-size: 0.78rem; color: var(--text-muted); margin-bottom: var(--space-sm); }
.food-tile-badges { display: flex; gap: var(--space-xs); flex-wrap: wrap; }

.food-filters { margin-bottom: var(--space-lg); }
.food-search { margin-bottom: var(--space-md); }
.food-search-input {
    width: 100%; padding: 12px 16px; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 0.95rem; background: var(--white);
    min-height: 44px; transition: border-color 0.2s;
}
.food-search-input:focus { outline: none; border-color: var(--accent); }
.food-categories {
    display: flex; gap: var(--space-sm); overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    padding-bottom: var(--space-xs);
}
.food-categories::-webkit-scrollbar { display: none; }
.food-cat-btn {
    padding: 8px 16px; border-radius: 20px; font-size: 0.82rem; font-weight: 500;
    white-space: nowrap; background: var(--white); border: 1px solid var(--border);
    color: var(--text-secondary); transition: all 0.2s; min-height: 44px;
}
.food-cat-btn.active, .food-cat-btn:hover {
    background: var(--accent); color: var(--white); border-color: var(--accent);
}
.food-empty { text-align: center; padding: var(--space-2xl); color: var(--text-muted); }

/* ─── 9. Food Card Page — Single ─── */
.food-card-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-lg); }
.food-card-sidebar { display: none; }
.food-sidebar-mobile { display: block; }

@media (min-width: 900px) {
    .food-card-grid { grid-template-columns: 1fr 340px; align-items: start; }
    .food-card-sidebar { display: block; }
    .food-sidebar-mobile { display: none; }
}

.food-card-page { padding-top: var(--space-md); padding-bottom: var(--space-section); }
.food-card-hero { overflow: hidden; }
.food-hero-image {
    background: linear-gradient(145deg, #fff8f0 0%, #fff5f5 50%, #fefce8 100%);
    padding: var(--space-lg); display: flex; align-items: center; justify-content: center;
    min-height: 200px; border-bottom: 1px solid var(--border-light);
}
.food-hero-svg { width: 100%; height: auto; max-height: none; }
.food-hero-placeholder {
    width: 100px; height: 100px; border-radius: 50%;
    background: var(--border-light); display: flex;
    align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 700; color: var(--text-muted);
}
.food-hero-content { padding: var(--space-lg); }
.food-hero-title { margin-bottom: var(--space-xs); }
.food-hero-subtitle { font-size: 0.82rem; color: var(--text-muted); margin-bottom: var(--space-md); }
.food-hero-verdict { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.75; }
.food-hero-verdict strong { color: var(--text); font-weight: 600; }
.verdict-heading {
    font-size: 0.95rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.03em; color: var(--accent);
    margin-top: var(--space-md); margin-bottom: var(--space-xs);
}
.verdict-heading:first-child { margin-top: 0; }
.food-hero-verdict p { margin-bottom: var(--space-sm); }
.food-hero-verdict p:last-child { margin-bottom: 0; }

.food-section { margin-bottom: var(--space-lg); }
.food-section-title { font-size: 1.1rem; margin-bottom: var(--space-md); padding-bottom: var(--space-sm); border-bottom: 1px solid var(--border-light); }
.cta-section-inline { margin: var(--space-lg) 0; }

.protocol-ratings-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
@media (min-width: 600px) { .protocol-ratings-grid { grid-template-columns: repeat(2, 1fr); } }

.protocol-rating {
    padding: var(--space-md); border-radius: var(--radius);
    border: 1px solid var(--border);
}
.protocol-rating-red { background: var(--red-light); border-color: var(--red-border); }
.protocol-rating-amber { background: var(--amber-light); border-color: var(--amber-border); }
.protocol-rating-green { background: var(--green-light); border-color: var(--green-border); }
.protocol-rating-header { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.protocol-rating-icon { font-size: 1.2rem; }
.protocol-rating-name { font-weight: 600; font-size: 0.88rem; flex: 1; }
.protocol-rating-category { font-size: 0.78rem; color: var(--text-muted); margin-bottom: var(--space-xs); font-style: italic; }
.protocol-rating-comment { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }
.protocol-rating-link { font-size: 0.82rem; font-weight: 500; margin-top: var(--space-sm); display: inline-block; }

/* Quick Reference */
.quick-ref-grid { display: flex; flex-direction: column; gap: var(--space-md); }
.quick-ref-item { padding-bottom: var(--space-md); border-bottom: 1px solid var(--border-light); }
.quick-ref-item:last-child { border-bottom: none; padding-bottom: 0; }
.quick-ref-label { font-size: 0.78rem; color: var(--text-muted); display: block; margin-bottom: 2px; }
.quick-ref-value { font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 1rem; }
.quick-ref-note { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; display: block; }

/* Nutrition Table */
.nutrition-source { font-size: 0.78rem; color: var(--text-muted); margin-bottom: var(--space-md); }
.nutrition-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.nutrition-table th, .nutrition-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-light); font-size: 0.88rem; }
.nutrition-table th { font-weight: 500; color: var(--text-secondary); text-align: left; width: 60%; }
.nutrition-table td { text-align: right; color: var(--text); }

/* Forensics */
.forensic-row { padding: var(--space-md) 0; border-bottom: 1px solid var(--border-light); }
.forensic-row:last-child { border-bottom: none; }
.forensic-metric { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-xs); }
.forensic-name { font-weight: 600; font-size: 0.9rem; }
.forensic-note { font-size: 0.85rem; color: var(--text-secondary); }

/* FAQs */
.faq-list { display: flex; flex-direction: column; gap: 0; }
.faq-item { border-bottom: 1px solid var(--border-light); }
.faq-item:last-child { border-bottom: none; }
.faq-question {
    padding: var(--space-md) 0; cursor: pointer; font-weight: 600;
    font-size: 0.92rem; list-style: none; min-height: 44px;
    display: flex; align-items: center;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after { content: '+'; margin-left: auto; font-size: 1.2rem; color: var(--text-muted); }
.faq-item[open] .faq-question::after { content: '\2212'; }
.faq-answer { padding: 0 0 var(--space-md); }
.faq-answer p { font-size: 0.88rem; margin-bottom: var(--space-sm); }
.faq-pivot { font-size: 0.85rem; color: var(--accent-dark); background: rgba(249,115,22,0.05); padding: var(--space-sm) var(--space-md); border-radius: var(--radius); border-left: 3px solid var(--accent); margin-bottom: 0; }
.faq-pivot a { color: var(--accent); font-weight: 600; text-decoration: none; }
.faq-pivot a:hover { text-decoration: underline; }

/* Citations */
.citation-list { list-style: decimal; padding-left: 20px; }
.citation-item { font-size: 0.82rem; color: var(--text-muted); padding: var(--space-xs) 0; line-height: 1.5; }
.citation-link { font-size: 0.78rem; }

/* Sidebar */
.sidebar-card { margin-bottom: var(--space-md); }
.sticky-sidebar { position: sticky; top: 80px; }

/* Food safety alerts */
.food-safety-alert { margin-bottom: var(--space-lg); }

/* ─── 10. Diet Card Pages ─── */
.diet-cards-page { padding-top: var(--space-md); padding-bottom: var(--space-section); }
.diet-card-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
@media (min-width: 600px) { .diet-card-grid { grid-template-columns: repeat(2, 1fr); } }

.diet-card-tile {
    display: block; background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: var(--space-lg);
    box-shadow: var(--shadow); transition: box-shadow 0.2s, transform 0.2s;
    color: var(--text); text-align: center;
}
.diet-card-tile:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); color: var(--text); }
.diet-card-icon { font-size: 2.5rem; display: block; margin-bottom: var(--space-sm); }
.diet-card-name { margin-bottom: var(--space-sm); }
.diet-card-desc { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: var(--space-md); }
.diet-card-tags { display: flex; gap: var(--space-xs); justify-content: center; }
.tag {
    padding: 4px 10px; border-radius: 4px; font-size: 0.68rem;
    font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
}
.tag:nth-child(1) { background: var(--red-light); color: var(--red); border: 1px solid var(--red-border); }
.tag:nth-child(2) { background: var(--amber-light); color: var(--amber); border: 1px solid var(--amber-border); }
.tag:nth-child(3) { background: var(--green-light); color: var(--green); border: 1px solid var(--green-border); }
.diet-card-counts {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.75rem;
    margin-top: var(--space-xs);
}
.count-green { color: var(--green); font-weight: 600; }
.count-amber { color: var(--amber); font-weight: 600; }
.count-red { color: var(--red); font-weight: 600; }
.diet-card-link {
    display: block;
    margin-top: var(--space-md);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent);
}
.diet-card-tile:hover .diet-card-link {
    color: var(--accent-dark);
}

/* Diet card single */
.diet-card-page { padding-top: var(--space-md); padding-bottom: var(--space-section); }
.diet-card-hero { text-align: center; margin-bottom: var(--space-xl); background: linear-gradient(180deg, #fef9f4 0%, #fff 100%); padding: var(--space-xl) var(--space-md); border-radius: var(--radius-lg); }
.diet-card-hero-icon { font-size: 3rem; display: block; margin-bottom: var(--space-md); }
.diet-card-hero-desc { color: var(--text-secondary); max-width: 640px; margin: var(--space-md) auto 0; }
.diet-trust-bar { display: flex; justify-content: center; gap: var(--space-md); flex-wrap: wrap; padding: var(--space-md) 0; margin-bottom: var(--space-lg); font-size: 0.82rem; color: var(--text-muted); font-weight: 500; border-bottom: 1px solid var(--border-light); }
.diet-card-content { max-width: 760px; margin: 0 auto; }
.diet-card-placeholder {
    text-align: center; padding: var(--space-2xl);
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.diet-card-placeholder p { margin-bottom: var(--space-lg); }

/* Diet card article */
.diet-article { }
.diet-article-section { margin-bottom: var(--space-xl); }
.diet-article-section > h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: var(--space-md); }
.diet-article-section p { margin-bottom: var(--space-md); }
.diet-article-section p:last-child { margin-bottom: 0; }
.diet-article-section em { color: var(--text-secondary); }
.diet-food-list { padding-left: 24px; margin: var(--space-md) 0; list-style: none; }
.diet-food-list li { margin-bottom: var(--space-sm); font-size: 0.92rem; color: var(--text-secondary); line-height: 1.65; padding-left: 8px; position: relative; }
.diet-food-list li::before { content: ''; position: absolute; left: -16px; top: 0.55em; width: 8px; height: 8px; border-radius: 50%; }
.diet-food-list-green li::before { background: var(--green); }
.diet-food-list-amber li::before { background: var(--amber); }
.diet-food-list-red li::before { background: var(--red); }
.diet-food-list li strong { color: var(--text); }
.diet-food-list li a { color: var(--accent); font-weight: 600; }
.diet-food-list li a:hover { color: var(--accent-dark); }
.diet-article-food-grid { margin-top: var(--space-lg); }

/* Diet food card grid */
.diet-fc-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-sm); margin: var(--space-md) 0; }
.diet-fc {
    display: flex; flex-direction: column; background: var(--white);
    border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; text-decoration: none; color: var(--text);
    box-shadow: var(--shadow); transition: box-shadow 0.2s, transform 0.2s;
}
a.diet-fc:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); color: var(--text); }
.diet-fc-img {
    display: flex; align-items: center; justify-content: center;
    height: 140px; overflow: hidden;
    background: linear-gradient(145deg, #fff8f0, #fefce8);
}
.diet-fc-img img { width: 100%; max-height: none; object-fit: contain; padding: 8px; }
.diet-fc-letter {
    width: 60px; height: 60px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 700; color: var(--text-muted);
    background: rgba(255,255,255,0.6);
}
.diet-fc-body { padding: var(--space-md); flex: 1; }
.diet-fc-body .rag-badge { margin-bottom: var(--space-xs); }
.diet-fc-name { font-size: 1rem; font-weight: 600; color: var(--text); margin: 0 0 2px; line-height: 1.3; }
.diet-fc-desc {
    font-size: 0.85rem; color: var(--text-secondary); margin: 0; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
/* Toggle visibility for food cards */
.diet-fc-hidden { display: none; }
.diet-fc-grid.diet-fc-expanded .diet-fc-hidden { display: flex; }
.diet-fc-toggle-wrap { margin-top: var(--space-sm); display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; }
.diet-fc-toggle { font-size: 0.85rem; font-weight: 600; color: var(--accent); padding: var(--space-xs) 0; min-height: 44px; }
.diet-fc-toggle:hover { color: var(--accent-dark); }
.diet-fc-toggle-nudge { font-size: 0.82rem; color: var(--text-muted); }

@media (min-width: 768px) {
    .diet-fc-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
}

/* Mid-article CTA (cream card with accent bar) — reusable component */
.cta-mid-orange {
    text-align: center;
    padding: 40px 24px;
    background: #fef9f4;
    border: 1px solid #f0e6da;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
    max-width: 680px;
    margin: 40px auto;
}
.cta-mid-orange::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #F9922E, #E8650A);
}
.cta-mid-orange-headline {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #1a1a2e;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.cta-mid-orange-body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.92rem;
    color: #4a4a5a;
    margin-bottom: 24px;
}
.cta-mid-orange-btn {
    display: inline-block;
    background: linear-gradient(135deg, #F37920, #E8650A);
    color: #fff;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 14px 36px;
    border-radius: 10px;
    text-decoration: none;
    min-height: 44px;
    box-shadow: 0 2px 12px rgba(233,101,10,0.3);
    transition: all 0.2s ease;
}
.cta-mid-orange-btn:hover {
    box-shadow: 0 4px 20px rgba(233,101,10,0.4);
    transform: translateY(-1px);
    color: #fff;
}

/* Bottom CTA body text */
.diet-bottom-cta-body { font-size: 0.88rem; color: #4a4a5a; margin-bottom: var(--space-md); line-height: 1.55; }
.diet-bottom-cta-section { padding-bottom: 0; }

/* Surprising facts */
.surprise-facts { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
.surprise-fact {
    padding: var(--space-md); border-radius: var(--radius);
    border-left: 3px solid var(--border);
}
.surprise-fact-green { background: var(--green-light); border-left-color: var(--green); }
.surprise-fact-amber { background: var(--amber-light); border-left-color: var(--amber); }
.surprise-fact-red { background: var(--red-light); border-left-color: var(--red); }
.surprise-fact-emoji { font-size: 1.5rem; display: block; margin-bottom: var(--space-xs); }
.surprise-fact-hook { font-weight: 700; font-size: 1rem; color: var(--text); margin-bottom: var(--space-xs); }
.surprise-fact-body { font-size: 0.88rem; color: var(--text-secondary); margin: 0; }

/* Practical tips */
.diet-tips-list { padding-left: 24px; margin: var(--space-md) 0; counter-reset: none; }
.diet-tip { list-style: decimal; margin-bottom: var(--space-md); font-size: 0.92rem; color: var(--text-secondary); line-height: 1.65; }
.diet-tip strong { color: var(--text); display: block; margin-bottom: var(--space-xs); }

@media (min-width: 600px) {
    .cta-mid-orange { padding: 48px 40px; margin: 56px auto; }
    .cta-mid-orange-headline { font-size: 1.35rem; }
    .surprise-facts { grid-template-columns: 1fr; }
}
@media (min-width: 900px) {
    .surprise-facts { grid-template-columns: repeat(3, 1fr); }
}

/* ─── 11. CTA Component ─── */
.cta-component {
    display: flex; flex-direction: column; align-items: center;
    gap: var(--space-md);
    background: #fef9f4;
    border: 1px solid #f0e6da;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
    padding: 32px 24px;
    text-align: center;
    margin-bottom: 64px;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}
.cta-component::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #F9922E, #E8650A);
}
.cta-body { flex: 1; min-width: 0; }
.cta-headline {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: #1a1a2e;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.cta-play-link { display: inline-block; transition: opacity 0.15s; }
.cta-play-link:hover { opacity: 0.82; }
.cta-play-badge { height: 44px; width: auto; }
.cta-qr { display: none; flex-shrink: 0; text-align: center; }
.cta-qr img { width: 96px; height: 96px; border-radius: 12px; border: 1px solid #f0e6da; }
.cta-qr-label { display: block; font-size: 0.62rem; color: #8a8a9a; margin-top: var(--space-xs); }

@media (min-width: 768px) {
    .cta-component {
        flex-direction: row; text-align: left; gap: 32px;
        max-width: 680px; margin: 0 auto 64px; padding: 40px 40px;
    }
    .cta-qr { display: block; }
}

/* ─── 12. Legal Pages ─── */
.legal-page { padding-top: var(--space-md); padding-bottom: var(--space-section); }
.legal-card { }
.legal-card h1 { margin-bottom: var(--space-sm); }
.legal-updated { font-size: 0.82rem; color: var(--text-muted); margin-bottom: var(--space-lg); }
.legal-content { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.75; }
.legal-content h2 { font-size: 1.2rem; margin: var(--space-xl) 0 var(--space-md); }
.legal-content h3 { font-size: 1rem; margin: var(--space-lg) 0 var(--space-sm); }
.legal-content p { margin-bottom: var(--space-md); }
.legal-content ul, .legal-content ol { padding-left: 24px; margin-bottom: var(--space-md); }
.legal-content li { margin-bottom: var(--space-sm); list-style: disc; }
.legal-content a { color: var(--accent); }

@media (min-width: 900px) {
    .legal-card {
        max-width: 760px; margin: 0 auto;
        background: var(--white); padding: var(--space-2xl);
        border: 1px solid var(--border); border-radius: var(--radius-lg);
        box-shadow: var(--shadow);
    }
}

/* ─── 13. Delete Account ─── */
.delete-page { padding-top: var(--space-md); padding-bottom: var(--space-section); }
.delete-card { }
.delete-card h1 { margin-bottom: var(--space-sm); }
.delete-desc { color: var(--text-secondary); margin-bottom: var(--space-lg); }

@media (min-width: 900px) {
    .delete-card {
        max-width: 520px; margin: 0 auto;
        background: var(--white); padding: var(--space-2xl);
        border: 1px solid var(--border); border-radius: var(--radius-lg);
        box-shadow: var(--shadow);
    }
}

/* ─── 14. Footer ─── */
.footer { background: var(--white); border-top: 1px solid var(--border); padding: var(--space-2xl) 0 var(--space-lg); }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: var(--space-lg); }
.footer-logo img { height: 24px; width: auto; margin-bottom: var(--space-sm); }
.footer-tagline { font-size: 0.85rem; color: var(--text-muted); }
.footer-heading { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: var(--space-sm); }
.footer-links li { margin-bottom: var(--space-xs); }
.footer-links a { font-size: 0.88rem; color: var(--text-secondary); min-height: 44px; display: inline-flex; align-items: center; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border-light); margin-top: var(--space-lg); padding-top: var(--space-md); }
.footer-bottom p { font-size: 0.78rem; color: var(--text-muted); }

@media (min-width: 900px) {
    .footer-inner { grid-template-columns: 2fr 1fr 1fr; }
}
.footer-disclaimer {
    text-align: center;
    padding: var(--space-md) 0;
    border-top: 1px solid var(--border-light);
    font-size: 0.81rem;
    line-height: 1.55;
    color: var(--text-muted);
}
.medical-disclaimer-inline {
    background: #f0f4f8;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.81rem;
    line-height: 1.5;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--space-lg);
    width: 100%;
    box-sizing: border-box;
}

/* ─── 15. Cookie Banner ─── */
.cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    background: var(--white); border-top: 1px solid var(--border);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner {
    display: flex; flex-direction: column; gap: var(--space-md);
    padding-top: var(--space-md); padding-bottom: var(--space-md);
}
.cookie-text { font-size: 0.85rem; color: var(--text-secondary); }
.cookie-actions { display: flex; flex-direction: column; gap: var(--space-sm); }
.cookie-btn {
    padding: 12px 20px; border-radius: var(--radius); font-weight: 600;
    font-size: 0.88rem; min-height: 44px; text-align: center; transition: background 0.2s;
}
.cookie-btn-accept { background: var(--accent); color: var(--white); }
.cookie-btn-accept:hover { background: var(--accent-dark); }
.cookie-btn-customise { background: var(--border-light); color: var(--text-secondary); }
.cookie-btn-customise:hover { background: var(--border); }
.cookie-btn-reject { background: var(--white); color: var(--text); border: 1px solid var(--border); }
.cookie-btn-reject:hover { background: var(--bg); border-color: var(--text-muted); }

@media (min-width: 600px) {
    .cookie-banner-inner { flex-direction: row; align-items: center; }
    .cookie-text { flex: 1; }
    .cookie-actions { flex-direction: row; }
}

/* Cookie Modal */
.cookie-modal-overlay {
    position: fixed; inset: 0; z-index: 201;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    padding: var(--space-md);
}
.cookie-modal-overlay[hidden] { display: none; }
.cookie-modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 480px; width: 100%;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.cookie-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--space-lg); border-bottom: 1px solid var(--border-light);
}
.cookie-modal-header h3 { font-size: 1.1rem; }
.cookie-modal-close {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; color: var(--text-muted);
    min-width: 44px; min-height: 44px;
}
.cookie-modal-close:hover { background: var(--border-light); }
.cookie-modal-body { padding: var(--space-lg); }
.cookie-option {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--space-md); padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-light);
}
.cookie-option:last-child { border-bottom: none; }
.cookie-option-info { flex: 1; }
.cookie-option-info strong { display: block; font-size: 0.92rem; margin-bottom: 2px; }
.cookie-option-info p { font-size: 0.82rem; color: var(--text-muted); margin: 0; }
.cookie-toggle-always {
    font-size: 0.78rem; color: var(--text-muted); font-weight: 500;
    white-space: nowrap;
}
.cookie-toggle {
    position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0;
}
.cookie-toggle input { opacity: 0; width: 0; height: 0; }
.cookie-toggle-slider {
    position: absolute; inset: 0; cursor: pointer;
    background: var(--border); border-radius: 26px;
    transition: background 0.2s;
}
.cookie-toggle-slider::before {
    content: ''; position: absolute; left: 3px; top: 3px;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--white); transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.cookie-toggle input:checked + .cookie-toggle-slider { background: var(--accent); }
.cookie-toggle input:checked + .cookie-toggle-slider::before { transform: translateX(22px); }
.cookie-modal-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border-light);
}
.cookie-modal-footer .cookie-btn { width: 100%; }

/* ─── 16. Modal (Image Zoom) ─── */
.modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.85); display: flex;
    align-items: center; justify-content: center;
    cursor: zoom-out;
}
.modal-overlay[hidden] { display: none; }
.modal-img {
    max-width: 90vw; max-height: 90vh;
    object-fit: contain; border-radius: 8px;
}
.modal-close {
    position: absolute; top: 16px; right: 24px;
    background: none; border: none; color: var(--white);
    font-size: 36px; cursor: pointer; z-index: 10000;
    width: 44px; height: 44px; display: flex;
    align-items: center; justify-content: center;
}

/* ─── 17. Breadcrumbs ─── */
.breadcrumb {
    font-size: 0.82rem; color: var(--text-muted);
    padding: var(--space-md) 0; overflow-x: auto;
    white-space: nowrap; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.breadcrumb::-webkit-scrollbar { display: none; }
.breadcrumb-link { color: var(--text-secondary); }
.breadcrumb-link:hover { color: var(--accent); }
.breadcrumb-sep { margin: 0 6px; color: var(--border); }
.breadcrumb-current { color: var(--text-muted); }

/* ─── 18. RAG Badges ─── */
.rag-badge {
    display: inline-block; padding: 3px 8px; border-radius: 4px;
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
    line-height: 1;
}
.rag-red { background: var(--red-light); color: var(--red); border: 1px solid var(--red-border); }
.rag-amber { background: var(--amber-light); color: var(--amber); border: 1px solid var(--amber-border); }
.rag-green { background: var(--green-light); color: var(--green); border: 1px solid var(--green-border); }
.rag-text-high { color: var(--red); }
.rag-text-medium { color: var(--amber); }
.rag-text-low { color: var(--green); }
.food-tile-badge-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}
.food-tile-protocol-label {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
}

/* ─── 19. 404 Page ─── */
.error-page {
    display: flex; align-items: center; justify-content: center;
    min-height: 60vh; text-align: center;
    padding: var(--space-2xl) var(--space-md);
}
.error-card h1 { font-size: 4rem; color: var(--accent); margin-bottom: var(--space-sm); }
.error-text { font-size: 1.5rem; font-weight: 600; margin-bottom: var(--space-sm); color: var(--text); }
.error-desc { color: var(--text-muted); margin-bottom: var(--space-xl); }
.error-links { display: flex; flex-direction: column; gap: var(--space-sm); }
@media (min-width: 600px) { .error-links { flex-direction: row; justify-content: center; } }

/* ─── 20. Utility Classes ─── */
.card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.card-body { padding: var(--space-lg); }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 24px; border-radius: var(--radius); font-weight: 600;
    font-size: 0.92rem; transition: all 0.2s; min-height: 44px;
    text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-outline:hover { background: var(--accent); color: var(--white); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #b91c1c; color: var(--white); }
.btn-danger:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; }
.btn-full { width: 100%; }

.alert {
    padding: var(--space-md); border-radius: var(--radius);
    font-size: 0.88rem; margin-bottom: var(--space-md);
}
.alert-success { background: var(--green-light); color: var(--green); border: 1px solid var(--green-border); }
.alert-error { background: var(--red-light); color: var(--red); border: 1px solid var(--red-border); }
.alert-caution { background: var(--amber-light); color: var(--amber); border: 1px solid var(--amber-border); }
.alert-warning { background: var(--amber-light); color: var(--amber); border: 1px solid var(--amber-border); }
.alert-danger { background: var(--red-light); color: var(--red); border: 1px solid var(--red-border); }

.form-group { margin-bottom: var(--space-md); }
.form-label { display: block; font-size: 0.88rem; font-weight: 500; margin-bottom: var(--space-xs); color: var(--text); }
.form-input {
    width: 100%; padding: 12px 16px; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 0.95rem; background: var(--white);
    min-height: 44px; transition: border-color 0.2s;
}
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(249,115,22,0.1); }
.form-checkbox { display: flex; align-items: flex-start; gap: var(--space-sm); }
.form-checkbox input[type="checkbox"] {
    width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0;
    accent-color: var(--accent);
}
.form-check-label { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.5; cursor: pointer; }

.body-no-scroll { overflow: hidden; }
