/* =========================================================================
   The Soares Family Recipes
   Palette: warm trattoria — terracotta, mustard, sage, on aged paper.
   ========================================================================= */

:root {
    /* Surfaces */
    --c-paper:      #ffffff;   /* true white for cards / content surfaces */
    --c-paper-2:    #f5f5f4;   /* subtle warm gray surface */
    --c-bg:         #fafaf7;   /* page background — clean warm off-white */

    /* Text + lines */
    --c-ink:        #1c1917;   /* warm near-black (stone-900) */
    --c-ink-soft:   #44403c;   /* stone-700 */
    --c-muted:      #a8a29e;   /* stone-400 */
    --c-line:       #e7e5e4;   /* stone-200 */

    /* Accents */
    --c-terra:      #e2603e;   /* primary — modern saturated terracotta */
    --c-terra-d:    #b8492c;
    --c-terra-dd:   #1c1917;   /* dark nav surface (was deep brown, now warm charcoal) */
    --c-mustard:    #eab308;   /* clean yellow accent */
    --c-sage:       #65a695;   /* modern teal-sage */
    --c-sage-d:     #3f6b5d;
    --c-wine:       #b91c1c;   /* danger — clean red-700 */

    --shadow-sm: 0 1px 2px rgba(28, 25, 23, .05), 0 2px 6px rgba(28, 25, 23, .04);
    --shadow-md: 0 6px 18px rgba(28, 25, 23, .07), 0 1px 3px rgba(28, 25, 23, .05);
    --shadow-lg: 0 18px 40px rgba(28, 25, 23, .10);

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

    --font-display: 'Fraunces', 'Georgia', serif;
    --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* --- Base ---------------------------------------------------------------- */
html, body { min-height: 100%; }
body {
    font-family: var(--font-body);
    background:
        radial-gradient(900px 500px at 95% -8%, rgba(226, 96, 62, .06), transparent 65%),
        radial-gradient(700px 420px at -5% 8%, rgba(101, 166, 149, .06), transparent 65%),
        var(--c-bg);
    /* very subtle paper grain */
    background-attachment: fixed;
    color: var(--c-ink);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
}
main { flex: 1 0 auto; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.015em; color: var(--c-ink); }
.page-title, .section-heading, .recipe-card-title, .recipe-hero-title {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    color: var(--c-ink);
}
.fw-black { font-weight: 900 !important; }

a { color: var(--c-terra-d); text-decoration: none; }
a:hover { color: var(--c-terra); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.section-heading {
    font-size: clamp(1.4rem, 3.5vw, 1.9rem);
    font-weight: 800;
    margin: 0;
    position: relative;
    display: inline-block;
}
.section-heading::after {
    content: '';
    display: block;
    height: 3px;
    width: 44px;
    margin-top: 6px;
    border-radius: 999px;
    background: var(--c-terra);
}
.page-title {
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    font-weight: 800;
    margin-bottom: .25rem;
}
.eyebrow {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
    font-size: .95rem;
    color: var(--c-terra-d);
    margin-bottom: .25rem;
}
.req { color: var(--c-terra); }

/* --- Nav ---------------------------------------------------------------- */
.app-nav {
    background: var(--c-terra-dd);
    box-shadow: var(--shadow-sm);
    padding-block: .55rem;
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.app-nav .container {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: .5rem;
}

/* Brand */
.brand-logo {
    display: inline-flex; align-items: center; gap: .65rem;
    color: #fff !important;
    font-family: 'Alfa Slab One', var(--font-display);
    font-weight: 400;
    font-style: normal;
    font-size: 1.1rem;
    letter-spacing: .005em;
    text-decoration: none !important;
    margin: 0;
    padding: 0;
    margin-right: auto;
    min-width: 0;          /* allow the text to shrink below its natural width */
    flex: 0 1 auto;        /* don't push the icons off-row on tight screens */
}
.brand-text {
    line-height: 1;
    padding-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.brand-mark {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.brand-mark i {
    font-size: 1.65rem;
    line-height: 1;
    color: var(--c-terra);
    transform-origin: 50% 92%;
    animation: flame-flicker 1.8s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(234, 179, 8, .4));
}
.brand-logo:hover .brand-mark i {
    animation-duration: .9s;  /* flicker faster on hover */
}

@keyframes flame-flicker {
    0%,  100% { transform: scaleY(1)    scaleX(1);    color: #e2603e; }
    20%       { transform: scaleY(1.08) scaleX(.96);  color: #f59e0b; }
    40%       { transform: scaleY(.97)  scaleX(1.03); color: #ea580c; }
    60%       { transform: scaleY(1.06) scaleX(.98);  color: #f97316; }
    80%       { transform: scaleY(.98)  scaleX(1.02); color: #ef4444; }
}
@media (prefers-reduced-motion: reduce) {
    .brand-mark i { animation: none; }
}

/* Hamburger toggle + search icon button (both live on the dark nav) */
.nav-menu-toggle.navbar-toggler,
.nav-icon-btn {
    width: 40px; height: 40px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.04);
    border-radius: 8px;
    padding: 0;
    color: rgba(255,255,255,.92);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background-color .12s ease, border-color .12s ease;
}
.nav-menu-toggle.navbar-toggler:focus,
.nav-icon-btn:focus { box-shadow: none; outline: none; }
.nav-menu-toggle.navbar-toggler:hover,
.nav-icon-btn:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); }
.nav-icon-btn[aria-expanded="true"],
.nav-menu-toggle.navbar-toggler[aria-expanded="true"] { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); }
.nav-icon-btn i { font-size: 1rem; }
.nav-menu-toggle .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba%28255,255,255,0.92%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
    width: 22px; height: 22px;
}

/* Avatar chip (used both in nav drawer + admin tables) */
.avatar-chip {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    background: var(--c-terra);
    color: #fff;
    border-radius: 999px;
    font-weight: 700;
    font-size: .85rem;
    font-family: var(--font-display);
    flex-shrink: 0;
}

/* --- Search drawer (collapsible search bar — anchored under the icon) -- */
.nav-search-drawer {
    flex-basis: 100%;
    margin-top: .55rem;
}
.nav-search-form {
    display: flex; align-items: center; gap: .5rem;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius-md);
    padding: .5rem .65rem;
    position: relative;
}
.nav-search-icon {
    position: absolute;
    left: 1.15rem; top: 50%;
    transform: translateY(-50%);
    color: var(--c-muted);
    pointer-events: none;
    font-size: .9rem;
}
.nav-search-input {
    flex: 1;
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    border-radius: 6px;
    padding: .55rem .85rem .55rem 2.1rem !important;  /* room for the inline icon */
    font-size: 1rem;
    color: var(--c-ink);
}
.nav-search-input:focus {
    border-color: var(--c-terra);
    box-shadow: 0 0 0 3px rgba(226, 96, 62, .2);
    background: #fff;
}
.nav-search-form .btn-hero { padding: .5rem 1rem; }

/* --- Nav drawer (collapsible panel — anchored under the hamburger) ----- */
.nav-drawer {
    flex-basis: 100%;
    margin-top: .55rem;
    display: flex;
    justify-content: flex-end;   /* anchor panel to the right under the toggle */
}
.nav-drawer-list {
    list-style: none;
    margin: 0;
    padding: .35rem;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-md);
    backdrop-filter: blur(2px);
    width: 320px;
    max-width: 100%;             /* full-width on tiny phones */
}
.nav-drawer-link {
    display: flex; align-items: center; gap: .8rem;
    flex-direction: row-reverse; /* label first, icon on the right */
    padding: .7rem .85rem;
    color: rgba(255,255,255,.88);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: .98rem;
    line-height: 1.2;
    width: 100%;
    background: transparent;
    border: 0;
    text-align: right;
    transition: background-color .1s ease, color .1s ease;
}
.nav-drawer-link span { flex: 1; }   /* push label to the right inside the row */
.nav-drawer-link:hover,
.nav-drawer-link:focus {
    background: rgba(255,255,255,.08);
    color: #fff;
}
.nav-drawer-link i {
    width: 1.25em;
    text-align: center;
    color: var(--c-terra);
    font-size: .95em;
    flex-shrink: 0;
}
.nav-drawer-link-button { cursor: pointer; }

.nav-drawer-section {
    padding: .9rem .85rem .25rem;
    color: rgba(255,255,255,.45);
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 700;
    text-align: right;
}

.nav-drawer-user {
    display: flex; align-items: center; gap: .8rem;
    flex-direction: row-reverse;     /* avatar on the right */
    padding: .55rem .85rem .85rem;
    color: rgba(255,255,255,.88);
}
.nav-drawer-user-info {
    line-height: 1.25;
    min-width: 0;
    flex: 1;
    text-align: right;
}
.nav-drawer-user-name {
    font-weight: 700;
    color: #fff;
}
.nav-drawer-user-email {
    color: rgba(255,255,255,.55);
    font-size: .78rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* --- Buttons ------------------------------------------------------------ */
.btn {
    border-radius: 6px;
    font-weight: 600;
    font-size: .95rem;
    transition: background-color .12s ease, color .12s ease, border-color .12s ease, transform .08s ease;
}
.btn-lg { padding: .65rem 1.3rem; font-size: 1rem; }

.btn-hero {
    background: var(--c-terra);
    color: var(--c-paper);
    border: 1px solid var(--c-terra-d);
    box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, var(--shadow-sm);
}
.btn-hero:hover { background: var(--c-terra-d); color: var(--c-paper); }
.btn-hero:active { transform: translateY(1px); }

.btn-outline-hero {
    border: 1px solid var(--c-terra);
    color: var(--c-terra-d);
    background: transparent;
}
.btn-outline-hero:hover { background: var(--c-terra); color: var(--c-paper); border-color: var(--c-terra-d); }

.btn-light {
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    color: var(--c-ink-soft);
}
.btn-light:hover { background: var(--c-paper-2); border-color: var(--c-muted); }

.btn-outline-danger { border: 1px solid var(--c-wine); color: var(--c-wine); }
.btn-outline-danger:hover { background: var(--c-wine); color: var(--c-paper); }

/* --- Hero --------------------------------------------------------------- */
.hero {
    position: relative;
    padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 3vw, 2rem);
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    box-shadow: var(--shadow-md);
    margin-top: 1rem;
}
.hero-inner { position: relative; z-index: 2; }
.hero-inner h1 { font-size: clamp(1.9rem, 5.5vw, 3.2rem); line-height: 1.05; }
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .35;
    z-index: 0;
    pointer-events: none;
}
.blob-1 { width: 360px; height: 360px; background: var(--c-mustard); top: -120px; left: -100px; }
.blob-2 { width: 320px; height: 320px; background: var(--c-terra);   top: 30%;    right: -120px; opacity: .22; }
.blob-3 { width: 260px; height: 260px; background: var(--c-sage);    bottom: -120px; left: 35%; opacity: .25; }

/* --- Recipe cards ------------------------------------------------------- */
.recipe-card {
    position: relative;
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
    height: 100%;
}
.recipe-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--c-muted);
}
.recipe-card-link {
    display: block;
    color: var(--c-ink);
    height: 100%;
}
.recipe-card-link:hover { color: var(--c-ink); text-decoration: none; }
.recipe-card-media {
    aspect-ratio: 4 / 3;
    background-color: var(--c-paper-2);
    background-size: cover;
    background-position: center;
    position: relative;
    background-image: linear-gradient(160deg, var(--c-paper-2) 0%, var(--c-bg) 100%);
    border-bottom: 1px solid var(--c-line);
}
.recipe-card-placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.8rem; opacity: .35;
}
.recipe-card-chip {
    position: absolute; top: 10px; left: 10px;
    background: rgba(28, 25, 23, .82);
    color: #fff;
    padding: .2rem .55rem;
    border-radius: 4px;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.recipe-card-body { padding: .9rem 1rem 1.1rem; }
.recipe-card-title { font-size: 1.15rem; font-weight: 700; margin-bottom: .15rem; line-height: 1.25; }
.recipe-card-meta { color: var(--c-muted); font-size: .8rem; margin: 0; font-style: italic; }

/* --- Icon buttons (action rows + card overlays) ------------------------- */
.icon-btn {
    width: 42px; height: 42px;
    padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    border-radius: 8px;
    color: var(--c-muted);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    text-decoration: none !important;
    transition: color .12s ease, background-color .12s ease, border-color .12s ease, transform .08s ease;
}
.icon-btn:hover  { color: var(--c-terra); border-color: var(--c-terra); }
.icon-btn:active { transform: translateY(1px); }
.icon-btn.is-active { color: var(--c-terra); border-color: var(--c-terra); background: rgba(226, 96, 62, .08); }
.icon-btn.danger:hover  { color: var(--c-wine); border-color: var(--c-wine); }
.icon-btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Round overlay variant — used as a corner button on recipe cards */
.icon-btn.overlay {
    width: 36px; height: 36px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow-sm);
}

