:root {
    color-scheme: light;
    --recipe-page: #f5f0e7;
    --recipe-panel: #fffdf8;
    --recipe-panel-raised: #ffffff;
    --recipe-ink: #29251f;
    --recipe-muted: #6f675d;
    --recipe-paper: var(--recipe-panel);
    --recipe-canvas: var(--recipe-page);
    --recipe-border: #ded5c7;
    --recipe-brand: #9e3f2b;
    --recipe-brand-dark: #772c1e;
    --recipe-accent: #2f6b55;
    --recipe-accent-dark: #214d3d;
    --recipe-focus: #1d70b8;
    --recipe-danger: #a83232;
    --recipe-danger-bg: #fbe9e7;
    --recipe-success: #236341;
    --recipe-success-bg: #e5f1e9;
    --recipe-warning: #745300;
    --recipe-warning-bg: #fff3cd;
    --recipe-info: #165a78;
    --recipe-info-bg: #e4f2f8;
    --recipe-link: #8b3524;
    --recipe-control: #ffffff;
    --recipe-control-border: #a69a8b;
    --recipe-selected: #2f6b55;
    --recipe-hover: #eee7dc;
    --recipe-disabled: #d8d3ca;
    --recipe-disabled-text: #59544d;
    --recipe-shell: #2d2720;
    --recipe-shell-text: #f8f4ed;
    --recipe-tooltip: #ffffff;
    --recipe-overlay: rgba(34, 29, 24, .62);
    --recipe-on-action: #ffffff;
    --recipe-radius-sm: 7px;
    --recipe-radius: 12px;
    --recipe-shadow: 0 10px 30px rgba(62, 48, 31, 0.1);
    --recipe-content-width: 1440px;
    --recipe-space-1: 4px;
    --recipe-space-2: 8px;
    --recipe-space-3: 12px;
    --recipe-space-4: 16px;
    --recipe-space-5: 22px;
    --recipe-space-6: 28px;
    --recipe-font: Inter, Aptos, "Segoe UI", Helvetica, Arial, sans-serif;
    --recipe-serif: Georgia, "Times New Roman", serif;
}

html[data-recipe-theme="parchment"] {
    --recipe-page: #eadcc5;
    --recipe-panel: #fbf1dd;
    --recipe-panel-raised: #fff8e9;
    --recipe-ink: #3d2b1f;
    --recipe-muted: #715844;
    --recipe-border: #cbb595;
    --recipe-brand: #8b4b2a;
    --recipe-brand-dark: #61351f;
    --recipe-accent: #93652f;
    --recipe-accent-dark: #68451f;
    --recipe-link: #71391f;
    --recipe-control: #fff8e9;
    --recipe-control-border: #a98d68;
    --recipe-selected: #8b4b2a;
    --recipe-hover: #f0dfc3;
    --recipe-tooltip: #fff8e9;
    --recipe-shell: #493326;
    --recipe-shell-text: #fff8e9;
}

html[data-recipe-theme="slate"] {
    color-scheme: dark;
    --recipe-page: #171b20;
    --recipe-panel: #20262d;
    --recipe-panel-raised: #29313a;
    --recipe-ink: #edf2f6;
    --recipe-muted: #b5c0ca;
    --recipe-border: #46525e;
    --recipe-brand: #326b91;
    --recipe-brand-dark: #a8d0ef;
    --recipe-accent: #3f789f;
    --recipe-accent-dark: #a8d0ef;
    --recipe-focus: #ffd166;
    --recipe-danger: #ffaaa3;
    --recipe-danger-bg: #4a2628;
    --recipe-success: #9dd8b4;
    --recipe-success-bg: #203c2b;
    --recipe-warning: #f6d684;
    --recipe-warning-bg: #493d20;
    --recipe-link: #9ecbf0;
    --recipe-control: #29313a;
    --recipe-control-border: #63717e;
    --recipe-selected: #3f789f;
    --recipe-hover: #333d47;
    --recipe-disabled: #3d444c;
    --recipe-disabled-text: #c4ccd3;
    --recipe-shell: #101419;
    --recipe-shell-text: #f3f7fa;
    --recipe-tooltip: #303944;
    --recipe-info: #a9d7f0;
    --recipe-info-bg: #203747;
    --recipe-overlay: rgba(0, 0, 0, .74);
    --recipe-shadow: 0 10px 30px rgba(0, 0, 0, .32);
}

