/* Global app styling and Bootstrap compatibility on top of the Brand System. */
html,
body {
    height: 100%;
}

html {
    scroll-behavior: smooth;
}

body.tds-app {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    line-height: 1.5;
}

/* Global main-nav styling (must apply to NavLink-rendered anchors too). */
.tds-mainnav .tds-mainnav__link {
    position: relative;
    color: rgba(251, 247, 241, 0.9);
    font-weight: 500;
    border-radius: var(--r-pill);
    transition: color var(--t), box-shadow var(--t);
}

    .tds-mainnav .tds-mainnav__link::after {
        content: "";
        position: absolute;
        left: 0.85rem;
        right: 0.85rem;
        bottom: 0.42rem;
        height: 1px;
        border-radius: var(--r-pill);
        background: transparent;
        opacity: 0;
        transition: background var(--t), opacity var(--t);
    }

    .tds-mainnav .tds-mainnav__link:hover {
        color: #fff;
    }

        .tds-mainnav .tds-mainnav__link:hover::after {
            opacity: 1;
            background: rgba(251, 247, 241, 0.5);
        }

    .tds-mainnav .tds-mainnav__link.active,
    .tds-mainnav .tds-mainnav__link[aria-current="page"] {
        color: var(--warm-white);
    }

        .tds-mainnav .tds-mainnav__link.active::after,
        .tds-mainnav .tds-mainnav__link[aria-current="page"]::after {
            opacity: 1;
            background: var(--gold);
        }

    .tds-mainnav .tds-mainnav__link:focus-visible {
        color: #fff;
        box-shadow: var(--focus-slate);
    }

a {
    color: var(--gold);
    text-decoration: none;
}

    a:hover {
        color: var(--deep-charcoal);
    }

h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: var(--track-tight);
}

/* Keep accessibility: custom ring only for focus-visible. */
:focus {
    outline: none;
}

:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

/* Bootstrap button bridge -> Brand button feel. */
.btn {
    appearance: none;
    font: inherit;
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: var(--r-pill);
    padding: 10px 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background var(--t), border-color var(--t), color var(--t), transform var(--t), box-shadow var(--t);
}

    .btn:active {
        transform: translateY(1px);
    }

    .btn:focus-visible {
        outline: none;
        box-shadow: var(--focus);
    }

.tds-btn {
    font-weight: 500;
}

.tds-btn--ghost:hover {
    background: rgba(108, 122, 137, 0.16);
    border-color: rgba(108, 122, 137, 0.32);
    box-shadow: 0 10px 24px rgba(108, 122, 137, 0.14);
}

.btn.btn-sm {
    padding: 8px 12px;
    font-size: 13px;
}

.btn.btn-lg {
    padding: 12px 18px;
    font-size: var(--text-base);
}

.btn-primary,
.btn-charcoal {
    --bs-btn-color: var(--warm-white);
    --bs-btn-bg: var(--deep-charcoal);
    --bs-btn-border-color: rgba(0, 0, 0, 0.06);
    --bs-btn-hover-color: var(--warm-white);
    --bs-btn-hover-bg: var(--mid-charcoal);
    --bs-btn-hover-border-color: rgba(0, 0, 0, 0.06);
    --bs-btn-active-color: var(--warm-white);
    --bs-btn-active-bg: var(--mid-charcoal);
    --bs-btn-active-border-color: rgba(0, 0, 0, 0.06);
    --bs-btn-focus-shadow-rgb: 28, 26, 23;
    background: var(--deep-charcoal);
    border-color: rgba(0, 0, 0, 0.06);
    color: var(--warm-white);
    box-shadow: 0 12px 28px rgba(28, 26, 23, 0.2);
}

    .btn-primary:hover,
    .btn-charcoal:hover {
        background: var(--mid-charcoal);
        color: var(--warm-white);
    }

    .btn-primary:focus,
    .btn-primary:focus-visible,
    .btn-charcoal:focus,
    .btn-charcoal:focus-visible {
        background: var(--deep-charcoal);
        border-color: rgba(0, 0, 0, 0.06);
        color: var(--warm-white);
        box-shadow: var(--focus);
    }

    .btn-primary:active,
    .btn-primary.active,
    .show > .btn-primary.dropdown-toggle,
    .btn-check:checked + .btn-primary,
    .btn-charcoal:active,
    .btn-charcoal.active,
    .show > .btn-charcoal.dropdown-toggle,
    .btn-check:checked + .btn-charcoal {
        background: var(--mid-charcoal);
        border-color: rgba(0, 0, 0, 0.06);
        color: var(--warm-white);
        box-shadow: 0 10px 24px rgba(28, 26, 23, 0.16);
    }

.btn-secondary {
    background: transparent;
    border-color: var(--mid-charcoal);
    color: var(--deep-charcoal);
    box-shadow: none;
}

    .btn-secondary:hover {
        background: rgba(58, 54, 48, 0.08);
        color: var(--deep-charcoal);
    }

    .btn-secondary:focus-visible {
        box-shadow: var(--focus);
    }

.btn-outline-secondary,
.btn-outline-charcoal {
    background: transparent;
    border-color: rgba(0, 0, 0, 0.12);
    color: var(--ink);
}

    .btn-outline-secondary:hover,
    .btn-outline-charcoal:hover {
        background: rgba(108, 122, 137, 0.16);
        border-color: rgba(108, 122, 137, 0.32);
        box-shadow: 0 10px 24px rgba(108, 122, 137, 0.14);
        color: var(--ink);
    }

