/* frogswiper weightloss — fresh-wellness design system */

/* Size-adjusted local fallback fonts. These prevent CLS while web fonts swap in
   by ensuring the fallback measures close to the real font. Values eyeballed
   from Fontaine's defaults for Inter/Fraunces. */
@font-face {
    font-family: "Inter Fallback";
    src: local("Arial");
    size-adjust: 107%;
    ascent-override: 90%;
    descent-override: 22%;
    line-gap-override: 0%;
}
@font-face {
    font-family: "Fraunces Fallback";
    src: local("Georgia");
    size-adjust: 100%;
    ascent-override: 95%;
    descent-override: 24%;
    line-gap-override: 0%;
}

:root {
    /* palette */
    --sage-50:  #F1F4EE;
    --sage-100: #DDE5D6;
    --sage-300: #B5C6AA;
    --sage-500: #6B8F71;
    --sage-600: #5B7B61;
    --sage-700: #466049;

    --cream-50: #F8F5EE;
    --cream-100:#E8DDCB;
    --cream-200:#DCCDB3;

    --terracotta:      #C9904E;  /* accent — for borders, dots, non-text uses */
    --terracotta-dark: #8C5E2E;  /* button bg — 4.55:1 vs #fff, AA pass */

    --ink:       #2E2D2A;
    --ink-muted: #5F5C53;   /* 6.8:1 vs cream-50 — WCAG AA pass on every bg */
    --ink-soft:  #6E6759;   /* 5.3:1 vs cream-50 — WCAG AA pass on every bg */
    --line:      rgba(46,45,42,0.10);
    --line-strong: rgba(46,45,42,0.18);

    --ok:    #4D8B58;
    --warn:  #D49E2F;
    --err:   #B84B3E;

    --shadow-1: 0 1px 2px rgba(46,45,42,0.05), 0 1px 4px rgba(46,45,42,0.04);
    --shadow-2: 0 4px 12px rgba(46,45,42,0.07), 0 2px 4px rgba(46,45,42,0.05);
    --shadow-3: 0 12px 32px rgba(46,45,42,0.10), 0 4px 12px rgba(46,45,42,0.06);

    --radius-sm: 8px;
    --radius:    14px;
    --radius-lg: 22px;

    --font-body:    "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Fraunces", "Fraunces Fallback", "Iowan Old Style", "Apple Garamond", Georgia, serif;

    --content-max: 1100px;
    --prose-max:   720px;

    --t: 180ms cubic-bezier(.4,.2,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Accessible focus ring — applies everywhere we don't define a more specific one */
:focus-visible {
    outline: 2px solid var(--sage-500);
    outline-offset: 2px;
    border-radius: 4px;
}
/* Remove default outline for inputs that already get a custom focus style */
.wl-form input:focus-visible,
.wl-form select:focus-visible,
.wl-form textarea:focus-visible { outline: none; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--cream-50);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--sage-700); }  /* AA on every bg we use (white, cream, sage-50) */
a:hover { color: var(--sage-600); }

button { font-family: inherit; }
img    { max-width: 100%; display: block; }

.wl-container { max-width: var(--content-max); margin: 0 auto; padding: 0 1.25rem; }

/* ── HEADER ─────────────────────────────────────────────────── */
.wl-header {
    background: var(--cream-50);
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(8px);
}
.wl-header-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px;
}
.wl-brand {
    display: inline-flex; align-items: baseline; gap: 8px;
    text-decoration: none; color: var(--ink);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.25rem;
}
.wl-brand-mark { color: var(--sage-500); font-size: 1.5rem; }
.wl-brand-text { letter-spacing: -0.01em; }

.wl-nav { display: flex; gap: 18px; align-items: center; }
.wl-nav a {
    text-decoration: none;
    color: var(--ink-muted);
    font-size: 0.92rem;
    font-weight: 500;
    transition: color var(--t);
    padding: 6px 2px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
}
.wl-nav a:hover { color: var(--ink); }
.wl-nav a[aria-current="page"] {
    color: var(--ink);
    border-bottom: 2px solid var(--sage-500);
}
.wl-nav-admin { color: var(--terracotta) !important; }

/* Hamburger button */
.wl-nav-toggle {
    display: none;
    background: none; border: 0;
    width: 44px; height: 44px;
    padding: 8px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}
