/* ══════════════════════════════════════════
   Barbaro — Shared Styles
   probe-late
   Common CSS used across all pages:
   index.html, menu.html, build.html,
   dough.html, about.html
   ══════════════════════════════════════════ */

/* ── Reset ── */
*,*::before,*::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Browser hidden must win over component display rules. Several shared
   controls are toggled with the hidden attribute, so keep them out of both
   layout and the tab order even when a component class sets display:flex. */
[hidden] { display: none !important; }

/* ── Design tokens ──
   High-use: --cream, --ink, --rust, --rust-muted, --stone, --stone-light, --sand, --section-bg, --card-bg, --card-border
   Low-use (kept for consistency): --text-secondary, --divider-light, --subtitle-text, --body-text */
:root {
    color-scheme: light;
    --font-wordmark: "Italiana", Georgia, serif;
    --font-brand: "Newsreader", Georgia, serif;
    --font-app: "Manrope", system-ui, sans-serif;
    --font-prose: "Lora", Georgia, serif;
    --font-display: var(--font-brand);
    --cream: #f1e9d4;
    --ink: #2a2521;
    --rust: #a0522d;
    --rust-muted: #b5714d;
    --rust-hover: #8b4726;
    --danger: #b94431;
    --danger-hover: #a13a2a;
    --visibility-community: #7a6a2c;
    --visibility-unlisted: #777;
    --stone: #7d7268;
    --stone-light: #a69e94;
    --sand: #e8e0cc;
--section-bg: #e8e0cc;
--card-bg: #f9f6ef;
--surface-band: #efe6d3;
--paper: var(--card-bg);
    --card-border: rgba(0,0,0,.06);
    --text-secondary: #5c554d;
    --divider-light: #c9c1b5;
    --subtitle-text: #948b80;
    --body-text: #3F3A34;
    --row-card-border: rgba(60, 42, 30, 0.08);
    --row-card-shadow: 0 1px 2px rgba(60, 42, 30, 0.04), 0 4px 12px -6px rgba(60, 42, 30, 0.06);
    --row-card-shadow-hover: 0 2px 4px rgba(60, 42, 30, 0.06), 0 10px 20px -12px rgba(60, 42, 30, 0.14);
    --motion-duration-base: 600ms;
    --motion-duration-fast: 100ms;
    --motion-easing-base: cubic-bezier(0.22, 1, 0.36, 1);
    --motion-easing-press: cubic-bezier(0.2, 0, 0, 1);
    --focus-ring: 0 0 0 2px var(--cream), 0 0 0 4px var(--rust);
    --hover-lift: translateY(-2px);
    --hover-lift-card: translateY(-4px);
    --hover-shadow: 0 8px 18px rgba(160, 82, 45, .12), 0 18px 34px -24px rgba(60, 42, 30, .28);
    --active-press: translateY(1px);
    --active-press-shadow: inset 0 2px 4px rgba(60, 42, 30, .22);
    --transition-state: 200ms ease;
    --transition-press: 100ms ease;
    --card-radius: 8px;
    --dark-zone: #211915;
    --fire-zone: #b44f27;
    --flour-zone: #f9f6ef;
    --footer-page-gutter: 44px;
    --page-content-top-gap: 28px;
    --header-dropdown-width: 240px;
    --sticky-nav-height: 111px;
}

.canonical-data-name {
    font-family: var(--font-app);
    letter-spacing: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--sticky-nav-height, 111px) + 16px);
}

:target {
    scroll-margin-top: 16px;
}

/* ── Screen-reader only (accessible <h1>) ── */
.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;
}

/* Skip link (a11y)
   Hidden until keyboard focus, then floats over everything so
   keyboard users can jump past the sticky-nav row to main content.
   Each page wires its own href target (the role="main" container). */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
    position: fixed;
    left: 12px;
    top: 12px;
    width: auto;
    min-width: 44px;
    height: auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--rust);
    color: var(--cream);
    padding: 10px 18px;
    border-radius: 8px;
    z-index: 10000;
    text-decoration: none;
    font-family: var(--font-app);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(160,82,45,.26), var(--focus-ring);
    outline: 0;
}

:where(a, button, input, textarea, select, summary, [role="button"], [tabindex]:not([tabindex="-1"])):focus-visible {
    outline: 0 !important;
    box-shadow: var(--focus-ring) !important;
}

:where(input, textarea, select):focus-visible {
    border-color: var(--rust-muted) !important;
}
/* Suppress focus ring on the main content target itself: tabindex="-1"
   makes it programmatically focusable for the skip-link, but we don't
   want a visible ring around the whole content area. */
[id="main-content"]:focus,
[id^="lib-root"]:focus,
[id^="acct-root"]:focus,
[id^="lineup-root"]:focus,
[id^="pizza-root"]:focus,
[id^="doc-editor-frame"]:focus,
[id^="adm-root"]:focus,
[id^="exp-main"]:focus { outline: none; }

body {
    font-family: var(--font-app);
    background-color: var(--cream);
    color: var(--ink);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .055;
    mix-blend-mode: multiply;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(60,42,30,.22) 0 1px, transparent 1.5px),
        radial-gradient(circle at 70% 65%, rgba(60,42,30,.18) 0 .8px, transparent 1.4px),
        linear-gradient(115deg, rgba(255,255,255,.28), rgba(60,42,30,.08));
    background-size: 18px 18px, 23px 23px, 100% 100%;
}

body > * {
    position: relative;
    z-index: 1;
}

html[data-qa-polish-zoom="200"] body {
    width: 50%;
    max-width: 50%;
    overflow-x: hidden;
}

html[data-qa-polish-zoom="200"] .container,
html[data-qa-polish-zoom="200"] .le-shell,
html[data-qa-polish-zoom="200"] .pizza-page {
    max-width: 100%;
}