/* --- Recipe-card favorite overlay (wraps an .icon-btn.overlay) ---------- */
.recipe-card-fav {
    position: absolute;
    top: 8px; right: 8px;
    z-index: 2;
    margin: 0;
}

/* --- Recipe show ------------------------------------------------------- */
.recipe-hero {
    aspect-ratio: 16 / 9;
    max-height: 440px;
    border-radius: var(--radius-md);
    background-color: var(--c-paper-2);
    background-size: cover;
    background-position: center;
    background-image: linear-gradient(160deg, var(--c-mustard) 0%, var(--c-terra) 100%);
    position: relative;
    overflow: hidden;
    display: flex; align-items: flex-end;
    border: 1px solid var(--c-line);
    box-shadow: var(--shadow-md);
}
.recipe-hero-overlay {
    width: 100%;
    padding: clamp(1rem, 4vw, 1.8rem);
    background: linear-gradient(180deg, transparent 0%, rgba(28, 25, 23, .7) 100%);
    color: #fff;
}
.recipe-hero-title {
    font-size: clamp(1.7rem, 5vw, 2.8rem);
    font-weight: 800;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.recipe-hero-meta  { color: rgba(255, 255, 255, .85); margin: .25rem 0 0; font-size: .9rem; }
.recipe-hero-credit {
    position: absolute;
    bottom: 5px; right: 10px;
    color: rgba(255, 255, 255, .38);
    font-size: 9px;
    font-style: italic;
    letter-spacing: .04em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
    z-index: 2;
    pointer-events: none;
}

.meta-card {
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    box-shadow: var(--shadow-sm);
}
.meta-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--c-terra-d);
}
.meta-card dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; }
.meta-card dt { color: var(--c-muted); font-weight: 500; font-size: .9rem; }
.meta-card dd { margin: 0; font-weight: 600; }
.ingredients-list { list-style: none; padding: 0; margin: 0; }
.ingredients-list li {
    padding: .65rem .25rem;
    border-bottom: 1px dashed var(--c-line);
    cursor: pointer;
    user-select: none;
    transition: color .15s ease, opacity .15s ease;
    -webkit-tap-highlight-color: transparent;
}
.ingredients-list li:last-child { border-bottom: 0; }
.ingredients-list li:hover { color: var(--c-terra-d); }
.ingredients-list li.done {
    color: var(--c-muted);
    text-decoration: line-through;
    opacity: .55;
}