html[data-recipe-theme="forest"] {
    color-scheme: dark;
    --recipe-page: #10221b;
    --recipe-panel: #173028;
    --recipe-panel-raised: #1d3a30;
    --recipe-ink: #f3ead9;
    --recipe-muted: #c9bda9;
    --recipe-border: #496457;
    --recipe-brand: #8b542c;
    --recipe-brand-dark: #f1bd86;
    --recipe-accent: #477d58;
    --recipe-accent-dark: #b4d5b9;
    --recipe-focus: #ffd166;
    --recipe-danger: #ffb1a6;
    --recipe-danger-bg: #4d2926;
    --recipe-success: #b3ddb8;
    --recipe-success-bg: #20422c;
    --recipe-warning: #f2d88d;
    --recipe-warning-bg: #493f24;
    --recipe-link: #efb982;
    --recipe-control: #1d3a30;
    --recipe-control-border: #668172;
    --recipe-selected: #477d58;
    --recipe-hover: #29483c;
    --recipe-disabled: #40544a;
    --recipe-disabled-text: #d5ccbd;
    --recipe-shell: #0b1914;
    --recipe-shell-text: #f7efdf;
    --recipe-tooltip: #244238;
    --recipe-info: #b7d9df;
    --recipe-info-bg: #183b3b;
    --recipe-overlay: rgba(3, 12, 8, .78);
    --recipe-shadow: 0 10px 30px rgba(0, 0, 0, .34);
}

@media (prefers-color-scheme: dark) {
    html[data-recipe-theme="system"] {
        color-scheme: dark;
        --recipe-page: #171b20;
        --recipe-panel: #20262d;
        --recipe-panel-raised: #29313a;
        --recipe-ink: #edf2f6;
        --recipe-muted: #b5c0ca;
        --recipe-border: #46525e;
        --recipe-brand: #326b91;
        --recipe-brand-dark: #a8d0ef;
        --recipe-accent: #3f789f;
        --recipe-accent-dark: #a8d0ef;
        --recipe-focus: #ffd166;
        --recipe-danger: #ffaaa3;
        --recipe-danger-bg: #4a2628;
        --recipe-success: #9dd8b4;
        --recipe-success-bg: #203c2b;
        --recipe-warning: #f6d684;
        --recipe-warning-bg: #493d20;
        --recipe-link: #9ecbf0;
        --recipe-control: #29313a;
        --recipe-control-border: #63717e;
        --recipe-selected: #3f789f;
        --recipe-hover: #333d47;
        --recipe-disabled: #3d444c;
        --recipe-disabled-text: #a3abb3;
        --recipe-shell: #101419;
        --recipe-shell-text: #f3f7fa;
        --recipe-tooltip: #303944;
        --recipe-info: #a9d7f0;
        --recipe-info-bg: #203747;
        --recipe-overlay: rgba(0, 0, 0, .74);
        --recipe-shadow: 0 10px 30px rgba(0, 0, 0, .32);
    }
}

html { scroll-behavior: smooth; }

body.recipe-app-shell-enabled {
    background: var(--recipe-canvas);
    color: var(--recipe-ink);
    font-family: var(--recipe-font);
}

body.recipe-auth-screen {
    background:
        radial-gradient(circle at 15% 20%, rgba(158, 63, 43, .13), transparent 30%),
        radial-gradient(circle at 85% 80%, rgba(47, 107, 85, .12), transparent 32%),
        var(--recipe-canvas);
    color: var(--recipe-ink);
    font-family: var(--recipe-font);
}