.wl-nav-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform var(--t), opacity var(--t);
}
.wl-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.wl-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.wl-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Skip link */
.wl-skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--ink); color: #fff;
    padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0;
    font-weight: 600; z-index: 100; text-decoration: none;
}
.wl-skip-link:focus { left: 0; color: #fff; }

.wl-inline-form { display: inline; }
.wl-link-button {
    background: none; border: 0; padding: 0; cursor: pointer;
    color: var(--ink-muted); font-size: 0.92rem; font-weight: 500;
}
.wl-link-button:hover { color: var(--ink); }

.wl-cta-small {
    background: var(--sage-600); color: #fff !important;
    padding: 6px 14px; border-radius: 999px;
    font-size: 0.85rem; font-weight: 600;
    transition: background var(--t);
}
.wl-cta-small:hover { background: var(--sage-700); color: #fff !important; }

/* Role change: dropdown + explicit Apply button (admin users table) */
.wl-role-form { display: inline-flex; align-items: center; gap: 8px; }
.wl-role-apply { border: 0; cursor: pointer; }
.wl-role-apply:disabled {
    background: var(--line-strong); color: var(--ink-muted) !important;
    cursor: default; opacity: 0.6;
}
.wl-role-apply:disabled:hover { background: var(--line-strong); }

/* ── FLASH ──────────────────────────────────────────────────── */
.wl-flash {
    max-width: var(--content-max); margin: 12px auto;
    padding: 10px 16px; border-radius: var(--radius-sm);
    border: 1px solid;
}
.wl-flash-success { background: #E5F2E6; border-color: #B6D8B9; color: #2E5933; }
.wl-flash-error   { background: #FBE9E6; border-color: #E8B6AE; color: #7A2B22; }
.wl-flash-info    { background: var(--sage-50); border-color: var(--sage-100); color: var(--sage-700); }

/* ── MAIN / SECTION ─────────────────────────────────────────── */
.wl-main { min-height: 70vh; }

.wl-section {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.wl-section-title {
    font-family: var(--font-display);
    font-size: 1.85rem;
    font-weight: 600;
    margin: 0 0 1.25rem;
    letter-spacing: -0.01em;
    line-height: 1.2;
    min-height: calc(1.85rem * 1.2);  /* reserve 1 line so font-swap doesn't shift content below */
}

.wl-display {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 2.4rem;
    letter-spacing: -0.015em;
    margin: 0 0 1rem;
    line-height: 1.15;
    min-height: calc(2.4rem * 1.15);  /* reserve 1 line — same rationale */
}

.wl-muted { color: var(--ink-muted); }
.wl-lead  { font-size: 1.15rem; color: var(--ink-muted); margin: 0 0 1.5rem; }

/* ── HERO ───────────────────────────────────────────────────── */
.wl-hero {
    background:
        radial-gradient(ellipse 60% 80% at 20% 30%, rgba(107,143,113,0.10) 0%, transparent 60%),
        radial-gradient(ellipse 70% 60% at 80% 70%, rgba(201,144,78,0.07) 0%, transparent 55%),
        var(--cream-50);
    padding: 4rem 0 3.5rem;
    border-bottom: 1px solid var(--line);
    /* Reserve enough vertical space that font swaps can't reflow content below.
       Sized for mobile (smallest viewport) where text wraps to the most lines. */
    min-height: 420px;
}
.wl-hero-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2.4rem, 4.5vw, 3.6rem);
    line-height: 1.05;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
    color: var(--ink);
    /* Reserve 1 line to avoid layout shift when web font swaps in */
    min-height: calc(clamp(2.4rem, 4.5vw, 3.6rem) * 1.05);
}
.wl-hero-lede {
    font-size: 1.15rem;
    color: var(--ink-muted);
    max-width: 620px;
    margin: 0 0 1.75rem;
}
.wl-hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.wl-hero-meta {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--ink-soft);
}

/* ── BUTTONS ────────────────────────────────────────────────── */
.wl-btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all var(--t);
    line-height: 1.2;
}
.wl-btn-primary {
    background: var(--sage-600);
    color: #fff;
    border-color: var(--sage-600);
}
.wl-btn-primary:hover { background: var(--sage-700); border-color: var(--sage-700); color: #fff; }

.wl-btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line-strong);
}
.wl-btn-ghost:hover { border-color: var(--ink); }

.wl-btn-accent {
    background: var(--terracotta-dark); color: #fff; border-color: var(--terracotta-dark);
}
.wl-btn-accent:hover { background: #6E4922; border-color: #6E4922; color: #fff; }

.wl-btn-block { display: block; width: 100%; text-align: center; }

/* ── CARDS GRID (recipes) ───────────────────────────────────── */
.wl-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.wl-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--t), box-shadow var(--t), border-color var(--t);
    box-shadow: var(--shadow-1);
}
.wl-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-3);
    border-color: var(--sage-300);
}

.wl-card-image {
    aspect-ratio: 4/3;
    background-color: var(--sage-50);
    overflow: hidden;
}
.wl-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wl-card-body { padding: 14px 16px 16px; }
.wl-card-meal {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sage-600);
    font-weight: 600;
    margin-bottom: 4px;
}
.wl-card-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.18rem;
    margin: 0 0 6px;
    line-height: 1.25;
    /* Reserve 2 lines so card height doesn't shift when web fonts swap in */
    min-height: 2.5em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.wl-card-desc {
    font-size: 0.88rem;
    color: var(--ink-muted);
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* Reserve 2 lines for the same reason */
    min-height: 2.8em;
}
.wl-card-meta {
    display: flex;
    gap: 14px;
    font-size: 0.78rem;
    color: var(--ink-soft);
    border-top: 1px solid var(--line);
    padding-top: 10px;
}

/* ── FEATURES ───────────────────────────────────────────────── */
.wl-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.25rem;
}
.wl-feature {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 22px 24px;
    box-shadow: var(--shadow-1);
}
.wl-feature-icon { font-size: 1.6rem; }
.wl-feature h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
    margin: 8px 0 6px;
}
.wl-feature p { font-size: 0.92rem; color: var(--ink-muted); margin: 0; }

/* ── AUTH ───────────────────────────────────────────────────── */
.wl-auth-card-wrap {
    display: flex; justify-content: center;
}
.wl-auth-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 32px 30px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-2);
}
.wl-auth-card h1 {
    font-family: var(--font-display);
    margin: 0 0 1rem;
    font-size: 1.6rem;
    font-weight: 600;
}
.wl-auth-foot {
    margin-top: 1rem;
    font-size: 0.88rem;
    color: var(--ink-muted);
    text-align: center;
}

/* ── FORMS ──────────────────────────────────────────────────── */
.wl-form { display: flex; flex-direction: column; gap: 14px; }
.wl-form label {
    display: flex; flex-direction: column; gap: 6px;
    font-size: 0.85rem; font-weight: 500; color: var(--ink-muted);
}
.wl-form input[type="email"],
.wl-form input[type="password"],
.wl-form input[type="text"],
.wl-form input[type="number"],
.wl-form select,
.wl-form textarea {
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--ink);
    background: #fff;
    transition: border-color var(--t), box-shadow var(--t);
}
.wl-form input:focus, .wl-form select:focus, .wl-form textarea:focus {
    outline: none;
    border-color: var(--sage-500);
    box-shadow: 0 0 0 3px rgba(107,143,113,0.18);
}
.wl-check-row {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 8px !important;
    font-size: 0.83rem !important;
    line-height: 1.4;
}
.wl-check-row input { margin-top: 3px; }

