html[data-mantine-color-scheme] {
    --bs-body-bg: var(--mantine-color-body);
    --bs-body-color: var(--mantine-color-text);
    --bs-emphasis-color: var(--mantine-color-text);
    --bs-secondary-color: var(--mantine-color-dimmed);
    --bs-secondary-bg: var(--mantine-color-gray-1);
    --bs-tertiary-bg: var(--mantine-color-gray-0);
    --bs-border-color: var(--mantine-color-default-border);
    --bs-card-bg: var(--mantine-color-body);
    --bs-card-color: var(--mantine-color-text);
    --bs-primary: var(--mantine-color-teal-filled);
    --bs-primary-rgb: var(--mantine-color-teal-filled-rgb);
    --bs-link-color: var(--mantine-color-anchor);
    --bs-link-hover-color: var(--mantine-color-teal-filled-hover);
}

html[data-mantine-color-scheme="dark"] {
    --bs-secondary-bg: var(--mantine-color-dark-6);
    --bs-tertiary-bg: var(--mantine-color-dark-5);
}

body {
    background:
        radial-gradient(circle at top left, color-mix(in srgb, #f0cb88 20%, transparent), transparent 30%),
        radial-gradient(circle at top right, color-mix(in srgb, #3f8f84 16%, transparent), transparent 35%),
        var(--mantine-color-body);
    color: var(--mantine-color-text);
}

html[data-mantine-color-scheme="dark"] body {
    background:
        radial-gradient(circle at top left, color-mix(in srgb, #f0cb88 8%, transparent), transparent 28%),
        radial-gradient(circle at top right, color-mix(in srgb, #3f8f84 12%, transparent), transparent 34%),
        linear-gradient(180deg, color-mix(in srgb, #0f1720 70%, var(--mantine-color-body)), var(--mantine-color-body));
}

.dbc {
    --Dash-Stroke-Strong: var(--bs-border-color);
    --Dash-Fill-Interactive-Strong: var(--bs-primary);
    --Dash-Fill-Inverse-Strong: var(--bs-body-bg);
    --Dash-Text-Primary: var(--bs-body-color);
    --Dash-Text-Strong: var(--bs-body-color);
}

html[data-mantine-color-scheme="dark"] .dbc {
    --Dash-Stroke-Weak: rgba(255, 255, 255, 0.15);
    --Dash-Fill-Weak: rgba(255, 255, 255, 0.06);
    --Dash-Fill-Primary-Hover: rgba(255, 255, 255, 0.08);
    --Dash-Fill-Primary-Active: rgba(255, 255, 255, 0.12);
    --Dash-Fill-Disabled: rgba(255, 255, 255, 0.2);
    --Dash-Text-Disabled: rgba(255, 255, 255, 0.3);
    --Dash-Text-Weak: rgba(255, 255, 255, 0.3);
}

.dmc {
    --Dash-Stroke-Strong: var(--mantine-color-default-border);
    --Dash-Stroke-Weak: var(--mantine-color-disabled);
    --Dash-Fill-Interactive-Strong: var(--mantine-primary-color-filled);
    --Dash-Fill-Inverse-Strong: var(--mantine-color-body);
    --Dash-Text-Primary: var(--mantine-color-text);
    --Dash-Text-Strong: var(--mantine-color-text);
    --Dash-Text-Disabled: var(--mantine-color-dimmed);
    --Dash-Text-Weak: var(--mantine-color-dimmed);
}

html[data-mantine-color-scheme="dark"] .dmc {
    --Dash-Fill-Inverse-Strong: var(--mantine-color-dark-6);
    --Dash-Fill-Weak: rgba(255, 255, 255, 0.06);
    --Dash-Fill-Primary-Hover: rgba(255, 255, 255, 0.08);
    --Dash-Fill-Primary-Active: rgba(255, 255, 255, 0.12);
    --Dash-Fill-Disabled: rgba(255, 255, 255, 0.15);
}

.app-shell {
    padding-top: 1rem;
    padding-bottom: 3rem;
}

.title-top-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.toolbar-title {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
    margin-bottom: 0.7rem;
}

.title-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--bs-primary) 10%, transparent);
    background: color-mix(in srgb, var(--bs-tertiary-bg) 38%, transparent);
    opacity: 0.88;
}

.title-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
}

.title-heading-row .card-title {
    min-width: 0;
}

@media (max-width: 768px) {
    .title-top-row {
        align-items: center;
    }

    .title-heading-row {
        align-items: flex-start;
    }
}

.toolbar-subtitle {
    font-size: 0.98rem;
    font-weight: 600;
}

#title-card,
.grid-card,
.glossary-card {
    border: 1px solid color-mix(in srgb, var(--bs-primary) 16%, var(--bs-border-color));
    border-radius: 1.4rem;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bs-primary) 7%, transparent), transparent 9rem),
        var(--bs-card-bg);
    box-shadow: 0 20px 45px -30px rgba(0, 0, 0, 0.45);
}

#title-card {
    overflow: hidden;
}

#title-card .card-body {
    padding: 1.5rem;
}

.title-kicker {
    margin-bottom: 0.55rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.title-metrics,
.title-links,
.sheet-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem;
}

.title-metrics {
    margin-bottom: 1rem;
}

.metric-pill,
.sheet-pill {
    padding: 0.52rem 0.82rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--bs-primary) 14%, var(--bs-border-color));
    background: color-mix(in srgb, var(--bs-tertiary-bg) 82%, transparent);
    color: var(--bs-body-color);
    font-weight: 600;
}

