:root{font-family:"Microsoft YaHei UI","PingFang SC","Noto Sans CJK SC","Source Han Sans SC","Noto Sans SC",system-ui,sans-serif;color:#1d1b20;background:#fef7ff;--ink:#1d1b20;--muted:#49454f;--muted-strong:#49454f;--role-accent:#3f5f96;--role-soft:#d8e3ff;--role-border:#9db6e4;--shell-height:78px;--brand:#3f5f96;--accent:#3f5f96}
body[data-role="worker"]{--role-accent:#006b52;--role-soft:#8df7d1;--role-border:#72c9ab}
body[data-role="assessor"]{--role-accent:#6d4d9c;--role-soft:#ecdcff;--role-border:#c4a9ea}
body[data-role="operator"]{--role-accent:#535f72;--role-soft:#d7e3f9;--role-border:#abb9d1}
*{box-sizing:border-box}body{margin:0;min-width:320px;padding:0;background:#f5f7fa}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:wait;opacity:.65}button:focus-visible,a:focus-visible,iframe:focus-visible{outline:3px solid var(--role-accent);outline-offset:4px}[hidden]{display:none!important}.skip-link{position:fixed;left:12px;top:-80px;z-index:1000}.skip-link:focus{top:12px;background:#fff;padding:12px;border-radius:8px}
.workspace-header{height:var(--shell-height);position:sticky;top:var(--site-banner-height,0px);z-index:20;display:flex;align-items:center;gap:28px;padding:12px 24px;background:#fff;border-bottom:1px solid #e3e8ef;box-shadow:0 1px 0 rgba(20,38,70,.02)}
.role-trigger{display:flex;align-items:center;gap:12px;border:1px solid var(--role-border);border-radius:13px;padding:7px 12px 7px 8px;background:var(--role-soft);color:var(--role-accent);min-width:225px;text-align:left}.role-mark{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:var(--role-accent);color:#fff;font-size:18px;font-weight:700}.role-trigger-copy{display:grid;gap:1px;flex:1}.eyebrow{font-size:14px;letter-spacing:1.4px;font-weight:650;color:#768296;text-transform:uppercase;margin:0 0 10px}.role-trigger .eyebrow{font-size:14px;letter-spacing:.8px;margin:0;color:var(--role-accent);opacity:.8}.role-trigger strong{font-size:15px}.role-chevron{font-size:21px;line-height:1}.header-tagline{font-size:15px;color:#758095;margin:0}.top-actions{margin-left:auto;display:flex;align-items:center;gap:16px;font-size:15px}.top-actions #account-name{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.task-auth-account{position:relative}.task-auth-account>summary{padding:9px 12px;border:1px solid #dde3eb;border-radius:9px;cursor:pointer;list-style:none}.task-auth-account>div{position:absolute;right:0;top:42px;background:#fff;min-width:190px;padding:10px;border:1px solid #e3e8ef;border-radius:12px;box-shadow:0 12px 36px #24374a18}.task-auth-account button{display:block;border:0;padding:10px;background:#fff;width:100%;text-align:left}.task-auth-account-kind{font-size:14px;color:#667085;padding:0 10px}
#workspace{position:relative;min-height:calc(100dvh - var(--shell-height) - var(--site-banner-height,0px));outline:0}#portal-frame{display:block;width:100%;height:calc(100dvh - var(--shell-height) - var(--site-banner-height,0px));border:0;background:#f5f7fa}.welcome-panel{max-width:720px;margin:auto;text-align:center;padding:clamp(64px,12vh,130px) 24px}.welcome-emblem{display:grid;place-items:center;width:64px;height:64px;margin:0 auto 34px;border-radius:20px;background:var(--role-soft);color:var(--role-accent);font-size:34px;font-weight:700}.welcome-panel h1{font-size:clamp(26px,3vw,40px);letter-spacing:-1.3px;line-height:1.45;margin:12px 0 16px}.welcome-panel>p:not(.eyebrow){font-size:15px;color:#748095;line-height:1.8}.welcome-panel button,.frame-error button{padding:11px 20px;border:1px solid var(--role-border);background:var(--role-soft);color:var(--role-accent);border-radius:10px}.frame-loading{position:absolute;top:18px;left:50%;transform:translateX(-50%);background:#fff;padding:10px 18px;border:1px solid #e2e7ef;border-radius:30px;color:#667085;box-shadow:0 6px 25px #24374a10;font-size:15px}.frame-error{position:absolute;top:80px;left:50%;transform:translateX(-50%);width:min(420px,90vw);padding:24px;background:#fff;border:1px solid #e0e7ee;border-radius:16px;text-align:center;box-shadow:0 10px 60px #24374a20}
dialog::backdrop{background:rgba(24,35,50,.3);backdrop-filter:blur(3px)}.role-picker{position:fixed;inset:calc(var(--site-banner-height,0px) + 90px) auto auto 24px;margin:0;width:min(540px,calc(100vw - 48px));max-height:calc(100dvh - 120px - var(--site-banner-height,0px));padding:26px;border:1px solid #e4e9f1;border-radius:22px;box-shadow:0 24px 100px #1c2c4d2b;overflow:auto;color:#233146}.picker-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.picker-heading h2{font-size:24px;letter-spacing:-.5px;margin:0}.icon-button{width:34px;height:34px;min-height:34px;border:0;border-radius:50%;background:#f2f4f7;font-size:23px;color:#748095}.picker-intro{font-size:15px;color:#778398;line-height:1.7;margin:12px 0 20px}.role-list{display:grid;gap:10px}.role-card{display:flex;width:100%;gap:14px;text-align:left;border:1px solid #e4e9f0;border-radius:14px;padding:16px;background:#fff;align-items:center;color:#233146;transition:border-color .15s,background .15s}.role-card:hover{background:#f8fafc;border-color:#b7c3d3}.role-card[aria-current="true"]{border-color:var(--role-border);background:var(--role-soft)}.role-card .role-icon{width:42px;height:42px;flex:0 0 42px;display:grid;place-items:center;border-radius:12px;font-size:17px;font-weight:650}.role-card[data-role="customer"] .role-icon{background:#edf3ff;color:#245fc3}.role-card[data-role="worker"] .role-icon{background:#edf8f0;color:#187449}.role-card[data-role="assessor"] .role-icon{background:#f4effb;color:#7949bd}.role-card[data-role="operator"] .role-icon{background:#eff2f6;color:#46556c}.role-card-body{display:grid;gap:5px;flex:1;min-width:0}.role-card strong{font-size:15px}.role-card small{font-size:14px;color:#7a8698;line-height:1.6}.role-card-state{font-size:14px;color:#67768b;white-space:nowrap}.role-card[aria-current="true"] .role-card-state{color:var(--role-accent);font-weight:650}.role-card.admin-card{margin-top:8px;border-style:dashed}.invitation-note{display:flex;gap:12px;background:#f7f4fb;border-radius:12px;padding:16px;margin-top:18px}.invitation-note>span{font-size:23px;color:#9167c6}.invitation-note strong{display:block;color:#684b8c;font-size:14px;line-height:1.6}.invitation-note p{font-size:14px;color:#8b7a9e;line-height:1.85;margin:6px 0 0}.role-status{font-size:14px;color:#7953a7;line-height:1.75;margin:12px 0 0}.picker-handle{display:none}.action-dialog{width:min(460px,calc(100vw - 32px));padding:28px;border:0;border-radius:20px;color:#233146}.action-dialog h2{font-size:23px;margin:0 0 14px}.action-dialog p{font-size:16px;line-height:1.85;color:#738097}.action-dialog .action-error{color:#ac313e}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.dialog-actions button{padding:11px 15px;border-radius:9px;background:#f2f5f9;border:1px solid #e0e6ef;color:#40516a}.dialog-actions .primary-button{background:var(--role-accent);color:#fff;border-color:var(--role-accent)}
.task-auth-dialog{max-width:520px;width:calc(100vw - 32px);max-height:calc(100dvh - 36px);border:0;border-radius:24px;padding:30px}.task-auth-heading{display:block;text-align:center}.task-auth-heading .page-wordmark{display:none}.task-auth-heading .page-brand-tagline{font-size:14px;letter-spacing:2px;color:#7b8aa2}.task-auth-heading h1{font-size:28px}.task-auth-heading>div>p{font-size:14px;color:#758198}.task-auth-welcome{text-align:center;color:#788397}.task-auth-primary{background:#245fc3!important;border-color:#245fc3!important}.task-auth-tabs{display:flex;margin:22px 0 18px;gap:8px}.task-auth-tabs button{flex:1;border:0;border-radius:9px;padding:10px;background:#f2f5f9;color:#64748b}.task-auth-tabs button[aria-selected="true"]{background:#eaf1ff;color:#245fc3}.task-auth-dialog form{display:grid;gap:14px}.task-auth-dialog label{display:grid;gap:6px;font-size:15px}.task-auth-dialog input:not([type="radio"]):not([type="checkbox"]){width:100%;padding:11px;border:1px solid #dce3ed;border-radius:9px}.task-auth-dialog small,.task-auth-note{font-size:14px;color:#758198;line-height:1.8}.task-auth-dialog button{min-height:40px}.task-auth-dialog .task-auth-primary,.task-auth-dialog .task-auth-secondary{border-radius:9px;padding:11px}.task-auth-dialog .task-auth-secondary{background:#f1f5fb;border:1px solid #dce4ef;color:#355580}.task-auth-dialog .task-auth-primary{color:#fff}.task-auth-status{font-size:14px;line-height:1.8}.task-auth-status.error{color:#b33743}.registration-role-options{display:flex;gap:10px;margin-bottom:18px}.registration-role-options button{flex:1;padding:12px 10px;background:#f7f9fc;border:1px solid #dfe6ee;border-radius:10px;color:#5d7088;font-size:15px}.registration-role-options button[aria-pressed="true"]{background:#edf3ff;border-color:#bcd1f6;color:#245fc3}.mfa-details{font-size:14px;color:#64748b}.mfa-details summary{cursor:pointer;margin-bottom:8px}.mfa-details input{margin:8px 0}.task-session-dialog{border:0;border-radius:20px;max-width:560px;width:calc(100vw - 32px);padding:26px}.task-session-dialog label{display:grid;gap:6px;margin:12px 0}.task-session-dialog input{padding:10px;border:1px solid #dce3ed;border-radius:8px}.task-session-dialog header{display:flex;justify-content:space-between}.task-session-dialog header button{border:0;background:#f2f5f9;border-radius:50%;width:32px;height:32px}
/* Let both gateway and standalone notices consume their real height. Only the
   embedded workbench scrolls; no viewport arithmetic can add an outer scrollbar. */
html,body{height:100%;overflow:hidden}
body{height:100dvh;display:flex;flex-direction:column}
body>#site-banner,.workspace-header{flex-shrink:0}
.workspace-header{position:relative;top:0}
#workspace{display:flex;flex:1;flex-direction:column;min-height:0;overflow:hidden}
#portal-frame{flex:1;height:0;min-height:0}
#task-sandbox-banner{flex-shrink:0;margin:0;border-radius:0}
.welcome-panel{overflow:auto;width:100%}
.role-picker{top:calc(var(--page-banner-height,0px) + 90px);max-height:calc(100dvh - 120px - var(--page-banner-height,0px))}
@media(max-width:700px){:root{--shell-height:68px}.workspace-header{padding:9px 12px;gap:8px}.role-trigger{min-width:190px;padding:6px 9px 6px 7px;gap:9px}.role-mark{width:32px;height:32px;font-size:16px}.role-trigger strong{font-size:16px}.role-trigger .eyebrow{font-size:14px}.header-tagline,#account-name{display:none}.top-actions{gap:0}.task-auth-account>summary{font-size:14px;padding:9px 8px}.role-picker{inset:auto 0 0 0;width:100%;max-width:none;max-height:85dvh;margin:0;padding:10px 20px max(22px,env(safe-area-inset-bottom));border-radius:24px 24px 0 0}.picker-handle{display:block;width:36px;height:4px;background:#d8dfe8;border-radius:4px;margin:0 auto 20px}.picker-heading h2{font-size:23px}.role-card{padding:14px 12px;gap:11px}.role-card small{font-size:14px}.invitation-note{padding:14px}.task-auth-dialog{padding:24px 20px}.dialog-actions{flex-wrap:wrap}.dialog-actions button{flex:1}.role-picker .eyebrow{font-size:14px}.task-auth-account>div{right:0}}
/* Override public-host compact controls: the shell owns its own account label
   and the mobile sheet must always retain an explicit, touch-sized close. */
.top-actions .task-auth-account>summary{font-size:15px}
.top-actions .task-auth-account>summary::after{content:none}
.role-picker #close-picker{display:grid;place-items:center;flex-shrink:0;width:44px;height:44px;min-width:44px;min-height:44px;padding:0}
@media(max-width:700px){.top-actions .task-auth-account>summary{font-size:0}.top-actions .task-auth-account>summary::after{content:"账号";font-size:14px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* Keep role cards and account tools aligned for long labels and narrow screens. */
.workspace-header{padding-left:max(24px,env(safe-area-inset-left));padding-right:max(24px,env(safe-area-inset-right))}
.role-trigger{min-width:0;flex:0 1 260px}.role-trigger-copy{min-width:0}.role-trigger strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.role-mark,.role-chevron{flex-shrink:0}
.role-card{min-width:0}.role-card-body{overflow-wrap:anywhere}.role-card-state{max-width:100px;white-space:normal;line-height:1.5;text-align:right}.picker-heading>div{min-width:0}
@media(max-width:700px){.workspace-header{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}.role-trigger{flex:1;max-width:260px}.top-actions{flex-shrink:0}.role-picker{padding-left:max(18px,env(safe-area-inset-left));padding-right:max(18px,env(safe-area-inset-right))}.role-card-state{max-width:66px}.action-dialog{max-height:calc(100dvh - 32px);overflow:auto}}

/* The shell owns its reading scale, including controls inherited from the
   standalone login host. Keep the same readable minimum on small screens. */
body { font-size: 17px; font-weight: 500; line-height: 1.75; }
button, summary { font-weight: 650; }
button, input, select, textarea { font-family: inherit; }
.workspace-header { height: auto; min-height: var(--shell-height); gap: 24px; }
.role-trigger { flex-basis: 280px; padding-block: 9px; }
.role-trigger strong, .role-card strong { font-size: 18px; font-weight: 700; line-height: 1.5; }
.eyebrow, .role-trigger .eyebrow { font-size: 15px; line-height: 1.5; font-weight: 650; }
.eyebrow { color: #556275; }
.role-trigger .eyebrow { opacity: 1; letter-spacing: .3px; }
.header-tagline, .picker-intro, .role-card small, .task-auth-note { color: #4e5c70; }
.header-tagline, .picker-intro, .role-card small, .role-card-state,
.invitation-note p, .role-status, .frame-loading { font-size: 15px; }
.role-card small, .role-card-state, .invitation-note p { font-weight: 500; }
.role-card { gap: 16px; padding: 18px; }
.role-card-body { gap: 6px; }
.role-card-state { flex-shrink: 0; color: #4e5c70; }
.picker-intro { margin-block: 14px 24px; line-height: 1.8; }
.picker-heading h2, .action-dialog h2 { font-size: 26px; font-weight: 750; line-height: 1.4; }
.invitation-note strong { font-size: 16px; font-weight: 700; }
.invitation-note p { color: #604a75; line-height: 1.8; }
.action-dialog p, .welcome-panel > p:not(.eyebrow) { font-size: 17px; color: #4e5c70; }
.action-dialog .action-error { color: #ac313e; }
.dialog-actions button, .welcome-panel button, .frame-error button { min-height: 48px; font-size: 17px; line-height: 1.5; }
.top-actions, .top-actions .task-auth-account > summary { font-size: 17px; }
.task-auth-account > div { top: calc(100% + 8px); width: 220px; max-width: calc(100vw - 24px); }
.task-auth-account button { min-height: 46px; font-size: 17px; font-weight: 650; }
.task-auth-account-kind { font-size: 15px; color: #4e5c70; line-height: 1.6; }

/* Dialog padding is owned once; shared auth cards must not inset it twice. */
.task-auth-card, .task-session-dialog > section { padding: 0; }
.task-auth-heading h1 { font-size: 30px; font-weight: 750; line-height: 1.45; }
.task-auth-heading .page-brand-tagline, .task-auth-heading > div > p,
.task-auth-welcome, .task-auth-dialog small, .task-auth-dialog label small,
.task-auth-note, .task-auth-note span, .task-auth-status, .task-auth-security,
.task-auth-environment, .mfa-details, .task-registration-kinds legend,
.task-auth-dialog .task-registration-kinds small,
.task-session-dialog header p, .task-session-intro, .task-session-status,
.task-session-row small, .task-session-row span { font-size: 15px; line-height: 1.8; }
.task-auth-heading .page-brand-tagline, .task-auth-heading > div > p,
.task-auth-welcome, .task-auth-dialog small, .task-auth-dialog label small,
.task-auth-security, .mfa-details, .task-auth-dialog .task-registration-kinds small,
.task-session-intro, .task-session-row small { color: #4e5c70; font-weight: 500; }
.task-auth-dialog label, .task-session-dialog label, .task-registration-kinds strong,
.task-session-row strong { font-size: 17px; line-height: 1.65; font-weight: 650; }
.task-auth-dialog input:not([type="radio"]):not([type="checkbox"]),
.task-session-dialog input:not([type="radio"]):not([type="checkbox"]) { font-size: 17px; font-weight: 500; min-height: 48px; }
.task-auth-dialog button, .task-session-row > button { min-height: 48px; font-size: 17px; font-weight: 650; line-height: 1.5; }
.task-auth-security { margin: 24px 0 0; padding: 16px; border-radius: 10px; }
.task-auth-dialog form { gap: 18px; }
.task-auth-dialog label { gap: 8px; }
.task-auth-dialog, .task-session-dialog { overflow: auto; }
.task-session-dialog h2 { font-size: 26px; font-weight: 750; line-height: 1.4; }
.task-session-dialog header button { flex-shrink: 0; width: 44px; height: 44px; font-size: 24px; }
@media (max-width: 700px) {
  .workspace-header { gap: 8px; }
  .role-trigger { flex-basis: auto; }
  .top-actions .task-auth-account > summary { font-size: 0; }
.top-actions .task-auth-account > summary::after { font-size: 16px; }
  .role-picker { padding-top: 14px; }
  .role-card { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 8px 12px; padding: 16px 14px; }
  .role-card .role-icon { grid-column: 1; grid-row: 1 / 3; }
  .role-card-body, .role-card-state { grid-column: 2; }
  .role-card-state { max-width: none; margin-left: 0; text-align: left; }
  .task-auth-card, .task-session-dialog > section { padding: 0; }
  .task-auth-tabs { flex-wrap: wrap; }
  .task-auth-tabs button { min-width: 88px; }
  .registration-role-options { flex-wrap: wrap; }
  .registration-role-options button { flex-basis: 130px; }
  .task-session-row { align-items: flex-start; flex-wrap: wrap; }
  .task-session-row > div { flex: 1 1 180px; }
}

/* Refined account entry: calm, product-like hierarchy inspired by modern
   passwordless account centers. The email-code path remains the default. */
body::before { content:""; position:fixed; inset:0; pointer-events:none; background:
  radial-gradient(circle at 12% 8%, rgba(104,132,224,.16), transparent 30%),
  radial-gradient(circle at 86% 18%, rgba(187,112,153,.13), transparent 28%),
  linear-gradient(145deg,#f6f8fc 0%,#f8f5f8 54%,#f4f7fb 100%); }
.workspace-header { border-bottom-color:#e7eaf0; background:rgba(255,255,255,.9); box-shadow:0 8px 28px rgba(28,43,61,.05); backdrop-filter:blur(18px); }
.role-trigger { border-color:color-mix(in srgb,var(--role-accent) 22%,#fff); border-radius:16px; background:color-mix(in srgb,var(--role-soft) 76%,#fff); box-shadow:0 2px 12px rgba(26,39,64,.05); }
.role-mark { border-radius:12px; box-shadow:0 5px 14px color-mix(in srgb,var(--role-accent) 24%,transparent); }
.top-actions .task-auth-account>summary { border:1px solid #e1e5ec; border-radius:12px; background:#fff; box-shadow:0 2px 10px rgba(28,43,61,.04); }
.task-auth-dialog { width:min(560px,calc(100vw - 28px)); max-height:calc(100dvh - 28px); padding:0; border:1px solid rgba(255,255,255,.9); border-radius:28px; background:rgba(255,255,255,.98); box-shadow:0 30px 90px rgba(20,31,49,.28),0 2px 8px rgba(20,31,49,.08); }
.task-auth-dialog::backdrop { background:rgba(31,42,60,.48); backdrop-filter:blur(12px) saturate(.8); }
.task-auth-dialog .task-auth-card { padding:24px 36px 28px; }
.task-auth-heading { margin:0; }
.task-auth-heading .page-brand-tagline { margin:0 0 8px; color:#7b6880; letter-spacing:3.2px; }
.task-auth-heading h1 { margin:0; color:#182437; font-size:31px; letter-spacing:-1px; }
.task-auth-heading>div>p { margin:0 0 2px; color:#6b7280; }
.task-auth-welcome { display:none; }
.task-auth-environment { margin:12px 0 0; padding:9px 12px; border:1px solid #ede3c5; border-radius:12px; background:#fff9e7; color:#6c5a22; font-size:14px!important; line-height:1.55!important; }
.task-auth-tabs { margin:14px 0 12px; padding:4px; border:1px solid #e8eaf0; border-radius:14px; background:#f5f6f9; }
.task-auth-tabs button { min-height:42px; border:0!important; border-radius:10px!important; background:transparent!important; color:#697489!important; font-size:16px!important; box-shadow:none!important; }
.task-auth-tabs button[aria-selected="true"] { background:#fff!important; color:#20304a!important; box-shadow:0 2px 8px rgba(31,45,68,.08)!important; }
.task-auth-status { min-height:0; margin:0 0 10px; }
.task-auth-status:empty { display:none; }
.task-login-panel { display:grid; gap:13px; }
.task-login-methods { display:grid; grid-template-columns:1fr 1fr; gap:4px; padding:4px; border-radius:12px; background:#eef1f6; }
.task-login-methods button { min-height:40px; padding:7px 12px; border:0; border-radius:9px; background:transparent; color:#627087; font-size:16px; font-weight:650; }
.task-login-methods button[aria-selected="true"] { background:#fff; color:#20304a; box-shadow:0 2px 9px rgba(25,39,61,.09); }
.task-login-methods button:disabled { opacity:.45; }
.task-auth-dialog .task-login-panel form { gap:13px; }
.task-auth-dialog .task-login-panel label { gap:6px; color:#344258; }
.task-auth-dialog input:not([type="radio"]):not([type="checkbox"]) { border-color:#d8dee8; border-radius:12px; background:#fbfcfe; transition:border-color .16s,box-shadow .16s,background .16s; }
.task-auth-dialog input:not([type="radio"]):not([type="checkbox"]):focus { border-color:#6d8cd7; background:#fff; outline:0; box-shadow:0 0 0 4px rgba(68,103,190,.12); }
.task-auth-code-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:9px; align-items:stretch; }
.task-auth-code-row input { min-width:0; font-variant-numeric:tabular-nums; letter-spacing:3px; }
.task-auth-dialog button.task-auth-code-send { min-width:124px; min-height:48px; margin:0; padding:9px 13px; border:1px solid #cfd8e8; border-radius:12px; background:#f3f6fb; color:#315486; font-size:15px; white-space:nowrap; }
.task-auth-dialog .task-auth-primary { min-height:50px; margin-top:3px; border:0!important; border-radius:13px!important; background:linear-gradient(135deg,#315fae,#244d96)!important; box-shadow:0 8px 20px rgba(36,77,150,.2); }
.task-auth-dialog .task-auth-primary:hover { transform:translateY(-1px); box-shadow:0 10px 24px rgba(36,77,150,.25); }
.task-auth-dialog .mfa-details { padding:10px 12px; border:1px solid #e5e8ee; border-radius:11px; background:#fafbfc; }
.task-auth-dialog .mfa-details summary { min-height:auto; color:#59677c; font-size:15px; }
@media (max-width:700px) {
  .task-auth-dialog { width:calc(100vw - 20px); max-height:calc(100dvh - 20px); border-radius:22px; }
  .task-auth-dialog .task-auth-card { padding:24px 20px calc(26px + env(safe-area-inset-bottom)); }
  .task-auth-heading h1 { font-size:28px; }
  .task-auth-environment { font-size:14px!important; }
  .task-auth-code-row { grid-template-columns:minmax(0,1fr) 116px; }
  .task-auth-dialog button.task-auth-code-send { min-width:0; padding-inline:9px; }
}

/* Account-level asset overview stays outside the independently deployed role frames. */
.workspace-tabs{display:flex;align-items:center;gap:4px;padding:4px;background:#f1f4f8;border-radius:13px;flex-shrink:0}
.workspace-tab{min-height:42px;padding:7px 16px;border:0;border-radius:10px;background:transparent;color:#526278;font-size:16px;font-weight:650;white-space:nowrap}
.workspace-tab[aria-current="page"]{background:#fff;color:#263c63;box-shadow:0 2px 8px #24374a15}
body[data-view="assets"] #portal-frame,body[data-view="assets"] #frame-loading,body[data-view="assets"] #frame-error,body[data-view="assets"] #welcome-panel{display:none!important}
body[data-view="assets"] #workspace{display:block;overflow:auto;min-height:calc(100dvh - var(--shell-height) - var(--site-banner-height,0px))}
.assets-view{width:min(1200px,100%);margin:0 auto;padding:38px 28px 64px;color:#243449}
.assets-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:24px}
.assets-head h1{margin:0;font-size:clamp(30px,3vw,42px);line-height:1.3;letter-spacing:-.03em}
.assets-head p:last-child{margin:8px 0 0;color:#627288;font-size:17px}
.assets-head button{min-height:46px;padding:9px 17px;border:1px solid #dbe3ed;border-radius:11px;background:#fff;color:#334f75;font-weight:650;white-space:nowrap}
.assets-status{min-height:24px;margin:0 0 14px;color:#627288;font-size:15px}
#assets-content{display:grid;gap:22px}
.asset-section{padding:27px;border:1px solid #e2e8f0;border-radius:22px;background:#fff;box-shadow:0 12px 40px #1e35500a}
.asset-section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:20px}
.asset-section-heading .eyebrow{margin-bottom:5px}
.asset-section-heading h2{margin:0;font-size:24px;line-height:1.3}
.asset-unit{font-size:15px;color:#69788d;text-align:right}
.asset-hero{display:flex;justify-content:space-between;align-items:center;gap:20px;min-height:185px;padding:28px 32px;border-radius:19px;background:linear-gradient(117deg,#1e3862,#285b90 62%,#3978a7);color:#fff;overflow:hidden}
.asset-hero>div:first-child{display:grid;gap:6px}
.asset-hero span{font-size:17px;opacity:.84}
.asset-hero strong{font-size:clamp(36px,5vw,58px);font-weight:750;line-height:1.18;letter-spacing:-.03em}
.asset-hero small{font-size:15px;line-height:1.6;opacity:.78}
.asset-hero-mark{display:grid;place-items:center;width:112px;height:112px;border:1px solid #ffffff55;border-radius:50%;font-size:58px;color:#ffffffa8;flex-shrink:0}
.asset-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:16px}
.asset-metric{display:flex;flex-direction:column;min-width:0;min-height:162px;padding:20px;border:1px solid #e4eaf1;border-radius:15px;background:#f9fbfd}
.asset-metric span{font-size:16px;font-weight:650;color:#526278}
.asset-metric strong{margin:12px 0 6px;font-size:clamp(23px,2.3vw,31px);font-weight:750;line-height:1.25;overflow-wrap:anywhere}
.asset-metric small{margin-top:auto;font-size:15px;line-height:1.55;color:#718096}
.asset-metric.is-ready strong{color:#177650}.asset-metric.is-pending strong{color:#a36614}.asset-metric.is-frozen strong{color:#a34654}.asset-metric.is-held strong{color:#45638c}
.asset-practice{background:#fffcf6}.asset-practice .asset-metric{background:#fff}
.asset-practice .asset-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
.asset-empty,.asset-note{margin:0;padding:20px;border-radius:12px;background:#f4f7fb;color:#53647b;font-size:16px}
.asset-note{margin-top:16px;background:#fff8ed;color:#805820}
.asset-footnote{margin:0;padding:0 4px;color:#6a788b;font-size:15px;line-height:1.7}
@media(max-width:1050px){.workspace-header{flex-wrap:wrap}.header-tagline{display:none}.asset-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.workspace-header{gap:8px;padding:9px 12px}.role-trigger{min-width:0;flex:1 1 160px}.workspace-tabs{order:3;width:100%;display:grid;grid-template-columns:1fr 1fr}.workspace-tab{min-height:44px}.assets-view{padding:25px 14px 44px}.assets-head{align-items:flex-start;flex-wrap:wrap;gap:12px}.assets-head button{width:100%}.asset-section{padding:17px;border-radius:17px}.asset-section-heading{align-items:flex-start;flex-wrap:wrap}.asset-unit{text-align:left}.asset-hero{min-height:160px;padding:22px}.asset-hero-mark{width:66px;height:66px;font-size:37px}.asset-metrics,.asset-practice .asset-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.asset-metric{min-height:154px;padding:14px}.asset-metric strong{font-size:23px}.asset-metric small{font-size:15px}}
@media(max-width:390px){.asset-metrics,.asset-practice .asset-metrics{grid-template-columns:1fr}.asset-metric{min-height:0}.asset-metric strong{margin:7px 0}}

/* Material 3 gateway uses the same surface roles as the independent workspaces. */
:root { --md-shell-surface:#fef7ff; --md-shell-container:#f3edf7; --md-shell-low:#f7f2fa; --md-shell-outline:#79747e; --md-shell-outline-variant:#cac4d0; --md-shell-ink:#1d1b20; --md-shell-muted:#49454f; }
body { color:var(--md-shell-ink); background:var(--md-shell-surface); }
body::before { background:none; }
.workspace-header { background:var(--md-shell-low); border-bottom:0; box-shadow:none; }
.role-trigger { min-height:56px; border:0; border-radius:16px; background:var(--role-soft); color:var(--role-accent); box-shadow:none; }
.role-mark { border-radius:50%; box-shadow:none; }
.header-tagline { color:var(--md-shell-muted); }
.workspace-tabs { gap:0; padding:0; background:transparent; border:0; border-radius:0; align-self:stretch; }
.workspace-tab { min-height:52px; padding-inline:22px; border:0; border-bottom:3px solid transparent; border-radius:0; color:var(--md-shell-muted); }
.workspace-tab[aria-current="page"] { border-bottom-color:var(--role-accent); background:transparent; color:var(--role-accent); box-shadow:none; }
.top-actions .task-auth-account>summary { min-height:48px; display:flex; align-items:center; border-color:var(--md-shell-outline); border-radius:999px; box-shadow:none; background:transparent; }
.role-picker,.action-dialog,.task-auth-dialog,.task-session-dialog { border:0; border-radius:28px; background:var(--md-shell-surface); color:var(--md-shell-ink); }
.role-card { min-height:80px; border:0; border-radius:20px; background:var(--md-shell-container); }
.role-card:hover { background:#ece6f0; border:0; }
.role-card[aria-current="true"] { border:0; background:var(--role-soft); }
.role-card .role-icon { border-radius:14px; }
.picker-intro,.role-card small,.role-card-state { color:var(--md-shell-muted); }
.dialog-actions button,.welcome-panel button,.frame-error button { border-radius:999px; }
.task-auth-dialog .task-auth-card { padding:24px 36px 28px; }
.task-auth-heading h1 { color:var(--md-shell-ink); }
.task-auth-tabs,.task-login-methods { border:0; border-bottom:1px solid var(--md-shell-outline-variant); border-radius:0; background:transparent; }
.task-auth-tabs button,.task-login-methods button { border-radius:0!important; border-bottom:3px solid transparent!important; }
.task-auth-tabs button[aria-selected="true"],.task-login-methods button[aria-selected="true"] { color:var(--role-accent)!important; border-bottom-color:var(--role-accent)!important; background:transparent!important; box-shadow:none!important; }
.task-auth-dialog input:not([type="radio"]):not([type="checkbox"]) { border-color:var(--md-shell-outline); border-radius:4px; background:transparent; }
.task-auth-dialog input:not([type="radio"]):not([type="checkbox"]):focus { border-color:var(--role-accent); box-shadow:0 0 0 3px color-mix(in srgb,var(--role-accent) 18%,transparent); }
.task-auth-dialog button.task-auth-code-send { border-color:var(--md-shell-outline); border-radius:999px; background:var(--md-shell-low); color:var(--md-shell-ink); }
.task-auth-dialog .task-auth-primary { border-radius:999px!important; background:var(--role-accent)!important; box-shadow:none; }
.task-auth-dialog .task-auth-primary:hover { box-shadow:0 3px 8px color-mix(in srgb,var(--role-accent) 22%,transparent); }
.assets-view { color:var(--md-shell-ink); }
.asset-section { border:0; border-radius:24px; background:var(--md-shell-low); box-shadow:none; }
.asset-section.asset-practice { background:#fffcf6; }
.asset-hero { border-radius:20px; background:var(--role-soft); color:var(--md-shell-ink); border:0; }
.asset-hero span,.asset-hero small { opacity:1; color:var(--md-shell-muted); }
.asset-hero strong { color:var(--role-accent); }
.asset-hero-mark { color:var(--role-accent); border-color:var(--role-border); }
.asset-metric { border:0; border-radius:18px; background:var(--md-shell-container); }
.asset-metric span,.asset-metric small,.asset-footnote { color:var(--md-shell-muted); }
.assets-head button { border-color:var(--md-shell-outline); border-radius:999px; color:var(--role-accent); background:transparent; }
.asset-empty,.asset-note { border-radius:16px; background:var(--md-shell-container); }
:is(.role-trigger,.workspace-tab,.role-card,.assets-head button,.task-auth-account>summary):focus-visible { outline:3px solid color-mix(in srgb,var(--role-accent) 65%,white); outline-offset:2px; }
@media(max-width:700px) {
  .workspace-header { gap:8px; }
  .role-trigger { min-height:48px; }
  .workspace-tabs { width:100%; border-bottom:1px solid var(--md-shell-outline-variant); }
  .workspace-tab { min-height:48px; }
  .role-picker { border-radius:28px 28px 0 0; }
  .task-auth-dialog .task-auth-card { padding:24px 20px calc(26px + env(safe-area-inset-bottom)); }
  .asset-section { border-radius:20px; }
}