.btn-outline-primary {
    background: transparent;
    border-color: rgba(155, 123, 63, 0.38);
    color: var(--gold);
}

    .btn-outline-primary:hover {
        background: rgba(155, 123, 63, 0.14);
        border-color: rgba(155, 123, 63, 0.52);
        color: var(--gold);
        box-shadow: 0 10px 24px rgba(155, 123, 63, 0.14);
    }

    .btn-outline-primary:focus-visible {
        box-shadow: var(--focus);
    }

.btn-danger,
.btn-outline-danger {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error-text);
}

    .btn-danger:hover,
    .btn-outline-danger:hover {
        background: #eae2e3;
        color: var(--error-text);
        border-color: var(--error-border);
    }

    .btn-danger:focus-visible,
    .btn-outline-danger:focus-visible {
        box-shadow: var(--focus-danger);
    }

.btn-outline-warning {
    background: transparent;
    border-color: rgba(163, 122, 24, 0.30);
    color: var(--warning);
}

    .btn-outline-warning:hover {
        background: rgba(163, 122, 24, 0.14);
        border-color: rgba(163, 122, 24, 0.45);
        color: var(--warning);
    }

    .btn-outline-warning:focus-visible {
        box-shadow: 0 0 0 4px rgba(163, 122, 24, 0.22);
    }

.btn-link {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(155, 123, 63, 0.35);
}

    .btn-link:hover {
        color: var(--deep-charcoal);
    }

.btn.disabled,
.btn:disabled {
    opacity: 0.55;
    pointer-events: none;
}

/* Grouped actions keep light segmented appearance. */
.btn-group {
    display: inline-flex;
    border-radius: var(--r-pill);
    overflow: hidden;
}

    .btn-group > .btn {
        border-radius: 0;
    }

        .btn-group > .btn:first-child {
            border-top-left-radius: var(--r-pill);
            border-bottom-left-radius: var(--r-pill);
        }

        .btn-group > .btn:last-child {
            border-top-right-radius: var(--r-pill);
            border-bottom-right-radius: var(--r-pill);
        }

        .btn-group > .btn + .btn {
            margin-left: 0;
            border-left-width: 0;
        }

/* Form bridge */
.form-label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(0, 0, 0, 0.78);
}

.tds-label__required {
    font-size: 12px;
    font-weight: 560;
    color: rgba(163, 122, 24, 0.82);
    letter-spacing: 0.01em;
    text-transform: none;
}

.form-control,
.form-select,
textarea.form-control {
    border-radius: var(--r-lg);
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-family: var(--font-sans);
    padding: 10px 12px;
    transition: border-color var(--t), box-shadow var(--t), background var(--t);
}

    .form-control::placeholder {
        color: rgba(0, 0, 0, 0.38);
    }

    .form-control:hover,
    .form-select:hover {
        border-color: rgba(108, 122, 137, 0.22);
    }

    .form-control:focus,
    .form-control:focus-visible,
    .form-select:focus,
    .form-select:focus-visible {
        border-color: rgba(155, 123, 63, 0.45);
        box-shadow: var(--focus);
    }

.form-check {
    display: flex;
    gap: 10px;
    align-items: center;
    color: rgba(0, 0, 0, 0.78);
}

.form-check-input {
    appearance: none;
    -webkit-appearance: none;
    accent-color: var(--gold);
    width: 18px;
    height: 18px;
    margin-top: 0;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    background: #fff;
    transition: box-shadow var(--t), border-color var(--t), background var(--t);
}

    .form-check-input[type="radio"] {
        border-radius: var(--r-pill);
    }

    .form-check-input:hover {
        border-color: rgba(108, 122, 137, 0.28);
    }

    .form-check-input:focus,
    .form-check-input:focus-visible {
        box-shadow: var(--focus-slate);
    }

    .form-check-input:checked {
        --bs-form-check-bg-image: none;
        background-color: #fff;
        background-image: none;
        border-color: rgba(155, 123, 63, 0.45);
        box-shadow: inset 0 0 0 5px rgba(155, 123, 63, 0.92);
    }

    .form-check-input[type="checkbox"]:checked {
        box-shadow: inset 0 0 0 9px rgba(155, 123, 63, 0.92);
    }

.form-check-label {
    margin: 0;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--gold);
}

/* Cards / lists / badges bridge */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-1);
}

.list-group {
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    overflow: hidden;
    background: #fff;
}

.list-group-flush {
    border-radius: var(--r-xl);
}

.list-group-item {
    border-color: var(--border);
    padding: 12px 14px;
    transition: background var(--t);
}

    .list-group-item:hover {
        background: rgba(108, 122, 137, 0.06);
    }

    .list-group-item.active {
        color: var(--gold);
        background: var(--gold-bg);
        border-color: rgba(155, 123, 63, 0.28);
    }

.nav-pills .nav-link.active,
.nav-tabs .nav-link.active {
    color: var(--gold);
    background: var(--gold-bg);
    border-color: rgba(155, 123, 63, 0.28);
}

.dropdown-item:active,
.dropdown-item.active {
    background: var(--gold-bg);
    color: var(--gold);
}