html[data-qa-polish-zoom="200"] .site-nav {
    display: none;
}

html[data-qa-polish-zoom="200"] .nav-mobile-toggle {
    display: inline-flex;
}

html[data-qa-polish-zoom="200"] .page-hero-actions,
html[data-qa-polish-zoom="200"] .doc-editor-actions {
    flex-wrap: wrap;
}

.brb-image-fallback {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 100%;
    aspect-ratio: 1 / 1;
    padding: 14px;
    background:
        radial-gradient(circle at 50% 45%, rgba(160,82,45,.10) 0 34%, transparent 35%),
        linear-gradient(135deg, rgba(249,246,239,.95), var(--sand));
    color: var(--rust);
    font-family: var(--font-app);
    font-size: clamp(18px, 6vw, 30px);
    font-weight: 400;
    line-height: 1.05;
    text-align: center;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.brb-image-fallback::before {
    content: "";
    display: block;
    width: min(54px, 42%);
    aspect-ratio: 1;
    margin: 0 auto 8px;
    background: url("images/barbaro/barbaro-mark.png") center / contain no-repeat;
    opacity: .18;
}

.brb-monogram-tile {
    container-type: size;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    min-height: 100%;
    padding: 0;
    background:
        linear-gradient(135deg, rgba(160,82,45,.14), rgba(160,82,45,.035)),
        repeating-linear-gradient(45deg, rgba(255,255,255,.28) 0 8px, rgba(255,255,255,0) 8px 16px),
        var(--sand);
    color: var(--rust);
    font-family: var(--font-app);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
}

.brb-monogram-tile::before {
    content: attr(data-initial);
    /* Scale the monogram to the tile (cqmin), so 2-letter initials
       always fit and stay centered regardless of tile size or viewport. */
    font-size: 38cqmin;
}

.brb-monogram-tile[hidden] {
    display: none !important;
}

.row-card {
    background: var(--cream);
    border: 1px solid var(--row-card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--row-card-shadow);
    transition: transform var(--transition-state), background var(--transition-state), border-color var(--transition-state), box-shadow var(--transition-state);
}

.row-card:hover {
    border-color: rgba(160, 82, 45, .26);
    box-shadow: var(--hover-shadow);
}

.reveal,
.state-card,
.doc-editor-summary-drawer-frame,
.save-row,
.row-card {
    transition-timing-function: var(--motion-easing-base);
}

.reveal {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity var(--motion-duration-base) var(--motion-easing-base),
                transform var(--motion-duration-base) var(--motion-easing-base);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

a:active,
button:active,
.cta-pill:active,
.state-cta:active {
    transform: var(--active-press);
    transition-duration: var(--transition-press);
    transition-timing-function: var(--motion-easing-press);
}

.eyebrow,
.section-eyebrow,
.lib-section-title,
.save-row-eyebrow,
.ticket-section-label,
.cap-section-label,
.print-section-label,
.section-break-label,
.flour-blend-title,
.fb-head,
.le-items-title,
.le-chapter-divider,
.le-item-section-input,
.m6-chapter,
.pizza-build .cap-section-label {
    letter-spacing: 0.05em;
}

:is(.hero-title, .doc-editor-craft-strip, .page-hero-title, .exp-shelf-title) em {
    position: relative;
    display: inline-block;
    font-family: var(--font-brand);
    font-style: italic;
}

:is(.hero-title, .doc-editor-craft-strip, .page-hero-title, .exp-shelf-title) em::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -.09em;
    height: .08em;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(160, 82, 45, .18), rgba(160, 82, 45, .72), rgba(160, 82, 45, .24));
    transform: scaleX(0);
    transform-origin: left;
    animation: accentUnderlineDraw 600ms ease .35s forwards;
}

@keyframes accentUnderlineDraw {
    to { transform: scaleX(1); }
}

/* Preload state — applied via class="preload" on <body> in HTML, removed
   by JS after init. Suppresses transitions and animations during the
   first render so state-driven UI (save button enabled/disabled, title
   input hover/edit shading, eyebrow text fade-in, etc.) snaps into
   place instead of flickering through transitional states as the page
   hydrates from localStorage / library cache. */
body.preload,
body.preload *,
body.preload *::before,
body.preload *::after {
    transition: none !important;
    animation-duration: 0s !important;
    animation-delay: 0s !important;
}

/* ── Top bar: logo + nav ── */
.top-bar {
    max-width: 1060px;
    margin: 0 auto;
    padding: 12px 44px 4px;
    display: flex;
    align-items: center;
    gap: 28px;
    animation: fadeIn .6s ease-out;
}
/* Legacy .logo class (kept for backward compat, prefer .logo-wrap) */
.top-bar .logo { width: 128px; height: auto; flex-shrink: 0; }
.logo-wrap {
    width: auto;
    height: 94.72px;
    flex-shrink: 0;
    padding-bottom: 2.74px;
}
.logo-wrap img {
    width: auto;
    height: 100%;
    display: block;
}
.site-nav {
    display: flex;
    gap: 28px;
}
.site-nav a {
    position: relative;
    font-family: var(--font-app);
    font-size: 13px;
    font-weight: 600;
    color: var(--stone);
    text-decoration: none;
    letter-spacing: 0;
    text-transform: none;
    /* D-14 — bump tap target to ~32px tall on desktop (was 22). The
       active-state underline still hugs the text via padding-bottom:2 +
       border-bottom:1.5; padding-top:8 + padding-bottom:8 lift the click
       region. Mobile density is tightened again inside the hamburger
       dropdown at <=640. */
    padding: 8px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1.5px solid transparent;
    transition: color var(--transition-state), border-color var(--transition-state);
}
.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 3px;
    height: 1.5px;
    background: var(--rust);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-state);
}
.site-nav a:hover { color: var(--rust); border-bottom-color: transparent; }
.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a.active::after { transform: scaleX(1); }
.site-nav a:focus-visible { color: var(--rust); border-bottom-color: transparent; border-radius: 2px; }
.site-nav a.active { color: var(--rust); border-bottom-color: transparent; }