.instructions-list {
    counter-reset: step;
    list-style: none;
    padding-left: 0;
}
.instructions-list li {
    counter-increment: step;
    position: relative;
    padding: 1rem 1.1rem 1rem 3.2rem;
    margin-bottom: .75rem;
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    line-height: 1.6;
}
.instructions-list li::before {
    content: counter(step);
    position: absolute;
    left: .9rem; top: 1rem;
    width: 1.75rem; height: 1.75rem;
    background: var(--c-terra);
    color: var(--c-paper);
    font-family: var(--font-display);
    font-weight: 800;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
}

/* --- Auth / forms ------------------------------------------------------- */
.auth-card {
    max-width: 440px;
    margin: 1.5rem auto;
    background: var(--c-paper);
    padding: clamp(1.5rem, 4vw, 2.4rem);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid var(--c-line);
    padding: .6rem .85rem;
    transition: border-color .12s ease, box-shadow .12s ease;
    background-color: var(--c-paper);
    color: var(--c-ink);
}
.form-control:focus, .form-select:focus {
    border-color: var(--c-terra);
    box-shadow: 0 0 0 3px rgba(226, 96, 62, .15);
    background-color: var(--c-paper);
}
/* Match .btn-lg height/font so input + button rows line up visually. */
.form-control-lg, .form-select-lg {
    padding: .65rem .9rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 6px;
}
.form-select-lg { padding-right: 2.5rem; }
.form-control.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .92rem; }
.form-label { font-weight: 600; color: var(--c-ink-soft); font-size: .92rem; }
.form-text { color: var(--c-muted); font-style: italic; font-size: .82rem; }
.filter-bar { background: var(--c-paper); padding: .85rem; border: 1px solid var(--c-line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }

/* --- Category chips (homepage quick filter) ----------------------------- */
.cat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: -.25rem;
}
.cat-chip {
    display: inline-flex;
    align-items: center;
    padding: .35rem .85rem;
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    border-radius: 999px;
    color: var(--c-ink-soft);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.4;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.cat-chip:hover { background: var(--c-paper-2); color: var(--c-ink); border-color: var(--c-muted); }
.cat-chip.is-active {
    background: var(--c-terra);
    border-color: var(--c-terra);
    color: #fff;
}
.cat-chip.is-active:hover { background: var(--c-terra-d); border-color: var(--c-terra-d); color: #fff; }

.recipe-form .photo-box {
    background: var(--c-paper);
    border: 1px dashed var(--c-terra);
    border-radius: var(--radius-md);
    padding: 1.1rem;
}
.recipe-form .photo-box legend {
    float: none;
    width: auto;
    padding: 0 .5rem;
    font-weight: 700;
    color: var(--c-terra-d);
    margin-bottom: .25rem;
    font-size: .95rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.recipe-form .current-photo { max-height: 220px; object-fit: cover; }

/* --- Admin / users table ------------------------------------------------ */
.users-table {
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.users-table thead th {
    background: var(--c-paper-2);
    color: var(--c-ink-soft);
    font-weight: 700;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-bottom: 1px solid var(--c-line);
}
.users-table td { border-color: var(--c-line); }
.role-badge {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.role-admin  { background: var(--c-terra);  color: var(--c-paper); }
.role-member { background: rgba(101, 166, 149, .18); color: var(--c-sage-d); }

.stat-num {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--c-ink);
    text-decoration: none;
    line-height: 1;
}
a.stat-num:hover { color: var(--c-terra-d); text-decoration: underline; }
.stat-num-zero { color: var(--c-muted); font-weight: 500; }

/* --- Alerts / empty state ---------------------------------------------- */
.alert {
    border-radius: var(--radius-sm);
    border: 1px solid;
    box-shadow: none;
    font-size: .94rem;
}
.alert-success { background: rgba(101, 166, 149, .14); color: var(--c-sage-d); border-color: rgba(101, 166, 149, .35); }
.alert-danger  { background: rgba(185, 28, 28, .10);   color: var(--c-wine);   border-color: rgba(185, 28, 28, .3); }
.alert-warning { background: rgba(234, 179, 8, .15);   color: #92590a;        border-color: rgba(234, 179, 8, .4); }
.alert-info    { background: var(--c-paper-2); color: var(--c-ink-soft);     border-color: var(--c-line); }

.empty-state {
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 3rem 1rem;
}
.empty-state .display-1 { opacity: .55; font-size: 4rem; }

/* --- Footer ------------------------------------------------------------- */
.footer { color: var(--c-muted); font-style: italic; font-size: .85rem; }

/* --- Mobile tweaks ------------------------------------------------------ */
@media (max-width: 575.98px) {
    .hero { border-radius: var(--radius-md); padding: 2rem 1rem; }
    .recipe-hero { border-radius: var(--radius-md); aspect-ratio: 4 / 3; }
    .btn-lg { padding: .6rem 1.1rem; font-size: .95rem; }
    .ingredients-list li { padding: .85rem .25rem; font-size: 1rem; } /* bigger tap targets */
    .instructions-list li { padding: 1rem 1rem 1rem 3.2rem; font-size: 1rem; }
    .meta-card { padding: 1rem; }
}

/* --- Print-only / no-print utilities ------------------------------------ */
.print-only,
.print-header { display: none; }

/* =========================================================================
   PRINT — strip chrome, save ink, keep the recipe readable on paper.
   ========================================================================= */
@media print {
    @page { margin: 0.6in; }

    body {
        background: white !important;
        color: black !important;
        font-size: 11pt;
        line-height: 1.45;
    }

    /* Hide all chrome */
    .no-print,
    .app-nav, .footer, .filter-bar, .alert, .flash-stack,
    .recipe-actions, .recipe-form, .empty-state .btn,
    .recipe-card-fav, .fav-btn, .btn,
    .recipe-hero {
        display: none !important;
    }

    .print-only { display: block !important; }
    .print-header { display: block !important; margin-bottom: .5rem; }
    .print-header h1 { font-size: 22pt; margin: 0 0 .1rem; font-weight: 800; }
    .print-header p  { color: #555; font-size: 9.5pt; margin: 0; }

    /* Reset card / shadow styling — paper is enough background */
    .meta-card, .instructions-list li, .recipe-card, .empty-state, main, .hero {
        background: white !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
    }

    .recipe-show { color: black !important; }
    .recipe-show .row { display: block !important; }
    .recipe-show aside,
    .recipe-show .col-12.col-lg-8,
    .recipe-show .col-12.col-lg-4 {
        max-width: 100% !important;
        flex: 0 0 100% !important;
        width: 100% !important;
        padding: 0 !important;
    }

    .meta-card { margin-top: .8rem !important; }
    .meta-card h3 {
        font-size: 11pt;
        color: black !important;
        text-transform: uppercase;
        letter-spacing: .08em;
        margin: 0 0 .35rem;
        border-bottom: 1px solid #333;
        padding-bottom: .15rem;
    }
    .meta-card dl { gap: .15rem .8rem; }
    .meta-card dt { color: #555 !important; }

    .ingredients-list li {
        padding: .2rem 0 !important;
        border-bottom: 0 !important;
        cursor: default;
        opacity: 1 !important;
        color: black !important;
        text-decoration: none !important;
    }
    .ingredients-list li::before { content: "□  "; }   /* checkbox so you can tick while cooking */

    .instructions-list { padding-left: 0; }
    .instructions-list li {
        margin: 0 0 .5rem !important;
        padding: 0 0 0 1.6rem !important;
        page-break-inside: avoid;
        color: black !important;
    }
    .instructions-list li::before {
        background: none !important;
        color: black !important;
        font-weight: 800;
        left: 0; top: 0;
        width: auto; height: auto;
        font-size: 11pt;
        content: counter(step) ".";
    }

    h1, h2, h3, .page-title, .recipe-hero-title { color: black !important; }
    h3.mt-4 {
        margin-top: 1rem !important;
        font-size: 13pt;
        border-bottom: 1px solid #333;
        padding-bottom: .15rem;
        text-transform: uppercase;
        letter-spacing: .06em;
    }

    .lead { font-size: 11pt; font-style: italic; color: #333 !important; }

    /* Don't break in the middle of a step or the vitals block */
    .meta-card, .instructions-list li { page-break-inside: avoid; }

    /* Link URLs spelled out (only for external links) */
    a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