.badge {
    font-size: var(--text-xs);
    font-weight: 560;
    border-radius: var(--r-pill);
    padding: 6px 10px;
}

.text-bg-warning,
.bg-warning-subtle {
    background: var(--warning-soft) !important;
    color: var(--warning) !important;
    border: 1px solid rgba(163, 122, 24, 0.22);
}

.text-bg-danger,
.bg-danger-subtle {
    background: var(--danger-soft) !important;
    color: var(--danger) !important;
    border: 1px solid rgba(122, 46, 46, 0.22);
}

.text-bg-success,
.bg-success-subtle {
    background: var(--success-soft) !important;
    color: var(--success) !important;
    border: 1px solid rgba(95, 124, 90, 0.22);
}

.text-bg-secondary,
.bg-secondary-subtle {
    background: var(--slate-soft) !important;
    color: var(--slate-hover) !important;
    border: 1px solid rgba(108, 122, 137, 0.22);
}

.text-bg-primary,
.bg-primary-subtle {
    background: var(--gold-bg) !important;
    color: var(--gold) !important;
    border: 1px solid rgba(155, 123, 63, 0.22);
}

.progress {
    --bs-progress-bg: rgba(108, 122, 137, 0.16);
    --bs-progress-border-radius: var(--r-pill);
    overflow: hidden;
}

.progress-bar {
    background-color: var(--deep-charcoal) !important;
}

    .progress-bar.bg-success {
        background-color: var(--success) !important;
    }

    .progress-bar.bg-warning {
        background-color: var(--warning) !important;
    }

    .progress-bar.bg-danger {
        background-color: var(--danger) !important;
    }

.pagination .page-link {
    color: var(--gold);
    border-color: rgba(0, 0, 0, 0.14);
}

    .pagination .page-link:hover {
        color: var(--gold);
        background: rgba(155, 123, 63, 0.12);
        border-color: rgba(155, 123, 63, 0.35);
    }

    .pagination .page-link:focus-visible {
        box-shadow: var(--focus);
    }

.pagination .page-item.active .page-link {
    background: var(--deep-charcoal);
    border-color: var(--deep-charcoal);
    color: var(--warm-white);
}

/* Utility chips and icon actions used in existing pages. */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-xs);
    font-weight: 560;
    padding: 6px 10px;
    border-radius: var(--r-pill);
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.02);
    color: rgba(0, 0, 0, 0.72);
}

.destructive-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--r-pill);
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--danger);
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.10);
    transition: transform var(--t), background var(--t), box-shadow var(--t);
}

    .destructive-icon-btn:hover {
        background: rgba(255, 255, 255, 0.86);
        transform: translateY(-1px);
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
    }

    .destructive-icon-btn:focus-visible {
        box-shadow: var(--focus-danger);
    }

    .destructive-icon-btn:disabled {
        opacity: 0.5;
        pointer-events: none;
    }

/* Existing UX helpers retained. */
.step-card p a {
    text-decoration: underline;
}

.step-card {
    position: relative;
    --step-bg: #fff;
    --flash-rgb: 155, 123, 63;
    --flash-alpha-start: 0.12;
    --flash-duration: 2.4s;
    background-color: var(--step-bg);
    scroll-margin-top: 6rem;
}

    .step-card.flash-highlight::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        pointer-events: none;
        background: rgba(var(--flash-rgb), var(--flash-alpha-start));
        animation: tds-tint-fade var(--flash-duration) linear 1 forwards;
    }

@keyframes tds-tint-fade {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .step-card.flash-highlight::after {
        animation: none;
    }
}

.toggle-chevron i {
    transition: transform 0.2s ease;
}