.wl-error-inline {
    background: #FBE9E6;
    color: #7A2B22;
    border: 1px solid #E8B6AE;
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.88rem;
    margin: 0 0 12px;
}

/* ── ADMIN TABS ─────────────────────────────────────────────── */
.wl-admin-tabs {
    display: flex; gap: 4px; flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
    margin: 1rem 0 1.5rem;
}
.wl-admin-tabs a {
    text-decoration: none; color: var(--ink-muted);
    padding: 10px 16px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    font-size: 0.9rem; font-weight: 500;
}
.wl-admin-tabs a.active {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
    border-bottom-color: transparent;
    margin-bottom: -1px;
}

/* ── PROSE PAGES (privacy / disclaimer / about) ─────────────── */
.wl-prose {
    max-width: var(--prose-max);
}
.wl-prose h1 { font-family: var(--font-display); font-weight: 600; font-size: 2.2rem; letter-spacing: -0.015em; margin: 0 0 0.5rem; }
.wl-prose h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; margin: 2rem 0 0.6rem; }
.wl-prose p, .wl-prose li { font-size: 1rem; color: var(--ink); line-height: 1.7; }
.wl-prose ul, .wl-prose ol { padding-left: 1.4em; }
.wl-prose ul li, .wl-prose ol li { margin-bottom: 6px; }
.wl-prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--sage-50); color: var(--sage-700); padding: 1px 6px; border-radius: 6px; font-size: 0.9em; }

/* ── FOOTER ─────────────────────────────────────────────────── */
.wl-footer {
    margin-top: 3rem;
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 1.75rem 0 1rem;
    color: var(--ink-muted);
    font-size: 0.88rem;
}
.wl-footer-row {
    display: flex; flex-wrap: wrap; gap: 1.5rem;
    justify-content: space-between; align-items: center;
}
.wl-footer-left p { margin: 0 0 2px; }
.wl-footer-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.wl-footer-nav a { color: var(--ink-muted); text-decoration: none; }
.wl-footer-nav a:hover { color: var(--ink); }
.wl-footer-note {
    margin: 1.25rem auto 0;
    font-size: 0.78rem;
    color: var(--ink-soft);
    border-top: 1px dashed var(--line);
    padding-top: 0.85rem;
    line-height: 1.55;
}

/* ── ERROR PAGE ─────────────────────────────────────────────── */
.wl-error { text-align: center; padding-top: 4rem; padding-bottom: 4rem; }
.wl-error-code { font-size: 4rem; font-family: var(--font-display); margin: 0; color: var(--sage-300); line-height: 1; }
.wl-error-title { font-family: var(--font-display); font-size: 1.8rem; margin: 0.4rem 0 1rem; }
.wl-error-links {
    display: inline-flex; flex-direction: column; gap: 8px;
    padding: 0; margin: 1rem 0 0;
    list-style: none;
}
.wl-error-links a {
    display: inline-block;
    padding: 8px 16px;
    border: 1.5px solid var(--line-strong);
    border-radius: 999px;
    text-decoration: none;
    color: var(--ink);
    transition: border-color var(--t), background var(--t);
}
.wl-error-links a:hover { border-color: var(--sage-500); background: var(--sage-50); }