/* ── Sticky Nav ── */
.sticky-nav-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgb(241, 233, 212);
    transition: box-shadow 0.3s ease;
}
.sticky-nav-wrapper.scrolled {
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

/* ── Container ── */
.container { max-width: 1060px; margin: 0 auto; padding: var(--page-content-top-gap) 44px 50px; }

/* ── Ribbon (header + footer) ── */
.ribbon-glass {
    padding: 6px;
    background: rgba(232,224,204,.5);
    backdrop-filter: blur(12px) saturate(1.1);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
    border: 1px solid rgba(0,0,0,.05);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.04);
    margin-bottom: 20px;
}
.photo-strip {
    display: flex; gap: 4px; height: 140px;
    overflow: hidden; border-radius: 8px;
}
.photo-strip img {
    flex: 1; object-fit: cover; min-width: 0; height: 100%;
    aspect-ratio: 4 / 3;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* ── Intro box (shared across pages) ── */
.intro-box {
    background: var(--section-bg);
    border-radius: 12px;
    padding: 20px 28px;
    margin-bottom: 20px;
    animation: fadeDown .6s ease-out;
}
.intro-box p {
    font-family: var(--font-prose);
    font-size: 15px;
    line-height: 1.7; color: var(--text-secondary);
}
.intro-box p + p { margin-top: 10px; }

/* ── Footer ── */
.footer {
    position: relative;
    width: min(100%, calc(100vw - (var(--footer-page-gutter) * 2)), 972px);
    padding: 30px 0 34px;
    text-align: center;
    margin: 72px auto 0;
    background: transparent;
    color: var(--ink);
    border-top: 1px solid rgba(160, 82, 45, .24);
    border-radius: 0;
}
.footer::before {
    content: none;
}
.footer-divider {
    display: none;
}
.footer-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-bottom: 10px;
}
.footer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--rust);
    border-radius: 50%;
    transition: color .3s ease, transform .3s ease;
}
.footer-icon:hover { color: var(--ink); transform: translateY(-1px); }
.footer-icon:focus-visible { color: var(--ink); outline: 2px solid var(--rust); outline-offset: 2px; }
.footer-icon svg { width: 28px; height: 28px; }
.footer-credit { font-family: var(--font-app); font-size: 13px; color: var(--rust); margin-top: 0; letter-spacing: 1px; }

@media (forced-colors: active), (prefers-contrast: high), (prefers-contrast: more) {
    body,
    .container,
    .top-bar,
    .sticky-nav-wrapper,
    .footer,
    .footer::before,
    .cta-pill,
    .cta-link,
    .nav-avatar,
    .nav-saved-link,
    .acct-menu,
    .acct-menu-item,
    .acct-menu-cta,
    input,
    textarea,
    select,
    button {
        background: Canvas;
        color: CanvasText;
        border-color: ButtonBorder;
        box-shadow: none;
    }

    a,
    .site-nav a,
    .footer-icon,
    .cta-link,
    .cta-pill,
    .nav-saved-link {
        color: LinkText;
    }

    button,
    .cta-pill,
    .acct-menu-cta,
    input[type="button"],
    input[type="submit"] {
        background: ButtonFace;
        color: ButtonText;
        border: 1px solid ButtonBorder;
    }

    button:focus-visible,
    a:focus-visible,
    input:focus-visible,
    textarea:focus-visible,
    select:focus-visible {
        outline: 2px solid Highlight;
        outline-offset: 2px;
    }

    .logo-wrap img,
    img[src*="logo"],
    img[src*="mark"],
    img[src*="gate"],
    .goat-mark,
    .wordmark {
        forced-color-adjust: none;
    }
}

:root[data-qa-media-emulation="high-contrast"] body,
:root[data-qa-media-emulation="high-contrast"] .container,
:root[data-qa-media-emulation="high-contrast"] .top-bar,
:root[data-qa-media-emulation="high-contrast"] .sticky-nav-wrapper,
:root[data-qa-media-emulation="high-contrast"] .footer,
:root[data-qa-media-emulation="high-contrast"] .footer::before,
:root[data-qa-media-emulation="high-contrast"] .cta-pill,
:root[data-qa-media-emulation="high-contrast"] .cta-link,
:root[data-qa-media-emulation="high-contrast"] .nav-avatar,
:root[data-qa-media-emulation="high-contrast"] .nav-saved-link,
:root[data-qa-media-emulation="high-contrast"] .acct-menu,
:root[data-qa-media-emulation="high-contrast"] .acct-menu-item,
:root[data-qa-media-emulation="high-contrast"] .acct-menu-cta,
:root[data-qa-media-emulation="high-contrast"] input,
:root[data-qa-media-emulation="high-contrast"] textarea,
:root[data-qa-media-emulation="high-contrast"] select,
:root[data-qa-media-emulation="high-contrast"] button {
    background: Canvas !important;
    color: CanvasText !important;
    border-color: ButtonBorder !important;
    box-shadow: none !important;
}

:root[data-qa-media-emulation="high-contrast"] a,
:root[data-qa-media-emulation="high-contrast"] .site-nav a,
:root[data-qa-media-emulation="high-contrast"] .footer-icon,
:root[data-qa-media-emulation="high-contrast"] .cta-link,
:root[data-qa-media-emulation="high-contrast"] .cta-pill,
:root[data-qa-media-emulation="high-contrast"] .nav-saved-link {
    color: LinkText !important;
}

