/* Shared readability/layout pass. Page geometry and secondary information, never A4 content. */
:root{--ui-space:16px;--ui-soft-shadow:0 2px 8px #00000006}
:where(.home-main,.home-side,.dash-main,.dash-side,.repo-main,.sales-title,.deliv-card,.task-work-main,.portal-project-row>span){min-width:0}
:where(.home-wrap,.tool-body,.portal-wrap,.ctab-panel) :where(h1,h2,h3,h4){overflow-wrap:anywhere;line-height:1.4}
:where(.btn,.btn-ghost,.up-btn,.pp-add) .ic,:where(.btn,.btn-ghost,.up-btn) svg{flex-shrink:0}
:where(.modal,.task-work-modal) :where(input,select,textarea){max-width:100%;box-sizing:border-box}
:where(.modal-head,.modal-head>h2,.card-head>h2){min-width:0}.modal-head>h2{flex:1;overflow-wrap:anywhere}.modal-head>button{flex-shrink:0}
.pp-empty,.cd-empty,.tool-empty{opacity:1!important;color:var(--text2);font-size:14px;line-height:1.65;font-style:normal}.dash-hint{font-size:12px;opacity:1;line-height:1.65}.field-hint{font-size:12px;font-weight:400}
.ui-count{display:inline-grid;place-items:center;min-width:24px;min-height:24px;border-radius:8px;font-size:12px;font-weight:600;background:var(--bg3);color:var(--text2);vertical-align:middle}.ui-empty-inline{padding:10px 0;color:var(--text2);font-size:13px}
.ui-secondary-history,.ui-budget-help,.ui-audience{font-size:13px;color:var(--text2);margin:12px 0}.ui-secondary-history>summary,.ui-budget-help>summary,.ui-audience>summary{cursor:pointer;min-height:36px;display:list-item;padding:8px 0}.ui-secondary-history>.validation-center{margin-top:10px}.ui-audience .card-views-total{margin-top:8px}.ui-budget-help .dash-hint{max-width:70ch}.ui-priority-clear{font-size:12px;color:var(--text2);line-height:1.6;margin:12px 0 0}.ui-priority-clear:empty{display:none}
/* Home: consistent request rows and one clear text column per task. */
.home-grid{align-items:start;gap:20px}.home-head h1{font-size:24px;font-weight:700}.home-wrap{padding-top:24px}.flow-inbox{margin-bottom:24px}.flow-inbox h2,.studio-home-priorities h2{font-size:18px;line-height:1.4;margin:0 0 12px;font-weight:650}.flow-inbox-request{width:100%;display:grid;grid-template-columns:34px minmax(0,1fr) 18px;gap:12px;align-items:center;text-align:left;padding:14px;margin:0 0 8px;border:1px solid var(--border);border-radius:10px;color:var(--text);background:var(--bg2);font:inherit;box-shadow:var(--ui-soft-shadow);cursor:pointer}.flow-inbox-request:hover{border-color:var(--accent)}.flow-inbox-request>span:nth-child(2){display:grid;gap:4px;min-width:0}.flow-inbox-request strong{font-size:14px;font-weight:600;overflow-wrap:anywhere;line-height:1.5}.flow-inbox-request span span,.flow-inbox-request small{font-size:12px;line-height:1.5;color:var(--text2);overflow-wrap:anywhere}.flow-inbox-icon{display:grid;place-items:center;width:34px;height:38px;border-radius:8px;color:var(--accent);background:color-mix(in srgb,var(--accent) 9%,var(--bg3))}.flow-inbox-request>svg{color:var(--text2)}
.studio-priority-grid{align-items:start;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))}.studio-priority-grid:empty{display:none}.studio-priority-grid>section{min-width:0;box-shadow:var(--ui-soft-shadow)}.studio-work-row strong{font-size:14px;font-weight:600}.studio-home-priorities{margin-bottom:24px}
.home-feed-row{display:grid!important;grid-template-columns:8px 20px minmax(0,1fr) 32px;grid-template-areas:"dot icon title action" "dot icon context action";gap:4px 10px;padding:14px!important;transform:none!important}.hf-dot{grid-area:dot}.hf-icon{grid-area:icon}.hf-label{grid-area:title;font-size:14px;font-weight:600;line-height:1.5;overflow-wrap:anywhere;min-width:0}.home-feed-row .hf-sub{grid-area:context;max-width:none!important;margin:0;white-space:normal;overflow:visible;font-size:12px!important;line-height:1.5}.hf-done,.hf-go{grid-area:action}.hf-sub:empty{display:none}.home-side .home-widget{box-shadow:none;padding:16px}.ui-assignments>summary{display:flex;gap:8px;align-items:center;font-size:13px;font-weight:600;cursor:pointer}.ui-assignments>summary>span{margin-left:auto;color:var(--text2);font-weight:400}.ui-assignments .hw-row{align-items:flex-start;min-height:40px}.ui-assignments .hw-row-main{white-space:normal;line-height:1.5}.ui-assignments .hw-row-meta{font-size:12px}.notification-row b{font-size:13px;font-weight:600;line-height:1.5}.notification-row small{font-size:12px;white-space:normal;line-height:1.5}.notification-prefs{font-size:12px}.home-empty{min-height:64px}.hw-title{font-size:14px!important;text-transform:none}
.validation-row{grid-template-columns:minmax(0,1fr) auto;gap:8px 12px}.validation-status{grid-column:1;grid-row:1;justify-self:start;max-width:100%;white-space:normal;overflow-wrap:anywhere;font-size:11px;text-transform:none;line-height:1.5}.validation-due{grid-column:2;grid-row:1;font-size:12px;white-space:normal;text-align:right}.validation-main{grid-column:1/-1;gap:4px}.validation-main b,.validation-main span,.validation-main small{white-space:normal;overflow:visible;overflow-wrap:anywhere;line-height:1.5}.validation-main b{font-size:14px;font-weight:600}.validation-main span,.validation-main small{font-size:12px}.validation-main details{font-size:12px;overflow-wrap:anywhere}
/* Review: version identity, client state and one publication action. */
.deliv-grid{align-items:start}.deliv-card{display:flex;flex-direction:column;gap:14px;min-width:0;padding:18px}.deliv-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;flex-wrap:wrap;min-width:0}.deliv-head h4{font-size:16px;min-width:0;margin:0;flex:1 1 180px;overflow-wrap:anywhere}.deliv-pills{display:flex;flex-wrap:wrap;gap:6px;margin:0}.deliv-pills .review-status{white-space:normal;line-height:1.5;max-width:100%}.deliv-card>.deliv-cta{align-self:flex-start;width:auto;min-width:0;min-height:38px;margin:0;font-size:13px;padding:8px 12px}.deliv-version-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-start;order:4}.deliv-version-tools details{font-size:12px;color:var(--text2);min-width:0}.deliv-version-tools summary{cursor:pointer;padding:6px 0}.deliv-vactions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.deliv-version-tools .deliv-vact{padding:8px!important;font-size:12px!important;line-height:1.5;min-height:36px;height:auto;white-space:normal}.deliv-version-tools>.btn{font-size:12px;min-height:36px}.deliv-card .delivery-review-states{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0;padding:12px;border:1px solid var(--border);border-radius:8px;background:var(--bg3)}.delivery-review-states>div{display:block;min-width:0;padding:0!important;background:none!important;border:0!important;box-shadow:none!important}.delivery-review-states dt{font-size:12px;color:var(--text2);margin-bottom:4px}.delivery-review-states dd{font-size:13px;font-weight:600;margin:0;line-height:1.5;overflow-wrap:anywhere}.delivery-review-states small{display:block;font-size:12px;overflow-wrap:anywhere;line-height:1.5;margin-top:4px}.deliv-actrow{margin:0;gap:8px;align-items:center}.deliv-action{display:flex;flex-direction:column;align-items:flex-start;gap:12px}.deliv-action summary,.deliv-history>summary{cursor:pointer;font-size:13px;line-height:1.5;padding:6px 0}.deliv-action p{font-size:12px;color:var(--text2);margin:0}.deliv-card .deliv-history{order:5;margin-top:0}.deliv-history-body{overflow-wrap:anywhere}.deliv-addrow{display:flex;gap:8px;flex-wrap:wrap;min-width:0}.deliv-addrow input{flex:1 1 180px;min-width:0;max-width:100%}.deliv-feedback{margin:0;overflow-wrap:anywhere}.review-timeline-event{align-items:start}.review-timeline-event>div{min-width:0}.review-timeline-event strong,.review-timeline-event p{overflow-wrap:anywhere;line-height:1.6}.ui-review-documents{flex-wrap:wrap;overflow:visible;gap:6px;padding-bottom:4px;margin-bottom:14px}.ui-review-documents .sv-document{white-space:normal;max-width:100%;height:auto;text-align:left;line-height:1.4;min-height:36px;padding:8px 12px}.ui-review-picker{display:none}
/* Lists and filters: wrap content while keeping actions in their own column. */
.repo-row{box-shadow:none;border-radius:10px;padding:14px;gap:14px}.repo-name{display:flex;align-items:center;flex-wrap:wrap;gap:6px;font-size:14px;line-height:1.5;overflow-wrap:anywhere}.repo-sub{white-space:normal;overflow-wrap:anywhere;line-height:1.6;font-size:12px}.repo-acts{display:flex;flex-wrap:wrap;gap:6px;flex-shrink:0}.repo-pc{flex-shrink:0;font-size:12px}.client-status-badge{white-space:normal;line-height:1.4}.tool-toolbar{gap:10px;padding:12px 20px}.tool-toolbar input,.tool-toolbar select{font-size:14px;min-height:38px;max-width:100%}.task-work-filters{align-items:flex-end;gap:12px}.task-work-filters label{min-width:0}.task-work-filters label:has([type=search]){flex:1 1 220px}.sales-stat{padding:10px 14px;box-shadow:none}.sales-stat .ss-l{font-size:12px;letter-spacing:0;text-transform:none}.sales-head{gap:16px}.sales-sub{font-size:13px}.sales-stats{flex-wrap:wrap}.pg-bar{flex-wrap:wrap}.pg-title{min-width:0;line-height:1.5}.pg-title,.gantt-bar-title{letter-spacing:0}.sales-head .btn-secondary{margin-left:auto}
/* Calendar: navigation and the main action stay together; secondary sync tools are in Options. */
.cal-navigation,.cal-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.cal-navigation{min-width:0}.cal-week-lbl{font-size:14px;line-height:1.5;min-width:0;white-space:normal}.cal-actions{margin-left:auto}.cal-bar{gap:10px}.cal-bar .cal-chips{gap:6px}.cal-bar .cal-chip{font-size:12px;line-height:1.4;padding:6px 9px}.cal-prod-band{height:24px;line-height:22px;font-size:12px;opacity:1}.cal-prod-row{gap:4px}.cm-prod-bar{font-size:11px;line-height:20px;min-height:20px;opacity:1}.cal-prod-band span{font-size:11px}.cal-hours .cal-hour{font-size:11px}.cal-task{min-width:0}.cal-task-title{font-size:13px;line-height:1.4}.cal-task-meta{font-size:11px;line-height:1.4}
/* Client portal: long titles and document actions reflow instead of colliding. */
.client-app .portal-wrap{padding-top:24px}.client-app .portal-project-row{gap:12px;padding:16px;box-shadow:var(--ui-soft-shadow)}.portal-project-row>span:nth-child(2){flex-shrink:0;max-width:220px;white-space:normal;line-height:1.5}.portal-project-row>span:last-child{flex:0 1 170px;text-align:right;white-space:normal;line-height:1.5}.portal-project-row strong{font-weight:650}.portal-project-row small:empty{display:none}.portal-section-title{font-size:17px;font-weight:650;letter-spacing:0;text-transform:none}.client-app .validate-box{box-sizing:border-box;min-width:0;height:auto!important;overflow-wrap:anywhere}.client-app .validate-box .flow-actions{align-items:flex-start;gap:8px}.client-app .validate-box .btn{white-space:normal;line-height:1.5;height:auto;min-height:38px}.client-app .client-document-history article+article{margin-top:10px}.client-app #projModalTitle{flex:1;min-width:0;font-size:19px;line-height:1.4;overflow-wrap:anywhere}.client-app #projModalTitle+button{flex-shrink:0}.client-app .prod-row{font-size:14px;line-height:1.65}.client-app .prod-sec{margin-bottom:18px}
@media(min-width:701px) and (max-width:980px){.ops-app .topbar{gap:6px;padding-inline:10px}.ops-app .topbar .logo{font-size:17px}.ops-app .undo-nav{padding-right:5px}.ops-app .undo-nav-btn{width:24px}.ops-app .topbar .ws-btn{font-size:12px;padding:8px 6px;gap:4px}.ops-app .topbar .ws-btn svg{width:14px;height:14px}.ops-app .studio-resources>summary{font-size:12px;padding-inline:5px}.ops-app .topbar .header-user{gap:4px}.ops-app .topbar .workspace-nav .ws-btn:first-child{margin-left:0}}
@media(max-width:1050px){.deliv-grid{grid-template-columns:1fr}.sales-head .sales-title{flex:1 0 100%}.sales-head .sales-stats{flex:1 1 100%;gap:8px}.sales-head .sales-stat{flex:1}.repo-acts{max-width:230px}.task-work-filters label:has(select){flex:1 1 180px}}
@media(max-width:700px){.home-wrap{padding:20px 12px}.home-head{margin-bottom:20px}.home-grid{gap:20px}.home-side{grid-template-columns:1fr}.home-side .home-widget{margin:0}.flow-inbox-request{grid-template-columns:28px minmax(0,1fr) 16px;padding:12px;gap:8px}.flow-inbox-icon{width:28px;height:34px}.home-feed-row{grid-template-columns:6px 18px minmax(0,1fr) 34px;gap:4px 7px;padding:12px!important}.studio-priority-grid{grid-template-columns:1fr}.studio-priority-grid>section{padding:14px}.studio-summary-grid{grid-template-columns:1fr 1fr}.studio-summary-grid dd{font-size:13px;overflow-wrap:anywhere}.studio-next{gap:12px}.studio-next h3{font-size:18px}.validation-due{max-width:100px}.ui-review-documents{display:none}.ui-review-picker{display:grid;gap:6px;margin:0 0 16px;font-size:12px;color:var(--text2)}.ui-review-picker select{width:100%;min-width:0;padding:10px;font:inherit;font-size:14px;border:1px solid var(--border);border-radius:8px;background:var(--bg2);color:var(--text)}.deliv-card{padding:14px;gap:12px}.deliv-card .delivery-review-states{grid-template-columns:1fr;gap:10px;padding:12px}.delivery-review-states>div+div{border-top:1px solid var(--border)!important;padding-top:10px!important}.deliv-card .deliv-actrow .btn{flex:1 1 160px;white-space:normal}.deliv-head h4{font-size:15px}.deliv-action>.btn{width:100%;white-space:normal}.deliv-actrow details{flex-basis:100%}.repo-row{display:grid;grid-template-columns:12px minmax(0,1fr);gap:8px 10px;align-items:start}.repo-row>.client-dot{margin-top:8px}.repo-main{grid-column:2}.repo-acts{grid-column:2;max-width:none;justify-content:flex-start}.repo-pc{grid-column:2;font-size:12px}.repo-name{font-size:15px}.tool-toolbar{align-items:stretch}.task-work-heading h2{font-size:20px}.task-work-tabs .btn{font-size:13px}.sales-head{gap:12px}.sales-head .btn-add-client{margin-left:0}.sales-head>.btn{flex:1 1 140px;justify-content:center}.sales-stats{width:100%}.sales-stat{min-width:0}.sales-stat .ss-l{font-size:11px}.cal-bar-m{gap:8px!important}.cal-prod-band{min-height:24px}.client-app header{gap:10px;padding:12px}.client-app .header-user{min-width:0;gap:8px}.client-app #clientName{min-width:0;max-width:150px;overflow-wrap:anywhere;line-height:1.4}.client-app .portal-wrap{padding:20px 12px}.client-app .portal-project-row{gap:10px}.portal-project-row>span:last-child{flex:1 1 auto;font-size:13px}.portal-project-row>span:nth-child(2){max-width:65%}.client-app #projModal .modal{padding:16px!important}.client-app .validate-box .btn{min-height:42px}.ui-secondary-history>summary,.ui-budget-help>summary{line-height:1.5;min-height:40px}}

/* Header height must follow the actual navigation height when crossing breakpoints. */
.ops-app #app{transition:none}
@media(min-width:481px){.topbar .settings-menu{top:calc(100% + 6px)}}
@media(min-width:481px) and (max-width:1000px){.ops-app .topbar{display:flex;flex-wrap:wrap;gap:6px;padding:7px 10px}.ops-app .topbar .logo{font-size:18px;margin-right:auto}.ops-app .topbar .workspace-nav{order:3;flex:1 1 100%;flex-wrap:wrap;justify-content:flex-start;gap:3px;overflow:visible}.ops-app .topbar .workspace-nav .ws-btn{padding:10px 8px;font-size:13px;gap:5px;min-height:44px}.ops-app .topbar .workspace-nav .ws-btn:first-child,.ops-app .topbar .workspace-nav .ws-btn:last-child{margin:0}.ops-app .studio-resources>summary{font-size:13px;padding:10px 8px;min-height:44px;box-sizing:border-box}.ops-app .topbar .undo-nav{margin:0;border:0;padding:0}.ops-app .topbar .header-user>span{display:none}}

.ui-more-priorities{font-size:12px;margin-top:8px;color:var(--text2)}.ui-more-priorities>summary{cursor:pointer;padding:8px 0;min-height:34px}.ui-more-priorities .studio-work-row{color:var(--text)}

@media(min-width:481px) and (max-width:640px){.ops-app .topbar .workspace-nav{gap:1px}.ops-app .topbar .workspace-nav>.ws-btn{padding-inline:5px;gap:0}.ops-app .topbar .workspace-nav>.ws-btn svg{display:none}.ops-app .studio-resources>summary{padding-inline:5px}}
/* Calendar labels share their geometry with the renderer, including overflow rows. */
:root{--ui-calendar-band-height:24px;--ui-calendar-band-gap:4px}
.cal-prod-band,.cal-prod-more{height:var(--ui-calendar-band-height);min-height:var(--ui-calendar-band-height);flex-shrink:0;box-sizing:border-box}.cal-prod-more{line-height:var(--ui-calendar-band-height);font-size:11px}.cal-prod-row{gap:var(--ui-calendar-band-gap)}
.cm-cells{grid-auto-rows:minmax(110px,auto)}.cm-cell>*{flex-shrink:0}
.cal-task-compact .cal-task-who,.cal-task-tiny .cal-task-who,.cal-task-tiny .cal-task-time{display:none}.cal-task-compact .cal-task-title,.cal-task-tiny .cal-task-title{font-size:11px;line-height:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cal-task-tiny{padding-top:0;padding-bottom:0}.cal-task-tiny .cal-task-title{line-height:12px}.cal-task-compact .cal-task-time{font-size:10px;line-height:12px}
/* Kanban advancement is a compact touch action; desktop uses drag and drop. */
.card-mobile-advance{display:none}
@media(max-width:700px){.card:has(.card-mobile-advance){padding-bottom:52px}.card-mobile-advance{position:absolute;right:12px;bottom:10px;display:inline-grid;place-items:center;width:36px;min-width:36px;min-height:36px;height:36px;border:1px solid var(--border);border-radius:10px;background:var(--bg3);color:var(--text);cursor:pointer}.card-mobile-advance:hover,.card-mobile-advance:focus-visible{border-color:var(--accent);color:var(--accent)}
#uiDialog.production-advance-sheet{align-items:flex-end;padding:0;background:#0006}
#uiDialog.production-advance-sheet>.modal{width:100%;max-width:none!important;max-height:85dvh;overflow:auto;border-radius:20px 20px 0 0;margin:0;padding:24px 20px max(20px,env(safe-area-inset-bottom));box-sizing:border-box;animation:production-sheet-in 180ms ease-out}
#uiDialog.production-advance-sheet>.modal:before{content:'';display:block;width:36px;height:4px;border-radius:4px;background:var(--border);margin:-12px auto 20px}
#uiDialog.production-advance-sheet #uiDialogMsg{white-space:pre-line;font-size:14px!important;line-height:1.65!important}
#uiDialog.production-advance-sheet .modal>.modal-actions{display:grid;grid-template-columns:1fr;gap:8px}.production-advance-sheet #uiDialogOk{order:-1}
}
@keyframes production-sheet-in{from{transform:translateY(100%);opacity:.5}to{transform:translateY(0);opacity:1}}
@media(prefers-reduced-motion:reduce){#uiDialog.production-advance-sheet>.modal{animation:none}}

/* Older phone table rules still imposed desktop minimums and table cells on
   the labelled mobile forms. Keep every field within its row, including email. */
@media(max-width:700px){
  .ops-app #clientModal,.ops-app #videoNoteModal{z-index:450}
  #cardModal #cardPanelViewport .pp-table{width:100%;min-width:0;max-width:100%}
  #cardModal #cardPanelViewport .pp-table :is(tbody,tr){min-width:0;max-width:100%;box-sizing:border-box}
  #cardModal #cardPanelViewport .pp-table td{display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box}
  #cardModal #cardPanelViewport .pp-table td.act{display:inline-flex;width:auto}
  #cardModal #cardPanelViewport .pp-table :is(input,select,textarea){max-width:100%;box-sizing:border-box}
  .tool-toolbar>input{flex:1 0 100%;width:100%;font-size:16px;min-height:44px}
  .tool-toolbar>select{min-width:0;min-height:44px;font-size:16px}
  .cd-row{flex-wrap:wrap;gap:8px;padding:12px}
  .cd-row .cd-row-main{flex:1 0 100%}
  .cd-row .cd-row-title,.cd-row .cd-row-sub{white-space:normal;overflow-wrap:anywhere;line-height:1.5}
  .cd-row .cd-mini{min-height:44px;font-size:13px;display:inline-flex;align-items:center;justify-content:center}
}