/* ── BROWSE / FILTERS ───────────────────────────────────────── */
.wl-filter-rail {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin: 1rem 0 2rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px 18px;
    align-items: end;
}
.wl-filter-wide { grid-column: span 4; }
.wl-filter-group { display: flex; flex-direction: column; gap: 6px; }
.wl-filter-label { font-size: 0.78rem; font-weight: 600; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.wl-filter-group input, .wl-filter-group select {
    padding: 8px 10px; border-radius: var(--radius-sm);
    border: 1.5px solid var(--line-strong); background: #fff; font-family: inherit; font-size: 0.92rem;
}
.wl-filter-actions { grid-column: span 4; display: flex; gap: 8px; justify-content: flex-end; }
.wl-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.wl-chip {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1.5px solid var(--line-strong); border-radius: 999px;
    padding: 5px 12px; font-size: 0.82rem; cursor: pointer;
    background: #fff; user-select: none;
    transition: border-color var(--t), background var(--t);
}
.wl-chip input { appearance: none; width: 0; height: 0; opacity: 0; position: absolute; }
.wl-chip:has(input:checked) {
    background: var(--sage-50); border-color: var(--sage-500); color: var(--sage-700);
}
.wl-chip-warn:has(input:checked) {
    background: #FBE9E6; border-color: var(--err); color: #7A2B22;
}
.wl-empty { text-align: center; padding: 3rem 1rem; }

@media (max-width: 800px) {
    .wl-filter-rail { grid-template-columns: repeat(2, 1fr); }
    .wl-filter-actions { grid-column: span 2; }
}

/* ── RECIPE DETAIL ──────────────────────────────────────────── */
.wl-recipe { background: var(--cream-50); }
.wl-recipe-hero {
    height: 42vh; min-height: 280px;
    position: relative;
    overflow: hidden;
    background: var(--sage-50);
}
.wl-recipe-hero-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.wl-recipe-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(46,45,42,0.78) 100%);
    display: flex; align-items: flex-end; padding-bottom: 1.5rem;
}
.wl-recipe-hero-overlay .wl-container { color: #fff; }
.wl-recipe-meal {
    display: inline-block;
    font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
    background: rgba(255,255,255,0.18); padding: 4px 10px;
    border-radius: 999px; backdrop-filter: blur(8px);
}
.wl-recipe-title {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 8px 0 6px;
    letter-spacing: -0.015em; text-shadow: 0 1px 2px rgba(0,0,0,0.18);
}
.wl-recipe-desc { font-size: 1rem; opacity: 0.95; max-width: 620px; margin: 0; }

.wl-recipe-body { padding: 2rem 1.25rem 3rem; }
.wl-recipe-grid {
    display: grid; grid-template-columns: 1fr 320px; gap: 2.5rem;
    align-items: start;
}
.wl-recipe-side { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 14px; }

.wl-callout {
    background: var(--sage-50);
    border-left: 4px solid var(--sage-500);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin: 0 0 1.5rem;
}
.wl-callout h3 { font-family: var(--font-display); font-weight: 600; margin: 0 0 4px; font-size: 1rem; color: var(--sage-700); }
.wl-callout p { margin: 0; color: var(--ink); font-size: 0.95rem; }

.wl-recipe-meta-row {
    display: flex; gap: 10px; flex-wrap: wrap;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 12px 14px; margin: 0 0 1.5rem;
    align-items: center;
}
.wl-stat { font-size: 0.85rem; color: var(--ink-muted); }
.wl-stat strong { font-family: var(--font-display); font-size: 1.4rem; color: var(--ink); display: inline-block; margin-right: 4px; }
.wl-stat-label { font-size: 0.78rem; color: var(--ink-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; display: block; margin-bottom: 4px; }
.wl-servings-row { display: inline-flex; align-items: center; gap: 4px; }
.wl-servings-row input {
    width: 56px; text-align: center;
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius-sm); padding: 6px;
    font-family: inherit; font-size: 0.95rem;
}
.wl-stepper {
    width: 30px; height: 30px;
    border: 1.5px solid var(--line-strong); background: #fff;
    border-radius: 999px; cursor: pointer; font-size: 1rem;
    font-family: inherit;
}
.wl-stepper:hover { border-color: var(--sage-500); color: var(--sage-700); }

.wl-ingredients { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.wl-ingredients li {
    padding: 10px 0; border-bottom: 1px solid var(--line);
    display: flex; align-items: baseline; gap: 8px;
}
.wl-ingredients li:last-child { border-bottom: 0; }
.wl-ing-text { font-size: 0.96rem; }

.wl-steps { padding-left: 1.4em; margin: 0 0 1.5rem; }
.wl-steps li { margin-bottom: 0.8rem; line-height: 1.6; font-size: 0.98rem; }
.wl-notes { color: var(--ink-muted); font-style: italic; }

.wl-nutrition-card, .wl-tag-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-1);
}
.wl-nutrition-card h2 { font-family: var(--font-display); font-size: 1.1rem; margin: 0 0 12px; }
.wl-nutrition-kcal {
    text-align: center; padding: 8px 0 14px;
    border-bottom: 1px solid var(--line); margin-bottom: 10px;
}
.wl-nutrition-kcal strong { font-family: var(--font-display); font-size: 2.6rem; color: var(--sage-600); display: block; line-height: 1; }
.wl-nutrition-kcal span { font-size: 0.85rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.wl-nutrition-table { width: 100%; border-collapse: collapse; }
.wl-nutrition-table th { text-align: left; font-weight: 500; color: var(--ink-muted); padding: 6px 0; font-size: 0.88rem; }
.wl-nutrition-table td { text-align: right; padding: 6px 0; font-size: 0.92rem; }
.wl-nutrition-foot { font-size: 0.74rem; color: var(--ink-soft); margin: 10px 0 0; line-height: 1.5; }

.wl-tag-card h3 { font-family: var(--font-display); font-size: 1rem; margin: 0 0 8px; font-weight: 600; }
.wl-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.wl-tag {
    display: inline-block; background: var(--sage-50); color: var(--sage-700);
    padding: 4px 10px; border-radius: 999px; font-size: 0.78rem; text-transform: capitalize;
    border: 1px solid var(--sage-100);
}
.wl-tag-warn { background: #FBE9E6; color: #7A2B22; border-color: #E8B6AE; }
.wl-actions { display: flex; gap: 8px; }
.wl-actions .wl-btn { flex: 1; padding: 9px; }

@media (max-width: 900px) {
    .wl-recipe-grid { grid-template-columns: 1fr; }
    .wl-recipe-side { position: static; }
}

@media print {
    .wl-header, .wl-footer, .wl-actions, .wl-recipe-hero-overlay { display: none !important; }
    .wl-recipe-hero { height: 200px; }
    .wl-recipe-side { display: none !important; }
    .wl-recipe-grid { grid-template-columns: 1fr; }
    body { background: #fff; }
}

/* ══════════════════════════════════════════════════════════════
   ADMIN
   ══════════════════════════════════════════════════════════════ */
.wl-list-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 12px; margin: 1rem 0 1.25rem;
}
.wl-list-filters {
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.wl-list-filters input, .wl-list-filters select {
    padding: 8px 10px; border-radius: var(--radius-sm);
    border: 1.5px solid var(--line-strong); background: #fff;
    font-family: inherit; font-size: 0.9rem; min-width: 180px;
}

.wl-table {
    width: 100%; border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 0 0 1rem;
}
.wl-table thead {
    background: var(--cream-50);
    border-bottom: 1px solid var(--line);
}
.wl-table th, .wl-table td {
    text-align: left; padding: 10px 12px; vertical-align: middle;
    font-size: 0.9rem;
}
.wl-table th { font-weight: 600; color: var(--ink-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.wl-table tbody tr { border-top: 1px solid var(--line); }
.wl-table tbody tr:hover { background: var(--sage-50); }
.wl-table-link { color: var(--ink); font-weight: 600; text-decoration: none; }
.wl-table-link:hover { color: var(--sage-700); }
.wl-table-actions { white-space: nowrap; }
.wl-table-actions a, .wl-table-actions button { margin-right: 10px; font-size: 0.85rem; }

.wl-thumb {
    width: 64px; height: 48px;
    background-color: var(--sage-50);
    object-fit: cover;
    border-radius: var(--radius-sm); border: 1px solid var(--line);
    display: block;
}

.wl-pill {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
    background: var(--sage-50); color: var(--sage-700); border: 1px solid var(--sage-100);
}
.wl-pill-published { background: #E5F2E6; color: #2E5933; border-color: #B6D8B9; }
.wl-pill-locked    { background: #FBEFD4; color: #7A5C16; border-color: #E8C97E; margin-left: 4px; }

/* ── COOKIE NOTICE ──────────────────────────────────────────── */
/* Hidden by default; JS adds `.show` to reveal and removes it on dismiss.
   We don't rely on the [hidden] attribute because `.wl-cookie-notice { display: flex }`
   would win the cascade and the notice would refuse to hide. */
.wl-cookie-notice {
    display: none;
    position: fixed; left: 16px; right: 16px; bottom: 16px;
    z-index: 200;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-3);
    padding: 14px 18px;
    align-items: center; gap: 16px;
    max-width: 720px; margin: 0 auto;
}
.wl-cookie-notice.show {
    display: flex;
    animation: wl-cookie-slide 240ms cubic-bezier(.4,.2,.2,1);
}
.wl-cookie-notice p {
    margin: 0; flex: 1; font-size: 0.88rem; color: var(--ink); line-height: 1.45;
}
.wl-cookie-notice code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.82rem; background: var(--sage-50); color: var(--sage-700);
    padding: 1px 6px; border-radius: 4px;
}
.wl-cookie-notice .wl-btn { flex-shrink: 0; padding: 8px 18px; font-size: 0.88rem; }
@keyframes wl-cookie-slide {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
@media (max-width: 600px) {
    .wl-cookie-notice { flex-direction: column; align-items: stretch; }
    .wl-cookie-notice .wl-btn { width: 100%; }
}
.wl-pill-draft     { background: #FBEFD4; color: #7A5C16; border-color: #E8C97E; }
.wl-pill-custom    { background: var(--cream-100); color: var(--ink); border-color: var(--cream-200); }
.wl-pill-usda      { background: var(--sage-50); color: var(--sage-700); border-color: var(--sage-100); }

.wl-small { font-size: 0.8rem; }
.wl-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; }
.wl-danger { color: var(--err); }
.wl-danger:hover { color: #8a1e15; }

/* Stats cards */
.wl-stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px; margin: 1rem 0 1.5rem;
}
.wl-stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 16px;
    display: flex; flex-direction: column; align-items: flex-start;
    box-shadow: var(--shadow-1);
}
.wl-stat-num { font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: var(--sage-600); line-height: 1; }
.wl-stat-tag { font-size: 0.78rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 6px; }

.wl-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-1);
}
.wl-panel h2, .wl-panel h3 {
    font-family: var(--font-display); margin: 0 0 12px; font-weight: 600;
}
.wl-panel h2 { font-size: 1.15rem; }
.wl-panel h3 { font-size: 0.98rem; }

.wl-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .wl-grid-2 { grid-template-columns: 1fr; } }

.wl-rank { list-style: none; padding: 0; margin: 0; counter-reset: rank; }
.wl-rank li {
    counter-increment: rank;
    display: flex; justify-content: space-between; gap: 10px;
    padding: 6px 0; border-bottom: 1px solid var(--line);
}
.wl-rank li:last-child { border-bottom: 0; }
.wl-rank li::before { content: counter(rank); width: 24px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.wl-rank a { color: var(--ink); text-decoration: none; flex: 1; }
.wl-rank a:hover { color: var(--sage-700); }
.wl-rank-meta { color: var(--ink-muted); font-size: 0.85rem; }

/* Recipe editor */
.wl-editor-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin: 1rem 0; }
.wl-editor-head h2 { font-family: var(--font-display); font-size: 1.4rem; margin: 0; font-weight: 600; }

.wl-editor-grid { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; }
@media (max-width: 1000px) { .wl-editor-grid { grid-template-columns: 1fr; } }

.wl-editor-main { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.wl-editor-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (min-width: 1001px) { .wl-editor-side { position: sticky; top: 80px; align-self: flex-start; } }

.wl-fieldset {
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 18px 20px 20px;
    box-shadow: var(--shadow-1);
}
.wl-fieldset legend {
    font-family: var(--font-display); font-weight: 600; font-size: 1rem;
    padding: 0 8px; color: var(--ink); background: #fff;
}
.wl-fieldset legend small { font-family: var(--font-body); font-weight: 400; }
.wl-fieldset-help { margin: 0 0 12px; color: var(--ink-muted); font-size: 0.82rem; }

.wl-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.wl-field > span { font-size: 0.78rem; font-weight: 600; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.wl-field > span small { text-transform: none; font-weight: 400; letter-spacing: 0; }
.wl-field input[type="text"], .wl-field input[type="number"], .wl-field textarea, .wl-field select, .wl-field input[type="search"] {
    border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
    padding: 9px 11px; font-size: 0.92rem; font-family: inherit; color: var(--ink); background: #fff;
    transition: border-color var(--t), box-shadow var(--t);
}
.wl-field input:focus, .wl-field textarea:focus, .wl-field select:focus {
    outline: none; border-color: var(--sage-500); box-shadow: 0 0 0 3px rgba(107,143,113,0.18);
}
.wl-field textarea { resize: vertical; min-height: 60px; line-height: 1.5; }

.wl-field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px 14px; margin-bottom: 6px; align-items: end; }
.wl-field-row .wl-field { margin-bottom: 0; }

/* Ingredient editor */
.wl-ing-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-bottom: 1px solid var(--line);
    font-size: 0.92rem;
}
.wl-ing-row:last-child { border-bottom: 0; }
.wl-ing-food { flex: 1; font-weight: 500; }
.wl-ing-qty { width: 80px; }
.wl-ing-display { flex: 1; min-width: 0; }

.wl-ing-add { position: relative; margin-top: 14px; }
.wl-ing-add input {
    width: 100%; padding: 10px 12px;
    border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); font-family: inherit; font-size: 0.95rem;
}
.wl-ing-results {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border: 1px solid var(--line); border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-2);
    max-height: 320px; overflow-y: auto;
    z-index: 20;
}
.wl-ing-result {
    display: flex; flex-direction: column; align-items: flex-start;
    width: 100%; text-align: left; padding: 8px 12px;
    background: #fff; border: 0; border-top: 1px solid var(--line);
    cursor: pointer; font-family: inherit;
}
.wl-ing-result:first-child { border-top: 0; }
.wl-ing-result:hover { background: var(--sage-50); }
.wl-ing-result-name { font-size: 0.92rem; color: var(--ink); font-weight: 500; }
.wl-ing-result-meta { font-size: 0.78rem; color: var(--ink-muted); }
.wl-no-results { padding: 12px; color: var(--ink-muted); font-size: 0.88rem; }