:root[data-qa-media-emulation="high-contrast"] button,
:root[data-qa-media-emulation="high-contrast"] .cta-pill,
:root[data-qa-media-emulation="high-contrast"] .acct-menu-cta,
:root[data-qa-media-emulation="high-contrast"] input[type="button"],
:root[data-qa-media-emulation="high-contrast"] input[type="submit"] {
    background: ButtonFace !important;
    color: ButtonText !important;
    border: 1px solid ButtonBorder !important;
}

:root[data-qa-media-emulation="high-contrast"] button:focus-visible,
:root[data-qa-media-emulation="high-contrast"] a:focus-visible,
:root[data-qa-media-emulation="high-contrast"] input:focus-visible,
:root[data-qa-media-emulation="high-contrast"] textarea:focus-visible,
:root[data-qa-media-emulation="high-contrast"] select:focus-visible {
    outline: 2px solid Highlight !important;
    outline-offset: 2px;
}

:root[data-qa-media-emulation="high-contrast"] .logo-wrap img,
:root[data-qa-media-emulation="high-contrast"] img[src*="logo"],
:root[data-qa-media-emulation="high-contrast"] img[src*="mark"],
:root[data-qa-media-emulation="high-contrast"] img[src*="gate"],
:root[data-qa-media-emulation="high-contrast"] .goat-mark,
:root[data-qa-media-emulation="high-contrast"] .wordmark {
    forced-color-adjust: none;
}

/* ── Shared CTA link ── */
.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    font-family: var(--font-app);
    font-size: 13px;
    font-weight: 600;
    color: var(--rust);
    text-decoration-line: underline;
    text-decoration-color: rgba(160, 82, 45, .3);
    text-decoration-thickness: 1.5px;
    text-underline-offset: .24em;
    letter-spacing: .5px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: text-decoration-color .3s ease, gap .3s ease;
}
.cta-link:hover,
.cta-link:focus-visible {
    text-decoration-color: var(--rust);
    gap: 10px;
}
.cta-link--continuous {
    text-decoration: none;
}
.cta-link--continuous .cta-link-label {
    text-decoration-line: underline;
    text-decoration-color: rgba(160, 82, 45, .3);
    text-decoration-thickness: 1.5px;
    text-underline-offset: .24em;
    transition: text-decoration-color .3s ease;
}
.cta-link--continuous:hover .cta-link-label,
.cta-link--continuous:focus-visible .cta-link-label {
    text-decoration-color: var(--rust);
}
.cta-link svg {
    width: 14px;
    height: 14px;
    transition: transform .3s ease;
}
.cta-link:hover svg,
.cta-link:focus-visible svg { transform: translateX(2px); }

/* ── Elevated CTA — ghost pill (used sparingly for primary interactive features) ── */
.cta-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-app);
    font-size: 12px;
    font-weight: 700;
    color: var(--rust);
    text-decoration: none;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    white-space: nowrap;
    border: 1.5px solid rgba(160, 82, 45, .35);
    border-radius: 100px;
    padding: 8px 20px;
    min-height: 44px;
    background: transparent;
    transition: transform var(--transition-state), border-color var(--transition-state), background var(--transition-state), color var(--transition-state), box-shadow var(--transition-state), gap var(--transition-state);
}
.cta-pill:hover,
.cta-pill:focus-visible {
    border-color: var(--rust);
    background: rgba(160, 82, 45, .06);
    gap: 11px;
}
.cta-pill.primary {
    background: var(--rust);
    border-color: var(--rust);
    color: var(--card-bg);
}
.cta-pill.primary:hover,
.cta-pill.primary:focus-visible {
    background: var(--rust-hover);
    border-color: var(--rust-hover);
    color: var(--card-bg);
    transform: var(--hover-lift);
    box-shadow: 0 10px 18px -16px rgba(60, 42, 30, .35);
}
.cta-pill.primary:active {
    transform: var(--active-press);
    box-shadow: var(--active-press-shadow);
}
.cta-pill svg {
    width: 14px;
    height: 14px;
    transition: transform .3s ease;
}
.cta-pill:hover svg,
.cta-pill:focus-visible svg { transform: translateX(2px); }

/* ── Keyframes ── */
@keyframes fadeIn  { from { opacity:0 } to { opacity:1 } }
@keyframes fadeDown { from { opacity:0; transform:translateY(-18px) } to { opacity:1; transform:translateY(0) } }
@keyframes riseIn  { from { opacity:0; transform:translateY(20px) } to { opacity:1; transform:translateY(0) } }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    :root {
        --hover-lift: translateY(0);
        --hover-lift-card: translateY(0);
        --active-press: translateY(0);
        --transition-state: 0ms ease;
        --transition-press: 0ms ease;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    :is(.hero-title, .doc-editor-craft-strip, .page-hero-title, .exp-shelf-title) em::after {
        animation: none !important;
        transform: scaleX(1);
    }
}