.recipe-auth-screen #top-header,
.recipe-auth-screen #main-header { display: none !important; }
.recipe-auth-screen #page-container { padding-top: 0 !important; }
.recipe-auth-screen .login-card,
.recipe-auth-screen .register-card {
    border: 1px solid var(--recipe-border);
    border-radius: 18px;
    box-shadow: var(--recipe-shadow);
    overflow: hidden;
}
.recipe-auth-screen .login-header,
.recipe-auth-screen .register-header {
    background: linear-gradient(135deg, var(--recipe-brand-dark), var(--recipe-brand));
}
.recipe-auth-screen input:focus,
.recipe-auth-screen button:focus-visible,
.recipe-auth-screen a:focus-visible {
    outline: 3px solid var(--recipe-focus) !important;
    outline-offset: 3px;
}

.recipe-app-shell-enabled #top-header,
.recipe-app-shell-enabled #main-header,
.recipe-app-shell-enabled .et-l--header {
    display: none !important;
}

.recipe-app-shell-enabled #page-container {
    padding-top: 0 !important;
}

/* The legacy ticker injected admin-bar compensation with a more specific
   !important rule. GUI2A replaces that ticker, so remove its reserved space. */
body.recipe-app-shell-enabled.admin-bar #page-container,
body.recipe-app-shell-enabled:not(.admin-bar) #page-container {
    padding-top: 0 !important;
}

.recipe-app-shell-enabled #main-content {
    background: var(--recipe-paper);
    min-height: calc(100vh - 76px);
    /* Prevent the first page wrapper's top margin from collapsing through the
       Divi content container and creating a large empty band below the shell. */
    padding-top: 1px;
}

.recipe-app-shell-enabled #main-content > .container,
.recipe-app-shell-enabled .et_pb_row {
    width: min(94%, var(--recipe-content-width));
}

.recipe-skip-link {
    position: fixed;
    z-index: 100001;
    top: 8px;
    left: 8px;
    padding: 10px 14px;
    background: var(--recipe-panel-raised);
    color: var(--recipe-ink) !important;
    border: 2px solid var(--recipe-focus);
    border-radius: var(--recipe-radius-sm);
    transform: translateY(-160%);
}
.recipe-skip-link:focus { transform: translateY(0); }

.recipe-app-shell {
    position: sticky;
    top: 0;
    z-index: 99999;
    color: #fff;
    background: var(--recipe-shell);
    border-bottom: 3px solid var(--recipe-brand);
    box-shadow: 0 4px 18px rgba(37, 29, 20, 0.18);
}

.admin-bar .recipe-app-shell { top: 32px; }

.recipe-app-shell__bar {
    width: min(96%, var(--recipe-content-width));
    min-height: 72px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
    align-items: center;
    gap: 20px;
}

.recipe-app-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    width: fit-content;
    color: var(--recipe-shell-text) !important;
    text-decoration: none;
}

.recipe-app-brand__mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50% 50% 45% 45%;
    color: #fff8eb;
    background: var(--recipe-brand);
    font: 700 23px/1 var(--recipe-serif);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.18);
}

.recipe-app-brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.recipe-app-brand__text strong { font: 700 20px/1.1 var(--recipe-serif); }
.recipe-app-brand__text small { margin-top: 4px; color: #d9d0c5; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

.recipe-primary-navigation { display: flex; align-items: stretch; gap: 4px; }
.recipe-nav-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
    border-radius: 8px;
    color: var(--recipe-shell-text) !important;
    font-size: 15px;
    font-weight: 650;
    text-decoration: none;
}
.recipe-nav-link:hover { color: #fff !important; background: rgba(255,255,255,.11); }
.recipe-nav-link.is-active { color: #fff !important; background: var(--recipe-brand); }

.recipe-account-menu { position: relative; justify-self: end; }
.recipe-account-menu summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 3px 9px 3px 4px;
    cursor: pointer;
    list-style: none;
    border-radius: 24px;
    color: #fff;
}
.recipe-account-menu summary::-webkit-details-marker { display: none; }
.recipe-account-menu summary:hover { background: rgba(255,255,255,.1); }
.recipe-account-avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--recipe-accent);
    font-weight: 800;
}
.recipe-account-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 650; }
.recipe-account-menu__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 260px;
    padding: 10px;
    color: var(--recipe-ink);
    background: var(--recipe-panel-raised);
    border: 1px solid var(--recipe-border);
    border-radius: var(--recipe-radius);
    box-shadow: var(--recipe-shadow);
}
.recipe-account-menu__panel p { margin: 4px 8px 9px; padding-bottom: 9px; border-bottom: 1px solid var(--recipe-border); }
.recipe-account-menu__panel p small { display: block; margin-top: 2px; color: var(--recipe-muted); text-transform: capitalize; }
.recipe-account-menu__panel a { display: block; min-height: 42px; padding: 10px 9px; border-radius: 7px; color: var(--recipe-ink) !important; text-decoration: none; }
.recipe-account-menu__panel a:hover { background: var(--recipe-canvas); }
.recipe-build-id { display: block; padding: 9px 9px 3px; color: var(--recipe-muted); border-top: 1px solid var(--recipe-border); font: 12px/1.4 ui-monospace, Consolas, monospace; }