/* Steps editor */
.wl-steps-edit { padding-left: 1.4em; margin: 0 0 14px; }
.wl-steps-edit li {
    margin-bottom: 8px;
    display: flex; gap: 8px; align-items: flex-start;
}
.wl-steps-edit textarea {
    flex: 1; min-height: 50px; padding: 8px 10px;
    border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
    font-family: inherit; font-size: 0.92rem; resize: vertical;
}
.wl-step-remove, .wl-ing-remove {
    flex-shrink: 0; background: none; border: 0; color: var(--err);
    font-size: 1.1rem; cursor: pointer; padding: 0 6px;
}

/* Image */
.wl-image-preview {
    width: 100%; aspect-ratio: 4/3;
    background-color: var(--sage-50); background-size: cover; background-position: center;
    border-radius: var(--radius-sm); margin-bottom: 12px;
    border: 1px solid var(--line);
}

/* Inline-edit row in Foods tab */
.wl-foods-table .wl-inline-edit { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 0; }
.wl-foods-table .wl-inline-edit input[type="text"] { width: 220px; }
.wl-foods-table .wl-inline-edit input[type="number"] { width: 70px; }
.wl-foods-table .wl-inline-edit input { padding: 4px 6px; font-size: 0.85rem; border: 1px solid var(--line); border-radius: 4px; }
.wl-foods-table .wl-food-custom td:first-child { padding: 6px 12px; }
.wl-food-add-form {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px;
}
.wl-food-add-form summary { font-weight: 600; cursor: pointer; }
.wl-food-form { margin-top: 12px; }