.toggle-chevron[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.toggle-chevron {
    cursor: pointer;
}

/* Static legal/support/404 pages */
.tds-static-page {
    padding: 2.1rem 0 2.6rem;
}

.tds-static-wrap {
    max-width: 860px;
}

.tds-static-page h1 {
    margin-bottom: 0.6rem;
}

.tds-static-lead {
    color: var(--muted);
    max-width: 64ch;
    margin-bottom: 1rem;
}

.tds-static-card {
    padding: 1.1rem 1.15rem;
    margin-top: 0.95rem;
}

    .tds-static-card h2 {
        font-size: 1.05rem;
        margin-bottom: 0.55rem;
    }

    .tds-static-card p:last-child {
        margin-bottom: 0;
    }

.tds-static-list {
    margin: 0;
    padding-left: 1.15rem;
}

    .tds-static-list li + li {
        margin-top: 0.35rem;
    }

.tds-notfound {
    text-align: center;
    padding: 2rem 1.4rem;
}

.tds-notfound-code {
    font-size: 0.82rem;
    font-weight: 560;
    letter-spacing: var(--track-label);
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.tds-notfound-actions {
    margin-top: 1.1rem;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem;
}

.tds-notfound-note {
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.tds-contact-form {
    margin-top: 1rem;
}

.tds-contact-field {
    margin-bottom: 0.95rem;
}

    .tds-contact-field .tds-control {
        margin-top: 0.35rem;
    }

.tds-contact-actions {
    margin-top: 1rem;
}

.tds-contact-status {
    margin-top: 0.85rem;
    margin-bottom: 0;
    font-size: 0.95rem;
}

    .tds-contact-status.is-success {
        color: var(--success);
    }

    .tds-contact-status.is-warning {
        color: var(--warning);
    }

.recipe-actions-menu {
    min-width: 320px;
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-2);
}

.recipe-actions-item {
    white-space: normal;
}

    .recipe-actions-item + .recipe-actions-item {
        border-top: 1px solid var(--border);
    }

.recipe-ingest-cover-picker {
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--warm-white);
    padding: 8px;
    width: 140px;
    display: inline-flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}

    .recipe-ingest-cover-picker img {
        width: 100%;
        height: 88px;
        object-fit: cover;
        border-radius: var(--r-md);
        border: 1px solid rgba(0, 0, 0, 0.08);
    }

    .recipe-ingest-cover-picker span {
        font-size: var(--text-xs);
        font-weight: 500;
        color: var(--ink);
    }

    .recipe-ingest-cover-picker:hover {
        border-color: rgba(155, 123, 63, 0.34);
        transform: translateY(-1px);
    }

    .recipe-ingest-cover-picker.is-selected {
        border-color: rgba(155, 123, 63, 0.5);
        box-shadow: 0 0 0 3px rgba(155, 123, 63, 0.16);
    }

.recipe-ingest-cover-add {
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
}

    .recipe-ingest-cover-add .btn {
        position: relative;
        overflow: hidden;
    }

.choice-mode-toggle,
.recipe-ingest-source-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (max-width: 767.98px) {
    .choice-mode-toggle,
    .recipe-ingest-source-toggle {
        grid-template-columns: 1fr;
    }
}

.choice-mode-option,
.recipe-ingest-source-option {
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: #fff;
    padding: 0.75rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
    transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}

    .choice-mode-option:hover,
    .recipe-ingest-source-option:hover {
        border-color: rgba(155, 123, 63, 0.34);
        transform: translateY(-1px);
    }

    .choice-mode-option.is-selected,
    .recipe-ingest-source-option.is-selected {
        border-color: rgba(155, 123, 63, 0.5);
        box-shadow: 0 0 0 3px rgba(155, 123, 63, 0.16);
    }

.choice-mode-option-title,
.recipe-ingest-source-title {
    font-size: var(--text-sm);
    font-weight: 520;
    color: var(--ink);
}

.choice-mode-option-sub,
.recipe-ingest-source-sub {
    font-size: var(--text-xs);
    color: var(--muted);
}

body.svv-modal-open {
    overflow: hidden;
}

.svv-identify-modal {
    z-index: 2000;
    padding-top: 5.25rem;
    overflow-y: auto;
}

    .svv-identify-modal .modal-dialog {
        margin-top: 0;
        margin-bottom: 1rem;
    }

.svv-identify-backdrop {
    z-index: 1990;
}

.tds-modal-entrance {
    animation: tds-modal-fade-in 180ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

    .tds-modal-entrance .modal-dialog {
        animation: tds-modal-scale-in 180ms cubic-bezier(0.22, 0.61, 0.36, 1);
        transform-origin: top center;
    }

.tds-modal-backdrop-entrance {
    animation: tds-modal-backdrop-fade-in 170ms ease-out;
}

@keyframes tds-modal-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes tds-modal-scale-in {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes tds-modal-backdrop-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 0.5;
    }
}

.tds-modal-backdrop-entrance.show {
    opacity: 0.5;
}


.svv-recipe-ingest-modal {
    z-index: 2000;
    padding-top: 5.25rem;
    overflow-y: auto;
}

    .svv-recipe-ingest-modal .modal-dialog {
        margin-top: 0;
        margin-bottom: 1rem;
    }

    .svv-recipe-ingest-modal .modal-content {
        border-radius: var(--r-xl);
        border: 1px solid var(--rule);
        background: var(--warm-white);
        box-shadow: var(--shadow-2);
    }

    .svv-recipe-ingest-modal .modal-header {
        border-bottom: 1px solid var(--rule);
        background: linear-gradient(180deg, rgba(237, 233, 224, 0.56), rgba(253, 251, 248, 0.92));
    }

    .svv-recipe-ingest-modal .modal-body {
        padding-top: 1.1rem;
        padding-bottom: 1.1rem;
    }

    .svv-recipe-ingest-modal .modal-footer {
        border-top: 1px solid var(--rule);
        background: rgba(237, 233, 224, 0.32);
    }

    .svv-recipe-ingest-modal .btn-close {
        opacity: 0.6;
    }

    .svv-recipe-ingest-modal .btn-close:hover {
        opacity: 0.85;
    }

.recipe-ingest-modal-title {
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(1.55rem, 2.2vw, 2rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: 0.01em;
    color: var(--deep-charcoal);
}

.recipe-ingest-steps {
    display: flex;
    align-items: center;
    gap: 0.48rem;
    margin-bottom: 0.9rem;
}

.recipe-ingest-step {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.62rem;
    border-radius: var(--r-pill);
    border: 1px solid var(--rule);
    background: var(--parchment);
    color: var(--mid-charcoal);
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 520;
}

.recipe-ingest-step.is-active {
    border-color: var(--gold-border);
    background: var(--gold-bg);
    color: var(--gold);
}

/* Wizard shares the global .tds-allowance notice; it only needs spacing here. */
.svv-recipe-ingest-modal .tds-allowance {
    margin-bottom: 0.9rem;
}

.recipe-ingest-error {
    margin-bottom: 0.9rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--error-border);
    border-left-width: 2px;
    border-radius: var(--r-md);
    background: var(--error-bg);
    color: var(--error-text);
    font-size: var(--text-sm);
    line-height: 1.5;
}

.recipe-ingest-panel {
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
    background: var(--warm-white);
    box-shadow: 0 6px 18px rgba(28, 26, 23, 0.045);
    padding: 0.95rem;
}

.recipe-ingest-panel-title {
    margin: 0 0 0.35rem;
    font-family: var(--font-serif);
    font-size: clamp(1.22rem, 1.8vw, 1.42rem);
    font-weight: 500;
    line-height: 1.1;
}

.recipe-ingest-panel-sub {
    margin: 0 0 0.55rem;
    color: var(--warm-stone);
    font-size: 0.92rem;
    line-height: 1.5;
}

.svv-recipe-ingest-backdrop {
    z-index: 1990;
}

.svv-recipe-view .svv-fix-target {
    scroll-margin-top: 6rem;
    position: relative;
    transition: border-color var(--t), box-shadow var(--t);
}

.svv-recipe-view .svv-toast-container {
    z-index: 2050;
    margin-top: 4.5rem;
    pointer-events: none;
}

.svv-recipe-view .svv-inline-toast {
    pointer-events: auto;
    min-width: 220px;
    max-width: 340px;
    opacity: 0.96;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.svv-recipe-view .svv-overview-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.svv-recipe-view .card-header {
    background: rgba(237, 233, 224, 0.34);
    border-bottom: 1px solid var(--rule);
}

.svv-recipe-view .card-header > .fw-semibold {
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 520;
    color: var(--warm-stone);
}

.svv-recipe-view .svv-recipe-title {
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(1.9rem, 2.7vw, 2.5rem);
    line-height: 1.06;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--deep-charcoal);
}

.svv-recipe-view .svv-required-actions {
    border-color: rgba(163, 122, 24, 0.18);
    background: var(--surface);
}

.svv-recipe-view .svv-required-actions__header {
    display: block;
    margin-bottom: 0.75rem;
}

.svv-recipe-view .svv-required-actions__title-wrap {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.svv-recipe-view .svv-required-actions__count {
    color: rgba(51, 46, 34, 0.72);
    font-size: 0.82rem;
    font-weight: 520;
}

.svv-recipe-view .svv-required-actions__group + .svv-required-actions__group {
    margin-top: 0.75rem;
}

.svv-recipe-view .svv-required-actions__label {
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 520;
    color: rgba(55, 49, 36, 0.66);
    margin-bottom: 0.38rem;
}

.svv-recipe-view .svv-required-actions__link {
    display: flex;
    align-items: center;
    gap: 0.52rem;
    border: 1px solid rgba(163, 122, 24, 0.22);
    border-radius: var(--r-md);
    padding: 0.44rem 0.56rem;
    color: rgba(31, 31, 31, 0.96);
    text-decoration: none;
    background: rgba(246, 239, 227, 0.45);
    transition: background var(--t), border-color var(--t), box-shadow var(--t);
}

    .svv-recipe-view .svv-required-actions__link:hover {
        background: rgba(246, 239, 227, 0.78);
        border-color: rgba(163, 122, 24, 0.34);
    }

    .svv-recipe-view .svv-required-actions__link:focus-visible {
        outline: none;
        box-shadow: var(--focus-slate);
    }

.svv-recipe-view .svv-required-actions__pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    border-radius: var(--r-pill);
    border: 1px solid rgba(163, 122, 24, 0.26);
    background: var(--warning-soft);
    color: var(--warning);
    font-size: 0.72rem;
    font-weight: 560;
    line-height: 1;
    padding: 0.22rem 0.45rem;
}

    .svv-recipe-view .svv-overview-layout #fix-ingredients {
        order: 1;
    }

    .svv-recipe-view .svv-overview-layout #fix-equipment {
        order: 2;
    }

    .svv-recipe-view .svv-overview-layout #fix-steps {
        order: 3;
    }