.recipe-nav-toggle { display: none; width: 46px; height: 46px; padding: 11px; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; background: transparent; }
.recipe-nav-toggle > span:not(.screen-reader-text) { display: block; height: 2px; margin: 5px 0; background: #fff; }

/* Shared GUI2A design-system foundation. Existing inline workflow colours remain
   functional until their owning screens are rebuilt in later GUI2 stages. */
.recipe-app-shell-enabled h1,
.recipe-app-shell-enabled h2,
.recipe-app-shell-enabled h3 { color: var(--recipe-ink); font-family: var(--recipe-serif); line-height: 1.2; }
.recipe-app-shell-enabled a { color: var(--recipe-brand); }
.recipe-app-shell-enabled a:hover { color: var(--recipe-brand-dark); }
.recipe-app-shell-enabled input:not([type="checkbox"]):not([type="radio"]),
.recipe-app-shell-enabled select,
.recipe-app-shell-enabled textarea {
    min-height: 44px;
    border: 1px solid var(--recipe-control-border);
    border-radius: var(--recipe-radius-sm);
    background: var(--recipe-control);
    color: var(--recipe-ink);
    font: 16px/1.4 var(--recipe-font);
}
.recipe-app-shell-enabled input:focus,
.recipe-app-shell-enabled select:focus,
.recipe-app-shell-enabled textarea:focus,
.recipe-app-shell-enabled button:focus-visible,
.recipe-app-shell-enabled a:focus-visible,
.recipe-app-shell-enabled summary:focus-visible {
    outline: 3px solid var(--recipe-focus) !important;
    outline-offset: 3px;
}
.recipe-app-shell-enabled button,
.recipe-app-shell-enabled .action-btn,
.recipe-app-shell-enabled .recipe-btn {
    min-height: 44px;
    border-radius: var(--recipe-radius-sm);
    font-family: var(--recipe-font);
}
.recipe-app-shell-enabled button:not(:disabled) { cursor: pointer; }
.recipe-app-shell-enabled button:disabled,
.recipe-app-shell-enabled input:disabled,
.recipe-app-shell-enabled select:disabled {
    background-color: var(--recipe-disabled) !important;
    color: var(--recipe-disabled-text) !important;
    cursor: not-allowed;
    opacity: 1;
}
.recipe-app-shell-enabled .recipe-manager { margin-top: 28px; }
.recipe-app-shell-enabled .recipe-manager h1 { color: var(--recipe-ink); }
.recipe-app-shell-enabled .page-header-row { display: none !important; }
.recipe-app-shell-enabled .rm-toolbar { scroll-margin-top: 92px; }

/* Shared compactness and legacy-theme bridge. These rules intentionally map
   existing screen structures to semantic tokens while preserving action-state
   colours and all print/document-generation styles. */
@media screen {
    .recipe-app-shell-enabled #main-content,
    .recipe-app-shell-enabled #page-container,
    .recipe-app-shell-enabled .et_pb_section { color: var(--recipe-ink); background-color: var(--recipe-panel); }
    .recipe-app-shell-enabled p { margin-bottom: .65em; }
    .recipe-app-shell-enabled h1 { margin-bottom: var(--recipe-space-3); }
    .recipe-app-shell-enabled h2,
    .recipe-app-shell-enabled h3 { margin-bottom: var(--recipe-space-2); }
    .recipe-app-shell-enabled .container,
    .recipe-app-shell-enabled .card,
    .recipe-app-shell-enabled .panel,
    .recipe-app-shell-enabled dialog,
    .recipe-app-shell-enabled [class*="-card"],
    .recipe-app-shell-enabled [class*="-panel"] { border-color: var(--recipe-border); }
    .recipe-app-shell-enabled input:not([type="checkbox"]):not([type="radio"]),
    .recipe-app-shell-enabled select,
    .recipe-app-shell-enabled textarea { background-color: var(--recipe-control) !important; color: var(--recipe-ink) !important; border-color: var(--recipe-control-border) !important; }
    .recipe-app-shell-enabled option { background: var(--recipe-control); color: var(--recipe-ink); }
    .recipe-app-shell-enabled a { color: var(--recipe-link); }
    .recipe-app-shell-enabled ::placeholder { color: var(--recipe-muted); opacity: .9; }
    .recipe-app-shell-enabled [role="tooltip"],
    .recipe-app-shell-enabled .tooltip,
    .recipe-app-shell-enabled .context-help-panel { background: var(--recipe-tooltip) !important; color: var(--recipe-ink) !important; border-color: var(--recipe-border) !important; }
    .recipe-app-shell-enabled .alert-success,
    .recipe-app-shell-enabled .notice-success { background: var(--recipe-success-bg) !important; color: var(--recipe-success) !important; }
    .recipe-app-shell-enabled .alert-error,
    .recipe-app-shell-enabled .notice-error { background: var(--recipe-danger-bg) !important; color: var(--recipe-danger) !important; }
}

@media (max-width: 1100px) {
    .recipe-app-shell__bar { grid-template-columns: auto 1fr auto; gap: 12px; }
    .recipe-nav-link { padding-inline: 10px; }
    .recipe-account-name { display: none; }
}

@media (max-width: 899px) {
    .recipe-app-shell__bar { grid-template-columns: 1fr auto auto; min-height: 68px; }
    .recipe-nav-toggle { display: block; grid-column: 2; grid-row: 1; }
    .recipe-account-menu { grid-column: 3; grid-row: 1; }
    .recipe-primary-navigation {
        display: none;
        grid-column: 1 / -1;
        padding: 4px 0 14px;
        border-top: 1px solid rgba(255,255,255,.16);
    }
    .recipe-app-shell.is-nav-open .recipe-primary-navigation { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
    .recipe-nav-link { justify-content: center; min-height: 48px; }
}

@media (max-width: 600px) {
    .admin-bar .recipe-app-shell { top: 46px; }
    .recipe-app-brand__text small { display: none; }
    .recipe-app-brand__text strong { font-size: 18px; }
    .recipe-app-brand__mark { width: 38px; height: 38px; flex-basis: 38px; }
    .recipe-app-shell.is-nav-open .recipe-primary-navigation { grid-template-columns: 1fr; }
    .recipe-nav-link { justify-content: flex-start; padding-inline: 16px; }
    .recipe-account-menu__panel { position: fixed; top: 72px; right: 10px; left: 10px; width: auto; }
}

@media print {
    html[data-recipe-theme] {
        color-scheme: light;
        --recipe-page: #fff;
        --recipe-panel: #fff;
        --recipe-panel-raised: #fff;
        --recipe-ink: #222;
        --recipe-muted: #555;
        --recipe-border: #ccc;
        --recipe-brand: #9e3f2b;
        --recipe-brand-dark: #772c1e;
        --recipe-link: #222;
        --recipe-control: #fff;
    }
    .recipe-app-shell,
    .recipe-skip-link { display: none !important; }
}

/* Spacing scale (2026.11.18.10): phone values for the shared scale, and a compact footer. */
@media (max-width: 600px) {
    :root {
        --recipe-space-2: 6px;
        --recipe-space-3: 10px;
        --recipe-space-4: 12px;
        --recipe-space-5: 16px;
        --recipe-space-6: 20px;
    }
}
@media screen {
    .recipe-app-shell-enabled .et-l--footer .et_pb_section {
        padding-top: var(--recipe-space-4) !important;
        padding-bottom: var(--recipe-space-4) !important;
    }
}