/* Nutrition card flush (no outer panel border) */
.wl-nutrition-card-flush {
    background: var(--sage-50); border: 1px solid var(--sage-100); padding: 12px 14px;
}

/* Users */
.wl-row-banned { opacity: 0.5; }

/* ══════════════════════════════════════════════════════════════
   CALORIE CALCULATOR
   ══════════════════════════════════════════════════════════════ */
.wl-calc-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 1000px) {
    .wl-calc-grid { grid-template-columns: 1fr; }
}

.wl-calc-form { display: flex; flex-direction: column; gap: 1rem; }

.wl-radio-stack {
    display: flex; flex-direction: column; gap: 8px;
}
.wl-radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 8px;
}
label.wl-radio {
    /* Specificity bump to label.wl-radio (0,1,1) so we override `.wl-form label`
       which would otherwise turn this into flex-column. */
    display: grid;
    grid-template-columns: auto 1fr auto;
    column-gap: 12px;
    align-items: center;
    border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
    padding: 12px 14px; cursor: pointer;
    background: #fff;
    transition: border-color var(--t), background var(--t);
}
label.wl-radio:hover { border-color: var(--sage-500); }
label.wl-radio:has(input:checked) { border-color: var(--sage-500); background: var(--sage-50); }
label.wl-radio input[type="radio"] {
    grid-column: 1;
    align-self: center;
    accent-color: var(--sage-500);
    width: 18px; height: 18px;
    margin: 0;
}
label.wl-radio > span {
    grid-column: 2;
    display: flex; flex-direction: column; gap: 2px;
    min-width: 0;
}
label.wl-radio strong { font-size: 0.95rem; font-weight: 600; color: var(--ink); }
label.wl-radio em { font-style: normal; font-size: 0.82rem; color: var(--ink-muted); }
label.wl-radio > small {
    grid-column: 3;
    align-self: center;
    font-size: 0.78rem;
    color: var(--ink-soft);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    white-space: nowrap;
    background: var(--cream-50);
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
}
label.wl-radio:has(input:checked) > small { border-color: var(--sage-100); background: #fff; }
@media (max-width: 480px) {
    /* Stack the chip below content on narrow screens */
    label.wl-radio { grid-template-columns: auto 1fr; row-gap: 6px; }
    label.wl-radio > small { grid-column: 2; justify-self: start; }
}

.wl-calc-save {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex; align-items: center; gap: 14px;
    flex-wrap: wrap;
}
.wl-calc-save p { margin: 0; }

.wl-calc-side {
    display: flex; flex-direction: column; gap: 12px;
    position: sticky; top: 80px;
}
@media (max-width: 1000px) {
    .wl-calc-side { position: static; }
}

.wl-calc-result-card {
    background:
        radial-gradient(ellipse 60% 80% at 70% 30%, rgba(107,143,113,0.18) 0%, transparent 70%),
        var(--cream-50);
    border: 1px solid var(--sage-100);
    border-radius: var(--radius-lg);
    padding: 24px 22px 22px;
    text-align: center;
    box-shadow: var(--shadow-2);
}
.wl-calc-result-tag {
    margin: 0 0 6px;
    font-size: 0.78rem;
    color: var(--sage-700);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}
.wl-calc-result-num {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: 3.4rem;
    font-weight: 600;
    color: var(--sage-700);
    letter-spacing: -0.02em;
    line-height: 1;
}
.wl-calc-result-num small {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ink-muted);
    letter-spacing: 0;
    margin-left: 4px;
}
.wl-calc-result-foot {
    margin: 8px 0 0;
    font-size: 0.92rem;
    color: var(--ink);
    line-height: 1.5;
}

.wl-panel-muted { background: var(--sage-50); }