@media (hover: hover) and (pointer: fine) {
    :is(.row-card, .card, .home-lineup-card, .discovery-card, .oven-card, .pizza-card:has(.pizza-card-link), .pm-card, .exp-lu-card, .exp-pz-card, .exp-cu-card, .save-row, .acct-stat-tile):hover {
        transform: var(--hover-lift-card) !important;
        border-color: rgba(160, 82, 45, .26);
        box-shadow: var(--hover-shadow) !important;
    }

    :is(.btn-primary, .state-cta:not(.secondary), .doc-editor-save-btn:not(.is-clean):not(:disabled), .pizza-action.primary, .leave-prompt-btn.primary, .acct-menu-cta):hover {
        background: var(--rust-hover);
        border-color: var(--rust-hover);
        color: var(--card-bg);
        transform: var(--hover-lift) !important;
    }

    .btn-danger:hover {
        background: var(--danger-hover);
        border-color: var(--danger-hover);
        color: var(--card-bg);
        transform: var(--hover-lift) !important;
    }

    :is(.btn-ghost, .state-cta.secondary, .pizza-action.secondary, .m6-sec-btn, .lib-section-head-action):hover {
        background: rgba(249, 246, 239, .74);
        border-color: rgba(160, 82, 45, .32);
        color: var(--rust);
    }

    :is(.lib-tab:not(.active), .lib-filter-chip:not(.is-active), .chip, .dough-preset-chip, .doc-editor-picker-tab:not(.is-active), .build-pizza-vis-chip, .doc-editor-meta-vis):hover {
        background: rgba(249, 246, 239, .78);
        border-color: rgba(160, 82, 45, .30);
        color: var(--rust);
    }
}

:is(.btn-primary, .btn-danger, .state-cta:not(.secondary), .doc-editor-save-btn:not(.is-clean):not(:disabled), .pizza-action.primary, .leave-prompt-btn.primary, .acct-menu-cta):active {
    transform: var(--active-press);
    box-shadow: var(--active-press-shadow);
}

:is(.btn-ghost, .state-cta.secondary, .pizza-action.secondary, .m6-sec-btn, .lib-section-head-action, .doc-editor-icon-btn, .nav-icon-btn, .nav-avatar, .save-row-act-ghost, .modal-close-x, .doc-editor-summary-drawer-close, .doc-editor-picker-close):active {
    transform: var(--active-press);
    box-shadow: var(--active-press-shadow);
}

