/* The order's work is the main surface; chrome stays one compact header. */
.customer-order-workspace{position:absolute;inset:0;z-index:7;display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;background:var(--bg);color:var(--txt)}
.customer-order-header{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 18px;min-height:64px;flex:none;border-bottom:1px solid var(--steel);background:var(--bg2)}
.customer-order-title{min-width:0}.customer-order-title h1{margin:0;color:var(--txt-hi);font-size:19px;font-weight:700;line-height:1.4;overflow-wrap:anywhere}
.customer-status{position:relative;min-width:0}.customer-status-button{display:flex;align-items:center;justify-content:center;gap:8px;max-width:100%;min-height:44px;padding:8px 12px;border:1px solid color-mix(in srgb,var(--story-phase),var(--steel) 55%);border-radius:9px;background:color-mix(in srgb,var(--story-phase) 14%,var(--bg2));color:var(--txt-hi);font:650 13px var(--font-ui);white-space:nowrap}
.customer-status-button>i{width:7px;height:7px;flex:none;border-radius:50%;background:var(--story-phase)}.customer-status-button>span{font-size:15px;color:var(--txt-lo)}
.customer-status-popover{position:absolute;top:calc(100% + 6px);right:0;z-index:15;width:min(300px,calc(100vw - 24px));padding:16px;border:1px solid var(--steel-hi);border-radius:9px;background:var(--bg2);box-shadow:var(--shadow-panel);font-size:13px;line-height:1.6;white-space:normal}.customer-status-popover strong{color:var(--txt-hi)}.customer-status-popover p{margin:6px 0}.customer-status-popover small{color:var(--txt-lo);font-size:12px}
.customer-order-header>.customer-chat-toggle{display:none}.customer-order-body{display:grid;grid-template-columns:minmax(0,1fr) clamp(310px,31vw,400px);flex:1;min-height:0;min-width:0;overflow:hidden}
.customer-order-main{display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden}.customer-order-nav{display:flex;align-items:center;gap:4px;flex:none;padding:5px 18px;border-bottom:1px solid var(--steel);background:var(--bg2)}
.customer-chapter-nav{display:flex;flex:none;flex-wrap:wrap;align-items:center;gap:4px 16px;min-width:0;padding:0 24px;border-bottom:1px solid var(--steel);background:var(--bg2)}
.customer-chapter-nav button{border:0;border-bottom:2px solid transparent;background:transparent;color:var(--txt-lo);padding:10px 2px;min-height:44px;font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.customer-chapter-nav button[aria-current=page]{border-bottom-color:var(--gold);color:var(--txt-hi)}
.customer-chapter-nav button:focus-visible{outline:2px solid var(--gold);outline-offset:-3px}
.customer-chapter{display:flex;flex-direction:column;gap:20px;min-width:0}
.customer-chapter[hidden]{display:none!important}
.customer-chapter-empty h2{margin:0 0 12px;color:var(--txt-hi);font-size:19px}
.customer-chapter-empty p{color:var(--txt-lo);line-height:1.5}
@media(max-width:700px){.customer-chapter-nav{flex-wrap:nowrap;gap:0 16px;padding:0 12px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch}.customer-chapter-nav::-webkit-scrollbar{display:none}.customer-chapter-nav button{flex:0 0 auto;font-size:12px;white-space:nowrap}}
.customer-order-nav button{min-height:42px;padding:8px 12px;border:1px solid transparent;border-radius:7px;color:var(--txt-lo);font:600 13px var(--font-ui)}.customer-order-nav button[aria-current=page]{border-color:var(--gold-lo);color:var(--gold-hi);background:var(--accent-soft)}
.customer-order-mobile-nav{display:none}.customer-order-scroll{flex:1;min-height:0;min-width:0;padding:20px 24px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.customer-order-panel{display:flex;flex-direction:column;gap:24px;max-width:1080px;margin-inline:auto;min-width:0}.customer-order-panel[hidden]{display:none}
.customer-order-chat{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;border-left:1px solid var(--steel);background:var(--bg2)}.customer-order-chat>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 18px;border-bottom:1px solid var(--steel);flex:none}.customer-order-chat>header h2{margin:4px 0 0;color:var(--txt-hi);font-size:15px;line-height:1.5;overflow-wrap:anywhere}.story-chat-close{display:none}.customer-order-chat>.pc-client-chat{flex:1;min-height:0;overflow:hidden}.customer-order-chat .ms-win-hdr{display:none}
.customer-order-workspace :is(button,input,textarea,select,a):focus-visible,.order-progress-feed :is(button,input,textarea,a):focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.customer-order-workspace button:disabled,.order-progress-feed button:disabled{cursor:default;opacity:.5}
.customer-order-documents h2,.customer-plan-closing h2{margin:0 0 12px;font-size:18px;line-height:1.4;color:var(--txt-hi)}.customer-order-documents>div,.customer-order-tools{display:flex;flex-wrap:wrap;gap:10px}.customer-order-documents .po-button{max-width:100%;white-space:normal;text-align:left;overflow-wrap:anywhere}.story-plan-refresh{margin:14px 0}.story-plan-refresh p{margin:0 0 10px}
.customer-plan-prompt{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;padding:16px 18px;border:1px solid var(--gold-lo);border-radius:10px;background:var(--accent-soft)}.customer-plan-prompt>div{min-width:0}.customer-plan-prompt h2{margin:0 0 6px;color:var(--txt-hi);font-size:17px;line-height:1.5}.customer-plan-prompt p{margin:0;color:var(--txt-lo);font-size:13px;line-height:1.6}.customer-plan-prompt>.po-button{flex:none}
.story-media.is-photo{position:relative;display:grid;place-items:center;aspect-ratio:var(--story-media-ratio,4 / 3);max-height:560px}.story-media.is-photo>.story-photo{position:absolute;inset:0;height:100%}.story-media.is-photo>.story-photo img{height:100%;max-height:100%;object-fit:contain}.story-photo-load{display:grid;place-items:center;position:absolute;inset:0;min-height:44px;width:100%;color:var(--txt-lo);font:600 14px var(--font-ui)}
.story-section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px;min-width:0}.story-section-heading h2{margin:0;color:var(--txt-hi);font-size:19px;line-height:1.4}.story-section-heading p{margin:5px 0 0;color:var(--txt-lo);font-size:13px;line-height:1.6;max-width:65ch}.story-refresh{display:grid;place-items:center;flex:none;width:44px;height:44px;border:1px solid var(--steel-hi);border-radius:8px;color:var(--txt-lo);font-size:20px;background:var(--bg2)}
.story-muted{font-size:12px;line-height:1.6;color:var(--txt-lo)}.order-progress-feed{min-width:0}.story-composer{padding:14px;margin-bottom:20px;border:1px solid var(--steel-hi);border-radius:10px;background:var(--bg2)}
.story-composer textarea{display:block;box-sizing:border-box;width:100%;min-width:0;min-height:92px;resize:vertical;border:0;background:transparent;color:var(--txt-hi);font:14px/1.6 var(--font-ui);padding:0 0 10px}.story-composer-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding-top:10px;border-top:1px solid var(--steel)}
.story-file-button{position:relative;display:inline-flex;align-items:center;justify-content:center;min-height:44px;max-width:100%;padding:8px 10px;border:1px solid var(--steel-hi);border-radius:7px;color:var(--txt);font:600 12px var(--font-ui);cursor:pointer;overflow:hidden}.story-file-button input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:inherit}.story-file-button:focus-within{outline:2px solid var(--gold);outline-offset:2px}.story-composer>.story-muted{display:block;margin-top:10px}.story-selected-file{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:10px;font-size:12px;color:var(--txt-lo)}.story-selected-file>span{min-width:0;overflow-wrap:anywhere}.story-link{min-height:44px;padding:7px 8px;color:var(--gold-hi);font:600 12px var(--font-ui);flex:none}.order-progress-feed .story-publish-actions{margin-bottom:18px}
.story-empty{padding:20px;border:1px dashed var(--steel-hi);border-radius:9px;background:var(--bg2)}.story-empty h2,.story-empty h3{margin:0 0 8px;color:var(--txt-hi);font-size:17px}.story-empty p{margin:0;color:var(--txt-lo);font-size:14px;line-height:1.7;max-width:65ch}
.story-posts{display:flex;flex-direction:column;gap:22px}.story-post{min-width:0;border-bottom:1px solid var(--steel);padding-bottom:22px}.story-post>header{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:6px 12px;margin-bottom:10px;font-size:13px}.story-post>header strong{color:var(--txt-hi);overflow-wrap:anywhere}.story-post>header time{font-size:12px;color:var(--txt-lo);white-space:nowrap}.story-post-text{font-size:15px;line-height:1.75;color:var(--txt);white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 14px;max-width:80ch}
.story-post-media{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:10px}.story-media{min-width:0;overflow:hidden;border:1px solid var(--steel);border-radius:9px;background:var(--bg2)}.story-photo{display:block;width:100%;padding:0;background:transparent}.story-photo img{display:block;width:100%;height:auto;max-height:560px;object-fit:contain}.story-media video{display:block;width:100%;max-height:560px;background:#000}.story-media-state{padding:18px;font-size:13px;line-height:1.6;color:var(--txt-lo)}.story-media-state>.po-button{display:block;margin-top:10px}.story-video-load{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:210px;width:100%;padding:22px;color:var(--txt-lo);font-size:13px;background:var(--steel-lo)}.story-video-load>span:first-child{display:grid;place-items:center;width:48px;height:48px;border:1px solid var(--steel-hi);border-radius:50%;font-size:18px;color:var(--gold-hi)}.story-video-load strong{color:var(--txt-hi);font-size:15px}.story-video-load>span{max-width:100%;overflow-wrap:anywhere}.story-video-load small{font-size:12px}
.story-media-dialog.tp-modal{display:flex;flex-direction:column;width:min(1200px,calc(100vw - 24px));height:min(90dvh,1000px);padding:14px;gap:14px}.story-media-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none}.story-media-dialog h2{margin:0;color:var(--txt-hi);font-size:16px;overflow-wrap:anywhere}.story-media-dialog>img{display:block;min-height:0;min-width:0;object-fit:contain;flex:1;width:100%}
.story-disclosure{border-top:1px solid var(--steel);padding-top:4px}.story-disclosure>summary{display:flex;align-items:center;gap:10px;min-height:44px;list-style:none;cursor:pointer;color:var(--txt-lo);font-size:13px;font-weight:600}.story-disclosure>summary::-webkit-details-marker{display:none}.story-disclosure>summary::before{content:'›';font-size:20px;transform:rotate(0)}.story-disclosure[open]>summary::before{transform:rotate(90deg)}.story-disclosure[open]>summary{color:var(--txt-hi);margin-bottom:12px}.customer-brief h2,.customer-plan h3{margin:0 0 12px;color:var(--txt-hi);font-size:17px}.customer-brief-facts,.customer-plan-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}.customer-brief-facts>div,.customer-plan-facts>div{min-width:0}.customer-brief-facts dt,.customer-plan-facts dt{color:var(--txt-lo);font-size:12px;margin-bottom:6px}.customer-brief-facts dd,.customer-plan-facts dd{margin:0;font-size:14px;color:var(--txt-hi);overflow-wrap:anywhere}.customer-brief a{display:inline-block;min-height:36px;color:var(--gold-hi);font-size:13px}.customer-brief ul{padding-left:18px}.customer-plan{min-width:0}.customer-plan-facts{padding:18px;border:1px solid var(--steel);border-radius:9px;background:var(--bg2)}.customer-plan-facts dd{font-weight:650;font-size:16px}.story-plan-state{display:inline-flex;align-items:center;min-height:30px;max-width:45%;padding:5px 8px;border-radius:6px;background:var(--steel-lo);color:var(--txt-hi);font-size:12px;line-height:1.5}.story-plan-state.approved{color:var(--green)}.story-plan-state.changes_requested{color:var(--orange)}.customer-estimate{list-style:none;margin:0;padding:0}.customer-estimate li{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--steel);font-size:13px;line-height:1.6}.customer-estimate li>span{min-width:0;overflow-wrap:anywhere}.customer-estimate li>span:last-child{color:var(--txt-lo);text-align:right}.story-plan-note{margin:15px 0;padding:10px 14px;border-left:2px solid var(--gold);color:var(--txt);font-size:14px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}.customer-plan-decision{padding-top:16px;border-top:1px solid var(--steel)}.customer-plan-decision textarea{min-height:88px}.customer-plan-decision .pc-actions{display:flex;flex-wrap:wrap;gap:10px}.customer-plan-decision textarea{box-sizing:border-box;width:100%;min-width:0;padding:10px 12px;border:1px solid var(--steel-hi);border-radius:7px;background:var(--bg2);color:var(--txt-hi);font:14px/1.6 var(--font-ui)}
@media(max-width:1100px){.customer-order-scroll{padding:18px}.customer-order-body{grid-template-columns:minmax(0,1fr) 310px}.customer-order-nav{padding-inline:12px}.customer-order-nav button{font-size:12px;padding-inline:8px}}
@media(max-width:960px){
 .customer-order-header{grid-template-columns:44px minmax(0,1fr) 44px;grid-template-rows:auto auto;gap:2px 8px;padding:6px 10px;min-height:76px}.customer-order-header>.story-back{grid-column:1;grid-row:1/span 2}.customer-order-title{grid-column:2;grid-row:1}.customer-order-title h1{font-size:16px;line-height:1.5;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.customer-status{grid-column:2;grid-row:2;justify-self:start}.customer-status-button{min-height:36px;padding:4px 8px;font-size:12px;max-width:100%}.customer-order-header>.customer-chat-toggle{display:grid;place-items:center;grid-column:3;grid-row:1/span 2;width:44px;height:44px;padding:0}.customer-status-popover{left:0;right:auto;width:min(280px,calc(100vw - 72px))}.customer-order-body{display:block;position:relative}.customer-order-main{height:100%}.customer-order-nav{display:none}.customer-order-mobile-nav{display:block;flex:none;padding:5px 10px;border-bottom:1px solid var(--steel);background:var(--bg2)}.customer-order-mobile-nav select{box-sizing:border-box;display:block;width:100%;min-height:44px;padding:8px 12px;border:1px solid var(--steel-hi);border-radius:7px;background:var(--bg2);color:var(--txt-hi);font:600 14px var(--font-ui)}.customer-order-scroll{padding:16px 12px}.customer-order-panel{gap:20px}.customer-order-chat{position:absolute;inset:0;border:0;display:none;z-index:4}.customer-order-workspace[data-chat-open=true] .customer-order-chat{display:flex}.customer-order-workspace[data-chat-open=true] .customer-order-main{visibility:hidden}.customer-order-chat>header{padding:10px 14px}.story-chat-close{display:grid;place-items:center;width:44px;height:44px;flex:none;border:1px solid var(--steel-hi);border-radius:7px;color:var(--txt-hi);font-size:22px}.story-section-heading h2{font-size:18px}.story-section-heading p{font-size:13px}.customer-order-workspace .po-button,.order-progress-feed .po-button{min-height:44px}.customer-plan-facts{gap:10px;padding:14px}.customer-plan-facts dd{font-size:15px}
}
@media(max-width:600px){.story-composer{padding:12px}.story-composer textarea,.customer-plan-decision textarea{font-size:16px}.story-composer-footer{align-items:stretch}.story-file-button{flex:1}.story-composer-footer>.po-button{flex:1}.story-section-heading{margin-bottom:12px}.story-post-text{font-size:14px;line-height:1.7}.story-post>header{font-size:13px}.story-empty{padding:16px}.customer-brief-facts{grid-template-columns:1fr;gap:10px}.customer-plan-facts{grid-template-columns:1fr;gap:14px}.customer-plan-facts>div{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.customer-plan-facts dt{margin:0}.customer-plan-facts dd{text-align:right}.story-plan-state{max-width:48%;font-size:12px}.customer-estimate li{flex-direction:column;gap:4px}.customer-estimate li>span:last-child{text-align:left}.customer-plan-decision .pc-actions>.po-button{width:100%}.story-posts{gap:18px}.story-post{padding-bottom:18px}.story-photo img,.story-media video{max-height:420px}}
@media(pointer:coarse){.customer-status-button{min-height:44px}}
@media(prefers-reduced-motion:reduce){.customer-order-workspace *,.order-progress-feed *{scroll-behavior:auto!important}}

/* Customer order: a quiet, consistent surface for each piece of work. */
.customer-order-workspace .customer-chapter {gap:20px;}
.customer-order-workspace .customer-chapter > :is(.customer-brief,.customer-plan,.customer-chapter-empty),
.customer-order-workspace .customer-order-documents {min-width:0;padding:20px;border:1px solid var(--steel);border-radius:10px;background:var(--bg2);}
.customer-order-workspace .customer-chapter-empty h2,
.customer-order-workspace .customer-brief h2 {margin:0 0 12px;font-size:18px;line-height:1.4;}
.customer-order-workspace .customer-chapter-empty p {margin:0;color:var(--txt-lo);font-size:14px;line-height:1.6;}
.customer-order-workspace .customer-brief .story-post-text {margin-bottom:16px;}
.customer-order-workspace .customer-brief-facts {gap:16px;margin:20px 0 0;}
.customer-order-workspace .customer-brief-facts dt {margin-bottom:5px;}
.customer-order-workspace .customer-brief-facts dd {line-height:1.5;}
.customer-order-workspace .customer-brief ul {margin:16px 0 0;}
.customer-order-workspace .customer-brief a {min-height:44px;line-height:1.5;overflow-wrap:anywhere;}
.customer-order-workspace .customer-plan-facts {margin:16px 0 20px;background:var(--bg);}
.customer-order-workspace .customer-plan-decision {margin-top:18px;}
.customer-order-workspace .customer-order-documents > p {margin:0 0 14px;font-size:13px;}
.customer-order-workspace .customer-order-documents > div {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:8px;}
.customer-order-workspace .customer-order-documents .po-button {justify-content:flex-start;width:100%;min-width:0;min-height:44px;padding:10px 12px;line-height:1.45;}
.customer-order-workspace .customer-chapter-nav button {line-height:1.35;}
.customer-order-workspace .story-composer textarea {line-height:1.6;}
@media(max-width:960px){
 .customer-order-workspace .customer-order-scroll {padding:16px;}
 .customer-order-workspace .customer-chapter > :is(.customer-brief,.customer-plan,.customer-chapter-empty),
 .customer-order-workspace .customer-order-documents {padding:16px;}
}
@media(max-width:600px){
 .customer-order-workspace .customer-chapter {gap:16px;}
 .customer-order-workspace .customer-brief-facts {gap:14px;}
 .customer-order-workspace .customer-plan-decision .pc-actions {gap:8px;}
 .customer-order-workspace .customer-order-documents > div {grid-template-columns:minmax(0,1fr);}
 .customer-order-workspace .story-composer textarea,
 .customer-order-workspace .customer-plan-decision textarea {font-size:16px;}
}