.wl-table-compact th, .wl-table-compact td { font-size: 0.85rem; padding: 6px 0; }
.wl-table-compact th { background: none; color: var(--ink-muted); text-transform: none; letter-spacing: 0; font-weight: 500; }
.wl-table-compact td { text-align: right; font-variant-numeric: tabular-nums; }
.wl-table-compact tr { border: none; }

/* ══════════════════════════════════════════════════════════════
   MEAL PLAN
   ══════════════════════════════════════════════════════════════ */
.wl-mp-head {
    display: flex; justify-content: space-between; align-items: flex-end;
    gap: 16px; flex-wrap: wrap; margin-bottom: 1rem;
}
.wl-mp-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.wl-mp-form {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin: 0 0 1.5rem;
}
.wl-mp-form summary {
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
}
.wl-mp-form summary::marker, .wl-mp-form summary::-webkit-details-marker { color: var(--sage-500); }
.wl-mp-form[open] summary { margin-bottom: 12px; }

.wl-mp-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}
@media (max-width: 1100px) {
    .wl-mp-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
    .wl-mp-grid { grid-template-columns: 1fr; }
}

.wl-mp-day {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 12px 8px;
    display: flex; flex-direction: column;
    min-height: 320px;
    box-shadow: var(--shadow-1);
}

.wl-mp-day-head {
    display: flex; justify-content: space-between; align-items: flex-end;
    padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 8px;
}
.wl-mp-day-head strong {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
}
.wl-mp-total {
    font-size: 0.78rem; color: var(--ink-muted);
    text-align: right;
}
.wl-mp-total strong {
    font-family: var(--font-body);
    font-size: 1rem; font-weight: 700;
}
.wl-mp-total small { display: block; font-size: 0.7rem; color: var(--ink-soft); }
.wl-mp-ok   { color: var(--ok); }
.wl-mp-ok strong { color: var(--ok); }
.wl-mp-warn { color: var(--warn); }
.wl-mp-warn strong { color: var(--warn); }
.wl-mp-err  { color: var(--err); }
.wl-mp-err strong { color: var(--err); }

.wl-mp-day-macros {
    display: flex; gap: 8px;
    font-size: 0.72rem; color: var(--ink-soft);
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--line);
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.wl-mp-slot {
    padding: 8px 4px;
    border-bottom: 1px solid var(--line);
}
.wl-mp-slot:last-child { border-bottom: 0; }

.wl-mp-slot-head {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 2px;
}
.wl-mp-slot-tag {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--sage-600);
    font-weight: 600;
}
.wl-mp-slot-kcal {
    font-size: 0.75rem;
    color: var(--ink-muted);
    font-variant-numeric: tabular-nums;
}
.wl-mp-slot-title {
    display: block;
    font-size: 0.88rem;
    color: var(--ink);
    text-decoration: none;
    line-height: 1.3;
    font-weight: 500;
    margin: 2px 0 4px;
}
.wl-mp-slot-title:hover { color: var(--sage-700); }
.wl-mp-slot-servings {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--ink-muted);
    background: var(--cream-100);
    border-radius: 999px;
    padding: 1px 8px;
    margin-right: 4px;
}
.wl-mp-swap {
    display: inline;
}
.wl-mp-swap button {
    font-size: 0.7rem;
    color: var(--ink-soft);
}
.wl-mp-swap button:hover { color: var(--sage-700); }

/* Shopping list */
.wl-shop-cat { margin-bottom: 12px; }
.wl-shop-cat h3 {
    text-transform: capitalize;
}
.wl-shop-list { list-style: none; padding: 0; margin: 0; }
.wl-shop-item {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}
.wl-shop-item:last-child { border-bottom: 0; }
.wl-shop-check {
    grid-column: 1 / 2; grid-row: 1;
    display: flex; align-items: center; gap: 10px; cursor: pointer;
}
.wl-shop-check input { accent-color: var(--sage-500); width: 18px; height: 18px; }
.wl-shop-check:has(input:checked) .wl-shop-name { text-decoration: line-through; color: var(--ink-soft); }
.wl-shop-name { font-size: 0.95rem; }
.wl-shop-grams {
    grid-column: 2; grid-row: 1;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--ink);
}
.wl-shop-where {
    grid-column: 1 / 3; grid-row: 2;
    font-size: 0.78rem; color: var(--ink-muted);
    margin-top: 2px;
}
.wl-shop-where summary { cursor: pointer; user-select: none; }
.wl-shop-where ul { padding-left: 1.4em; margin: 4px 0 0; }
.wl-shop-where li { font-size: 0.78rem; color: var(--ink-muted); }