@media (hover: none), (pointer: coarse) {
    :is(.row-card, .card, .home-lineup-card, .discovery-card, .oven-card, .pizza-card:has(.pizza-card-link), .pm-card, .exp-lu-card, .exp-pz-card, .exp-cu-card, .save-row, .acct-stat-tile):active {
        transform: scale(.98) !important;
        box-shadow: 0 3px 10px rgba(60, 42, 30, .08) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    :is(.row-card, .card, .home-lineup-card, .discovery-card, .oven-card, .pizza-card:has(.pizza-card-link), .pm-card, .exp-lu-card, .exp-pz-card, .exp-cu-card, .save-row, .acct-stat-tile):hover,
    :is(.row-card, .card, .home-lineup-card, .discovery-card, .oven-card, .pizza-card:has(.pizza-card-link), .pm-card, .exp-lu-card, .exp-pz-card, .exp-cu-card, .save-row, .acct-stat-tile):active,
    :is(a, button, .cta-pill, .state-cta):active {
        transform: none !important;
    }
}

/* ── Shared print ── */
@media print {
    body { background: #fff; }
    .top-bar, .site-nav, .footer-icons, .footer-divider { display: none !important; }
    .ribbon-glass { box-shadow: none; border: 1px solid #ddd; }
    .photo-strip img { break-inside: avoid; }
    .intro-box { background: var(--section-bg); print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .footer-credit { font-size: 11px; color: #888; }
}

/* ── Shared tablet ── */
@media (max-width: 1020px) {
    :root {
        --footer-page-gutter: 28px;
        --page-content-top-gap: 24px;
        --sticky-nav-height: 92px;
    }
    .top-bar { padding: 10px 28px 4px; gap: 22px; }
    .top-bar .logo { width: 110px; }
    .logo-wrap { height: 77.51px; padding-bottom: 2.26px; }
    .container { padding: var(--page-content-top-gap) 28px 40px; }
    .photo-strip { height: 120px; }
}

@media (max-width: 920px) {
    :root {
        --sticky-nav-height: 66px;
    }
    .logo-wrap { height: 52px; padding-bottom: 2.26px; }
}

@media (min-width: 1021px) {
    .site-nav {
        gap: 24px;
    }
    .nav-saved-link {
        display: none;
    }
}

/* ── Shared narrow-tablet ──
   Intermediate step between the 1020 tablet logo (110/90) and the 640
   phone logo (76/72). Without this the logo collapses ~30% in a single
   resize step, which reads as a jarring crop. 90/80 at 768 lines up with
   the shared document-editor mobile breakpoint so logo and title bar shift
   together. */
@media (max-width: 768px) {
    :root {
        --footer-page-gutter: 22px;
        --page-content-top-gap: 22px;
        --sticky-nav-height: 49px;
    }
    .top-bar { padding: 9px 22px 4px; gap: 18px; }
    .top-bar .logo { width: 92px; }
    .logo-wrap { height: 36px; padding-bottom: 1.99px; }
    .container { padding: var(--page-content-top-gap) 22px 36px; }
    .photo-strip { height: 105px; }
}

/* ── Shared mobile ── */
@media (max-width: 640px) {
    :root {
        --footer-page-gutter: 16px;
        --page-content-top-gap: 18px;
        --sticky-nav-height: calc(max(44px, clamp(42.2px, 11.5vw, 61.99px)) + 12px);
    }
    .top-bar { padding: 8px 16px 4px; gap: 10px; }
    .top-bar .logo { width: 76px; }
    .logo-wrap { height: clamp(42.2px, 11.5vw, 61.99px); padding-bottom: 1.79px; }
    .site-nav { gap: 14px; }
    .site-nav a { font-size: 12px; letter-spacing: .8px; }
    .container { padding: var(--page-content-top-gap) 16px 32px; }
    .photo-strip { height: 90px; }
.photo-strip img { aspect-ratio: unset; -webkit-backface-visibility: hidden; }

    .intro-box { padding: 16px 18px; }
    .intro-box p { font-size: 14px; }

    /* Right side: hide the "Library" word so only the icon + count badge
       remain. Compact the guest "Sign in" pill so the row fits 390px.
       Library / count and avatar stay touch-targets. */
    .nav-account { gap: 10px; }
    .nav-saved-link span:not(.saved-count) { display: none; }
    .nav-saved-link svg { width: 18px; height: 18px; }
    .nav-saved-link .saved-count { margin-left: 0; }
    .nav-avatar.guest {
        padding: 0 10px;
        font-size: 10px;
        letter-spacing: .6px;
        height: 28px;
    }
    .nav-avatar { width: 30px; height: 30px; font-size: 12px; }
}

/* ══════════════════════════════════════════
   Library / Account additions to the top bar
   Adds a "Saved" link with count badge and an
   avatar dropdown to the existing nav, without
   shifting the layout on pages that don't use them.
   ══════════════════════════════════════════ */
.top-bar { position: relative; }
.nav-account {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    margin-left: auto;
    position: relative;
}
.nav-saved-link {
    position: relative;
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: var(--stone);
    text-decoration: none;
    padding: 0;
    border: none;
    background: rgba(249,246,239,.32);
    border-radius: 50%;
    transition: color .2s ease, background .2s ease, transform .2s ease;
    cursor: pointer;
}
.nav-saved-link.is-visible { display: inline-flex; }
.nav-saved-link:hover,
.nav-saved-link:focus-visible,
.nav-saved-link.active,
.nav-saved-link[aria-expanded="true"] {
    color: var(--rust);
    background: rgba(160,82,45,.08);
    transform: translateY(-1px);
}
.nav-saved-link:focus-visible {
    outline: 2px solid var(--rust);
    outline-offset: 2px;
}
.nav-saved-link .nav-saved-text { display: none; }
.nav-library-glyph,
.nav-saved-link svg {
    width: 24px;
    height: 24px;
    display: block;
}
.nav-saved-link .saved-count {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 10px;
    height: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    background: var(--rust);
    color: var(--card-bg);
    border-radius: 10px;
    padding: 0 3px;
    letter-spacing: 0;
    line-height: 1;
    box-shadow: 0 0 0 2px rgb(241, 233, 212), 0 1px 2px rgba(0,0,0,.12);
    transform-origin: center;
}
.site-nav .nav-mobile-library-entry .saved-count {
    min-width: 10px;
    height: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    background: var(--rust);
    color: var(--card-bg);
    border-radius: 10px;
    padding: 0 3px;
    letter-spacing: 0;
    line-height: 1;
    box-shadow: 0 0 0 2px rgb(241, 233, 212), 0 1px 2px rgba(0,0,0,.12);
    transform-origin: center;
}
.nav-saved-link .saved-count.is-wide {
    min-width: 17px;
    height: 12px;
    right: -3px;
}
.site-nav .nav-mobile-library-entry .saved-count.is-wide {
    min-width: 17px;
    height: 12px;
}
.nav-saved-link .saved-count[hidden],
.site-nav .nav-mobile-library-entry .saved-count[hidden] { display: none; }
.nav-saved-link .saved-count.badge-pop,
.site-nav .nav-mobile-library-entry .saved-count.badge-pop {
    animation: libraryBadgePop .2s ease-out;
}
.site-nav .nav-mobile-library-entry {
    display: none;
}
@keyframes libraryBadgePop {
    0% { transform: scale(1); }
    55% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--rust);
    color: var(--cream);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-app);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .3px;
    cursor: pointer;
    border: 1px solid var(--rust);
    transition: transform .2s ease, box-shadow .2s ease;
}
.nav-avatar:hover { transform: scale(1.04); box-shadow: 0 4px 12px rgba(160,82,45,.12); }
.nav-avatar[aria-expanded="true"] { background: var(--rust-hover); }
.nav-avatar.guest {
    background: transparent;
    color: var(--stone);
    border: 1.5px solid rgba(0,0,0,.12);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 0 14px;
    width: auto;
    height: 32px;
    border-radius: 100px;
}
.nav-avatar.guest:hover { color: var(--rust); border-color: var(--rust-muted); }

/* ── Account dropdown card ── */
.acct-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: 0 12px 36px rgba(0,0,0,.12);
    width: var(--header-dropdown-width);
    min-width: var(--header-dropdown-width);
    padding: 6px 0;
    z-index: 1500;
    animation: menuPop var(--motion-duration-base) var(--motion-easing-base);
}
@keyframes menuPop {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.acct-menu-header {
    padding: 10px 16px 16px;
    margin-bottom: 2px;
}
.acct-menu-name {
    font-family: var(--font-app);
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
}
.acct-menu-eyebrow {
    font-family: var(--font-app);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--stone-light);
    margin-bottom: 5px;
}
.acct-menu-email {
    font-family: var(--font-app);
    font-size: 12px;
    color: var(--stone);
    margin-top: 2px;
    overflow-wrap: anywhere;
    text-decoration: none;
    border-bottom: 0;
}
.acct-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 8px 16px;
    font-family: var(--font-app);
    font-size: 13px;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    transition: background .15s;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}
.acct-menu-item:hover { background: rgba(232,224,204,.4); color: var(--rust); }
.acct-menu-item svg { width: 14px; height: 14px; color: var(--stone); flex-shrink: 0; }
.acct-menu-item:hover svg { color: var(--rust); }
.acct-menu-item-signout { margin-top: 10px; }
.acct-menu-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    margin: 6px 10px 4px;
    padding: 8px 12px;
    background: var(--rust);
    color: var(--card-bg);
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    border: none;
    width: calc(100% - 20px);
    font-family: var(--font-app);
}
.acct-menu-cta:hover { background: var(--rust-hover); }

