/* ── Self-hosted fonts ─────────────────────────────────────────────────────── */
@font-face { font-family:'Inter'; font-style:normal; font-weight:400 700; font-display:swap; src:url('/static/fonts/inter-cyrillic-ext.woff2') format('woff2'); unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family:'Inter'; font-style:normal; font-weight:400 700; font-display:swap; src:url('/static/fonts/inter-cyrillic.woff2') format('woff2'); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family:'Inter'; font-style:normal; font-weight:400 700; font-display:swap; src:url('/static/fonts/inter-greek-ext.woff2') format('woff2'); unicode-range:U+1F00-1FFF; }
@font-face { font-family:'Inter'; font-style:normal; font-weight:400 700; font-display:swap; src:url('/static/fonts/inter-greek.woff2') format('woff2'); unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF; }
@font-face { font-family:'Inter'; font-style:normal; font-weight:400 700; font-display:swap; src:url('/static/fonts/inter-vietnamese.woff2') format('woff2'); unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family:'Inter'; font-style:normal; font-weight:400 700; font-display:swap; src:url('/static/fonts/inter-latin-ext.woff2') format('woff2'); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:'Inter'; font-style:normal; font-weight:400 700; font-display:swap; src:url('/static/fonts/inter-latin.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'Playfair Display'; font-style:normal; font-weight:700 900; font-display:swap; src:url('/static/fonts/playfair-cyrillic.woff2') format('woff2'); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family:'Playfair Display'; font-style:normal; font-weight:700 900; font-display:swap; src:url('/static/fonts/playfair-vietnamese.woff2') format('woff2'); unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family:'Playfair Display'; font-style:normal; font-weight:700 900; font-display:swap; src:url('/static/fonts/playfair-latin-ext.woff2') format('woff2'); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:'Playfair Display'; font-style:normal; font-weight:700 900; font-display:swap; src:url('/static/fonts/playfair-latin.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    margin: 0;
    background: #faf8f4;
    color: #2d2d2d;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: #4a7c59;
}

a:hover {
    text-decoration: underline;
}

h1, h2 {
    margin-bottom: 10px;
}

/* ── Site nav ─────────────────────────────────────────────────────────────── */
.site-nav {
    background: #6b8c5e;
    padding: 12px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-nav-brand {
    font-family: 'Playfair Display', Georgia, serif;
    color: white;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
}

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

.nav-link {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 6px;
    transition: background 0.15s;
}
.nav-link:hover { background: rgba(255,255,255,0.15); }

.nav-link--primary {
    background: rgba(255,255,255,0.22);
}
.nav-link--primary:hover { background: rgba(255,255,255,0.32); }

.nav-link--ghost {
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.88);
    padding: 5px 10px;
    border-radius: 6px;
    transition: background 0.15s;
}
.nav-link--ghost:hover { background: rgba(255,255,255,0.15); }

.nav-logout-form { margin: 0; }

.nav-user::before { content: '👤 '; font-size: 13px; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 110px;
    background-image: url('/static/img/placeholder.jpg');
    background-size: cover;
    background-position: center 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    /* Light warm wash — keeps the food colours visible */
    background: linear-gradient(
        to bottom,
        rgba(250, 248, 244, 0.55) 0%,
        rgba(240, 237, 230, 0.72) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 18px 24px 14px;
    width: 100%;
    max-width: 720px;
}

.hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 900;
    color: #2d3a20;
    letter-spacing: 0.01em;
    margin: 0 0 10px;
    text-shadow: 0 1px 6px rgba(255, 255, 255, 0.7);
    line-height: 1.2;
}

.hero-search-wrapper {
    max-width: 560px;
    margin: 0 auto;
}

.hero-search-input {
    width: 100%;
    padding: 8px 18px;
    font-size: 14px;
    font-family: 'Inter', system-ui, sans-serif;
    border: 1.5px solid #c8c2b8;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.90);
    color: #2d2d2d;
    outline: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10);
}

.hero-search-input::placeholder {
    color: #a0977f;
}

.hero-search-input:focus {
    background: #fff;
    border-color: #6b8c5e;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12),
                0 0 0 3px rgba(107, 140, 94, 0.30);
}

.hero-search-hint {
    color: #6b7260;
    font-size: 11px;
    margin: 6px 0 0;
    line-height: 1.4;
}

/* ── Autocomplete dropdown ────────────────────────────────────────────────── */
/*
 * position:fixed + body-anchored so it is never clipped by .hero's
 * overflow:hidden or any other ancestor stacking context.
 * top/left/width are set dynamically by search-autocomplete.js.
 */
.autocomplete-dropdown {
    position: fixed;
    background: #fff;
    border: 1.5px solid #e8e4de;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
    z-index: 9999;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    max-height: 480px;
    overflow-y: auto;
}

/* ── Section headers ─────────────────────────────────────────────────────── */
.autocomplete-section {
    border-top: 1px solid #f0ede6;
}

.autocomplete-section:first-child {
    border-top: none;
}

.autocomplete-section-title {
    padding: 8px 16px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9a9a8a;
}

/* ── Recipe carousel ─────────────────────────────────────────────────────── */
.autocomplete-carousel {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 16px 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.autocomplete-carousel::-webkit-scrollbar {
    display: none;
}

.autocomplete-recipe-card {
    flex: 0 0 110px;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid #e8e4de;
    background: #faf8f4;
    scroll-snap-align: start;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.autocomplete-recipe-card:hover,
.autocomplete-recipe-card.autocomplete-active {
    border-color: #6b8c5e;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.autocomplete-recipe-thumb {
    width: 110px;
    height: 76px;
    object-fit: cover;
    display: block;
    background: #ece9e2;
}

.autocomplete-recipe-name {
    padding: 6px 8px 8px;
    font-size: 11.5px;
    font-weight: 500;
    color: #2d2d2d;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.autocomplete-recipe-name mark {
    background: rgba(107, 140, 94, 0.22);
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
    font-weight: 700;
}

/* ── Chip rows (allergens, nutrition, regions, ingredients) ──────────────── */
.autocomplete-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 16px 12px;
}

.autocomplete-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 13px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: filter 0.12s;
    white-space: nowrap;
}

.autocomplete-chip mark {
    background: transparent;
    color: inherit;
    font-weight: 700;
}

.autocomplete-chip:hover,
.autocomplete-chip.autocomplete-active {
    filter: brightness(0.92);
}

.autocomplete-chip--allergen {
    background: #fef0f0;
    color: #b91c1c;
    border-color: #fecaca;
}

.autocomplete-chip--nutrition {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.autocomplete-chip--region {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.autocomplete-chip--ingredient {
    background: #fef3e2;
    color: #7a5500;
    border-color: #fde2a0;
}

.autocomplete-chip--category {
    background: #f5f3ff;
    color: #4a3d8a;
    border-color: #ddd6fe;
}

.autocomplete-chip--meal-type {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.autocomplete-chip--course-type {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.autocomplete-did-you-mean {
    padding: 9px 18px;
    font-size: 13px;
    color: #6b7260;
    border-top: 1px solid #e8e4de;
    cursor: pointer;
}

.autocomplete-did-you-mean strong {
    color: #4a7c59;
}

.autocomplete-did-you-mean:hover {
    background: #f0ede6;
}

/* ── Allergen filter strip ────────────────────────────────────────────────── */
.filter-chips-section {
    background: #f0ede6;
    padding: 14px 32px;
    border-bottom: 1px solid #e0dbd2;
    text-align: center;
}

.allergen-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    justify-content: center;
}

.allergen-label {
    font-size: 13px;
    font-weight: 600;
    color: #4a5240;
}

.allergen-info {
    font-size: 12px;
    color: #8a8a7a;
    margin: 0;
    line-height: 1.4;
}

.allergen-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: center;
}

.allergen-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border: 1.5px solid #cce0d4;
    border-radius: 20px;
    cursor: pointer;
    font-size: .78rem;
    font-weight: 600;
    background: #f0f7f2;
    color: #1a3c2e;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    user-select: none;
}

.allergen-chip:hover {
    border-color: #a8ccb6;
    background: #d4ebdb;
}

.allergen-chip:has(input:checked) {
    background: #1a3c2e;
    border-color: #1a3c2e;
    color: #fff;
}

.allergen-chip input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

/* ── Recipes container ────────────────────────────────────────────────────── */
.recipes-container {
    max-width: 980px;
    margin: 36px auto;
    padding: 0 24px;
}

/* ── Recipe grid ──────────────────────────────────────────────────────────── */
.recipe-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    padding: 0;
    list-style: none;
    margin: 0;
}

/* ── Recipe cards ─────────────────────────────────────────────────────────── */
.recipe-card {
    background: white;
    border-radius: 16px;
    padding: 20px 16px 16px;
    text-align: center;
    border: 1px solid #e8e4de;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.10);
}

.recipe-link {
    display: block;
    color: inherit;
}

.recipe-link:hover {
    text-decoration: none;
}

.recipe-thumb {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 14px;
    border: 3px solid #f0ede6;
}

.recipe-link h3 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    color: #2d2d2d;
    line-height: 1.3;
}

/* ── Card badges ──────────────────────────────────────────────────────────── */
.card-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin-top: 8px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.badge-course {
    background: #e8f0fe;
    color: #1a56db;
}

.badge-meal {
    background: #fef3c7;
    color: #92400e;
}

/* ── Adaptable badge ──────────────────────────────────────────────────────── */
.badge-adaptable {
    background: #f59e0b;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    letter-spacing: 0.02em;
}

/* ── Course sections (default grouped view) ───────────────────────────────── */
.course-section {
    margin-bottom: 44px;
}

.course-section h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    color: #2d2d2d;
    border-bottom: 2px solid #e8e4de;
    padding-bottom: 8px;
    margin-bottom: 18px;
}

.course-section-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── No results ───────────────────────────────────────────────────────────── */
.no-results-block {
    text-align: center;
    padding: 64px 24px;
}

.no-results-icon {
    font-size: 48px;
    margin: 0 0 12px;
}

.no-results-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3a20;
    margin: 0 0 8px;
}

.no-results-sub {
    font-size: 15px;
    color: #8a8a7a;
    margin: 0 0 28px;
}

.no-results-suggestions {
    text-align: center;
    padding: 52px 24px 64px;
    max-width: 780px;
    margin: 0 auto;
}

/* ── Pagination ───────────────────────────────────────────────────────────── */
.pagination {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: 32px;
}

.pagination button {
    padding: 8px 18px;
    border: 1px solid #d0ccc4;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    color: #4a5240;
    font-family: 'Inter', system-ui, sans-serif;
}

.pagination button:hover:not([disabled]) {
    background: #f5f8f2;
    border-color: #8a9e7c;
}

.pagination button[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Medical disclaimer ───────────────────────────────────────────────────── */
.disclaimer {
    font-size: 13px;
    color: #6b7280;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 4px;
    padding: 10px 14px;
    margin-top: 24px;
    line-height: 1.5;
}
.disclaimer-link,
.rd-disclaimer .disclaimer-link {
    color: #4a7c59;
    text-decoration: underline;
    white-space: nowrap;
}

/* ── Search results full page ─────────────────────────────────────────────── */
.hero--compact {
    min-height: 140px;
}

.hero-content--compact {
    padding: 28px 24px 22px;
    text-align: left;
}

.sr-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,.55);
    font-size: .8rem;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 8px;
    transition: color .15s;
}

.sr-back-link:hover {
    color: rgba(255,255,255,.85);
    text-decoration: none;
}

.sr-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 900;
    color: #2d3a20;
    margin: 0;
    text-shadow: 0 1px 6px rgba(255, 255, 255, 0.7);
    line-height: 1.25;
    text-transform: capitalize;
}

.sr-main {
    background: #f6faf7;
    min-height: 60vh;
    padding: 28px 0 48px;
}

.sr-count {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #4a7c59;
    background: rgba(255, 255, 255, 0.88);
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    margin-top: 8px;
}

.sr-chips-row {
    margin-bottom: 20px;
}

.sr-section-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.1rem, 2.5vw, 1.45rem);
    font-weight: 700;
    color: #2d3a20;
    margin: 32px 0 12px;
}

.sr-section-count {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #4a7c59;
    background: #e8f0eb;
    padding: 2px 10px;
    border-radius: 20px;
}

/* ── 404 page ─────────────────────────────────────────────────────────────── */
.hero-404-code {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(4rem, 12vw, 9rem);
    font-weight: 900;
    color: #4a7c59;
    line-height: 1;
    margin: 0 0 8px;
    opacity: 0.85;
}

.hero-404-btn {
    display: inline-block;
    padding: 13px 32px;
    background: #4a7c59;
    color: #fff;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    border-radius: 40px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(74, 124, 89, 0.35);
    transition: background 0.18s, box-shadow 0.18s;
}

.hero-404-btn:hover {
    background: #3a6347;
    box-shadow: 0 6px 22px rgba(74, 124, 89, 0.45);
}

.hero-404-body {
    background: #f6faf7;
    padding: 52px 24px 64px;
}

.hero-404-suggestions {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
}

.hero-404-suggestions-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #2d3a20;
    margin: 0 0 28px;
}

.hero-404-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.hero-404-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 160px;
    padding: 24px 16px;
    background: #fff;
    border: 1.5px solid #e8e4de;
    border-radius: 16px;
    text-decoration: none;
    color: #2d3a20;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.hero-404-link-card:hover {
    border-color: #6b8c5e;
    box-shadow: 0 6px 20px rgba(107, 140, 94, 0.18);
    transform: translateY(-3px);
}

.hero-404-link-icon {
    font-size: 2rem;
}

/* ── About section ────────────────────────────────────────────────────────── */
.about-section {
    margin: 0;
    padding: 52px 40px;
    background: #fff;
    border-top: 1px solid #e4eee8;
    border-bottom: 1px solid #e4eee8;
    color: #4a5240;
    line-height: 1.7;
}

.about-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
    width: min(1100px, 100%);
    margin: 0 auto;
}

.about-photo-main {
    width: 220px;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 5px 8px 28px rgba(0,0,0,0.15);
    display: block;
}

.about-text h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 26px;
    margin-bottom: 14px;
    color: #2d2d2d;
}

.about-text p {
    margin: 0 0 14px;
    font-size: 15px;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-kicker {
    color: #637e57;
    font-size: 10px !important;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.about-kicker { margin-bottom: 4px !important; }

.about-guide-link {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-top: 4px;
    color: #315a3a;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── Detail page (legacy page-content kept for safety) ───────────────────── */
.page-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* ══════════════════════════════════════════════════════════════════════════
   Recipe detail — two-column redesign  (rd- prefix)
   ══════════════════════════════════════════════════════════════════════════ */

.rd-body {
    background: #f7f5f0;
}

.rd-page {
    max-width: 1160px;
    margin: 0 auto;
    padding: 28px 28px 48px;
}

.rd-back {
    display: inline-block;
    margin-bottom: 24px;
    color: #4a7c59;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.rd-back:hover { text-decoration: underline; }

/* ── Two-column grid ──────────────────────────────────────────────────────── */
.rd-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 52px;
    align-items: start;
}

/* ════════════ LEFT COLUMN ════════════ */
.rd-left {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.rd-tagline {
    font-size: 13px;
    font-style: italic;
    color: #8a9e7c;
    margin: 0;
    letter-spacing: 0.04em;
}

.rd-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 900;
    color: #1e1e1e;
    line-height: 1.15;
    margin: 0;
}

.rd-course-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rd-hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
}

.rd-hashtag {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    color: #4a7c59;
    cursor: default;
    transition: color 0.15s;
}

.rd-hashtag:hover {
    color: #2d5c3a;
}

.rd-description {
    font-size: 15px;
    color: #4a5240;
    line-height: 1.65;
    margin: 0;
}

/* ── Stats row ──────────────────────────────────────────────────────────── */
.rd-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rd-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: #eeeae3;
    border-radius: 12px;
    padding: 10px 16px;
    min-width: 80px;
    flex: 1;
    text-align: center;
}

.rd-stat-icon {
    font-size: 18px;
    line-height: 1;
}

.rd-stat-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #7a7a6a;
}

.rd-stat-value {
    font-size: 13px;
    font-weight: 600;
    color: #2d2d2d;
}

/* ── Section wrapper & title ─────────────────────────────────────────────── */
.rd-section { display: flex; flex-direction: column; gap: 12px; }

.rd-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 19px;
    font-weight: 700;
    color: #2d2d2d;
    margin: 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8e4de;
}

/* ── Allergen chips ──────────────────────────────────────────────────────── */
.rd-allergen-note {
    font-size: 14px;
    color: #166534;
    font-weight: 500;
    margin: 0;
}

.rd-allergen-note--contains {
    color: #b91c1c;
}

.rd-allergen-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.rd-allergen-chip {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #b91c1c;
    background: none;
    border: none;
    padding: 0;
}

.rd-allergen-safe {
    color: #166534;
    font-weight: 500;
    font-size: 14px;
    margin: 0;
}

.rd-allergen-subs-link {
    margin: 10px 0 0;
    font-size: 13px;
}

/* ── Safety panel ────────────────────────────────────────────────────────── */
.rd-safety {
    border-radius: 10px;
    padding: 16px 18px;
    border-left: 4px solid #6b7280;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rd-safety--safe     { border-left-color: #22c55e; background: #f0fdf4; }
.rd-safety--adaptable { border-left-color: #f59e0b; background: #fffbeb; }
.rd-safety--unsafe   { border-left-color: #ef4444; background: #fef2f2; }

.rd-safety-title {
    font-weight: 700;
    font-size: 15px;
    margin: 0;
    color: #1e1e1e;
}

.rd-safety-rec {
    margin: 0;
    font-size: 14px;
    color: #374151;
}

.rd-safety-block { margin-top: 6px; font-size: 13.5px; }

.rd-safety-list {
    margin: 6px 0 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ── Fun fact box ────────────────────────────────────────────────────────── */
.rd-funfact {
    display: flex;
    gap: 14px;
    background: #f5f3ef;
    border: 1px solid #e8e4de;
    border-radius: 12px;
    padding: 16px 18px;
    align-items: flex-start;
}

.rd-funfact-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}

.rd-funfact-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8a9e7c;
    margin: 0 0 4px;
}

.rd-funfact-text {
    font-size: 14px;
    color: #4a5240;
    font-style: italic;
    line-height: 1.6;
    margin: 0;
}

/* ── Ingredient list ─────────────────────────────────────────────────────── */
.rd-ingredient-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rd-ingredient {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 14px;
    color: #2d2d2d;
    line-height: 1.5;
}

.rd-ingredient--optional {
    color: #6b7280;
}

.rd-ingredient-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8a9e7c;
    flex-shrink: 0;
    margin-top: 2px;
    align-self: center;
}

.rd-ingredient-name {
    font-weight: 500;
}

.rd-ingredient-qty {
    color: #9ca3af;
    font-size: 13px;
}

.rd-ingredient-note {
    color: #9ca3af;
    font-style: italic;
    font-size: 13px;
}

/* ════════════ RIGHT COLUMN ════════════ */
.rd-right {
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: sticky;
    top: 20px;
}

/* ── Hero image ──────────────────────────────────────────────────────────── */
.rd-image-wrap {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
    aspect-ratio: 4 / 3;
}

.rd-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Numbered steps ──────────────────────────────────────────────────────── */
.rd-instructions {
    background: #fff;
    border-radius: 16px;
    padding: 22px 22px 24px;
    border: 1px solid #e8e4de;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.rd-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f0ede6;
}

.rd-step:last-child { border-bottom: none; }

.rd-step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #4a7c59;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.rd-step-text {
    font-size: 14px;
    color: #2d2d2d;
    line-height: 1.65;
    margin: 0;
}

/* ── Made with love ──────────────────────────────────────────────────────── */
.rd-made-with-love {
    text-align: center;
    font-size: 13px;
    font-style: italic;
    color: #8a9e7c;
    letter-spacing: 0.06em;
    margin: 0;
}

/* ── Full-width disclaimer ───────────────────────────────────────────────── */
.rd-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 40px;
    font-size: 13px;
    color: #6b7260;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    padding: 12px 16px;
    line-height: 1.55;
}

.rd-disclaimer-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Responsive: stack columns on tablet/mobile ───────────────────────────── */
@media (max-width: 860px) {
    .rd-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .rd-right {
        position: static;
    }

    .rd-image-wrap {
        aspect-ratio: 16 / 9;
    }
}

.back-button {
    display: inline-block;
    margin-bottom: 20px;
    color: #4a7c59;
    font-size: 14px;
}

.recipe-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.recipe-header h1 {
    margin: 0;
    font-family: 'Playfair Display', Georgia, serif;
}

.recipe-detail-image {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
}

.recipe-meta p {
    margin: 0 0 6px;
}

.instructions {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    white-space: pre-wrap;
    border: 1px solid #e8e4de;
    line-height: 1.7;
}

/* ── Allergen safe indicator (detail) ────────────────────────────────────── */
.allergen-safe {
    color: #16a34a;
    font-weight: 500;
}

/* ── Safety analysis panel ────────────────────────────────────────────────── */
.safety-panel {
    border-left: 4px solid #6b7280;
    border-radius: 6px;
    padding: 16px 20px;
    margin: 20px 0;
    background: #f9fafb;
}