.sheet-pill-primary {
    background: color-mix(in srgb, var(--bs-primary) 16%, transparent);
}

.title-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.82rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--bs-primary) 14%, var(--bs-border-color));
    background: color-mix(in srgb, var(--bs-tertiary-bg) 82%, transparent);
}

html[data-mantine-color-scheme="light"] .metric-pill,
html[data-mantine-color-scheme="light"] .sheet-pill,
html[data-mantine-color-scheme="light"] .title-link {
    border-color: color-mix(in srgb, var(--bs-primary) 18%, #cfd8d5);
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, white 92%, var(--bs-primary) 8%),
            color-mix(in srgb, white 86%, var(--bs-primary) 14%)
        );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        0 10px 22px -20px rgba(63, 143, 132, 0.55);
}

html[data-mantine-color-scheme="light"] .sheet-pill-primary {
    border-color: color-mix(in srgb, var(--bs-primary) 28%, #cfd8d5);
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, white 76%, var(--bs-primary) 24%),
            color-mix(in srgb, white 66%, var(--bs-primary) 34%)
        );
}

html[data-mantine-color-scheme="dark"] .metric-pill,
html[data-mantine-color-scheme="dark"] .sheet-pill,
html[data-mantine-color-scheme="dark"] .title-link {
    border-color: color-mix(in srgb, var(--bs-primary) 20%, rgba(255, 255, 255, 0.18));
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, white 10%, var(--bs-tertiary-bg)),
            color-mix(in srgb, var(--bs-tertiary-bg) 82%, black 18%)
        );
    color: color-mix(in srgb, white 88%, var(--bs-body-color));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 14px 28px -24px rgba(0, 0, 0, 0.7);
}

html[data-mantine-color-scheme="light"] .title-theme-toggle {
    border-color: color-mix(in srgb, var(--bs-primary) 12%, #d7e2de);
    background: color-mix(in srgb, white 72%, var(--bs-tertiary-bg));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

html[data-mantine-color-scheme="dark"] .title-theme-toggle {
    border-color: color-mix(in srgb, var(--bs-primary) 18%, rgba(255, 255, 255, 0.12));
    background: color-mix(in srgb, white 4%, var(--bs-tertiary-bg));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html[data-mantine-color-scheme="dark"] .sheet-pill-primary {
    border-color: color-mix(in srgb, var(--bs-primary) 34%, rgba(255, 255, 255, 0.16));
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--bs-primary) 26%, var(--bs-tertiary-bg)),
            color-mix(in srgb, var(--bs-primary) 16%, black 84%)
        );
}

.title-link a {
    color: inherit;
    text-decoration: none;
}