/* Library peek */
.library-peek {
    position: absolute;
    top: calc(100% + 8px);
    right: 48px;
    width: min(360px, calc(100vw - 28px));
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: 0 18px 44px rgba(60,42,30,.16);
    padding: 14px;
    z-index: 1500;
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity .15s ease-out, transform .15s ease-out;
}
.library-peek.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.library-peek-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
    font-family: var(--font-app);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--rust);
}
.library-peek-count {
    color: var(--stone-light);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
}
.library-peek-search { margin-bottom: 10px; }
.library-peek-search input {
    width: 100%;
    min-height: 38px;
    border: 1px solid rgba(60,42,30,.1);
    border-radius: 999px;
    background: rgba(249,246,239,.72);
    color: var(--ink);
    font-family: var(--font-app);
    font-size: 13px;
    padding: 0 14px;
}
.library-peek-search input:focus-visible {
    outline: 2px solid var(--rust);
    outline-offset: 2px;
}
.library-peek-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 286px;
    overflow-y: auto;
}
.library-peek-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 7px;
    color: var(--ink);
    text-decoration: none;
    border-radius: 8px;
}
.library-peek-row:hover,
.library-peek-row:focus-visible {
    background: rgba(232,224,204,.42);
    outline: none;
}
.library-peek-thumb {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: var(--sand);
    color: var(--rust);
    font-family: var(--font-app);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
}
.library-peek-thumb--pizza { border-radius: 50%; }
.library-peek-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.library-peek-copy {
    display: block;
    min-width: 0;
}
.library-peek-title {
    display: block;
    min-width: 0;
    font-family: var(--font-app);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.library-peek-time {
    display: block;
    margin-top: 2px;
    font-family: var(--font-app);
    font-size: 11px;
    color: var(--stone-light);
}
.library-peek-chip {
    align-self: center;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(160,82,45,.08);
    color: var(--rust);
    font-family: var(--font-app);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.library-peek-empty {
    padding: 18px 8px 16px;
    text-align: center;
    color: var(--stone);
    font-family: var(--font-prose);
    font-size: 14px;
    line-height: 1.5;
}
.library-peek-empty-link {
    display: inline-block;
    margin: 0 auto 12px;
    color: var(--rust);
    font-family: var(--font-app);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
}
.library-peek-empty-link:focus-visible {
    outline: 2px solid var(--rust);
    outline-offset: 2px;
}
.library-peek-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    margin-top: 12px;
    border-radius: 8px;
    background: var(--rust);
    color: var(--card-bg);
    font-family: var(--font-app);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
}
.library-peek-cta:hover,
.library-peek-cta:focus-visible {
    background: var(--rust-hover);
    outline: none;
}

/* ── Library / Account responsive ──
   Library now lives in the avatar menu to keep the top nav quiet. The
   legacy top-nav hook stays hidden even when older markup includes it. */
@media (max-width: 880px) {
    .nav-saved-link {
        width: 36px;
        height: 36px;
    }
    .nav-library-glyph,
    .nav-saved-link svg {
        width: 22px;
        height: 22px;
    }
    .library-peek { display: none; }
}
@media (max-width: 640px) {
    .acct-menu {
        position: fixed;
        top: var(--acct-menu-top, 56px);
        left: var(--acct-menu-left, 8px);
        right: auto;
        width: min(var(--header-dropdown-width), calc(100vw - 16px));
        max-width: calc(100vw - 16px);
        max-height: calc(100vh - var(--acct-menu-top, 56px) - 8px);
        max-height: calc(100dvh - var(--acct-menu-top, 56px) - 8px);
        overflow-y: auto;
        min-width: 0;
        z-index: 1600;
    }
    .acct-menu-item,
    .acct-menu-cta {
        min-height: 44px;
    }
}

/* ══════════════════════════════════════════
   Avatar caret, guest pill, on-account state,
   and the new icon button used in the menu nav
   for Print Menu.
   ══════════════════════════════════════════ */
.nav-avatar {
    gap: 4px;
    padding: 0;
}
.nav-avatar:focus-visible {
    outline: 2px solid var(--rust);
    outline-offset: 2px;
}
.nav-avatar .nav-avatar-initials {
    display: inline-flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
}
.nav-avatar .nav-avatar-caret {
    position: absolute;
    bottom: -2px; right: -4px;
    width: 14px; height: 14px;
    background: var(--cream);
    color: var(--ink);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
    transition: transform .2s ease;
}
.nav-avatar .nav-avatar-caret svg { width: 10px; height: 10px; }
.nav-avatar { position: relative; }
.nav-avatar[aria-expanded="true"] .nav-avatar-caret { transform: rotate(180deg); }
.nav-avatar.on-account {
    box-shadow: 0 0 0 2px var(--cream), 0 0 0 4px var(--rust);
}

.nav-avatar.guest {
    background: transparent;
    color: var(--stone);
    border: 1.5px solid rgba(0,0,0,.14);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 0;
    gap: 0;
}
.nav-avatar.guest:hover { color: var(--rust); border-color: var(--rust-muted); background: rgba(160,82,45,.06); }
.nav-avatar.guest[aria-expanded="true"] { color: var(--rust); border-color: var(--rust-muted); background: rgba(160,82,45,.08); }
.nav-avatar.guest .nav-avatar-glyph {
    display: inline-flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
}
.nav-avatar.guest .nav-avatar-glyph svg { width: 18px; height: 18px; }

.nav-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    background: transparent;
    color: var(--stone);
    border: 1.5px solid rgba(0,0,0,.10);
    border-radius: 50%;
    cursor: pointer;
    transition: color .2s, border-color .2s, background .2s;
    padding: 0;
}
.nav-icon-btn:hover { color: var(--rust); border-color: var(--rust-muted); background: rgba(160,82,45,.06); }
.nav-icon-btn:focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; }
.nav-icon-btn svg { width: 16px; height: 16px; }

