/* Field readability pass. Keep the existing palette; no brand-color guesses. */
:root{font-size:100%;--phone-nav-space:110px}
body{font-size:1rem;line-height:1.55}
input,select,textarea,button{font-size:1rem}
p,label,.help,.footnote,.intro,.subresult,.cap-line,.measurement-label,.action-line,.card-top p,.room-output p,.room-output h4,.metric span,.badge,.tag,.legend,.byline,.photo-credit,.image-key,.table-scroll table,.table-scroll small,.sketch-caption,.sketch-instructions li strong,.sketch-instructions li p,.sketch-preview>span,dialog .help,footer,#copy-status{font-size:1rem;line-height:1.55}
summary,.card summary,.btn.small,.field-actions .btn,.measurement-field label{font-size:1rem}
.first-principles .tip-subtitle{font-size:1rem}
.system-context>span,.system-context strong,.system-context small{font-size:1rem}
.card,.card-top>div,.section-intro>div,.field-tools>div,.fields>*,.flow-bar>*,.room-head>*,.room-output-grid>*,.metric-row>*,.product-tile,.reference-grid>*,.common-boot-grid>*{min-width:0}
p,h1,h2,h3,h4,label,summary,.badge,.tag,.room-output-grid strong,.system-context,.common-boot-grid,.metric strong,.finding-list,.table-scroll td,.table-scroll th{overflow-wrap:anywhere}
.tag{white-space:normal;letter-spacing:0}
button,.btn,summary{min-height:44px}
button,.btn{max-width:100%;white-space:normal;overflow-wrap:anywhere}
main a,.tip-content a{display:inline-block;min-height:44px;padding-block:9px;max-width:100%;overflow-wrap:anywhere}
.product-tile>a:first-child,.jump-figure>a{padding:0}
.card details>summary{padding-block:12px}
.measurement-field .field-label{min-height:44px;padding-right:48px}
.measurement-field>.measurement-help{right:0;top:0}
.measurement-help{width:44px;height:44px;min-width:44px;min-height:44px;flex:none}
.measurement-help>span{font-size:1rem;width:26px;height:26px}
.fields{align-items:start}
.field-tools,.room-head,.card-top,.result-line{flex-wrap:wrap}
.field-actions{flex-wrap:wrap}.field-actions .btn{max-width:none;min-width:44px}
.room-head>label{flex:1 1 180px}.room-head>.btn{flex:none}
.flow-total{min-width:0}.flow-total .help{max-width:none}
.flow-total .big-number{overflow-wrap:anywhere}
.room-output-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))}
.metric-row{grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr))}
.metric:last-child{grid-column:auto}
.table-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-gutter:stable}
.table-scroll:focus-visible,.sketch-viewport:focus-visible{outline:3px solid currentColor;outline-offset:3px}
.table-scroll table{min-width:540px}.table-scroll th,.table-scroll td{padding:12px;vertical-align:top}
.table-scroll:before{font-size:1rem;line-height:1.5}
.sketch-viewport{touch-action:pan-x pan-y;overscroll-behavior:contain}
#measurement-dialog{max-width:calc(100vw - 20px);max-height:90dvh}
#measurement-dialog .measurement-dialog-head{align-items:flex-start;flex-wrap:wrap}
#measurement-title{font-size:1.25rem;flex:1 1 200px}
#measurement-content{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}
dialog .card-top{flex-wrap:wrap}dialog .card-top h2{min-width:0;flex:1 1 180px}
dialog textarea{font-size:1rem;line-height:1.55;height:38dvh;min-height:160px}
dialog [data-action=copy-summary]{white-space:normal}
.sketch-viewport.enlarged img{max-width:none}
#navigation button{font-size:1rem;min-width:44px;line-height:1.35}
#navigation .nav-label,#navigation .nav-short{overflow-wrap:anywhere;min-width:0}
@media(max-width:1000px){
 .grid{grid-template-columns:1fr}.common-boot-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr))}
 .fields.four{grid-template-columns:repeat(2,minmax(0,1fr))}
 #measurement-content{grid-template-columns:1fr}.sketch-viewport{max-height:50dvh}
}
@media(max-width:700px){
 .shell{padding-bottom:calc(var(--phone-nav-space) + 24px + env(safe-area-inset-bottom))}
 .title-row h1{font-size:1.5rem}.intro,.card-top p,.flow-card .card-top p,.cap-line,.measurement-label,.subresult,.action-line,.check,.metric span,.image-key,footer{font-size:1rem}
 .field-tools{align-items:flex-start;gap:12px}.system-context{width:100%}.system-context>span,.system-context strong,.system-context small{font-size:1rem}
 .field-actions{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:10px}.field-actions [data-action=reset],.field-actions [data-action=summary]{max-width:none;font-size:1rem}
 #navigation button,#navigation button:last-child:nth-child(odd){font-size:1rem;min-height:64px;min-width:44px;padding:5px 2px}
 .fields,.fields.three,.fields.four,.flow-card .fields,.explorer .fields.three{grid-template-columns:1fr}
 .fields>*{grid-column:auto!important}.fields{gap:18px}
 .room .room-head{align-items:flex-end}.room-head>.btn{width:auto}
 .flow-card .flow-total{flex-wrap:wrap;align-items:flex-start;gap:10px}.flow-total .help{text-align:left;max-width:none}
 .room-output-grid{grid-template-columns:1fr}.room-output p,.room-output h4{font-size:1rem}
 .room-output a{min-height:44px;padding-block:9px}
 .metric-row{grid-template-columns:1fr}.metric:last-child{grid-column:auto}
 .return-method-note .btn{white-space:normal}.resource-buttons a{font-size:1rem;min-height:44px}
 .sketch-instructions li strong,.sketch-instructions li p,.sketch-caption,.sketch-preview>span{font-size:1rem}
 .sketch-panel>.btn{width:100%}
 #measurement-dialog{width:calc(100vw - 20px);padding:0;max-height:90dvh}
 #measurement-dialog .measurement-dialog-head{padding:14px}.measurement-dialog-head .btn{max-width:none}
 #measurement-content{padding:16px;gap:18px}#measurement-title{font-size:1.25rem}
 dialog{max-width:calc(100vw - 20px);padding:16px}dialog .help{font-size:1rem}
}
@media print{.shell{padding-bottom:0}main a{min-height:0;padding:0}}