.title-link a:hover {
    text-decoration: underline;
}

.grid-caption {
    color: var(--bs-secondary-color);
}

#laundry-grid .ag-floating-filter-body {
    min-width: 0;
}

.laundry-floating-filter {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    width: 100%;
    padding: 0 0.25rem;
}

.laundry-floating-filter-trigger,
.laundry-floating-filter-clear,
.laundry-set-filter-action {
    appearance: none;
    border: 0;
    color: inherit;
}

.laundry-floating-filter-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    width: 100%;
    min-width: 0;
    height: 1.9rem;
    padding: 0.36rem 0.65rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bs-tertiary-bg) 88%, transparent);
    color: var(--ag-foreground-color);
    font-size: 0.83rem;
    line-height: 1;
    text-align: left;
    transition:
        background-color 140ms ease,
        box-shadow 140ms ease;
}

.laundry-floating-filter.is-active .laundry-floating-filter-trigger {
    background: color-mix(in srgb, var(--bs-primary) 14%, var(--bs-tertiary-bg));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bs-primary) 18%, transparent);
}

.laundry-floating-filter-trigger:hover,
.laundry-floating-filter-trigger:focus-visible,
.laundry-floating-filter-clear:hover,
.laundry-floating-filter-clear:focus-visible,
.laundry-set-filter-action:hover,
.laundry-set-filter-action:focus-visible {
    outline: none;
    background: color-mix(in srgb, var(--bs-primary) 10%, var(--bs-tertiary-bg));
}

.laundry-floating-filter-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.laundry-floating-filter-caret {
    flex: none;
    color: var(--bs-secondary-color);
    font-size: 0.7rem;
}

.laundry-floating-filter-clear {
    flex: none;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bs-tertiary-bg) 88%, transparent);
    color: var(--bs-secondary-color);
    font-size: 1rem;
    line-height: 1;
}

.laundry-set-filter-menu {
    display: grid;
    gap: 0.8rem;
    min-width: 16rem;
    padding: 0.75rem;
    color: var(--ag-foreground-color);
}

.laundry-set-filter-search {
    width: 100%;
    padding: 0.58rem 0.75rem;
    border: 1px solid color-mix(in srgb, var(--bs-primary) 14%, var(--bs-border-color));
    border-radius: 0.8rem;
    background: color-mix(in srgb, var(--bs-tertiary-bg) 90%, transparent);
    color: inherit;
    font: inherit;
}

.laundry-set-filter-search:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--bs-primary) 38%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bs-primary) 14%, transparent);
}

.laundry-set-filter-actions {
    display: flex;
    gap: 0.5rem;
}

.laundry-set-filter-action {
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bs-tertiary-bg) 90%, transparent);
    font-size: 0.82rem;
    font-weight: 600;
}

.laundry-set-filter-list {
    display: grid;
    gap: 0.35rem;
    max-height: 16rem;
    overflow: auto;
    padding-right: 0.1rem;
}

.laundry-set-filter-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.48rem 0.6rem;
    border-radius: 0.8rem;
    background: color-mix(in srgb, var(--bs-tertiary-bg) 72%, transparent);
    cursor: pointer;
}

.laundry-set-filter-option:hover {
    background: color-mix(in srgb, var(--bs-primary) 10%, var(--bs-tertiary-bg));
}

.laundry-set-filter-option input {
    margin: 0;
    accent-color: var(--bs-primary);
}

.laundry-set-filter-empty {
    padding: 0.4rem 0;
    color: var(--bs-secondary-color);
}

#laundry-grid .ag-root-wrapper,
#laundry-grid .ag-header,
#laundry-grid .ag-floating-filter {
    border-color: color-mix(in srgb, var(--bs-primary) 12%, var(--bs-border-color));
}

