/* Original Assembly design system, inspired by task-oriented assembly software.
   Loaded only by eligible interfaces, never Control / Display / Webplay screens.
   Visibility, ballot order, canvas geometry and print layouts remain owned by each module. */
html[data-assembly-layout] { --assembly-radius:10px; --assembly-space:22px; }
html[data-assembly-layout] body { background:var(--bg,#eef2f6); }
html[data-assembly-layout] :is(.card,.list-item,.event-item,.role,.item,.metric,.metric-card,.operation-card,.delegate-kpi) { border-radius:var(--assembly-radius); box-shadow:none; }
html[data-assembly-layout] :is(.card,.tab-panel) { padding:var(--assembly-space); }
html[data-assembly-layout] :is(h1,h2,h3) { letter-spacing:-.025em; }
html[data-assembly-layout] h1 { font-size:clamp(23px,2.3vw,32px); }
html[data-assembly-layout] :is(input,select,textarea,button) { border-radius:6px; }
html[data-assembly-layout] :is(input,select,textarea,button,a):focus-visible { outline:3px solid var(--accent,#16745e); outline-offset:3px; }
html[data-assembly-layout] :is(.topbar,.header,.header-actions,.identity,.top-actions,.registration-header) { flex-wrap:wrap; }
html[data-assembly-layout] :is(.identity,.header-actions,.top-actions) { gap:12px; }
.assembly-layout-control { display:grid!important; grid-template-columns:1fr; gap:4px!important; min-width:145px; max-width:240px; margin:0; text-align:left; color:var(--muted,#536779); font-size:11px; font-weight:700; }
.assembly-layout-control select { width:100%; min-width:145px; min-height:36px; padding:7px 10px; font-size:12px; }
.assembly-layout-hint { font-size:10px; font-weight:500; max-width:240px; white-space:normal; }
html[data-assembly-layout] #identityText { max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
html[data-assembly-layout] .institutional-brand .assembly-original-logo { width:148px; }
html[data-assembly-layout] .header-kicker { font-size:9px; }
html[data-assembly-layout] .topbar { gap:18px; padding:18px; border-bottom:1px solid var(--line,#cad5df); border-radius:10px; }
html[data-assembly-layout] .tabs { border-radius:10px; padding:12px; box-shadow:none; }
html[data-assembly-layout] .tab { min-height:40px; border-radius:6px; }
html[data-assembly-layout] .tab.active { box-shadow:inset 3px 0 var(--accent,#08775c); }
html[data-assembly-layout] .hub-module-grid { gap:16px; }
html[data-assembly-layout] .hub-module-card { border-radius:10px; transition:border-color .15s; }
html[data-assembly-layout] .hub-module-card:hover { border-color:var(--accent,#08775c); }
html[data-assembly-layout] .organization-hub-header { border-top-width:1px; border-left:4px solid var(--accent,#08775c); }
html[data-assembly-layout] .hub-popout { padding:10px 16px; }
html[data-assembly-layout] .section-head { gap:16px; flex-wrap:wrap; }
html[data-assembly-layout] :is(.actions,.configuration-tabs) { flex-wrap:wrap; }
html[data-assembly-layout] :is(.list-item,.item,.role,.event-item) { min-width:0; overflow-wrap:anywhere; }
html[data-assembly-layout] .badge-preview { overflow:auto; }
/* 01 Corporate: stable left navigation and generous card-based grouping. */
html[data-assembly-layout="corporate"] body.organization-console #appPanel { grid-template-columns:232px minmax(0,1fr); gap:24px; }
html[data-assembly-layout="corporate"] .hub-module-grid { grid-template-columns:repeat(auto-fit,minmax(245px,1fr)); }
html[data-assembly-layout="corporate"] .hub-module { min-height:144px; }
html[data-assembly-layout="corporate"] .organization-hub-header { padding:26px; }
html[data-assembly-layout="corporate"] .configuration-tabs { gap:8px; }
/* 02 Workspace: horizontal navigation, broad working surface, split editing. */
html[data-assembly-layout="workspace"] { --assembly-radius:14px; --assembly-space:28px; }
html[data-assembly-layout="workspace"] body.organization-console > .shell { width:calc(100% - 48px); max-width:1760px; }
html[data-assembly-layout="workspace"] body.organization-console #appPanel { grid-template-columns:minmax(0,1fr); gap:20px; }
html[data-assembly-layout="workspace"] body.organization-console #appPanel > .tabs { position:relative; top:auto; grid-column:1; display:flex; flex-wrap:wrap; gap:8px; max-height:none; padding:12px; align-items:center; }
html[data-assembly-layout="workspace"] body.organization-console .tabs > .nav-group { margin:0 6px; font-size:9px; }
html[data-assembly-layout="workspace"] body.organization-console .tabs > .tab { width:auto; max-width:240px; }
html[data-assembly-layout="workspace"] body.organization-console .tabs > #organizationNav:empty { display:none; }
html[data-assembly-layout="workspace"] body.organization-console .panel { grid-column:1; grid-row:auto; }
html[data-assembly-layout="workspace"] .hub-module-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
html[data-assembly-layout="workspace"] .hub-module-card { display:grid; grid-template-columns:minmax(0,1fr) 150px; }
html[data-assembly-layout="workspace"] .hub-module-card .hub-module { min-height:130px; padding:24px; grid-template-columns:76px minmax(0,1fr); }
html[data-assembly-layout="workspace"] .hub-module-index { font-size:54px; }
html[data-assembly-layout="workspace"] .hub-popout { display:flex; align-items:center; text-align:left; border-top:0; border-left:1px solid var(--line); }
html[data-assembly-layout="workspace"] .delegate-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
html[data-assembly-layout="workspace"] .event-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
html[data-assembly-layout="workspace"] .motion-form { grid-template-columns:minmax(0,1fr); align-content:start; margin:0; padding:20px; border:1px solid var(--line); border-radius:12px; }
@media(min-width:1050px) {
  html[data-assembly-layout="workspace"] #tab-agenda:not(.hidden) { display:grid; grid-template-columns:minmax(260px,.38fr) minmax(0,1fr); gap:20px; align-items:start; }
  html[data-assembly-layout="workspace"] #tab-agenda > :is(.section-head,p) { grid-column:1/-1; }
  html[data-assembly-layout="workspace"] #agendaList { margin-top:0; }
  html[data-assembly-layout="workspace"] #tab-agenda:has(#motionForm.hidden) #agendaList { grid-column:1/-1; }
  html[data-assembly-layout="workspace"] .registration-workspace { grid-template-columns:minmax(0,1fr) 340px; }
  html[data-assembly-layout="workspace"] #organizationEditorDialog > .application-dialog-content { display:grid; grid-template-columns:210px minmax(0,1fr); gap:20px; align-content:start; }
  html[data-assembly-layout="workspace"] #organizationEditorDialog > .application-dialog-content > .section-head { grid-column:1/-1; }
  html[data-assembly-layout="workspace"] #configurationTabs { grid-column:1; grid-row:2/span 2; display:flex; flex-direction:column; align-self:start; border:1px solid var(--line); border-radius:10px; padding:10px; }
  html[data-assembly-layout="workspace"] #configurationTabs button { text-align:left; width:100%; }
  html[data-assembly-layout="workspace"] #organizationEditorDialog > .application-dialog-content > :not(.section-head):not(#configurationTabs) { grid-column:2; min-width:0; }
}
/* 03 Operations: right-hand navigation, dense rows, toolbars above records. */
html[data-assembly-layout="operations"] { --assembly-radius:5px; --assembly-space:16px; }
html[data-assembly-layout="operations"] body.organization-console #appPanel { grid-template-columns:minmax(0,1fr) 205px; gap:18px; }
html[data-assembly-layout="operations"] body.organization-console #appPanel > .tabs { grid-column:2; grid-row:1; }
html[data-assembly-layout="operations"] body.organization-console .panel { grid-column:1; grid-row:1; }
html[data-assembly-layout="operations"] .topbar { padding:12px 16px; border-radius:5px; }
html[data-assembly-layout="operations"] .hub-module-grid { grid-template-columns:minmax(0,1fr); gap:8px; }
html[data-assembly-layout="operations"] .hub-module-card { display:grid; grid-template-columns:minmax(0,1fr) 170px; border-radius:5px; }
html[data-assembly-layout="operations"] .hub-module-card .hub-module { min-height:86px; grid-template-columns:72px minmax(0,1fr) 135px; padding:12px 20px; }
html[data-assembly-layout="operations"] .hub-module-index { grid-row:1; font-size:36px; gap:4px; }
html[data-assembly-layout="operations"] .hub-module-index small { font-size:9px; }
html[data-assembly-layout="operations"] .hub-module .meta { align-items:center; }
html[data-assembly-layout="operations"] .hub-popout { display:flex; align-items:center; border-top:0; border-left:1px solid var(--line); text-align:left; }
html[data-assembly-layout="operations"] :is(.list,.item-list,.voting-list,.protocol-list) { gap:0; border:1px solid var(--line); border-radius:5px; overflow:hidden; }
html[data-assembly-layout="operations"] :is(.list > .list-item,.item-list > .item,.voting-list > .voting-item,.protocol-list > .protocol-entry) { border:0; border-bottom:1px solid var(--line); border-radius:0; margin:0; padding:14px; }
html[data-assembly-layout="operations"] .delegate-kpis { gap:0; }
html[data-assembly-layout="operations"] .delegate-kpi { border-radius:0; padding:10px 14px; }
html[data-assembly-layout="operations"] .delegate-kpi strong { font-size:22px; }
html[data-assembly-layout="operations"] .configuration-tabs { border:1px solid var(--line); padding:8px; gap:6px; }
html[data-assembly-layout="operations"] .configuration-tabs button { padding:8px 10px; font-size:12px; }
html[data-assembly-layout="operations"] .form-grid { gap:12px; }
html[data-assembly-layout="operations"] .metric-grid { gap:6px; }
/* Participant forms: retain step order and the exact voting controls. */
html[data-assembly-layout] body[data-design-surface="public"] > .shell { width:min(1100px,calc(100% - 32px)); margin:auto; }
html[data-assembly-layout="corporate"] body[data-design-surface="public"] > .shell { max-width:860px; }
html[data-assembly-layout="workspace"] body[data-design-surface="public"] > .shell { max-width:1200px; }
html[data-assembly-layout="workspace"] body[data-design-surface="public"] #portalPanel { display:grid; grid-template-columns:300px minmax(0,1fr); gap:20px; align-items:start; }
html[data-assembly-layout="workspace"] body[data-design-surface="public"] #portalPanel > :not(.hero) { grid-column:2; }
html[data-assembly-layout="workspace"] body[data-design-surface="public"] #portalPanel > .hero { grid-column:1; grid-row:1/5; display:block; }
html[data-assembly-layout="operations"] body[data-design-surface="public"] > .shell { max-width:1000px; border-left:4px solid var(--accent,#08775c); padding-left:20px; }
html[data-assembly-layout="operations"] .registration-aside { display:flex; flex-wrap:wrap; gap:16px; align-items:start; }
html[data-assembly-layout="operations"] .registration-workspace { grid-template-columns:minmax(0,1fr); max-width:1050px; margin-inline:auto; }
html[data-assembly-layout="operations"] .registration-header { border-radius:0; }
/* Marketing remains separate from administration; no changes to content or links. */
html[data-assembly-layout="workspace"] body[data-design-surface="site"] .navlinks { gap:28px; }
html[data-assembly-layout="workspace"] body[data-design-surface="site"] .hero-grid { grid-template-columns:minmax(0,1fr); max-width:1000px; }
html[data-assembly-layout="workspace"] body[data-design-surface="site"] .phase-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
html[data-assembly-layout="operations"] body[data-design-surface="site"] .phase-grid { grid-template-columns:minmax(0,1fr); }
/* Responsive layouts never constrain a module iframe or a native dialog's height. */
@media(max-width:1000px) {
  html[data-assembly-layout] body.organization-console #appPanel { grid-template-columns:minmax(0,1fr); }
  html[data-assembly-layout] body.organization-console #appPanel > .tabs { position:relative; top:auto; grid-column:1; grid-row:auto; display:flex; flex-wrap:wrap; max-height:none; gap:6px; }
  html[data-assembly-layout] body.organization-console .tabs > .tab { width:auto; max-width:240px; }
  html[data-assembly-layout] body.organization-console .tabs > .nav-group { width:100%; }
  html[data-assembly-layout] body.organization-console .panel { grid-column:1; grid-row:auto; }
  html[data-assembly-layout="workspace"] .hub-module-card { grid-template-columns:minmax(0,1fr); }
  html[data-assembly-layout="workspace"] .hub-popout { border-left:0; border-top:1px solid var(--line); }
}
@media(max-width:650px) {
  html[data-assembly-layout] { --assembly-space:16px; }
  html[data-assembly-layout] body.organization-console > .shell { width:calc(100% - 20px); }
  html[data-assembly-layout] :is(.hub-module-grid,.delegate-list,.event-grid) { grid-template-columns:minmax(0,1fr); }
  html[data-assembly-layout] .hub-module-card { grid-template-columns:minmax(0,1fr); }
  html[data-assembly-layout="operations"] .hub-module-card .hub-module { grid-template-columns:62px minmax(0,1fr); min-height:110px; }
  html[data-assembly-layout="operations"] .hub-module-index { grid-row:span 2; }
  html[data-assembly-layout="operations"] .hub-module .meta { grid-column:2; }
  html[data-assembly-layout] .hub-popout { border-left:0; border-top:1px solid var(--line); }
  html[data-assembly-layout="workspace"] body[data-design-surface="public"] #portalPanel { display:block; }
  html[data-assembly-layout] .assembly-layout-control { min-width:140px; max-width:none; }
}
/* Balanced management masthead: brand | aligned preferences | account. */
html[data-assembly-layout] .management-header {
  display:grid; grid-template-columns:minmax(240px,1fr) auto;
  align-items:center; gap:24px; min-height:92px; padding:16px 22px;
}
html[data-assembly-layout] .management-header .institutional-brand { gap:16px; flex-wrap:nowrap; }
html[data-assembly-layout] .management-header .institutional-brand .assembly-original-logo { width:138px; height:48px; padding:6px 8px; flex:none; }
html[data-assembly-layout] .management-header .header-kicker { max-width:260px; font-size:9px; line-height:1.4; margin:0 0 4px; }
html[data-assembly-layout] .management-header h1 { font-size:26px; line-height:1.15; margin:0; }
html[data-assembly-layout] .management-header .identity {
  display:flex; flex-direction:row; flex-wrap:nowrap; align-items:center;
  justify-content:flex-end; gap:24px; min-width:0; width:auto;
}
html[data-assembly-layout] .management-header .header-preferences {
  display:grid; grid-template-columns:118px 118px 168px; gap:12px; align-items:start;
}
html[data-assembly-layout] .management-header .header-preferences > label {
  display:grid!important; grid-template-columns:minmax(0,1fr); grid-auto-flow:row;
  justify-items:stretch; align-items:start; gap:5px!important; min-width:0; max-width:none;
  margin:0; color:var(--muted); font-size:11px; line-height:1.2; font-weight:700;
}
html[data-assembly-layout] .management-header .header-preferences select {
  width:100%; min-width:0; height:38px; min-height:38px; margin:0;
  padding:8px 10px; font-size:12px; line-height:1.25;
  appearance:none; color:var(--text); background-color:var(--panel);
  background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);
  background-position:calc(100% - 14px) 16px,calc(100% - 10px) 16px;
  background-size:4px 4px; background-repeat:no-repeat; padding-right:26px;
}
html[data-assembly-layout] .management-header .assembly-layout-hint { display:none; }
html[data-assembly-layout] .management-header .header-account {
  display:flex; align-items:center; justify-content:flex-end; gap:14px;
  padding-left:22px; border-left:1px solid var(--line); min-height:48px;
}
html[data-assembly-layout] .management-header #identityText {
  width:156px; max-width:156px; font-size:11px; line-height:1.5;
  white-space:normal; overflow-wrap:anywhere; overflow:visible;
}
html[data-assembly-layout] .management-header #identityText:empty { display:none; }
html[data-assembly-layout] .management-header .header-account:has(#logoutButton.hidden) { display:none; }
html[data-assembly-layout] .management-header #logoutButton {
  width:auto; flex:none; min-height:38px; padding:8px 14px; font-size:12px; white-space:nowrap;
}
@media(max-width:1100px) {
  html[data-assembly-layout] .management-header { grid-template-columns:minmax(0,1fr); gap:16px; }
  html[data-assembly-layout] .management-header .identity { justify-content:space-between; width:100%; padding-top:14px; border-top:1px solid var(--line); }
}
@media(max-width:760px) {
  html[data-assembly-layout] .management-header { padding:16px; gap:14px; }
  html[data-assembly-layout] .management-header .identity { display:grid; grid-template-columns:minmax(0,1fr); gap:14px; }
  html[data-assembly-layout] .management-header .header-preferences { grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.4fr); gap:8px; }
  html[data-assembly-layout] .management-header .header-account { border-left:0; border-top:1px solid var(--line); padding:12px 0 0; justify-content:space-between; min-height:0; }
  html[data-assembly-layout] .management-header #identityText { width:auto; max-width:calc(100% - 100px); }
  html[data-assembly-layout] .management-header .header-kicker { font-size:8px; letter-spacing:.1em; }
  html[data-assembly-layout] .management-header h1 { font-size:23px; }
  html[data-assembly-layout] .management-header .institutional-brand .assembly-original-logo { width:116px; }
}
@media print {
  .assembly-layout-control { display:none!important; }
}