.svv-recipe-view .svv-fix-target.is-targeted {
    border-color: rgba(155, 123, 63, 0.52);
    box-shadow: 0 0 0 3px rgba(155, 123, 63, 0.14);
}

.svv-recipe-view .svv-servings-anchor {
    padding: 0.35rem 0.45rem;
    border-radius: var(--r-md);
}

    .svv-recipe-view .svv-servings-anchor.is-targeted {
        background: var(--gold-bg);
    }

.svv-recipe-view .svv-fix-target.flash-highlight::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: rgba(155, 123, 63, 0.12);
    animation: tds-tint-fade 2.4s linear 1 forwards;
}

.svv-recipe-view .svv-inline-row {
    padding: 0.65rem 0;
    border-top: 1px solid rgba(33, 37, 41, 0.05);
}

    .svv-recipe-view .svv-inline-row:first-child {
        border-top: 0;
    }

.svv-recipe-view .svv-inline-row.has-unresolved-action {
    background: rgba(246, 239, 227, 0.42);
    border-radius: var(--r-md);
    padding: 0.65rem;
    border-top-color: transparent;
    border-left: 3px solid var(--warning);
}

.svv-recipe-view .svv-inline-row.has-unresolved-action + .svv-inline-row.has-unresolved-action {
    margin-top: 0.45rem;
}