#laundry-grid.ag-theme-quartz,
.laundry-grid-theme {
    --ag-font-family: var(--mantine-font-family);
    --ag-font-size: 0.95rem;
    --ag-border-color: color-mix(in srgb, var(--bs-primary) 12%, var(--bs-border-color));
    --ag-row-border-color: color-mix(in srgb, var(--bs-primary) 8%, var(--bs-border-color));
    --ag-background-color: var(--mantine-color-body);
    --ag-foreground-color: var(--mantine-color-text);
    --ag-header-background-color: color-mix(in srgb, var(--bs-tertiary-bg) 92%, transparent);
    --ag-header-foreground-color: var(--mantine-color-text);
    --ag-odd-row-background-color: color-mix(in srgb, var(--bs-tertiary-bg) 45%, transparent);
    --ag-row-hover-color: color-mix(in srgb, var(--bs-primary) 7%, transparent);
    --ag-selected-row-background-color: color-mix(in srgb, var(--bs-primary) 10%, transparent);
    --ag-checkbox-background-color: color-mix(in srgb, var(--bs-tertiary-bg) 85%, transparent);
    --ag-checkbox-checked-color: var(--bs-primary);
    --ag-checkbox-unchecked-color: color-mix(in srgb, var(--bs-secondary-color) 55%, var(--bs-border-color));
    --ag-input-focus-border-color: color-mix(in srgb, var(--bs-primary) 60%, transparent);
    --ag-borders: solid 1px;
    --ag-wrapper-border-radius: 1rem;
}

#laundry-grid .ag-root-wrapper {
    border-radius: 1rem;
    overflow: hidden;
}

#laundry-grid .ag-row-hover::before {
    background-color: color-mix(in srgb, var(--bs-primary) 7%, transparent);
}

#laundry-grid .glossary-header .ag-header-cell-text::after {
    content: "i";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.95rem;
    height: 0.95rem;
    margin-left: 0.35rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--bs-primary) 24%, var(--bs-border-color));
    background: color-mix(in srgb, var(--bs-primary) 12%, transparent);
    color: color-mix(in srgb, var(--bs-primary) 82%, var(--bs-body-color));
    font-size: 0.64rem;
    font-style: normal;
    font-weight: 800;
    line-height: 1;
    vertical-align: text-top;
}

html[data-mantine-color-scheme="dark"] #laundry-grid .glossary-header .ag-header-cell-text::after {
    border-color: color-mix(in srgb, var(--bs-primary) 36%, rgba(255, 255, 255, 0.18));
    background: color-mix(in srgb, var(--bs-primary) 18%, rgba(255, 255, 255, 0.02));
    color: color-mix(in srgb, white 74%, var(--bs-primary));
}

.flag-column {
    font-weight: 700;
}

.notes-column {
    line-height: 1.45;
}

#product-modal .modal-content {
    border: 1px solid color-mix(in srgb, var(--bs-primary) 14%, var(--bs-border-color));
    border-radius: 1.2rem;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bs-primary) 6%, transparent), transparent 8rem),
        var(--bs-card-bg);
    box-shadow: 0 24px 55px -34px rgba(0, 0, 0, 0.5);
}

#product-modal .modal-header,
#product-modal .modal-body,
#product-modal .modal-footer {
    padding-left: 1rem;
    padding-right: 1rem;
}

#product-modal .modal-header {
    padding-top: 0.9rem;
    padding-bottom: 0.65rem;
    border-bottom-color: color-mix(in srgb, var(--bs-primary) 10%, var(--bs-border-color));
}

#product-modal .modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.25;
}

#product-modal .modal-body {
    padding-top: 0.75rem;
    padding-bottom: 0.9rem;
}

#product-modal .modal-footer {
    padding-top: 0.65rem;
    padding-bottom: 0.9rem;
    border-top-color: color-mix(in srgb, var(--bs-primary) 10%, var(--bs-border-color));
}

html[data-mantine-color-scheme="dark"] #product-modal .modal-content {
    border-color: color-mix(in srgb, var(--bs-primary) 28%, rgba(255, 255, 255, 0.16));
    background:
        linear-gradient(180deg, color-mix(in srgb, white 5%, var(--bs-tertiary-bg)), transparent 8rem),
        color-mix(in srgb, var(--bs-card-bg) 90%, black 10%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 28px 60px -34px rgba(0, 0, 0, 0.78);
}

html[data-mantine-color-scheme="dark"] #product-modal .modal-title {
    color: color-mix(in srgb, white 92%, var(--bs-body-color));
}

