/* Compact audit shell: one toolbar, a report body that owns the remaining height. */
#audit-dialog{width:min(1440px,calc(100% - 24px));max-height:calc(100dvh - 24px);border-radius:18px;overflow:hidden}
#audit-dialog[open]{display:flex;flex-direction:column}
#audit-dialog[data-state=result]{height:calc(100dvh - 24px)}
#audit-dialog .report-toolbar{flex:none;flex-wrap:nowrap;gap:18px;padding:11px 18px;min-height:64px}
.report-toolbar .report-heading{display:block;min-width:0;flex:1;margin:0}
.report-heading h2{font-size:17px;font-weight:650;letter-spacing:-.035em;line-height:1.4;margin:0}
#result-url{display:block;max-width:100%;font-size:11px;line-height:1.5;margin-top:3px}
.report-toolbar .report-actions{display:flex;gap:8px;margin:0}
.report-actions button{min-height:36px}
#audit-close{background:#fff;border:1px solid var(--line);border-radius:30px;padding:8px 13px;font-size:12px;white-space:nowrap}
#audit-close span{margin-left:6px;font-size:16px}
#report-frame{flex:1;min-height:0;overflow:hidden}
#report-frame:empty{display:none}
#report-frame iframe{width:100%;height:100%;min-height:0}
#audit-dialog:not([data-state=result]) #report-frame{display:none}
#audit-dialog .audit-disclosure{flex:none;padding:9px 18px;font-size:10px;line-height:1.5;border-top:1px solid var(--line)}
#save-status:empty{display:none}
#save-status:not(:empty){flex:none;padding:7px 18px;font-size:11px;color:#835d26;background:#fff8e8}
#audit-dialog .share-panel{flex:none;padding:10px 18px}
#audit-dialog .share-panel label{margin-bottom:5px}
#audit-dialog,#audit-dialog *{scrollbar-color:var(--accent) #edf0e8;scrollbar-width:thin}
#audit-dialog::-webkit-scrollbar,#audit-dialog *::-webkit-scrollbar{width:9px;height:9px}
#audit-dialog::-webkit-scrollbar-thumb,#audit-dialog *::-webkit-scrollbar-thumb{background:var(--accent);border-radius:20px}
/* Stable geometry on touch devices: browser chrome must not resize scroll chapters. */
.flywheel-section,.portfolio-stack{overflow-anchor:none}
.wheel-pinned .flywheel-pin,.stack-active .stack-sheet{height:calc(var(--motion-height,100svh) - var(--pin-top))}
.stack-active .stack-sheet{margin-bottom:calc(var(--motion-height,100svh) * .15)}
.stack-active .stack-sheet:last-child{margin-bottom:0}
.wheel-pinned .wheel-art{max-width:min(600px,calc(var(--motion-height,100svh) - 200px))}
/* The flywheel is a quiet instrument: fine orbits, rounded ribbons, a lit central disc. */
.flywheel-pin{background:radial-gradient(ellipse at 78% 48%,#edf5de 0,transparent 50%),#fafbf7}
.wheel-art{isolation:isolate;overflow:clip;overflow-clip-margin:20px}
.wheel-art:before{content:'';position:absolute;inset:8%;border-radius:50%;background:radial-gradient(circle,#fff 24%,#f3f7e9 54%,#e7f0d400 72%);z-index:-1}
.wheel-art .wheel-track{filter:drop-shadow(0 14px 18px #64754c0b)}
.wheel-art .wheel-center{inset:31%;border:1px solid #e0e8d4;border-radius:50%;background:radial-gradient(circle at 32% 24%,#fff 10%,#fcfef6 52%,#e7efdb 100%);box-shadow:0 14px 30px #59714312,inset 0 1px 0 #fff}
.wheel-center>strong{font-size:clamp(50px,6vw,84px);letter-spacing:-.11em;margin-left:-.11em;color:#243d2c}
.wheel-center>span{font-size:10px;margin-top:8px;color:#647859}
.wheel-center>small{font-size:6px;letter-spacing:.1em;margin-top:8px;color:#93a282}
.wheel-node{border-color:#dde5d1;background:#fffffff5;box-shadow:0 7px 18px #364d2910,inset 0 1px 0 #fff;transition:background .25s,box-shadow .25s,border-color .25s}
.wheel-node.is-active{background:linear-gradient(140deg,#e8ff9b,#dbfe63 62%,#cbed50);border-color:#c8e676;box-shadow:0 0 0 7px #dbfe6320,0 12px 28px #809c4228,inset 0 1px 0 #f7ffd9}
.wheel-node.is-active .wheel-node-content>span{color:#4e672d}
.wheel-reading li{border-left:0;border-radius:13px;padding:12px 17px;position:relative;transition:background .25s,opacity .25s,box-shadow .25s}
.wheel-reading li.is-active{background:#ffffffd9;box-shadow:0 5px 24px #4b632b09,inset 3px 0 0 #c8e958}
.wheel-reading li.is-active h3{color:#253c25}
.wheel-reading li.is-active>span{color:#718d30}
.wheel-pinned .wheel-reading li:not(.is-active){opacity:.64}
.wheel-pointer{color:#637f36}
.wheel-pointer>span{letter-spacing:.18em;font-size:7px}
.wheel-pointer>i{font-size:10px}
.wheel-return{font-size:9px;letter-spacing:.04em;color:#839671}
@media(max-width:680px){
 #audit-dialog{width:calc(100% - 12px);max-height:calc(100dvh - 12px);border-radius:13px}
 #audit-dialog[data-state=result]{height:calc(100dvh - 12px)}
 #audit-dialog .report-toolbar{padding:10px 12px;gap:8px;min-height:65px}
 .report-heading h2{font-size:14px}
 #result-url{font-size:10px}
 .report-toolbar .report-actions{gap:5px}
 .report-toolbar .button{font-size:10px;padding:8px 10px}
 #audit-close{padding:7px 9px;font-size:10px}
 #audit-close span{margin-left:3px}
 #audit-dialog .audit-disclosure{padding:8px 12px;font-size:9px}
 .stack-active .stack-sheet{margin-bottom:calc(var(--motion-height,100svh) * .12)}
 .stack-active .stack-sheet:last-child{margin-bottom:0}
 .wheel-pinned .wheel-art{width:min(290px,calc(var(--motion-height,100svh) - 510px));max-width:290px;min-width:200px}
 .wheel-pinned .wheel-reading{grid-template-rows:1fr 1fr;gap:5px 10px;min-height:156px}
 .wheel-pinned .wheel-reading li{padding:8px 9px}
 .wheel-pinned .wheel-reading li:not(.is-active) p{max-height:none;opacity:1;margin-top:4px}
 .wheel-pinned .wheel-center>strong{font-size:43px}
 .wheel-pinned .wheel-center>span{font-size:5px;margin-top:5px}
 .wheel-pinned .wheel-center>small{font-size:3px;margin-top:5px}
 .wheel-art .wheel-center{box-shadow:0 8px 16px #59714312,inset 0 1px 0 #fff}
 .wheel-node.is-active{box-shadow:0 0 0 4px #dbfe6320,0 8px 16px #809c4220}
}
@media(min-width:1000px) and (max-height:820px){
 .wheel-pinned h2{font-size:32px}
 .wheel-pinned .flywheel-intro{font-size:11px;line-height:1.7;margin-top:14px}
 .wheel-pinned .wheel-reading{margin-top:16px}
 .wheel-pinned .wheel-reading li{padding:9px 14px}
 .wheel-pinned .wheel-reading h3{font-size:15px;margin-top:4px}
 .wheel-pinned .wheel-reading p{font-size:11px;line-height:1.7;margin-top:4px}
}
@media(prefers-reduced-motion:reduce){.wheel-reading li,.wheel-node{transition:none}.wheel-reading li:not(.is-active){opacity:1}}
