/* Geometry comes from the actual page, including saved layout and column widths. */
html.rb-first-load main:not(#rb-shell){visibility:hidden}
html.rb-first-load .rb-page-loading{visibility:visible}
.rb-page-loading{position:absolute;inset:0;pointer-events:none;z-index:60;color:var(--ink);overflow:clip}
.rb-page-loading[hidden]{display:none}
.rb-loading-box{position:absolute;box-sizing:border-box;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-container);overflow:hidden;padding:12px}
.rb-loading-bar{display:block;min-width:0;height:12px;border-radius:var(--radius-control);background:linear-gradient(90deg,var(--line),var(--surface-2),var(--line));background-size:300% 100%;animation:rb-loading-shimmer 1.4s linear infinite}
.rb-loading-header{display:flex;gap:12px;align-items:center;border:0;background:var(--page)}
.rb-loading-header .rb-loading-bar:first-child{width:45%;height:22px}.rb-loading-header .rb-loading-bar:not(:first-child){width:12%}
.rb-loading-tabs,.rb-loading-chips{display:flex;gap:8px;margin-bottom:12px}.rb-loading-tabs{background:var(--titlebar);padding:8px;border-radius:var(--radius-control)}
.rb-loading-tabs .rb-loading-bar,.rb-loading-chips .rb-loading-bar{width:20%;height:24px}.rb-loading-chips .rb-loading-bar{border-radius:999px}
.rb-loading-row{display:grid;grid-template-columns:1fr 2fr 1fr 1fr;gap:8px;min-height:36px;align-items:center;border-top:1px solid var(--line);overflow:hidden}.rb-loading-row .rb-loading-bar{width:80%}
.rb-loading-blue{height:36px;background:var(--titlebar);border-radius:var(--radius-control);margin-bottom:16px}
.rb-loading-fields{display:grid;grid-template-columns:1fr 2fr;gap:12px;margin:16px 0}.rb-loading-fields .rb-loading-bar{height:28px}
.rb-loading-paper{margin:12px;background:var(--page);padding:24px;display:grid;gap:16px}.rb-loading-paper .rb-loading-bar:nth-child(3n){width:65%}
.rb-loading-tiles{display:grid;gap:12px;border:0;background:var(--page);padding:0}.rb-loading-tiles .rb-loading-bar{height:100%;min-height:64px}
.rb-page-loading.rb-loading-slow:after{content:'Still loading — your page will appear here';position:fixed;bottom:16px;left:50%;transform:translateX(-50%);max-width:90%;padding:8px 12px;border-radius:var(--radius-control);background:var(--titlebar);color:var(--on-titlebar);font:500 var(--text-meta)/1.5 var(--f-body)}
.rb-count-pending:empty{display:inline-block;width:32px;height:10px;background:var(--line);border-radius:999px;animation:rb-count-in 0s .3s both}
@keyframes rb-count-in{from{visibility:hidden}to{visibility:visible}}
@keyframes rb-loading-shimmer{to{background-position:-300% 0}}
@media(prefers-reduced-motion:reduce){.rb-loading-bar{animation:none}}
.fw-phone-close{display:none}
@media(max-width:640px){
 #findings-app .fw-panel:not(.fw-phone-open){display:none}
 #findings-app .fw-panel.fw-phone-open{display:block;position:fixed;inset:0;z-index:80;width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;overflow:auto;box-sizing:border-box}
 .fw-phone-close{display:inline-block}
 #findings-app .fw-panel button{min-width:44px;min-height:44px}
 .team-legacy,.team-legacy .rb-card,.team-legacy .rb-fields,.team-legacy .rb-grid{min-width:0;max-width:100%;box-sizing:border-box}
 .team-legacy .rb-grid{grid-template-columns:minmax(0,1fr)}
 .team-legacy :is(input,select,textarea){width:100%;min-width:0;max-width:100%;font-size:16px}
 .team-legacy :is(table,tbody,tr,td){display:block;width:100%;min-width:0;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere}
 .team-legacy thead{display:none}.team-legacy tr{padding:12px;border-bottom:1px solid var(--line)}.team-legacy td{padding:4px 0}
 .team-legacy td:before{content:attr(data-phone-label);display:block;font-size:var(--text-meta);color:var(--ink-2)}
 .team-legacy :is(.rb-head,nav){flex-wrap:wrap;min-width:0;overflow-wrap:anywhere}
 .tv2-main,.tv2-page,.tv2-head,.tv2-top,.tv2-tools,.tv2-list,.tv2-panel{min-width:0;max-width:100%;box-sizing:border-box}
}
.details-panel>.rv2-pbar~.rb-panel-skeleton .rb-loading-blue{display:none}
@media(max-width:640px){
 .rb-loading-row{grid-template-columns:minmax(0,1fr)!important;gap:8px;min-height:120px;padding:12px;margin:8px 0;border:1px solid var(--line);border-radius:var(--radius-container)}
 .rb-loading-row .rb-loading-bar:first-child{width:90%}.rb-loading-row .rb-loading-bar:not(:first-child){width:60%}
}

/* Guided reserves its progress and current-section frame before the first API answer. */
@media(min-width:641px){
 #guided>header{min-height:216px}
 #guided .gs-progress-heading{min-height:42px}
 #guided>.setup-box{height:max(320px,calc(100dvh - 352px));overflow:auto;box-sizing:border-box}
}
/* Known navigation stays operable while the first question list is pending. */
html.rb-first-load main :is([data-question-view],[data-question-view-select],[data-question-tab]){visibility:visible}
.rb-loading-heading-row,.rb-loading-viewer-head{display:flex;align-items:center;gap:12px;min-height:24px;margin-bottom:12px}
.rb-loading-heading-row .rb-loading-bar:first-child{width:45%;height:20px}.rb-loading-heading-row .rb-loading-bar:not(:first-child){width:12%}
.rb-loading-viewer-head{min-height:36px;background:var(--surface-2);padding:8px}.rb-loading-viewer-head .rb-loading-bar{width:40%}
.rb-loading-blue{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;box-sizing:border-box}
.rb-loading-blue .rb-loading-bar{width:45%;background:var(--machine-soft)}.rb-loading-blue .rb-loading-bar:last-child{width:20%}
.rb-page-loading.rb-loading-slow:before{content:'';position:fixed;inset:0 0 auto;height:3px;background:linear-gradient(90deg,var(--surface),var(--machine),var(--surface));background-size:300% 100%;animation:rb-loading-shimmer 1.4s linear infinite}
@media(prefers-reduced-motion:reduce){.rb-page-loading.rb-loading-slow:before{animation:none}}