/* Older card rules must not shrink field text below the user's reading size. */
#main p,#main label,#main .help,#main .badge,#main .tag,#main .photo-credit,#main .table-scroll small,#main .room-output h4{font-size:1rem;line-height:1.55}
#measurement-dialog p,#measurement-dialog .help,#measurement-dialog .sketch-caption,#measurement-dialog li strong,dialog .help{font-size:1rem;line-height:1.55}
.header-title{font-size:1.125rem}
main{scroll-margin-top:calc(var(--phone-nav-space) + 24px)}
@media(max-width:700px){main{scroll-margin-top:12px}}
.measurement-help{width:2.75rem;height:2.75rem;min-width:44px;min-height:44px}
.measurement-help>span{width:1.625rem;height:1.625rem;font-size:1rem}
.measurement-field .field-label{min-height:2.75rem;padding-right:3rem}
.step-number{width:1.75rem;height:1.75rem;min-width:1.75rem;font-size:1rem}
#summary-dialog .card-top{position:sticky;top:0;background:#fff;padding-block:6px;z-index:1}

@media(max-width:700px){
 #navigation.large-text{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:max-content;overflow-x:auto;overscroll-behavior-inline:contain;justify-content:start}
 #navigation.large-text button{min-width:3.5em;padding-inline:.4em}
 #navigation.large-text .nav-short{white-space:nowrap;overflow-wrap:normal}
}
@media(max-width:280px){
 #navigation{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:max-content;overflow-x:auto;justify-content:start}
 #navigation button{min-width:70px;padding-inline:8px}
 #navigation .nav-short{white-space:nowrap;overflow-wrap:normal}
}
