/* Padded status labels must contribute their full height to surrounding text. */
.pill{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;line-height:1.5}
.badge{line-height:1.6;overflow-wrap:anywhere}
.monthlegend{display:grid;gap:12px;line-height:1.8}
.monthlegend-status{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;min-width:0}
.monthlegend-explanation{min-width:0;max-width:100%;line-height:1.8;overflow-wrap:anywhere}
.monthlegend-notes{display:flex;flex-wrap:nowrap;gap:20px;min-width:0;max-width:100%;margin:0;padding:0;list-style-position:inside;overflow-x:auto;color:inherit;font:inherit;line-height:1.9}.monthlegend-notes li{flex:0 0 auto;white-space:nowrap;overflow-wrap:normal}
/* Header identity can wrap at tablet widths and with long account notes. */
body:has(aside) main>header:has(.badge){height:auto;min-height:78px;padding-block:16px;gap:12px;flex-wrap:wrap}
body:has(aside) main>header>span{min-width:0;max-width:100%;overflow-wrap:anywhere}
body:has(aside) .sectionhead,body:has(aside) .planthead{flex-wrap:wrap;gap:10px 16px;line-height:1.6}
body:has(aside) .sectionhead h2,body:has(aside) .planthead h2{line-height:1.5}
body:has(aside) footer{display:flex;flex-wrap:wrap;gap:8px 24px;line-height:1.8}
body:has(aside) table th,body:has(aside) table td{line-height:1.65}
body:has(aside) label,body:has(aside) .subtle,body:has(aside) .stat label{line-height:1.6}
#accessHistoryScroll td,#accessHistoryScroll small{line-height:1.6}
@media(max-width:700px){
 body:has(aside) main>header:has(.badge){min-height:53px;padding-block:14px}
 #modal #formFields .editor-field-label{min-height:2.6em;line-height:1.6}
 .monthlegend{padding:16px;gap:14px}
 .monthlegend-explanation{flex-basis:100%;margin-top:2px}
 body:has(aside) footer{flex-direction:column;align-items:flex-start;gap:8px}
}
/* Align labels, values and units even when adjacent descriptions wrap. */
body:has(aside) .stat{display:flex;flex-direction:column;gap:10px}
body:has(aside) .stat>label{display:block;min-height:3.2em;margin:0;line-height:1.6}
body:has(aside) .stat>strong{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 6px;min-height:1.3em;margin:0;line-height:1.3;font-variant-numeric:tabular-nums}
body:has(aside) .stat>strong small{margin:0;white-space:nowrap;line-height:1.5}
body:has(aside) .stat>span{display:block;margin:0;line-height:1.7}
body:has(aside) table,body:has(aside) .vtotal b,body:has(aside) .planthead>b{font-variant-numeric:tabular-nums}
body:has(aside) .planthead>b{display:inline-flex;align-items:baseline;flex-wrap:wrap;gap:4px 6px}
body:has(aside) .planthead>b small{margin:0;line-height:1.5}
body:has(aside) .vfields>label{display:flex;flex-direction:column;gap:8px;min-width:0;line-height:1.6}
body:has(aside) .vfields>label>input{margin-top:auto;line-height:1.4}
body:has(aside) .vtotal{flex-wrap:wrap;gap:8px 16px;line-height:1.6}

/* Retain scrolling and pinch zoom; suppress browser double-tap zoom, including nested scrollers. */
html,body,body *{touch-action:manipulation}