.safety-safe    { border-left-color: #22c55e; background: #f0fdf4; }
.safety-adaptable { border-left-color: #f59e0b; background: #fffbeb; }
.safety-unsafe  { border-left-color: #ef4444; background: #fef2f2; }

.safety-title {
    margin: 0 0 8px;
    font-size: 1.1rem;
    font-family: 'Playfair Display', Georgia, serif;
}

.safety-recommendation {
    margin: 0 0 12px;
    font-weight: 500;
}

.safety-section { margin-top: 12px; }

.safety-list {
    margin: 6px 0 0;
    padding-left: 20px;
}

.safety-list li { margin-bottom: 6px; }

/* ── Ingredient list (detail page) ───────────────────────────────────────── */
.ingredient-item { margin-bottom: 6px; }
.ingredient-optional { color: #6b7280; }
.ingredient-qty { color: #9ca3af; font-size: 0.9em; margin-left: 4px; }
.ingredient-note { color: #9ca3af; font-style: italic; font-size: 0.88em; margin-left: 4px; }

.optional-badge {
    font-size: 11px;
    background: #e5e7eb;
    color: #6b7280;
    border-radius: 10px;
    padding: 1px 7px;
    margin-left: 6px;
}

.not-default-badge {
    font-size: 11px;
    background: #fef9c3;
    color: #92400e;
    border-radius: 10px;
    padding: 1px 7px;
    margin-left: 4px;
}

/* ── Inline allergen chips on ingredient rows ─────────────────────────────── */
.allergen-chip-small {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    background: #fee2e2;
    color: #b91c1c;
    margin-left: 4px;
    font-weight: 600;
}

.allergen-chip-warning {
    background: #fef3c7;
    color: #92400e;
}

.allergen-chip-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.qty { color: #9ca3af; font-size: 0.88em; margin-left: 4px; }

/* ── Substitution details ─────────────────────────────────────────────────── */
.sub-details {
    display: inline;
    margin-left: 8px;
    font-size: 0.88em;
}

.sub-details summary {
    cursor: pointer;
    color: #2563eb;
    display: inline;
}

.sub-list {
    margin: 6px 0 0;
    padding-left: 16px;
}

.sub-list li { margin-bottom: 4px; }
.sub-notes { color: #6b7280; }
.allergen-note { font-size: 0.88em; color: #6b7280; margin: 0 0 8px; }

/* ── Natural language parsed feedback ────────────────────────────────────── */
.nl-interpretation {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 12px;
}

.nl-interpretation-label {
    font-weight: 600;
    color: #6d28d9;
    margin-right: 2px;
    white-space: nowrap;
}

.spelling-correction {
    padding: 8px 14px;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #78350f;
}

/* ── HTMX loading skeleton ───────────────────────────────────────────────── */
@keyframes shimmer-sweep {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Sweeping shimmer over stable card content while HTMX fetches */
#recipe-list.recipe-list--loading {
    position: relative;
    pointer-events: none;
    user-select: none;
}
#recipe-list.recipe-list--loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0)    0%,
        rgba(255, 255, 255, 0.72) 50%,
        rgba(255, 255, 255, 0)    100%
    );
    background-size: 200% 100%;
    animation: shimmer-sweep 1.4s ease-in-out infinite;
    z-index: 10;
    border-radius: 4px;
}

/* Screen-reader-only loading / error status */
.recipe-status {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/* Visible error state injected by JS */
.recipe-list-error {
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin: 16px 0;
}

.nl-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    background: #e5e7eb;
    color: #374151;
}

.nl-chip-region   { background: #dbeafe; color: #1e40af; }
.nl-chip-meal     { background: #fef3c7; color: #92400e; }
.nl-chip-allergen { background: #fee2e2; color: #991b1b; }
.nl-chip-nutrition { background: #d1fae5; color: #065f46; }
.nl-chip-keyword  { background: #f3f4f6; color: #374151; font-style: italic; }

/* ── Carousel ─────────────────────────────────────────────────────────────── */
.carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Scrollable track */
.carousel-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 6px 2px 18px;
    list-style: none;
    margin: 0;
    flex: 1;
    min-width: 0;          /* required: lets flex child shrink below content width → enables scroll */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel-track::-webkit-scrollbar { display: none; }

/* Smaller cards inside carousel — scoped so flat-list cards are unaffected */
.carousel-track .recipe-card {
    flex: 0 0 168px;
    padding: 14px 12px 12px;
    border-radius: 14px;
    scroll-snap-align: start;
    text-align: center;
}

.carousel-track .recipe-thumb {
    width: 100px;
    height: 100px;
    margin-bottom: 10px;
}

.carousel-track .recipe-link h3 {
    font-size: 13px;
    line-height: 1.25;
    margin-bottom: 3px;
    /* clamp to 2 lines to keep cards tidy */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carousel-track .card-badges {
    margin-top: 6px;
}

.carousel-track .badge {
    font-size: 10px;
    padding: 1px 6px;
}

/* Arrow buttons */
.carousel-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #e0dbd2;
    background: white;
    cursor: pointer;
    font-size: 15px;
    color: #4a5240;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: background 0.15s, border-color 0.15s, transform 0.12s;
    line-height: 1;
}

.carousel-btn:hover {
    background: #f5f8f2;
    border-color: #8a9e7c;
    transform: scale(1.06);
}

.carousel-btn:active {
    transform: scale(0.94);
}

/* ── Search results carousel ─────────────────────────────────────────────── */
.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.search-results-count {
    font-size: 13px;
    font-weight: 600;
    color: #6b7a60;
    letter-spacing: 0.02em;
}

.search-carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-carousel-btn {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.search-carousel-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 6px 4px 20px;
    list-style: none;
    margin: 0;
    flex: 1;
    min-width: 0;          /* let the track shrink below content width → enables scroll */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.search-carousel-track::-webkit-scrollbar { display: none; }

.search-result-card {
    flex: 0 0 220px;
    scroll-snap-align: start;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #e8e4de;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.search-result-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.13);
}

.search-result-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.search-result-img-wrap {
    position: relative;
    width: 100%;
    height: 158px;
    overflow: hidden;
    background: #ece9e2;
    flex-shrink: 0;
}

.search-result-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.search-result-card:hover .search-result-img {
    transform: scale(1.06);
}

.search-result-adaptable-pill {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.92);
    color: #2d7a50;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.04em;
    backdrop-filter: blur(4px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.search-result-body {
    padding: 13px 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.search-result-title {
    font-size: 13.5px;
    font-weight: 650;
    color: #1e1e1e;
    margin: 0 0 6px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-meta {
    font-size: 11px;
    color: #8a8a7a;
    margin: 0 0 9px;
    line-height: 1.5;
}

.search-result-dot {
    margin: 0 3px;
    opacity: 0.45;
}

.search-result-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: auto;
}

/* ── Mobile ───────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .site-nav { padding: 10px 16px; }

    .hero-content { padding: 36px 16px 32px; }
    .hero-title { letter-spacing: 0.05em; }

    .filter-chips-section { padding: 12px 16px; }
    .allergen-header { gap: 6px; }

    .recipes-container { padding: 0 16px; margin: 24px auto; }

    /* flat-list grid (search results) */
    .recipe-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .recipe-thumb {
        width: 100px;
        height: 100px;
    }

    /* carousels — hide arrows, let user swipe */
    .carousel-btn { display: none; }
    .carousel-track { gap: 10px; padding-bottom: 12px; }

    /* search result carousel on mobile */
    .search-carousel-btn { display: none; }
    .search-carousel-track { gap: 12px; padding-bottom: 14px; }
    .search-result-card { flex: 0 0 175px; border-radius: 14px; }
    .search-result-img-wrap { height: 124px; }
    .search-result-title { font-size: 12.5px; }

    .page-content { padding: 20px 16px; }

    .about-section {
        margin-top: 0;
        padding: 34px 20px;
    }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .about-photo-main {
        width: 100%;
        height: min(360px, 90vw);
    }

    .pagination {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
}

/* ── Auth pages ──────────────────────────────────────────────────────────── */
.auth-main {
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background: #f7f5f0;
}
.auth-main--profile {
    justify-content: flex-start;
    padding-top: 40px;
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}
.auth-card--wide { max-width: 620px; }

.auth-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: #2d3a20;
    margin: 0 0 24px;
}
.auth-sub {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    color: #6b7560;
    margin: -12px 0 20px;
    line-height: 1.5;
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }

.auth-label {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #2d3a20;
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.auth-hint {
    font-weight: 400;
    color: #8a8a7a;
    font-size: 12px;
}

.auth-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d6d3c8;
    border-radius: 8px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    color: #2d3a20;
    background: #fafaf8;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.auth-input:focus {
    outline: none;
    border-color: #6b8c5e;
    background: white;
}
.auth-input--code {
    font-size: 24px;
    letter-spacing: 0.3em;
    text-align: center;
}

.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.auth-allergens-fieldset {
    border: 1.5px solid #d6d3c8;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.auth-allergen-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.allergen-chip--sm { font-size: 12px; }
.allergen-chip--sm span { padding: 4px 10px; }

.auth-btn {
    background: #6b8c5e;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 4px;
}
.auth-btn:hover { background: #5a7a4f; }
.auth-btn--sm { padding: 8px 18px; font-size: 14px; margin-top: 12px; }
.auth-btn--google {
    background: #fff;
    color: #1f1f1f;
    border: 1.5px solid #dadce0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
}
.auth-btn--google:hover { background: #f8f9fa; border-color: #bdc1c6; color: #1f1f1f; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0;
    color: #8a8a7a;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: #e8e5de; }

.auth-error {
    background: #fff0f0;
    border: 1px solid #f5c6c6;
    border-radius: 8px;
    padding: 10px 14px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: #c0392b;
    margin-bottom: 4px;
}
.auth-error--success {
    background: #f0fff4;
    border-color: #a8d5b5;
    color: #2d6a3f;
}

.auth-alt {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: #8a8a7a;
    text-align: center;
    margin: 20px 0 0;
}
.auth-alt a { color: #6b8c5e; font-weight: 600; }

/* ── Profile page ────────────────────────────────────────────────────────── */
.profile-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    padding: 28px 32px;
    width: 100%;
    max-width: 680px;
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}
.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.profile-avatar--placeholder {
    background: #6b8c5e;
    color: white;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-avatar-wrap { flex-shrink: 0; }
.profile-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3a20;
    margin: 0 0 4px;
}
.profile-meta {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: #8a8a7a;
    margin: 0;
}
.profile-unverified {
    font-size: 12px;
    color: #c0392b;
    margin: 4px 0 0;
}

.profile-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    padding: 28px 32px;
    width: 100%;
    max-width: 680px;
    margin-bottom: 20px;
}
.profile-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3a20;
    margin: 0 0 6px;
}
.profile-section-sub {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: #8a8a7a;
    margin: 0 0 16px;
}

.profile-grid-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    align-items: end;
}
@media (max-width: 520px) {
    .profile-grid-form { grid-template-columns: 1fr; }
}
.profile-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.profile-field--full {
    grid-column: 1 / -1;
}
.profile-label {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #3a3a2e;
}
.profile-input--sm {
    max-width: 100%;
}
.profile-hint {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    color: #8a8a7a;
    margin: 2px 0 0;
}
.profile-optional {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: #8a8a7a;
    text-transform: none;
}

.session-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f7f5f0;
    border-radius: 8px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
}
.session-label { font-weight: 600; color: #2d3a20; }
.session-meta { color: #8a8a7a; }

/* ── Site footer ─────────────────────────────────────────────────────────── */
.site-footer {
    background: #2d3a20;
    color: rgba(255, 255, 255, 0.65);
    text-align: center;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    padding: 16px 24px;
}

/* ── Personal kitchen ────────────────────────────────────────────────────── */
.acct-body {
    background: #f4f5f1;
    min-height: 100vh;
}

.acct-body [hidden] { display: none !important; }

.acct-body button,
.acct-body input { font: inherit; }

.acct-topnav { min-height: 54px; }

.acct-topnav-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.acct-nav-link { color: white; font-size: 13px; font-weight: 600; }
.acct-nav-link:hover { color: white; }

.acct-icon-button {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    background: transparent;
    color: white;
    cursor: pointer;
}

.acct-icon-button:hover { background: rgba(255, 255, 255, 0.12); }
.acct-icon-button svg { width: 17px; height: 17px; }

.acct-page {
    width: min(1180px, calc(100% - 40px));
    min-height: calc(100vh - 108px);
    margin: 0 auto;
    padding: 36px 0 64px;
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 38px;
    align-items: start;
}

.acct-auth {
    grid-column: 1 / -1;
    min-height: 650px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.75fr);
    gap: 72px;
    align-items: center;
    padding: 24px 6%;
}

.acct-back-link,
.acct-text-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #516349;
    font-size: 13px;
    font-weight: 600;
}

.acct-back-link svg,
.acct-text-button svg { width: 16px; height: 16px; }

.acct-eyebrow,
.acct-section-kicker {
    margin: 26px 0 6px;
    color: #6b8c5e;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.acct-auth-intro h1,
.acct-dashboard-header h1 {
    max-width: 660px;
    margin: 0;
    color: #253020;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 42px;
    line-height: 1.13;
    letter-spacing: 0;
}

.acct-auth-copy {
    max-width: 560px;
    margin: 18px 0 28px;
    color: #626a5d;
    font-size: 16px;
}

.acct-auth-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    color: #414b3c;
    font-size: 13px;
}

.acct-auth-points span { display: inline-flex; align-items: center; gap: 7px; }
.acct-auth-points svg { width: 17px; height: 17px; color: #6b8c5e; }

.acct-auth-panel {
    border: 1px solid #dfe3da;
    border-radius: 8px;
    background: white;
    padding: 28px;
    box-shadow: 0 12px 36px rgba(40, 52, 35, 0.08);
}

.acct-auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid #e5e8e1;
    margin-bottom: 24px;
}

.acct-auth-tabs button {
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    padding: 10px;
    color: #777e72;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.acct-auth-tabs button[aria-selected="true"] { color: #34452d; border-bottom-color: #6b8c5e; }

.acct-form { display: grid; gap: 17px; }
.acct-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acct-field { display: grid; gap: 6px; }
.acct-field label { color: #394334; font-size: 12px; font-weight: 700; }
.acct-field small { color: #858b80; font-size: 11px; }

.acct-field input {
    width: 100%;
    border: 1px solid #cfd5ca;
    border-radius: 6px;
    padding: 11px 12px;
    background: #fcfdfb;
    color: #253020;
    outline: none;
}

.acct-field input:focus { border-color: #6b8c5e; box-shadow: 0 0 0 3px rgba(107, 140, 94, 0.18); }

.acct-primary-button,
.acct-secondary-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 6px;
    padding: 9px 15px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.acct-primary-button { border: 1px solid #526f48; background: #526f48; color: white; }
.acct-primary-button:hover { background: #405a38; }
.acct-secondary-button { border: 1px solid #79916f; background: white; color: #405a38; }
.acct-primary-button svg,
.acct-secondary-button svg { width: 16px; height: 16px; }

.acct-text-button { border: 0; background: transparent; padding: 0; cursor: pointer; }

.acct-code-heading { display: flex; align-items: flex-start; gap: 12px; }
.acct-code-heading > svg { width: 24px; height: 24px; color: #6b8c5e; margin-top: 2px; }
.acct-code-heading h2 { margin: 0; font-size: 18px; }
.acct-code-heading p { margin: 3px 0 0; color: #747b70; font-size: 12px; }
.acct-form-status { min-height: 20px; margin: 14px 0 0; color: #a63a32; font-size: 12px; }

.acct-sidebar {
    position: sticky;
    top: 22px;
    border-right: 1px solid #dce1d8;
    padding-right: 22px;
}

.acct-profile-mini { display: flex; align-items: center; gap: 10px; padding-bottom: 22px; border-bottom: 1px solid #dce1d8; }
.acct-profile-mini > div:last-child { min-width: 0; display: grid; }
.acct-profile-mini strong { color: #2f3b2a; font-size: 13px; }
.acct-profile-mini span { overflow: hidden; color: #858b80; font-size: 10px; text-overflow: ellipsis; }

.acct-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #dfe9da;
    color: #385332;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
}

.acct-avatar-large { width: 68px; height: 68px; font-size: 22px; }

.acct-section-nav { display: grid; gap: 4px; margin-top: 20px; }
.acct-section-nav a { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 6px; color: #626b5d; font-size: 12px; font-weight: 600; }
.acct-section-nav a:hover,
.acct-section-nav a.is-active { background: #e8eee4; color: #34512e; text-decoration: none; }
.acct-section-nav svg { width: 16px; height: 16px; }

.acct-security-note { display: flex; gap: 8px; margin-top: 26px; color: #81887d; font-size: 10px; line-height: 1.45; }
.acct-security-note svg { width: 15px; height: 15px; flex: 0 0 auto; }

.acct-dashboard { min-width: 0; }
.acct-dashboard-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 5px 0 28px; }
.acct-dashboard-header .acct-eyebrow { margin-top: 0; }
.acct-dashboard-header h1 { font-size: 34px; }
.acct-dashboard-header > div > p:last-child { margin: 8px 0 0; color: #72796d; font-size: 13px; }

.acct-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid #dce1d8;
    border-bottom: 1px solid #dce1d8;
    margin-bottom: 8px;
}

.acct-summary > div { display: grid; gap: 2px; padding: 16px 18px; border-right: 1px solid #dce1d8; }
.acct-summary > div:last-child { border-right: 0; }
.acct-summary strong { color: #31442b; font-family: 'Playfair Display', Georgia, serif; font-size: 22px; }
.acct-summary span { color: #7d8478; font-size: 10px; }

.acct-section { padding: 34px 0; border-bottom: 1px solid #dce1d8; scroll-margin-top: 20px; }
.acct-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.acct-section-heading .acct-section-kicker { margin: 0 0 3px; }
.acct-section-heading h2 { margin: 0; color: #2d3928; font-family: 'Playfair Display', Georgia, serif; font-size: 22px; letter-spacing: 0; }

.acct-status { border: 1px solid; border-radius: 999px; padding: 3px 9px; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.acct-status-live { border-color: #93b48b; background: #eaf4e7; color: #315b2a; }
.acct-status-next { border-color: #d8bb76; background: #faf3df; color: #74591d; }
.acct-status-planned { border-color: #c7ccc3; background: #ecefeb; color: #626960; }

.acct-favourite-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.acct-recipe-card { overflow: hidden; border: 1px solid #dce1d8; border-radius: 8px; background: white; }
.acct-recipe-card img { width: 100%; height: 125px; display: block; object-fit: cover; }
.acct-recipe-card > div { padding: 12px; }
.acct-recipe-card span { color: #7e8579; font-size: 9px; text-transform: uppercase; }
.acct-recipe-card h3 { min-height: 38px; margin: 3px 0 10px; color: #2f382c; font-size: 12px; line-height: 1.4; }
.acct-recipe-card a { font-size: 11px; font-weight: 700; }

.acct-allergen-form fieldset { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 16px; padding: 0; border: 0; }
.acct-allergen-form label { cursor: pointer; }
.acct-allergen-form label input { position: absolute; opacity: 0; pointer-events: none; }
.acct-allergen-form label span { display: inline-block; border: 1px solid #cfd5ca; border-radius: 999px; padding: 6px 10px; background: white; color: #525c4d; font-size: 10px; }
.acct-allergen-form label input:checked + span { border-color: #bd6b63; background: #fff0ef; color: #8c312b; }
.acct-allergen-form label input:focus-visible + span { outline: 3px solid rgba(107, 140, 94, 0.28); }
.acct-inline-status { display: inline; margin-left: 10px; color: #667161; font-size: 11px; }

.acct-empty-state { min-height: 140px; display: grid; place-items: center; align-content: center; gap: 7px; border: 1px dashed #cfd5ca; border-radius: 8px; color: #7d8578; text-align: center; }
.acct-empty-state svg { width: 22px; height: 22px; }
.acct-empty-state p { margin: 0; font-size: 12px; }
.acct-empty-state a { font-size: 11px; font-weight: 700; }
.acct-empty-inline { min-height: 88px; grid-template-columns: auto 1fr; justify-content: start; place-items: center start; padding: 18px; text-align: left; }
.acct-empty-inline strong { color: #485242; font-size: 12px; }
.acct-empty-inline div p { margin-top: 2px; }

.acct-shopping-layout { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 16px; }
.acct-shopping-tool,
.acct-substitution-panel { border: 1px solid #d8ddd4; border-radius: 8px; background: white; padding: 17px; }
.acct-shopping-title { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 13px; border-bottom: 1px solid #e7eae4; }
.acct-shopping-title span { color: #8b9187; font-size: 9px; text-transform: uppercase; }
.acct-shopping-title h3 { margin: 2px 0 0; font-size: 13px; }
.acct-shopping-title a { align-self: center; font-size: 10px; font-weight: 700; }
.acct-shopping-list { list-style: none; margin: 12px 0 0; padding: 0; }
.acct-shopping-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #eef0ec; }
.acct-shopping-list li:last-child { border-bottom: 0; }
.acct-shopping-list label { display: flex; align-items: center; gap: 8px; color: #465140; font-size: 11px; }
.acct-shopping-list input { accent-color: #6b8c5e; }
.acct-shopping-list small { color: #8a9185; font-size: 9px; }
.acct-substitution-panel h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 12px; color: #43503d; font-size: 12px; }
.acct-substitution-panel h3 svg { width: 16px; height: 16px; }
.acct-substitution-panel > p { color: #838a7f; font-size: 11px; }
.acct-substitution-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 7px; align-items: center; padding: 9px 0; border-bottom: 1px solid #eef0ec; font-size: 10px; }
.acct-substitution-row svg { width: 13px; height: 13px; color: #8a9e7c; }
.acct-substitution-row small { grid-column: 3; color: #9a4d45; }

.acct-provider-list { border-top: 1px solid #dce1d8; }
.acct-provider-list > div { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid #dce1d8; }
.acct-provider-mark { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #cbd2c7; border-radius: 6px; background: white; color: #52654b; font-weight: 800; }
.acct-provider-list div div { display: grid; }
.acct-provider-list strong { color: #394534; font-size: 11px; }
.acct-provider-list small,
.acct-provider-list > div > span:last-child { color: #8a9186; font-size: 9px; }

.acct-order-handoff { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; padding: 15px; border: 1px solid #d8ddd4; border-radius: 8px; background: #ecefeb; }
.acct-order-handoff > div { display: flex; align-items: center; gap: 12px; }
.acct-order-handoff svg { width: 21px; height: 21px; color: #6f786b; }
.acct-order-handoff strong { color: #465141; font-size: 11px; }
.acct-order-handoff p { margin: 1px 0 0; color: #858c81; font-size: 9px; }
.acct-order-handoff button { border: 1px solid #c4c9c0; border-radius: 6px; padding: 8px 12px; color: #91978e; background: #f5f6f4; font-size: 10px; font-weight: 700; }

@media (max-width: 820px) {
    .acct-page { width: min(100% - 28px, 720px); grid-template-columns: 1fr; padding-top: 22px; }
    .acct-auth { grid-template-columns: 1fr; gap: 30px; min-height: 0; padding: 20px 0 40px; }
    .acct-auth-intro h1 { font-size: 34px; }
    .acct-sidebar { position: static; border-right: 0; border-bottom: 1px solid #dce1d8; padding: 0 0 14px; }
    .acct-profile-mini,
    .acct-security-note { display: none; }
    .acct-section-nav { display: flex; overflow-x: auto; margin: 0; padding-bottom: 4px; }
    .acct-section-nav a { flex: 0 0 auto; }
    .acct-summary { grid-template-columns: 1fr 1fr; }
    .acct-summary > div:nth-child(2) { border-right: 0; }
    .acct-summary > div:nth-child(-n+2) { border-bottom: 1px solid #dce1d8; }
    .acct-favourite-grid { grid-template-columns: repeat(2, 1fr); }
    .acct-shopping-layout { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .acct-topnav { padding: 10px 14px; }
    .acct-topnav .site-nav-brand { max-width: 220px; font-size: 15px; line-height: 1.2; }
    .acct-auth-panel { padding: 20px; }
    .acct-auth-intro h1 { font-size: 29px; }
    .acct-auth-points { display: grid; }
    .acct-form-row { grid-template-columns: 1fr; }
    .acct-dashboard-header h1 { font-size: 28px; }
    .acct-avatar-large { width: 52px; height: 52px; }
    .acct-favourite-grid { grid-template-columns: 1fr; }
    .acct-recipe-card { display: grid; grid-template-columns: 116px 1fr; }
    .acct-recipe-card img { height: 100%; min-height: 116px; }
    .acct-recipe-card h3 { min-height: 0; }
    .acct-order-handoff { align-items: flex-start; flex-direction: column; }
    .acct-provider-list > div { grid-template-columns: 34px 1fr; }
    .acct-provider-list > div > span:last-child { grid-column: 2; }
}

/* ── Allergen substitution guide ─────────────────────────────────────────── */
/* ── Allergen substitutions page ─────────────────────────────────────────── */
.subs-page {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
    padding: 36px 0 70px;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.subs-card {
    background: #fff;
    border: 1px solid #e8e4de;
    border-radius: 12px;
    padding: 20px 24px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.subs-card-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    color: #2d3a20;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8e4de;
}

.subs-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.subs-stat {
    align-items: flex-start;
    text-align: left;
    flex: none;
    min-width: 0;
    gap: 8px;
}

.subs-stat-text {
    font-size: 13px;
    font-weight: 400;
    color: #4a5240;
    line-height: 1.6;
    text-align: left;
}

.subs-stat--caution {
    background: #fff9ed;
    border: 1px solid #fde68a;
}

.subs-stat--caution .rd-stat-label {
    color: #92610a;
}

.subs-stat--caution .subs-stat-text {
    color: #6c542c;
}

.subs-stat--list {
    background: #f0f5ed;
}

.subs-list {
    margin: 0;
    padding-left: 16px;
    font-size: 13px;
    color: #4a5240;
    line-height: 1.65;
}

.subs-list li { margin-bottom: 5px; }
.subs-list li:last-child { margin-bottom: 0; }

.subs-page .guide-copy { padding: 0; max-width: 100%; }
.subs-page .guide-safety { margin: 0; }
.subs-page .guide-principles { padding: 0; border-top: none; }
.subs-page .guide-sources { padding: 0; max-width: 100%; }
.subs-page .guide-sources h2 { font-size: 19px; }
.subs-page .rd-section-title { margin-bottom: 16px; }

@media (max-width: 760px) {
    .subs-card-grid { grid-template-columns: 1fr; }
    .subs-page { gap: 24px; }
}

/* ── Legacy guide page (kept for compat) ──────────────────────────────────── */
.guide-body { background: #f6f7f3; }

.guide-nav-actions { display: flex; align-items: center; gap: 18px; }
.guide-nav-actions a { color: white; font-size: 12px; font-weight: 600; }

.guide-page {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
    padding: 42px 0 70px;
}

.guide-header { max-width: 820px; margin-bottom: 30px; }
.guide-back { color: #516349; font-size: 12px; font-weight: 700; }
.guide-kicker,
.guide-section-heading > p { margin: 30px 0 5px; color: #6b8c5e; font-size: 10px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
.guide-header h1 { margin: 0; color: #253020; font-family: 'Playfair Display', Georgia, serif; font-size: 44px; line-height: 1.12; letter-spacing: 0; }
.guide-intro { margin: 18px 0 0; color: #5f695a; font-size: 15px; line-height: 1.75; }

.guide-safety {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 16px;
    align-items: start;
    border-top: 1px solid #c86b60;
    border-bottom: 1px solid #c86b60;
    padding: 18px 0;
    color: #5f332f;
}

.guide-safety-mark { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #c86b60; border-radius: 50%; font-weight: 800; }
.guide-safety h2 { margin: 0 0 4px; font-size: 14px; }
.guide-safety p { margin: 0; font-size: 12px; line-height: 1.65; }

.guide-copy { max-width: 780px; padding: 36px 0; }
.guide-copy h2,
.guide-section-heading h2,
.guide-sources h2 { margin: 0 0 12px; color: #2d3928; font-family: 'Playfair Display', Georgia, serif; font-size: 25px; letter-spacing: 0; }
.guide-copy p { margin: 0 0 12px; color: #626b5d; font-size: 13px; line-height: 1.75; }

.guide-table-section { padding: 12px 0 38px; }
.guide-section-heading > p { margin-top: 0; }
.guide-table-wrap { overflow-x: auto; border: 1px solid #d7ddd3; border-radius: 8px; background: white; }
.guide-table { width: 100%; min-width: 980px; border-collapse: collapse; table-layout: fixed; }
.guide-table th,
.guide-table td { vertical-align: top; border-bottom: 1px solid #e2e6df; border-right: 1px solid #e2e6df; padding: 15px; text-align: left; font-size: 11px; line-height: 1.55; }
.guide-table th:last-child,
.guide-table td:last-child { border-right: 0; }
.guide-table tbody tr:last-child th,
.guide-table tbody tr:last-child td { border-bottom: 0; }
.guide-table thead th { background: #e7ede3; color: #35452f; font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; }
.guide-table thead th:nth-child(1) { width: 15%; }
.guide-table thead th:nth-child(2) { width: 22%; }
.guide-table thead th:nth-child(3) { width: 33%; }
.guide-table thead th:nth-child(4) { width: 30%; }
.guide-table tbody th { color: #30462a; font-size: 12px; }
.guide-table td { color: #596254; }
.guide-table ul { margin: 0; padding-left: 16px; }
.guide-table li { margin-bottom: 5px; }
.guide-table li:last-child { margin-bottom: 0; }
.guide-table .guide-caution { background: #fff9ed; color: #6c542c; }

.guide-principles { padding: 34px 0; border-top: 1px solid #d7ddd3; }
.guide-principle-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #d7ddd3; border-bottom: 1px solid #d7ddd3; }
.guide-principle-grid > div { padding: 20px; border-right: 1px solid #d7ddd3; }
.guide-principle-grid > div:last-child { border-right: 0; }
.guide-principle-grid span { color: #9c5b4f; font-size: 10px; font-weight: 800; }
.guide-principle-grid h3 { margin: 7px 0 6px; color: #35422f; font-size: 12px; }
.guide-principle-grid p { margin: 0; color: #737b6f; font-size: 10px; line-height: 1.65; }

.guide-sources { max-width: 780px; padding: 34px 0 22px; }
.guide-sources ul { margin: 0 0 16px; padding-left: 18px; }
.guide-sources li { margin-bottom: 7px; color: #667060; font-size: 11px; }
.guide-sources a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.guide-sources > p { color: #858c81; font-size: 10px; }
.guide-disclaimer { border-left: 3px solid #d9ad45; background: #fff9e8; padding: 14px 16px; color: #6b5a34; font-size: 11px; }

@media (max-width: 760px) {
    .guide-page { width: min(100% - 28px, 680px); padding-top: 28px; }
    .guide-header h1 { font-size: 34px; }
    .guide-principle-grid { grid-template-columns: 1fr 1fr; }
    .guide-principle-grid > div:nth-child(2) { border-right: 0; }
    .guide-principle-grid > div:nth-child(-n+2) { border-bottom: 1px solid #d7ddd3; }
}

@media (max-width: 480px) {
    .guide-body .site-nav { align-items: flex-start; }
    .guide-body .site-nav-brand { max-width: 210px; font-size: 15px; line-height: 1.2; }
    .guide-nav-actions { display: grid; gap: 2px; text-align: right; }
    .guide-header h1 { font-size: 29px; }
    .guide-intro { font-size: 13px; }
    .guide-safety { grid-template-columns: 30px 1fr; }
    .guide-safety-mark { width: 28px; height: 28px; }
    .guide-principle-grid { grid-template-columns: 1fr; }
    .guide-principle-grid > div { border-right: 0; border-bottom: 1px solid #d7ddd3; }
    .guide-principle-grid > div:last-child { border-bottom: 0; }
}

/* ── Favourite (heart) button ────────────────────────────────────────────── */
.fav-form {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    margin: 0;
}
.recipe-card { position: relative; }

.fav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.88);
    color: #aaa;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    transition: background 0.15s, color 0.15s, transform 0.1s;
}
.fav-btn:hover { background: #fff; color: #e05c6a; transform: scale(1.12); }
.fav-btn--active { color: #e05c6a; }
.fav-btn--active:hover { color: #c0404e; }

/* Larger heart on recipe detail page */
.rd-title-row { display: flex; align-items: flex-start; gap: 14px; }
.rd-title-row .rd-title { flex: 1; margin: 0; }
.rd-title-row .fav-form { position: static; margin-top: 6px; }
.rd-title-row .fav-btn { width: 42px; height: 42px; font-size: 20px; }

/* ── For-me personalisation banner ──────────────────────────────────────── */
.for-me-banner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 10px 24px;
    background: #f0f4ee;
    border-bottom: 1px solid #d9e3d5;
    font-size: 14px;
    color: #4a5e40;
}
.for-me-banner--active {
    background: #e6f0e2;
    border-bottom-color: #b8d4b0;
}
.for-me-banner--prompt {
    background: #fdf8ef;
    border-bottom-color: #e8dcc8;
    color: #6b5c3a;
}
.for-me-icon { font-size: 16px; }
.for-me-text { flex: 1; min-width: 200px; }
.for-me-link {
    font-weight: 600;
    color: #6b8c5e;
    text-decoration: none;
    white-space: nowrap;
    padding: 4px 12px;
    border: 1px solid #6b8c5e;
    border-radius: 20px;
    transition: background 0.15s, color 0.15s;
}
.for-me-link:hover { background: #6b8c5e; color: #fff; }
.for-me-link--primary {
    background: #6b8c5e;
    color: #fff;
}
.for-me-link--primary:hover { background: #5a7a4f; }

/* ── Profile quick links ─────────────────────────────────────────────────── */
.profile-section--links { padding-bottom: 8px; }
.profile-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.profile-quick-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #d0d9cb;
    border-radius: 10px;
    text-decoration: none;
    color: #3a4e33;
    font-size: 14px;
    font-weight: 500;
    background: #f8faf7;
    transition: background 0.15s, border-color 0.15s;
}
.profile-quick-link:hover { background: #eef3ec; border-color: #6b8c5e; }
.profile-quick-link--green { background: #e6f0e2; border-color: #b8d4b0; color: #2d4a28; }
.profile-quick-link--green:hover { background: #d7ebd2; }
.profile-quick-link-icon { font-size: 16px; }

/* ── Favourites list page ────────────────────────────────────────────────── */
.profile-section-actions { margin-bottom: 16px; }
.auth-alt-link { color: #6b8c5e; font-size: 14px; text-decoration: none; font-weight: 500; }
.auth-alt-link:hover { text-decoration: underline; }

.fav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.fav-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border: 1px solid #e0e6dc;
    border-radius: 10px;
    background: #fafcf9;
    transition: border-color 0.15s;
}
.fav-list-item:hover { border-color: #6b8c5e; }
.fav-list-link {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}
.fav-list-thumb {
    width: 80px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.fav-list-info { min-width: 0; }
.fav-list-title {
    margin: 0;
    font-weight: 600;
    font-size: 15px;
    color: #2d3a20;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fav-list-meta { margin: 2px 0 0; font-size: 12px; color: #7a8a72; }
.fav-list-item .fav-form { position: static; }
.fav-list-item .fav-btn--remove { background: #fef0f1; color: #e05c6a; flex-shrink: 0; }
.fav-list-item .fav-btn--remove:hover { background: #fde0e2; }

.fav-empty {
    text-align: center;
    padding: 48px 24px;
    color: #8a8a7a;
}
.fav-empty-icon { font-size: 40px; margin: 0 0 12px; }
.fav-empty-title { font-size: 20px; font-weight: 600; color: #4a5e40; margin: 0 0 6px; }
.fav-empty-sub { margin: 0 0 20px; font-size: 15px; }

/* ═══════════════════════════════════════════════════════════════════
   Profile page (pf- prefix)
   ═══════════════════════════════════════════════════════════════════ */

.pf-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 20px 60px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Flash */
.pf-flash {
    background: #e6f4e0;
    border: 1px solid #b8d4b0;
    border-radius: 10px;
    padding: 12px 18px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    color: #2d4a28;
}

/* ── Hero ── */
.pf-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.pf-hero-left {
    display: flex;
    align-items: center;
    gap: 20px;
}
.pf-hero-right {
    text-align: right;
}
.pf-page-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 700;
    color: #2d3a20;
    margin: 0 0 4px;
}
.pf-page-sub {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    color: #6b7560;
    margin: 0;
    max-width: 280px;
}
.pf-hero-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3a20;
    margin: 0 0 3px;
}
.pf-hero-sub {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: #8a8a7a;
    margin: 0;
}
.pf-hero-unverified {
    font-size: 12px;
    color: #c0392b;
    margin: 4px 0 0;
}

/* Avatar */
.pf-avatar-form { display: contents; }
.pf-avatar-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}
.pf-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.pf-avatar--placeholder {
    background: #6b8c5e;
    color: white;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pf-avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 26px;
    height: 26px;
    background: #2d3a20;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid white;
    transition: background 0.15s;
}
.pf-avatar-edit:hover { background: #4a6b3a; }
.pf-avatar-input { display: none; }

/* ── Cards ── */
.pf-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    padding: 24px 28px;
}
.pf-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.pf-card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #2d3a20;
    margin: 0;
}
.pf-card-sub {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: #8a8a7a;
    margin: -8px 0 14px;
}
.pf-card-link {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #5a8a4a;
    text-decoration: none;
}
.pf-card-link:hover { text-decoration: underline; }
.pf-optional-tag {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    color: #9a9a8a;
    background: #f0ede8;
    border-radius: 4px;
    padding: 2px 7px;
}

/* ── Food safety ── */
.pf-safety-card { }
.pf-safety-body {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}
.pf-safety-left { flex: 1; min-width: 200px; }
.pf-safety-right {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.pf-for-me-row {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 10px 14px;
    background: #e8f4e4;
    border-radius: 10px;
    border: 1px solid #c2debb;
    transition: background 0.15s;
}
.pf-for-me-row:hover { background: #d8ecd4; }
.pf-for-me-label {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #2d4a28;
}
.pf-toggle-badge {
    background: #4a8a3a;
    color: white;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.04em;
}
.pf-safety-note {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    color: #7a8a72;
    margin: 0;
    text-align: right;
}
.pf-empty-inline {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: #8a8a7a;
    margin: 6px 0 0;
}

/* ── Chips ── */
.pf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 10px;
}
.pf-chips--wrap { margin: 0 0 16px; }
.pf-chip {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    background: #f0ede8;
    color: #3a3a2e;
    border: 1.5px solid #ddd9d0;
    cursor: pointer;
    transition: all 0.12s;
    display: inline-block;
}
.pf-chip--green {
    background: #e6f0e2;
    border-color: #b8d4b0;
    color: #2d4a28;
}
.pf-chip-label { display: inline-block; }
.pf-chip-label input[type="checkbox"] { display: none; }
.pf-chip-label input:checked + .pf-chip {
    background: #2d3a20;
    border-color: #2d3a20;
    color: white;
}
.pf-chip-label input:checked + .pf-chip::before {
    content: "✓ ";
    font-weight: 700;
}
.pf-chip-label:hover .pf-chip {
    border-color: #6b8c5e;
    background: #f5f8f3;
}
.pf-chip-label input:checked:hover + .pf-chip { background: #4a6b3a; }

.pf-text-link {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: #5a8a4a;
    text-decoration: none;
    font-weight: 500;
}
.pf-text-link:hover { text-decoration: underline; }

/* ── Quick actions ── */
.pf-actions-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
@media (max-width: 640px) {
    .pf-actions-row { grid-template-columns: repeat(2, 1fr); }
}
.pf-action-card {
    background: white;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    transition: box-shadow 0.15s, transform 0.12s;
    border: 1.5px solid transparent;
}
.pf-action-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: #c8d8c0;
}
.pf-action-card--green { background: #eef5ea; }
.pf-action-icon { font-size: 22px; margin-bottom: 2px; }
.pf-action-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #2d3a20;
}
.pf-action-sub {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    color: #8a8a7a;
}

/* ── Two column grid ── */
.pf-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 680px) {
    .pf-grid-2 { grid-template-columns: 1fr; }
}

/* ── Recipe thumbs ── */
.pf-recipe-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.pf-recipe-thumb {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-decoration: none;
}
.pf-recipe-thumb-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}
.pf-recipe-thumb-img--empty {
    background: #f0ede8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    aspect-ratio: 1;
    border-radius: 10px;
}
.pf-recipe-thumb-name {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: #3a4a30;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pf-empty-state {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: #8a8a7a;
    line-height: 1.6;
    margin: 0 0 16px;
}

/* ── Forms within cards ── */
.pf-stacked-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pf-form-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.pf-form-row--2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.pf-field-label {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #5a6050;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pf-field-hint {
    font-size: 11px;
    font-weight: 400;
    color: #9aab8a;
    text-transform: none;
    letter-spacing: 0;
}
.pf-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #d6d3c8;
    border-radius: 8px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    color: #2d3a20;
    background: #fafaf8;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.pf-input:focus {
    outline: none;
    border-color: #6b8c5e;
    background: white;
}
.pf-input--sm { font-size: 13px; padding: 7px 11px; }
.pf-input--muted { color: #6b7560; }

/* Buttons */
.pf-btn {
    align-self: flex-start;
    padding: 9px 18px;
    background: #2d3a20;
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    display: inline-block;
}
.pf-btn:hover { background: #4a6b3a; }
.pf-btn--danger { background: #c0392b; }
.pf-btn--danger:hover { background: #a93226; }
.pf-btn-outline {
    display: inline-block;
    padding: 8px 16px;
    border: 1.5px solid #2d3a20;
    border-radius: 8px;
    color: #2d3a20;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}
.pf-btn-outline:hover { background: #f0ede8; }

/* ── Account card ── */
.pf-account-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
.pf-account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0ede8;
}
.pf-account-value {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    color: #2d3a20;
}
.pf-sessions { margin-bottom: 20px; }
.pf-sessions-label { margin: 0 0 8px; display: block; }
.pf-session-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pf-session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f7f5f0;
    border-radius: 8px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
}
.pf-session-device { font-weight: 600; color: #2d3a20; }
.pf-session-meta { color: #8a8a7a; font-size: 12px; }
.pf-allergen-fieldset { border: none; padding: 0; margin: 0; }
.pf-allergen-explainer {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: #5a5a4a;
    line-height: 1.55;
    margin: 0 0 14px;
    padding: 10px 14px;
    background: #f8f6f2;
    border-left: 3px solid #6b8c5e;
    border-radius: 0 8px 8px 0;
}
.pf-change-password-link { margin-left: 10px; }
.pf-btn--danger-outline {
    border-color: #d9534f;
    color: #c0392b;
}
.pf-btn--danger-outline:hover { background: #fef0f0; border-color: #c0392b; }
.pf-delete-confirm-panel {
    margin-top: 14px;
    padding: 16px;
    background: #fef5f5;
    border: 1.5px solid #f0c0bc;
    border-radius: 10px;
}
.pf-delete-confirm-text {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: #5a2020;
    margin: 0 0 14px;
    line-height: 1.5;
}
.pf-delete-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}
.pf-delete-actions .pf-input { max-width: 220px; }
.pf-pantry-card { }
.pf-pantry-count {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    color: #3a5a30;
    margin: 0 0 14px;
    font-weight: 500;
}
.pf-danger-zone {
    border-top: 1px solid #f0ede8;
    padding-top: 20px;
    margin-top: 4px;
}
.pf-danger-note {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: #8a8a7a;
    margin: 0 0 12px;
}
.pf-delete-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.pf-delete-form .pf-input { max-width: 240px; }
.pf-delete-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: #5a2020;
    line-height: 1.4;
    margin-bottom: 4px;
    cursor: pointer;
}
.pf-delete-checkbox-label input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; }

@media (max-width: 600px) {
    .pf-hero { flex-direction: column; }
    .pf-hero-right { text-align: left; }
    .pf-page-sub { max-width: 100%; }
    .pf-safety-right { align-items: flex-start; }
    .pf-safety-note { text-align: left; }
}

/* ── Safety card summary strip ── */
.pf-summary-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #f0ede8;
}
.pf-summary-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pf-summary-label {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #9a9a8a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pf-summary-value {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #2d3a20;
}

/* ── Favourite count line ── */
.pf-fav-count {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #4a6b3a;
    margin: 0 0 14px;
}

/* ── Favourites page header ── */
.fav-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 28px 0 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}
.fav-page-hero {
    display: flex;
    align-items: center;
    gap: 16px;
}
.fav-page-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.fav-page-avatar--placeholder {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #6b8c5e;
    color: white;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.fav-page-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3a20;
    margin: 0 0 3px;
}
.fav-page-sub {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: #8a8a7a;
    margin: 0;
}
.fav-back-link {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #5a8a4a;
    text-decoration: none;
}
.fav-back-link:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════════════════════
   Profile Page — Sidebar Layout (redesign 2026)
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Outer layout ── */
.pf-layout {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ── */
.pf-sidebar {
    width: 260px;
    background: #2d3a20;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
    z-index: 10;
}
.pf-sidebar-inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 0;
}
.pf-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px 20px 20px;
    color: white;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    letter-spacing: 0.02em;
    flex-shrink: 0;
}
.pf-sidebar-brand:hover { color: white; text-decoration: none; opacity: 0.9; }
.pf-sidebar-brand svg { opacity: 0.75; flex-shrink: 0; }

.pf-sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pf-nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(255,255,255,0.72);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.14s, color 0.14s;
    cursor: pointer;
    user-select: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}
.pf-nav-item:hover { background: rgba(255,255,255,0.1); color: white; text-decoration: none; }
.pf-nav-item--active { background: rgba(255,255,255,0.18); color: white; font-weight: 600; }
.pf-nav-item--active:hover { background: rgba(255,255,255,0.22); }
.pf-nav-item--disabled { opacity: 0.45; cursor: default; pointer-events: none; }
.pf-nav-icon { font-size: 15px; flex-shrink: 0; width: 20px; text-align: center; }
.pf-nav-count {
    margin-left: auto;
    background: #5a9a48;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}
.pf-nav-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.45);
    background: rgba(255,255,255,0.08);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.04em;
}

/* Sidebar user footer */
.pf-sidebar-user {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.pf-sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.25);
}
.pf-sidebar-avatar--ph {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #5a8a48;
    color: white;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.25);
}
.pf-sidebar-uinfo {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.pf-sidebar-uname {
    color: white;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pf-sidebar-logout {
    background: none;
    border: none;
    padding: 0;
    color: rgba(255,255,255,0.5);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.pf-sidebar-logout:hover { color: rgba(255,255,255,0.82); }

/* ── Mobile overlay ── */
.pf-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.42);
    z-index: 150;
}
.pf-overlay--visible { display: block; }

/* ── Main content wrap ── */
.pf-main-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #faf8f4;
}
.site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px 48px;
    width: 100%;
    box-sizing: border-box;
}
.pf-mobile-bar { display: none; }
.pf-main {
    flex: 1;
    padding: 32px 24px 48px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1160px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ── Greeting card ── */
.pf-greeting {
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.07);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.pf-greeting-left {
    display: flex;
    align-items: center;
    gap: 20px;
}
.pf-greeting-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: #2d3a20;
    margin: 0 0 4px;
}
.pf-greeting-sub {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    color: #6b7560;
    margin: 0;
}
.pf-greeting-right {
    flex: 1;
    min-width: 200px;
    max-width: 320px;
}
.pf-progress-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}
.pf-progress-label {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #7a8070;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pf-progress-pct {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #4a8a3a;
}
.pf-progress-track {
    width: 100%;
    height: 8px;
    background: #eeeae4;
    border-radius: 4px;
    overflow: hidden;
}
.pf-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a8a3a 0%, #72b85c 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
    min-width: 8px;
}
.pf-progress-hint {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    color: #9a9a8a;
    margin: 6px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pf-progress-hint--done { color: #5a9a48; font-weight: 600; }

/* ── Food safety empty state ── */
.pf-safety-empty {
    text-align: center;
    padding: 20px 12px 8px;
}
.pf-safety-empty-icon { font-size: 38px; margin-bottom: 10px; opacity: 0.55; }
.pf-safety-empty-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #2d3a20;
    margin: 0 0 6px;
}
.pf-safety-empty-sub {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: #7a8070;
    margin: 0 0 16px;
    line-height: 1.5;
}

/* ── AI Meal Planner card ── */
.pf-ai-card {
    background: linear-gradient(130deg, #263318 0%, #3d5a2a 55%, #558040 100%);
    border-radius: 20px;
    box-shadow: 0 6px 28px rgba(38,51,24,0.28);
    padding: 32px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    overflow: hidden;
    position: relative;
}
.pf-ai-content { flex: 1; min-width: 0; }
.pf-ai-badge {
    display: inline-block;
    background: rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.88);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    letter-spacing: 0.03em;
    border: 1px solid rgba(255,255,255,0.2);
}
.pf-ai-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.55rem;
    font-weight: 700;
    color: white;
    margin: 0 0 8px;
}
.pf-ai-desc {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    color: rgba(255,255,255,0.78);
    margin: 0 0 18px;
    line-height: 1.55;
}
.pf-ai-list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.pf-ai-list li {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    padding-left: 18px;
    position: relative;
}
.pf-ai-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #9ed482;
    font-weight: 700;
}
.pf-ai-cta-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.pf-ai-btn {
    background: white;
    color: #2d3a20;
    border: none;
    padding: 11px 22px;
    border-radius: 10px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.15s, transform 0.15s;
}
.pf-ai-btn:hover { background: #f0ede8; transform: translateY(-1px); text-decoration: none; }
.pf-soon-badge {
    display: inline-block;
    background: rgba(255,255,255,0.16);
    color: rgba(255,255,255,0.88);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 11px;
    border-radius: 20px;
    letter-spacing: 0.04em;
    border: 1px solid rgba(255,255,255,0.22);
}
.pf-soon-badge--light {
    display: inline-block;
    background: #fff8e6;
    color: #7a5200;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.03em;
    border: 1px solid #f5d978;
}

/* Floating food emoji animation */
.pf-ai-visual { flex-shrink: 0; }
.pf-ai-emoji-stack {
    position: relative;
    width: 110px;
    height: 110px;
}
.pf-ai-emoji { position: absolute; }
.pf-ai-emoji--1 { font-size: 44px; top: 0; left: 18px; animation: pf-float 3.2s ease-in-out infinite; }
.pf-ai-emoji--2 { font-size: 28px; top: 54px; left: 0; animation: pf-float 3.2s ease-in-out infinite 0.6s; }
.pf-ai-emoji--3 { font-size: 28px; top: 48px; right: 0; animation: pf-float 3.2s ease-in-out infinite 1.2s; }
.pf-ai-emoji--4 { font-size: 24px; top: 8px; right: 4px; animation: pf-float 3.2s ease-in-out infinite 1.8s; }
@keyframes pf-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

/* ── Info rows (meal planning display view) ── */
.pf-info-rows {
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
}
.pf-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid #f0ede8;
}
.pf-info-row:last-child { border-bottom: none; }
.pf-info-label {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #9a9a8a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pf-info-value {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    color: #2d3a20;
    font-weight: 500;
}

/* ── Details / summary edit pattern ── */
.pf-edit-details { margin-top: 12px; }
.pf-edit-details > summary {
    cursor: pointer;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.pf-edit-details > summary::-webkit-details-marker { display: none; }
.pf-btn-outline--sm { font-size: 12px !important; padding: 6px 14px !important; }
.pf-form-mt { margin-top: 18px; }

/* ── Nutrition stats cards ── */
.pf-nutrition-stats {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.pf-nutrition-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f4f8f2;
    border: 1px solid #d8ead0;
    border-radius: 14px;
    padding: 18px 22px;
    flex: 1;
    min-width: 120px;
    text-align: center;
    gap: 5px;
}
.pf-nutrition-icon { font-size: 26px; }
.pf-nutrition-label {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #8a8a7a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pf-nutrition-value {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3a20;
}
.pf-nutrition-disclaimer {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    color: #a0a08a;
    margin: 0 0 14px;
    font-style: italic;
}
.pf-nutrition-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    background: #e8f0e9;
    color: #4a7c59;
    border-radius: 3px;
    padding: 1px 5px;
    margin-left: 4px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.pf-nutrition-badge--low {
    background: #fef3e2;
    color: #b35c00;
}
.pf-nutrition-badge--nhs {
    background: #e8f0fb;
    color: #2355a0;
}
.pf-nhs-hint {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    color: #2355a0;
    background: #eef3fb;
    border: 1px solid #c5d6f5;
    border-radius: 6px;
    padding: 7px 10px;
    margin: 2px 0 10px;
    display: flex;
    gap: 6px;
    align-items: baseline;
    flex-wrap: wrap;
}
.pf-nhs-hint-label {
    font-weight: 600;
    white-space: nowrap;
}

/* ── BMI badge (stats panel) ── */
.pf-bmi-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.88rem;
}
.pf-bmi-badge--green { background: #d4edda; color: #155724; }
.pf-bmi-badge--amber { background: #fff3cd; color: #7d5a00; }
.pf-bmi-badge--red   { background: #f8d7da; color: #721c24; }
.pf-bmi-cat { font-weight: 500; font-size: 0.78rem; }

/* ── BMI live preview (edit form) ── */
.pf-bmi-live {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #f4f6f8;
    border: 1.5px solid #e0e0e0;
    margin-top: 10px;
    font-size: 0.85rem;
    transition: background 0.2s, border-color 0.2s;
}
.pf-bmi-live--green { background: #edf7ef; border-color: #a8d5b3; }
.pf-bmi-live--amber { background: #fffbea; border-color: #f9d56e; }
.pf-bmi-live--red   { background: #fdf0f0; border-color: #f5aaaa; }
.pf-bmi-live-label  { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .07em; color: #666; white-space: nowrap; }
.pf-bmi-live-score  { font-weight: 700; font-size: 1.1rem; color: #1a2e1e; white-space: nowrap; }
.pf-bmi-live-band   { font-weight: 600; flex: 1; min-width: 0; }
.pf-bmi-nhs-link    { font-size: 0.75rem; color: var(--brand, #2a7a4b); text-decoration: none; font-weight: 600; white-space: nowrap; }
.pf-bmi-nhs-link:hover { text-decoration: underline; }
.pf-nhs-eatwell-link { color: #2355a0; font-weight: 600; text-decoration: none; }
.pf-nhs-eatwell-link:hover { text-decoration: underline; }
.pf-nutrition-disclaimer a { color: #2355a0; }

/* ── Unit toggle (cm/ft·in, kg/st·lb) ── */
.pf-unit-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.pf-unit-btn-group {
    display: inline-flex;
    border: 1.5px solid #d0e4d7;
    border-radius: 6px;
    overflow: hidden;
}
.pf-unit-btn {
    padding: 2px 9px;
    font-size: 0.7rem;
    font-weight: 600;
    background: #fff;
    color: #4a7c59;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s, color 0.12s;
}
.pf-unit-btn + .pf-unit-btn { border-left: 1.5px solid #d0e4d7; }
.pf-unit-btn--active { background: #2a7a4b; color: #fff; }
.pf-unit-btn:hover:not(.pf-unit-btn--active) { background: #edf5ef; }
.pf-imperial-row { display: flex; gap: 8px; }
.pf-input--imp { flex: 1; min-width: 0; }

/* ── Dietary preferences grid ── */
.pf-diet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}
.pf-diet-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 13px;
    border-radius: 10px;
    border: 1.5px solid #e4e0d8;
    background: #fafaf8;
    transition: border-color 0.14s, background 0.14s;
    position: relative;
}
.pf-diet-item:has(input:checked) {
    border-color: #4a8a3a;
    background: #f0f8ec;
}
.pf-diet-item:hover { border-color: #9abd88; }
.pf-diet-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.pf-diet-check {
    width: 18px;
    height: 18px;
    border: 2px solid #c8c0b4;
    border-radius: 5px;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.14s, background 0.14s;
    background: white;
}
.pf-diet-item:has(input:checked) .pf-diet-check {
    background: #4a8a3a;
    border-color: #4a8a3a;
}
.pf-diet-item:has(input:checked) .pf-diet-check::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}
.pf-diet-label {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #3a4a30;
}

/* ── Shopping Coming Soon card ── */
.pf-shop-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    padding: 24px 28px;
    border: 1.5px solid #e4eee8;
}
.pf-shop-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.pf-shop-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.pf-shop-desc {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: #7a8070;
    margin: 0 0 14px;
    line-height: 1.5;
}
.pf-shop-stores {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.pf-shop-store {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #9a9a8a;
    background: #f0ede8;
    padding: 4px 11px;
    border-radius: 20px;
    border: 1px solid #ddd8ce;
}
.pf-shop-icon {
    font-size: 52px;
    opacity: 0.18;
    flex-shrink: 0;
    line-height: 1;
}
.pf-shop-btn {
    display: inline-block;
    padding: 9px 20px;
    background: #4a7c59;
    color: #fff;
    border-radius: 8px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
}
.pf-shop-btn:hover { background: #3a6347; transform: translateY(-1px); text-decoration: none; }

/* ── Emotional footer banner ── */
.pf-footer-banner {
    background: linear-gradient(130deg, #3d5a2a 0%, #6b8c5e 100%);
    border-radius: 20px;
    padding: 44px 52px;
    text-align: center;
}
.pf-footer-banner-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.85rem;
    font-weight: 700;
    color: white;
    margin: 0 0 10px;
}
.pf-footer-banner-sub {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    color: rgba(255,255,255,0.82);
    margin: 0 0 26px;
}
.pf-footer-banner-btn {
    display: inline-block;
    background: white;
    color: #2d3a20;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.15s, transform 0.12s;
}
.pf-footer-banner-btn:hover {
    background: #f0f8ec;
    transform: translateY(-2px);
    text-decoration: none;
}

/* ── Mobile responsive ── */
@media (max-width: 900px) {
    .pf-main { padding: 24px 20px 40px; }
}

@media (max-width: 768px) {
    .pf-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.25s cubic-bezier(.4,0,.2,1);
    }
    .pf-sidebar--open { transform: translateX(0); }

    .pf-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 13px 20px;
        background: white;
        border-bottom: 1px solid #e8e4dc;
        position: sticky;
        top: 0;
        z-index: 100;
        flex-shrink: 0;
    }
    .pf-hamburger {
        width: 38px;
        height: 38px;
        background: none;
        border: none;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        padding: 6px;
        border-radius: 8px;
        transition: background 0.14s;
    }
    .pf-hamburger:hover { background: #f0ede8; }
    .pf-hamburger span {
        display: block;
        width: 20px;
        height: 2px;
        background: #2d3a20;
        border-radius: 2px;
    }
    .pf-mobile-brand {
        font-family: 'Playfair Display', Georgia, serif;
        font-size: 1.1rem;
        font-weight: 700;
        color: #2d3a20;
        text-decoration: none;
    }
    .pf-mobile-brand:hover { color: #2d3a20; text-decoration: none; }
    .pf-mobile-avatar {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid #e0dcd4;
        display: block;
    }
    .pf-mobile-avatar--ph {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: #6b8c5e;
        color: white;
        font-family: 'Playfair Display', Georgia, serif;
        font-size: 0.9rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        border: 2px solid #e0dcd4;
    }

    .pf-main { padding: 16px 16px 32px; }
    .pf-greeting { padding: 20px; gap: 16px; }
    .pf-greeting-left { gap: 14px; }
    .pf-greeting-title { font-size: 1.35rem; }
    .pf-greeting-right { max-width: 100%; width: 100%; }
    .pf-ai-card { flex-direction: column; padding: 24px; }
    .pf-ai-visual { display: none; }
    .pf-footer-banner { padding: 30px 22px; }
    .pf-footer-banner-title { font-size: 1.45rem; }
}

@media (max-width: 520px) {
    .pf-nutrition-stats { flex-direction: column; }
    .pf-nutrition-stat { flex-direction: row; align-items: center; text-align: left; padding: 14px 18px; }
    .pf-diet-grid { grid-template-columns: repeat(2, 1fr); }
    .pf-shop-icon { display: none; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   Recipe Detail Page — Sidebar + AI Panel Layout (redesign 2026)
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Outer layout ── */
/* ── Content wrap ── */
.rp-content-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f6faf7;
}

/* ── Body: main content + AI panel ── */
.rp-body {
    flex: 1;
    display: flex;
    align-items: flex-start;
    min-width: 0;
    max-width: 1160px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* ── Main content column ── */
.rp-main {
    flex: 1;
    min-width: 0;
    padding: 32px 0 48px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Breadcrumb ── */
.rp-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
}
.rp-breadcrumb-link {
    color: #5a8a4a;
    text-decoration: none;
    font-weight: 500;
}
.rp-breadcrumb-link:hover { text-decoration: underline; }
.rp-breadcrumb-sep { color: #bbb; }
.rp-breadcrumb-crumb { color: #6b7560; }
.rp-breadcrumb-current { color: #2d3a20; font-weight: 600; }

/* ── Recipe header card ── */
.rp-header-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.07);
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.rp-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.rp-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 900;
    color: #1e2a14;
    line-height: 1.15;
    margin: 0;
    flex: 1;
}
.rp-fav-cta {
    font-size: 22px;
    color: #c0a0a0;
    text-decoration: none;
    flex-shrink: 0;
    line-height: 1;
    transition: color 0.15s;
}
.rp-fav-cta:hover { color: #c0392b; }

/* Fav button override inside header card */
.rp-header-card .fav-btn {
    font-size: 22px;
    background: none;
    border: none;
    cursor: pointer;
    color: #c0a0a0;
    padding: 0;
    line-height: 1;
    transition: color 0.15s, transform 0.12s;
}
.rp-header-card .fav-btn:hover { color: #c0392b; transform: scale(1.15); }
.rp-header-card .fav-btn--active { color: #c0392b; }

/* Badges */
.rp-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.rp-badge {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: #f0ede8;
    color: #5a5a4a;
    border: 1px solid #e0ddd6;
}
.rp-badge--safe { background: #e6f4e0; color: #2d5a28; border-color: #b8d4b0; }
.rp-badge--protein { background: #e8f0fc; color: #1e3a6e; border-color: #b8ccea; }
.rp-badge--region { background: #faf0e0; color: #6a4a10; border-color: #e8d8b0; }

/* Description */
.rp-description {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    color: #4a5240;
    line-height: 1.65;
    margin: 0;
}

/* Stats pills */
.rp-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.rp-stat-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f4f2ed;
    border-radius: 12px;
    padding: 10px 16px;
    min-width: 80px;
    flex: 1;
    text-align: center;
    gap: 2px;
}
.rp-stat-pill-icon { font-size: 18px; line-height: 1; }
.rp-stat-pill-val {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #2d3a20;
}
.rp-stat-pill-lbl {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8a8a7a;
}

/* Action buttons */
.rp-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 4px;
}
.rp-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 10px;
    border: 1.5px solid #d6d3c8;
    background: white;
    color: #2d3a20;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.14s, border-color 0.14s, transform 0.1s;
}
.rp-action-btn:hover { background: #f0ede8; border-color: #b8b4a8; transform: translateY(-1px); text-decoration: none; }
.rp-action-btn--disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.rp-action-btn--safety { border-color: #b8d4b0; color: #2d5a28; background: #f0f8ec; }
.rp-action-btn--safety:hover { background: #e0f0d8; }
.rp-action-btn--fav { border-color: #e9b4ba; color: #c0392b; background: #fef0f1; }
.rp-action-btn--fav:hover { background: #fde0e2; border-color: #c0392b; transform: translateY(-1px); }
.rp-fav-action-form { display: contents; }
.rp-action-soon {
    font-size: 10px;
    background: #f0ede8;
    color: #9a9a8a;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* ── Hero image ── */
.rp-hero-wrap {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 28px rgba(0,0,0,0.12);
}
.rp-hero-img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
}
.rp-hero-allergen-badge,
.rp-hero-safe-badge {
    position: absolute;
    bottom: 16px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}
.rp-hero-allergen-badge { background: rgba(180,50,30,0.88); color: white; }
.rp-hero-safe-badge { background: rgba(45,90,40,0.88); color: white; }

/* ── Mobile AI toggle ── */
.rp-ai-mobile-toggle { display: none; }
.rp-ai-mobile-panel { display: none; }

/* ── Tabs ── */
.rp-tabs { display: flex; flex-direction: column; gap: 0; }
.rp-tab-nav {
    display: flex;
    gap: 2px;
    border-bottom: 2px solid #e8e4dc;
    overflow-x: auto;
    scrollbar-width: none;
}
.rp-tab-nav::-webkit-scrollbar { display: none; }
.rp-tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #8a8a7a;
    cursor: pointer;
    transition: color 0.14s, border-color 0.14s;
    white-space: nowrap;
    flex-shrink: 0;
}
.rp-tab-btn:hover { color: #2d3a20; }
.rp-tab-btn--active { color: #2d3a20; border-bottom-color: #4a8a3a; }
.rp-tab-pane { display: none; padding: 24px 0; flex-direction: column; gap: 18px; }
.rp-tab-pane--active { display: flex; }

/* ── Overview tab ── */
.rp-funfact {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #faf8f0;
    border-left: 3px solid #e8c840;
    border-radius: 0 12px 12px 0;
    padding: 16px 20px;
}
.rp-funfact-icon { font-size: 22px; flex-shrink: 0; }
.rp-funfact-label {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9a8a30;
    margin: 0 0 4px;
}
.rp-funfact-text {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    color: #3a3a2a;
    margin: 0;
    line-height: 1.55;
}
.rp-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3a20;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8e4dc;
}
.rp-overview-allergens { display: flex; flex-direction: column; gap: 10px; }
.rp-allergen-note {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    line-height: 1.5;
}
.rp-allergen-note--contains { color: #b91c1c; }
.rp-allergen-note--safe { color: #166534; }
.rp-allergen-guide-link { font-size: 14px; font-weight: 500; }
.rp-allergen-guide-link a { color: #166534; }
.rp-allergen-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-allergen-chip {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    background: #fef2f2;
    color: #b91c1c;
    border: 1.5px solid #fca5a5;
    padding: 4px 10px;
    border-radius: 20px;
}
.rp-allergen-guide-link { margin: 0; }
.rp-text-link { color: #5a8a4a; font-weight: 500; }
.rp-text-link:hover { text-decoration: underline; }

/* Safety analysis panel (when allergen filter active) */
.rp-safety-panel {
    border-radius: 12px;
    padding: 18px 20px;
    border-left: 4px solid #6b7280;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rp-safety--safe     { border-left-color: #22c55e; background: #f0fdf4; }
.rp-safety--adaptable { border-left-color: #f59e0b; background: #fffbeb; }
.rp-safety--unsafe   { border-left-color: #ef4444; background: #fef2f2; }
.rp-safety-verdict {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: 15px;
    margin: 0;
    color: #1e1e1e;
}
.rp-safety-rec {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    color: #374151;
    margin: 0;
}
.rp-safety-block { font-size: 13.5px; }
.rp-safety-list {
    margin: 6px 0 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.rp-sub-notes { font-size: 12px; color: #6b7560; }

/* ── Ingredients tab ── */
.rp-servings-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f7f5f0;
    border-radius: 12px;
}
.rp-servings-label {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #5a6050;
}
.rp-servings-btns { display: flex; gap: 4px; }
.rp-servings-btn {
    width: 38px;
    height: 34px;
    border: 1.5px solid #d6d3c8;
    border-radius: 8px;
    background: white;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #3a3a2a;
    cursor: pointer;
    transition: all 0.12s;
}
.rp-servings-btn:hover { border-color: #4a8a3a; color: #2d5a28; }
.rp-servings-btn--active { background: #2d3a20; border-color: #2d3a20; color: white; }
.rp-ingredient-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.rp-ingredient { display: flex; flex-direction: column; }
.rp-ingredient-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.12s;
}
.rp-ingredient-label:hover { background: #f7f5f0; }
.rp-ingredient-check { position: absolute; opacity: 0; width: 0; height: 0; }
.rp-ingredient-checkbox-ui {
    width: 20px;
    height: 20px;
    border: 2px solid #c8c0b4;
    border-radius: 6px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.12s;
    background: white;
}
.rp-ingredient-check:checked + .rp-ingredient-checkbox-ui {
    background: #4a8a3a;
    border-color: #4a8a3a;
}
.rp-ingredient-check:checked + .rp-ingredient-checkbox-ui::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 5px;
    height: 9px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}
.rp-ingredient-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    flex: 1;
}
.rp-ingredient-name {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #2d3a20;
}
.rp-ingredient--optional .rp-ingredient-name { color: #6b7560; }
.rp-ingredient-check:checked ~ .rp-ingredient-body .rp-ingredient-name {
    text-decoration: line-through;
    color: #9a9a8a;
}
.rp-ingredient-qty {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #4a8a3a;
}
.rp-ingredient-note {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    color: #8a8a7a;
    font-style: italic;
}
.rp-ingredient-tag {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
}
.rp-ingredient-tag--optional { background: #f0ede8; color: #7a7a6a; }
.rp-ingredient-tag--allergen { background: #fef2f2; color: #b91c1c; }
.rp-ingredient-subs {
    margin: 0 0 6px 46px;
}
.rp-ingredient-subs-toggle {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #5a8a4a;
    cursor: pointer;
    padding: 4px 0;
    list-style: none;
}
.rp-ingredient-subs-toggle::-webkit-details-marker { display: none; }
.rp-subs-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 10px 14px;
    background: #f0f8ec;
    border-radius: 10px;
    border-left: 3px solid #4a8a3a;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rp-sub-item {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: #3a4a30;
    line-height: 1.5;
}
.rp-ingredient-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 8px;
}
.rp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: #2d3a20;
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.14s;
}
.rp-btn:hover { background: #4a6b3a; }
.rp-btn--outline {
    background: white;
    color: #2d3a20;
    border: 1.5px solid #2d3a20;
}
.rp-btn--outline:hover { background: #f0ede8; }

/* ── Method tab ── */
.rp-step-card {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background: white;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 18px 20px;
    border-left: 3px solid #4a8a3a;
}
.rp-step-num {
    width: 32px;
    height: 32px;
    background: #2d3a20;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}
.rp-step-body { flex: 1; }
.rp-step-text {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    color: #2d3a20;
    line-height: 1.65;
    margin: 0;
}
.rp-empty-tab {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    color: #8a8a7a;
    text-align: center;
    padding: 32px;
}

/* ── Nutrition tab ── */
.rp-nutrient-grid {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.rp-nutrient-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f4f8f2;
    border: 1px solid #d8ead0;
    border-radius: 16px;
    padding: 20px 28px;
    flex: 1;
    min-width: 120px;
    text-align: center;
    gap: 4px;
}
.rp-nutrient-icon { font-size: 28px; }
.rp-nutrient-val {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3a20;
    line-height: 1;
}
.rp-nutrient-unit {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #6b7560;
}
.rp-nutrient-lbl {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9a9a8a;
}
.rp-nutrition-disclaimer {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    color: #a0a08a;
    font-style: italic;
    margin: 0;
}

/* ── Legal disclaimer ── */
.rp-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #faf8f4;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 14px 18px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: #5a6050;
    line-height: 1.55;
}
.rp-disclaimer-icon { font-size: 16px; flex-shrink: 0; color: #8a9a80; }

/* ── Footer banner ── */
.rp-footer-banner {
    background: linear-gradient(130deg, #3d5a2a 0%, #6b8c5e 100%);
    border-radius: 20px;
    padding: 36px 40px;
    text-align: center;
}
.rp-footer-banner-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    margin: 0 0 8px;
}
.rp-footer-banner-sub {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    color: rgba(255,255,255,0.82);
    margin: 0 0 22px;
}
.rp-footer-banner-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.rp-footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 24px;
    background: white;
    color: #2d3a20;
    border-radius: 10px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.14s, transform 0.12s;
    cursor: pointer;
    border: none;
}
.rp-footer-btn:hover { background: #f0f8ec; transform: translateY(-2px); text-decoration: none; }
.rp-footer-btn--ghost { background: rgba(255,255,255,0.18); color: white; border: 1px solid rgba(255,255,255,0.3); cursor: pointer; }
.rp-footer-btn--ghost:hover { background: rgba(255,255,255,0.28); transform: translateY(-2px); text-decoration: none; }
.rp-footer-soon {
    font-size: 10px;
    background: rgba(255,255,255,0.2);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* ── AI Safety Panel (right sticky) ── */
.rp-ai-panel {
    width: 300px;
    flex-shrink: 0;
    background: white;
    border-left: 1px solid #e8e4dc;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e0ddd4 transparent;
}

/* ── AI panel inner content ── */
.rp-aip-inner {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.rp-aip-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #2d3a20;
    margin: 0;
}

/* Verdict */
.rp-aip-verdict {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    border-left: 3px solid transparent;
}
.rp-aip-verdict--safe { background: #f0fdf4; border-left-color: #22c55e; }
.rp-aip-verdict--unsafe { background: #fef2f2; border-left-color: #ef4444; }
.rp-aip-verdict-icon { font-size: 20px; flex-shrink: 0; line-height: 1; }
.rp-aip-verdict-text {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #1e1e1e;
    margin: 0 0 2px;
}
.rp-aip-verdict-sub {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    color: #6b7560;
    margin: 0;
}
.rp-aip-analysis-link {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #5a8a4a;
    text-decoration: none;
}
.rp-aip-analysis-link:hover { text-decoration: underline; }

/* Setup prompt */
.rp-aip-setup {
    background: #faf8f4;
    border-radius: 10px;
    padding: 14px 16px;
}
.rp-aip-setup-text {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: #6b7560;
    margin: 0;
    line-height: 1.55;
}

/* Allergen section */
.rp-aip-section-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9a9a8a;
    margin: 0 0 10px;
}
.rp-aip-allergen-section { display: flex; flex-direction: column; }
.rp-aip-allergen-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}
.rp-aip-allergen {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 7px;
    border-radius: 7px;
    background: #f7f5f0;
}
.rp-aip-allergen--safe { background: #f0fdf4; }
.rp-aip-allergen--contains { background: #fffbeb; }
.rp-aip-allergen--danger { background: #fef2f2; }
.rp-aip-allergen-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #d1d5db;
}
.rp-aip-allergen--safe .rp-aip-allergen-dot { background: #22c55e; }
.rp-aip-allergen--contains .rp-aip-allergen-dot { background: #f59e0b; }
.rp-aip-allergen--danger .rp-aip-allergen-dot { background: #ef4444; }
.rp-aip-allergen-name {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: #3a3a2a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rp-aip-legend {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.rp-aip-legend-item {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 10px;
    color: #8a8a7a;
    display: flex;
    align-items: center;
    gap: 4px;
}
.rp-aip-legend--safe { color: #166534; }
.rp-aip-legend--contains { color: #92400e; }
.rp-aip-legend--danger { color: #991b1b; }

/* Substitutions */
.rp-aip-subs-section, .rp-aip-no-subs { display: flex; flex-direction: column; gap: 10px; }
.rp-aip-subs-intro {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    color: #6b7560;
    margin: 0;
}
.rp-aip-sub-card {
    background: #f4f9f2;
    border: 1px solid #d0e8c8;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.rp-aip-sub-original {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #4a4a3a;
    text-decoration: line-through;
    opacity: 0.7;
}
.rp-aip-sub-arrow {
    color: #4a8a3a;
    font-size: 16px;
    line-height: 1;
}
.rp-aip-sub-replacement {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #2d5a28;
}
.rp-aip-sub-reason {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    color: #6b7560;
    margin: 4px 0 0;
}
.rp-aip-sub-notes {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    color: #9a9a8a;
    margin: 2px 0 0;
    font-style: italic;
}
.rp-aip-disclaimer {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 10px;
    color: #b0b09a;
    line-height: 1.5;
    margin: 0;
    border-top: 1px solid #f0ede8;
    padding-top: 12px;
}

/* ── Sticky mobile bottom bar ── */
.rp-sticky-bar { display: none; }
.rp-mobile-signin {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
    .rp-ai-panel { width: 260px; }
}

@media (max-width: 900px) {
    .rp-ai-panel { display: none; }

    .rp-ai-mobile-toggle { display: block; }
    .rp-ai-mobile-panel {
        display: block;
        background: white;
        border-radius: 16px;
        box-shadow: 0 2px 16px rgba(0,0,0,0.08);
        overflow: hidden;
    }
    .rp-ai-mobile-btn {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 18px;
        background: #f4f8f2;
        border: 1.5px solid #d0e8c8;
        border-radius: 12px;
        font-family: 'Inter', system-ui, sans-serif;
        font-size: 14px;
        font-weight: 600;
        color: #2d5a28;
        cursor: pointer;
        text-align: left;
    }
    .rp-ai-mobile-chevron { margin-left: auto; transition: transform 0.2s; }

    .rp-sticky-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #e8e4dc;
        padding: 10px 16px;
        gap: 8px;
        z-index: 90;
        box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
    }
    .rp-sticky-btn {
        flex: 1;
        padding: 10px 8px;
        background: #f0ede8;
        border: 1.5px solid #d6d3c8;
        border-radius: 10px;
        font-family: 'Inter', system-ui, sans-serif;
        font-size: 12px;
        font-weight: 600;
        color: #2d3a20;
        cursor: pointer;
        text-align: center;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }
    .rp-sticky-btn--safety { background: #e6f4e0; border-color: #b8d4b0; color: #2d5a28; }
    .rp-sticky-fav .fav-form, .rp-sticky-fav .fav-btn {
        display: flex; align-items: center; justify-content: center;
        width: 100%; height: 100%;
        background: #f0ede8; border: 1.5px solid #d6d3c8; border-radius: 10px;
        font-size: 16px; padding: 10px 8px; cursor: pointer;
    }
    .rp-main { padding: 20px 16px 100px; }
    .rp-hero-img { height: 260px; }
}

@media (max-width: 640px) {
    .rp-header-card { padding: 20px; }
    .rp-footer-banner { padding: 26px 20px; }
    .rp-footer-banner-title { font-size: 1.3rem; }
}


/* ═══════════════════════════════════════════════════════
   NAV — hn- prefix
   Sticky dark-green nav used by all non-sidebar pages
════════════════════════════════════════════════════════ */

.hn-nav {
    position: sticky;
    top: 0;
    z-index: 900;
    background: #1a3c2e;
    box-shadow: 0 1px 0 rgba(0,0,0,.18);
}

.hn-nav-inner {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
}

/* Brand */
.hn-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: -.02em;
}

.hn-brand-leaf { color: #7cc48a; }

/* Desktop nav links */
.hn-nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 36px;
    flex: 1;
}

.hn-nav-link {
    color: rgba(255,255,255,.78);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: color .15s, background .15s;
    white-space: nowrap;
}

a.hn-nav-link:hover { color: #fff; background: rgba(255,255,255,.1); }

.hn-nav-link--soon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,.38);
    cursor: default;
    font-size: .875rem;
    font-weight: 500;
    padding: 6px 12px;
}

.hn-soon-tag {
    font-size: .62rem;
    font-weight: 700;
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.5);
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* Auth action area */
.hn-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.hn-nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,.85);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
    transition: background .15s;
}

.hn-nav-user:hover { background: rgba(255,255,255,.1); }

.hn-nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #7cc48a;
    color: #1a3c2e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 700;
    flex-shrink: 0;
}

.hn-nav-username { display: inline; }

.hn-nav-logout-form { margin: 0; }

/* Nav buttons */
.hn-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 7px;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background .15s, border-color .15s, opacity .15s;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1;
}

.hn-btn--ghost {
    color: rgba(255,255,255,.82);
    background: transparent;
    border: 1.5px solid rgba(255,255,255,.22);
}

.hn-btn--ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.45); color: #fff; }

.hn-btn--primary {
    background: #4a9b6b;
    color: #fff;
    border: 1.5px solid transparent;
}

.hn-btn--primary:hover { background: #3d8559; }

/* Hamburger */
.hn-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: 10px;
    flex-shrink: 0;
}

.hn-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
}

.hn-hamburger--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hn-hamburger--open span:nth-child(2) { opacity: 0; }
.hn-hamburger--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.hn-mobile-menu {
    background: #152e23;
    border-top: 1px solid rgba(255,255,255,.07);
    padding: 6px 0 14px;
}

.hn-mobile-link {
    display: block;
    padding: 11px 24px;
    color: rgba(255,255,255,.78);
    text-decoration: none;
    font-size: .93rem;
    font-weight: 500;
    transition: background .12s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

a.hn-mobile-link:hover, .hn-mobile-link--btn:hover { background: rgba(255,255,255,.05); color: #fff; }

.hn-mobile-link--muted { color: rgba(255,255,255,.32); cursor: default; }
.hn-mobile-link--muted:hover { background: none; color: rgba(255,255,255,.32); }

.hn-mobile-divider { height: 1px; background: rgba(255,255,255,.07); margin: 6px 0; }

.hn-mobile-link--cta {
    margin: 8px 16px 0;
    background: #4a9b6b !important;
    color: #fff !important;
    border-radius: 8px;
    text-align: center;
    padding: 12px;
    display: block;
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 860px) {
    .hn-nav-links { display: none; }
    .hn-hamburger { display: flex; }
}

@media (max-width: 520px) {
    .hn-nav-actions .hn-btn--ghost { display: none; }
    .hn-nav-username { display: none; }
}


/* ═══════════════════════════════════════════════════════
   HOMEPAGE — hp- prefix
════════════════════════════════════════════════════════ */

.hp-body { margin: 0; }

/* sr-only utility */
.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;
}

/* ── Shared section layout ── */
.hp-section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.hp-section-kicker {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #4a9b6b;
    margin: 0 0 4px;
}

.hp-section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.24rem, 2.6vw, 1.8rem);
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.18;
    margin: 0 0 12px;
    letter-spacing: -.02em;
}

.hp-section-title--light { color: #fff; }

/* ── Shared buttons ── */
.hp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 13px 26px;
    border-radius: 8px;
    font-size: .93rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .15s, opacity .15s, background .15s, border-color .15s;
    font-family: inherit;
    letter-spacing: -.01em;
    line-height: 1;
}

.hp-btn:hover { transform: translateY(-1px); }

.hp-btn--primary { background: #4a9b6b; color: #fff; }
.hp-btn--primary:hover { background: #3d8559; }

.hp-btn--outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.38); }
.hp-btn--outline:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.65); }

.hp-btn--outline-dark { background: transparent; color: #1a3c2e; border-color: #1a3c2e; }
.hp-btn--outline-dark:hover { background: #1a3c2e; color: #fff; }

.hp-btn--lg { padding: 15px 32px; font-size: 1rem; }

/* ── Cookie banner ── */
.ck-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    background: #152e23;
    color: #e8f5ee;
    box-shadow: 0 -2px 12px rgba(0,0,0,.18);
}
.ck-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.ck-banner-text {
    flex: 1;
    font-size: .875rem;
    line-height: 1.5;
    margin: 0;
    min-width: 240px;
}
.ck-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.ck-btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background .15s, color .15s;
}
.ck-btn--accept {
    background: #4a9b6b;
    color: #fff;
    border-color: #4a9b6b;
}
.ck-btn--accept:hover { background: #3d8559; border-color: #3d8559; }
.ck-btn--decline {
    background: transparent;
    color: #c8e6d6;
    border-color: rgba(255,255,255,.25);
}
.ck-btn--decline:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.4); }

@media (max-width: 600px) {
    .ck-banner-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
    .ck-banner-actions { width: 100%; }
    .ck-btn { flex: 1; text-align: center; }
}

/* ── Hero ── */
.hp-hero {
    position: relative;
    min-height: auto;
    background: linear-gradient(160deg, #0f2a1c 0%, #1a3c2e 50%, #0d3025 100%);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hp-hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 40%, rgba(74,155,107,.14) 0%, transparent 65%);
    pointer-events: none;
}

.hp-hero-content {
    position: relative;
    width: 100%;
    max-width: 740px;
    margin: 0 auto;
    padding: 16px 24px;
    text-align: center;
    z-index: 1;
}

.hp-hero-kicker {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #7cc48a;
    margin: 0 0 6px;
}

.hp-hero-headline {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.65rem, 4.1vw, 2.85rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
    margin: 0 0 32px;
    letter-spacing: -.025em;
}

.hp-hero-headline--has-sub { margin-bottom: 16px; }

.hp-hero-sub {
    font-size: 1.05rem;
    color: rgba(255,255,255,.68);
    line-height: 1.65;
    margin: 0 auto 10px;
    max-width: 540px;
}

.hp-hero-ctas {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.hp-hero-stats {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    padding: 10px 0;
}

.hp-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 28px;
}

.hp-hero-stat-n {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: #7cc48a;
    line-height: 1;
    margin-bottom: 5px;
}

.hp-hero-stat-l {
    font-size: .68rem;
    color: rgba(255,255,255,.45);
    text-transform: uppercase;
    letter-spacing: .08em;
    white-space: nowrap;
}

.hp-hero-stat-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    gap: 5px;
    transition: opacity .15s;
}

.hp-hero-stat-link:hover { opacity: .8; }
.hp-hero-stat-link:hover .hp-hero-stat-l { color: rgba(255,255,255,.65); }

.hp-hero-stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,.1);
    flex-shrink: 0;
}

/* ── How it works ── */
.hp-how {
    background: #fff;
    padding: 12px 0;
}

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

.hp-how-card {
    position: relative;
    background: #f6faf7;
    border: 1px solid #e4eee8;
    border-radius: 12px;
    padding: 14px 16px;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}

.hp-how-card:hover { box-shadow: 0 4px 16px rgba(26,60,46,.08); transform: translateY(-2px); }

.hp-how-step-num { display: none; }

.hp-how-icon { font-size: 1.3rem; margin-bottom: 4px; line-height: 1; }

.hp-how-card-title {
    font-size: .88rem;
    font-weight: 700;
    color: #1a3c2e;
    margin: 0 0 4px;
}

.hp-how-card-desc {
    font-size: .78rem;
    color: #556b60;
    line-height: 1.5;
    margin: 0;
}

/* ── Discover / recipe list ── */
.hp-discover {
    background: #f6faf7;
    padding: 12px 0;
}

.hp-search-wrapper { margin-bottom: 12px; }

.hp-search-bar {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
}

.hp-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #4a9b6b;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.hp-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 16px 10px 42px;
    border: 2px solid #cce0d4;
    border-radius: 12px;
    font-size: .93rem;
    font-family: inherit;
    color: #1a1a1a;
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.hp-search-input:focus {
    border-color: #4a9b6b;
    box-shadow: 0 0 0 3px rgba(74,155,107,.12);
}

.hp-search-hint {
    font-size: .75rem;
    color: #93b5a3;
    text-align: center;
    margin: 8px 0 0;
}

.hp-filter-section {
    background: #fff;
    border: 1px solid #deeae3;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.hp-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.hp-filter-label {
    font-size: .83rem;
    font-weight: 600;
    color: #1a3c2e;
}

.hp-filter-info-link {
    font-size: .75rem;
    color: #4a9b6b;
    text-decoration: none;
}

.hp-filter-info-link:hover { text-decoration: underline; }

/* ── AI Features ── */
.hp-features {
    background: #1a3c2e;
    padding: 12px 0;
}

.hp-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.hp-feature-card {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    padding: 14px 16px;
    transition: background .2s, transform .2s;
}

.hp-feature-card:hover { background: rgba(255,255,255,.1); transform: translateY(-2px); }

.hp-feature-card--soon { opacity: .6; }
.hp-feature-card--soon:hover { transform: none; }

.hp-feature-icon { font-size: 1.3rem; margin-bottom: 4px; line-height: 1; }

.hp-feature-card-title {
    font-size: .93rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    line-height: 1.3;
}

.hp-feature-card-desc {
    font-size: .83rem;
    color: rgba(255,255,255,.6);
    line-height: 1.65;
    margin: 0;
}

.hp-soon-chip {
    font-size: .6rem;
    font-weight: 700;
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.55);
    padding: 2px 7px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: .05em;
    vertical-align: middle;
}

/* ── Heritage ── */
.hp-heritage {
    background: #fff;
    padding: 96px 0;
}

.hp-heritage-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
}

.hp-heritage-text .hp-section-title { margin-bottom: 18px; }

.hp-heritage-desc {
    font-size: .97rem;
    color: #556b60;
    line-height: 1.72;
    margin: 0 0 28px;
}

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

.hp-heritage-tile {
    background: #f0f7f2;
    border: 1px solid #cce0d4;
    border-radius: 10px;
    padding: 22px 10px;
    text-align: center;
    font-size: .83rem;
    font-weight: 600;
    color: #1a3c2e;
    transition: background .15s, border-color .15s;
    cursor: default;
}

.hp-heritage-tile:hover { background: #d4ebdb; border-color: #a8ccb6; }

/* ── CTA banner ── */
.hp-cta-banner {
    background: #1a3c2e;
    padding: 12px 0;
    text-align: center;
}

.hp-cta-inner { text-align: center; }

.hp-cta-banner .hp-section-kicker { color: #fff; }

.hp-cta-banner .hp-section-title { color: #fff; }

.hp-cta-sub {
    font-size: .82rem;
    color: #fff;
    margin: 0 0 20px;
    line-height: 1.5;
}

/* ── Footer ── */
.hp-footer {
    background: #0f2a1c;
    color: rgba(255,255,255,.65);
}

.hp-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 56px 24px 36px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
}

.hp-footer-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    display: block;
    margin-bottom: 10px;
}

.hp-footer-tagline {
    font-size: .83rem;
    color: rgba(255,255,255,.38);
    margin: 0;
    line-height: 1.5;
}

.hp-footer-links { display: contents; }

.hp-footer-col { display: flex; flex-direction: column; gap: 10px; }

.hp-footer-col-title {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255,255,255,.3);
    margin: 0 0 4px;
}

.hp-footer-link {
    color: rgba(255,255,255,.58);
    text-decoration: none;
    font-size: .85rem;
    transition: color .15s;
}

.hp-footer-link:hover { color: #7cc48a; }

.hp-footer-bottom {
    border-top: 1px solid rgba(255,255,255,.07);
    max-width: 1200px;
    margin: 0 auto;
    padding: 22px 24px 30px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
}

.hp-footer-legal {
    font-size: .72rem;
    color: rgba(255,255,255,.3);
    margin: 0;
    max-width: 580px;
    line-height: 1.55;
}

.hp-footer-copy {
    font-size: .75rem;
    color: rgba(255,255,255,.28);
    margin: 0;
}

/* ── Why Free From ── */
.hp-why {
    background: #f6faf7;
    padding: 12px 0;
}

.hp-why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.hp-why-item {
    text-align: center;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e4eee8;
    border-radius: 12px;
    transition: box-shadow .2s, transform .2s;
}

.hp-why-item:hover { box-shadow: 0 4px 16px rgba(26,60,46,.08); transform: translateY(-2px); }

.hp-why-icon { font-size: 1.3rem; margin-bottom: 4px; line-height: 1; }

.hp-why-title {
    font-size: .93rem;
    font-weight: 700;
    color: #1a3c2e;
    margin: 0 0 8px;
}

.hp-why-desc {
    font-size: .82rem;
    color: #556b60;
    line-height: 1.6;
    margin: 0;
}

/* ── Safety disclaimer block (in about section) ── */
.hp-disclaimer {
    background: #fdf8f0;
    border: 1px solid #e6c98a;
    border-left: 4px solid #d4940a;
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 28px;
    font-size: .82rem;
    line-height: 1.65;
    color: #5c4a1e;
}

.hp-disclaimer-title {
    font-weight: 700;
    margin: 0 0 8px;
    font-size: .85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #4a3810;
}

.hp-disclaimer p { margin: 0 0 8px; }
.hp-disclaimer p:last-child { margin-bottom: 0; }

.hp-disclaimer a {
    color: #7a5c20;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
}

.hp-disclaimer a:hover { color: #4a3810; }

/* ── Homepage responsive ── */
@media (max-width: 1100px) {
    .hp-features-grid { grid-template-columns: repeat(2, 1fr); }
    .hp-footer-inner { grid-template-columns: 1fr 1fr 1fr; }
    .hp-footer-brand { grid-column: span 3; }
}

@media (max-width: 860px) {
    .hp-how-grid { grid-template-columns: 1fr; }
    .hp-why-grid { grid-template-columns: repeat(2, 1fr); }
    .hp-heritage-inner { grid-template-columns: 1fr; gap: 40px; }
    .hp-footer-inner { grid-template-columns: 1fr 1fr; }
    .hp-footer-brand { grid-column: span 2; }
}

@media (max-width: 640px) {
    .hp-hero { min-height: auto; }
    .hp-hero-content { padding: 12px 20px; }
    .hp-hero-ctas { flex-direction: column; align-items: center; }
    .hp-hero-stats { flex-direction: column; gap: 12px; padding: 20px 32px; }
    .hp-hero-stat-divider { width: 48px; height: 1px; }
    .hp-how { padding: 8px 0; }
    .hp-discover { padding: 8px 0; }
    .hp-features-grid { grid-template-columns: 1fr; }
    .hp-why-grid { grid-template-columns: 1fr; gap: 12px; }
    .hp-heritage { padding: 64px 0; }
    .hp-footer-inner { grid-template-columns: 1fr; }
    .hp-footer-brand { grid-column: auto; }
    .hp-footer-bottom { flex-direction: column; }
    .hp-cta-banner { padding: 8px 0 16px; }
}


/* ═══════════════════════════════════════════════════════
   ALLERGEN SUBSTITUTIONS PAGE — as- prefix
════════════════════════════════════════════════════════ */

/* ── Section wrapper ── */
.as-section-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Hero ── */
.as-hero {
    background: linear-gradient(160deg, #0f2a1c 0%, #1a3c2e 55%, #0d3025 100%);
    padding: 20px 0 16px;
    overflow: hidden;
    position: relative;
}

.as-hero::after {
    content: '';
    position: absolute;
    top: -40px;
    right: -60px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74,155,107,.18) 0%, transparent 70%);
    pointer-events: none;
}

.as-hero-inner {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.as-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,.55);
    text-decoration: none;
    font-size: .8rem;
    font-weight: 500;
    margin-bottom: 8px;
    transition: color .15s;
}

.as-back-link:hover { color: rgba(255,255,255,.85); }

.as-hero-badge {
    display: inline-block;
    background: rgba(74,155,107,.22);
    border: 1px solid rgba(74,155,107,.35);
    color: #7cc48a;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 6px;
}

.as-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.65rem, 4.1vw, 2.85rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
    margin: 0 0 32px;
    letter-spacing: -.025em;
}

.as-hero-sub {
    font-size: 1.05rem;
    color: rgba(255,255,255,.68);
    line-height: 1.65;
    margin: 0 auto 32px;
    max-width: 580px;
}

/* ── Search ── */
.as-search-wrap {
    position: relative;
    max-width: 620px;
    margin: 0 auto 14px;
}

.as-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #4a9b6b;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.as-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 15px 48px 15px 48px;
    border: 2px solid rgba(255,255,255,.12);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    color: #fff;
    background: rgba(255,255,255,.08);
    outline: none;
    transition: border-color .15s, background .15s;
    backdrop-filter: blur(4px);
}

.as-search-input::placeholder { color: rgba(255,255,255,.38); }

.as-search-input:focus {
    border-color: rgba(74,155,107,.6);
    background: rgba(255,255,255,.12);
}

.as-search-clear {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.15);
    border: none;
    color: rgba(255,255,255,.7);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: .75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    line-height: 1;
    padding: 0;
}

.as-search-clear:hover { background: rgba(255,255,255,.25); }

.as-search-examples {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.as-search-examples-label {
    font-size: .78rem;
    color: rgba(255,255,255,.4);
    font-weight: 500;
}

.as-search-example {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    color: rgba(255,255,255,.72);
    font-size: .78rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, border-color .15s;
}

.as-search-example:hover {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.3);
    color: #fff;
}

/* ── Hero stats ── */
.as-hero-stats {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    padding: 14px 0;
}

.as-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 24px;
}

.as-hero-stat-n {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: #7cc48a;
    line-height: 1;
    margin-bottom: 4px;
}

.as-hero-stat-l {
    font-size: .65rem;
    color: rgba(255,255,255,.42);
    text-transform: uppercase;
    letter-spacing: .07em;
    white-space: nowrap;
}

.as-hero-stat-divider {
    width: 1px;
    height: 28px;
    background: rgba(255,255,255,.1);
    flex-shrink: 0;
}

/* ── Safety banner ── */
.as-safety-banner {
    background: #fffbeb;
    border-bottom: 2px solid #f5c543;
}

.as-safety-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.as-safety-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    color: #b45309;
    line-height: 1.5;
}

.as-safety-inner p {
    font-size: .85rem;
    color: #78350f;
    line-height: 1.55;
    margin: 0;
}

/* ── Chips navigation ── */
.as-chips-nav {
    background: #fff;
    border-bottom: 1px solid #e4eee8;
    position: sticky;
    top: 64px;
    z-index: 200;
}

.as-chips-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

.as-chips-scroll {
    display: flex;
    gap: 6px;
    padding: 10px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.as-chips-scroll::-webkit-scrollbar { display: none; }

.as-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: #f0f7f2;
    border: 1.5px solid #cce0d4;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
    color: #1a3c2e;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .15s, border-color .15s, color .15s;
}

.as-chip:hover { background: #d4ebdb; border-color: #a8ccb6; }

.as-chip--active {
    background: #1a3c2e;
    border-color: #1a3c2e;
    color: #fff;
}

/* ── Intro / How to use ── */
.as-intro {
    background: #f6faf7;
    padding: 80px 0;
}

.as-section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.55rem, 3vw, 2.2rem);
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
    margin: 0 0 20px;
    letter-spacing: -.02em;
}

.as-intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.as-intro-text p {
    font-size: .95rem;
    color: #556b60;
    line-height: 1.7;
    margin: 0 0 14px;
}

.as-intro-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.as-intro-tip {
    background: #fff;
    border: 1px solid #e4eee8;
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.as-intro-tip-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
}

.as-intro-tip h3 {
    font-size: .9rem;
    font-weight: 700;
    color: #1a3c2e;
    margin: 0 0 4px;
}

.as-intro-tip p {
    font-size: .82rem;
    color: #6b8c77;
    line-height: 1.55;
    margin: 0;
}

/* ── Substitution cards ── */
.as-cards-section {
    background: #fff;
    padding: 80px 0;
}

.as-cards-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.as-card {
    border: 1.5px solid #e4eee8;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow .2s;
    scroll-margin-top: 120px;
}

.as-card:hover { box-shadow: 0 6px 24px rgba(26,60,46,.08); }

.as-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 28px;
    background: #f6faf7;
    border-bottom: 1px solid #e4eee8;
    flex-wrap: wrap;
}

.as-card-header-left {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.as-card-emoji {
    font-size: 2.2rem;
    line-height: 1;
    flex-shrink: 0;
}

.as-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a3c2e;
    margin: 0 0 6px;
}

.as-card-uses {
    font-size: .82rem;
    color: #6b8c77;
    line-height: 1.5;
    margin: 0;
}

.as-card-uses-label {
    font-weight: 600;
    color: #4a7c5f;
    margin-right: 4px;
}


.as-card-body {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 0;
}

.as-card-subs-col {
    padding: 24px 28px;
    border-right: 1px solid #e4eee8;
}

.as-card-caution-col {
    padding: 24px 28px;
    background: #fffbeb;
}

.as-card-col-label {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6b8c77;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.as-col-label-icon--green { color: #4a9b6b; font-size: .9rem; }
.as-col-label-icon--amber { color: #b45309; font-size: .9rem; }

.as-subs-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.as-subs-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: .875rem;
    color: #334b3c;
    line-height: 1.5;
}

.as-subs-check {
    color: #4a9b6b;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
    font-size: .9rem;
}

.as-caution-text {
    font-size: .85rem;
    color: #78350f;
    line-height: 1.6;
    margin: 0;
    background: rgba(245,197,67,.15);
    border-left: 3px solid #f5c543;
    padding: 12px 14px;
    border-radius: 0 8px 8px 0;
}

/* No-results state */
.as-no-results {
    text-align: center;
    padding: 60px 24px;
    background: #f6faf7;
    border-radius: 18px;
    border: 2px dashed #cce0d4;
}

.as-no-results-icon { font-size: 2rem; display: block; margin-bottom: 12px; }

.as-no-results p {
    font-size: .95rem;
    color: #556b60;
    margin: 0 0 16px;
}

.as-no-results-clear {
    background: #1a3c2e;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
}

.as-no-results-clear:hover { background: #2c5c44; }

/* ── AI Insights ── */
.as-insights {
    background: #1a3c2e;
    padding: 80px 0;
}

.as-insights .as-section-title { color: #fff; margin-bottom: 40px; }
.as-insights .hp-section-kicker { color: #7cc48a; }

.as-insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.as-insight-card {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px;
    padding: 24px;
    transition: background .2s;
}

.as-insight-card:hover { background: rgba(255,255,255,.11); }

.as-insight-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.as-insight-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7cc48a;
    flex-shrink: 0;
}

.as-insight-tag {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.45);
}

.as-insight-text {
    font-size: .88rem;
    color: rgba(255,255,255,.72);
    line-height: 1.65;
    margin: 0;
    font-style: italic;
}

/* ── Principles ── */
.as-principles {
    background: #f6faf7;
    padding: 80px 0;
}

.as-principles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.as-principle-card {
    background: #fff;
    border: 1px solid #e4eee8;
    border-radius: 16px;
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}

.as-principle-card:hover { box-shadow: 0 6px 20px rgba(26,60,46,.08); transform: translateY(-2px); }

.as-principle-num {
    position: absolute;
    top: 14px;
    right: 18px;
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    font-weight: 900;
    color: #e4eee8;
    line-height: 1;
    user-select: none;
}

.as-principle-title {
    font-size: .97rem;
    font-weight: 700;
    color: #1a3c2e;
    margin: 0 0 10px;
}

.as-principle-desc {
    font-size: .83rem;
    color: #556b60;
    line-height: 1.65;
    margin: 0;
}

/* ── CTA actions (inside hp-cta-banner) ── */
.as-cta-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Sources ── */
.as-sources {
    background: #fff;
    padding: 64px 0;
}

.as-sources-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.as-sources-list a {
    color: #4a9b6b;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    transition: color .15s;
}

.as-sources-list a:hover { color: #1a3c2e; text-decoration: underline; }

.as-sources-note {
    font-size: .8rem;
    color: #8aab97;
    margin: 0;
    padding-top: 16px;
    border-top: 1px solid #e4eee8;
    line-height: 1.6;
}

/* ── Allergen substitutions responsive ── */
@media (max-width: 960px) {
    .as-principles-grid { grid-template-columns: repeat(2, 1fr); }
    .as-insights-grid { grid-template-columns: repeat(2, 1fr); }
    .as-intro-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 720px) {
    .as-card-body { grid-template-columns: 1fr; }
    .as-card-subs-col { border-right: none; border-bottom: 1px solid #e4eee8; }
    .as-card-header { flex-direction: column; gap: 14px; }
}

@media (max-width: 640px) {
    .as-hero { padding: 14px 0 12px; }
    .as-hero-title br { display: none; }
    .as-hero-stats { flex-direction: column; gap: 10px; padding: 18px 28px; }
    .as-hero-stat-divider { width: 40px; height: 1px; }
    .as-intro { padding: 56px 0; }
    .as-cards-section { padding: 56px 0; }
    .as-insights { padding: 56px 0; }
    .as-insights-grid { grid-template-columns: 1fr; }
    .as-principles { padding: 56px 0; }
    .as-principles-grid { grid-template-columns: 1fr; }
    .as-chips-nav { top: 0; }
    .as-card-header { padding: 18px 20px; }
    .as-card-subs-col,
    .as-card-caution-col { padding: 18px 20px; }
}

/* ── Compact footer variant ── */
.hp-footer--compact .hp-footer-bottom {
    border-top: none;
    padding: 18px 0;
    max-width: none;
    margin: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
}

/* ── Meal Planner (mp-) ──────────────────────────────────────────────────── */

.mp-page {
  padding: 32px 0 64px;
}

/* toolbar: meta + generate form */
.mp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.mp-toolbar-meta {
  font-size: 0.85rem;
  color: var(--text-muted, #888);
  flex: 1;
}
.mp-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mp-generate-btn {
  background: var(--brand, #2a7a4b);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.mp-generate-btn:hover { background: #225f3b; }

/* ── Settings card (mp-settings-) ── */
.mp-settings {
  border: 1.5px solid #e4eee8;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 20px;
}
.mp-settings[open] .mp-settings-chevron { transform: rotate(0deg); }
.mp-settings-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #f6faf7;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.12s;
}
.mp-settings[open] .mp-settings-toggle { border-bottom-color: #e4eee8; }
.mp-settings-toggle::-webkit-details-marker { display: none; }
.mp-settings-toggle::marker { display: none; }
.mp-settings-toggle:hover { background: #edf5ef; }
.mp-settings-toggle-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mp-settings-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #2d5a3d;
  font-family: 'Inter', system-ui, sans-serif;
}
.mp-settings-chevron {
  font-size: 0.75rem;
  color: #9aaa8a;
  transition: transform 0.15s;
  transform: rotate(-90deg);
}
.mp-settings[open] .mp-settings-chevron { transform: rotate(0deg); }
.mp-settings-body {
  padding: 12px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mp-settings-section {
  border: none;
  padding: 0;
  margin: 0;
}
.mp-settings-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #5a7a6a;
  margin-bottom: 6px;
  display: block;
  font-family: 'Inter', system-ui, sans-serif;
}

/* Strategy grid — 2-up desktop, 1-up mobile */
.mp-strategy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (max-width: 480px) { .mp-strategy-grid { grid-template-columns: 1fr; } }

.mp-strategy-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 10px;
  border: 1.5px solid #e0ece4;
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
  font-family: 'Inter', system-ui, sans-serif;
}
.mp-strategy-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
.mp-strategy-card:hover {
  border-color: #4a7c59;
  background: #f4faf6;
}
.mp-strategy-card:has(input:checked) {
  border-color: #2d7a4b;
  background: #edf7f1;
  box-shadow: 0 0 0 2px rgba(45,122,75,0.18);
}
.mp-strategy-icon { font-size: 1.15rem; line-height: 1; margin-bottom: 2px; }
.mp-strategy-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1a3c2e;
  display: flex;
  align-items: center;
  gap: 4px;
}
.mp-strategy-badge {
  font-size: 0.7rem;
  background: #fef9c3;
  padding: 0 4px;
  border-radius: 4px;
}
.mp-strategy-hint {
  font-size: 0.7rem;
  color: #8aaa90;
  line-height: 1.3;
  font-family: 'Inter', system-ui, sans-serif;
}

/* Favourite mode + Cooking frequency — horizontal pill radios */
.mp-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mp-radio-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1.5px solid #e0ece4;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: #2d4a35;
  background: #fff;
  font-family: 'Inter', system-ui, sans-serif;
  transition: border-color 0.12s, background 0.12s;
  white-space: nowrap;
}
.mp-radio-option input[type="radio"],
.mp-radio-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.mp-radio-option:hover { border-color: #4a7c59; background: #f4faf6; }
.mp-radio-option:has(input:checked) {
  border-color: #2d7a4b;
  background: #edf7f1;
  color: #1a3c2e;
  font-weight: 700;
}
.mp-settings-actions {
  padding-top: 4px;
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ── Plan type cards ──────────────────────────────────────── */
.mp-plan-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 18px 0 22px;
}
@media (max-width: 768px) {
  .mp-plan-cards { grid-template-columns: 1fr; }
}
.mp-plan-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1.5px solid #e0ece4;
  border-radius: 12px;
  background: #fff;
  font-family: 'Inter', system-ui, sans-serif;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.mp-plan-card:hover {
  border-color: #4a7c59;
  box-shadow: 0 2px 8px rgba(45,122,75,0.08);
}
@media (prefers-color-scheme: dark) {
  .mp-plan-card { background: #1a2620; border-color: #2d4a35; }
  .mp-plan-card:hover { border-color: #4a7c59; }
}
:root[data-theme="dark"] .mp-plan-card { background: #1a2620; border-color: #2d4a35; }
:root[data-theme="light"] .mp-plan-card { background: #fff; border-color: #e0ece4; }
.mp-plan-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mp-plan-card-icon { font-size: 1.4rem; line-height: 1; flex-shrink: 0; }
.mp-plan-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1a3c2e;
  margin: 0;
  line-height: 1.3;
}
@media (prefers-color-scheme: dark) { .mp-plan-card-title { color: #d4edd9; } }
:root[data-theme="dark"] .mp-plan-card-title { color: #d4edd9; }
:root[data-theme="light"] .mp-plan-card-title { color: #1a3c2e; }
.mp-plan-card-desc {
  font-size: 0.78rem;
  color: #4a6a55;
  line-height: 1.5;
  margin: 0;
  flex: 1;
}
@media (prefers-color-scheme: dark) { .mp-plan-card-desc { color: #8aaa90; } }
:root[data-theme="dark"] .mp-plan-card-desc { color: #8aaa90; }
:root[data-theme="light"] .mp-plan-card-desc { color: #4a6a55; }
.mp-plan-funfact {
  font-style: italic;
  color: #2d7a4b;
  font-size: 0.78rem;
}
.mp-plan-card-structure {
  font-size: 0.74rem;
  color: #8aaa90;
  margin: 0;
  font-style: italic;
}
.mp-plan-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 2px;
}

/* Nutrition gap banner */
.mp-nutrition-gap {
  background: #f0f7ff;
  border: 1px solid #4a90d9;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.mp-gap-body { flex: 1; min-width: 0; }
.mp-gap-title {
  font-weight: 700;
  color: #1a3a5c;
  margin: 0 0 6px;
}
.mp-gap-line {
  color: #2c4a6e;
  margin: 3px 0;
}
.mp-gap-suggest {
  margin: 8px 0 0;
  color: #2c4a6e;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.mp-gap-link {
  color: var(--brand, #2a7a4b);
  font-weight: 600;
  text-decoration: none;
}
.mp-gap-link:hover { text-decoration: underline; }
.mp-gap-regen {
  background: #2a7a4b;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.mp-gap-regen:hover { background: #205f3a; }

/* allergen warning banner */
.mp-warning {
  background: #fff8e1;
  border: 1px solid #f9a825;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.mp-warning-icon { font-size: 1.1rem; flex-shrink: 0; }
.mp-warning-link {
  display: block;
  margin-top: 4px;
  color: var(--brand, #2a7a4b);
  font-weight: 600;
  text-decoration: none;
}
.mp-warning-link:hover { text-decoration: underline; }
.mp-warning--info { background: #e3f2fd; border-color: #1976d2; }
.mp-warning--stale { background: #f3f0ff; border-color: #9c7ae0; align-items: center; }
.mp-generate-btn--stale {
  margin-left: auto;
  background: #7c3aed;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.mp-generate-btn--stale:hover { background: #5b21b6; }

/* 7-day horizontal scroll track */
/* ── Meal Planner: vertical day stack ── */
.mp-days-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* day card — mirrors as-card */
.mp-day-card {
  border: 1.5px solid #e4eee8;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow .2s;
  scroll-margin-top: 80px;
}
.mp-day-card:hover { box-shadow: 0 6px 24px rgba(26,60,46,.08); }
.mp-day-card--leftover .as-card-caution-col { background: #f5f5f5; }

/* day card header: extend as-card-header with regen button */
.mp-day-card-header { justify-content: space-between; }

/* ↻ New day button in header */
.mp-regen-day-btn {
  background: none;
  border: 1.5px solid #cce0d4;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.78rem;
  color: #4a7c5f;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
  transition: background 0.15s, border-color 0.15s;
}
.mp-regen-day-btn:hover {
  background: #f0f7f2;
  border-color: #4a7c5f;
}

/* day status badges (inline in as-card-uses) */
.mp-leftover-badge,
.mp-cooking-badge {
  display: inline-block;
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
}
.mp-leftover-badge { background: #e8f5e9; color: #388e3c; }
.mp-cooking-badge  { background: #fff8e1; color: #e65100; }

/* favourite mode select */
.mp-fav-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mp-fav-label {
  font-size: 0.85rem;
  color: var(--text-muted, #888);
  white-space: nowrap;
}

/* ── Menu list (left column) ── */
.mp-menu-list { gap: 14px; }

.mp-meal-group-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #3d6b4f;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding-bottom: 2px;
  border-bottom: 1px solid #d4e6da;
  margin-top: 4px;
  list-style: none;
}
@media (prefers-color-scheme: dark) {
  .mp-meal-group-header { color: #7fbf96; border-bottom-color: #2e4a38; }
}
:root[data-theme="light"] .mp-meal-group-header { color: #3d6b4f; border-bottom-color: #d4e6da; }
:root[data-theme="dark"]  .mp-meal-group-header { color: #7fbf96; border-bottom-color: #2e4a38; }

.mp-menu-item--grouped {
  padding-left: 10px;
}

.mp-menu-item {
  align-items: flex-start;
  position: relative;
  gap: 10px;
}
.mp-menu-meal-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.mp-menu-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mp-meal-type-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #6b8c77;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.mp-menu-recipe-link {
  font-size: .875rem;
  font-weight: 500;
  color: #334b3c;
  text-decoration: none;
  line-height: 1.35;
}
.mp-menu-recipe-link:hover { color: var(--brand, #2a7a4b); text-decoration: underline; }

.mp-no-recipe {
  font-size: 0.8rem;
  color: #bbb;
  font-style: italic;
}

/* ↻ regen meal button */
.mp-regen-btn {
  background: none;
  border: none;
  color: #cce0d4;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0 2px;
  line-height: 1;
  border-radius: 4px;
  flex-shrink: 0;
  align-self: flex-start;
  transition: color 0.15s;
}
.mp-regen-btn:hover { color: var(--brand, #2a7a4b); }

/* meal badges */
.mp-meal-badges { display: flex; flex-wrap: wrap; gap: 3px; }
.mp-badge {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 20px;
  font-weight: 600;
}
.mp-badge--leftover { background: #e8f5e9; color: #388e3c; }
.mp-badge--fav      { background: #fff8e1; color: #f57f17; }
.mp-badge--cal      { background: #f3f3f3; color: #666; }
.mp-badge--protein  { background: #e8eaf6; color: #3949ab; }
.mp-badge--veg      { background: #e8f5e9; color: #2e7d32; }
.mp-badge--vegan    { background: #f1f8e9; color: #558b2f; }

/* ── Nutrition column (right / caution col) ── */
.mp-nutrition-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Progress bar groups */
.mp-nut-bar-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mp-nut-bar-header {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
}
.mp-nut-bar-icon { font-size: 0.85rem; flex-shrink: 0; }
.mp-nut-bar-name { flex: 1; font-weight: 600; color: #334b3c; }
.mp-nut-bar-values { color: #1a3c2e; font-weight: 700; font-size: 0.75rem; white-space: nowrap; }

.mp-nut-bar-track {
  height: 7px;
  background: rgba(0,0,0,.10);
  border-radius: 4px;
  overflow: hidden;
}
.mp-nut-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}
.mp-nut-bar--ok   { background: #4a9b6b; }
.mp-nut-bar--warn { background: #f5c543; }
.mp-nut-bar--bad  { background: #4a7cd9; }

.mp-nut-bar-diff {
  font-size: 0.7rem;
  color: #6b8c77;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.mp-nut-bar-diff--ok  { color: #4a9b6b; }
.mp-nut-bar-diff--bad { color: #1a4080; }
.mp-nut-bar-range {
  font-size: 0.68rem;
  color: #aaa;
  font-style: italic;
}

/* ── Nutrition summary table (day card + week summary) ── */
.mp-nut-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8rem;
  margin-top: 6px;
}
.mp-nut-tr + .mp-nut-tr { border-top: 1px solid #eaf1ec; }
.mp-nut-td-label {
  padding: 5px 4px 5px 0;
  color: #334b3c;
  font-weight: 600;
  white-space: nowrap;
  width: 38%;
}
.mp-nut-td-val {
  padding: 5px 6px;
  color: #1a3c2e;
  font-weight: 700;
  white-space: nowrap;
}
.mp-nut-td-target {
  font-weight: 400;
  color: #7a9a85;
  font-size: 0.75rem;
}
.mp-nut-td-status { padding: 5px 0; }
.mp-nut-status {
  display: inline-block;
  font-size: 0.75rem;
  line-height: 1.3;
}
.mp-nut-status--ok   { color: #1a5c33; }
.mp-nut-status--warn { color: #7a5a00; }
.mp-nut-status--info { color: #1a4080; }

/* ── Weekly simple text table (inside healthy eating block) ── */
.mp-week-simple {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.82rem;
  margin-top: 10px;
}
.mp-week-simple caption { text-align: left; }
.mp-week-simple tr + tr { border-top: 1px solid rgba(44,74,110,0.12); }
.mp-wk-name {
  padding: 5px 8px 5px 0;
  font-weight: 600;
  color: #1a3a5c;
  width: 38%;
}
.mp-wk-val {
  padding: 5px 10px 5px 0;
  font-weight: 700;
  color: #1a3a5c;
  white-space: nowrap;
}
.mp-wk-status { padding: 5px 0; font-size: 0.78rem; }
.mp-wk-ok   { color: #1a5c33; }
.mp-wk-warn { color: #7a5a00; }
.mp-wk-info { color: #1a4080; }

/* ── Week bars (inside healthy eating block) ── */
.mp-week-bars {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mp-week-sub-inline {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #2c4a6e;
  margin: 0 0 4px;
  font-family: 'Inter', system-ui, sans-serif;
}

/* ── Week summary section (legacy, kept for CSS fallback) ── */
.mp-week-summary {
  background: #f6faf7;
  border: 1px solid #c8e0cf;
  border-radius: 10px;
  padding: 20px 24px;
  margin-top: 28px;
}
.mp-week-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  color: #1a3c2e;
  margin: 0 0 2px;
}
.mp-week-sub {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.78rem;
  color: #6b8c77;
  margin: 0 0 12px;
}
.mp-week-table .mp-nut-td-label { width: 32%; }
@media (max-width: 560px) {
  .mp-nut-td-status { display: block; padding-top: 2px; }
  .mp-week-table .mp-nut-td-label { width: auto; }
}

/* recommendation: green override of as-caution-text amber */
.mp-nut-rec--ok {
  background: rgba(74,155,107,.12) !important;
  border-left: 3px solid #4a9b6b !important;
  color: #1a3c2e !important;
}
.mp-nut-rec--cal {
  background: rgba(255,167,38,.12) !important;
  border-left: 3px solid #f57c00 !important;
  color: #4a2800 !important;
}
.mp-nut-muted {
  background: transparent !important;
  border-left: none !important;
  color: #6b8c77 !important;
  font-style: italic;
}
.mp-nut-rec-link { color: #4a7c5f; font-weight: 600; }
.mp-nut-rec-link:hover { text-decoration: underline; }

/* compact macro strip inside meal slot */
.mp-macro-strip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  color: #556b62;
  flex-wrap: wrap;
}
.mp-macro-item        { white-space: nowrap; }
.mp-macro-item--cal   { color: #555; font-weight: 600; }
.mp-macro-item--pro   { color: #3949ab; }
.mp-macro-item--carb  { color: #6d4c41; }
.mp-macro-item--fat   { color: #388e3c; }
.mp-macro-sep         { color: #aaa; }

/* carbs/fat row in day-card nutrition panel */
.mp-nut-macro-strip {
  display: flex;
  gap: 10px;
  font-size: 0.75rem;
  color: #556b62;
  flex-wrap: wrap;
}
.mp-nut-macro-item { white-space: nowrap; }

/* nutrition nudge banner */
.mp-nudge {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #e8eaf6;
  border: 1px solid #c5cae9;
  border-radius: 8px;
  padding: 11px 14px;
  margin-bottom: 18px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #283593;
}
.mp-nudge-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.mp-nudge-link { color: #1a237e; font-weight: 600; }
.mp-nudge-link:hover { text-decoration: underline; }

/* HTMX loading */
.mp-day-loading,
.mp-meal-loading {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #aaa;
  padding: 8px 28px;
}
/* htmx-request is added TO the indicator element — match both patterns */
.mp-day-loading.htmx-request,
.mp-meal-loading.htmx-request { display: flex; }
.htmx-request .mp-day-loading,
.htmx-request .mp-meal-loading { display: flex; }

.mp-spinner {
  width: 14px; height: 14px;
  border: 2px solid #e0e0e0;
  border-top-color: var(--brand, #2a7a4b);
  border-radius: 50%;
  animation: mp-spin 0.7s linear infinite;
}
@keyframes mp-spin { to { transform: rotate(360deg); } }

/* empty state */
.mp-empty {
  text-align: center;
  padding: 60px 24px;
  max-width: 460px;
  margin: 0 auto;
}
.mp-empty-icon { font-size: 3rem; margin: 0 0 16px; }
.mp-empty-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 10px;
}
.mp-empty-sub {
  color: #666;
  font-size: 0.95rem;
  margin: 0 0 28px;
  line-height: 1.5;
}

.mp-generate-btn--hero {
  padding: 11px 28px;
  font-size: 0.95rem;
  border-radius: 8px;
}

.mp-generate-btn--pantry {
  background: #f0f7f3;
  color: #2a7a4b;
  border: 1.5px solid #4a7c59;
  padding: 9px 20px;
  font-size: 0.9rem;
  border-radius: 8px;
}
.mp-generate-btn--pantry:hover { background: #e2f0e7; border-color: #225f3b; color: #225f3b; }

.mp-allergen-prompt {
  margin-top: 16px;
  font-size: 0.85rem;
  color: #888;
}
.mp-allergen-prompt a {
  color: var(--brand, #2a7a4b);
  font-weight: 600;
}

/* Nudge variants */
.mp-nudge--fav {
  background: #fce4ec;
  border-color: #f48fb1;
  color: #880e4f;
}
.mp-nudge--fav .mp-nudge-link { color: #ad1457; }

.mp-nudge--prefs {
  background: #fff8e1;
  border-color: #ffe082;
  color: #5d4037;
}
.mp-nudge--prefs .mp-nudge-link { color: #e65100; }

/* Empty state setup checklist */
.mp-setup-list {
  list-style: none;
  padding: 0;
  margin: 0 auto 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 280px;
  text-align: left;
}
.mp-setup-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #444;
}
.mp-setup-check { color: #4a9b6b; font-weight: 700; }
.mp-setup-cross { color: #bbb; font-size: 0.9rem; }
.mp-setup-item a {
  color: var(--brand, #2a7a4b);
  font-weight: 600;
}

/* Shopping list button in meal planner toolbar */
.mp-shopping-btn {
  padding: 7px 14px;
  background: #fff;
  border: 1.5px solid #4a7c59;
  color: #4a7c59;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.mp-shopping-btn:hover {
  background: #4a7c59;
  color: #fff;
}
.mp-plan-shopping {
  margin: 12px 0 20px;
  text-align: center;
}

/* ── Pantry section (mp-pantry-) — <details> collapsible ── */
.mp-pantry {
  background: #f6faf7;
  border: 1.5px solid #e4eee8;
  border-radius: 14px;
  margin-bottom: 24px;
}
/* Remove native details marker */
.mp-pantry > summary { list-style: none; }
.mp-pantry > summary::-webkit-details-marker { display: none; }

.mp-pantry-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 20px;
  cursor: pointer;
  user-select: none;
  border-radius: 14px;
  transition: background 0.12s;
}
.mp-pantry-toggle:hover { background: #ecf5ef; }
.mp-pantry[open] > .mp-pantry-toggle {
  border-radius: 14px 14px 0 0;
  border-bottom: 1px solid #e4eee8;
}
.mp-pantry-toggle-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}
.mp-pantry-title {
  font-size: 0.97rem;
  font-weight: 700;
  color: #2d5a3d;
  flex-shrink: 0;
}
.mp-pantry-count-badge {
  font-size: 0.76rem;
  font-weight: 600;
  color: #2d6a4f;
  background: #d4edda;
  border-radius: 12px;
  padding: 2px 9px;
  white-space: nowrap;
}
.mp-pantry-chevron {
  font-size: 0.78rem;
  color: #6a8a6a;
  flex-shrink: 0;
  transition: transform 0.18s;
  line-height: 1;
}
.mp-pantry[open] > .mp-pantry-toggle .mp-pantry-chevron {
  transform: rotate(180deg);
}

/* Body shown only when <details> is open */
.mp-pantry-body {
  padding: 14px 20px 16px;
}
.mp-pantry-sub {
  font-size: 0.82rem;
  color: #5a7a5a;
  margin: 0 0 14px;
}
.mp-pantry-search { position: relative; margin-bottom: 12px; }
.mp-pantry-input {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid #c8dece;
  border-radius: 8px;
  font-size: 0.9rem;
  background: #fff;
  color: #1a2a1a;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.mp-pantry-input:focus { border-color: #4a7c59; }
.mp-pantry-suggestions-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid #c8dece;
  border-radius: 8px;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(26,60,46,0.10);
  max-height: 220px;
  overflow-y: auto;
}
.mp-pantry-suggestions-list:empty { display: none; }
.mp-pantry-suggestion-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 14px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.88rem;
  color: #1a3c2e;
  transition: background 0.1s;
}
.mp-pantry-suggestion-btn:hover { background: #eef5ef; }
.mp-pantry-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 28px;
}
.mp-pantry-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e2f0e6;
  border: 1px solid #b8d8c0;
  border-radius: 20px;
  padding: 4px 10px 4px 12px;
  font-size: 0.83rem;
  color: #1a3c2e;
  font-weight: 500;
}
.mp-pantry-chip-name { line-height: 1; }
.mp-pantry-chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #4a7c59;
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
  display: flex;
  align-items: center;
  transition: color 0.1s;
}
.mp-pantry-chip-remove:hover { color: #c0392b; }
.mp-pantry-clear-btn {
  background: none;
  border: 1px solid #c8dece;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.78rem;
  color: #8a9a8a;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.mp-pantry-clear-btn:hover { border-color: #c0392b; color: #c0392b; }
.mp-pantry-empty-hint {
  font-size: 0.82rem;
  color: #8a9a8a;
  font-style: italic;
  margin: 4px 0 0;
  width: 100%;
  line-height: 1.5;
}

/* Pantry active notice (shown when plan exists and pantry has items) */
.mp-pantry-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #eaf5ef;
  border: 1px solid #b7d9c4;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: #1a3c2e;
  line-height: 1.45;
}
.mp-pantry-notice-icon { flex-shrink: 0; font-size: 1rem; margin-top: 1px; }

/* Pantry badge on meal cards */
.mp-badge--pantry { background: #e4f4ea; color: #2d6a4f; border: 1px solid #b7dcc4; }

/* ── Meal Planner Onboarding card (mp-ob-) ── */
.mp-onboarding {
  background: #fff;
  border: 1.5px solid #e8e4de;
  border-radius: 14px;
  padding: 32px 32px 28px;
  margin-bottom: 24px;
}
.mp-onboarding-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #4a7c59;
  margin: 0 0 6px;
}
.mp-onboarding-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d3a20;
  margin: 0 0 6px;
}
.mp-onboarding-sub {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0 0 28px;
}
.mp-onboarding-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.mp-ob-section {
  border: none;
  padding: 0;
  margin: 0;
}
.mp-ob-legend {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
  display: block;
  margin-bottom: 10px;
}
.mp-ob-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mp-ob-pill {
  cursor: pointer;
  display: inline-block;
}
.mp-ob-pill input[type="radio"],
.mp-ob-pill input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
.mp-ob-pill span {
  display: inline-block;
  padding: 9px 20px;
  border: 1.5px solid #d1cfc9;
  border-radius: 100px;
  font-size: 0.9rem;
  color: #4b5563;
  background: #faf8f4;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  user-select: none;
}
.mp-ob-pill input:checked + span {
  border-color: #4a7c59;
  background: #eef7f2;
  color: #166534;
  font-weight: 600;
}
.mp-ob-pill:hover span {
  border-color: #4a7c59;
}
.mp-ob-pill input:focus-visible + span {
  outline: 2px solid #4a7c59;
  outline-offset: 2px;
}
.mp-onboarding-actions {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #f0ede8;
}
@media (max-width: 600px) {
  .mp-onboarding { padding: 24px 20px 20px; }
  .mp-onboarding-title { font-size: 1.25rem; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   SHOPPING LIST  (sl-)
   ───────────────────────────────────────────────────────────────────────────── */

.sl-page {
  padding: 32px 0 64px;
  min-height: 60vh;
}

/* ── Toolbar ── */
.sl-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e4eee8;
}
.sl-toolbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.sl-toolbar-centre {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sl-servings-form {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sl-servings-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #3d6b4f;
  white-space: nowrap;
}
.sl-servings-select {
  padding: 4px 8px;
  border: 1.5px solid #4a7c59;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2d4a35;
  background: #fff;
  cursor: pointer;
}
@media (prefers-color-scheme: dark) {
  .sl-servings-select { background: #1e2e24; color: #c8ddd0; border-color: #4a7c59; }
}
:root[data-theme="light"] .sl-servings-select { background: #fff; color: #2d4a35; }
:root[data-theme="dark"]  .sl-servings-select { background: #1e2e24; color: #c8ddd0; }
.sl-servings-hint {
  font-size: 0.75rem;
  color: #6b8c77;
}
.sl-servings-hint-link {
  color: #4a7c59;
  text-decoration: underline;
}
.sl-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sl-back-link {
  color: #3a6347;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}
.sl-back-link:hover { text-decoration: underline; }
.sl-meta {
  font-size: 0.85rem;
  color: #6b7c6b;
}

/* ── Action buttons ── */
.sl-btn {
  padding: 7px 15px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s, border-color 0.15s;
  font-family: 'Inter', system-ui, sans-serif;
  white-space: nowrap;
}
.sl-btn--ghost {
  background: #fff;
  border: 1.5px solid #c8d8c4;
  color: #3a5a44;
}
.sl-btn--ghost:hover {
  background: #f0f7f2;
  border-color: #7aa88a;
  text-decoration: none;
}

/* ── Category list ── */
.sl-categories {
  margin-bottom: 32px;
}
.sl-category {
  border: 1.5px solid #e4eee8;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 10px;
}
.sl-cat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: #f6faf7;
  border-bottom: 1px solid #e4eee8;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.sl-cat-header::-webkit-details-marker { display: none; }
.sl-cat-header::marker { display: none; }
.sl-category:not([open]) .sl-cat-header { border-bottom: none; }
.sl-cat-icon { font-size: 0.9rem; flex-shrink: 0; }
.sl-cat-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #2d5a3d;
  flex: 1;
  font-family: 'Inter', system-ui, sans-serif;
}
.sl-cat-count {
  font-size: 0.7rem;
  font-weight: 600;
  color: #7aaa8a;
  background: #e4f0e8;
  padding: 1px 7px;
  border-radius: 10px;
}
.sl-cat-chevron {
  font-size: 0.7rem;
  color: #9aaa8a;
  transition: transform 0.15s;
}
.sl-category:not([open]) .sl-cat-chevron { transform: rotate(-90deg); }

.sl-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ── Item ── */
.sl-item {
  display: flex;
  flex-direction: column;
  padding: 7px 16px;
  border-bottom: 1px solid #f0f5f1;
  transition: background 0.12s;
}
.sl-item:last-child { border-bottom: none; }
.sl-item:hover { background: #fafcfa; }

.sl-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.sl-checkbox {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: #4a7c59;
  cursor: pointer;
}
.sl-pantry-check {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: #4a7c59;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  line-height: 15px;
}
.sl-item-name {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
  color: #2d3a20;
  font-family: 'Inter', system-ui, sans-serif;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .sl-item-name { white-space: normal; word-break: break-word; }
}
.sl-item-qty {
  flex-shrink: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: #2d4a35;
  font-family: 'Inter', system-ui, sans-serif;
  white-space: nowrap;
  text-align: right;
}
.sl-qty-unit {
  font-size: 0.78rem;
  font-weight: 400;
  color: #6a8070;
}

/* Sub-row: swap note + recipe refs */
.sl-item-meta {
  padding-left: 25px;
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
  margin-top: 1px;
}
.sl-item-swap {
  font-size: 0.72rem;
  color: #2d6a4f;
  font-family: 'Inter', system-ui, sans-serif;
}
.sl-swap-original {
  color: #6a8070;
  font-style: italic;
}
.sl-item-used {
  font-size: 0.72rem;
  color: #9aaa9a;
  font-family: 'Inter', system-ui, sans-serif;
}

/* Done (checked-off) state */
.sl-item--done { opacity: 0.45; }
.sl-item--done .sl-item-name { text-decoration: line-through; color: #999; }

.sl-disclaimer {
  font-size: 0.78rem;
  color: #8a9a8a;
  margin-top: 8px;
  line-height: 1.5;
}

/* ── Pantry / Need-to-Buy section headers ── */
.sl-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 14px;
}
.sl-section-header:first-child { margin-top: 0; }
.sl-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #2d5a3d;
  margin: 0;
}
.sl-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2f0e6;
  color: #2d5a3d;
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  min-width: 24px;
}
.sl-section-header--pantry .sl-section-title { color: #4a7c59; }
.sl-section-header--pantry .sl-section-count { background: #c8e6d2; }

/* Pantry items: pre-ticked, muted */
.sl-item--pantry {
  opacity: 0.65;
  background: #f6faf7;
}
.sl-item--pantry .sl-item-name { text-decoration: line-through; color: #5a7a5a; }
.sl-item--pantry .sl-item-qty { color: #8a9a8a; }

/* Swap item: green left accent */
.sl-item--swap { border-left: 2.5px solid #2d6a4f; }

/* Mobile */
@media (max-width: 640px) {
  .sl-toolbar { flex-direction: column; align-items: flex-start; }
  .sl-toolbar-right { width: 100%; }
}

/* ── Onboarding wizard (ob-) ──────────────────────────────────────────────── */
.ob-body { background: #f4f7f5; min-height: 100vh; }

.ob-progress-shell {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  background: #fff;
  border-bottom: 1px solid #e8ede9;
  position: sticky;
  top: 0;
  z-index: 50;
}
.ob-wordmark {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1rem;
  color: #1a3c2e;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.ob-progress-track {
  flex: 1;
  height: 6px;
  background: #e0eae3;
  border-radius: 3px;
  overflow: hidden;
}
.ob-progress-fill {
  height: 100%;
  background: #4a9b6b;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.ob-step-label {
  font-size: 0.75rem;
  color: #7a9485;
  white-space: nowrap;
  flex-shrink: 0;
}

.ob-shell {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px 80px;
  min-height: calc(100vh - 57px);
}
.ob-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 20px rgba(0,0,0,.07);
  padding: 40px 36px 36px;
  width: 100%;
  max-width: 540px;
}

.ob-step-icon {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 16px;
}
.ob-step-icon--success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: #4a9b6b;
  color: #fff;
  border-radius: 50%;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.ob-step-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  font-weight: 700;
  color: #1a3c2e;
  margin: 0 0 8px;
  line-height: 1.25;
}
.ob-step-sub {
  font-size: 0.9rem;
  color: #5a7a6a;
  margin: 0 0 28px;
  line-height: 1.6;
}

/* Allergen chips */
.ob-allergen-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}
.ob-chip-label {
  cursor: pointer;
  display: block;
}
.ob-chip-label input[type="checkbox"],
.ob-chip-label input[type="radio"] { display: none; }
.ob-chip {
  display: block;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1.5px solid #d6e4da;
  background: #f8faf9;
  font-size: 0.82rem;
  color: #3a5a48;
  text-align: center;
  transition: background .15s, border-color .15s, color .15s;
  user-select: none;
}
.ob-chip-label input:checked + .ob-chip {
  background: #1a3c2e;
  border-color: #1a3c2e;
  color: #fff;
  font-weight: 600;
}
.ob-chip-label:hover .ob-chip { border-color: #4a9b6b; }

.ob-safety-note {
  font-size: 0.75rem;
  color: #7a9485;
  background: #f4f9f6;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0 0 24px;
  line-height: 1.5;
}

/* Dietary preference cards */
.ob-pref-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 28px;
}
.ob-pref-label { cursor: pointer; display: block; }
.ob-pref-label input[type="checkbox"] { display: none; }
.ob-pref-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px;
  border-radius: 12px;
  border: 1.5px solid #dde8e0;
  background: #fafcfb;
  transition: background .15s, border-color .15s;
}
.ob-pref-label input:checked + .ob-pref-card {
  background: #edf7f1;
  border-color: #4a9b6b;
}
.ob-pref-label:hover .ob-pref-card { border-color: #4a9b6b; }
.ob-pref-icon { font-size: 1.3rem; line-height: 1; }
.ob-pref-name { font-size: 0.8rem; font-weight: 600; color: #2d5a3d; text-align: center; }

/* Household stepper */
.ob-field-group { margin-bottom: 24px; }
.ob-field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #2d5a3d;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ob-optional { font-weight: 400; text-transform: none; letter-spacing: 0; color: #8aaa98; }
.ob-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid #d6e4da;
  border-radius: 12px;
  overflow: hidden;
}
.ob-stepper-btn {
  background: #f0f5f2;
  border: none;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  color: #2d5a3d;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.ob-stepper-btn:hover { background: #e0ece5; }
.ob-stepper-val {
  min-width: 44px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a3c2e;
}

/* Cooking frequency cards */
.ob-freq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ob-freq-label { cursor: pointer; display: block; }
.ob-freq-label input[type="radio"] { display: none; }
.ob-freq-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid #dde8e0;
  background: #fafcfb;
  transition: background .15s, border-color .15s;
}
.ob-freq-label input:checked + .ob-freq-card {
  background: #edf7f1;
  border-color: #4a9b6b;
}
.ob-freq-label:hover .ob-freq-card { border-color: #4a9b6b; }
.ob-freq-icon { font-size: 1.2rem; margin-bottom: 4px; }
.ob-freq-name { font-size: 0.82rem; font-weight: 700; color: #1a3c2e; }
.ob-freq-desc { font-size: 0.73rem; color: #7a9485; }

/* Cuisine chips row */
.ob-cuisine-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ob-cuisine-chips .ob-chip { padding: 8px 18px; }

/* Summary (step 4) */
.ob-summary {
  border: 1.5px solid #e0ece5;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 28px;
}
.ob-summary-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  font-size: 0.85rem;
  border-bottom: 1px solid #eef3f0;
}
.ob-summary-row:last-child { border-bottom: none; }
.ob-summary-key {
  flex-shrink: 0;
  width: 110px;
  font-weight: 600;
  color: #2d5a3d;
}
.ob-summary-val { color: #3a5a48; line-height: 1.5; }
.ob-summary-none { color: #9ab5a5; font-style: normal; }
.ob-summary-none a { color: #4a9b6b; }

/* Buttons */
.ob-btn {
  display: block;
  width: 100%;
  padding: 15px 24px;
  background: #4a9b6b;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: background .18s, transform .15s;
}
.ob-btn:hover { background: #3d8559; transform: translateY(-1px); }
.ob-btn:active { transform: translateY(0); }
.ob-btn:disabled { opacity: .6; cursor: default; transform: none; }
.ob-btn--generate {
  font-size: 1.05rem;
  padding: 17px 24px;
  background: #1a3c2e;
}
.ob-btn--generate:hover { background: #0f2a1f; }

/* Navigation row */
.ob-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}
.ob-nav--solo { margin-top: 14px; }

.ob-skip {
  font-size: 0.8rem;
  color: #9ab5a5;
  text-decoration: none;
}
.ob-skip:hover { color: #4a9b6b; text-decoration: underline; }

.ob-disclaimer {
  font-size: 0.72rem;
  color: #9ab5a5;
  line-height: 1.5;
  text-align: center;
  margin: 20px 0 0;
}

/* Responsive */
@media (max-width: 480px) {
  .ob-card { padding: 28px 20px 28px; border-radius: 0; box-shadow: none; }
  .ob-shell { padding: 0 0 60px; align-items: flex-start; }
  .ob-allergen-grid { grid-template-columns: 1fr 1fr; }
  .ob-pref-grid { grid-template-columns: 1fr 1fr; }
  .ob-freq-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Recipe: skill level badges ─────────────────────────────────────────────── */

.rp-badge--skill-easy {
  background: #e9f7ef;
  color: #1a6b3a;
  border: 1px solid #b7dfca;
}
.rp-badge--skill-medium {
  background: #fef9e7;
  color: #7d6608;
  border: 1px solid #f7dc6f;
}
.rp-badge--skill-hard {
  background: #fdf2f8;
  color: #922b21;
  border: 1px solid #f1948a;
}


/* ── Profile Phase 2: Tab nav ───────────────────────────────────────────────── */

.pf-tab-nav {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e8ede9;
  padding-bottom: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pf-tab-nav::-webkit-scrollbar { display: none; }

.pf-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #5a8a6a;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  border-radius: 4px 4px 0 0;
}
.pf-tab-btn:hover { color: #2d6a4f; background: #f4faf6; }
.pf-tab-btn--active {
  color: #2d6a4f;
  border-bottom-color: #2d6a4f;
  font-weight: 700;
}

.pf-tab-panel { display: block; }
.pf-tab-panel[hidden] { display: none; }

/* ── HTMX flash (inline save confirmation) ──────────────────────────────────── */

.pf-htmx-flash {
  padding: 8px 14px;
  background: #f0faf4;
  border: 1px solid #b7dfca;
  border-radius: 6px;
  color: #2d6a4f;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 14px;
}

/* ── Safety tab: saved strip ────────────────────────────────────────────────── */

.pf-safety-saved-strip {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e8ede9;
}

/* ── Radio cards (cooking_skill, favourite_mode) ────────────────────────────── */

.pf-radio-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.pf-radio-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 14px;
  border: 1px solid #d0ddd2;
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
  min-width: 80px;
}
.pf-radio-card input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.pf-radio-card:has(input:checked) {
  border-color: #2d6a4f;
  background: #f0faf4;
}
.pf-radio-card:hover { border-color: #5a8a6a; }

.pf-radio-card-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a3a2a;
  pointer-events: none;
}
.pf-radio-card-desc {
  font-size: 0.75rem;
  color: #5a8a6a;
  margin-top: 2px;
  pointer-events: none;
}
.pf-radio-card--wide { min-width: 130px; }

/* ── Favourite recipes strip ────────────────────────────────────────────────── */

.pf-fav-strip {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.pf-fav-strip-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  flex: 0 0 120px;
}
.pf-fav-strip-img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e8ede9;
}
.pf-fav-strip-placeholder {
  width: 120px;
  height: 80px;
  border-radius: 8px;
  background: #f4faf6;
  border: 1px solid #e8ede9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}
.pf-fav-strip-name {
  font-size: 0.75rem;
  color: #1a3a2a;
  margin-top: 6px;
  text-align: center;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pf-fav-strip-item:hover .pf-fav-strip-name { color: #2d6a4f; text-decoration: underline; }

/* ── Pantry quick-add (profile) ─────────────────────────────────────────────── */

.pf-pantry-preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.pf-chip--pantry {
  background: #f0faf4;
  border: 1px solid #b7dfca;
  color: #2d6a4f;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.8rem;
}
.pf-chip--more {
  background: #f4f6f4;
  border: 1px dashed #b0c4b0;
  color: #5a8a6a;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.8rem;
}

.pf-pantry-quick-add { margin: 14px 0 10px; }
.pf-pantry-search-wrap { position: relative; }

.pf-pantry-suggest-drop {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #d0ddd2;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  z-index: 100;
  max-height: 220px;
  overflow-y: auto;
}
.pf-pantry-suggest-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}
/* ── Profile: Meal Planner Preferences card ──────────────────────────────── */

.pf-mp-prefs-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.pf-mp-pref-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: #1a3a2a;
}
.pf-mp-pref-icon { flex-shrink: 0; }
.pf-mp-pref-label { color: #6a8a74; min-width: 120px; }
.pf-mp-pref-value { font-weight: 600; }
@media (prefers-color-scheme: dark) {
  .pf-mp-pref-row { color: #d4edd9; }
  .pf-mp-pref-label { color: #7aaa84; }
}
:root[data-theme="dark"] .pf-mp-pref-row { color: #d4edd9; }
:root[data-theme="dark"] .pf-mp-pref-label { color: #7aaa84; }
:root[data-theme="light"] .pf-mp-pref-row { color: #1a3a2a; }
:root[data-theme="light"] .pf-mp-pref-label { color: #6a8a74; }

.pf-pantry-suggest-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 8px 14px;
  font-size: 0.88rem;
  color: #1a3a2a;
  cursor: pointer;
}
.pf-pantry-suggest-btn:hover { background: #f4faf6; color: #2d6a4f; }

.pf-pantry-manage-link { display: inline-block; margin-top: 8px; }

/* ── Mobile sticky CTA ──────────────────────────────────────────────────────── */

.pf-mobile-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 20px;
  background: #fff;
  border-top: 1px solid #e8ede9;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
  z-index: 200;
}
.pf-mobile-cta-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px;
  background: #2d6a4f;
  color: #fff;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}
.pf-mobile-cta-btn:hover { background: #235c42; }

@media (max-width: 640px) {
  .pf-mobile-cta { display: block; }
  .pf-main { padding-bottom: 80px; }
  .pf-tab-btn { padding: 9px 12px; font-size: 0.82rem; }
  .pf-radio-cards { gap: 6px; }
  .pf-radio-card { padding: 8px 10px; min-width: 70px; }
  .pf-fav-strip-item { flex: 0 0 100px; }
  .pf-fav-strip-img, .pf-fav-strip-placeholder { width: 100px; height: 68px; }
}

/* ── Meal Planner: Hero value list (Stage 1) ──────────────────────────────── */

.mp-value-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mp-value-list li {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.92);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 7px;
}
.mp-value-list li::before {
  content: "✓";
  color: #7eeaaa;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Meal Planner: Dashboard Cards ───────────────────────────────────────── */

.mp-dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 720px) {
  .mp-dashboard { grid-template-columns: 1fr; gap: 10px; }
}
.mp-dash-card {
  background: #fff;
  border: 1.5px solid #e0ece4;
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.mp-dash-card--action { border-color: #b4d9c3; }
.mp-dash-card--action:hover { border-color: #2a7a4b; box-shadow: 0 2px 10px rgba(42,122,75,0.08); }
@media (prefers-color-scheme: dark) {
  .mp-dash-card { background: #1a2620; border-color: #2d4a35; }
  .mp-dash-card--action { border-color: #2d6840; }
}
:root[data-theme="dark"] .mp-dash-card { background: #1a2620; border-color: #2d4a35; }
:root[data-theme="dark"] .mp-dash-card--action { border-color: #2d6840; }
:root[data-theme="light"] .mp-dash-card { background: #fff; border-color: #e0ece4; }
:root[data-theme="light"] .mp-dash-card--action { border-color: #b4d9c3; }
.mp-dash-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
}
.mp-dash-card-icon { font-size: 1.1rem; flex-shrink: 0; }
.mp-dash-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6a9a7a;
  font-family: 'Inter', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) { .mp-dash-card-title { color: #5a8a6a; } }
:root[data-theme="dark"] .mp-dash-card-title { color: #5a8a6a; }
:root[data-theme="light"] .mp-dash-card-title { color: #6a9a7a; }
.mp-dash-card-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a3a2a;
  line-height: 1.3;
}
.mp-dash-card-value--dim { color: #8aaa90; font-weight: 500; }
@media (prefers-color-scheme: dark) { .mp-dash-card-value { color: #d4edd9; } }
:root[data-theme="dark"] .mp-dash-card-value { color: #d4edd9; }
:root[data-theme="light"] .mp-dash-card-value { color: #1a3a2a; }
.mp-dash-card-sub {
  font-size: 0.78rem;
  color: #5a7a64;
  line-height: 1.5;
  margin-top: 2px;
}
@media (prefers-color-scheme: dark) { .mp-dash-card-sub { color: #7aaa84; } }
:root[data-theme="dark"] .mp-dash-card-sub { color: #7aaa84; }
:root[data-theme="light"] .mp-dash-card-sub { color: #5a7a64; }
.mp-dash-card-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #2a7a4b;
  text-decoration: none;
}
.mp-dash-card-link:hover { color: #1a5c37; text-decoration: underline; }

/* ── Meal Planner: Stage 1 first-visit form ───────────────────────────────── */

.mp-first-form {
  background: #fff;
  border: 1.5px solid #e0ece4;
  border-radius: 16px;
  padding: 24px 28px 20px;
  margin-bottom: 20px;
}
@media (prefers-color-scheme: dark) { .mp-first-form { background: #1a2620; border-color: #2d4a35; } }
:root[data-theme="dark"] .mp-first-form { background: #1a2620; border-color: #2d4a35; }
:root[data-theme="light"] .mp-first-form { background: #fff; border-color: #e0ece4; }
.mp-first-form-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a3a2a;
  margin: 0 0 4px;
}
@media (prefers-color-scheme: dark) { .mp-first-form-title { color: #d4edd9; } }
:root[data-theme="dark"] .mp-first-form-title { color: #d4edd9; }
:root[data-theme="light"] .mp-first-form-title { color: #1a3a2a; }
.mp-first-form-sub {
  font-size: 0.85rem;
  color: #5a7a64;
  margin: 0 0 18px;
}
.mp-first-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 560px) {
  .mp-first-form { padding: 18px 16px 16px; }
  .mp-first-form-grid { grid-template-columns: 1fr; gap: 12px; }
}
.mp-first-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.mp-generate-btn--first {
  padding: 13px 32px;
  font-size: 1rem;
  border-radius: 10px;
  letter-spacing: 0.01em;
}
.mp-first-cta-note {
  font-size: 0.78rem;
  color: #6a9a7a;
  margin: 0;
  line-height: 1.5;
}

/* ── Meal Planner: Preferences summary chips ─────────────────────────────── */

.mp-settings-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-left: 6px;
}
.mp-pref-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: #edf5ef;
  border: 1px solid #cde5d4;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #2d5a3d;
  white-space: nowrap;
}
@media (prefers-color-scheme: dark) {
  .mp-pref-chip { background: #1e3228; border-color: #2d4a35; color: #8ecfa0; }
}
:root[data-theme="dark"] .mp-pref-chip { background: #1e3228; border-color: #2d4a35; color: #8ecfa0; }
:root[data-theme="light"] .mp-pref-chip { background: #edf5ef; border-color: #cde5d4; color: #2d5a3d; }
@media (max-width: 560px) { .mp-settings-summary { display: none; } }

/* ── Meal Planner: Household size number input ───────────────────────────── */

.mp-household-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.mp-household-input {
  width: 70px;
  padding: 6px 10px;
  border: 1.5px solid #c8ddd0;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #1a3a2a;
  background: #fff;
  transition: border-color 0.12s;
}
.mp-household-input:focus { border-color: #2a7a4b; outline: none; }
.mp-household-unit {
  font-size: 0.83rem;
  color: #6a8a74;
}
@media (prefers-color-scheme: dark) {
  .mp-household-input { background: #1a2620; border-color: #2d4a35; color: #d4edd9; }
}
:root[data-theme="dark"] .mp-household-input { background: #1a2620; border-color: #2d4a35; color: #d4edd9; }
:root[data-theme="light"] .mp-household-input { background: #fff; border-color: #c8ddd0; color: #1a3a2a; }

/* ── Meal Planner: AI-only badge on Region/Cuisine ───────────────────────── */

.mp-settings-ai-only {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  background: #e8f4ec;
  border: 1px solid #b4d9c3;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #2d6a4f;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
}
@media (prefers-color-scheme: dark) {
  .mp-settings-ai-only { background: #1e3228; border-color: #2d4a35; color: #8ecfa0; }
}
:root[data-theme="dark"] .mp-settings-ai-only { background: #1e3228; border-color: #2d4a35; color: #8ecfa0; }
:root[data-theme="light"] .mp-settings-ai-only { background: #e8f4ec; border-color: #b4d9c3; color: #2d6a4f; }

/* ── Meal Planner: Preferences save footer ───────────────────────────────── */

.mp-settings-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px solid #e8f0ea;
  margin-top: 6px;
}
.mp-settings-save-btn {
  background: none;
  border: 1.5px solid #4a7c59;
  color: #2d6a4f;
  border-radius: 6px;
  padding: 7px 18px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.mp-settings-save-btn:hover { background: #f0f7f3; }
@media (prefers-color-scheme: dark) {
  .mp-settings-footer { border-color: #2d4a35; }
  .mp-settings-save-btn { border-color: #3a6448; color: #8ecfa0; }
  .mp-settings-save-btn:hover { background: #1e3228; }
}
:root[data-theme="dark"] .mp-settings-footer { border-color: #2d4a35; }
:root[data-theme="dark"] .mp-settings-save-btn { border-color: #3a6448; color: #8ecfa0; }
:root[data-theme="dark"] .mp-settings-save-btn:hover { background: #1e3228; }
:root[data-theme="light"] .mp-settings-footer { border-color: #e8f0ea; }
:root[data-theme="light"] .mp-settings-save-btn { border-color: #4a7c59; color: #2d6a4f; }

/* ── Meal Planner: Favourite nudge inside preferences ────────────────────── */

.mp-pref-nudge {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  background: #f9fdf9;
  border: 1px solid #ddeee3;
  border-radius: 8px;
  font-size: 0.83rem;
  color: #4a6a55;
  margin-bottom: 14px;
  line-height: 1.5;
}
@media (prefers-color-scheme: dark) { .mp-pref-nudge { background: #1c2d22; border-color: #2d4535; color: #7a9a80; } }
:root[data-theme="dark"] .mp-pref-nudge { background: #1c2d22; border-color: #2d4535; color: #7a9a80; }
:root[data-theme="light"] .mp-pref-nudge { background: #f9fdf9; border-color: #ddeee3; color: #4a6a55; }