@media print {
    .wl-header, .wl-footer, .wl-mp-head-actions, .wl-mp-form, .wl-mp-swap { display: none !important; }
    .wl-shop-cat { break-inside: avoid; }
    .wl-shop-where { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   DAILY LOG
   ══════════════════════════════════════════════════════════════ */
.wl-log-nav { font-variant-numeric: tabular-nums; }
.wl-log-nav .wl-btn { font-size: 0.85rem; padding: 7px 14px; }

.wl-log-summary {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 0 0 1.25rem;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
    box-shadow: var(--shadow-1);
}
@media (max-width: 720px) { .wl-log-summary { grid-template-columns: 1fr; } }

.wl-log-summary-tag {
    margin: 0 0 4px;
    font-size: 0.78rem; color: var(--ink-muted);
    text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700;
}
.wl-log-summary-num {
    margin: 0 0 14px;
    font-family: var(--font-display);
    font-size: 2.4rem; font-weight: 600;
    color: var(--ink);
    line-height: 1;
}
.wl-log-summary-num strong { color: var(--sage-700); }
.wl-log-summary-num small { font-family: var(--font-body); font-size: 0.95rem; font-weight: 500; color: var(--ink-muted); margin-left: 4px; }
.wl-log-vs { font-family: var(--font-body); font-size: 0.85rem; font-weight: 500; margin-left: 12px; }

.wl-log-bar {
    position: relative;
    height: 10px;
    background: var(--cream-100);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}
.wl-log-bar-fill {
    position: absolute; left: 0; top: 0; bottom: 0;
    background: var(--sage-500);
    border-radius: 999px;
    transition: width 200ms ease;
}
.wl-bar-over .wl-log-bar-fill { background: var(--warn); }
.wl-log-bar-over {
    position: absolute; left: 100%; top: 0; bottom: 0;
    background: var(--err);
    border-radius: 0 999px 999px 0;
    transform: translateX(-100%);
}
.wl-log-summary-foot {
    margin: 0; font-size: 0.9rem; color: var(--ink-muted);
}

.wl-log-summary-macros {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
    align-items: center;
}
.wl-log-summary-macros > div {
    text-align: center;
    background: var(--sage-50);
    border-radius: var(--radius-sm);
    padding: 10px 4px;
}
.wl-log-summary-macros .wl-stat-num { font-size: 1.4rem; color: var(--sage-700); }
.wl-log-summary-macros .wl-stat-tag { display: block; margin-top: 2px; }

/* Tabs */
.wl-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.wl-tab {
    background: none; border: 0;
    border-bottom: 2px solid transparent;
    padding: 10px 14px;
    cursor: pointer;
    font-family: inherit; font-size: 0.92rem; font-weight: 600;
    color: var(--ink-muted);
}
.wl-tab:hover { color: var(--ink); }
.wl-tab.active { color: var(--sage-700); border-bottom-color: var(--sage-500); }

.wl-log-add-row {
    display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap;
}
.wl-log-search-wrap { flex: 2; min-width: 200px; }
.wl-log-servings-field { width: 90px; }
.wl-log-preview-kcal {
    align-self: center; padding: 6px 10px;
    background: var(--sage-50); border-radius: var(--radius-sm);
    font-size: 0.85rem; color: var(--ink); white-space: nowrap;
}
.wl-log-preview-kcal span { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Entries list */
.wl-log-list { list-style: none; padding: 0; margin: 0; }
.wl-log-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px 4px;
    border-bottom: 1px solid var(--line);
}
.wl-log-row:last-child { border-bottom: 0; }
.wl-log-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wl-log-row-title {
    font-size: 0.95rem; font-weight: 500; color: var(--ink);
    text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
a.wl-log-row-title:hover { color: var(--sage-700); }
.wl-log-row-meta {
    font-size: 0.75rem; color: var(--ink-muted); text-transform: capitalize;
}
.wl-log-row-nums {
    display: flex; flex-direction: column; align-items: flex-end;
    font-variant-numeric: tabular-nums; font-size: 0.85rem; gap: 2px;
}

/* Weekly chart */
.wl-week-chart {
    display: grid; grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    height: 180px;
    align-items: end;
    padding-bottom: 28px;
    position: relative;
}
.wl-week-day {
    display: flex; flex-direction: column; align-items: center;
    text-decoration: none;
    color: var(--ink);
    height: 100%;
    justify-content: flex-end;
    position: relative;
}
.wl-week-day.today .wl-week-label { color: var(--sage-700); font-weight: 700; }
.wl-week-bar-wrap {
    width: 100%; max-width: 56px;
    height: 100%;
    background: var(--cream-50);
    border-radius: var(--radius-sm);
    position: relative;
    display: flex; flex-direction: column; justify-content: flex-end;
}
.wl-week-target-line {
    position: absolute; left: -2px; right: -2px;
    border-top: 1.5px dashed var(--ink-soft);
    z-index: 2;
}
.wl-week-bar {
    width: 100%;
    background: var(--sage-500);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: height 200ms ease;
    z-index: 1;
}
.wl-bar-ok { background: var(--sage-500); }
.wl-bar-over { background: var(--err); }
.wl-bar-empty { background: var(--cream-100); }
.wl-bar-neutral { background: var(--sage-300); }
.wl-week-num {
    position: absolute;
    top: 4px;
    font-size: 0.7rem;
    color: var(--ink-muted);
    font-variant-numeric: tabular-nums;
}
.wl-week-label {
    position: absolute;
    bottom: -22px;
    font-size: 0.74rem;
    color: var(--ink-muted);
}

/* Favorites card variant — exposes a small "Remove" button below the meta row */
.wl-card-fav { display: flex; flex-direction: column; }
.wl-card-fav .wl-card-title a { color: inherit; text-decoration: none; }
.wl-card-fav .wl-card-title a:hover { color: var(--sage-700); }
.wl-card-image-link { display: block; }
.wl-fav-remove { margin-top: 8px; font-size: 0.82rem; }
.wl-fav-remove:hover { color: #8a1e15; }
.wl-card-fav .wl-card-meta .wl-muted { margin-left: auto; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 760px) {
    .wl-nav-toggle { display: flex; }
    .wl-nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: #fff;
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-2);
        padding: 12px 1.25rem 16px;
        flex-direction: column;
        gap: 4px;
        align-items: stretch;
    }
    .wl-nav.open { display: flex; }
    .wl-nav a, .wl-nav .wl-inline-form, .wl-nav .wl-link-button {
        padding: 12px 8px;
        min-height: 44px;
        font-size: 1rem;
        border-radius: var(--radius-sm);
        width: 100%;
        text-align: left;
        justify-content: flex-start;
    }
    .wl-nav a:hover { background: var(--sage-50); }
    .wl-nav a[aria-current="page"] {
        background: var(--sage-50);
        border-bottom: 0;
        border-left: 3px solid var(--sage-500);
        padding-left: 12px;
    }
    .wl-nav .wl-cta-small {
        padding: 10px 18px;
        font-size: 0.95rem;
        text-align: center;
    }
    .wl-header { position: sticky; }
    .wl-hero { padding: 2.5rem 0 2.5rem; }
    .wl-display { font-size: 2rem; }
    .wl-section-title { font-size: 1.5rem; }
    .wl-section { padding-top: 2rem; padding-bottom: 2rem; }
}
