.project-main {
    padding: 36px 0 110px;
}

.ratio-wrap {
    margin: 0 auto;
    aspect-ratio: auto;
    min-height: calc(var(--page-width) * 11 / 8.5);
}

.ratio-header {
    margin: 0 auto 2.5em;
}

.ratio-eyebrow {
    color: var(--paper-muted);
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: lowercase;
    margin: 0 0 22px;
    text-align: center;
}

.ratio-header h1 {
    margin: 0 0 1.4em;
    font-family: var(--serif);
    font-size: clamp(1.375rem, 3.4vw, 1.75rem);
    font-weight: 400;
    line-height: 1.2;
    text-align: center;
}

.ratio-lede {
    margin: 0 0 1.2em;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 0.9375rem;
    font-style: normal;
    line-height: 1.62;
    text-align: left;
    text-rendering: optimizeLegibility;
}

.ratio-lede:last-child {
    margin-bottom: 0;
}

.ratio-readout {
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: var(--paper-muted);
    text-align: center;
    margin: 0 0 18px;
}

.ratio-readout b {
    color: var(--ink);
    font-weight: 400;
}

/* Preference squares — unchanged from original */
.stage {
    display: flex;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--line);
    background: #eeeae0;
    position: relative;
}

.versus {
    width: 46px;
    flex: 0 0 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 0.625rem;
    letter-spacing: 0.12em;
    color: var(--paper-muted);
    background:
        linear-gradient(var(--line), var(--line)) center/1px 100% no-repeat;
}

.panel {
    flex: 1 1 0;
    border: 0;
    background: transparent;
    padding: 28px 22px 18px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    font: inherit;
    color: inherit;
    transition: background-color 120ms ease;
}

.panel:hover { background: rgba(23, 25, 27, 0.05); }
.panel:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.panel:active { background: rgba(23, 25, 27, 0.1); }

.bar {
    width: 100%;
    max-width: 300px;
    height: 130px;
    display: flex;
    border: 1px solid var(--ink);
}

.seg { height: 100%; }
.segA { background: #262a33; }
.segB { background: #b6ae96; }

.tag {
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    color: var(--paper-muted);
}

.ratio-hint {
    text-align: left;
    font-family: var(--serif);
    font-size: 0.9375rem;
    font-style: normal;
    line-height: 1.62;
    color: var(--ink);
    margin: 16px 0 0;
}

.ratio-hint kbd {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.75rem;
    font-style: normal;
    line-height: 1;
    color: var(--ink);
    border: 1px solid var(--line);
    padding: 3px 7px 4px;
    margin: 0 2px;
    min-width: 1.6em;
}

.ratio-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
}

.ratio-ctl {
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
    text-transform: lowercase;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 9px 16px;
    cursor: pointer;
    transition: background-color 120ms ease, color 120ms ease;
}

.ratio-ctl:hover {
    background: var(--ink);
    color: var(--paper);
}

.ratio-ctl:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

#results {
    margin-top: 8px;
}

.results-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid #d8d3c6;
    padding-bottom: 10px;
    margin-bottom: 6px;
}

.results-head h2 {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 400;
    margin: 0;
}

.results-head span {
    font-family: var(--mono);
    font-size: 0.6875rem;
    color: var(--paper-muted);
}

.row {
    display: grid;
    grid-template-columns: 22px 84px 1fr 62px;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #d8d3c6;
}

.row .rank {
    font-family: var(--mono);
    font-size: 0.6875rem;
    color: var(--paper-muted);
}

.row .label {
    font-family: var(--mono);
    font-size: 0.75rem;
}

.row .label small {
    display: block;
    color: var(--paper-muted);
    font-size: 0.625rem;
    margin-top: 1px;
}

.row .track {
    background: #d8d3c6;
    height: 12px;
    position: relative;
    overflow: hidden;
    border: 1px solid #c4bfb0;
}

.row .fill {
    background: var(--ink);
    height: 100%;
}

.row .val {
    font-family: var(--mono);
    font-size: 0.6875rem;
    text-align: right;
    color: var(--paper-muted);
}

.row.phi {
    background: rgba(23, 25, 27, 0.06);
}

.row.phi .fill {
    background: var(--ink);
}

.row.phi .label {
    font-weight: 600;
}

.ratio-verdict {
    font-family: var(--serif);
    font-size: 0.9375rem;
    line-height: 1.62;
    margin: 18px 0 0;
    padding: 14px 16px;
    border-left: 1px solid var(--ink);
    color: var(--paper-muted);
}

.ratio-method {
    margin-top: 26px;
    font-family: var(--serif);
    font-size: 0.9375rem;
    line-height: 1.62;
    color: var(--paper-muted);
}

.ratio-method summary {
    cursor: pointer;
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    color: var(--ink);
    margin-bottom: 8px;
}

.ratio-method p {
    margin: 0.6em 0 0;
    text-indent: 0;
}

[hidden] {
    display: none !important;
}

@media (max-width: 600px) {
    .ratio-wrap {
        margin-inline: -6px;
    }

    .stage {
        flex-direction: column;
    }

    .versus {
        width: auto;
        flex-basis: auto;
        height: 32px;
        background: linear-gradient(90deg, var(--line), var(--line)) center/100% 1px no-repeat;
    }

    .row {
        grid-template-columns: 18px 70px 1fr 50px;
    }
}
