/* Client-only finish: shared Admin components retain their existing styles. */
.living-system.ls-portal{overflow-wrap:break-word}
.living-system.ls-portal :is(button,a,input,textarea,select,summary):focus-visible{outline:2px solid var(--ls-violet,var(--deru-blue));outline-offset:4px}
.living-system.ls-portal :is(button,a,input,textarea,select){touch-action:manipulation}
.living-system.ls-portal :is(button,a){-webkit-tap-highlight-color:transparent}
.living-system.ls-portal :is(button,summary){min-height:44px}
.living-system.ls-portal :is(input,textarea,select){font-size:16px}
.living-system.ls-portal :is(.proposal-copy,.product-choice>span,.product-total,.payment-card,.library-file>div,.request-task,.project-detail){min-width:0;overflow-wrap:anywhere}
.living-system.ls-portal .client-navigation [data-contextual-new]{margin-left:auto;border-color:var(--ls-violet);color:var(--ls-violet)}
.living-system.ls-portal .need-field{padding:8px 0 18px;border-bottom:1px solid var(--ls-line)}
.living-system.ls-portal .need-field::after{display:none}
.living-system.ls-portal .need-field>label{font-size:20px;letter-spacing:-.025em}
.living-system.ls-portal .need-field input{min-width:0}
.living-system.ls-portal .need-field button{width:44px;height:44px;font-size:20px}
.living-system.ls-portal .need-result{margin-top:0;padding:24px}
.living-system.ls-portal .context-stage h2{max-width:22ch;text-wrap:balance}
.living-system.ls-portal .context-action{gap:18px}
.living-system.ls-portal .context-action>:first-child{background:var(--ls-violet);border-color:var(--ls-violet);color:var(--deru-white);min-height:44px;display:inline-flex;align-items:center;justify-content:center}
.living-system.ls-portal .context-action .other-actions{min-height:44px;line-height:1.4}
.living-system.ls-portal .portal-section-head{align-items:center}
.living-system.ls-portal .text-action{display:inline-flex;align-items:center;min-height:44px}
.living-system.ls-portal .proposal-card h3{margin-bottom:8px}
.living-system.ls-portal .proposal-meta{margin-top:10px;font-variant-numeric:tabular-nums}
.living-system.ls-portal .proposal-price,.living-system.ls-portal .product-total{font-variant-numeric:tabular-nums}
.living-system.ls-portal .product-block{padding:20px 0;margin:16px 0}
.living-system.ls-portal .product-block h3{font-size:24px;line-height:1.2;letter-spacing:-.025em}
.living-system.ls-portal .product-choice{align-items:flex-start;min-width:0;border-width:2px;padding:17px;cursor:pointer}
.living-system.ls-portal .product-choice input{margin-top:3px;accent-color:var(--ls-violet)}
.living-system.ls-portal .product-choice:focus-within{outline:2px solid var(--ls-violet);outline-offset:3px}
.living-system.ls-portal .product-choice .product-price{font-size:clamp(22px,3vw,28px)}
.living-system.ls-portal .product-total{padding:20px 0}
.living-system.ls-portal .product-total>div{flex-wrap:wrap;gap:8px 16px}
.living-system.ls-portal .request-client-compose{margin-top:0;padding-top:8px}
.living-system.ls-portal .request-task .request-feedback:not(:empty){border-left:3px solid currentColor;padding:12px 16px;margin-top:16px}
.living-system.ls-portal .receipt-upload{position:relative;min-height:44px}
.living-system.ls-portal .receipt-upload input[type=file]{display:block;position:absolute;inline-size:1px;block-size:1px;opacity:0;overflow:hidden;padding:0;clip-path:inset(50%)}
.living-system.ls-portal .receipt-upload:focus-within{outline:2px solid var(--ls-violet);outline-offset:4px}
.living-system.ls-portal :is(.bank-details,.payment-card-head)>*{min-width:0;overflow-wrap:anywhere}
.living-system.ls-portal button:disabled{cursor:not-allowed;opacity:.6}
@media(hover:hover) and (pointer:fine){
 .living-system.ls-portal .product-choice:not(.is-selected):hover{border-color:var(--deru-blue-paper-40)}
 .living-system.ls-portal :is(.text-action,.home-return,.proposal-back):hover{text-decoration:underline;text-underline-offset:4px}
}
@media(prefers-reduced-motion:no-preference){
 .living-system.ls-portal :is(.product-choice,.proposal-open){transition:background-color 140ms ease,border-color 140ms ease,color 140ms ease}
 .living-system.ls-portal :is(.request-feedback,[data-confirmation]):not(:empty){animation:portal-feedback-in 160ms ease-out}
 @keyframes portal-feedback-in{from{opacity:.5;transform:translateY(3px)}to{opacity:1;transform:none}}
}
@media(max-width:760px){
 .living-system.ls-portal .recent-work-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible;gap:16px}
 .living-system.ls-portal .project-workspace-nav{max-width:100%;overscroll-behavior-x:contain}
}
@media(max-width:600px){
 .living-system.ls-portal .client-navigation{flex-wrap:wrap;gap:4px}
 .living-system.ls-portal .client-navigation button{flex:0 1 auto;padding:10px 12px;font-size:14px}
 .living-system.ls-portal .client-navigation [data-contextual-new]{margin-left:auto}
 .living-system.ls-portal .recent-work-strip{grid-template-columns:minmax(0,1fr)}
 .living-system.ls-portal .portal-home{gap:24px}
 .living-system.ls-portal .context-stage{padding:20px;grid-template-columns:minmax(0,1fr)}
 .living-system.ls-portal .context-action{align-items:flex-start;text-align:left;margin-top:8px}
 .living-system.ls-portal .request-client-compose{padding:8px 0;margin-bottom:32px}
 .living-system.ls-portal .proposal-option,.living-system.ls-portal .proposal-payment{padding:18px}
 .living-system.ls-portal .product-choice{padding:15px}
 .living-system.ls-portal .product-total strong{font-size:28px}
 .living-system.ls-portal .payment-card-head{flex-wrap:wrap;gap:12px}
 .living-system.ls-portal .portal-section-head h2{line-height:1.15}
 .living-system.ls-portal .need-field>p{max-width:none;line-height:1.5}
}
@media(max-width:360px){
 .living-system.ls-portal #dashboard{padding-inline:16px}
 .living-system.ls-portal .client-navigation [data-contextual-new]{margin-left:0}
 .living-system.ls-portal .portal-section-head{flex-wrap:wrap;gap:4px}
 .living-system.ls-portal .product-choice strong{overflow-wrap:anywhere}
}
@media(prefers-reduced-motion:reduce){
 .living-system.ls-portal *,.living-system.ls-portal *::before,.living-system.ls-portal *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
.living-system.ls-portal :is(.organization-switcher select,[data-work-filter]){min-height:44px;max-width:100%;padding:10px 12px;border:1px solid var(--ls-line);border-radius:8px;background:var(--deru-white);color:var(--ls-ink);font:inherit}
.living-system.ls-portal [data-work-filter]{margin-left:6px}

/* Client work: image, current state and next step before supporting records. */
.living-system.ls-portal .work-editorial-hero{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(300px,1fr);gap:clamp(28px,5vw,64px);margin:28px 0 40px;align-items:start}
.living-system.ls-portal .work-editorial-art{display:grid;place-items:center;min-height:260px;background:var(--deru-ink-paper-5);padding:24px;position:sticky;top:24px}
.living-system.ls-portal .work-editorial-art img{display:block;width:100%;height:auto;max-height:650px;object-fit:contain}
.living-system.ls-portal .work-editorial-hero.without-art{grid-template-columns:minmax(0,1fr);max-width:1000px}
.living-system.ls-portal .work-editorial-hero.without-art .work-editorial-art{display:none}
.living-system.ls-portal .work-editorial-context{min-width:0}
.living-system.ls-portal .work-editorial-context .project-topline{display:flex;flex-direction:column;align-items:flex-start;gap:16px;margin:0 0 28px;padding:0;border:0}
.living-system.ls-portal .work-editorial-context .project-title{font-size:clamp(32px,4.2vw,60px);line-height:1.04;letter-spacing:-.045em;overflow-wrap:anywhere}
.living-system.ls-portal .work-editorial-context .status-pill{font-size:13px;padding:8px 0;background:transparent;border:0;border-radius:0;font-weight:600}
.living-system.ls-portal .work-editorial-next{padding:22px 0;margin-bottom:24px;border-block:1px solid var(--deru-ink-paper-20)}
.living-system.ls-portal .work-editorial-next>span{display:block;font-size:10px;letter-spacing:.1em;margin-bottom:10px;color:var(--deru-ink-paper-70)}
.living-system.ls-portal .work-editorial-next>strong{display:block;font-size:clamp(21px,2.2vw,30px);font-weight:500;line-height:1.25;letter-spacing:-.025em}
.living-system.ls-portal .work-editorial-context .info-strip{display:flex;flex-wrap:wrap;gap:20px;padding:0 0 20px;border:0;background:transparent;box-shadow:none;margin:0}
.living-system.ls-portal .work-editorial-context .info-strip>div{padding:0;min-width:100px;border:0}.living-system.ls-portal .work-editorial-context .info-strip strong{font-size:17px}
.living-system.ls-portal .work-editorial-agreement{border-top:1px solid var(--deru-ink-paper-20);padding:8px 0;font-size:14px}
.living-system.ls-portal .work-editorial-agreement>summary{cursor:pointer;min-height:44px;padding:12px 0}
.living-system.ls-portal .work-editorial-context .request-actions{justify-content:flex-start;margin:16px 0 0}
.living-system.ls-portal .work-editorial-context .request-actions button{border:0;border-bottom:1px solid var(--deru-ink-paper-30);border-radius:0;padding:12px 0;background:transparent;min-height:44px;text-align:left}
.living-system.ls-portal #project-content[data-surface=summary] .workspace-summary-panel{display:block;padding:24px 0;border:0;border-top:1px solid var(--deru-ink-paper-20);background:transparent;box-shadow:none}
.living-system.ls-portal #project-content[data-surface=summary] .workspace-summary-panel>div>span,.living-system.ls-portal #project-content[data-surface=summary] .workspace-summary-panel>div>strong{display:none}
.living-system.ls-portal #project-content[data-surface=summary] .workspace-summary-panel p{font-size:18px;line-height:1.6;max-width:780px;margin:0}
@media(max-width:760px){.living-system.ls-portal .work-editorial-hero{grid-template-columns:minmax(0,1fr);gap:28px;margin-top:20px}.living-system.ls-portal .work-editorial-art{position:static;min-height:0;padding:12px}.living-system.ls-portal .work-editorial-art img{max-height:460px}.living-system.ls-portal .work-editorial-context .project-title{font-size:clamp(32px,8vw,44px)}.living-system.ls-portal .work-editorial-context .project-topline{margin-bottom:20px}.living-system.ls-portal .work-editorial-next{margin-bottom:20px}.living-system.ls-portal .work-editorial-context .info-strip{gap:16px}}
@media(prefers-reduced-motion:no-preference){.living-system.ls-portal .work-editorial-hero{animation:portal-feedback-in 180ms ease-out}}
.living-system.ls-portal .work-editorial-context .ls-project-trajectory::before,.living-system.ls-portal .work-editorial-context .ls-project-trajectory::after{display:none}
.living-system.ls-portal #project-content:not([data-surface=summary]) .work-editorial-hero{margin-bottom:24px}
.living-system.ls-portal #project-content:not([data-surface=summary]) .work-editorial-art{min-height:0;position:static;padding:12px}
.living-system.ls-portal #project-content:not([data-surface=summary]) .work-editorial-art img{max-height:180px}
.living-system.ls-portal #project-content:not([data-surface=summary]) .project-title{font-size:32px}

/* Small operational labels need text contrast on the paper surface. */
.project-list-panel .panel-title>span,.project-list-panel .project-button>span{color:var(--deru-coral-ink-60)}

/* Identity and company discovery remain separate from the active workspace. */
.living-system.ls-portal .portal-identity{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin-top:8px;font-size:13px;color:var(--ls-muted)}
.living-system.ls-portal .portal-identity>span{overflow-wrap:anywhere;min-width:0}
.living-system.ls-portal #refresh-organizations{min-height:44px;padding:6px 0;border:0;background:transparent;color:var(--ls-ink);font:inherit;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.living-system.ls-portal .organization-switcher{max-width:560px}
.living-system.ls-portal .organization-switcher select{min-width:0;flex:1;width:100%}

/* Keep the company switcher label readable on its var(--deru-white) surface. */
.living-system.ls-portal .organization-switcher label{color:var(--ls-coral)}

/* Collection -> resource: the preview leads, context settles once; actions are live. */
@media(prefers-reduced-motion:no-preference){
 .living-system.ls-portal .library-resource-view .library-resource-media{animation:library-frame-in 240ms cubic-bezier(.16,1,.3,1)}
 .living-system.ls-portal .library-resource-view .library-resource-info{animation:library-context-in 220ms cubic-bezier(.16,1,.3,1)}
}
@keyframes library-frame-in{from{transform:scale(.985)}to{transform:none}}
@keyframes library-context-in{from{transform:translateX(8px)}to{transform:none}}
@media(max-width:760px){@keyframes library-context-in{from{transform:translateY(6px)}to{transform:none}}}
/* A cover identifies a work; it is never a download card. */
.work-card-cover{width:110px;aspect-ratio:4/3;flex:none;overflow:hidden}.work-card-cover .ls-preview{display:block;position:relative;width:100%;height:100%}.work-card-cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.work-card-cover svg{width:100%;height:100%}
@media(max-width:600px){.work-card-cover{width:80px}}

/* Outcome copy is the content, not a redundant active-work heading. */
.living-system.ls-portal #project-content[data-surface=summary] .work-completed-result>div>strong{display:block;font-size:24px;line-height:1.2;margin:0 0 12px}
.living-system.ls-portal #project-content[data-surface=summary] .work-service-result>div>span{display:block;margin-bottom:12px}