.product-detail-body {
    display: grid;
    gap: 0.65rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 0.55rem;
}

.detail-item {
    min-width: 0;
    padding: 0.62rem 0.75rem;
    border-radius: 0.9rem;
    border: 1px solid color-mix(in srgb, var(--bs-primary) 10%, var(--bs-border-color));
    background: color-mix(in srgb, var(--bs-tertiary-bg) 82%, transparent);
}

html[data-mantine-color-scheme="dark"] .detail-item {
    border-color: color-mix(in srgb, var(--bs-primary) 20%, rgba(255, 255, 255, 0.14));
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, white 5%, var(--bs-tertiary-bg)),
            color-mix(in srgb, var(--bs-tertiary-bg) 76%, black 24%)
        );
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.detail-item-boolean {
    gap: 0.35rem;
}

.detail-item-wide {
    grid-column: 1 / -1;
}

.detail-term {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

html[data-mantine-color-scheme="dark"] .detail-term {
    color: color-mix(in srgb, white 62%, var(--bs-secondary-color));
}

.detail-value {
    margin-top: 0.18rem;
    white-space: pre-line;
    line-height: 1.34;
}

html[data-mantine-color-scheme="dark"] .detail-value {
    color: color-mix(in srgb, white 92%, var(--bs-body-color));
}

.detail-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin-top: 0.3rem;
    padding: 0.3rem 0.58rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
}

.detail-badge-yes {
    border-color: color-mix(in srgb, var(--bs-primary) 24%, transparent);
    background: color-mix(in srgb, var(--bs-primary) 16%, transparent);
    color: var(--bs-primary);
}

.detail-badge-no {
    border-color: color-mix(in srgb, var(--bs-secondary-color) 22%, var(--bs-border-color));
    background: color-mix(in srgb, var(--bs-secondary-color) 12%, transparent);
    color: color-mix(in srgb, var(--bs-body-color) 82%, var(--bs-secondary-color));
}

html[data-mantine-color-scheme="dark"] .detail-badge-yes {
    border-color: color-mix(in srgb, var(--bs-primary) 38%, rgba(255, 255, 255, 0.08));
    background: color-mix(in srgb, var(--bs-primary) 24%, transparent);
    color: color-mix(in srgb, white 76%, var(--bs-primary));
}

html[data-mantine-color-scheme="dark"] .detail-badge-no {
    border-color: color-mix(in srgb, white 14%, var(--bs-border-color));
    background: color-mix(in srgb, white 7%, transparent);
    color: color-mix(in srgb, white 82%, var(--bs-body-color));
}

.detail-empty {
    color: var(--bs-secondary-color);
}

.detail-section {
    display: grid;
    gap: 0.65rem;
    padding: 0.8rem 0.85rem;
    border-radius: 1rem;
    border: 1px solid color-mix(in srgb, var(--bs-primary) 10%, var(--bs-border-color));
    background: color-mix(in srgb, var(--bs-tertiary-bg) 56%, transparent);
}

html[data-mantine-color-scheme="dark"] .detail-section {
    border-color: color-mix(in srgb, var(--bs-primary) 20%, rgba(255, 255, 255, 0.14));
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, white 5%, var(--bs-tertiary-bg)),
            color-mix(in srgb, var(--bs-tertiary-bg) 82%, black 18%)
        );
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.detail-section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.detail-section-title {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.detail-section-meta {
    font-size: 0.82rem;
    color: var(--bs-secondary-color);
}

html[data-mantine-color-scheme="dark"] .detail-section-title,
html[data-mantine-color-scheme="dark"] .detail-section-meta {
    color: color-mix(in srgb, white 68%, var(--bs-secondary-color));
}

.detail-section-body {
    display: grid;
    gap: 0.7rem;
}

.detail-section-note {
    color: var(--bs-secondary-color);
    line-height: 1.4;
}

.source-card-grid {
    display: grid;
    gap: 0.65rem;
}

.source-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.source-card,
.ingredient-item {
    display: grid;
    gap: 0.45rem;
    padding: 0.72rem 0.78rem;
    border-radius: 0.9rem;
    border: 1px solid color-mix(in srgb, var(--bs-primary) 10%, var(--bs-border-color));
    background: color-mix(in srgb, var(--bs-card-bg) 92%, var(--bs-tertiary-bg));
}

html[data-mantine-color-scheme="dark"] .source-card,
html[data-mantine-color-scheme="dark"] .ingredient-item {
    border-color: color-mix(in srgb, var(--bs-primary) 18%, rgba(255, 255, 255, 0.12));
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, white 4%, var(--bs-card-bg)),
            color-mix(in srgb, var(--bs-card-bg) 82%, black 18%)
        );
}

