.protein-page {
    background: #f4efe6;
    color: #18211b;
}

.protein-wrap {
    width: min(100% - 2rem, 56rem);
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.protein-home-link,
.protein-data-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: #18211b;
    font-weight: 700;
}

.protein-data-link {
    margin-left: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: .75rem;
}

.protein-card {
    padding: clamp(1.5rem, 5vw, 4rem);
    border: 3px solid #18211b;
    background: #f7c948;
    box-shadow: 12px 12px 0 #e85d04;
}

.protein-kicker,
.protein-result-label {
    margin: 0 0 .5rem;
    color: #b23a48;
    font-family: 'JetBrains Mono', monospace;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.protein-card h1 {
    max-width: 10ch;
    margin: 0 0 1rem;
    color: #18211b;
    font-size: clamp(3.5rem, 12vw, 7rem);
    line-height: .82;
    letter-spacing: -.09em;
    text-transform: lowercase;
    text-shadow: 6px 6px 0 #90be6d;
}

.protein-intro {
    max-width: 36rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.protein-form {
    display: grid;
    gap: .75rem;
    max-width: 28rem;
    margin-top: 2rem;
}

.protein-form label {
    font-weight: 800;
}

.protein-input-row {
    display: flex;
}

.protein-input-row input,
.protein-input-row select {
    min-height: 3.25rem;
    border: 3px solid #18211b;
    background: #fffdf5;
    color: #18211b;
    font: inherit;
}

.protein-input-row input {
    width: 80%;
    min-width: 0;
    padding: .75rem 1rem;
}

.protein-input-row select {
    width: 20%;
    padding: 0 .35rem;
    border-left: 0;
    font-size: .85rem;
    font-weight: 800;
}

.protein-button {
    min-height: 3.25rem;
    border: 3px solid #18211b;
    background: #b23a48;
    color: #fffdf5;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.protein-result {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 3px dashed #18211b;
}

.protein-number {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    margin: 0 0 .5rem;
    color: #b23a48;
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 900;
    line-height: .9;
}

.protein-number span:last-child {
    color: #18211b;
    font-size: 1.2rem;
}

.protein-note,
.protein-source {
    font-size: .9rem;
}

.protein-foods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.protein-food {
    position: relative;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: .75rem;
    min-height: 10rem;
    padding: 1rem;
    border: 3px solid #18211b;
    background: #90be6d;
    transform: rotate(-1deg);
}

.protein-food:nth-child(2) { transform: rotate(2deg); background: #f9844a; }
.protein-food:nth-child(3) { transform: rotate(-2deg); background: #43aa8b; }
.protein-food-variant-3 { background: #c77dff !important; transform: rotate(1deg); }
.protein-food-variant-4 { background: #4cc9f0 !important; transform: rotate(-2deg); }
.protein-food-variant-5 { background: #ffafcc !important; transform: rotate(2deg); }
.protein-food-variant-6 { background: #a7c957 !important; transform: rotate(-1deg); }
.protein-food-variant-7 { background: #f9c74f !important; transform: rotate(1deg); }
.protein-food-main { align-self: center; display: grid; gap: .35rem; }
.protein-food-main strong { font-size: 1.5rem; }
.protein-food-main span { font-weight: 700; }
.protein-replace {
    position: absolute;
    top: .45rem;
    left: .45rem;
    padding: .12rem .3rem;
    border: 1px solid #18211b;
    background: transparent;
    color: #18211b;
    cursor: pointer;
    font: inherit;
    font-size: .65rem;
    font-weight: 800;
    line-height: 1;
    text-transform: lowercase;
}
.protein-replace:hover { background: #fffdf5; }
.protein-check {
    position: absolute;
    top: .6rem;
    right: .6rem;
    display: flex;
    align-items: center;
    gap: .25rem;
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
}
.protein-check input { accent-color: #b23a48; }
.protein-food-controls {
    display: flex;
    gap: .5rem;
    padding-top: .75rem;
    border-top: 2px solid rgba(24, 33, 27, .55);
}
.protein-adjust {
    flex: 1;
    padding: .45rem .35rem;
    border: 2px solid #18211b;
    background: #fffdf5;
    color: #18211b;
    cursor: pointer;
    font: inherit;
    font-size: .8rem;
    font-weight: 800;
    text-transform: lowercase;
}
.protein-adjust:hover { background: #f7c948; }

.protein-reroll {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: 1.5rem auto 0;
    padding: .65rem 1.5rem;
    border: 2px dashed #18211b;
    background: transparent;
    color: #18211b;
    cursor: pointer;
    font: inherit;
    font-size: .85rem;
    font-weight: 800;
    transition: background 120ms ease;
}

.protein-reroll:hover {
    background: rgba(24, 33, 27, .08);
}

.protein-source {
    max-width: 48rem;
    margin: 2rem 0 0;
    opacity: .75;
}

@media (max-width: 560px) {
    .protein-foods { grid-template-columns: 1fr; }
}
