/* Request-specific layout. Shared tokens/components live in ../design-system. */
a{color:var(--action);text-decoration:none}
.topbar{min-height:58px;padding:var(--s3) var(--s8);border-bottom:1px solid var(--subtle);display:flex;align-items:center;justify-content:space-between;gap:var(--s4);font-size:14px}
.mode{color:var(--muted);display:flex;gap:var(--s2);align-items:center}
.status-dot{height:7px;width:7px;border-radius:50%;background:var(--muted)}
nav{display:flex;gap:var(--s6)}
nav a{color:var(--muted)}
nav a[aria-current=page]{color:var(--action);font-weight:600}
.page{max-width:var(--content);margin:0 auto;padding:var(--s16) var(--s6) var(--s8)}
.page-header{margin-bottom:var(--s8)}
.brand{background:var(--action-fill);color:var(--accent);width:64px;height:64px;border-radius:18px;display:grid;place-items:center;font-size:34px;font-weight:800;letter-spacing:-3px;margin-bottom:var(--s6)}
.brand-dot{letter-spacing:-2px}
.page-header h1{font-size:30px;line-height:1.2;font-weight:650;letter-spacing:-.9px;margin-bottom:var(--s3)}
.page-header>p{max-width:860px}
.callout{display:flex;gap:var(--s3);background:var(--info);padding:var(--s6);border-radius:var(--radius-surface);margin-bottom:var(--s8)}
.callout-icon{font-size:22px;line-height:1.3}
.callout h2{font-size:16px;font-weight:650;margin-bottom:var(--s1)}
.callout ul{padding-left:var(--s6);margin-top:var(--s2)}
.callout li+li{margin-top:var(--s1)}
.form-meta{display:flex;justify-content:space-between;gap:var(--s4);margin-bottom:var(--s6);font-size:14px;color:var(--muted)}
.form-meta>span:first-child{font-weight:600;color:var(--ink)}
.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s8)}
.full{grid-column:1/-1}
.escalation{border-top:1px solid var(--border);margin-top:var(--s12);padding-top:var(--s12)}
blockquote{margin:0 0 var(--s8);padding-left:var(--s4);border-left:3px solid var(--border)}
blockquote h2{font-size:16px;font-style:italic;font-weight:600}
blockquote p{margin-top:var(--s1)}
.checkbox-row{display:flex;align-items:center;gap:var(--s3);flex-wrap:wrap;min-height:44px;width:fit-content;cursor:pointer}
.checkbox-row input{flex:none}
.checkbox-hint{margin:0 0 var(--s8) var(--s8);max-width:560px}
.submit{width:100%;margin-top:var(--s8);min-height:52px}
.submit-note{font-size:14px;color:var(--muted);text-align:center;margin-top:var(--s3)}
.page-footer{display:flex;justify-content:space-between;gap:var(--s4);padding-top:var(--s12);margin-top:var(--s8);font-size:14px;color:var(--muted)}
.system .page-header{padding:var(--s4) 0 var(--s6)}
.system h1{font-size:48px;letter-spacing:-1.8px;margin-top:var(--s6)}
.eyebrow{font:600 14px/1.5 var(--font-code);letter-spacing:1px;color:var(--action)}
.system-section{padding:var(--s8) 0;border-top:1px solid var(--border)}
.system-section h2{font-size:22px;letter-spacing:-.5px;margin-bottom:var(--s3)}
.swatches{display:grid;grid-template-columns:repeat(5,1fr);gap:var(--s4);margin-top:var(--s6)}
.swatches>div{display:flex;flex-direction:column;gap:var(--s1)}
.swatches strong{font-size:14px}
.swatches code{font:14px var(--font-code);color:var(--muted)}
.swatch{height:100px;border-radius:var(--radius-control);margin-bottom:var(--s2)}
.cobalt{background:var(--action-fill)}
.lime{background:var(--accent)}
.info{background:var(--info)}
.ink{background:var(--ink)}
.spec-grid{display:grid;grid-template-columns:1fr 1fr;gap:var(--s8);margin:var(--s6) 0}
.type-title{font-size:28px;line-height:1.3;font-weight:650;letter-spacing:-.6px;margin-bottom:var(--s3)}
.spec p+p{margin-top:var(--s2)}
.spec strong{display:inline-block;margin-right:var(--s2)}
.component-row{display:flex;align-items:center;gap:var(--s3);flex-wrap:wrap;margin:var(--s6) 0 var(--s4)}
#preview-content{margin:var(--s6) 0}
#preview-content dl{display:grid;gap:var(--s4)}
#preview-content dt{font-size:14px;font-weight:600;color:var(--muted)}
#preview-content dd{margin:var(--s1) 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
body:has(dialog[open]){overflow:hidden}
@media(max-width:700px){.topbar{padding:var(--s3) var(--s4);align-items:flex-start;flex-direction:column;gap:var(--s2)}
nav{gap:var(--s6)}
.page{padding:var(--s8) var(--s4) var(--s6)}
.page-header h1{font-size:28px}
.page-header>p{font-size:var(--text-base)}
.brand{width:56px;height:56px;font-size:30px;border-radius:16px}
.field-grid,.spec-grid{grid-template-columns:1fr;gap:var(--s6)}
.callout{padding:var(--s4);gap:var(--s2)}
.callout-icon{display:none}
.escalation{margin-top:var(--s8);padding-top:var(--s8)}
.page-footer{flex-direction:column;padding-top:var(--s8);gap:var(--s2)}
.system h1{font-size:36px;letter-spacing:-1px}
.swatches{grid-template-columns:repeat(2,minmax(0,1fr))}
.swatch{height:88px}
.spec-grid{margin:var(--s4) 0}
.form-meta{font-size:14px}
.checkbox-row .badge{margin-left:var(--s8)}}
/* Shared field system v1.1: a single icon/text/action grid, custom listboxes, and conditional escalation. */
.callout{margin-bottom:var(--s12)}
.form-meta{border-top:1px solid var(--border);padding-top:var(--s8);margin-bottom:var(--s8);align-items:center}
.form-meta h2{color:var(--ink);font-size:22px;line-height:1.3;letter-spacing:-.5px;margin-bottom:var(--s2)}
.form-meta>span{white-space:nowrap}
.form-meta .hint{font-weight:400}
.component-examples{margin-top:var(--s6)}
.escalation{margin-top:var(--s8);padding:var(--s8) 0 var(--s4);border:0;border-top:1px solid var(--border);border-radius:0;background:transparent}
.escalation-control{display:grid;grid-template-columns:var(--checkbox-size) minmax(0,1fr);column-gap:var(--s3);align-items:start}
.escalation-control>input{margin-top:3px}
.escalation-control label{display:block;width:fit-content;font-size:var(--text-base);font-weight:600;line-height:22px;cursor:pointer}
.escalation-control .hint{margin-top:var(--s1);line-height:22px}
.escalation-context{margin:var(--s4) 0 0 var(--s8);padding:0;border:0}
.escalation-context textarea{min-height:112px}
.escalation+.submit{margin-top:var(--s4)}
@media(max-width:700px){.callout{margin-bottom:var(--s8)}
.form-meta{padding-top:var(--s6);align-items:flex-start;gap:var(--s3)}
.form-meta h2{font-size:20px}
.form-meta>span{padding-top:3px}}
/* Approved utilitarian typography. Font is served locally; no third-party requests. */
/* Escalation guidance: always visible, distinct from the action without a nested card. */
.escalation-guidance{border-left:3px solid var(--border);padding:0 0 0 var(--s4);margin:0 0 var(--s6);max-width:820px}
.escalation-guidance h2{font-size:var(--text-base);font-weight:600;font-style:italic;line-height:22px;margin:0 0 var(--s2);color:var(--ink)}
.escalation-guidance p{font-size:var(--text-base);line-height:22px;color:var(--muted)}
.submission-status{margin-top:var(--s4);padding:var(--s4);border:1px solid var(--success-border);border-radius:var(--radius-control);background:var(--success-surface);color:var(--success)}
#preview-error{margin-top:var(--s4)}
/* Transient success feedback, independent of persistent submission confirmation. */
/* Compact confirmation: outcome, next actions, then supporting resources. */
.completion-state{max-width:520px;margin:0 auto;padding:48px 0;text-align:center}
.completion-heading{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;margin-bottom:12px}
.completion-check{display:inline-grid;place-items:center;flex:none;width:56px;height:56px;border:1px solid var(--success-border);border-radius:50%;background:var(--success-surface);color:var(--success)}
.completion-check svg{width:26px;height:26px}
.completion-state h2{font-size:32px;line-height:1.15;letter-spacing:-.01em;font-weight:700;margin:0}
.completion-state h2:focus{outline:none}
.completion-description{max-width:420px;margin:0 auto;font-size:16px;line-height:1.55;color:var(--muted);overflow-wrap:anywhere}
/* Ticket ID chip: body font with tabular figures, matching other Ticket IDs. */
.completion-id{display:inline-block;padding:2px 7px;border-radius:6px;background:var(--subtle);color:var(--ink);font-size:14px;line-height:22px;font-weight:500;font-variant-numeric:tabular-nums;white-space:nowrap}
/* Relations: one row per provider object, each with its own loading/success/error state (Oct 16 design handoff). */
.completion-relations{margin-top:32px;border:1px solid var(--border);border-radius:var(--radius-surface);background:var(--surface);text-align:left;overflow:hidden}
.completion-relations-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;border-bottom:1px solid var(--border)}
.completion-relations-header h3{margin:0;font-size:12px;line-height:18px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
#completion-relations-progress{font-size:13px;line-height:18px;color:var(--muted);font-variant-numeric:tabular-nums}
.completion-relation{display:flex;align-items:center;gap:14px;padding:16px 18px}
.completion-relation+.completion-relation{border-top:1px solid var(--border)}
.completion-relation-status{display:inline-grid;place-items:center;flex:none;width:20px;height:20px}
.completion-relation-status>.state-dot{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%}
.completion-relation[data-state=success] .state-dot{background:var(--success-surface);color:var(--success)}
.completion-relation[data-state=error] .state-dot{background:var(--danger-surface);color:var(--danger)}
.completion-relation[data-state=stalled] .state-dot{background:var(--subtle);color:var(--muted)}
.completion-relation-status svg{width:12px;height:12px}
.completion-relation-text{flex:1;min-width:0}
.completion-relation-title{margin:0;font-size:15px;line-height:22px;font-weight:500;color:var(--ink)}
.completion-relation-detail{margin:2px 0 0;font-size:13px;line-height:18px;color:var(--muted);overflow-wrap:anywhere}
.completion-relation[data-state=error] .completion-relation-detail{color:var(--danger)}
.completion-relation[data-state=success] .completion-relation-detail{animation:completion-detail-in .3s ease}
.completion-relation-detail .completion-ref{color:var(--ink);font-variant-numeric:tabular-nums}
.completion-relation-action{flex:none;display:inline-flex;align-items:center;gap:8px}
.completion-relation-action a{display:inline-flex;align-items:center;gap:4px;min-height:36px;font-size:14px;line-height:22px;font-weight:500;color:var(--muted);text-decoration:none}
.completion-relation-action a:is(:hover,:focus-visible){color:var(--ink)}
@keyframes completion-detail-in{from{opacity:0;transform:translateY(2px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.completion-relation[data-state=success] .completion-relation-detail{animation:none}}
.completion-integration-note{margin:16px 0 0;padding:12px 16px;border-radius:var(--radius-control);background:var(--subtle);font-size:14px;line-height:22px;color:var(--muted);text-align:left;overflow-wrap:anywhere}
.completion-actions{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;margin-top:32px}
.completion-actions a{text-decoration:none}
.is-complete>.page-footer{margin-top:0;padding-top:32px}
@media(max-width:700px){.completion-state{padding:16px 0 24px}}
@media(max-width:440px){.completion-heading{gap:12px}
.completion-state h2{font-size:26px;line-height:1.15}
.completion-relation{padding:14px 16px;gap:12px}
.completion-relations-header{padding:12px 16px}
.completion-actions{flex-direction:column;gap:8px}
.completion-actions .button{width:100%}}
/* Preview: only the details pane scrolls; header and actions remain visible. */
#preview-dialog{padding:0;max-height:calc(100dvh - 32px);overflow:hidden}
#preview-dialog[open]{display:flex;flex-direction:column}
#preview-dialog .dialog-heading{flex:none;padding:24px 32px 20px;border-bottom:1px solid var(--border);background:var(--surface)}
#preview-dialog .dialog-header{margin-bottom:12px;gap:16px}
#preview-dialog .icon-button{flex:none}
#preview-dialog .dialog-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:24px 32px;scrollbar-gutter:stable}
#preview-dialog .dialog-body:focus-visible{outline-offset:-4px}
#preview-dialog #preview-content{margin:0}
#preview-dialog #preview-content dl{margin:0}
#preview-dialog #preview-error{margin-top:16px;overflow-wrap:anywhere}
#preview-dialog .dialog-actions{flex:none;padding:16px 32px;border-top:1px solid var(--border);background:var(--surface)}
@media(max-width:700px){#preview-dialog .dialog-heading{padding:16px 20px}
#preview-dialog .dialog-body{padding:20px}
#preview-dialog .dialog-actions{padding:12px 20px;gap:8px}
#preview-dialog h2{font-size:24px}}
@media(max-height:500px){#preview-dialog .dialog-heading{padding:12px 20px}
#preview-dialog .dialog-header{margin-bottom:4px}
#preview-dialog .dialog-body{padding:12px 20px}
#preview-dialog .dialog-actions{padding:8px 20px}
#preview-dialog .dialog-actions .button{width:auto;flex:1;padding:8px 12px}
#preview-dialog h2{font-size:22px}}
/* Supplied Reusely logo asset, replacing the temporary text mark. */
.brand{background:transparent;overflow:hidden}
.brand img{display:block;width:100%;height:100%;object-fit:contain;border-radius:inherit}
/* Account stays in the top-right; Google owns the actual sign-in button. */
.topbar{display:grid;grid-template-columns:1fr auto auto;gap:24px}
.account-button{min-width:0;max-width:240px;padding:8px 12px;min-height:40px;gap:8px}
.account-button svg{width:18px;height:18px;flex:none}
#account-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#auth-dialog{max-width:440px;padding:24px;overflow-y:auto;max-height:calc(100dvh - 32px)}
#auth-dialog h2{font-size:24px;margin:0 0 12px}
#auth-dialog .dialog-header{margin-bottom:8px}
#google-button{min-height:44px;margin:24px 0 12px;display:flex;justify-content:center}
#auth-status{margin-top:12px}
#auth-error{margin-top:12px;overflow-wrap:anywhere}
#auth-retry{margin-top:16px}
#account-details{margin-top:20px;overflow-wrap:anywhere}
#account-details strong{display:block;font-weight:600}
#sign-out{margin-top:24px}
@media(max-width:700px){.topbar{grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center}
.topbar .mode{font-size:14px}
.topbar nav{grid-column:1/-1;grid-row:2;gap:24px}
.account-button{grid-column:2;grid-row:1;max-width:150px}
#auth-dialog{padding:20px}
#auth-dialog h2{font-size:22px}}
@media(max-width:360px){.topbar .mode{max-width:150px}
.account-button{max-width:128px}
#auth-dialog{padding:16px}}
/* Public intake has no demo navigation. Shared design tokens remain internal standards. */
.topbar{grid-template-columns:minmax(0,1fr) auto}
.account-button{grid-column:2;grid-row:1}
@media(max-width:700px){.topbar{grid-template-columns:minmax(0,1fr) auto}}
/* Optional external resources stay together below the next actions. */
.completion-resources{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px 20px;margin-top:16px;font-size:14px;line-height:22px}
.completion-resources>a{display:inline-flex;align-items:center;gap:4px;min-height:36px;color:var(--muted);text-decoration:underline;text-underline-offset:3px;padding:4px 0}
.completion-resources>a:is(:hover,:focus-visible){color:var(--action)}
/* Request register v1: shared navigation, responsive data rows, resource buttons, and honest status badges. */
.topbar{grid-template-columns:minmax(0,1fr) auto auto}
.account-button{grid-column:3}
.topbar nav{align-items:center;gap:24px}
.topbar nav a{padding:8px 0;border-bottom:2px solid transparent}
.topbar nav a[aria-current=page]{border-bottom-color:var(--action)}
.history-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px}
.history-heading>div{min-width:0}
.history-heading>.button{flex:none}
.history-heading p{color:var(--muted);max-width:620px}
.history-heading h1:focus{outline:none}
.history-notice{border-left:3px solid var(--border);padding:4px 0 4px 16px;color:var(--muted);margin:0 0 32px}
.history-notice strong{font-weight:600;color:var(--ink);margin-right:8px}
.history-toolbar{display:flex;align-items:flex-end;gap:16px;margin-bottom:20px}
.history-search{flex:1}
.history-filter{width:190px}
.history-toolbar>.button{flex:none}
.history-toolbar .field{gap:8px}
.history-meta{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:16px 0 0}
.history-meta:has(#history-count:empty):has(#history-coverage:empty){display:none}
.history-meta>p:first-child{font-weight:600;flex:none}
.history-meta .hint{text-align:right;max-width:470px}
.history-meta>p:empty{display:none}
.history-request,.history-date,.history-status,.history-resources{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0}
.history-request-title{font-size:14px;line-height:22px;font-weight:600;color:var(--ink)}
.history-request .hint{overflow-wrap:anywhere}
.history-date time{font-variant-numeric:tabular-nums}
.priority-label{display:inline-flex;align-items:center;gap:6px;font-weight:500;white-space:nowrap}
.priority-label svg{width:16px;height:16px;flex:none}
.priority-label[data-priority='1']{color:var(--urgent)}
.priority-label[data-priority='2']{color:var(--high)}
.priority-label[data-priority='3']{color:var(--normal)}
.priority-label[data-priority='4']{color:var(--low)}
.status-badge{display:inline-block;border-radius:6px;padding:3px 8px;background:var(--status-pending-surface);color:var(--status-pending-ink);font-size:14px;font-weight:500;line-height:22px}
.history-resources{flex-direction:row;flex-wrap:wrap;gap:8px;width:100%}
.history-resources .resource-button{padding:10px;width:44px;height:44px;min-height:44px;flex:0 0 44px;justify-content:center;font-size:14px;line-height:22px;white-space:nowrap}
.history-page .history-resources .resource-button{--button-size:44px;width:44px;min-width:44px;padding:0}
.schedule-page .history-resources .resource-button{width:var(--button-size);height:var(--button-size);min-height:var(--button-size);padding:0;flex:0 0 var(--button-size)}
.resource-button .resource-logo{display:block;width:20px;height:20px;flex:none}
.resource-logo img{display:block;width:100%;height:100%;object-fit:contain}
.resource-button:disabled .resource-logo{background:var(--resource-disabled-ink);mask:var(--provider-logo) center/contain no-repeat;-webkit-mask:var(--provider-logo) center/contain no-repeat}
.resource-button:disabled .resource-logo img{visibility:hidden}
.resource-tooltip-anchor{display:inline-flex;flex:none;border-radius:var(--button-radius);outline-offset:3px;cursor:not-allowed}
.resource-tooltip-anchor>.resource-button{pointer-events:none}
.resource-tooltip-anchor:focus-visible{outline:2px solid var(--action)}
.resource-tooltip[popover]{margin:0;padding:8px 12px;box-sizing:border-box;border:1px solid var(--dropdown-border);border-radius:8px;background:var(--dropdown-surface);color:var(--ink);font:400 14px/22px var(--font-body);box-shadow:0 4px 12px var(--shadow-soft);pointer-events:none;overflow-wrap:anywhere}
/* Rich variant (Project UI v3, Oct 25): centered under the anchor with a 10px pointer that follows --ds-anchor-x from the
   canonical align:'center' placement; flips with the panel. Content is feature-built safe DOM. */
:root{--tooltip-rich-surface:var(--surface);--tooltip-rich-border:var(--border);--tooltip-rich-shadow:0 12px 32px var(--shadow-popover)}
:root[data-theme="dark"]{--tooltip-rich-surface:#2e2e31;--tooltip-rich-border:#48484d;--tooltip-rich-shadow:0 12px 32px #0006}
.resource-tooltip.is-rich[popover]{overflow:visible;padding:10px 12px;border-color:var(--tooltip-rich-border);border-radius:10px;background:var(--tooltip-rich-surface);box-shadow:var(--tooltip-rich-shadow);font-size:13px;line-height:18px}
.resource-tooltip.is-rich[popover]::before{content:"";position:absolute;left:var(--ds-anchor-x,50%);top:-6px;width:10px;height:10px;border:1px solid var(--tooltip-rich-border);border-width:1px 0 0 1px;background:var(--tooltip-rich-surface);transform:translateX(-50%) rotate(45deg)}
.resource-tooltip.is-rich[popover][data-vertical=up]::before{top:auto;bottom:-6px;border-width:0 1px 1px 0}
@media(forced-colors:active){.resource-tooltip[popover]{background:Canvas;color:CanvasText;border-color:CanvasText}.resource-tooltip-anchor:focus-visible{outline-color:Highlight}}
.history-resources .relation-status-control{flex-basis:100%;min-width:0;white-space:normal}
.sprint-table .history-resources:has(.relation-status-control){flex-wrap:wrap}
@media(forced-colors:active){.resource-button .resource-logo{background:ButtonText;mask:var(--provider-logo) center/contain no-repeat;-webkit-mask:var(--provider-logo) center/contain no-repeat}.resource-button .resource-logo img{visibility:hidden}.resource-button:disabled .resource-logo{background:GrayText}}
.resource-button:hover{text-decoration:none}
.resource-button:disabled{opacity:.55}
.history-resources .hint{font-size:14px;flex-basis:100%}
.history-resources .delete-row{flex-basis:100%}
.history-state{border:1px solid var(--border);border-radius:var(--radius-surface);padding:48px 24px;text-align:center;background:var(--surface)}
.history-state h2{font-size:20px;line-height:28px;font-weight:600;margin-bottom:8px}
.history-state .hint{max-width:520px;margin:0 auto}
.history-state .button{margin-top:24px}
.history-pagination{display:flex;justify-content:center;margin-top:24px}
.history-pagination:has([hidden]){display:none}
@media(max-width:900px){
.resource-button{padding:8px}
.topbar{gap:16px}}
@media(max-width:760px){.history-heading{align-items:flex-start;flex-direction:column}
.history-heading>.button{align-self:flex-start}
.history-toolbar{flex-wrap:wrap}
.history-search{flex-basis:100%}
.history-filter{flex:1;width:auto}
.history-meta{flex-direction:column;gap:4px}
.history-meta .hint{text-align:left}
.history-resources{display:flex;flex-direction:row;flex-wrap:wrap}
.history-resources>.hint{flex-basis:100%}
.history-status{gap:6px}
.history-state{padding:32px 20px}
.history-page .page-footer{flex-direction:column;gap:8px}}
@media(max-width:700px){.topbar{grid-template-columns:minmax(0,1fr) auto;gap:8px 12px}
.account-button{grid-column:2}
.topbar nav{grid-column:1/-1;grid-row:2;gap:24px}
.history-notice{margin-bottom:24px}}
/* Request cleanup: brand-colored controls; explicit confirmation communicates deletion. */
.history-bulk{position:sticky;top:calc(var(--portal-topbar-h,0px) + 8px);z-index:2;display:flex;align-items:center;flex-wrap:wrap;gap:12px 20px;padding:16px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-control);margin-bottom:16px;box-shadow:0 4px 12px var(--shadow-soft)}
.history-select-visible{display:flex;align-items:center;gap:10px;min-height:44px;cursor:pointer;font-weight:500}
.history-bulk input[type=checkbox],.request-selection input[type=checkbox]{flex:none}
.bulk-buttons{display:flex;gap:8px;margin-left:auto;flex-wrap:wrap}
.bulk-buttons .button{padding:10px 14px}
.history-bulk #history-selected-count{font-weight:600;white-space:nowrap}
.request-selection{display:flex;align-items:flex-start;gap:10px;cursor:pointer;min-height:44px}
.request-selection input{margin-top:2px!important}
.request-selection .history-request-title{min-width:0;overflow-wrap:anywhere}
.history-table .delete-row:not(:disabled):is(:hover,:focus-visible){background:var(--danger-surface);color:var(--danger)}
.history-delete-result{padding:16px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--subtle);margin:16px 0;overflow-wrap:anywhere}
#delete-dialog{padding:0;max-width:640px;max-height:calc(100dvh - 32px);overflow:hidden}
#delete-dialog[open]{display:flex;flex-direction:column}
#delete-dialog .delete-heading{padding:24px 28px 20px;border-bottom:1px solid var(--border);flex:none}
#delete-dialog h2{font-size:24px;line-height:30px;margin-bottom:12px}
#delete-dialog .delete-body{padding:20px 28px;overflow-y:auto;min-height:0;overscroll-behavior:contain}
#delete-items{padding-left:20px;margin:16px 0}
#delete-items:empty{display:none}
#delete-items li{padding:6px 0;overflow-wrap:anywhere}
#delete-items a{text-decoration:underline;text-underline-offset:3px}
#delete-summary{font-weight:500}
#delete-dialog .dialog-actions{padding:16px 28px;flex:none}
#delete-error{margin-top:16px}
@media(max-width:760px){.history-resources .delete-row{grid-column:1/-1;justify-content:flex-start;width:fit-content}
.history-bulk{top:0;gap:8px 16px}
.history-bulk>.hint{flex-basis:100%}
.bulk-buttons{margin-left:0;width:100%;display:grid;grid-template-columns:1fr 1fr}
.bulk-buttons .button{padding:10px 8px}}
@media(max-width:700px){#delete-dialog .delete-heading{padding:20px}
#delete-dialog .delete-body{padding:16px 20px}
#delete-dialog .dialog-actions{padding:12px 20px;gap:8px}}
/* Request register: separate context/actions, selection-only floating controls. */
.history-resources-cell .history-resources{flex-wrap:wrap}
.history-bulk{position:fixed;top:auto;bottom:calc(24px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);z-index:50;width:max-content;max-width:calc(100vw - 32px);margin:0;gap:12px;padding:12px;background:var(--action-fill);color:var(--on-action);border:0;box-shadow:0 8px 28px var(--shadow-strong);border-radius:12px;flex-wrap:nowrap}
.history-bulk:not([hidden]){animation:history-bulk-enter 180ms ease-out both}
.history-page:has(.history-bulk:not([hidden])){padding-bottom:180px}
.history-bulk .history-select-visible{font-weight:500;white-space:nowrap}
/* Bulk checkbox uses the universal canonical checked state. */
.history-bulk .bulk-buttons{width:auto;margin-left:0;display:flex;border-left:1px solid var(--on-action-divider);padding-left:12px}
.history-bulk .button{min-height:44px;padding:8px 12px;white-space:nowrap;color:var(--on-action);background:transparent;border-color:var(--on-action-border)}
.history-bulk .button:not(:disabled):is(:hover,:focus-visible){background:var(--on-action-hover);border-color:var(--on-action-border-hover);color:var(--on-action)}
.history-bulk .button:focus-visible,.history-bulk input:focus-visible{outline:2px solid var(--on-action);outline-offset:3px}
.history-bulk .button.danger{border-color:transparent}
.history-bulk .button.danger:not(:disabled):hover{background:var(--on-action-hover)}
@keyframes history-bulk-enter{from{opacity:0;transform:translate(-50%,20px)}to{opacity:1;transform:translate(-50%,0)}}
@media(max-width:760px){
.history-bulk{bottom:calc(16px + env(safe-area-inset-bottom));gap:8px}
.history-bulk .bulk-buttons{gap:0}}
@media(max-width:540px){.history-bulk{display:grid;grid-template-columns:auto auto;justify-content:space-between;gap:8px 12px;width:calc(100vw - 32px)}
.history-bulk .bulk-buttons{grid-column:1/-1;padding:8px 0 0;border-left:0;border-top:1px solid var(--on-action-divider)}
.history-bulk .bulk-buttons .button{width:100%;justify-content:center}
.history-bulk .history-select-visible{font-size:14px}}
@media(prefers-reduced-motion:reduce){.history-bulk:not([hidden]){animation:none}}
/* Selection is a separate leading column; request identity and urgency lead. */
.history-selection-cell .request-selection,.history-header-select{display:flex;align-items:center;justify-content:center;min-width:32px;min-height:44px;cursor:pointer}
.history-selection-cell .request-selection input{margin:0!important}
.history-header-select input{width:20px;height:20px;margin:0;accent-color:var(--action-fill);cursor:pointer}
.history-bulk{display:flex;width:max-content;gap:8px;padding:10px;flex-wrap:nowrap}
.history-bulk .bulk-buttons{display:flex;grid-column:auto;width:auto;border-top:0;border-left:1px solid var(--on-action-divider);padding:0 0 0 8px}
.history-bulk .button{padding:8px 10px}
.history-bulk #history-select-all{border-color:transparent}
.history-bulk .bulk-buttons .button{width:auto}
@media(max-width:360px){.history-bulk{gap:4px;padding:8px;max-width:calc(100vw - 16px)}
.history-bulk .button{padding:8px 6px;gap:4px}
.history-bulk .bulk-buttons{padding-left:4px}}
/* Opt-in button sizes: lg preserves the previous 44px register controls.
   Use button-lg / button-md / button-sm with button-icon for square controls.
   Text stays 14px at every size; existing un-sized form CTAs are unchanged. */



/* Compact progressive filter: one cross-category draft, one Apply.
   Only the bounded body scrolls; header and footer remain visible. */
.history-toolbar{display:block}




.filter-count{min-width:20px;height:20px;line-height:20px;text-align:center;border-radius:4px;background:var(--menu-active);color:var(--action);font-weight:600}
.history-filter-popover{position:fixed;inset:auto;margin:0;width:344px;max-width:calc(100vw - 24px);padding:0;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--surface);color:var(--ink);box-shadow:0 8px 32px var(--shadow-popover);font-size:14px;line-height:22px;overflow:hidden}
.history-filter-popover:popover-open{display:flex;flex-direction:column;visibility:hidden}
.history-filter-popover:popover-open[data-positioned=true]{visibility:visible}
.filter-heading{display:flex;align-items:center;gap:8px;padding:8px 10px;flex:none;min-height:48px}
.filter-heading h2{font-size:14px;line-height:22px;font-weight:600;flex:1;margin:0}
.filter-heading h2:focus{outline:none}
.filter-heading .button{border-color:transparent;background:transparent}
#history-filter-close{font-size:22px;font-weight:400}
.filter-body{padding:4px 6px;min-height:0;max-height:264px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.filter-option{display:flex;align-items:center;gap:10px;width:100%;min-height:40px;padding:8px 10px;border:0;border-radius:5px;background:transparent;color:var(--ink);font-size:14px;line-height:22px;font-weight:400;text-align:left;cursor:pointer}
.filter-option:is(:hover,:focus-visible){background:var(--menu-active);color:var(--action)}
.filter-option:focus-visible{outline-offset:-2px}
.filter-option[aria-pressed=true],.filter-check:has(:checked){background:var(--menu-active)}
.filter-option[aria-pressed=true]::after{content:'✓';margin-left:auto;color:var(--action);font-weight:600}
.filter-category{min-height:40px;justify-content:space-between}
.filter-category-text{display:flex;flex-direction:column;min-width:0;gap:2px;font-weight:500}
.filter-summary{color:var(--muted);font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.filter-chevron{font-size:22px;color:var(--muted);flex:none}
.filter-check input[type=checkbox]{flex:none}
.filter-check .priority-label{font-weight:400}
.filter-footer{flex:none;padding:8px 10px;background:var(--surface)}
.filter-footer-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}
.filter-footer .button{border-color:transparent}
.filter-date-editor{display:flex;flex-direction:column;gap:16px;padding:10px}
.filter-date-editor .field{min-width:0;gap:6px}
.filter-date-editor input,.filter-date-editor select{width:100%;min-width:0;min-height:40px;font-size:14px;padding:8px;border:1px solid var(--field-border);border-radius:var(--field-radius-short);color:var(--ink);background:var(--field-surface)}
.filter-date-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.filter-date-fields>.field:only-child{grid-column:1/-1}
.filter-date-fields:has(input[type=date]){grid-template-columns:minmax(0,1fr)}
.filter-date-editor [aria-invalid=true]{border-color:var(--danger)}
.filter-date-editor .button{align-self:flex-end}
.history-resources .resource-button:disabled{background:var(--resource-disabled-surface);color:var(--resource-disabled-ink);border-color:var(--resource-disabled-border);opacity:1;cursor:not-allowed}
@media(max-width:620px){.history-search-row{flex-wrap:wrap}
.history-search-row .history-search{flex-basis:100%}
.history-search-row #history-refresh{margin-left:auto}}
@media(forced-colors:active){.filter-option[aria-pressed=true],.filter-check:has(:checked){outline:1px solid Highlight;outline-offset:-2px}}
/* Keep dependent fields beside their controlling field; never backfill a hidden slot. */
.context-field,.priority-field,.impact-field{grid-column:1}
.field-grid>#customer-field,.field-grid>#blocking-field{grid-column:2}
.field-grid>#blocking-field>.field-shell{margin-top:auto}
#priority-help a{text-decoration:underline;text-underline-offset:3px}
@media(max-width:700px){.field-grid>#customer-field,.field-grid>#blocking-field{grid-column:1}}
/* Delegated intake is an explicit, account-gated choice, never the default. */
.submit-as-section{margin-top:var(--s8);padding:var(--s8) 0 var(--s4);border:0;border-top:1px solid var(--border);border-radius:0;background:transparent}
.submit-as-section:not([hidden])+.submit,.escalation+.submit-as-section[hidden]+.submit{margin-top:var(--s4)}
.submit-as-toggle{display:flex;align-items:center;gap:8px;font-weight:600;cursor:pointer;width:fit-content;min-height:24px}
.submit-as-toggle input{flex:none}
.submit-as-section>.hint{margin-top:4px}
.submit-as-fields{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:16px}
.submit-as-fields .field{min-width:0}
@media(max-width:700px){.submit-as-fields{grid-template-columns:1fr;gap:16px}}
/* Account theme: Light is the first-paint and signed-out default.
   The verified account preference resolves System via matchMedia without resets.
   Action text and action fills are separate: white-on-cobalt stays legible. */
.account-appearance{margin-top:24px;padding-top:20px;border-top:1px solid var(--border)}
.account-appearance label{display:block;font-weight:600;margin-bottom:8px}
.account-appearance select{margin-top:12px}
#account-theme-status{margin-top:8px;min-height:22px}
#account-theme-status[data-error=true]{color:var(--danger)}

/* Segmented choice (Portal adapter): shared secondary buttons with an explicit pressed state, using the same
   selection tokens as filter options. Used by the Live/Demo switch and Schedule Timeline/Month. */
.segmented{display:inline-flex;align-items:center;gap:var(--s1)}
.segmented>.button[aria-pressed=true]{background:var(--menu-active);color:var(--action);border-color:var(--action)}
.topbar-start{display:flex;align-items:center;gap:var(--s3);min-width:0}
:root[data-portal-mode=demo] .portal-mode>.button[aria-pressed=true]{background:var(--warning-surface);color:var(--warning);border-color:var(--warning)}
:root[data-portal-mode=demo] .status-dot{background:var(--warning)}
/* Estimated sprint column: same shared mapping as Schedule sprint detail. */
.history-sprint{display:flex;flex-direction:column;align-items:flex-start;gap:var(--s1);min-width:0}
@media(max-width:700px){.segmented>.button{--button-size:44px}.topbar-start{gap:var(--s2)}}
@media(forced-colors:active){.segmented>.button[aria-pressed=true]{outline:2px solid Highlight;outline-offset:2px}}

/* Canonical dropdown adapter for the long Release snapshot selector. */
#release-plans{min-width:0}
#release-plan-snapshot-control{min-height:44px;min-width:0;width:100%;max-width:100%}

@media(pointer:coarse),(max-width:700px){.escalation-control label,.submit-as-toggle{min-height:44px;align-content:center}}

/* Portal rich description uses shared Internal Log-derived editor, no note send/source/speech workflow. */
.portal-description{border:1px solid var(--field-border);border-radius:var(--field-radius-long);background:var(--field-surface);overflow:hidden;min-width:0}
.portal-description:focus-within{border-color:var(--action);box-shadow:0 0 0 3px var(--menu-active)}
.portal-description:has([aria-invalid=true]){border-color:var(--danger)}
.portal-description .ds-rich-toolbar{padding:8px 12px 12px}
.portal-description .ds-rich-links{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:8px 12px}
.portal-description .ds-rich-links input{flex:1 1 180px;min-width:0;max-width:100%}
.portal-description .ds-rich-links label{margin:0}
.portal-description .ds-rich-editor{max-height:420px}
.portal-description .ds-rich-editor:focus-visible{outline:none}
#preview-content .ds-rich-content{white-space:pre-wrap}
@media(forced-colors:active){.portal-description{border-color:FieldText;background:Field}.portal-description:focus-within{outline:2px solid Highlight;outline-offset:2px}}

/* Portal keyboard shortcut hint (Cmd/Ctrl + Return) inside Preview ticket and Submit ticket. Decorative: the button carries aria-keyshortcuts. Glyph treatment follows the Product Hub search kbd. */
.portal-shortcut{display:inline-flex;align-items:center;gap:3px;margin-left:var(--s2);flex:none}
.portal-shortcut kbd{box-sizing:border-box;display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 4px;border:1px solid color-mix(in srgb,currentColor 35%,transparent);border-radius:5px;background:color-mix(in srgb,currentColor 12%,transparent);color:inherit;font:500 12px/1 -apple-system,"Helvetica Neue",var(--font-body)}
.portal-shortcut .portal-shortcut-cmd{font-size:13px}
@media(hover:none) and (pointer:coarse){.portal-shortcut{display:none}}
@media(forced-colors:active){.portal-shortcut kbd{border-color:ButtonText;background:transparent}}

/* Portal ticket drafts (server, per account): Drafts pill in the Ticket details header opens a right drawer (Activity-panel geometry); Save draft beside Preview ticket.
   Neutral fills follow .pb-scope / --hub-data-fill (surface mixed with ink), so Light and Dark both come from tokens. */
.form-meta .required-note{white-space:nowrap}
.draft-header-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:var(--s2);align-self:flex-end;flex:none}
.draft-header-actions:not(:has(>:not([hidden]))){display:none}
.draft-editing-badge{display:inline-flex;align-items:center;padding:4px 12px;border-radius:999px;background:var(--menu-active);color:color-mix(in srgb,var(--action) 70%,var(--ink));font-size:13px;line-height:20px;font-weight:600;white-space:nowrap}
.draft-editing-badge[hidden],.draft-trigger[hidden]{display:none}
.button.draft-trigger{height:40px;min-height:40px;padding:0 8px 0 16px;gap:8px;border-radius:999px;font-size:var(--text-base);line-height:22px;white-space:nowrap}
.draft-trigger>svg{width:18px;height:18px;flex:none}
.button.draft-trigger[aria-expanded=true]{background:var(--menu-active);border-color:var(--action)}
.draft-count{display:inline-grid;place-items:center;box-sizing:border-box;min-width:24px;height:24px;padding:0 6px;border-radius:999px;background:var(--action-fill);color:var(--on-action);font-size:13px;line-height:24px;font-weight:600;font-variant-numeric:tabular-nums}
dialog.draft-drawer{position:fixed;inset:0 0 0 auto;margin:0;width:min(420px,100vw);max-width:100vw;height:100dvh;max-height:100dvh;padding:0;border:0;border-left:1px solid var(--border);border-radius:0;box-shadow:none;background:var(--surface);color:var(--ink);overflow:hidden;box-sizing:border-box;--draft-fill:color-mix(in srgb,var(--surface) 93%,var(--ink));--draft-outline:color-mix(in srgb,var(--surface) 86%,var(--ink));--draft-group:color-mix(in srgb,var(--surface) 75%,var(--ink));--draft-hover:color-mix(in srgb,var(--surface) 87%,var(--ink));--draft-danger-line:color-mix(in srgb,var(--danger-surface) 72%,var(--danger));--draft-danger-strong:color-mix(in srgb,var(--danger-surface) 64%,var(--danger));--draft-danger-hover:color-mix(in srgb,var(--danger-surface) 80%,var(--danger));--draft-danger-ink:color-mix(in srgb,var(--danger) 55%,var(--ink));--draft-danger-soft:color-mix(in srgb,var(--danger) 45%,var(--muted));--draft-dim:color-mix(in srgb,var(--muted) 88%,var(--surface))}
/* Light muted is already near the 4.5:1 floor on the hover fill, so the dim timestamp stays muted there. */
:root[data-theme=light] dialog.draft-drawer{--draft-dim:var(--muted)}
dialog.draft-drawer[open]{display:flex;flex-direction:column;animation:draft-drawer-enter .16s ease-out}
@keyframes draft-drawer-enter{from{opacity:0;transform:translateX(16px)}to{opacity:1;transform:none}}
.draft-drawer-header{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--s3);padding:14px 12px 12px 20px;border-bottom:1px solid var(--border);flex:none}
.draft-drawer-header>div{min-width:0}
.draft-drawer-header h2{margin:0;font-size:18px;line-height:26px;font-weight:600;letter-spacing:0}
.draft-drawer-count{color:var(--muted);font-weight:500;font-variant-numeric:tabular-nums}
.draft-drawer-header .hint{margin:0;font-size:13px;line-height:20px}
.draft-drawer-header .icon-button{flex:none}
.draft-drawer-error{margin:0;padding:8px 20px;border-bottom:1px solid var(--border);font-size:13px;line-height:20px;color:var(--danger)}.draft-drawer-error[hidden]{display:none}
.draft-list{list-style:none;margin:0;padding:8px;display:flex;flex-direction:column;gap:4px;flex:1 1 auto;min-height:0;overflow-y:auto}
.draft-drawer-foot{margin:0;padding:10px 20px;border-top:1px solid var(--border);font-size:13px;line-height:20px;flex:none}
.draft-item{position:relative;display:flex;align-items:flex-start;gap:8px;padding:10px 8px 10px 14px;border:1px solid transparent;border-radius:12px;cursor:pointer;transition:background-color .15s,border-color .15s}
.draft-item+.draft-item::before{content:'';position:absolute;top:-4px;left:14px;right:14px;height:1px;background:var(--draft-fill);pointer-events:none}
.draft-item:is(:hover,:focus-within,.is-open,.is-confirm)::before,.draft-item:is(:hover,:focus-within,.is-open,.is-confirm)+.draft-item::before{opacity:0}
.draft-item:is(:hover,:focus-within){background:var(--draft-fill)}
.draft-item.is-open{background:var(--draft-fill);border-color:var(--draft-outline)}
.draft-item.is-confirm{background:var(--danger-surface);border-color:var(--draft-danger-line);cursor:default}
.draft-info{display:flex;flex-direction:column;gap:2px;flex:1 1 auto;min-width:0}
.draft-title{font-size:14px;line-height:22px;font-weight:600;color:color-mix(in srgb,var(--ink) 80%,var(--muted));display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.draft-item:is(:hover,:focus-within,.is-open) .draft-title{color:var(--ink)}
.draft-meta{display:flex;flex-wrap:wrap;align-items:center;gap:2px 6px;font-size:13px;line-height:20px;color:var(--muted)}
.draft-dot{width:6px;height:6px;border-radius:50%;flex:none;background:var(--high)}.draft-dot.is-ready{background:var(--success)}
.draft-state,.draft-time,.draft-time-inline{white-space:nowrap}.draft-time,.draft-time-inline{color:var(--draft-dim)}
.draft-side{display:grid;flex:none;justify-items:end}.draft-side>*{grid-area:1/1}
.draft-side .draft-time{margin-top:1px;pointer-events:none;font-size:13px;line-height:20px;font-variant-numeric:tabular-nums;transition:opacity .15s}
.draft-item:is(:hover,:focus-within) .draft-side .draft-time{opacity:0}
.draft-time-inline{display:none}
.draft-confirm-text{font-size:14px;line-height:22px;font-weight:600;color:var(--draft-danger-ink)}
.draft-confirm-title{font-size:13px;line-height:20px;color:var(--draft-danger-soft);display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.draft-actions{display:flex;flex:none;padding:1px;border:1px solid var(--draft-group);border-radius:999px;opacity:0;pointer-events:none;transition:opacity .15s}
.draft-item:is(:hover,:focus-within) .draft-actions,.draft-actions.is-confirm{opacity:1;pointer-events:auto}
.draft-actions.is-confirm{border-color:var(--draft-danger-strong)}
.draft-action{display:grid;place-items:center;width:28px;height:28px;padding:0;border:0;border-radius:999px;background:transparent;color:var(--muted);font:inherit;cursor:pointer}
.draft-action svg{width:15px;height:15px;pointer-events:none}
.draft-action:hover:not(:disabled){background:var(--draft-hover);color:var(--ink)}
.draft-action.is-delete:hover{background:var(--draft-danger-hover);color:var(--danger)}
.draft-action:disabled{color:color-mix(in srgb,var(--muted) 52%,var(--surface));cursor:not-allowed}
.draft-action.is-danger{color:var(--danger)}.draft-action.is-cancel{color:var(--draft-danger-soft)}
.draft-actions.is-confirm .draft-action:hover{background:var(--draft-danger-hover);color:var(--draft-danger-ink)}
.draft-action:focus-visible{outline:2px solid var(--focus);outline-offset:1px}
@media(max-width:700px){.form-meta:has(.draft-header-actions>:not([hidden])){flex-wrap:wrap}.draft-header-actions{flex:1 1 100%;justify-content:flex-start;align-self:auto}}
@media(hover:none){.draft-actions{opacity:1;pointer-events:auto}.draft-side .draft-time{display:none}.draft-time-inline{display:inline}}
@media(pointer:coarse){.button.draft-trigger{height:44px;min-height:44px}.draft-action{width:44px;height:44px}}
@media(prefers-reduced-motion:reduce){dialog.draft-drawer[open]{animation:none}.draft-item,.draft-actions,.draft-side .draft-time{transition:none}}
@media(forced-colors:active){.draft-item:is(:hover,:focus-within,.is-open,.is-confirm){border-color:Highlight}.draft-item+.draft-item::before{background:CanvasText}.draft-actions{border-color:ButtonText}.draft-count,.draft-editing-badge{border:1px solid CanvasText}.draft-dot{forced-color-adjust:none}.button.draft-trigger[aria-expanded=true]{outline:2px solid Highlight}}
.submit-actions{display:flex;gap:var(--s3);margin-top:var(--s8)}.submit-actions .submit{margin-top:0;flex:1 1 auto;width:auto}.submit-actions .save-draft{min-height:52px;flex:none}.save-draft[hidden]{display:none}
.draft-status{margin:var(--s2) 0 0;font-size:14px;line-height:22px;color:var(--muted)}.draft-status:empty{display:none}.draft-status.is-error{color:var(--danger)}
@media(max-width:700px){.submit-actions{flex-direction:column-reverse}.submit-actions .save-draft{width:100%}}
/* Portal topbar (Oct 16 handoff design_handoff_portal_topbar + user request: sticky). One adapter; overrides the older .topbar/.portal-planning-nav layers above.
   Bar: logo (+ Owner Demo badge), navigation (color/weight only), Product Hub (Owner/Admin by server capability) and Account (menu when signed in). */
.topbar.portal-planning-nav.portal-topbar{position:sticky;top:0;z-index:30;display:flex;flex-direction:row;align-items:center;gap:20px;min-height:58px;padding:9px 24px;background:var(--canvas);border-bottom:1px solid var(--border);box-sizing:border-box}
.portal-topbar .topbar-start{display:flex;align-items:center;gap:8px;flex:none;flex-wrap:nowrap}
.portal-logo{display:inline-flex;border-radius:8px;flex:none}
.portal-logo img{display:block;width:32px;height:32px;border-radius:8px}
.portal-logo:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.portal-demo-badge{display:inline-flex;align-items:center;padding:0 8px;border:1px solid color-mix(in srgb,var(--warning) 45%,transparent);border-radius:999px;background:var(--warning-surface);color:var(--warning);font-size:12px;line-height:18px;font-weight:600}
.portal-demo-badge[hidden]{display:none}
.portal-topbar nav.ds-nav{flex:1 1 auto;display:flex;flex-wrap:nowrap;gap:12px;min-width:0}
.portal-topbar nav.ds-nav a{padding:8px 10px;min-height:40px;border:0;border-radius:8px;background:none;color:var(--muted);font-weight:400;white-space:nowrap;text-decoration:none}
.portal-topbar nav.ds-nav a[aria-current=page]{color:var(--ink);font-weight:500;border:0;background:none}
.portal-topbar nav.ds-nav a:hover{color:var(--ink);background:none}
.portal-topbar nav.ds-nav a:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}
.portal-topbar .topbar-end{display:flex;align-items:center;gap:8px;flex:none;margin-left:auto}
.portal-hub-link{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 12px;border-radius:999px;color:var(--action);font-size:14px;line-height:22px;font-weight:400;text-decoration:none;white-space:nowrap}
.portal-hub-link[hidden]{display:none}
.portal-hub-link .ds-icon{width:16px;height:16px;flex:none}
.portal-hub-link:hover{background:color-mix(in srgb,var(--action) 10%,var(--canvas));color:color-mix(in srgb,var(--action) 70%,var(--ink));text-decoration:none}
.portal-hub-link:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.portal-topbar .account-button{grid-column:auto;grid-row:auto;display:inline-flex;align-items:center;gap:8px;min-width:0;max-width:240px;height:40px;min-height:40px;padding:0 12px 0 6px;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--ink);font:inherit;font-size:14px;font-weight:500;cursor:pointer}
.portal-topbar .account-button:not(.is-signed-in){padding:0 12px}
.portal-topbar .account-button:hover{border-color:color-mix(in srgb,var(--ink) 28%,var(--surface))}
.portal-topbar .account-button:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.portal-topbar .account-button[aria-expanded=true]{border-color:var(--action);background:var(--menu-active)}
.account-avatar{display:inline-grid;place-items:center;flex:none;width:28px;height:28px;border-radius:50%;background:var(--menu-active);color:var(--action);font-size:12px;line-height:1;font-weight:700}
.account-avatar[hidden],.account-button.is-signed-in .account-signin-icon{display:none}
.account-button[aria-expanded=true] .account-avatar{background:var(--action-fill);color:var(--on-action)}
.account-signin-icon{width:18px;height:18px;flex:none}
/* Account menu: canonical .ds-dropdown paint, anchored by ReuselyDS.trackDropdown (288px, 8px gap). */
.portal-account-menu.ds-dropdown{width:288px;padding:6px;gap:0;max-height:min(520px,calc(100dvh - 16px));overflow:auto;box-shadow:var(--shadow-overlay)}
.portal-account-identity{display:grid;gap:2px;padding:8px 10px;min-width:0}
.portal-account-identity-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;min-width:0}
.portal-account-identity strong{min-width:0;font-weight:600;overflow-wrap:anywhere}
.portal-account-identity-head>span{flex:none;white-space:nowrap}
.portal-account-identity span{font-size:13px;line-height:20px;color:var(--muted);overflow-wrap:anywhere}
.portal-account-identity span:empty{display:none}
.portal-account-divider{border:0;border-top:1px solid var(--dropdown-border);margin:4px 0}
.portal-account-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 10px;font-size:14px;line-height:22px}
.portal-account-row[hidden]{display:none}
.portal-segmented{box-sizing:border-box;width:var(--portal-segmented-w,144px);display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);padding:2px;border:1px solid var(--dropdown-border);border-radius:999px;background:transparent}
.portal-segmented>button{display:inline-flex;align-items:center;justify-content:center;height:28px;padding:0;border:0;border-radius:999px;background:transparent;color:var(--muted);font:inherit;font-size:13px;line-height:20px;font-weight:600;cursor:pointer}
.portal-segmented>button .ds-icon{width:16px;height:16px}
.portal-segmented>button:hover:not(:disabled){color:var(--ink)}
.portal-segmented>button:focus-visible{outline:2px solid var(--focus);outline-offset:1px}
.portal-segmented>button:disabled{opacity:.5;cursor:not-allowed}
.portal-segmented>button[aria-pressed=true]{background:var(--menu-active);color:var(--action)}
.portal-mode-toggle>[data-mode-option=demo][aria-pressed=true]{background:var(--warning-surface);color:var(--warning)}
.portal-account-status{margin:0;padding:0 10px;font-size:13px;line-height:20px;color:var(--muted)}
.portal-account-status:empty{display:none}
.portal-account-status[data-error=true]{color:var(--error,var(--urgent))}
.portal-account-signout{display:flex;align-items:center;width:100%;padding:8px 10px;border:0;border-radius:8px;background:transparent;color:var(--dropdown-ink);font:inherit;font-size:14px;line-height:22px;text-align:left;cursor:pointer}
.portal-account-signout:hover:not(:disabled){background:var(--dropdown-hover)}
.portal-account-signout:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}
@media(max-width:900px) and (min-width:701px){.portal-hub-link{width:36px;padding:0;justify-content:center}.portal-hub-link .portal-hub-label,.portal-hub-link .portal-hub-arrow{display:none}}
@media(max-width:700px){
 .topbar.portal-planning-nav.portal-topbar{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;gap:8px 12px;padding:8px 16px 4px}
 .portal-topbar .topbar-start{grid-column:1;grid-row:1}
 .portal-topbar .topbar-end{grid-column:2;grid-row:1;margin:0}
 .portal-topbar nav.ds-nav{grid-column:1/-1;grid-row:2;overflow-x:auto;scrollbar-width:none;gap:4px;margin:0 -6px}
 .portal-topbar nav.ds-nav::-webkit-scrollbar{display:none}
 .portal-topbar nav.ds-nav a{min-height:44px}
 .portal-hub-link{width:44px;height:44px;padding:0;justify-content:center}
 .portal-hub-link .portal-hub-label,.portal-hub-link .portal-hub-arrow{display:none}
 .portal-topbar .account-button.is-signed-in{width:44px;height:44px;padding:0;justify-content:center}
 .portal-topbar .account-button.is-signed-in #account-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
 .portal-topbar .account-button:not(.is-signed-in){height:44px;max-width:150px}
}
@media(pointer:coarse){.portal-topbar nav.ds-nav a,.portal-hub-link,.portal-topbar .account-button{min-height:44px}.portal-segmented>button{height:40px}.portal-account-signout{min-height:44px}}
@media(forced-colors:active){.portal-topbar nav.ds-nav a[aria-current=page]{outline:1px solid Highlight}.portal-segmented>button[aria-pressed=true]{outline:2px solid Highlight}.portal-topbar .account-button[aria-expanded=true]{outline:2px solid Highlight}.portal-demo-badge{border-color:CanvasText}}
@media(prefers-reduced-motion:reduce){.portal-topbar *{transition:none}}
/* The sticky topbar height is measured by app.js so sticky children and scrolled-to fields stay below it. */
html{scroll-padding-top:calc(var(--portal-topbar-h,0px) + 8px)}
/* My tickets heading. */
.history-page .history-heading{margin-bottom:var(--s6)}
.history-page .history-heading h1{font-size:30px;line-height:38px;font-weight:600}
.history-page .history-heading p{font-size:15px;color:var(--muted)}
.history-state:not([hidden])+.history-table-wrap:not([hidden]){margin-top:16px}
/* Portal table standard (Oct 19 handoff; prototype 2a/2b with Tree line, no row hover, Raised header) for My tickets,
   Sprint and Release. Spec hex values are the dark theme; light equivalents are defined here; the rest are DS tokens. */
:root{--pt-tree:#c6c9d1;--pt-dim:#a2a7b2;--pt-quiet:#6b7080;--pt-head-ink:var(--muted);--pt-title:var(--ink);--pt-chip-neutral:#e4e5eb;--pt-chip-neutral-ink:#202124;--pt-logo-off:#b2b6bf}
:root[data-theme="dark"]{--pt-tree:#3a3a44;--pt-dim:#4f4f5c;--pt-quiet:#76768a;--pt-head-ink:#8a8a96;--pt-title:#ececf1;--pt-chip-neutral:#3d3d47;--pt-chip-neutral-ink:#ececf1;--pt-logo-off:#5c5c68}
.pt-toolbar .field.history-search{max-width:360px}
@media(min-width:701px){.pt-toolbar .ds-table-control{min-height:36px;min-width:36px;padding:6px 8px;border-radius:10px}.pt-toolbar .ds-table-control[data-active=true]{padding-inline:12px}.pt-toolbar .ds-table-search{min-height:36px;padding-block:6px;border-radius:10px}}
.pt-group-menu{padding:8px}.pt-group-menu h3{margin:4px 8px 8px;font:600 12px/16px var(--font-body);letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
div.pt-wrap{max-width:100%;border:1px solid var(--border);border-radius:var(--radius-surface);background:var(--surface);overflow:clip}
div.pt-wrap:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.pt-table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:14px;line-height:20px;color:var(--ink)}
.pt-head{position:sticky;top:var(--portal-topbar-height,58px);z-index:2;height:40px;box-sizing:border-box;padding:0 12px;text-align:left;vertical-align:middle;font:600 11px/16px var(--font-body);letter-spacing:.06em;text-transform:uppercase;color:var(--pt-head-ink);background:var(--field-surface);border-bottom:1px solid var(--border);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pt-head:last-child,.pt-row td:last-child{padding-right:16px}
/* Sortable headers (Oct 19): the label is a button; the arrow marks the sorted column, in sync with the toolbar Sort button. */
.pt-sort{display:inline-flex;align-items:center;gap:4px;max-width:100%;min-height:24px;margin:0 -4px;padding:0 4px;border:0;border-radius:6px;background:transparent;color:inherit;font:inherit;letter-spacing:inherit;text-transform:inherit;cursor:pointer;white-space:nowrap}
.pt-sort>span{overflow:hidden;text-overflow:ellipsis}
.pt-sort:hover,.pt-sort[data-sorted]{color:var(--ink)}
.pt-sort:focus-visible{outline:2px solid var(--focus);outline-offset:1px}
.pt-sort-icon{width:12px;height:12px;flex:none}
.pt-head-title,.pt-row td.pt-title{padding-left:16px}
.pt-table.is-grouped .pt-head-title,.pt-row td.pt-tree{padding-left:66px}
.pt-row td{padding:10px 12px;vertical-align:middle;background:transparent;border:0}
.pt-table .pt-relations{text-align:right}
.pt-head.pt-relations{padding-left:0;text-overflow:clip}
/* Tree line: drawn per row in the title cell so it follows any row height (wrapped titles, density). */
.pt-tree{position:relative}
.pt-tree::before,.pt-tree::after,.pt-group-head.is-open::after{content:'';position:absolute;pointer-events:none;box-sizing:border-box}
.pt-tree::before{left:46px;top:0;bottom:0;border-left:1px solid var(--pt-tree)}
.pt-tree::after{left:46px;top:calc(50% - 9px);width:12px;height:10px;border-left:1px solid var(--pt-tree);border-bottom:1px solid var(--pt-tree);border-bottom-left-radius:8px}
.pt-tree.is-last::before{display:none}
.pt-tree.is-last::after{top:0;height:calc(50% + 1px)}
.pt-group-head{position:relative;height:40px;padding:0 16px 0 calc(var(--pt-lead,0px) + 16px);text-align:left;font-weight:400;background:transparent;border:0}
.pt-group-head.is-first{padding-top:10px}
.pt-group-head.is-open::after{left:calc(var(--pt-lead,0px) + 46px);top:30px;bottom:0;border-left:1px solid var(--pt-tree)}
.pt-group-head.is-first.is-open::after{top:40px}
.pt-group-toggle{display:flex;align-items:center;gap:10px;height:40px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--ink);font:inherit;cursor:pointer}
.pt-group-toggle:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.pt-chevron{width:14px;height:14px;flex:none;color:var(--pt-quiet)}
.pt-group-head.is-open .pt-chevron{transform:rotate(90deg)}
.pt-group-count{color:var(--pt-quiet);font-size:13px;font-weight:500;font-variant-numeric:tabular-nums}
/* Status chip: one component for group rows and the Status/Progress column. Every pair passes 4.5:1. */
.pt-chip{display:inline-flex;align-items:center;gap:4px;max-width:100%;height:20px;box-sizing:border-box;padding:0 6px;border-radius:5px;background:var(--pt-chip-neutral);color:var(--pt-chip-neutral-ink);font:700 11px/14px var(--font-body);letter-spacing:.04em;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pt-chip:is([data-tone=review],[data-tone=analysis],[data-tone=approved],[data-tone=sprint],[data-tone=dev],[data-tone=testing],[data-tone=ready],[data-tone=released],[data-tone=declined]){color:#fff}
.pt-chip[data-tone=review]{background:#6d28d9}.pt-chip[data-tone=analysis]{background:#a21caf}.pt-chip[data-tone=approved]{background:#17734b}.pt-chip[data-tone=sprint]{background:#3949ab}
.pt-chip[data-tone=dev]{background:#1d5fd1}.pt-chip[data-tone=testing]{background:#b4530a}.pt-chip[data-tone=ready]{background:#be185d}.pt-chip[data-tone=released]{background:#0f7f73}.pt-chip[data-tone=declined]{background:#b83232}
/* Project Tracker tones (Oct 22 Claude Design): Active / In progress action fill, On hold light neutral, Waiting other team
   amber, Canceled outline, Completed green. Not started keeps the neutral chip. */
.pt-chip:is([data-tone=active],[data-tone=progress],[data-tone=done]){color:#fff}.pt-chip:is([data-tone=active],[data-tone=progress]){background:var(--action-fill)}.pt-chip[data-tone=done]{background:#17734b}
.pt-chip[data-tone=hold]{background:#cfd2da;color:#202124}:root[data-theme="dark"] .pt-chip[data-tone=hold]{background:#c9c9d3;color:#141418}
.pt-chip[data-tone=waiting]{background:#f5b83d;color:#1a1408}
.pt-chip[data-tone=canceled]{background:transparent;color:var(--muted);box-shadow:inset 0 0 0 1px var(--pt-tree)}
.pt-chip-flag{width:12px;height:12px;flex:none;fill:currentColor}
.pt-chip[data-priority='1'] .pt-chip-flag{color:var(--urgent)}.pt-chip[data-priority='2'] .pt-chip-flag{color:var(--high)}.pt-chip[data-priority='3'] .pt-chip-flag{color:var(--normal)}.pt-chip[data-priority='4'] .pt-chip-flag{color:var(--low)}
.pt-title-link{display:block;max-width:100%;color:var(--pt-title);font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pt-empty{position:relative;display:inline-block;color:var(--pt-dim)}
.pt-muted{color:var(--muted);white-space:nowrap}
.pt-date{color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.pt-table .history-sprint-link{color:var(--action);font-weight:500;white-space:nowrap}
.pt-table .priority-label{gap:6px;color:var(--ink);font-weight:500}
.pt-table .priority-label svg{width:14px;height:14px;fill:currentColor}
.pt-table .priority-label[data-priority='1'] svg{color:var(--urgent)}.pt-table .priority-label[data-priority='2'] svg{color:var(--high)}.pt-table .priority-label[data-priority='3'] svg{color:var(--normal)}.pt-table .priority-label[data-priority='4'] svg{color:var(--low)}
.pt-person{display:inline-flex;align-items:center;gap:8px;max-width:100%;min-width:0;vertical-align:middle}
.pt-avatar{display:inline-grid;place-items:center;width:22px;height:22px;flex:none;border-radius:999px;background:var(--pt-chip-neutral);color:var(--pt-chip-neutral-ink);font:600 10px/1 var(--font-body)}
.pt-person-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Relations: right-aligned, 2px gap, 28px hit areas, 15px logos; not linked is one neutral grey silhouette. */
.pt-table .history-resources{display:inline-flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-end;align-items:center;gap:2px;width:auto;vertical-align:middle}
.pt-table .history-resources:has(.relation-status-control){flex-wrap:wrap}
.pt-table .resource-link{width:28px;height:28px;border-radius:8px}
.pt-table .resource-link .resource-logo,.pt-table .resource-link .resource-logo img{width:15px;height:15px}
.pt-table .resource-link[data-available=false]{opacity:1;filter:none}
.pt-table .resource-link[data-available=false] .resource-logo{background:var(--pt-logo-off);mask:var(--provider-logo) center/contain no-repeat;-webkit-mask:var(--provider-logo) center/contain no-repeat}
.pt-table .resource-link[data-available=false] .resource-logo img{visibility:hidden}
/* My tickets selection (Owner delete) keeps its leading checkbox column and trailing action column. */
.pt-table tr.is-selected td{background:var(--selection-surface)}
.pt-table .delete-row{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;padding:8px;color:var(--muted);background:transparent;border-color:transparent}
.pt-table .delete-row:not(:disabled):is(:hover,:focus-visible){background:var(--danger-surface);color:var(--danger)}
.pt-table .delete-row svg{width:18px;height:18px;flex:none}
/* Narrow screens: the table scrolls inside its wrapper (the sticky header then stays with the table). */
@media(max-width:1023px){div.pt-wrap{overflow-x:auto}.pt-table{min-width:820px}.pt-head{top:0}}
/* Compact relation variant of the shared PortalResources renderer. */
.resource-link{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;flex:none;border-radius:999px}
a.resource-link:hover{background:var(--field-nested);text-decoration:none}
a.resource-link:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.resource-link .resource-logo,.resource-link .resource-logo img{display:block;width:18px;height:18px}
.resource-link[data-available=false]{opacity:.35;filter:grayscale(1)}
@media(forced-colors:active){.pt-chip{border:1px solid CanvasText}.pt-head{border-bottom-color:CanvasText}
.pt-tree::before,.pt-tree::after,.pt-group-head.is-open::after{border-color:CanvasText}
.resource-link .resource-logo{background:LinkText;mask:var(--provider-logo) center/contain no-repeat;-webkit-mask:var(--provider-logo) center/contain no-repeat}
.resource-link .resource-logo img{visibility:hidden}
.resource-link[data-available=false]{opacity:1;filter:none}
.resource-link[data-available=false] .resource-logo,.pt-table .resource-link[data-available=false] .resource-logo{background:GrayText}}

/* Icon-only Back beside a Portal detail title (Rakha, Oct 22): "← Sprint 7", "← Project A", "← Release Oct 21, 26".
   One owner for Sprint/Release (index.html #schedule-back) and Project detail; the link carries an accessible name. */
.portal-title-back{display:inline-flex;align-items:center;justify-content:center;flex:none;width:36px;height:36px;margin:-8px 0 -8px -8px;border-radius:999px;color:var(--muted);text-decoration:none}
.portal-title-back[hidden]{display:none}
.portal-title-back:hover{background:var(--field-nested);color:var(--ink);text-decoration:none}
.portal-title-back:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.portal-title-back .ds-icon{width:20px;height:20px}
/* With a Back the title row stays on one line: the title wraps inside itself, Back and the status badge never move below it. */
:is(.schedule-title-row,.projects-detail-title):has(>.portal-title-back:not([hidden])){flex-wrap:nowrap}
:is(.schedule-title-row,.projects-detail-title):has(>.portal-title-back:not([hidden]))>h1{min-width:0;overflow-wrap:anywhere}
:is(.schedule-title-row,.projects-detail-title):has(>.portal-title-back:not([hidden]))>:not(h1){flex:none}
/* The hit target grows to 44px but negative block margins keep the title row (and brand-to-title spacing) unchanged. */
@media(max-width:700px),(pointer:coarse){.portal-title-back{width:44px;height:44px;margin:-12px 0 -12px -12px}}