.svv-recipe-view .svv-step-quantity-hint {
    min-height: 1.05rem;
    margin-top: 0.25rem;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.82rem;
    line-height: 1.2;
}

    .svv-recipe-view .svv-step-quantity-hint:empty::before {
        content: "\00a0";
    }

.svv-recipe-view .svv-inline-row.is-targeted-row {
    background: var(--gold-bg);
    border-radius: var(--r-md);
    padding: 0.65rem;
    border-top-color: transparent;
}

.svv-recipe-view .svv-step-card {
    position: relative;
    border: 1px solid rgba(155, 123, 63, 0.10);
    border-radius: var(--r-lg);
    background: linear-gradient(180deg, rgba(253, 251, 248, 0.98) 0%, rgba(237, 233, 224, 0.24) 100%);
    box-shadow: 0 8px 20px rgba(28, 26, 23, 0.055);
    padding: 0.8rem 0.92rem 0.84rem;
    margin-bottom: 0.68rem;
}

    .svv-recipe-view .svv-step-card.is-targeted-row {
        background: var(--gold-bg);
        border-color: rgba(155, 123, 63, 0.42);
        box-shadow: 0 0 0 1px rgba(155, 123, 63, 0.1), var(--shadow-1);
    }

.svv-recipe-view .tds-chip.is-targeted-row {
    box-shadow: 0 0 0 2px rgba(155, 123, 63, 0.22);
}

.svv-recipe-view .svv-element-block {
    border: 1px solid rgba(108, 122, 137, 0.13);
    border-radius: var(--r-xl);
    background: var(--surface);
    box-shadow: 0 7px 18px rgba(28, 26, 23, 0.05);
    padding: 0.88rem 0.96rem 0.96rem;
}

    .svv-recipe-view .svv-element-block + .svv-element-block {
        margin-top: 1.85rem;
    }

.svv-recipe-view .svv-element-title-wrap {
    margin-bottom: 0.8rem;
}

.svv-recipe-view .svv-element-title {
    font-size: clamp(1.24rem, 1.45vw, 1.52rem);
    font-family: var(--font-serif);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: 0.01em;
    color: rgba(28, 26, 23, 0.96);
}

.svv-recipe-view .svv-element-title-rule {
    width: 100%;
    height: 1px;
    margin-top: 0.32rem;
    background: linear-gradient(90deg, rgba(155, 123, 63, 0.36), rgba(108, 122, 137, 0.2), rgba(0, 0, 0, 0));
    border-radius: var(--r-pill);
}

.svv-recipe-view .svv-element-ingredient-summary {
    border: 1px solid rgba(108, 122, 137, 0.14);
    border-radius: var(--r-md);
    padding: 0.5rem 0.62rem;
    background: rgba(108, 122, 137, 0.055);
    margin-bottom: 0.82rem;
}

.svv-recipe-view .svv-element-summary-toggle {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.18rem;
}

    .svv-recipe-view .svv-element-summary-toggle:hover .svv-step-group-label--interactive,
    .svv-recipe-view .svv-element-summary-toggle:focus-visible .svv-step-group-label--interactive {
        opacity: 0.92;
    }

    .svv-recipe-view .svv-element-summary-toggle:focus-visible {
        outline: none;
        box-shadow: var(--focus-slate);
        border-radius: var(--r-sm);
    }

.svv-recipe-view .svv-element-summary-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: rgba(0, 0, 0, 0.48);
    font-size: 0.81rem;
}

.svv-recipe-view .svv-step-group-label--interactive {
    margin-bottom: 0;
}

.svv-recipe-view .svv-step-group-label {
    margin: 0.68rem 0 0.36rem;
}

.svv-recipe-view .svv-step-card__header {
    position: relative;
    margin-bottom: 0.36rem;
    padding-bottom: 0.24rem;
}

    .svv-recipe-view .svv-step-card__header::after {
        content: "";
        display: block;
        width: 4.7rem;
        height: 1px;
        margin-top: 0.2rem;
        background: var(--rule-gradient);
        border-radius: var(--r-pill);
        opacity: 0.72;
    }

.svv-recipe-view .svv-step-card__title {
    color: rgba(31, 31, 31, 0.95);
    font-size: 1rem;
    font-weight: 560;
    line-height: 1.14;
    letter-spacing: 0;
}

.svv-recipe-view .svv-step-card__meta {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(12rem, 0.85fr);
    gap: 0.56rem 0.82rem;
    align-items: start;
    margin: 0.14rem 0 0.28rem;
}

.svv-recipe-view .svv-step-card__meta-group {
    min-width: 0;
}

.svv-recipe-view .svv-step-card__meta-label {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 520;
    color: rgba(0, 0, 0, 0.4);
    margin-bottom: 0.14rem;
}

.svv-recipe-view .svv-step-card__ingredient-list .svv-cookbook-row {
    grid-template-columns: 3.7rem minmax(0, 1fr);
    column-gap: 0.46rem;
    padding: 0.06rem 0;
    border-top-color: rgba(108, 122, 137, 0.06);
}

.svv-recipe-view .svv-step-card__ingredient-list .svv-cookbook-qty {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    align-self: start;
    min-height: 0;
    padding-top: 0;
    line-height: 1.18;
}

