html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #36bd3a;
    border-color: #084110;
    padding: 4px;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.pgi-header__brand {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.pgi-header__logo {
    width: 28px;
    height: 28px;
}
/* --- chips container stays the same --- */
.ft-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem
}

/* Base chip: OUTLINE using the band color (via currentColor) */
.ft-chip {
    border: 2px solid currentColor; /* outline when off */
    border-radius: 999px;
    background: transparent; /* off = transparent */
    color: inherit; /* uses band color */
    padding: .35rem .6rem;
    display: inline-flex;
    gap: .45rem;
    align-items: baseline;
    font-size: .85rem;
    font-weight: 700;
    line-height: 1;
    transition: background .12s,color .12s,transform .06s,border-color .12s;
}

    .ft-chip .title {
        font-weight: 700
    }

    .ft-chip .range {
        opacity: .85;
        font-size: .8em
    }

    .ft-chip:active {
        transform: translateY(1px)
    }

    .ft-chip:focus-visible {
        outline: 3px solid rgba(0,0,0,.1);
        outline-offset: 2px
    }
.ft-clear {
    border: 2px solid currentColor; /* outline when off */
    border-radius: 999px;
    background: transparent; /* off = transparent */
    color: inherit; /* uses band color */
    padding: .35rem .6rem;
    display: inline-flex;
    gap: .45rem;
    align-items: baseline;
    font-size: .85rem;
    font-weight: 700;
    line-height: 1;
    transition: background .12s,color .12s,transform .06s,border-color .12s;
}

/* Band colors (off state uses text/border color) */
.band-0 {
    color: #178a3f
}

.band-1 {
    color: #23b15e
}

.band-2 {
    color: #78d27e
}

.band-3 {
    color: #ffd23a
}

.band-4 {
    color: #ff8a2a
}

.band-5 {
    color: #e23a2e
}

.clear-band-6 {
    color: #695e5d
}
/* ON state: fill with band color and flip text for contrast */
.ft-chip.on {
    border-color: transparent
}

.band-0.on {
    background: #178a3f;
    color: #fff
}

.band-1.on {
    background: #23b15e;
    color: #fff
}

.band-2.on {
    background: #78d27e;
    color: #0b2e12
}
/* darker text for yellow-green */
.band-3.on {
    background: #ffd23a;
    color: #3a2a00
}

.band-4.on {
    background: #ff8a2a;
    color: #2a1500
}

.band-5.on {
    background: #e23a2e;
    color: #fff
}

.clear-band-6.on {
    background: #695e5d;
    color: lightgray;
}
/* Optional hover polish */
.ft-chip:not(.on):hover {
    background: rgba(0,0,0,.03)
}

.ft-icon {
    margin-right: .4rem;
    font-size: 1.05em;
}
/* Column widths (moved out of Razor) */
th.col-food {
    width: 40%;
}

th.col-type {
    width: 35%;
}

th.col-total {
    width: 10%;
}
th.col-total-purines {
    width: 12%;
    text-align: right;
}
th.col-total-uric {
    width: 12%;
    text-align: right;
}

th.col-ua {
    width: 10%;
}

th.col-hx {
    width: 6%;
}

th.col-risk {
    width: 6%;
}

th.col-actions {
    width: 8%;
}
 
