/* Shared Page presentation layer. Hosts retain their own routes and permissions. */
:root {
  --canvas: #f8f9fb;
  --paper: #f8f9fb;
  --surface: #fff;
  --surface-soft: #f6f7fa;
  --surface-muted: #f6f7fa;
  --ink: #202b3c;
  --ink-soft: #43516a;
  --muted: #526078;
  --muted-strong: #595866;
  --ink-faint: #596579;
  --line: #e9e9ef;
  --border: #e9e9ef;
  --line-strong: #d7d6e1;
  --border-strong: #d7d6e1;
  --radius: 20px;
  --sidebar-width: 236px;
  --shadow-small: 0 3px 16px #24223403;
  --shadow-sm: 0 3px 16px #24223403;
  --ui-ease: cubic-bezier(.2, .75, .25, 1);
}
html { min-width: 0; scroll-padding-top: calc(var(--site-banner-height, 0px) + 24px); }
body { min-width: 0; font-size: 17px; font-weight: 450; line-height: 1.75; }
body { font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", "Source Han Sans SC", "Noto Sans SC", system-ui, sans-serif; font-synthesis: weight; -webkit-font-smoothing: auto; }
button, input, textarea, select { font-family: inherit; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
[hidden] { display: none !important; }
.workspace-icon { width: 20px; height: 20px; flex: 0 0 20px; vertical-align: middle; }
body > .app-shell { grid-template-columns: 236px minmax(0, 1fr); }
.sidebar { gap: 0; padding: 26px 16px 18px; color: var(--ink); background: #fff; border-right: 1px solid var(--line); box-shadow: none; }
.sidebar > .brand { flex-direction: row; align-items: center; gap: 10px; padding: 6px 10px 20px; margin: 0 0 14px; border: 0; border-radius: 0; background: transparent; }
.sidebar > .brand .page-wordmark { --page-wordmark-width: 106px; }
.sidebar .page-brand-role { max-width: 62px; color: var(--muted); font-size: 15px; font-weight: 500; white-space: normal; }
.sidebar-label, .sidebar .nav-section-label { margin: 18px 12px 10px; color: #756e80; font-size: 15px; font-weight: 600; letter-spacing: .1em; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav .nav-item { position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 11px 14px; color: #6d6577; border: 0; border-radius: 11px; background: transparent; font-size: 17px; font-weight: 600; line-height: 1.4; box-shadow: none; transition: color .16s, background .16s; }
.sidebar nav .nav-item > span:first-child { display: grid; place-items: center; flex: 0 0 20px; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; }
.sidebar nav .nav-item:hover { color: var(--primary); background: #f7f4f8; transform: none; }
.sidebar nav .nav-item.active { color: #603b59; background: #f4edf3; box-shadow: none; font-weight: 700; }
.sidebar .nav-item.active::before { content: ""; display: block; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 4px; background: #845876; }
.sidebar nav .nav-count { min-width: 22px; margin-left: auto; padding: 2px 5px; color: #817189; background: #f3f0f6; border-radius: 6px; font-size: 15px; line-height: 1.5; }
.sidebar nav .nav-count.alert { color: #a3642b; background: #fff1e3; }
.sidebar-bottom, .sidebar-foot { margin-top: auto; padding-top: 22px; }
.sidebar .account-summary, .sidebar .operator-card { gap: 11px; min-height: 62px; padding: 11px 10px; color: var(--ink); background: #faf9fb; border: 1px solid #f0edf3; border-radius: 14px; }
.sidebar .account-summary:hover, .sidebar .operator-card:hover { background: #f4eff6; }
.sidebar .account-summary .profile-copy strong, .sidebar .operator-card strong { color: #494151; font-size: 15px; font-weight: 700; }
.sidebar .account-summary .profile-copy small, .sidebar .operator-card small { color: #766c7e; font-size: 15px; }
.sidebar .avatar { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: #eee5ef; color: #67455f; font-size: 16px; }
.sidebar .safety-card { padding: 14px 12px; border: 1px solid #eeebf1; border-radius: 12px; background: #fbfafc; }
.sidebar .safety-card strong { color: #5b5061; font-size: 15px; }
.sidebar .safety-card p { color: #756a7c; font-size: 15px; }
.sidebar .safety-card a { color: #775e80; font-size: 15px; }
.main-content { max-width: 1540px; padding: 40px clamp(24px, 3.5vw, 60px) 76px; }
.welcome-row { align-items: center; gap: 24px; margin-bottom: 28px; }
.welcome-row .eyebrow, .page-head .eyebrow { margin: 0 0 8px; color: #786781; font-size: 15px; font-weight: 600; letter-spacing: .08em; }
.welcome-row h1, .page-head h1 { font-size: clamp(30px, 2.6vw, 38px); font-weight: 700; line-height: 1.3; letter-spacing: -.035em; }
.welcome-row .page-subtitle, .page-head p { margin-top: 8px; color: var(--muted); font-size: 16px; line-height: 1.75; }
.top-actions, .topbar-actions { gap: 10px; }
.environment-badge, .top-actions .environment-badge { min-height: 28px; padding: 5px 9px; border-radius: 7px; font-size: 15px; font-weight: 600; }
.top-actions .online-toggle { border: 0; background: transparent; padding-inline: 3px; }
.online-toggle b { color: var(--muted); font-size: 15px; font-weight: 600; }
.online-toggle input:checked + span { background: #7b5875; }
.panel, .task-workspace, .work-card, .metric-grid article, .kpi-card, .error-panel { border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-small); }
.panel-heading, .panel-head { padding: 22px 26px; background: transparent; }
.panel-heading h2, .section-heading h2, .panel-head h2 { font-size: 22px; font-weight: 700; letter-spacing: 0; }
.panel-heading p, .panel-head p { font-size: 15px; color: var(--muted); }
.section-block { margin-top: 28px; scroll-margin-top: calc(var(--site-banner-height, 0px) + 24px); }
.primary-button, .secondary-button, .button, .topbar .button, .topbar .support-launch { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 48px; padding: 11px 18px; border-radius: 10px; font-size: 15px; font-weight: 600; line-height: 1.5; transition: background .16s, border-color .16s, box-shadow .16s, transform .16s; }
.primary-button, .button.primary { color: #fff; background: var(--primary); border: 1px solid var(--primary); box-shadow: 0 3px 8px #45254014; }
.secondary-button, .button { background: #fff; border: 1px solid #e2dde7; color: #65546e; }
.primary-button:hover:not(:disabled), .button.primary:hover:not(:disabled) { background: #62415d; border-color: #62415d; box-shadow: 0 4px 10px #45254020; transform: translateY(-1px); }
.secondary-button:hover:not(:disabled), .button:hover:not(:disabled) { background: #f7f4f9; border-color: #cfc2d5; }
.button:active:not(:disabled), .primary-button:active:not(:disabled), .secondary-button:active:not(:disabled) { transform: translateY(0); }
button:disabled { cursor: not-allowed; }
.button.small, .secondary-button.small { min-height: 34px; padding: 7px 11px; font-size: 15px; }
.button.danger, .button.danger:hover { color: var(--red-700, #b3263c); border-color: #e9c6d0; background: #fff8f9; }
.field > span { color: #514a59; font-size: 15px; font-weight: 700; }
.field input, .field select, .field textarea { min-height: 46px; padding: 11px 13px; color: #38313f; background: #fcfbfd; border: 1px solid #e2dee8; border-radius: 10px; box-shadow: none; font-size: 18px; font-weight: 550; line-height: 1.7; transition: background .16s, border-color .16s, box-shadow .16s; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #cfc4d7; }
.field input:focus, .field select:focus, .field textarea:focus { background: #fff; border-color: #997ca5; box-shadow: 0 0 0 3px #9b78a314; outline: 0; }
.field input::placeholder, .field textarea::placeholder { color: #82788a; font-weight: 500; }
.field small { color: #766a80; font-size: 15px; line-height: 1.75; }
.field em { font-style: normal; font-weight: 500; }
input[type=checkbox], input[type=radio] { accent-color: #785970; }
.choice-card { border-radius: 12px; background: #fcfbfd; }
.choice-card:has(input:checked) { border-color: #a78cb2; background: #f8f2fa; box-shadow: 0 0 0 1px #a78cb2; }
.status-pill, .badge, .task-tags > span { padding: 4px 9px; border-radius: 7px; font-size: 15px; font-weight: 600; line-height: 1.5; }
.tabs, .queue-tabs, .market-views, .task-filters { display: flex; flex-wrap: wrap; gap: 4px; width: fit-content; max-width: 100%; padding: 4px; border: 1px solid #eeebf2; border-radius: 11px; background: #f3f1f6; }
.tabs button, .queue-tab, .market-view, .task-filters button { min-height: 34px; padding: 7px 13px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #8c8096; font-size: 15px; font-weight: 600; }
.tabs button.active, .queue-tab.active, .market-view[aria-pressed=true], .task-filters button[aria-pressed=true] { background: #fff; border-color: #e8e0ed; color: #62446d; box-shadow: 0 2px 4px #46305008; font-weight: 700; }
.task-filters button span, .market-view span { padding: 1px 5px; border-radius: 5px; background: #ebe5f1; font-size: 15px; }
.task-filters { margin: 0; }
.ui-task-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.ui-search-field { position: relative; display: flex; align-items: center; gap: 8px; min-width: 200px; max-width: 320px; margin: 0; }
.ui-search-field > svg { position: absolute; left: 12px; width: 17px; height: 17px; color: #9f91a8; pointer-events: none; }
.ui-search-field input { width: 100%; height: 42px; padding: 10px 12px 10px 38px; border: 1px solid #e4dfea; border-radius: 10px; color: #554360; background: #fff; font: inherit; font-size: 15px; }
.ui-search-field input:focus { border-color: #9e81ac; outline: 3px solid #9e81ac18; }
.ui-search-field input::placeholder { color: #697589; }
.ui-search-status { min-height: 0; margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.ui-search-status:empty { display: none; }
.wizard-panel { max-width: 1000px; overflow: visible; }
.wizard-panel .panel-heading { padding: 24px 30px 18px; }
.save-state { padding: 4px 8px; color: #697589; background: #faf7fc; font-size: 15px; font-weight: 500; }
.stepper { gap: 16px; margin: 0; padding: 0 30px 22px; }
.stepper li { flex: 1; gap: 10px; padding: 10px 0; align-items: center; }
.stepper li:not(:last-child)::after { top: 24px; left: 43px; right: -9px; background: #eee8f2; }
.stepper li > span { width: 28px; height: 28px; flex: 0 0 28px; background: #f8f5fb; border: 1px solid #e9e1f0; color: #a498ad; font-size: 15px; font-weight: 600; }
.stepper li > div { padding-right: 12px; background: #fff; }
.stepper li strong { color: #697589; font-size: 15px; font-weight: 600; }
.stepper li small { margin-top: 3px; color: #697589; font-size: 15px; }
.stepper li.active > span { background: #65405b; border-color: #65405b; color: #fff; box-shadow: 0 0 0 4px #f6edf4; }
.stepper li.active strong, .stepper li.complete strong { color: #654e70; }
.form-step { padding: 26px 30px; }
.form-grid { gap: 22px; }
.material-builder { margin-top: 24px; padding: 0; background: #fbf9fd; border: 1px solid #ebe4f0; border-radius: 13px; }
.material-disclosure { display: flex; align-items: center; gap: 12px; padding: 16px 18px; color: #6e577b; list-style: none; cursor: pointer; }
.material-disclosure::-webkit-details-marker { display: none; }
.material-disclosure > span { display: grid; gap: 3px; }
.material-disclosure strong { font-size: 15px; font-weight: 600; }
.material-disclosure small { color: #7b6888; font-size: 15px; }
.material-disclosure::after { content: "+"; margin-left: auto; font-size: 20px; font-weight: 300; }
.material-builder[open] > .material-disclosure::after { content: "−"; }
.material-builder[open] > .material-disclosure { border-bottom: 1px solid #ebe4f0; }
.material-builder > :not(summary) { margin: 16px 18px; }
.material-builder .material-heading { display: none; }
.material-builder .material-add { margin: 0 18px 12px; }
.wizard-actions { display: flex; align-items: center; justify-content: space-between; position: sticky; z-index: 3; bottom: 0; gap: 12px; padding: 16px 30px; background: #ffffffed; backdrop-filter: blur(14px); border-top: 1px solid #ece6f1; border-radius: 0 0 20px 20px; box-shadow: 0 -6px 20px #42314d03; }
.wizard-actions > span { flex: 1; }
.wizard-actions .primary-button { min-width: 180px; flex: 0 0 auto; }
.explain-box { margin-top: 18px; color: #72657d; border: 1px solid #e9e2ef; border-radius: 12px; background: #f8f5fb; }
.explain-box > span[aria-hidden] { color: #90719e; }
.explain-box p { color: #72657d; }
.task-workspace { grid-template-columns: minmax(260px, .65fr) minmax(0, 1.35fr); overflow: hidden; }
.task-list { padding: 12px; background: #fcfbfe; }
.task-card { padding: 18px 16px; margin-bottom: 10px; border: 1px solid transparent; border-radius: 12px; background: transparent; transition: background .16s, border-color .16s; }
.task-card:hover { background: #f4eef8; transform: none; }
.task-card.selected, .task-card[aria-current=true] { background: #fff; border-color: #d7c7e2; box-shadow: 0 3px 14px #69447c07; }
.task-card h3 { font-size: 16px; font-weight: 700; line-height: 1.6; }
.task-card-top { gap: 10px; flex-wrap: wrap; }
.task-card-meta { flex-wrap: wrap; gap: 8px; }
.task-card-meta > span { font-size: 15px; }
.task-card-meta strong { font-size: 15px; }
.progress-track { height: 3px; margin-block: 15px; background: #f0eaf5; }
.task-detail { padding: 26px 28px; }
.task-detail h2 { font-size: 23px; font-weight: 700; }
.detail-action, .detail-actions { gap: 9px; }
.task-detail .detail-block { border-color: #eeebf4; }
.market-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 18px 22px 22px; background: #faf9fc; border-radius: 0 0 20px 20px; }
.market-list .market-card { display: flex; flex-direction: column; gap: 15px; padding: 22px; border: 1px solid #eae4f0; border-radius: 16px; background: #fff; box-shadow: 0 3px 12px #45335302; transition: border-color .18s, box-shadow .18s; }
.market-list .market-card:hover { background: #fff; border-color: #cbb7d9; box-shadow: 0 6px 20px #54386408; }
.market-card .eyebrow { display: inline-block; margin: 0; padding: 3px 8px; color: #826390; background: #f7f1fb; border-radius: 5px; font-size: 15px; font-weight: 600; }
.market-card h3 { margin-top: 9px; font-size: 17px; font-weight: 700; line-height: 1.55; }
.market-top { gap: 20px; align-items: flex-start; }
.market-card .budget { flex: 0 0 auto; }
.market-card .budget strong { color: #614d6d; font-size: 23px; font-weight: 700; letter-spacing: -.5px; }
.market-card .budget small { font-size: 15px; color: #7e6b8b; }
.market-contract { display: flex; flex-direction: column; gap: 12px; }
.market-summary { max-width: none; font-size: 15px; color: #71637e; line-height: 1.9; }
.market-footer { display: flex; gap: 14px; margin-top: auto; padding-top: 16px; border-top: 1px solid #f0eaf4; }
.customer-mini { min-width: 0; }
.customer-mini i { display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; color: #8a679c; background: #f6eef9; font-style: normal; }
.customer-mini > span { font-size: 15px; color: #756080; }
.market-footer .task-reference { font-size: 15px; color: #7d7087; }
.market-footer .card-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.market-footer .card-actions button { min-height: 36px; padding: 8px 11px; font-size: 15px; }
.market-footer [data-person-task] { padding-inline: 4px; border-color: transparent; background: transparent; color: #785b89; }
.market-toolbar { gap: 14px; padding: 14px 22px; }
.market-toolbar > p { width: 100%; font-size: 15px; }
.market-toolbar .ui-search-field { flex: 1; margin-left: auto; }
.market-toolbar .ui-search-status { width: 100%; margin: 0; }
.auto-claim-control { align-items: center; gap: 10px; }
.auto-claim-control > span { font-size: 15px; color: #776482; }
.auto-claim-control > button { font-size: 15px; min-height: 36px; }
.metric-grid { gap: 16px; }
.metric-grid article { min-height: 124px; padding: 22px; border-color: #eee7f3; }
.metric-grid .metric-icon { width: 36px; height: 36px; flex: 0 0 36px; color: #896b99 !important; background: #f7f1fb !important; border-radius: 10px; }
.metric-grid strong { margin-top: 8px; color: #675071; font-size: 28px; font-weight: 700; }
.metric-grid small { font-size: 15px; color: #756080; }
.metric-grid p { font-size: 15px; color: #7e6c8b; }
.work-board { gap: 18px; }
.money-layout.ui-single-column { grid-template-columns: minmax(0, 1fr); }
.work-card { padding: 24px; gap: 16px; border-color: #eae4f0; }
.work-card h3 { font-size: 17px; line-height: 1.6; font-weight: 700; }
.work-card .state-line { width: 3px; border-radius: 5px; }
.work-contract { background: #fcfafe; border-color: #eee7f4; }
.work-contract summary { color: #795c8b; font-size: 15px; }
.work-footer { padding-top: 16px; border-top: 1px solid #eee7f4; }
.table-row { padding: 18px 24px; border-color: #eee7f4; }
.finance-entry { padding: 24px 28px; border-color: #eee7f4; }
.finance-entry h3 { font-size: 16px; font-weight: 700; }
.finance-entry .finance-amount { font-size: 21px; color: #785489; }
.help-content details { margin-bottom: 8px; padding: 17px; border: 1px solid #eee7f4; border-radius: 12px; background: #fcfafe; }
.help-content summary { font-size: 16px; color: #735c83; }
.empty-state, .workspace-empty, .empty { padding: 42px 24px; color: #7a6787; font-size: 16px; line-height: 1.9; text-align: center; }
.market-list > .empty { grid-column: 1 / -1; border: 1px dashed #dac9e7; border-radius: 14px; }
.modal, .task-session-dialog, .task-auth-dialog, .drawer, .account-dialog { border: 1px solid #ede6f3; border-radius: 22px; box-shadow: 0 24px 80px #3f234c26; }
.modal::backdrop, .task-session-dialog::backdrop, .task-auth-dialog::backdrop { background: #271a3560; backdrop-filter: blur(6px); }
.modal-heading h2, .dialog-body > h2 { font-size: 21px; font-weight: 700; }
.modal .close-button, .task-session-dialog header button { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; color: #9c85ae; background: #f7f1fb; }
.modal-actions { gap: 10px; }
.modal :is(form, .dialog-body) > .modal-actions { position: sticky; bottom: -28px; z-index: 2; margin-inline: -28px; margin-bottom: -28px; padding: 16px 28px; border-top: 1px solid #eee5f5; background: #fffffff5; backdrop-filter: blur(12px); }
.task-auth-card { padding: 32px; }
.task-auth-heading h1, .auth-card h1 { font-size: 26px; font-weight: 700; }
.task-auth-dialog input, .auth-card input { background: #fdfbff; border-color: #e7dfef; border-radius: 11px; }
.task-auth-tabs { padding: 4px; border: 1px solid #eee5f5; border-radius: 12px; background: #f7f2fa; gap: 4px; }
.task-auth-tabs button { padding: 8px 10px; border-radius: 8px; font-size: 16px; }
.task-auth-tabs button[aria-selected=true] { background: #fff; box-shadow: 0 2px 5px #633c760c; color: #765383; }
.toast { border: 1px solid #ffffff20; border-radius: 12px; box-shadow: 0 8px 30px #37214220; }
.support-panel, .support-dialog { border-radius: 20px; }
.account-hub { padding: 8px; border: 1px solid #eae1f1; box-shadow: 0 12px 42px #4f306b14; border-radius: 16px; }
.account-hub-items > button, .account-hub-items > details > summary { padding: 12px 14px; font-size: 15px; border-radius: 9px; }
.account-hub-items > button:hover { background: #f8f0fc; }
.account-hub-mobile { display: none; position: static; z-index: auto; min-height: 36px; margin-left: auto; padding: 8px 12px; border: 1px solid #e2dde7; border-radius: 10px; background: #fff; color: #65546e; box-shadow: none; font: inherit; font-size: 15px; cursor: pointer; }
.workspace-search-launch, .workspace-search-mobile { display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 9px 11px; border: 1px solid #ede5f3; border-radius: 10px; color: #7d658d; background: #fcfafe; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.workspace-search-launch { width: 100%; margin: 0 0 20px; }
.workspace-search-launch .workspace-icon { width: 16px; height: 16px; flex-basis: 16px; }
.workspace-search-launch kbd { margin-left: auto; padding: 2px 4px; border: 1px solid #eee7f4; border-radius: 4px; background: #fff; color: #836f90; font: inherit; font-size: 15px; white-space: nowrap; }
.workspace-search-launch:hover, .workspace-search-mobile:hover { color: #79558d; border-color: #d4bce4; }
.workspace-search-mobile { display: none; }
.workspace-nav-close { display: none; }
.workspace-command { position: fixed; inset: 14vh 0 auto; width: min(560px, calc(100vw - 32px)); max-height: min(620px, 78dvh); margin: 0 auto; padding: 0; color: #6c537c; background: #fff; border: 1px solid #e6d7f0; border-radius: 20px; box-shadow: 0 24px 100px #44245733; overflow: auto; font-family: inherit; }
.workspace-command::backdrop { background: #30203950; backdrop-filter: blur(5px); }
.workspace-command-search { display: flex; align-items: center; gap: 13px; padding: 20px 22px; border-bottom: 1px solid #f0e8f6; }
.workspace-command-search > svg { color: #aa8fbd; }
.workspace-command input { min-width: 0; flex: 1; width: 100%; height: 30px; padding: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 17px; color: #684b7a; }
.workspace-command input::placeholder { color: #877395; }
.workspace-command-search > button { display: grid; place-items: center; flex: 0 0 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: #f9f3fd; color: #ac94bd; cursor: pointer; }
.workspace-command-caption { display: flex; justify-content: space-between; padding: 16px 24px 8px; color: #836b91; font-size: 15px; }
.workspace-command-results { padding: 0 10px 12px; }
.workspace-command-item { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 12px 15px; border: 0; border-radius: 11px; background: #fff; color: #745586; font: inherit; font-size: 16px; text-align: left; cursor: pointer; }
.workspace-command-item svg { color: #b69bc8; }
.workspace-command-item svg:last-child { margin-left: auto; width: 15px; }
.workspace-command-item:hover, .workspace-command-item:focus-visible { outline: none; background: #f7effc; color: #724d89; }
.workspace-command-empty { padding: 28px 16px; color: #7d628e; font-size: 16px; text-align: center; }
.workspace-command footer { display: flex; justify-content: space-between; gap: 10px; padding: 12px 22px; border-top: 1px solid #f0e8f6; color: #826591; font-size: 15px; }
.workspace-command kbd { display: inline-block; padding: 1px 4px; border: 1px solid #ecdef5; border-radius: 4px; background: #fdfaff; font: inherit; }
body:has(.workspace-command[open]) { overflow: hidden; }
/* Operations: denser, review-oriented presentation uses the same foundations. */
[data-portal=operator] .workspace { margin-left: var(--sidebar-width); }
[data-portal=operator] .topbar { min-height: 64px; padding: 20px 36px 0; }
[data-portal=operator] .main { padding: 22px 36px 72px; }
.page-head { margin-bottom: 28px; }
.kpi-grid { gap: 16px; }
.kpi-card { container-type: inline-size; min-height: 132px; padding: 22px; background: #fff; border-color: #eae4f0; }
.kpi-card .kpi-value { font-size: clamp(20px, 15cqi, 30px); }
.kpi-card::before { height: 3px; opacity: .5; }
.kpi-label { color: #796386; font-size: 15px; font-weight: 600; }
.kpi-value { color: #624270; font-size: clamp(24px, 2.2vw, 32px); font-weight: 700; line-height: 1.4; letter-spacing: -.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi-note { margin-top: 7px; font-size: 15px; }
.dashboard-grid { gap: 20px; }
.dashboard-grid > .panel { overflow: hidden; }
.priority-item { padding: 20px 22px; border-color: #f0e8f6; }
.priority-item:hover { background: #fdfafe; }
.priority-item .item-main strong { font-size: 15px; font-weight: 600; }
.priority-item .item-main small { margin-top: 5px; color: #7f638f; font-size: 15px; }
.priority-item .metric > span { font-size: 15px; color: #826a90; }
.priority-item .metric > strong { font-size: 15px; color: #8e6da0; }
.panel-head { border-color: #eee7f4; }
.filter-bar { gap: 16px; padding: 18px 22px; border-color: #eee7f4; }
.search-box { border: 1px solid #e5d9ee; border-radius: 10px; background: #fcfafe; }
.search-box input { font-size: 15px; }
.data-table th { padding: 14px 20px; background: #faf6fd; color: #795887; font-size: 15px; font-weight: 600; border-color: #eee7f4; }
.data-table td { padding: 20px; border-color: #f0e8f6; font-size: 15px; }
.data-table tbody tr:hover { background: #fdfaff; }
.table-scroll-hint { display: none; }
.data-table-wrap { scrollbar-width: thin; scrollbar-color: #cdbbd8 transparent; }
.data-table .task-title { font-weight: 600; font-size: 16px; }
.data-table .subline, .data-table small { margin-top: 5px; color: #826491; font-size: 15px; }
.case-item { margin: 8px; padding: 17px; border: 1px solid transparent; border-radius: 12px; }
.case-item.active { border-color: #e0c9ef; background: #fcf7ff; }
.case-detail { padding: 24px; }
.summary-strip { border-radius: 15px; border-color: #eee4f5; }
.decision-bar { border-color: #eee4f5; background: #ffffffef; backdrop-filter: blur(12px); }
@media (min-width: 1360px) {
  [data-portal=worker] .market-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-portal=worker] .market-footer { align-items: flex-start; flex-direction: column; }
  [data-portal=worker] .market-footer .card-actions { width: 100%; }
  [data-portal=worker] .market-footer .card-actions .primary-button { margin-left: auto; }
}
@media (min-width: 821px) { .task-list { max-height: 900px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #ddcfe6 transparent; } }
@media (max-width: 1180px) {
  .main-content { padding-inline: 28px; }
  .welcome-row { align-items: flex-start; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-top { gap: 14px; }
}
@media (max-width: 880px) {
  .table-scroll-hint { display: block; margin: 0; padding: 10px 20px; color: #7e6a8c; background: #fcf9fe; border-top: 1px solid #eee7f4; font-size: 15px; }
  .workspace-nav-close { display: grid; place-items: center; position: absolute; right: 9px; top: 10px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; background: #f7f3f9; color: #796386; font-size: 20px; cursor: pointer; }
  [data-portal=operator] .account-hub-mobile { display: block; }
  [data-portal=operator] .account-hub { inset: calc(var(--site-banner-height, 0px) + 76px) 16px auto auto; max-height: calc(100dvh - 110px); }
  [data-portal=operator] .workspace { margin-left: 0; }
  [data-portal=operator] .sidebar { z-index: 40; }
  [data-portal=operator] .topbar { padding: 10px 16px; min-height: 62px; background: #fffffff0; border-bottom: 1px solid #eee6f5; backdrop-filter: blur(14px); }
  [data-portal=operator] .main { padding: 26px 20px 68px; }
  [data-portal=operator] .workspace-search-mobile { display: grid; place-items: center; padding: 8px; min-height: 36px; }
}
@media (max-width: 820px) {
  .account-hub-mobile { display: block; }
  .account-hub { inset: calc(var(--site-banner-height, 0px) + 160px) 16px auto auto; max-height: calc(100dvh - 190px); }
  body > .app-shell { display: block; }
  [data-portal]:not([data-portal=operator]) .sidebar { position: fixed; inset: auto 12px calc(10px + env(safe-area-inset-bottom)); z-index: 30; width: auto; height: 66px; padding: 7px 6px; border: 1px solid #e8dfef; border-radius: 20px; background: #ffffffed; box-shadow: 0 6px 28px #69407c13; backdrop-filter: blur(18px); }
  [data-portal]:not([data-portal=operator]) .sidebar .workspace-search-launch { display: none; }
  [data-portal]:not([data-portal=operator]) .sidebar nav .nav-item { display: grid; place-content: center; justify-items: center; gap: 4px; min-height: 50px; padding: 3px; font-size: 15px; border-radius: 12px; }
  [data-portal]:not([data-portal=operator]) .sidebar nav .nav-item.active { background: #f5edf9; }
  [data-portal]:not([data-portal=operator]) .sidebar nav .nav-item.active::before { display: none; }
  .main-content { padding: 22px 20px 108px; }
  .welcome-row { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 16px; margin-bottom: 23px; }
  .welcome-row > div:first-child { width: 100%; }
  .welcome-row h1 { font-size: 28px; }
  .welcome-row .page-subtitle { font-size: 15px; }
  .mobile-brand { margin-bottom: 18px; }
  .top-actions { justify-content: flex-start; max-width: none; width: 100%; }
  [data-portal=worker] .top-actions { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
  [data-portal=worker] .workspace-search-mobile { grid-column: 1; grid-row: 1; }
  [data-portal=worker] .top-actions .environment-badge { grid-column: 2; grid-row: 1; justify-self: start; }
  [data-portal=worker] .top-actions .account-hub-mobile { grid-column: 3; grid-row: 1; }
  [data-portal=worker] .top-actions .online-toggle { grid-column: 1 / 3; grid-row: 2; justify-self: start; }
  [data-portal=worker] #refresh-portal { grid-column: 3; grid-row: 2; }
  .top-actions .workspace-search-mobile { display: grid; place-items: center; min-height: 36px; padding: 8px; }
  .top-actions .secondary-button { min-height: 36px; padding: 8px 12px; font-size: 15px; }
  .task-workspace { grid-template-columns: 1fr; }
  .task-list { max-height: 360px; overflow-y: auto; border-right: 0; border-bottom: 1px solid #eae1f2; }
  .task-detail { padding: 24px 20px; scroll-margin-top: 20px; }
  .task-list .task-card { padding: 15px; }
  .wizard-actions { bottom: calc(86px + env(safe-area-inset-bottom)); padding: 12px 20px; border-radius: 14px; border: 1px solid #e9ddf2; box-shadow: 0 4px 20px #5533650d; }
  .wizard-actions .primary-button { min-width: 0; }
  .wizard-actions:has(#previous-step[hidden]) > span { display: none; }
  .wizard-actions:has(#previous-step[hidden]) .primary-button { flex: 1; }
  .ui-task-toolbar { align-items: stretch; gap: 12px; }
  .ui-task-toolbar .ui-search-field { order: -1; width: 100%; max-width: none; }
}
@media (max-width: 600px) {
  .main-content { padding-inline: 16px; }
  .panel, .task-workspace, .work-card { border-radius: 16px; }
  .panel-heading, .panel-head, .wizard-panel .panel-heading { padding: 20px; align-items: flex-start; gap: 12px; }
  .panel-heading h2, .section-heading h2 { font-size: 17px; }
  .stepper { gap: 6px; padding: 0 14px 16px; }
  .stepper li { display: grid; justify-items: center; align-content: start; gap: 6px; padding: 4px 0; }
  .stepper li > div { padding: 0; background: transparent; }
  .stepper li:not(:last-child)::after { top: 18px; left: 62%; right: -40%; }
  .stepper li strong { font-size: 15px; }
  .form-step { padding: 24px 20px; }
  .form-grid { gap: 20px; }
  .field input, .field select, .field textarea, .ui-search-field input { font-size: 17px; }
  .market-list { padding: 12px; gap: 12px; }
  .market-list .market-card { padding: 17px; gap: 14px; }
  .market-card h3 { font-size: 16px; }
  .market-top { flex-direction: column; gap: 12px; }
  .market-card .budget { display: flex; gap: 8px; align-items: baseline; text-align: left; }
  .market-card .budget strong { font-size: 22px; }
  .market-footer { align-items: stretch; flex-direction: column; }
  .market-footer .card-actions { width: 100%; }
  .market-footer .card-actions button { flex: 1; min-height: 40px; padding-inline: 8px; }
  .market-toolbar { padding: 12px 16px; }
  .market-toolbar .ui-search-field { flex: 1 1 100%; max-width: none; margin-left: 0; }
  .auto-claim-control { margin: 0; gap: 5px; align-items: flex-end; flex-direction: column; }
  .auto-claim-control > button { white-space: normal; padding: 7px 9px; font-size: 15px; }
  .metric-grid { gap: 12px; }
  .metric-grid article { min-height: 115px; padding: 16px; }
  .metric-grid .metric-icon { display: none; }
  .metric-grid strong { font-size: 24px; }
  .work-card { padding: 18px; }
  .workspace-command { top: 10vh; max-height: 76dvh; border-radius: 16px; }
  .workspace-command-search { padding: 16px; gap: 10px; }
  .workspace-command footer { padding: 12px 16px; }
  .modal :is(form, .dialog-body) > .modal-actions { bottom: -20px; margin-inline: -20px; margin-bottom: -20px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); }
  [data-portal=operator] .main { padding: 24px 14px 68px; }
  .kpi-card { padding: 18px; }
  .kpi-value { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Startup and read-state boundaries: no half-initialized, clickable workspaces. */
[data-workspace-shell][data-boot-pending] { display: none !important; }
.workspace-boot { min-height: 80dvh; display: grid; place-items: center; padding: 32px 20px; }
.workspace-boot-card { width: min(100%, 440px); padding: 36px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow-small); text-align: center; }
.workspace-boot h1 { margin: 24px 0 12px; font-size: 24px; line-height: 1.4; }
.workspace-boot p { margin: 0 0 24px; color: #6d6573; font-size: 17px; line-height: 1.8; }
.workspace-boot.is-error .workspace-boot-card { border-color: #dfc4ce; }
.workspace-boot a, .workspace-state a { text-decoration: none; }
.workspace-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 40px 24px; min-width: 0; text-align: center; grid-column: 1 / -1; }
.state-symbol { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 4px; border-radius: 14px; color: #76536f; background: #f4eef5; font-size: 24px; }
.workspace-state h3 { margin: 0; color: var(--ink); font-size: 17px; font-weight: 700; }
.workspace-state p { max-width: 420px; margin: 0 0 8px; color: #6d6573; font-size: 17px; line-height: 1.8; }
.workspace-state .primary-button, .workspace-state .secondary-button { width: auto; min-height: 42px; }
.task-workspace.is-empty { grid-template-columns: minmax(0, 1fr); min-height: 0; }
.task-workspace.is-empty .task-list { min-height: 0; max-height: none; padding: 0; border: 0; overflow: visible; background: #fff; }
.ui-task-toolbar { justify-content: flex-start; }
.ui-task-toolbar .task-filters { margin-right: auto; }
.ui-task-toolbar .ui-search-field { flex: 0 1 240px; }
.ui-task-toolbar #refresh-tasks { flex: 0 0 auto; }
.task-detail { min-height: 0; }

/* Readable labels and actions, retaining semantic status colors. */
.primary-button, .secondary-button, .button, .topbar .button { font-size: 17px; }
.field > span, .panel-heading p, .panel-head p, .welcome-row .page-subtitle, .page-head p { font-size: 17px; }
.field small, .ui-search-status, .work-version, .metric-grid small, .metric-grid p, .kpi-label, .kpi-note { font-size: 15px; }
.task-card h3 { font-size: 20px; }
.task-card-meta > span, .task-card-meta strong, .task-tags > span, .status-pill, .badge { font-size: 15px; }
.tabs button, .queue-tab, .market-view, .task-filters button { color: #6c6175; font-size: 16px; }
.ui-search-field input, .search-box input { font-size: 17px; }
.search-box { display: block; }
.search-box::before { top: 50%; transform: translateY(-50%); line-height: 1; pointer-events: none; }
.data-table td, .case-item p { font-size: 16px; }
.data-table th, .data-table .subline, .data-table small, .case-meta { font-size: 15px; }
.case-item-top strong { font-size: 17px; }
.case-detail :is(p, li), .work-disclosure :is(p, li) { font-size: 17px; line-height: 1.8; }

/* Task cards show the next action; full evidence and ratings remain expandable. */
.work-card .work-meta { margin: 14px 0; gap: 10px; }
.work-card .work-meta span { font-size: 15px; }
.work-card .work-meta strong { font-size: 17px; overflow-wrap: anywhere; }
.work-card .work-head small { font-size: 15px; }
.work-card .work-actions { margin-top: 12px; justify-content: flex-start; }
.work-disclosure { margin-top: 16px; border-top: 1px solid var(--line); }
.work-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 12px 0 0; color: #63415f; font-size: 16px; font-weight: 600; list-style: none; cursor: pointer; }
.work-disclosure > summary::-webkit-details-marker { display: none; }
.work-disclosure > summary::after { content: "+"; font-size: 20px; }
.work-disclosure[open] > summary::after { content: "−"; }
.work-disclosure-body { padding-top: 16px; }
.work-version { color: var(--muted); }

/* An unmatched search is one state, never two empty columns. */
.split-view.is-empty { min-height: 0; grid-template-columns: minmax(0, 1fr); }
.split-view.is-empty .case-list { min-height: 0; max-height: none; overflow: visible; border: 0; }
.split-view.is-empty .case-list-head { border-bottom: 1px solid var(--line); }
.split-view.is-empty .search-box { width: min(100%, 480px); }
@media (max-width: 880px) {
  .split-view { min-height: 0; }
  .split-view .case-list { max-height: none; overflow: visible; }
}
@media (max-width: 820px) {
  .ui-task-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .ui-task-toolbar .task-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-column: 1 / -1; width: 100%; margin: 0; }
  .ui-task-toolbar .task-filters button { display: flex; justify-content: center; align-items: center; gap: 3px; width: auto; min-width: 0; min-height: 40px; padding: 6px 2px; font-size: 15px; white-space: nowrap; }
  .ui-task-toolbar .task-filters button span { margin: 0; padding: 1px 3px; }
  .ui-task-toolbar .ui-search-field { order: 0; min-width: 0; width: 100%; max-width: none; }
  .ui-task-toolbar #refresh-tasks { min-height: 44px; padding-inline: 12px; }
  .workspace-state { padding: 30px 18px; }
  .work-card .work-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-card .work-meta > div:last-child { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .work-card .work-meta > div:last-child strong { text-align: right; }
  .work-card .work-actions > .primary-button { width: 100%; }
  .work-card .work-progress { margin-top: 12px; }
  .welcome-row .page-subtitle { font-size: 17px; }
}
@media (max-width: 600px) {
  .ui-task-toolbar .ui-search-field input, .search-box input { font-size: 17px; }
  .workspace-boot-card { padding: 28px 22px; }
}
@media (max-width: 480px) {
  .ui-task-toolbar .task-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Reading hierarchy: preserve semantic colors and reserve small type for metadata. */
.sidebar-label, .sidebar .nav-section-label, .sidebar .safety-card p,
.sidebar .account-summary .profile-copy small, .sidebar .operator-card small,
.market-toolbar > p { color: var(--muted); line-height: 1.75; }
.workspace-search-launch { font-weight: 600; }
.market-summary, .case-item p { font-size: 17px; line-height: 1.8; }
.panel-heading, .panel-head, .market-toolbar { flex-wrap: wrap; }
.sidebar .page-brand-role { max-width: 76px; }
@media (max-width: 820px) {
  [data-portal]:not([data-portal=operator]) .sidebar { height: 82px; }
  [data-portal]:not([data-portal=operator]) .sidebar nav .nav-item { min-height: 64px; grid-template-rows: 20px auto; align-content: start; padding: 6px 3px; }
}
@media (max-width: 600px) {
  .panel-heading h2, .section-heading h2 { font-size: 19px; }
  .market-card h3 { font-size: 18px; }
}

/* Business content must not inherit legacy 11–13px component declarations. */
body[data-portal] :is(.frozen-grid p, .frozen-criteria li, .frozen-criteria span,
  .criteria-detail p, .criteria-detail strong, .criteria-preview, .task-description,
  .scope-copy p, .statement-text, .dispute-statement, .dispute-party ol,
  .dispute-party dl, .dispute-detail, .delivery-card > p, .delivery-card pre,
  .delivery-review pre, .delivery-evidence, .resource-list, .review-card,
  .settlement-note, .task-next-action p, .accept-summary p,
  .market-card p, .market-card li, .work-card p, .work-card li,
  .finance-entry p, .finance-entry details, .help-content details p,
  .dialog-body > p, .confirmation, .confirmation-field,
  .support-message p, .support-ticket p) {
  font-size: 18px; font-weight: 500; line-height: 1.8;
}
body[data-portal] :is(.frozen-grid > div > span, .frozen-criteria small,
  .criteria-detail small, .criteria-empty, .detail-top p, .detail-title p,
  .budget-number > span, .update-row p, .update-row time, .timeline li,
  .delivery-heading small, .score-copy small, .settlement-split span,
  .reference-materials li small, .reference-materials > p, .material-detected,
  .material-provider, .owned-materials small, .owned-materials li > span,
  .work-progress span, .work-actions p, .accept-summary span, .filter-strip > span,
  .money-flow small, .money-flow span, .table-row small, .profile-check small,
  .profile-check > span, .task-next-action > span, .finance-state,
  .budget-heading > span, .money-unit, .fact-card span, .fact-card small,
  .scope-copy > strong, .settlement-preview span, .delivery-review > small,
  .evidence p, .money-node span, .task-session-intro,
  .task-session-row small, .task-session-row > div > span, .task-auth-note) {
  font-size: 16px; font-weight: 550; line-height: 1.75;
}
body[data-portal] :is(.detail-block h3, .detail-section h3, .detail-section h4, .frozen-criteria h4,
  .detail-block h4, .market-card h3, .work-card h3, .finance-entry h3,
  .workspace-state h3) { font-size: 21px; font-weight: 700; line-height: 1.5; }
body[data-portal] :is(.frozen-grid > div > span, .budget-heading label,
  .reference-materials li strong, .update-row strong, .delivery-heading strong,
  .score-copy strong, .owned-materials strong, .work-criteria > strong,
  .delivery-criteria > strong, .table-row strong, .profile-check strong,
  .fact-card strong, .evidence strong, .delivery-review > strong,
  .settlement-preview strong, .money-node strong, .task-session-row strong,
  .finance-entry summary, .help-content summary, .task-next-action strong) {
  font-size: 18px; font-weight: 650; line-height: 1.7;
}
body[data-portal] :is(.notice, .modal-note, .explain-box p,
  .receipt-line, .summary-list dt, .summary-list dd, .formula-card small,
  .registration-consent, .task-auth-consent, .choice-card small) {
  font-size: 16px; line-height: 1.8;
}
body[data-portal] :is(.task-session-dialog, .task-auth-dialog, .auth-card,
  .support-dialog, .support-panel, .site-banner-settings) :is(label, input, textarea, select, button) {
  font-size: 17px; line-height: 1.7;
}
body[data-portal] :is(.task-session-dialog, .task-auth-dialog, .auth-card,
  .support-dialog, .support-panel, .site-banner-settings) small {
  font-size: 15px; line-height: 1.8;
}
body[data-portal] .help-content .brand-story .brand-story-intro { font-size: 16px; }
body[data-portal] .drawer[aria-label="专业验收详情"] .drawer-body { font-size: 18px; line-height: 1.8; }
body[data-portal] .field > span { color: var(--ink); font-size: 17px; font-weight: 650; }
body[data-portal] .field { font-size: 17px; font-weight: 650; line-height: 1.7; }
body[data-portal] .field :is(input, select, textarea) { font-size: 18px; line-height: 1.7; }
body[data-portal] .money-field .money-input input { font-size: 32px; }
body[data-portal] .code { font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
body[data-portal] .warning-copy { font-size: 16px; font-weight: 600; line-height: 1.8; }
body[data-portal] .field small { font-size: 15px; line-height: 1.8; }
body[data-portal] .data-table td { font-size: 17px; line-height: 1.75; }
body[data-portal] .data-table :is(th, small, .subline) { font-size: 15px; line-height: 1.75; }
body[data-portal] .data-table .task-title { font-size: 18px; font-weight: 650; }
.task-card-meta { align-items: flex-start; gap: 12px; }
.task-card-meta > span { display: grid; gap: 4px; color: var(--muted); overflow-wrap: anywhere; }
.task-card-meta strong { font-size: 18px; color: var(--ink); }
.task-card { padding: 22px 18px; }
.task-detail { padding: 30px; }
.task-detail .detail-block { padding-top: 26px; margin-top: 26px; }
.frozen-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.frozen-grid > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: start; gap: 16px; }
.frozen-grid > div, .review-card, .delivery-card, .scope-copy { padding: 20px; }
.frozen-grid p { margin: 0; overflow-wrap: anywhere; }
.scope-copy p { margin-top: 10px; }
.frozen-criteria { padding-left: 24px; }
.frozen-criteria li { padding: 10px 0; margin-bottom: 8px; }
.frozen-criteria li > :is(span, small) { display: block; margin-top: 6px; }
.update-row { padding-block: 16px; }
.update-row time, .task-reference, .detail-top p { overflow-wrap: anywhere; }
.detail-top, .detail-action, .detail-actions { flex-wrap: wrap; gap: 16px; }
.ui-search-field { min-width: 0; }
.ui-search-field input { height: auto; min-height: 48px; }
.timeline li { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 1100px) {
  .frozen-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  [data-portal]:not([data-portal=operator]) .sidebar { inset-inline: 8px; height: 92px; }
  [data-portal]:not([data-portal=operator]) .sidebar nav { gap: 0; }
  [data-portal]:not([data-portal=operator]) .sidebar nav .nav-item { min-height: 74px; padding-inline: 2px; font-size: 15px; line-height: 1.45; }
  .main-content { padding-bottom: calc(136px + env(safe-area-inset-bottom)); }
  .wizard-actions { bottom: calc(112px + env(safe-area-inset-bottom)); }
  .task-detail { padding: 24px 20px; }
  .timeline { row-gap: 18px; }
}
@media (max-width: 600px) {
  .panel-heading, .panel-head { padding: 22px 20px; }
  .panel-heading h2, .section-heading h2 { font-size: 22px; }
  .task-card h3 { font-size: 20px; }
  .frozen-grid > div, .review-card, .delivery-card, .scope-copy { padding: 18px; }
  .frozen-grid > div { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .stepper { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 20px 20px; }
  .stepper li { display: flex; align-items: center; gap: 8px; }
  .stepper li:not(:last-child)::after { display: none; }
  .detail-actions > button { flex: 1 1 180px; }
}
@media (max-width: 380px) {
  .ui-task-toolbar { grid-template-columns: minmax(0, 1fr); }
  .ui-task-toolbar #refresh-tasks { width: 100%; }
}
/* Material Design 3 system roles; role-host.css supplies each workspace's tonal primary. */
:root {
  --md-sys-color-primary: #694563;
  --md-sys-color-on-primary: #fff;
  --md-sys-color-primary-container: #f2daec;
  --md-sys-color-on-primary-container: #2b1227;
  --md-sys-color-secondary: #6d5868;
  --md-sys-color-secondary-container: #f6dcea;
  --md-sys-color-on-secondary-container: #261622;
  --md-sys-color-tertiary: #855263;
  --md-sys-color-tertiary-container: #ffd9e3;
  --md-sys-color-on-tertiary-container: #34111f;
  --md-sys-color-error: #b3261e;
  --md-sys-color-error-container: #f9dedc;
  --md-sys-color-on-error-container: #410e0b;
  --md-sys-color-surface: #fef7ff;
  --md-sys-color-on-surface: #1d1b20;
  --md-sys-color-on-surface-variant: #49454f;
  --md-sys-color-surface-container-lowest: #fff;
  --md-sys-color-surface-container-low: #f7f2fa;
  --md-sys-color-surface-container: #f3edf7;
  --md-sys-color-surface-container-high: #ece6f0;
  --md-sys-color-surface-container-highest: #e6e0e9;
  --md-sys-color-outline: #79747e;
  --md-sys-color-outline-variant: #cac4d0;
  --md-surface: var(--md-sys-color-surface);
  --md-surface-low: var(--md-sys-color-surface-container-low);
  --md-surface-container: var(--md-sys-color-surface-container);
  --md-surface-high: var(--md-sys-color-surface-container-high);
  --md-outline: var(--md-sys-color-outline);
  --md-on-surface: var(--md-sys-color-on-surface);
  --md-on-surface-variant: var(--md-sys-color-on-surface-variant);
  --canvas: var(--md-sys-color-surface);
  --paper: var(--md-sys-color-surface);
  --surface: var(--md-surface);
  --surface-soft: var(--md-surface-low);
  --surface-muted: var(--md-surface-container);
  --ink: var(--md-on-surface);
  --ink-soft: var(--md-on-surface-variant);
  --muted: var(--md-on-surface-variant);
  --line: var(--md-sys-color-outline-variant);
  --border: var(--line);
  --line-strong: var(--md-sys-color-outline);
  --border-strong: var(--md-sys-color-outline);
  --shadow-small: none;
  --shadow-sm: none;
}
body[data-portal] { color: var(--md-on-surface); background: var(--canvas); }
body[data-portal] > .app-shell { min-width: 0; background: var(--canvas); }
body[data-portal] .sidebar { background: var(--md-sys-color-surface-container-low); border-right: 0; }
body[data-portal] .sidebar nav { gap: 4px; }
body[data-portal] .sidebar nav .nav-item { min-height: 56px; border-radius: 999px; padding-inline: 16px; color: var(--md-on-surface-variant); font-weight: 550; }
body[data-portal] .sidebar nav .nav-item.active { border-radius: 999px; font-weight: 700; }
body[data-portal] .sidebar .nav-item.active::before { display: none; }
body[data-portal] .sidebar nav .nav-item:focus-visible,
body[data-portal] :is(button, a, summary):focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 58%, white); outline-offset: 2px; }
body[data-portal] .sidebar .account-summary,
body[data-portal] .sidebar .operator-card { border: 0; background: var(--md-sys-color-surface-container-high); border-radius: 20px; }
body[data-portal] .main-content { width: 100%; max-width: 1500px; margin-inline: auto; padding-top: clamp(24px, 3vw, 42px); }
body[data-portal] .welcome-row,
body[data-portal] .page-head { margin-bottom: 24px; }
body[data-portal] :is(.panel, .task-workspace, .kpi-card) { background: var(--md-sys-color-surface-container-low); border: 0; border-radius: 28px; box-shadow: none; }
body[data-portal] :is(.work-card, .metric-grid article) { background: var(--md-sys-color-surface-container); border: 0; border-radius: 20px; box-shadow: none; }
body[data-portal] :is(.panel-heading, .panel-head) { border-bottom-color: var(--md-sys-color-outline-variant); }
body[data-portal] :is(.primary-button, .secondary-button, .button, .topbar .button, .topbar .support-launch) { min-height: 48px; border-radius: 999px; padding-inline: 24px; box-shadow: none; }
body[data-portal] :is(.secondary-button, .button:not(.primary):not(.danger)) { background: transparent; border: 1px solid var(--md-sys-color-outline); color: var(--md-sys-color-primary); }
body[data-portal] :is(.secondary-button, .button:not(.primary):not(.danger)):hover:not(:disabled) { background: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent); border-color: var(--md-sys-color-outline); }
body[data-portal] :is(.field input, .field select, .field textarea, .ui-search-field input) { min-height: 56px; border: 1px solid var(--md-sys-color-outline); border-radius: 4px; background: transparent; color: var(--md-on-surface); }
body[data-portal] :is(.field input, .field select, .field textarea, .ui-search-field input):focus-visible { border-color: var(--primary); outline: 3px solid color-mix(in srgb, var(--primary) 16%, transparent); outline-offset: 1px; box-shadow: none; }
body[data-portal] :is(.tabs, .queue-tabs, .market-views) { gap: 0; background: transparent; border: 0; border-bottom: 1px solid var(--md-sys-color-outline-variant); border-radius: 0; padding: 0; }
body[data-portal] :is(.tabs button, .queue-tab, .market-view) { min-height: 48px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; color: var(--md-sys-color-on-surface-variant); }
body[data-portal] :is(.tabs button.active, .queue-tab.active, .market-view[aria-pressed=true]) { background: transparent; border-bottom-color: var(--md-sys-color-primary); color: var(--md-sys-color-primary); box-shadow: none; }
body[data-portal] .task-filters { gap: 8px; padding: 0; background: transparent; border: 0; }
body[data-portal] .task-filters button { min-height: 40px; border: 1px solid var(--md-sys-color-outline); border-radius: 8px; background: transparent; color: var(--md-sys-color-on-surface-variant); }
body[data-portal] .task-filters button[aria-pressed=true] { border-color: transparent; background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); box-shadow: none; }
body[data-portal] :is(.status-pill, .badge, .task-tags > span) { border-radius: 999px; }
body[data-portal] :is(.market-list, .task-list) { background: var(--md-sys-color-surface-container-low); }
body[data-portal] .market-list .market-card { border: 0; border-radius: 20px; background: var(--md-sys-color-surface-container); box-shadow: none; }
body[data-portal] .market-list .market-card:hover { background: var(--md-sys-color-surface-container-high); box-shadow: none; }
body[data-portal] .task-card { border-radius: 18px; }
body[data-portal] .task-card.selected,
body[data-portal] .task-card[aria-current=true] { border-color: transparent; background: var(--md-sys-color-secondary-container); }
body[data-portal] .metric-grid .metric-icon { border-radius: 14px; }
body[data-portal] :is(.modal, .task-session-dialog, .task-auth-dialog, .drawer, .account-dialog, .workspace-command) { border-color: var(--line); border-radius: 28px; background: var(--md-surface); }
body[data-portal] :is(.modal, .task-session-dialog, .task-auth-dialog)::backdrop { background: #211d2366; }
@media (max-width: 820px) {
  body[data-portal] .main-content { padding-inline: clamp(14px, 3vw, 24px); }
  body[data-portal]:not([data-portal=operator]) .sidebar { border: 0; border-radius: 24px 24px 0 0; background: var(--md-sys-color-surface-container); box-shadow: 0 -2px 12px #1d1b2014; }
  body[data-portal]:not([data-portal=operator]) .sidebar nav .nav-item { border-radius: 16px; }
  body[data-portal]:not([data-portal=operator]) .sidebar nav .nav-item.active { background: transparent; color: var(--md-sys-color-on-surface); }
  body[data-portal]:not([data-portal=operator]) .sidebar nav .nav-item.active > span:first-child { width: 52px; border-radius: 999px; background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
}
@media (max-width: 600px) {
  body[data-portal] :is(.panel, .task-workspace, .work-card, .metric-grid article, .kpi-card) { border-radius: 20px; }
  body[data-portal] .main-content { padding-top: 20px; }
  body[data-portal] .welcome-row, body[data-portal] .page-head { margin-bottom: 18px; }
}
