/* Shared Mac/iPad layout: wrap content, keep help within reach, support Split View. */
html{-webkit-text-size-adjust:100%;scroll-padding-bottom:90px}body{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
.workspace>*,.row>*,.entry-step>*,.header-tools{min-width:0}.header-tools{flex-wrap:wrap;gap:10px}.header-tools .edition{display:none}
main{padding-bottom:calc(90px + env(safe-area-inset-bottom))}button,summary,select{min-height:44px}button{touch-action:manipulation}input,textarea,select{font-size:16px;max-width:100%}input[type=checkbox]{width:22px;height:22px;flex:none}.ai-source{min-height:44px}
.help-launcher{bottom:calc(18px + env(safe-area-inset-bottom));right:calc(18px + env(safe-area-inset-right));z-index:110}.language-panel{z-index:120}
dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain;padding-bottom:max(20px,env(safe-area-inset-bottom))}dialog .help-top{position:sticky;top:-1px;background:white;z-index:2;padding:12px 0}dialog .row{flex-wrap:wrap}dialog th,dialog td{overflow-wrap:anywhere}dialog table{table-layout:fixed}
#webArchiveRows{display:flex;flex-direction:column;gap:12px}#webSettings{width:720px}
@media(max-width:1100px){header>.row{flex-wrap:wrap}.header-tools{width:100%;justify-content:flex-start}.workspace{grid-template-columns:minmax(0,1fr)}.workspace aside{position:static}.nav{flex-direction:row;overflow-x:auto;padding:3px 0 8px}.nav button{flex:none;white-space:nowrap}.aside-note{margin-top:12px}.language-panel{left:0;right:auto}}
@media(max-width:650px){header{padding:22px 18px}main{padding-left:14px;padding-right:14px}.formgrid,.report-fields,.cards,.stats,.checklist{grid-template-columns:minmax(0,1fr)}.stats{gap:8px}.stat{padding:12px}.stat strong{font-size:24px}.row{flex-wrap:wrap}.entry-step{grid-template-columns:26px minmax(0,1fr);gap:12px}.home-heading h2{font-size:30px}.home-footer{flex-wrap:wrap}.panel{padding:16px}.file-row{grid-template-columns:minmax(0,1fr)}.header-tools>button{flex:1}.phase-strip{gap:6px}.phase{padding:8px 10px}}
#webSplash{inset:0;margin:0;border:0;border-radius:0;max-width:none;max-height:none;width:100%;height:100%;height:100dvh;padding:24px;background:white;color:#292929;opacity:1;transition:opacity 1.2s ease-in-out}#webSplash::backdrop{background:transparent}#webSplash.fading{opacity:0;pointer-events:none}.splash-content{min-height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:10px}.splash-content img{width:min(520px,80vw);height:auto}.splash-content p{margin:0;color:#666}.splash-content h2{margin:24px 0 8px;font-size:26px}.splash-content #splashHint{max-width:500px}
@media(prefers-reduced-motion:reduce){#webSplash{transition:none}}

/* Header controls and quiet, responsive legal footer. */
body{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column}
body>header{width:100%;margin:0 auto}body>main{width:100%;flex:1;margin:0 auto;padding-bottom:24px}
.header-tools .language-picker{order:10;align-self:center}
.language-picker>summary{display:flex;align-items:center;justify-content:center;min-height:44px;line-height:1.25;padding:10px 14px;list-style:none;font-size:13px}
.language-picker>summary::marker{content:""}.language-picker>summary::-webkit-details-marker{display:none}
.language-picker[open]>summary{border-color:#365cff;background:#f3f5ff}
.language-panel{left:auto;right:0}
.app-footer{width:100%;max-width:1320px;margin:0 auto;padding:18px 40px max(20px,env(safe-area-inset-bottom));display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;align-items:center;gap:4px 12px}
.app-footer>p{order:2;flex:0 0 100%;min-width:0;text-align:center;font-size:11px;line-height:1.6;margin:10px 0 0;overflow-wrap:normal}
.app-footer button{font-size:11px;padding:8px 10px;min-height:44px}
#termsDialog,#legalDialog,#privacyRightsDialog,#businessDialog{font-size:13px;line-height:1.6}
#termsDialog h2,#legalDialog h2,#privacyRightsDialog h2,#businessDialog h2{font-size:18px}
#legalBody h3{font-size:14px;line-height:1.5}
#termsDialog .ai-source,#termsDialog .notice,#legalDialog .notice{font-size:13px}
@media(max-width:650px){.app-footer{padding-left:18px;padding-right:18px}.app-footer>p{padding:0 8px}.help-launcher{bottom:calc(82px + env(safe-area-inset-bottom))}.language-panel{right:0;left:auto}.language-picker{margin-left:auto}}

.footer-links{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px 12px;width:100%}
@media(max-width:650px){.footer-links{padding-right:100px;justify-content:flex-start;gap:4px}.app-footer>p{padding:0}}