/* Cells & pills */
.pgi-foodcell {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.pgi-foodname {
    font-weight: 700;
}

.pill {
    display: inline-block;
    min-width: 2rem;
    padding: .25rem .5rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: .9rem;
}

    .pill.ua {
        background: #e9f6ea;
        color: #1b5e20;
    }

        .pill.ua.na {
            opacity: .6;
        }

    .pill.hx {
        background: #e6e8ff;
        color: #364fc7;
    }

        .pill.hx.na {
            background: #f3f4f6;
            color: #7a7a7a;
        }

.pgi-btn-secondary {
    padding: .35rem .7rem;
    border: 1px solid #ddd;
    border-radius: .75rem;
    background: #fff;
    cursor: pointer;
}

    .pgi-btn-secondary:hover {
        background: #f7f7f7;
    }
.purine-details-row td {
    background: #f6f8fa;
    border-bottom: 2px solid #e2e5ea;
    padding: 0.75rem 1.5rem;
    transition: background 0.2s;
}

.purine-details-table th {
    font-weight: 500;
    color: #495057;
    background: none;
    border: none;
    padding-right: 1rem;
    text-align: left;
}

.purine-details-table td {
    color: #212529;
    background: none;
    border: none;
    padding-right: 2rem;
    text-align: right;
}

.purine-details-table tr {
    border: none;
}

.purine-details-table {
    margin-bottom: 0;
    width: 100%;
}

.purine-details-row {
    animation: fadeIn 0.25s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.purine-chevron {
    display: inline-block;
    margin-left: 6px;
    color: #888;
    font-size: 1.1em;
    transition: transform 0.2s;
    user-select: none;
}

    .purine-chevron.expanded {
        transform: rotate(180deg);
    }

.ft-table th, .ft-table td {
    border: none;
    padding: 0.5rem 0.75rem;
}

.ft-table th {
    background: #f0f2f5;
    font-weight: 600;
    color: #333;
}

.ft-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}
.sort-glyph {
    margin-left: .25rem;
    font-size: .9em;
}

.sort-glyph-muted {
    opacity: .45;
}
.ft-mobile-sort {
    margin: .25rem 0 .5rem;
}

    .ft-mobile-sort .form-select {
        min-width: 9.5rem;
    }

/* Header stays on ONE line */
.pgi-header { /* your header container */
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .1rem .2rem;
}

    .pgi-header .brand { /* wraps logo + title */
        display: flex;
        align-items: center;
        gap: .5rem;
        flex: 1 1 auto; /* take remaining space */
        min-width: 0; /* REQUIRED for ellipsis */
    }

    .pgi-header .title { /* the long text */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis; /* … when it doesn’t fit */
    }

    .pgi-header .dataset-pill { /* “USDA/ODS 2025” link */
        flex: 0 0 auto;
        white-space: nowrap;
        padding: .2rem .5rem;
        border-radius: 999px;
        border: 1px solid rgba(255,255,255,.25);
        background: rgba(255,255,255,.12);
        color: #fff;
        text-decoration: none;
        font-size: .8rem;
    }

    .pgi-header .menu-btn { /* the hamburger */
        flex: 0 0 auto;
        background: none;
        border: 0;
        color: #fff;
        font-size: 1.25rem;
        line-height: 1;
    }

/* If the screen is VERY narrow, hide the dataset pill */
@media (max-width: 380px) {
    .pgi-header .dataset-pill {
        display: none;
    }
}
/* wwwroot/css/refs.css (or alongside your page CSS) */
.refs {
    padding: 1rem;
}

.refs-title {
    font-size: 1.125rem;
    margin: 0;
    color: #5ccd62;
}

.refs-toolbar {
    display: flex;
    gap: .75rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}

.refs-controls {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.refs-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: 1fr; /* mobile */
}

@media (min-width: 576px) {
    .refs-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 992px) {
    .refs-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.ref-card {
    display: flex;
    gap: .75rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: .5rem;
    padding: .75rem;
}

.ref-code {
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: #f1f3f5;
    color: #111;
    font-weight: 600;
    display: grid;
    place-items: center;
}

.ref-body {
    min-width: 0;
}

.ref-desc {
    font-size: .95rem;
    line-height: 1.35;
    margin-bottom: .25rem;
    word-break: break-word;
}

.ref-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: .5rem;
    row-gap: .125rem;
    font-size: .85rem;
    color: #555;
}

    .ref-meta > div {
        display: contents;
    }

    .ref-meta dt {
        font-weight: 600;
        color: #444;
    }

.ref-notes {
    margin-top: .25rem;
    font-size: .85rem;
    color: #555;
}

.refs-footnote {
    margin-top: .75rem;
    font-size: .85rem;
    color: #6c757d;
}
:root {
    /* Brand palette (tweak these to match your PG brand) */
    --pg-blue-1: #0083B0; /* primary */
    --pg-blue-2: #00B4DB; /* accent */
    --pg-amber-1: #f0b800; /* alcohol family */
    --pg-amber-2: #ff8200;
    --pg-crimson-1: #C70039; /* meat family */
    --pg-crimson-2: #E9685D;
    --pg-slate-1: #485460; /* neutral/beans */
    --pg-slate-2: #6c757d;
    /* Card look & depth */
    --card-radius: 1.25rem;
    --card-shadow: 0 6px 20px rgba(0,0,0,.08);
    --card-shadow-active: 0 10px 24px rgba(0,0,0,.12);
}

/* Soft, on-brand gradients used by tab backgrounds */
.bg-seafood {
    --card-bg: linear-gradient(140deg, color-mix(in oklab, var(--pg-blue-2) 18%, transparent), color-mix(in oklab, var(--pg-blue-1) 14%, transparent));
}

.bg-meat {
    --card-bg: linear-gradient(140deg, color-mix(in oklab, var(--pg-crimson-2) 20%, transparent), color-mix(in oklab, var(--pg-crimson-1) 14%, transparent));
}

.bg-alcohol {
    --card-bg: linear-gradient(140deg, color-mix(in oklab, var(--pg-amber-1) 22%, transparent), color-mix(in oklab, var(--pg-amber-2) 12%, transparent));
}

.bg-beans {
    --card-bg: linear-gradient(140deg, color-mix(in oklab, var(--pg-slate-2) 16%, transparent), color-mix(in oklab, var(--pg-slate-1) 10%, transparent));
}