.source-card-header,
.ingredient-header {
    display: grid;
    gap: 0.45rem;
}

.source-card-title,
.ingredient-name {
    font-weight: 700;
    line-height: 1.3;
}

.source-card-meta,
.ingredient-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
}

.source-card-meta-item,
.ingredient-meta-item {
    color: var(--bs-secondary-color);
    line-height: 1.35;
}

html[data-mantine-color-scheme="dark"] .source-card-meta-item,
html[data-mantine-color-scheme="dark"] .ingredient-meta-item,
html[data-mantine-color-scheme="dark"] .detail-section-note {
    color: color-mix(in srgb, white 72%, var(--bs-secondary-color));
}

.detail-chip-list,
.detail-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.detail-chip,
.detail-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 0.28rem 0.56rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--bs-primary) 18%, var(--bs-border-color));
    background: color-mix(in srgb, var(--bs-primary) 10%, transparent);
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1;
}

.detail-link {
    color: var(--bs-link-color);
    text-decoration: none;
}

.detail-link:hover {
    color: var(--bs-link-hover-color);
}

html[data-mantine-color-scheme="dark"] .detail-chip,
html[data-mantine-color-scheme="dark"] .detail-link {
    border-color: color-mix(in srgb, var(--bs-primary) 22%, rgba(255, 255, 255, 0.12));
    background: color-mix(in srgb, var(--bs-primary) 18%, transparent);
}

.ingredients-column {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ingredient-scroll-region {
    max-height: min(50vh, 28rem);
    overflow: auto;
    padding-right: 0.2rem;
}

.ingredient-list {
    display: grid;
    gap: 0.55rem;
}

.glossary-card .card-body {
    padding: 1rem;
}

.glossary-sections {
    display: grid;
    gap: 0.7rem;
}

.glossary-section {
    padding: 0.85rem 0.9rem;
    border-radius: 1rem;
    border: 1px solid color-mix(in srgb, var(--bs-primary) 10%, var(--bs-border-color));
    background: color-mix(in srgb, var(--bs-tertiary-bg) 62%, transparent);
}

.glossary-section-title {
    margin-bottom: 0.65rem;
    font-size: 0.92rem;
    font-weight: 700;
}

.glossary-term {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.glossary-list {
    display: grid;
    gap: 0.65rem;
}

.glossary-entry {
    display: grid;
    grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
    gap: 0.25rem 0.85rem;
    align-items: start;
}

.glossary-entry + .glossary-entry {
    padding-top: 0.65rem;
    border-top: 1px solid var(--bs-border-color);
}

.glossary-definition {
    margin-top: 0;
    min-width: 0;
    line-height: 1.38;
    color: var(--bs-body-color);
}

@media (max-width: 767.98px) {
    .top-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    #title-card .card-body {
        padding: 1.2rem;
    }

    .metric-pill,
    .sheet-pill,
    .title-link {
        width: 100%;
        justify-content: center;
    }

    .glossary-card .card-body {
        padding: 0.9rem;
    }

    .glossary-section {
        padding: 0.75rem 0.8rem;
    }

    .glossary-section-title {
        margin-bottom: 0.55rem;
        font-size: 0.88rem;
    }

    .glossary-entry {
        grid-template-columns: 1fr;
        gap: 0.12rem;
    }

    .glossary-entry + .glossary-entry {
        padding-top: 0.55rem;
    }

    .glossary-definition {
        font-size: 0.96rem;
    }
}