.svv-recipe-view .svv-step-card__ingredient-list .svv-cookbook-name {
    font-size: 0.93rem;
    font-weight: 520;
}

.svv-recipe-view .svv-step-card__ingredient-list .svv-cookbook-prep,
.svv-recipe-view .svv-step-card__ingredient-list .svv-cookbook-source {
    color: rgba(0, 0, 0, 0.54);
}

.svv-recipe-view .svv-step-card__equipment-text {
    color: rgba(0, 0, 0, 0.68);
    font-size: 0.88rem;
    line-height: 1.3;
}

.svv-recipe-view .svv-step-card__instruction {
    margin: 0;
    color: rgba(31, 31, 31, 0.98);
    font-size: 1.08rem;
    font-weight: 420;
    line-height: 1.62;
}

.svv-recipe-view .svv-step-card {
    position: relative;
    border: 1px solid rgba(155, 123, 63, 0.12);
    border-radius: var(--r-lg);
    background: var(--surface-2);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    padding: 0.62rem 0.74rem 0.66rem;
    margin-bottom: 0.42rem;
}

.svv-recipe-view .svv-cookbook-list {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.svv-recipe-view .svv-cookbook-row {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr);
    column-gap: 0.58rem;
    align-items: start;
    padding: 0.34rem 0;
    border-top: 1px solid rgba(33, 37, 41, 0.05);
}

.svv-recipe-view .svv-cookbook-list .svv-cookbook-row:first-child {
    border-top: 0;
}

.svv-recipe-view .svv-cookbook-row.has-actions {
    grid-template-columns: 4.5rem minmax(0, 1fr) auto;
}

.svv-recipe-view .svv-cookbook-row.has-unresolved-action {
    background: rgba(246, 239, 227, 0.28);
    border-radius: var(--r-md);
    border-top-color: transparent;
    padding: 0.32rem 0.4rem;
}

.svv-recipe-view .svv-cookbook-row.is-targeted-row {
    background: var(--gold-bg);
    border-radius: var(--r-md);
    border-top-color: transparent;
    padding: 0.32rem 0.4rem;
}

.svv-recipe-view .svv-cookbook-qty {
    text-align: right;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.85rem;
    white-space: nowrap;
    min-height: 1.1rem;
    padding-top: 0.02rem;
}

.svv-recipe-view .svv-cookbook-name {
    font-weight: 520;
    line-height: 1.18;
}

.svv-recipe-view .svv-cookbook-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.02rem;
}

.svv-recipe-view .svv-cookbook-prep {
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.84rem;
    font-style: italic;
    line-height: 1.14;
}

.svv-recipe-view .svv-cookbook-meta,
.svv-recipe-view .svv-cookbook-source {
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.82rem;
    line-height: 1.14;
}

.svv-recipe-view .svv-external-link-note {
    font-size: 0.82rem;
    line-height: 1.2;
    color: rgba(59, 64, 69, 0.9);
}

.svv-recipe-view .svv-external-link-note--subtle {
    color: rgba(88, 93, 99, 0.95);
}

.svv-recipe-view .svv-external-link-note--info {
    color: rgba(40, 71, 105, 0.95);
}

.svv-recipe-view .svv-external-link-note--danger {
    color: #8f2f3a;
}

.svv-recipe-view .svv-external-link-panel {
    border: 1px solid rgba(108, 117, 125, 0.25);
    border-radius: var(--r-md);
    padding: 0.58rem 0.68rem;
    font-size: 0.9rem;
    line-height: 1.35;
    background: rgba(248, 249, 250, 0.85);
    color: rgba(45, 50, 55, 0.95);
}

.svv-recipe-view .svv-external-link-panel--subtle {
    border-color: rgba(124, 130, 138, 0.3);
    background: rgba(248, 249, 250, 0.9);
}

.svv-recipe-view .svv-external-link-panel--info {
    border-color: rgba(78, 124, 171, 0.35);
    background: rgba(235, 245, 255, 0.78);
    color: rgba(33, 63, 95, 0.96);
}

.svv-recipe-view .svv-external-link-panel--danger {
    border-color: rgba(178, 62, 81, 0.35);
    background: rgba(253, 242, 243, 0.88);
    color: #8f2f3a;
}

.svv-recipe-view .choice-mode-toggle {
    width: 100%;
}

.svv-recipe-view .svv-cookbook-actions {
    display: flex;
    align-items: flex-start;
}