.nav-saved-link::after {
    display: none;
    content: none;
}

/* Bumped badge contrast: darker rust pill, crisper white. */
.nav-saved-link .saved-count {
    background: #8a4225;
    box-shadow: 0 0 0 2px rgb(241, 233, 212), 0 1px 2px rgba(0,0,0,.12);
}

/* ==========================================
   3e mobile pass - nav cluster fixes that need to come AFTER the
   base .nav-avatar declaration so the mobile rules actually win.
   The original mobile @media (max-width: 640px) block at L309 was
   defined BEFORE the base .nav-avatar rule, so its width/height
   declarations were always overridden. This block restores them
   plus drops the avatar caret and print button on mobile so the
   nav cluster fits within a 390px viewport without horizontal scroll.
   ========================================== */
@media (max-width: 640px) {
    /* 3e mobile pass: nav cluster fixes that need to win source-order */
    .nav-avatar {
        width: 44px;
        height: 44px;
        padding: 4px;
        font-size: 12px;
        background: transparent;
    }
    .nav-avatar .nav-avatar-initials {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--cream);
        color: var(--rust);
        box-shadow: inset 0 0 0 1px rgba(160,82,45,.22);
    }
    .nav-avatar.guest {
        width: 44px;
        height: 44px;
        border: none;
        background: transparent;
    }
    .nav-avatar.guest .nav-avatar-glyph {
        width: 36px;
        height: 36px;
        border: 1.5px solid rgba(0,0,0,.14);
        border-radius: 50%;
    }
    .nav-avatar .nav-avatar-caret { display: none; }
    .nav-icon-btn { display: none; }
    /* 3e wave 2: tighten the top-bar so logo + site-nav + nav-account
       fit within a 390px viewport without forcing horizontal scroll.
       Wave 1 alone left ~13px residual overflow because the inner flex
       gaps and side padding still summed past the viewport width. */
    .top-bar { padding: 8px 12px 4px; gap: 6px; }
    .site-nav { gap: 12px; }
}

/* ════════════════════════════════════════════════════════════════
   D-01 — Mobile nav hamburger toggle.
   The 3e tightening pass (above) trimmed gaps but the 5-link nav +
   logo + nav-account still summed past 390. Real fix: hide site-nav
   inline at <=640, replace with a hamburger toggle (injected by
   brand-apply.js installMobileNav) that opens the nav as a dropdown.
   Above 640 the hamburger is display: none and the nav renders
   inline as before -- desktop layout unchanged.
   ════════════════════════════════════════════════════════════════ */
.nav-mobile-toggle { display: none; }

@media (max-width: 640px) {
    /* Hide the inline site-nav; it returns as a dropdown when .open */
    .site-nav {
        display: none;
        position: fixed;
        top: var(--mobile-nav-top, 56px);
        left: var(--mobile-nav-left, 8px);
        right: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--card-bg);
        border: 1px solid var(--card-border);
        border-radius: var(--card-radius);
        box-shadow: 0 12px 36px rgba(0,0,0,.12);
        padding: 6px 0;
        width: min(var(--header-dropdown-width), calc(100vw - 16px));
        min-width: 0;
        max-width: calc(100vw - 16px);
        max-height: calc(100vh - var(--mobile-nav-top, 56px) - 8px);
        max-height: calc(100dvh - var(--mobile-nav-top, 56px) - 8px);
        overflow-y: auto;
        z-index: 1600;
        animation: menuPop var(--motion-duration-base) var(--motion-easing-base);
    }
    .site-nav.open { display: flex; }
    .site-nav a {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 8px 16px;
        font-size: 13px;
        letter-spacing: 0;
        text-transform: none;
        color: var(--ink);
        border-bottom: none;
    }
    .site-nav a::after {
        display: none;
    }
    .site-nav a:hover,
    .site-nav a:focus-visible {
        color: var(--rust);
        border-bottom-color: transparent;
    }
    .site-nav a:focus-visible {
        outline: 2px solid var(--rust);
        outline-offset: -4px;
        border-radius: 8px;
    }
    .site-nav a.active {
        color: var(--rust);
    }

    /* Hamburger button -- same soft circular container as Library. */
    .nav-mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        background: rgba(249,246,239,.32);
        color: var(--stone);
        border: none;
        border-radius: 50%;
        cursor: pointer;
        flex-shrink: 0;
        transition: background .15s ease, color .15s ease, transform .15s ease;
    }
    .nav-mobile-toggle svg { width: 22px; height: 22px; }
    .nav-mobile-toggle:hover { color: var(--rust); background: rgba(160,82,45,.08); transform: translateY(-1px); }
    .nav-mobile-toggle:focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; }
    .nav-mobile-toggle[aria-expanded="true"] { color: var(--rust); background: rgba(160,82,45,.08); }

    .nav-account { margin-left: auto; gap: 8px; }
    .nav-saved-link {
        width: 44px;
        min-width: 44px;
        height: 44px;
        justify-content: center;
        padding: 0;
        background: rgba(249,246,239,.32);
        border-radius: 50%;
    }
    .nav-saved-link.active {
        background: rgba(249,246,239,.32);
    }
    .site-nav a.nav-mobile-library-entry {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .site-nav a.nav-mobile-library-entry[hidden] { display: none; }

    /* top-bar position relative -- already set above L387, defensive here. */
    .top-bar { position: relative; }
}

@media (prefers-reduced-motion: reduce) {
    .library-peek,
    .nav-saved-link,
    .nav-saved-link .saved-count {
        transition: none;
        animation: none;
    }
}
