.calculator { max-width: 1120px; margin: auto; padding: 8.5rem clamp(1.25rem,5vw,4rem) 3rem; }
.calc-intro { margin-bottom: 2rem; }
.calculator :is(h1, h2, h3) { font-variant-numeric: lining-nums; } /* Old-style serif digits make "1M" read as "IM". */
.calc-intro p, .validation p { max-width: 55ch; color: var(--ink-muted); }
.calc-intro h1 { font-size: clamp(3.4rem,7.3vw,6.3rem); }
#scenario { background: var(--bg-elev); border: 1px solid var(--ink-line); padding: clamp(1rem,3vw,2rem); }
.inputs { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.2rem 1.5rem; }
.calculator label { display: grid; gap: .55rem; font-size: .86rem; font-weight: 550; }
.calculator input, .calculator select { width: 100%; min-width: 0; border: 1px solid var(--ink-line); padding: .65rem; border-radius: 2px; background: #fffcf6; color: var(--ink); font: inherit; }
.calculator summary { width: fit-content; cursor: pointer; font-size: .88rem; }
.usage { margin-top: 1rem; }
.usage label { margin-top: .75rem; max-width: 20rem; }
.usage p { max-width: 60ch; margin-top: .5rem; color: var(--ink-muted); font-size: .8rem; }
.comparison-head { margin: 2.5rem 0 1rem; }
.comparison-head h2,.token-cost-chart h2,.hardware h2,.validation h2 { font-size: clamp(2rem,4vw,3.1rem); margin-bottom: .5rem; }
.comparison-head p,.hardware p { color: var(--ink-muted); font-size: .9rem; }
.estimate-note { background: var(--bg-elev); border-left: 3px solid var(--ink-muted); padding: .75rem 1rem; margin-bottom: 1rem; font-size: .9rem; }
.comparison { overflow-x: auto; border: 1px solid var(--ink-line); }
.comparison th + th, .comparison td { border-left: 1px solid var(--ink-line); }
.comparison tr:last-child td, .comparison tbody tr:last-child th { border-bottom: 0; }
.comparison table { width: 100%; min-width: 24rem; border-collapse: collapse; text-align: left; }
.comparison th,.comparison td { padding: 1rem .65rem; border-bottom: 1px solid var(--ink-line); vertical-align: top; }
.comparison thead th { background: var(--bg-deep); font: 500 .75rem var(--mono); }
.comparison tbody th { width: 31%; font-size: .96rem; }
.comparison tbody th small { display: block; color: var(--ink-muted); font-weight: 400; }
.comparison td:nth-child(2) { width: 18%; white-space: nowrap; font: 500 1.15rem var(--mono); }
.comparison td small { display: block; white-space: normal; font: 400 .75rem/1.5 var(--sans); color: var(--ink-muted); }
.comparison td:last-child { font-size: .87rem; }
.payback-note { margin: 0 0 1.25rem; color: var(--ink-muted); font-size: .85rem; }
.token-cost-chart { margin: 1.6rem 0; padding: clamp(1.25rem,3vw,2rem); border: 1px solid var(--ink-line); background: var(--bg-elev); }
.token-cost-chart figcaption p { color: var(--ink-muted); font-size: .9rem; }
.token-cost-chart ul { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: .7rem; }
.token-cost-chart li { display: grid; grid-template-columns: minmax(10rem,13rem) minmax(0,1fr) minmax(6rem,auto); gap: .8rem; align-items: center; font-size: .85rem; }
.token-cost-chart strong { text-align: right; font: 500 .9rem var(--mono); }
.token-cost-chart .cost-bar { display: flex; height: .8rem; background: var(--bg-deep); }
.token-cost-chart :where(.cost-bar span, .key) { background: #456250; }
.token-cost-chart .fill-other { background: #8a8273; }
.token-cost-chart .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.token-cost-chart .fill-hardware { background: repeating-linear-gradient(135deg, #456250 0 2px, #9fb3a5 2px 5px); }
.token-cost-chart .legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: 1.2rem; font-size: .8rem; color: var(--ink-muted); }
.token-cost-chart .legend > span { display: flex; align-items: center; gap: .4rem; }
.token-cost-chart .key { width: 1.4rem; height: .8rem; }
.hardware { background: #202720; color: var(--bg); padding: clamp(1.3rem,3vw,2rem); margin: 1.6rem 0; display: flex; gap: 1.4rem; justify-content: space-between; align-items: center; }
.hardware h2,.hardware h3,.hardware p { color: inherit; }
.hardware h3 { font-size: 1rem; margin: .9rem 0 .4rem; }
#ownership-note { margin-top: .75rem; }
.hardware dl { min-width: 12rem; }
.hardware dt { font-size: .78rem; opacity: .8; }
.hardware dd { font: 500 1.35rem var(--mono); margin-bottom: .4rem; }
.method { border-bottom: 1px solid var(--ink-line); padding: .5rem 0 1.4rem; }
.method ul { padding-left: 1.4rem; font-size: .87rem; }
.method ul,.method h3 { margin: 1rem 0; }
.method a { text-decoration: underline; }
.validation { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin: 2.5rem 0; }
#feedback:not(:empty) { padding: 1rem 0; }
@media(max-width: 690px) {
    .calculator { padding-top: 7rem; }
    .inputs { grid-template-columns: 1fr; gap: 1rem; }
    .hardware,.validation { align-items: flex-start; flex-direction: column; }
    .comparison th,.comparison td { padding: .65rem .5rem; }
    .comparison tbody th { overflow-wrap: anywhere; font-size: .86rem; }
    .comparison td:nth-child(2) { font-size: .94rem; }
    .comparison td:last-child { font-size: .81rem; }
    .token-cost-chart li { grid-template-columns: minmax(0,1fr) auto; gap: .25rem .8rem; }
    .token-cost-chart .cost-bar { grid-column: 1 / -1; grid-row: 2; }
}

.hardware[hidden] { display: none; }

.hardware dd.hardware-price-note { font: 400 .75rem/1.5 var(--sans); margin-bottom: .9rem; }