.svv-recipe-view .svv-section-icon-btn {
    width: 2rem;
    height: 2rem;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-color: rgba(108, 117, 125, 0.35);
    color: var(--bs-secondary-color, #6c757d);
    background: rgba(255, 255, 255, 0.75);
}

    .svv-recipe-view .svv-section-icon-btn:hover,
    .svv-recipe-view .svv-section-icon-btn:focus-visible {
        color: var(--bs-body-color, #212529);
        border-color: rgba(108, 117, 125, 0.55);
        background: rgba(248, 249, 250, 0.95);
    }

    .svv-recipe-view .svv-section-icon-btn .bi {
        font-size: 0.9rem;
        line-height: 1;
    }

.svv-recipe-view .svv-ingredient-edit-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.svv-recipe-view .svv-ingredient-edit-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .svv-recipe-view .svv-ingredient-edit-top .form-control {
        min-width: 0;
    }

    .svv-recipe-view .svv-ingredient-edit-top .form-control-sm,
    .svv-recipe-view .svv-ingredient-edit-bottom .form-control-sm,
    .svv-recipe-view .svv-ingredient-edit-bottom .form-select-sm {
        min-height: 2.15rem;
        padding: 0.3rem 0.55rem;
    }

.svv-recipe-view .svv-ingredient-edit-bottom {
    display: grid;
    grid-template-columns: minmax(5.5rem, 7rem) minmax(4.75rem, 6rem) minmax(0, 1fr);
    gap: 0.5rem;
}

.svv-recipe-view .svv-ingredient-edit-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    grid-template-columns: none;
}

.svv-recipe-view .svv-unit-picker {
    border-color: rgba(108, 122, 137, 0.36);
    background-color: rgba(255, 255, 255, 0.95);
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(55, 60, 66, 0.78) 50%),
        linear-gradient(135deg, rgba(55, 60, 66, 0.78) 50%, transparent 50%);
    background-position:
        calc(100% - 0.9rem) calc(50% - 1px),
        calc(100% - 0.6rem) calc(50% - 1px);
    background-size: 0.33rem 0.33rem, 0.33rem 0.33rem;
    background-repeat: no-repeat;
    padding-right: 1.6rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

    .svv-recipe-view .svv-unit-picker:hover {
        border-color: rgba(108, 122, 137, 0.5);
        background-color: #fff;
    }

    .svv-recipe-view .svv-unit-picker:focus,
    .svv-recipe-view .svv-unit-picker:focus-visible {
        border-color: rgba(108, 122, 137, 0.58);
        box-shadow: var(--focus-slate);
    }

.svv-recipe-view .svv-icon-btn {
    width: 1.95rem;
    height: 1.95rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border-radius: 999px;
}

@media (min-width: 1200px) {
    .svv-recipe-view .svv-overview-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 1rem;
        align-items: start;
    }

        .svv-recipe-view .svv-overview-layout #fix-ingredients {
            grid-column: 1;
            margin-bottom: 0;
        }

        .svv-recipe-view .svv-overview-layout #fix-equipment {
            grid-column: 2;
            margin-bottom: 0;
        }

        .svv-recipe-view .svv-overview-layout #fix-steps {
            grid-column: 1 / -1;
        }
}

@media (max-width: 767.98px) {
    .svv-recipe-view .svv-element-block {
        padding: 0.8rem 0.76rem 0.82rem;
    }

    .svv-recipe-view .svv-step-card {
        padding: 0.58rem 0.64rem 0.62rem;
    }

    .svv-recipe-view .svv-element-summary-meta {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 0.25rem 0.75rem;
    }

    .svv-recipe-view .svv-step-card__meta {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.55rem;
    }

    .svv-recipe-view .svv-cookbook-row,
    .svv-recipe-view .svv-cookbook-row.has-actions {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 0.15rem;
        column-gap: 0;
    }

    .svv-recipe-view .svv-cookbook-qty {
        text-align: left;
        min-height: 0;
        font-size: 0.85rem;
        padding-top: 0;
    }

    .svv-recipe-view .svv-cookbook-actions {
        margin-top: 0.3rem;
    }

    .svv-recipe-view .svv-ingredient-edit-bottom {
        grid-template-columns: minmax(5rem, 1fr) minmax(4.5rem, 1fr);
    }

        .svv-recipe-view .svv-ingredient-edit-bottom input[aria-label="Ingredient preparation"] {
            grid-column: 1 / -1;
        }

    .svv-recipe-view .svv-required-actions__title-wrap {
        display: flex;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tds-modal-entrance,
    .tds-modal-entrance .modal-dialog,
    .tds-modal-backdrop-entrance {
        animation: none;
    }
}

.svv-dev-panel summary {
    list-style: none;
    cursor: pointer;
}

    .svv-dev-panel summary::-webkit-details-marker {
        display: none;
    }

.svv-dev-pre {
    margin: 0;
    background: rgba(108, 122, 137, 0.08);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 0.7rem;
    max-height: 240px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.svv-dev-crop-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    overflow-x: visible;
    padding-bottom: 0.35rem;
    align-items: flex-start;
}

.svv-dev-crop-tile {
    margin: 0;
    min-width: 12rem;
    max-width: 16rem;
    flex: 0 0 auto;
}

.svv-dev-crop-tile__title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 0.79rem;
    color: var(--text-muted, #6c7a89);
}

.svv-dev-crop-tile__image {
    display: block;
    width: 100%;
    max-height: 13rem;
    object-fit: contain;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
}

.svv-dev-crop-tile__missing {
    min-height: 8rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    justify-content: center;
    padding: 0.75rem;
    font-size: 0.78rem;
    color: var(--text-muted, #6c7a89);
    background: var(--surface-2);
    border: 1px dashed var(--border);
    border-radius: var(--r-md);
}

.svv-selection-row-input {
    color: var(--bs-secondary-color);
    min-width: 1rem;
}

.svv-selection-row.is-selected {
    border-color: var(--bs-primary);
    background-color: var(--bs-primary-bg-subtle);
}

.svv-selection-row.is-selected .svv-selection-row-input {
    color: var(--bs-primary);
}
