/* W3 H/Q layout consumes the unchanged W1 contract. Media overrides stay at the end. */
.twa-root a{display:inline-flex;align-items:center;min-height:44px;min-width:44px}
/* Clip unfocused fixed content without moving keyboard focus. */
.twa-root .twa-skip:not(:focus){clip-path:inset(50%)}
.twa-theme-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr));gap:.5rem}
.twa-root .twa-choice{display:flex;align-items:center;gap:.5rem;min-height:44px;padding:.5rem;border:var(--bo-border-w) solid var(--bo-line);border-radius:var(--bo-r-sm);margin:0}
.twa-root .twa-choice input{flex:none}
.twa-root fieldset{min-width:0;border:0;padding:0;margin:0 0 1rem}
.twa-root input[type=hidden],.twa-root [hidden]{display:none!important}
.twa-root :is(.twa-button,button,a.twa-button){min-width:44px;min-height:44px;white-space:normal;overflow-wrap:anywhere}
.twa-root .twa-button:disabled,.twa-root .twa-button[aria-disabled=true]{opacity:1;color:var(--bo-ink);background:var(--bo-card);border:2px dashed var(--bo-ink);border-style:dashed!important;cursor:not-allowed}
.twa-root .twa-button:disabled::after,.twa-root .twa-button[aria-disabled=true]::after{content:"（停用）";font-size:.875rem}
.twa-root :is(input,select,textarea){max-width:100%;min-width:0}
.twa-root :is(small,.muted,.lede,.session-note,.eyebrow,.twa-font-note,.pane-sub){font-size:.875rem;color:var(--bo-muted)}
.twa-root :is(h1,h2,h3,p){overflow-wrap:anywhere}
.twa-root :is(img,svg,iframe){max-width:100%}
.twa-root .brand{display:flex;align-items:center;gap:.75rem;padding:1rem 0}
.twa-root .brand small,.twa-root .brand b{display:block}
.twa-root .brand-mark{display:grid;place-items:center;flex:none;width:44px;height:44px;border-radius:var(--bo-r-sm);background:var(--bo-logo-bg);color:var(--bo-logo-ink);font-weight:900}
.twa-root #login-view{min-height:100vh;display:grid;place-items:center;padding:1rem}
.twa-root .login-card{width:min(100%,30rem)}
.twa-root .login-card form{display:grid;gap:.75rem}
.twa-root #app-spinner:not(.done){position:fixed;inset:0;z-index:80;display:grid;place-items:center;background:var(--bo-bg)}
.twa-root #app-spinner.done{display:none}
.twa-root .spinner-border{width:2rem;height:2rem;border:3px solid var(--bo-muted);border-top-color:transparent;border-radius:50%}
.twa-hub .twa-hub-layout{display:grid;grid-template-columns:17rem minmax(0,1fr);min-height:100vh;align-items:stretch}
.twa-hub .twa-sidebar{position:relative;top:auto;height:auto;max-height:none;overflow:visible;min-width:0;align-self:stretch}
.twa-hub .twa-sidebar .brand,.twa-hub .twa-sidebar small,.twa-hub .twa-sidebar .nav-kind,.twa-hub .twa-sidebar .nav-sub-heading{color:var(--twa-side-note-ink);background:var(--bo-side)}
.twa-hub .content{display:flex;flex-direction:column;min-width:0}
.twa-hub .pane-wrap{width:100%;flex:1;min-width:0;padding:1.5rem;max-width:100rem;margin-inline:auto}
.twa-hub .twa-topbar{padding:1rem 1.5rem;gap:.75rem;flex-wrap:wrap}
.twa-hub .topbar-spacer{flex:1}
.twa-hub .twa-sidebar .nav-menu{display:grid;gap:.5rem}
.twa-hub .twa-sidebar .nav-item{display:flex;width:100%;gap:.65rem;align-items:center;text-align:left;min-height:44px;padding:.65rem .75rem;color:var(--twa-side-note-ink);background:var(--bo-side);border:var(--bo-border-w) solid transparent;border-radius:var(--bo-r-sm);font:inherit}
.twa-hub .twa-sidebar .nav-item[aria-current=page]{background:var(--bo-navon);color:var(--bo-navon-ink);box-shadow:var(--x-navsh,none);font-weight:700}
.twa-hub .twa-sidebar .nav-item[aria-current=page] small{color:inherit;background:transparent}
.twa-hub .nav-label{flex:1;min-width:0}.twa-hub .nav-label small{display:block}
.twa-hub .nav-ico,.twa-hub .nav-caret{flex:none}
.twa-hub .nav-sub{display:none}.twa-hub .nav-group.expanded>.nav-sub{display:block}
.twa-hub .nav-sub-inner{display:grid;gap:.4rem;padding:.5rem 0 .5rem .65rem}
.twa-hub .nav-sub-heading{font-size:.875rem;font-weight:700;padding:.5rem}
.twa-hub .sidebar-collapsed{grid-template-columns:minmax(0,1fr)}.twa-hub .sidebar-collapsed>.sidebar{display:none}
.twa-hub .grid{display:grid;gap:1rem}.twa-hub .grid-stats{grid-template-columns:repeat(4,minmax(0,1fr))}.twa-hub .grid-two{grid-template-columns:repeat(2,minmax(0,1fr))}
.twa-hub .section-gap{margin-bottom:1rem}
.twa-hub .card-head,.twa-hub .pane-head{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap;margin-bottom:1rem}
.twa-hub .card-head h2,.twa-hub .pane-head h1{margin:0}
.twa-hub .stat-card{display:flex;gap:.75rem;align-items:center}.twa-hub .stat-ico{flex:none}
.twa-hub .stat-copy{min-width:0}.twa-hub .stat-copy p{margin:0}
.twa-hub .stat-value{font:inherit;font-size:1.75rem;font-weight:800}.twa-hub .stat-value small{display:block}.twa-hub .twa-date{white-space:nowrap}
.twa-hub .quick-links,.twa-hub .dash-stat,.twa-hub .uploads-rows .row{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}
.twa-hub .dash-stat{justify-content:space-between;margin-block:.75rem}
.twa-hub .progress-track{height:.75rem;background:var(--bo-card2);border:1px solid var(--bo-line);border-radius:var(--bo-r-sm)}
.twa-hub .progress-fill{height:100%;background:var(--bo-action);max-width:100%;width:0}
.twa-hub .theme-rows{display:grid;gap:.5rem}
.twa-hub .theme-row{display:flex;gap:.75rem;align-items:center;flex-wrap:wrap;width:100%;text-align:left}
.twa-hub .theme-row b{flex:1;min-width:0}.twa-hub .row-cat{display:block;font-size:.875rem}.twa-hub .row-note,.twa-hub .theme-row time{font-size:.875rem}
.twa-hub .pane-frame{width:100%;height:calc(100vh - 14rem);min-height:30rem;border:var(--bo-border-w) solid var(--bo-line);border-radius:var(--bo-r-sm);background:var(--bo-card)}
.twa-hub .uploads-rows .row{padding:1rem 0;border-bottom:var(--bo-border-w) solid var(--bo-line)}.twa-hub .uploads-rows .row>*{min-width:0}
.twa-hub .footer{display:flex;flex-wrap:wrap;gap:.75rem;justify-content:space-between;padding:1.5rem;font-size:.875rem}
.twa-hub #back-top{position:fixed;right:1rem;bottom:1rem;z-index:20;visibility:hidden}.twa-hub #back-top.show{visibility:visible}
.twa-questionnaires .dashboard{width:100%;max-width:100rem;margin:auto;padding:1.5rem}
.twa-questionnaires .topbar,.twa-questionnaires .section-heading,.twa-questionnaires .results-head,.twa-questionnaires .dialog-head{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:1rem;margin-bottom:1rem}
.twa-questionnaires .top-actions,.twa-questionnaires .catalog-actions,.twa-questionnaires .filter-actions,.twa-questionnaires .detail-actions{display:flex;align-items:center;flex-wrap:wrap;gap:.75rem}
.twa-questionnaires .questionnaire-hub,.twa-questionnaires .summary,.twa-questionnaires .filters{margin-bottom:1rem}
.twa-questionnaires .questionnaire-catalog,.twa-questionnaires .summary,.twa-questionnaires .detail-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
.twa-questionnaires .catalog-loading{grid-column:1/-1}
.twa-questionnaires .questionnaire-card{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.75rem}
.twa-questionnaires .catalog-index{font-family:var(--bo-font-num);font-weight:700}.twa-questionnaires .catalog-kicker{font-size:.875rem}
.twa-questionnaires .summary article>*{display:block}.twa-questionnaires .summary strong{font-size:1.75rem;font-family:var(--bo-font-num)}.twa-questionnaires .summary strong[data-data-state]{font-family:var(--bo-font-body)}
.twa-questionnaires .filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;align-items:end}
.twa-questionnaires .filter-actions{grid-column:1/-1}
.twa-questionnaires .table-wrap{min-width:0}.twa-questionnaires .twa-table{width:100%;min-width:0;table-layout:fixed}
.twa-questionnaires .twa-table :is(td,th){overflow-wrap:anywhere;vertical-align:top}
.twa-questionnaires .primary-cell{display:grid;min-width:0}
.twa-questionnaires .pagination{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:.75rem;padding-top:1rem}
.twa-questionnaires .empty{text-align:center;padding:2rem 1rem}.twa-questionnaires .empty strong{display:block}
.twa-questionnaires dialog{width:min(62rem,calc(100% - 2rem));max-height:calc(100dvh - 2rem)}
.twa-questionnaires .dialog-head{position:sticky;top:0;z-index:2;background:var(--bo-card)}
.twa-questionnaires .detail-meta dd{margin:0}.twa-questionnaires .answer-list{display:grid;gap:1rem}
.twa-questionnaires .answer-id,.twa-questionnaires .mono{font-family:var(--bo-font-mono);font-size:.875rem}
.twa-questionnaires .login-shell{display:grid;place-items:center;min-height:100vh;padding:1rem}
.twa-questionnaires .brand-lockup{display:flex;align-items:center;gap:.75rem}.twa-questionnaires .brand-lockup small{display:block}
.twa-root .twa-theme-dialog{width:min(36rem,calc(100% - 2rem));max-height:calc(100dvh - 2rem)}
.twa-root .twa-theme-dialog .twa-toolbar{margin-block:1rem}
.twa-root .twa-theme-dialog::backdrop{background:rgba(0,0,0,.65)}
.twa-root .twa-cell-label{display:none}
.twa-embedded [data-twa-theme-open]{display:none}
html.twa-embedded:has(body.twa-root),html.twa-embedded body.twa-root{scrollbar-width:thin;scrollbar-color:auto}
html.twa-embedded:has(body.twa-root)::-webkit-scrollbar,html.twa-embedded body.twa-root::-webkit-scrollbar{display:block;width:8px;height:8px}
.twa-hub .twa-frame-hint{font-size:.875rem;color:var(--bo-muted);margin:0 0 .75rem}
.twa-root .sr-only{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:clip}
/* v5.0.0（WP-1a）：主控台五卡入口與頂欄風格下拉；簡潔為主，詳細內容新分頁開啟。 */
.twa-hub .hub-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,20rem),1fr));gap:1rem}
.twa-hub .hub-card{display:flex;flex-direction:column;gap:.5rem;min-width:0}
.twa-hub .hub-card h2{display:flex;align-items:center;gap:.5rem;font-size:1.15rem}
.twa-hub .hub-ico{display:inline-flex;flex:none}
.twa-hub .hub-links{display:grid;gap:.5rem;margin-top:auto}
.twa-hub .hub-link{display:inline-flex;align-items:center;gap:.35rem;justify-content:flex-start;min-height:44px;text-align:left;white-space:normal;overflow-wrap:anywhere}
.twa-hub .hub-newtab{font-size:.875rem;color:inherit}
.twa-hub .twa-theme-picker{display:inline-flex;align-items:center;gap:.5rem;min-width:0}
.twa-hub .twa-theme-picker select{width:auto;min-width:9rem;max-width:14rem}
.twa-hub .nav-label small{display:block}
@media(max-width:1200px){.twa-hub .grid-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.twa-questionnaires .questionnaire-catalog{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:991.98px){.twa-hub .twa-hub-layout{display:block}.twa-hub .twa-sidebar{display:none;position:fixed;inset:0 auto 0 0;width:min(20rem,calc(100vw - 3.5rem));height:100dvh;overflow-y:auto;z-index:40}.twa-hub .sidebar-open>.sidebar{display:block}.twa-questionnaires .filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:767.98px){.twa-hub .twa-theme-picker{width:100%}.twa-hub .twa-theme-picker select{max-width:100%;flex:1}.twa-hub .pane-wrap,.twa-questionnaires .dashboard{padding:1rem}.twa-hub .grid-two,.twa-questionnaires .questionnaire-catalog,.twa-questionnaires .summary,.twa-questionnaires .filters,.twa-questionnaires .detail-meta{grid-template-columns:minmax(0,1fr)}.twa-root .twa-cell-label{display:block;font-size:.875rem;font-weight:700;color:var(--bo-muted)}.twa-questionnaires .twa-table,.twa-questionnaires .twa-table tbody,.twa-questionnaires .twa-table tr,.twa-questionnaires .twa-table td{display:block;width:100%}.twa-questionnaires .twa-table thead{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:clip}.twa-questionnaires .twa-table td{padding:.5rem}.twa-hub .topbar{padding:1rem}}
@media(max-width:575.98px){.twa-hub .grid-stats{grid-template-columns:minmax(0,1fr)}.twa-hub .pane-frame{min-height:24rem}.twa-hub .theme-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto}.twa-hub .theme-row .row-ico{grid-column:1;grid-row:1}.twa-hub .theme-row b{grid-column:2/-1;grid-row:1}.twa-hub .theme-row .row-note{grid-column:2}.twa-hub .theme-row time{grid-column:3;white-space:nowrap}}
@media(max-width:379.98px){.twa-hub .pane-wrap,.twa-questionnaires .dashboard{padding:.75rem}}
@media(prefers-reduced-motion:reduce){.twa-root *,.twa-root *::before,.twa-root *::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
@media print{.twa-hub .twa-hub-layout{display:block}.twa-hub .sidebar,.twa-hub .topbar,.twa-hub #back-top,.twa-root .twa-theme-dialog,.twa-questionnaires .top-actions{display:none!important}.twa-hub .pane-wrap,.twa-questionnaires .dashboard{padding:0;max-width:none}.twa-questionnaires .twa-table{display:table}.twa-questionnaires .twa-table thead{position:static;display:table-header-group;width:auto;height:auto;clip-path:none;overflow:visible}.twa-questionnaires .twa-table tbody{display:table-row-group}.twa-questionnaires .twa-table tr{display:table-row}.twa-questionnaires .twa-table td{display:table-cell}.twa-root .twa-cell-label{display:none}}
