:root{color-scheme:light;--bg:#f5f7fb;--panel:#fff;--ink:#111827;--muted:#64748b;--line:#e2e8f0;--brand:#172554;--accent:#2563eb;--danger:#b91c1c;--success:#166534;--warning:#92400e;--radius:16px;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink)}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}.app-shell{min-height:100vh;display:grid;grid-template-columns:230px 1fr}.sidebar{background:#0f172a;color:#e2e8f0;padding:24px 16px;display:flex;flex-direction:column;gap:28px}.brand{display:flex;align-items:center;gap:10px;font-weight:800;color:inherit;text-decoration:none}.brand:hover{text-decoration:none}.brand-mark{display:inline-grid;place-items:center;min-width:44px;height:34px;padding:0 8px;border-radius:10px;background:#fff;color:#0f172a;font-size:14px;letter-spacing:.08em}.sidebar nav{display:grid;gap:6px}.nav-link{display:block;color:#cbd5e1;padding:10px 12px;border-radius:10px}.nav-link:hover,.nav-link.active{background:#1e293b;color:#fff;text-decoration:none}.sidebar-footer{margin-top:auto}.main{min-width:0}.topbar{min-height:92px;background:#fff;border-bottom:1px solid var(--line);padding:18px 32px;display:flex;align-items:center;justify-content:space-between;gap:24px}.topbar h1,.page-heading h2,.login-card h1{margin:2px 0 0}.eyebrow{margin:0;text-transform:uppercase;letter-spacing:.12em;font-size:11px;font-weight:800;color:var(--muted)}.content-shell{padding:28px 32px 56px;max-width:1440px;margin:0 auto}.page-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.workspace-form,.inline-form,.approval-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.workspace-form select,.approval-form input,select,input,textarea{border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:var(--ink);padding:10px 12px;font:inherit}.workspace-form select{min-width:210px}.button{appearance:none;border:0;border-radius:10px;background:var(--accent);color:#fff;padding:10px 14px;font-weight:750;cursor:pointer}.button:hover{filter:brightness(.96);text-decoration:none}.button.secondary{background:#e2e8f0;color:#172033}.button.danger{background:#fee2e2;color:var(--danger)}.flash{margin:18px 32px 0;background:#dcfce7;color:#166534;border:1px solid #bbf7d0;padding:12px 14px;border-radius:12px}.flash.error{background:#fee2e2;color:#991b1b;border-color:#fecaca}.metric-grid,.card-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:20px}.metric-card,.data-card,.action-card,.panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 1px 2px rgba(15,23,42,.04)}.metric-card{padding:20px;display:grid;gap:7px}.metric-card span{color:var(--muted);font-size:13px}.metric-card strong{font-size:32px}.metric-card a{font-size:13px;margin-top:5px}.panel{padding:22px;margin-bottom:20px}.panel-heading,.data-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.panel-heading{margin-bottom:18px}.panel-heading h3,.data-card h3,.action-card h3{margin:0}.panel-heading p,.data-card p,.muted{color:var(--muted)}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;min-width:680px}th,td{text-align:left;border-bottom:1px solid var(--line);padding:12px 10px;vertical-align:top}th{font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}td small,.action-card small{display:block;color:var(--muted);margin-top:5px}.badge{display:inline-block;border-radius:999px;background:#e2e8f0;color:#334155;padding:5px 9px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.badge-active,.badge-approved,.badge-published,.badge-executed,.badge-complete{background:#dcfce7;color:var(--success)}.badge-pending,.badge-pending_approval,.badge-proposed,.badge-generated,.badge-in_progress{background:#fef3c7;color:var(--warning)}.badge-rejected,.badge-failed,.badge-error{background:#fee2e2;color:var(--danger)}.data-card,.action-card{padding:18px}.data-card dl{display:grid;grid-template-columns:110px 1fr;gap:8px;font-size:13px}.data-card dt{color:var(--muted)}.data-card dd{margin:0;overflow-wrap:anywhere}.creative-preview{width:100%;max-height:360px;object-fit:contain;border-radius:12px;background:#f8fafc;margin:12px 0}.copy-preview{white-space:normal;line-height:1.5}.action-card{margin:12px 0}.approval-row{border-top:1px solid var(--line);padding:12px 0;margin-top:12px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}.approval-review-context{display:grid;grid-template-columns:minmax(240px,360px) minmax(0,1fr);gap:20px;margin:18px 0;padding:18px;border:1px solid var(--line);border-radius:14px;background:#f8fafc}.approval-preview-column{display:flex;flex-direction:column;gap:10px}.approval-asset-link{display:block}.approval-creative-preview{display:block;width:100%;max-height:520px;object-fit:contain;border-radius:12px;background:#0f172a;border:1px solid var(--line)}.approval-open-asset{align-self:flex-start}.approval-copy-column{min-width:0}.approval-copy-preview{white-space:pre-wrap;line-height:1.55;background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px;margin:7px 0 14px;overflow-wrap:anywhere}.approval-metadata{display:grid;grid-template-columns:120px minmax(0,1fr);gap:8px 12px;margin:0;font-size:13px}.approval-metadata dt{color:var(--muted);font-weight:700}.approval-metadata dd{margin:0;overflow-wrap:anywhere}.mono-break{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;word-break:break-all}.approval-form{margin-left:auto}.empty-state{padding:34px;text-align:center;color:var(--muted);border:1px dashed #cbd5e1;border-radius:14px}.empty-state h3{color:var(--ink);margin-top:0}pre{overflow:auto;background:#0f172a;color:#e2e8f0;padding:14px;border-radius:12px;font-size:12px;line-height:1.45}.copilot-layout{max-width:980px}.chat-panel{padding-bottom:0}.messages{min-height:300px;display:grid;gap:12px;align-content:start}.message{max-width:78%;padding:12px 14px;border-radius:14px;background:#f1f5f9}.message.user{margin-left:auto;background:#dbeafe}.message span{font-size:11px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);font-weight:800}.message p{margin:4px 0 0;line-height:1.55}.composer{border-top:1px solid var(--line);margin:18px -22px 0;padding:16px 22px;display:grid;grid-template-columns:1fr auto;gap:10px;align-items:end}.composer textarea{resize:vertical;width:100%}.login-body{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(135deg,#0f172a,#1e3a8a)}.login-card{width:min(430px,100%);background:#fff;padding:32px;border-radius:22px;box-shadow:0 30px 80px rgba(0,0,0,.28)}.login-brand{color:var(--ink);margin-bottom:26px}.login-card .stack{display:grid;gap:16px;margin-top:24px}.login-card label{display:grid;gap:7px;font-size:13px;font-weight:700}.login-card input{width:100%}@media(max-width:1100px){.metric-grid,.card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}.voice-region{margin:14px -22px 0;padding:14px 22px;border-top:1px solid var(--line);display:grid;gap:10px}.voice-status{font-size:13px;font-weight:600;color:var(--muted);margin:0}.voice-status[data-state=listening]{color:var(--danger)}.voice-status[data-state=transcribing]{color:var(--accent)}.voice-status[data-state=ready_for_review]{color:var(--success)}.voice-status[data-state=error],.voice-status[data-state=unsupported]{color:var(--danger)}.voice-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.voice-toggle{display:inline-flex;align-items:center;gap:6px;min-height:44px;min-width:44px}.voice-stop,.voice-cancel{min-height:44px}.voice-stop{background:#fee2e2;color:var(--danger)}.voice-elapsed{font-variant-numeric:tabular-nums;font-size:13px;color:var(--muted);min-width:42px}.voice-error{margin:0;color:var(--danger);font-size:13px}.voice-hint{margin:0;color:var(--muted);font-size:12px}
@media(max-width:760px){.approval-review-context{grid-template-columns:1fr}.approval-metadata{grid-template-columns:1fr}.approval-metadata dt{margin-top:6px}.topbar{padding:16px;align-items:flex-start;flex-direction:column}.content-shell{padding:20px 16px 42px}.flash{margin:14px 16px 0}.metric-grid,.card-grid{grid-template-columns:1fr}.workspace-form{width:100%}.workspace-form select{flex:1;min-width:0}.composer{grid-template-columns:1fr}.message{max-width:92%}}

/* Approval review UX v2 */
.approval-queue-panel{padding:24px}
.approval-action-card{padding:0;overflow:hidden;margin:18px 0;border:1px solid #dbe3ee;box-shadow:0 8px 24px rgba(15,23,42,.05)}
.approval-action-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:20px 22px;border-bottom:1px solid var(--line);background:#fff}
.approval-action-header h3{margin:2px 0 6px;font-size:20px;line-height:1.25}
.approval-action-header p{margin:0;color:var(--muted);font-size:14px;line-height:1.5}
.approval-action-kicker{font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--accent)}
.approval-destination-bar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:var(--line);border-bottom:1px solid var(--line)}
.approval-destination-bar>div{background:#f8fafc;padding:14px 18px;display:grid;gap:3px}
.approval-destination-bar span{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:800}
.approval-destination-bar strong{font-size:15px;color:var(--ink);overflow-wrap:anywhere}
.approval-review-context{display:grid;grid-template-columns:300px minmax(0,1fr);gap:28px;margin:0;padding:24px 22px;background:#fff;border:0;border-radius:0;align-items:start}
.approval-section-label{margin:0 0 10px;font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.approval-preview-column{display:flex;flex-direction:column;gap:10px;min-width:0}
.approval-asset-link{display:block;width:100%;border-radius:12px;overflow:hidden;background:#07111f;border:1px solid #cbd5e1;box-shadow:0 8px 18px rgba(15,23,42,.08)}
.approval-creative-preview{display:block;width:100%;height:auto;max-height:390px;object-fit:contain;margin:0;border:0;border-radius:0;background:#07111f}
.approval-open-asset{align-self:flex-start;margin-top:2px;font-size:13px}
.approval-copy-column{min-width:0}
.approval-copy-preview{font-size:16px;line-height:1.65;color:#172033;background:#f8fafc;border:1px solid #dbe3ee;border-radius:12px;padding:18px;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.approval-alt-text{margin-top:16px;padding:14px 16px;border-left:3px solid #cbd5e1;background:#fff}
.approval-alt-text span{display:block;margin-bottom:5px;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.approval-alt-text p{margin:0;color:#475569;font-size:13px;line-height:1.55}
.approval-technical{margin:0 22px 18px;border:1px solid var(--line);border-radius:12px;background:#f8fafc}
.approval-technical summary{cursor:pointer;list-style:none;padding:14px 16px;font-size:13px;font-weight:800;color:#334155;display:flex;align-items:center;justify-content:space-between;gap:12px}
.approval-technical summary::-webkit-details-marker{display:none}
.approval-technical summary::after{content:"+";font-size:18px;line-height:1;color:#64748b}
.approval-technical[open] summary::after{content:"−"}
.approval-technical summary span{font-weight:500;color:var(--muted);font-size:12px}
.approval-technical-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:0 16px 16px}
.approval-technical-grid>div{min-width:0;background:#fff;border:1px solid var(--line);border-radius:10px;padding:11px 12px}
.approval-technical-grid span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);font-weight:800;margin-bottom:5px}
.approval-technical-grid code{display:block;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;line-height:1.45;color:#334155;white-space:normal;overflow-wrap:anywhere}
.approval-technical-grid .technical-wide{grid-column:1/-1}
.approval-decision-zone{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 22px;border-top:1px solid var(--line);background:#fbfdff}
.approval-status-line{display:flex;align-items:center;gap:10px;min-width:0}
.approval-id{font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.approval-primary-actions{margin-left:auto;justify-content:flex-end}
.approval-note{min-width:240px}
.empty-state.compact{padding:18px}
@media(max-width:1050px){
  .approval-review-context{grid-template-columns:260px minmax(0,1fr);gap:20px}
  .approval-creative-preview{max-height:340px}
}
@media(max-width:820px){
  .approval-review-context{grid-template-columns:1fr;padding:18px}
  .approval-preview-column{max-width:360px}
  .approval-destination-bar{grid-template-columns:1fr}
  .approval-technical-grid{grid-template-columns:1fr}
  .approval-technical-grid .technical-wide{grid-column:auto}
  .approval-decision-zone{align-items:flex-start;flex-direction:column}
  .approval-primary-actions{margin-left:0;width:100%;justify-content:flex-start}
  .approval-note{min-width:0;flex:1}
}
@media(max-width:560px){
  .approval-action-header{padding:16px}
  .approval-review-context{padding:16px}
  .approval-technical{margin:0 16px 16px}
  .approval-decision-zone{padding:14px 16px}
  .approval-copy-preview{font-size:15px;padding:15px}
  .approval-primary-actions{display:grid;grid-template-columns:1fr 1fr}
  .approval-note{grid-column:1/-1;width:100%}
}

/* Governed execution UX */
.execution-queue-panel{padding:24px}
.execution-action-card{padding:0;overflow:hidden;margin:18px 0;border:1px solid #dbe3ee;box-shadow:0 8px 24px rgba(15,23,42,.05)}
.execution-action-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:20px 22px;border-bottom:1px solid var(--line);background:#fff}
.execution-action-header h3{margin:2px 0 6px;font-size:20px;line-height:1.25}
.execution-action-header p{margin:0;color:var(--muted);font-size:14px;line-height:1.5}
.execution-kicker{font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--accent)}
.execution-destination{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:var(--line);border-bottom:1px solid var(--line)}
.execution-destination>div{background:#f8fafc;padding:14px 18px;display:grid;gap:3px}
.execution-destination span{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:800}
.execution-destination strong{font-size:15px;color:var(--ink);overflow-wrap:anywhere}
.execution-review-context{display:grid;grid-template-columns:300px minmax(0,1fr);gap:28px;padding:24px 22px;background:#fff;align-items:start}
.execution-section-label{margin:0 0 10px;font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.execution-preview-column{display:flex;flex-direction:column;gap:10px;min-width:0}
.execution-asset-link{display:block;width:100%;border-radius:12px;overflow:hidden;background:#07111f;border:1px solid #cbd5e1;box-shadow:0 8px 18px rgba(15,23,42,.08)}
.execution-creative-preview{display:block;width:100%;height:auto;max-height:390px;object-fit:contain;background:#07111f}
.execution-open-asset{align-self:flex-start;font-size:13px}
.execution-copy-column{min-width:0}
.execution-copy-preview{font-size:16px;line-height:1.65;color:#172033;background:#f8fafc;border:1px solid #dbe3ee;border-radius:12px;padding:18px;white-space:pre-wrap;overflow-wrap:anywhere}
.execution-alt-text{margin-top:16px;padding:14px 16px;border-left:3px solid #cbd5e1;background:#fff}
.execution-alt-text span{display:block;margin-bottom:5px;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.execution-alt-text p{margin:0;color:#475569;font-size:13px;line-height:1.55}
.execution-technical,.execution-history{margin:0 22px 18px;border:1px solid var(--line);border-radius:12px;background:#f8fafc}
.execution-technical summary,.execution-history summary{cursor:pointer;list-style:none;padding:14px 16px;font-size:13px;font-weight:800;color:#334155;display:flex;align-items:center;justify-content:space-between;gap:12px}
.execution-technical summary::-webkit-details-marker,.execution-history summary::-webkit-details-marker{display:none}
.execution-technical summary::after,.execution-history summary::after{content:"+";font-size:18px;line-height:1;color:#64748b}
.execution-technical[open] summary::after,.execution-history[open] summary::after{content:"−"}
.execution-technical summary span,.execution-history summary span{font-weight:500;color:var(--muted);font-size:12px}
.execution-technical-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:0 16px 16px}
.execution-technical-grid>div{min-width:0;background:#fff;border:1px solid var(--line);border-radius:10px;padding:11px 12px}
.execution-technical-grid span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);font-weight:800;margin-bottom:5px}
.execution-technical-grid code{display:block;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;line-height:1.45;color:#334155;white-space:normal;overflow-wrap:anywhere}
.execution-technical-grid .technical-wide{grid-column:1/-1}
.execution-confirm-panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,420px);gap:24px;align-items:end;margin:0 22px 18px;padding:20px;border:1px solid #fecaca;border-radius:14px;background:#fff7f7}
.execution-confirm-copy h4{margin:3px 0 8px;font-size:18px}
.execution-confirm-copy p{margin:0;color:#64748b;line-height:1.55}
.execution-confirm-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}
.execution-confirm-form label{display:grid;gap:7px;font-size:12px;font-weight:700;color:#475569}
.execution-confirm-form input{width:100%;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.08em;font-weight:800}
.execution-button{min-height:42px;white-space:nowrap}
.execution-success-panel{display:flex;gap:14px;align-items:flex-start;margin:0 22px 18px;padding:18px;border:1px solid #bbf7d0;border-radius:14px;background:#f0fdf4}
.execution-success-icon{display:grid;place-items:center;width:32px;height:32px;flex:0 0 32px;border-radius:999px;background:#16a34a;color:#fff;font-weight:900}
.execution-success-panel strong{display:block;margin-bottom:4px;color:#166534}
.execution-success-panel p{margin:0;color:#3f6212;line-height:1.5}
.execution-unavailable{margin:0 22px 18px;padding:16px;border:1px solid var(--line);border-radius:12px;background:#f8fafc}
.execution-unavailable strong{display:block;margin-bottom:4px}
.execution-unavailable p{margin:0;color:var(--muted)}
.execution-history{padding-bottom:0}
.execution-history>p{padding:0 16px 16px;margin:0}
.execution-history .table-wrap{padding:0 16px 16px}
@media(max-width:1050px){
  .execution-review-context{grid-template-columns:260px minmax(0,1fr);gap:20px}
  .execution-creative-preview{max-height:340px}
  .execution-confirm-panel{grid-template-columns:1fr}
}
@media(max-width:820px){
  .execution-review-context{grid-template-columns:1fr;padding:18px}
  .execution-preview-column{max-width:360px}
  .execution-destination{grid-template-columns:1fr}
  .execution-technical-grid{grid-template-columns:1fr}
  .execution-technical-grid .technical-wide{grid-column:auto}
  .execution-confirm-form{grid-template-columns:1fr}
}
@media(max-width:560px){
  .execution-action-header{padding:16px}
  .execution-review-context{padding:16px}
  .execution-technical,.execution-history,.execution-confirm-panel,.execution-success-panel,.execution-unavailable{margin-left:16px;margin-right:16px}
  .execution-copy-preview{font-size:15px;padding:15px}
}

/* Workspace execution policy gate */
.execution-policy-panel{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin:0 0 18px;padding:18px 20px;border-radius:14px;border:1px solid var(--line);background:#fff}
.execution-policy-panel h4{margin:3px 0 7px;font-size:18px}
.execution-policy-panel p{margin:0;color:#475569;line-height:1.55}
.execution-policy-panel small{display:block;margin-top:8px;color:var(--muted)}
.execution-policy-panel.blocked{border-color:#fde68a;background:#fffbeb}
.execution-policy-panel.enabled{border-color:#bbf7d0;background:#f0fdf4}
.execution-policy-form{display:grid;grid-template-columns:minmax(280px,420px) auto;gap:10px;align-items:end;min-width:min(100%,600px)}
.execution-policy-form label{display:grid;gap:7px;font-size:12px;font-weight:700;color:#475569}
.execution-policy-form input{width:100%;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-weight:800;letter-spacing:.08em}
@media(max-width:900px){
  .execution-policy-panel{flex-direction:column}
  .execution-policy-form{grid-template-columns:1fr;width:100%;min-width:0}
}

/* Governed execution failure evidence */
.execution-failure-panel{display:flex;gap:14px;align-items:flex-start;margin:0 22px 18px;padding:18px;border:1px solid #fecaca;border-radius:14px;background:#fff7f7}
.execution-failure-icon{display:grid;place-items:center;width:32px;height:32px;flex:0 0 32px;border-radius:999px;background:#dc2626;color:#fff;font-weight:900}
.execution-failure-panel strong{display:block;margin-bottom:5px;color:#991b1b}
.execution-failure-panel p{margin:0;color:#7f1d1d;line-height:1.55}
.execution-failure-panel small{display:block;margin-top:7px;color:#991b1b}
.execution-failure-note{margin-top:10px!important;color:#64748b!important}
.execution-reconcile-form{margin-top:14px}
.execution-reconcile-form .button{width:auto}
.execution-preprovider-failure{border-color:#fed7aa;background:#fffaf2}
.execution-preprovider-failure strong{color:#9a3412}
.execution-preprovider-failure p,.execution-preprovider-failure small{color:#7c2d12}
.execution-history-reason{min-width:260px;white-space:normal;overflow-wrap:anywhere}
@media(max-width:560px){
  .execution-failure-panel{margin-left:16px;margin-right:16px}
}


/* Approval state reconciliation */
.approval-state-mismatch{margin:12px 0 0;padding:14px;border:1px solid #fed7aa;border-radius:12px;background:#fffaf2}
.approval-state-mismatch strong{display:block;color:#9a3412;margin-bottom:6px}
.approval-state-mismatch p{margin:0 0 12px;color:#7c2d12;line-height:1.5}
.approval-state-mismatch form{margin:0}

/* Approval recovery controls */
.approval-revoke-actions{margin-top:12px;padding-top:14px;border-top:1px solid var(--line);display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,1fr) auto;gap:10px;align-items:end}
.approval-revoke-actions label,.execution-revoke-form label{display:grid;gap:7px;font-size:12px;font-weight:700;color:#475569}
.approval-revoke-actions input,.execution-revoke-form input{width:100%}
.execution-action-forms{display:grid;gap:12px}
.execution-revoke-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end;padding-top:12px;border-top:1px solid #fecaca}
@media(max-width:820px){
  .approval-revoke-actions,.execution-revoke-form{grid-template-columns:1fr}
}


/* Copilot canonical media attachment */
.copilot-media-region{margin:14px -22px 0;padding:16px 22px;border-top:1px solid var(--line);display:grid;gap:12px;background:#fbfdff}
.copilot-media-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.copilot-media-toolbar strong{display:block;font-size:14px;color:var(--ink)}
.copilot-media-toolbar p{margin:4px 0 0;color:var(--muted);font-size:12px;line-height:1.5}
.copilot-media-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.copilot-media-preview{display:block;max-width:420px}
.copilot-media-preview-object{display:block;width:100%;max-height:420px;object-fit:contain;border-radius:14px;border:1px solid var(--line);background:#07111f}
.copilot-media-progress{width:min(420px,100%);height:8px}
.copilot-media-status{margin:0;font-size:13px;color:var(--muted)}
.copilot-media-status[data-state=uploading]{color:var(--accent)}
.copilot-media-status[data-state=ready]{color:var(--success);font-weight:700}
.copilot-media-status[data-state=error]{color:var(--danger);font-weight:700}
.copilot-media-region small{color:var(--muted);line-height:1.45}
@media(max-width:760px){
  .copilot-media-toolbar{flex-direction:column}
  .copilot-media-actions{justify-content:flex-start;width:100%}
  .copilot-media-actions .button{flex:1 1 150px;min-height:44px}
  .copilot-media-preview{max-width:100%}
}


/* Research-pilot participant home/navigation */
.nav-section-label{padding:8px 12px 4px;font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#94a3b8}
.nav-advanced{margin-top:8px;border-top:1px solid rgba(148,163,184,.2);padding-top:8px}
.nav-advanced summary{cursor:pointer;padding:9px 12px;color:#94a3b8;font-size:12px;font-weight:700;list-style:none}
.nav-advanced summary::-webkit-details-marker{display:none}
.nav-advanced summary::after{content:"+";float:right}
.nav-advanced[open] summary::after{content:"−"}
.nav-advanced-links{display:grid;gap:2px}
.participant-next-step{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px;margin-bottom:20px;border:1px solid #bfdbfe;border-radius:18px;background:linear-gradient(135deg,#eff6ff,#f8fafc)}
.participant-next-step h3{margin:4px 0 8px;font-size:22px}
.participant-next-step p{margin:0;max-width:720px;color:#475569;line-height:1.55}
.participant-task-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}
.participant-task-card{display:flex;flex-direction:column;gap:8px;padding:20px;border:1px solid var(--line);border-radius:16px;background:#fff;color:var(--ink);text-decoration:none;box-shadow:0 6px 18px rgba(15,23,42,.04)}
.participant-task-card:hover{border-color:#93c5fd;box-shadow:0 10px 24px rgba(15,23,42,.08)}
.participant-task-card.primary{border-color:#bfdbfe;background:#eff6ff}
.participant-task-card strong{font-size:16px}
.participant-task-card p{margin:0;color:#475569;font-size:13px;line-height:1.5}
.participant-task-card small{margin-top:auto;color:var(--muted);font-size:11px}
.participant-task-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#f1f5f9;color:var(--accent);font-weight:900}
.participant-task-card.primary .participant-task-icon{background:#dbeafe}
.participant-recent-panel{padding:22px}
.participant-recent-list{display:grid;border-top:1px solid var(--line)}
.participant-recent-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;padding:15px 4px;border-bottom:1px solid var(--line);text-decoration:none;color:var(--ink)}
.participant-recent-item p{margin:4px 0 0;color:var(--muted);font-size:13px;line-height:1.45}
.participant-recent-item>div:last-child{display:grid;justify-items:end;gap:7px}
.participant-recent-item small{color:var(--muted);font-size:11px}
.participant-help{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 20px;border:1px dashed #cbd5e1;border-radius:14px;background:#f8fafc}
.participant-help p{margin:4px 0 0;color:#64748b;line-height:1.5}
@media(max-width:1100px){.participant-task-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){
  .participant-next-step,.participant-help{align-items:stretch;flex-direction:column}
  .participant-next-step .button,.participant-help .button{width:100%;text-align:center}
  .participant-task-grid{grid-template-columns:1fr}
  .participant-recent-item{grid-template-columns:1fr}
  .participant-recent-item>div:last-child{justify-items:start}
  .nav-section-label{display:none}
  .nav-advanced{min-width:150px;border-top:0;border-left:1px solid rgba(148,163,184,.2);padding:0 0 0 8px;margin:0}
}


/* Copilot task discoverability */
.copilot-welcome{display:grid;gap:16px;padding:18px;border:1px solid #dbeafe;border-radius:16px;background:#f8fbff}
.copilot-welcome h4{margin:3px 0 6px;font-size:19px}
.copilot-welcome>div>p:not(.eyebrow){margin:0;color:#64748b;line-height:1.5}
.copilot-starter-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.copilot-starter{appearance:none;border:1px solid var(--line);border-radius:13px;background:#fff;padding:14px;text-align:left;color:var(--ink);cursor:pointer;display:grid;gap:5px;font:inherit}
.copilot-starter:hover,.copilot-starter:focus-visible{border-color:#60a5fa;outline:none;box-shadow:0 0 0 3px rgba(59,130,246,.12)}
.copilot-starter strong{font-size:13px}
.copilot-starter span{font-size:11px;color:#64748b;line-height:1.45}
.copilot-safety-note{padding:12px 14px;border-radius:11px;background:#eef6ff;color:#334155;font-size:12px;line-height:1.5}
@media(max-width:760px){
  .copilot-starter-grid{grid-template-columns:1fr}
  .copilot-starter{min-height:68px}
}


/* Chat-first participant experience v3 — mobile-first Copilot home */
.portal-page-copilot{background:#fff}
.portal-page-copilot .main-copilot{background:#fff;min-height:100vh}
.portal-page-copilot .content-shell{max-width:none;padding:0}
.portal-page-copilot .page-heading{display:none}
.portal-page-copilot .flash{max-width:860px;margin:14px auto 0}
.copilot-layout.chat-first{max-width:none;margin:0}
.copilot-layout.chat-first .chat-panel{border:0;border-radius:0;box-shadow:none;margin:0;padding:0;background:#fff;min-height:calc(100vh - 93px);display:flex;flex-direction:column}
.copilot-chat-header{position:sticky;top:0;z-index:12;display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:16px 24px;background:rgba(255,255,255,.96);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
.copilot-chat-header h3{font-size:20px;margin:1px 0 4px}
.copilot-chat-header p{margin:0;color:var(--muted);font-size:13px;line-height:1.45}
.copilot-product-kicker{display:block;color:var(--accent);font-size:10px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}
.compact-button{padding:8px 11px;white-space:nowrap}
.portal-page-copilot .messages{width:min(820px,100%);margin:0 auto;min-height:38vh;padding:30px 22px 20px;display:flex;flex-direction:column;gap:16px}
.portal-page-copilot .message{width:fit-content;max-width:min(78%,680px);padding:12px 15px;border-radius:18px;border:0;box-shadow:none;font-size:15px;line-height:1.55}
.portal-page-copilot .message span{display:block;margin-bottom:4px;font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.portal-page-copilot .message p{margin:0}
.portal-page-copilot .message.user{align-self:flex-end;margin-left:0;background:#eef2ff}
.portal-page-copilot .message.assistant{align-self:flex-start;background:#f8fafc}
.copilot-welcome{width:min(760px,100%);margin:4vh auto 0;text-align:center}
.copilot-welcome>div:first-child{max-width:620px;margin:0 auto 24px}
.copilot-welcome h4{font-size:30px;line-height:1.15;margin:8px 0 10px}
.copilot-welcome>div:first-child>p:last-child{color:var(--muted);line-height:1.55}
.copilot-starter-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;text-align:left}
.copilot-starter{border:1px solid var(--line);border-radius:16px;background:#fff;padding:14px 15px;cursor:pointer;text-align:left;transition:background .15s,border-color .15s,transform .15s}
.copilot-starter:hover{background:#f8fafc;border-color:#cbd5e1;transform:translateY(-1px)}
.copilot-starter strong{display:block;font-size:14px;color:var(--ink);margin-bottom:4px}
.copilot-starter span{display:block;color:var(--muted);font-size:12px;line-height:1.4}
.copilot-safety-note{margin:16px auto 0;max-width:680px;padding:10px 12px;border-radius:12px;background:#f8fafc;color:#475569;font-size:12px;line-height:1.45}
.copilot-input-stack{position:sticky;bottom:0;z-index:14;width:min(820px,calc(100% - 32px));margin:auto auto 0;padding:8px 0 18px;background:linear-gradient(to bottom,rgba(255,255,255,0),#fff 20%,#fff)}
.copilot-media-region{margin:0;border:1px solid var(--line);border-bottom:0;border-radius:18px 18px 0 0;background:#fff;padding:10px 14px}
.copilot-media-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px}
.copilot-media-toolbar>div:first-child{min-width:0}
.copilot-media-toolbar>div:first-child>strong{font-size:12px}
.copilot-media-toolbar>div:first-child>p{display:none}
.copilot-media-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.copilot-media-actions .button{padding:7px 10px;font-size:12px}
.copilot-media-preview{margin-top:8px}
.copilot-media-preview-object{display:block;max-width:220px;max-height:180px;border-radius:12px;object-fit:contain;background:#f8fafc}
.copilot-media-progress{width:100%;height:5px}
.copilot-media-status{margin:7px 0 0;font-size:12px;color:var(--muted);line-height:1.35}
.copilot-media-status[data-state=ready]{color:var(--success)}
.copilot-media-status[data-state=error]{color:var(--danger)}
.copilot-media-region>small{display:none}
.portal-page-copilot .voice-region{margin:0;padding:8px 14px;border:1px solid var(--line);border-top:0;border-bottom:0;background:#fff;display:flex;align-items:center;gap:10px;min-height:48px}
.portal-page-copilot .voice-status{margin:0;order:2;flex:1;font-size:12px}
.portal-page-copilot .voice-controls{order:1;gap:7px}
.portal-page-copilot .voice-hint{display:none}
.portal-page-copilot .voice-error{order:3;width:100%}
.portal-page-copilot .voice-toggle,.portal-page-copilot .voice-stop,.portal-page-copilot .voice-cancel{min-height:36px;padding:7px 10px;font-size:12px}
.chat-composer{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:10px;padding:10px;border:1px solid #cbd5e1;border-radius:0 0 18px 18px;background:#fff;box-shadow:0 12px 32px rgba(15,23,42,.10)}
.chat-composer textarea{width:100%;min-height:52px;max-height:180px;resize:vertical;border:0;background:transparent;padding:9px 10px;outline:0;line-height:1.45}
.chat-composer textarea:focus{box-shadow:none}
.send-button{min-width:64px;height:42px;border-radius:12px}
.camera-overlay{position:fixed;inset:0;z-index:1000;background:rgba(2,6,23,.82);display:grid;place-items:center;padding:18px}
.camera-card{width:min(680px,100%);background:#fff;border-radius:20px;padding:14px;box-shadow:0 30px 80px rgba(0,0,0,.35)}
.camera-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:12px}
.camera-heading strong{font-size:18px}
.camera-heading p{margin:4px 0 0;color:var(--muted);font-size:13px}
.camera-preview{display:block;width:100%;max-height:70vh;object-fit:contain;background:#020617;border-radius:14px}
.camera-actions{display:flex;justify-content:flex-end;gap:10px;padding-top:12px}
.camera-capture{min-width:120px}

/* Copilot is the participant home; dashboard remains a secondary overview. */
.portal-page-copilot .topbar{min-height:74px;padding:12px 24px}
.portal-page-copilot .topbar h1{font-size:20px}
.portal-page-copilot .workspace-form select{min-width:180px}

@media(max-width:760px){
  body{padding-bottom:66px}
  .app-shell{display:block;min-height:100vh}
  .sidebar{position:fixed;z-index:50;left:0;right:0;bottom:0;height:66px;padding:6px 8px;background:#0f172a;display:block;border-top:1px solid rgba(255,255,255,.08)}
  .sidebar .brand,.sidebar .nav-section-label,.sidebar .nav-advanced,.sidebar .sidebar-footer{display:none}
  .sidebar nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;overflow:visible}
  .sidebar .nav-link{padding:8px 3px;border-radius:10px;text-align:center;font-size:10px;line-height:1.15;color:#cbd5e1;white-space:normal}
  .sidebar .nav-link.active{background:#1e293b;color:#fff}
  .main{width:100%;padding-bottom:0}
  .topbar{min-height:58px;padding:8px 12px!important;display:flex;flex-direction:row;align-items:center;gap:8px;position:sticky;top:0;z-index:30}
  .topbar>div{min-width:0;flex:1}
  .topbar .eyebrow{display:none}
  .topbar h1{font-size:16px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}
  .workspace-form{width:auto;max-width:58%;margin-left:auto;display:flex;flex-wrap:nowrap}
  .workspace-form select{width:min(42vw,190px);min-width:0;padding:7px 28px 7px 9px;font-size:12px}
  .workspace-form .button{display:none}
  .content-shell{padding:16px 12px 88px}
  .page-heading{margin-bottom:14px}
  .page-heading h2{font-size:22px}
  .portal-page-copilot{padding-bottom:66px}
  .portal-page-copilot .content-shell{padding:0 0 74px}
  .portal-page-copilot .topbar{border-bottom:1px solid var(--line)}
  .copilot-layout.chat-first .chat-panel{min-height:calc(100dvh - 124px)}
  .copilot-chat-header{padding:10px 12px;position:static}
  .copilot-chat-header h3{font-size:16px}
  .copilot-chat-header p{display:none}
  .copilot-product-kicker{display:none}
  .compact-button{font-size:11px;padding:7px 9px}
  .portal-page-copilot .messages{padding:18px 12px 10px;gap:12px;min-height:42vh}
  .portal-page-copilot .message{max-width:88%;font-size:14px}
  .copilot-welcome{margin:2vh auto 0;padding:0 2px}
  .copilot-welcome h4{font-size:24px}
  .copilot-welcome>div:first-child>p:last-child{font-size:13px}
  .copilot-starter-grid{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:8px;padding:2px 2px 8px;margin:0 -2px}
  .copilot-starter{flex:0 0 76%;scroll-snap-align:start;min-height:112px}
  .copilot-safety-note{font-size:11px;text-align:left}
  .copilot-input-stack{width:calc(100% - 16px);padding:6px 0 8px;bottom:66px}
  .copilot-media-region{padding:8px 10px;border-radius:16px 16px 0 0}
  .copilot-media-toolbar{align-items:flex-start}
  .copilot-media-toolbar>div:first-child>strong{display:none}
  .copilot-media-actions{width:100%;display:grid;grid-template-columns:1fr 1fr auto;gap:6px}
  .copilot-media-actions .button{min-height:38px;font-size:11px;padding:7px 8px}
  .copilot-media-preview-object{max-width:150px;max-height:120px}
  .copilot-media-status{font-size:11px}
  .portal-page-copilot .voice-region{padding:6px 10px;display:grid;grid-template-columns:auto 1fr;gap:7px}
  .portal-page-copilot .voice-controls{grid-column:1}
  .portal-page-copilot .voice-status{grid-column:2;font-size:11px}
  .portal-page-copilot .voice-error{grid-column:1/-1;font-size:11px}
  .portal-page-copilot .voice-toggle-label{display:none}
  .portal-page-copilot .voice-toggle{min-width:38px;padding:7px 9px}
  .chat-composer{padding:7px;gap:7px;border-radius:0 0 16px 16px}
  .chat-composer textarea{min-height:46px;max-height:130px;padding:7px 8px;font-size:16px;resize:none}
  .send-button{min-width:54px;height:40px;padding:8px 10px;font-size:12px}
  .camera-overlay{padding:0;background:#000}
  .camera-card{width:100%;height:100dvh;border-radius:0;padding:0;background:#000;display:flex;flex-direction:column}
  .camera-heading{padding:12px;margin:0;background:#0f172a;color:#fff}
  .camera-heading p{color:#cbd5e1}
  .camera-preview{flex:1;width:100%;max-height:none;border-radius:0;object-fit:contain;background:#000}
  .camera-actions{padding:12px;background:#0f172a;justify-content:center}
  .camera-actions .button{min-height:46px}
  .camera-close{background:#334155!important;color:#fff!important}
  .panel{padding:16px}
  .table-wrap{margin:0 -4px}
}

@media(max-width:420px){
  .sidebar .nav-link{font-size:9px;padding:8px 1px}
  .copilot-starter{flex-basis:84%}
  .workspace-form select{width:38vw}
  .copilot-media-actions{grid-template-columns:1fr 1fr}
  .copilot-media-actions .button.danger{grid-column:1/-1}
}


/* P0 participant usability + accessibility v4
   Goal: one obvious conversational task, progressive disclosure, low cognitive load. */
.skip-link{
  position:fixed;left:12px;top:10px;z-index:2000;
  transform:translateY(-160%);padding:10px 14px;border-radius:10px;
  background:#0f172a;color:#fff;font-weight:800;text-decoration:none;
}
.skip-link:focus{transform:translateY(0)}
.nav-label-mobile{display:none}
.workspace-form-label{font-size:11px;font-weight:800;color:var(--muted);letter-spacing:.04em;text-transform:uppercase}
.button:focus-visible,
.nav-link:focus-visible,
.copilot-starter:focus-visible,
.copilot-more-starters summary:focus-visible,
select:focus-visible,
textarea:focus-visible,
input:focus-visible,
a:focus-visible{
  outline:3px solid #2563eb;
  outline-offset:3px;
}
.copilot-chat-header p{max-width:620px}
.copilot-welcome{
  border:0;
  background:transparent;
  padding:10px 0 18px;
  gap:14px;
}
.copilot-welcome-copy{max-width:650px!important}
.copilot-welcome-copy .eyebrow{color:var(--accent)}
.copilot-welcome-copy h4{font-size:32px;margin:6px 0 10px}
.copilot-welcome-copy>p:last-child{font-size:15px;color:#64748b}
.copilot-starter-primary{grid-template-columns:repeat(3,minmax(0,1fr))}
.copilot-starter-primary .copilot-starter{
  min-height:112px;
  border-color:#dbe3ee;
}
.copilot-starter-primary .copilot-starter:hover{
  border-color:#93c5fd;
  background:#f8fbff;
}
.copilot-more-starters{
  width:min(680px,100%);
  margin:2px auto 0;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  text-align:left;
}
.copilot-more-starters summary{
  cursor:pointer;
  list-style:none;
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 14px;
  color:#334155;
  font-size:13px;
  font-weight:800;
}
.copilot-more-starters summary::-webkit-details-marker{display:none}
.copilot-more-starters summary::after{content:"+";font-size:20px;line-height:1;color:#64748b}
.copilot-more-starters[open] summary::after{content:"−"}
.copilot-starter-secondary{
  grid-template-columns:repeat(2,minmax(0,1fr));
  padding:0 12px 12px;
}
.copilot-starter-secondary .copilot-starter{
  min-height:90px;
  background:#f8fafc;
}
.copilot-safety-note{
  border:1px solid #dbeafe;
  background:#eff6ff;
  color:#334155;
  font-size:13px;
  line-height:1.45;
}
.copilot-safety-note strong{color:#1d4ed8}
.copilot-media-status:empty{display:none}
.portal-page-copilot .voice-error[hidden]{display:none!important}
.portal-page-copilot .voice-status[data-state="idle"]{color:#475569}
.portal-page-copilot .voice-toggle,
.portal-page-copilot .voice-stop,
.portal-page-copilot .voice-cancel,
.copilot-media-actions .button,
.send-button{
  min-height:44px;
}
.chat-composer textarea{
  font-size:16px;
  line-height:1.5;
}
.send-button{
  font-weight:800;
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    scroll-behavior:auto!important;
    animation-duration:.001ms!important;
    animation-iteration-count:1!important;
    transition-duration:.001ms!important;
  }
}

@media(max-width:760px){
  /* A single compact Workspace selector replaces the duplicated mobile heading. */
  .portal-page-copilot .topbar{
    min-height:52px;
    padding:6px 10px!important;
    justify-content:flex-end;
    background:#fff;
  }
  .portal-page-copilot .topbar>div{display:none}
  .portal-page-copilot .workspace-form{
    width:100%;
    max-width:none;
    margin:0;
  }
  .portal-page-copilot .workspace-form-label{display:none}
  .portal-page-copilot .workspace-form select{
    width:100%;
    min-height:42px;
    border-radius:12px;
    padding:8px 36px 8px 12px;
    font-size:14px;
    font-weight:700;
    background:#f8fafc;
  }

  /* Short navigation labels prevent the bottom bar from becoming unreadable. */
  .nav-label-desktop{display:none}
  .nav-label-mobile{display:inline}
  .sidebar{
    height:68px;
    padding:6px;
  }
  .sidebar nav{
    grid-template-columns:repeat(5,minmax(0,1fr));
    height:100%;
    align-items:stretch;
  }
  .sidebar .nav-link{
    min-height:52px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:7px 2px;
    font-size:11px;
    font-weight:700;
    line-height:1.15;
    border-radius:12px;
  }

  .copilot-layout.chat-first .chat-panel{
    min-height:calc(100dvh - 120px);
  }
  .copilot-chat-header{
    padding:10px 14px;
    align-items:center;
    border-bottom:1px solid #eef2f7;
  }
  .copilot-chat-header h3{
    font-size:18px;
    margin:0;
  }
  .copilot-chat-header p,
  .copilot-product-kicker{display:none}
  .compact-button{
    min-height:44px;
    padding:8px 12px;
    border-radius:12px;
    font-size:12px;
  }

  /* Leave enough real scrolling room behind the fixed composer. */
  .portal-page-copilot .messages{
    min-height:auto;
    padding:18px 14px 230px;
  }
  .portal-page-copilot .message{
    max-width:90%;
    font-size:15px;
  }

  /* Empty-state choices become three simple, full-width actions. */
  .copilot-welcome{
    margin:0 auto;
    padding:4px 0 16px;
    gap:12px;
    text-align:left;
  }
  .copilot-welcome-copy{
    margin:0!important;
    padding:0 2px;
  }
  .copilot-welcome-copy .eyebrow{
    font-size:10px;
    margin-bottom:4px;
  }
  .copilot-welcome-copy h4{
    font-size:26px;
    line-height:1.18;
    margin:2px 0 8px;
  }
  .copilot-welcome-copy>p:last-child{
    font-size:14px!important;
    line-height:1.5;
    margin:0;
  }
  .copilot-starter-grid,
  .copilot-starter-primary,
  .copilot-starter-secondary{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
    overflow:visible;
    padding:0;
    margin:0;
  }
  .copilot-starter,
  .copilot-starter-primary .copilot-starter,
  .copilot-starter-secondary .copilot-starter{
    min-height:62px;
    width:100%;
    padding:11px 13px;
    border-radius:14px;
    scroll-snap-align:none;
  }
  .copilot-starter strong{
    font-size:15px;
    margin-bottom:2px;
  }
  .copilot-starter span{
    font-size:12px;
    line-height:1.35;
  }
  .copilot-more-starters{
    width:100%;
    margin-top:2px;
  }
  .copilot-more-starters summary{
    min-height:48px;
    font-size:13px;
  }
  .copilot-starter-secondary{
    padding:0 8px 8px;
  }
  .copilot-safety-note{
    margin:2px 0 0;
    padding:10px 12px;
    font-size:12px;
  }

  /* ChatGPT-like fixed composer: always reachable, never the whole screen. */
  .copilot-input-stack{
    position:fixed;
    left:8px;
    right:8px;
    bottom:74px;
    z-index:45;
    width:auto;
    margin:0;
    padding:0;
    border-radius:18px;
    background:#fff;
    box-shadow:0 10px 34px rgba(15,23,42,.18);
  }
  .copilot-media-region{
    padding:7px 9px;
    border:1px solid #dbe3ee;
    border-bottom:0;
    border-radius:18px 18px 0 0;
    background:#fff;
  }
  .copilot-media-toolbar{
    display:block;
  }
  .copilot-media-toolbar>div:first-child{display:none}
  .copilot-media-actions{
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr auto;
    gap:6px;
  }
  .copilot-media-actions .button{
    min-height:44px;
    padding:8px 10px;
    font-size:13px;
    font-weight:700;
    border-radius:11px;
  }
  .copilot-media-preview{
    margin-top:6px;
    max-width:100%;
  }
  .copilot-media-preview-object{
    max-width:110px;
    max-height:76px;
    border-radius:9px;
  }
  .copilot-media-progress{height:4px}
  .copilot-media-status{
    margin:5px 2px 0;
    font-size:11px;
    line-height:1.25;
  }

  .portal-page-copilot .voice-region{
    min-height:48px;
    padding:5px 9px;
    border-left:1px solid #dbe3ee;
    border-right:1px solid #dbe3ee;
    border-top:0;
    border-bottom:0;
    display:flex;
    align-items:center;
    gap:8px;
  }
  .portal-page-copilot .voice-controls{
    order:1;
    display:flex;
    gap:6px;
    flex:0 0 auto;
  }
  .portal-page-copilot .voice-status{
    order:2;
    grid-column:auto;
    flex:1;
    font-size:12px;
    line-height:1.25;
    margin:0;
  }
  .portal-page-copilot .voice-error{
    order:3;
    width:auto;
    font-size:11px;
  }
  .portal-page-copilot .voice-toggle-label{display:inline}
  .portal-page-copilot .voice-toggle,
  .portal-page-copilot .voice-stop,
  .portal-page-copilot .voice-cancel{
    min-height:44px;
    padding:8px 10px;
    font-size:13px;
    border-radius:11px;
  }

  .chat-composer{
    min-height:64px;
    padding:7px;
    gap:6px;
    border:1px solid #cbd5e1;
    border-radius:0 0 18px 18px;
    box-shadow:none;
  }
  .chat-composer textarea{
    min-height:50px;
    max-height:110px;
    padding:9px 8px;
    font-size:16px;
    line-height:1.45;
  }
  .send-button{
    min-width:64px;
    height:48px;
    min-height:48px;
    align-self:end;
    border-radius:13px;
    font-size:13px;
  }
}

@media(max-width:390px){
  .sidebar .nav-link{font-size:10px}
  .copilot-media-actions{
    grid-template-columns:1fr 1fr;
  }
  .copilot-media-actions .button.danger{
    grid-column:1/-1;
  }
}


/* Installable PWA */
.pwa-install-banner{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:1600;
  width:min(420px,calc(100vw - 36px));
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px;
  border:1px solid #cbd5e1;
  border-radius:16px;
  background:#fff;
  color:#0f172a;
  box-shadow:0 18px 54px rgba(15,23,42,.2);
}
.pwa-install-banner[hidden]{display:none!important}
.pwa-install-copy{display:grid;gap:3px;min-width:0}
.pwa-install-copy strong{font-size:14px}
.pwa-install-copy span{font-size:12px;line-height:1.4;color:#64748b}
.pwa-install-actions{display:flex;gap:7px;flex:0 0 auto}
.pwa-install-actions .button{min-height:44px;padding:8px 11px;white-space:nowrap}
@media(max-width:760px){
  .pwa-install-banner{
    left:10px;
    right:10px;
    bottom:80px;
    width:auto;
    align-items:stretch;
    flex-direction:column;
    gap:10px;
  }
  .pwa-install-actions{display:grid;grid-template-columns:1fr 1fr}
  .pwa-install-actions .button{width:100%}
}
@media(display-mode:standalone){
  .pwa-install-banner{display:none!important}
}


/* Y4T conversational identity v5
   Familiar messaging pattern using the official Y4T Mint + Midnight Navy palette. */
.portal-page-copilot{
  --y4t-mint:#2ee6a6;
  --y4t-mint-soft:#dffbef;
  --y4t-mint-bubble:#d9fdd3;
  --y4t-navy:#07111f;
  --y4t-chat-green:#0b7a58;
  --y4t-chat-wall:#efeae2;
  --y4t-chat-line:#d8d2c8;
}
.portal-page-copilot .main-copilot,
.portal-page-copilot .content-shell,
.copilot-layout.chat-first .chat-panel{
  background:var(--y4t-chat-wall);
}
.portal-page-copilot .topbar{
  background:var(--y4t-navy);
  border-bottom-color:rgba(46,230,166,.28);
}
.portal-page-copilot .topbar h1,
.portal-page-copilot .topbar .eyebrow,
.portal-page-copilot .workspace-form-label{color:#fff}
.portal-page-copilot .workspace-form select{
  border-color:rgba(46,230,166,.5);
}
.copilot-chat-header{
  background:var(--y4t-chat-green);
  border-bottom:0;
  color:#fff;
  box-shadow:0 2px 8px rgba(7,17,31,.12);
}
.copilot-chat-header h3,
.copilot-chat-header p{color:#fff}
.copilot-product-kicker{color:var(--y4t-mint)}
.copilot-chat-header .compact-button{
  background:var(--y4t-mint);
  color:var(--y4t-navy);
}
.portal-page-copilot .messages{
  background:
    radial-gradient(circle at 14px 14px,rgba(7,17,31,.025) 1px,transparent 1.5px) 0 0/28px 28px,
    var(--y4t-chat-wall);
}
.portal-page-copilot .message{
  border-radius:9px;
  box-shadow:0 1px 1px rgba(7,17,31,.08);
}
.portal-page-copilot .message.assistant{
  background:#fff;
  color:var(--y4t-navy);
  border-top-left-radius:3px;
}
.portal-page-copilot .message.user{
  background:var(--y4t-mint-bubble);
  color:var(--y4t-navy);
  border-top-right-radius:3px;
}
.portal-page-copilot .message span{color:#64748b}
.copilot-welcome{
  background:rgba(255,255,255,.9);
  border:1px solid rgba(7,17,31,.09);
  border-radius:18px;
  box-shadow:0 3px 14px rgba(7,17,31,.06);
  padding:22px;
}
.copilot-welcome-copy .eyebrow{color:var(--y4t-chat-green)}
.copilot-starter,
.copilot-more-starters{
  border-color:#d9ddd8;
}
.copilot-starter:hover,
.copilot-starter:focus-visible{
  border-color:var(--y4t-chat-green);
  background:#f4fff9;
  box-shadow:0 0 0 3px rgba(46,230,166,.22);
}
.copilot-more-starters summary::after{color:var(--y4t-chat-green)}
.copilot-safety-note{
  background:var(--y4t-mint-soft);
  border-color:rgba(11,122,88,.22);
}
.copilot-safety-note strong{color:#075b43}
.copilot-input-stack{
  background:transparent;
}
.copilot-media-region,
.portal-page-copilot .voice-region,
.chat-composer{
  background:#fff;
  border-color:#d4d8d5;
}
.copilot-media-region{
  border-radius:18px 18px 0 0;
}
.copilot-media-actions .button.secondary,
.portal-page-copilot .voice-toggle{
  background:#eef8f4;
  color:#075b43;
  border:1px solid #cdebe0;
}
.copilot-media-actions .button.secondary:hover,
.portal-page-copilot .voice-toggle:hover{
  background:var(--y4t-mint-soft);
}
.portal-page-copilot .voice-stop{
  background:#fff1f2;
  color:#a3152a;
}
.chat-composer{
  border-radius:0 0 18px 18px;
}
.chat-composer textarea::placeholder{color:#7b827f}
.send-button{
  background:var(--y4t-chat-green);
  color:#fff;
  border-radius:999px;
  min-width:70px;
}
.send-button:hover{background:#086a4d}
.portal-page-copilot .voice-status[data-state="listening"]{color:#075b43}
.portal-page-copilot .voice-status[data-state="transcribing"]{color:#075b43}
.portal-page-copilot .voice-status[data-state="ready_for_review"]{color:#075b43}
.portal-page-copilot .voice-error{
  padding:8px 10px;
  border-radius:9px;
  background:#fff1f2;
  color:#991b1b;
  line-height:1.35;
}
.portal-page-copilot .voice-error[hidden]{display:none!important}
.portal-page-copilot .sidebar{
  background:var(--y4t-navy);
}
.portal-page-copilot .sidebar .nav-link.active{
  background:var(--y4t-mint);
  color:var(--y4t-navy);
}
.portal-page-copilot .sidebar .nav-link:focus-visible,
.portal-page-copilot .button:focus-visible,
.portal-page-copilot .copilot-starter:focus-visible,
.portal-page-copilot textarea:focus-visible,
.portal-page-copilot select:focus-visible{
  outline-color:var(--y4t-mint);
}

@media(max-width:760px){
  .portal-page-copilot .topbar{
    background:var(--y4t-navy);
    border-bottom:0;
    padding:7px 10px!important;
  }
  .portal-page-copilot .workspace-form select{
    background:#fff;
    color:var(--y4t-navy);
    border:1px solid rgba(46,230,166,.65);
  }
  .copilot-chat-header{
    position:sticky;
    top:0;
    padding:10px 14px;
    background:var(--y4t-chat-green);
  }
  .copilot-chat-header h3{font-size:18px}
  .copilot-chat-header .compact-button{
    min-height:42px;
    background:var(--y4t-mint);
    color:var(--y4t-navy);
  }
  .portal-page-copilot .messages{
    padding-top:14px;
  }
  .copilot-welcome{
    margin:0 10px;
    padding:16px;
    background:rgba(255,255,255,.94);
  }
  .copilot-input-stack{
    left:7px;
    right:7px;
    border-radius:18px;
    box-shadow:0 6px 24px rgba(7,17,31,.18);
  }
  .copilot-media-actions .button,
  .portal-page-copilot .voice-toggle,
  .portal-page-copilot .voice-stop,
  .portal-page-copilot .voice-cancel{
    min-height:44px;
  }
  .portal-page-copilot .voice-region{
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    align-items:center;
    gap:7px 9px;
  }
  .portal-page-copilot .voice-controls{
    grid-column:1;
    grid-row:1;
  }
  .portal-page-copilot .voice-status{
    grid-column:2;
    grid-row:1;
    min-width:0;
  }
  .portal-page-copilot .voice-error{
    grid-column:1/-1;
    grid-row:2;
    width:100%;
    margin:0;
    font-size:12px;
  }
  .chat-composer{
    grid-template-columns:minmax(0,1fr) auto;
  }
  .send-button{
    min-width:68px;
    height:48px;
    min-height:48px;
  }
  .portal-page-copilot .sidebar{
    border-top:1px solid rgba(46,230,166,.22);
  }
  .portal-page-copilot .sidebar .nav-link{
    color:#d7e4df;
  }
  .portal-page-copilot .sidebar .nav-link.active{
    background:var(--y4t-mint);
    color:var(--y4t-navy);
    font-weight:850;
  }
}


/* Copilot mobile spacing polish v6
   Tightens vertical rhythm and turns media/voice/message entry into one coherent dock. */
@media(max-width:760px){
  :root{
    --copilot-mobile-page-gap:12px;
    --copilot-mobile-card-radius:16px;
    --copilot-mobile-dock-bottom:74px;
  }

  .portal-page-copilot .content-shell{
    padding:0 0 calc(76px + env(safe-area-inset-bottom,0px));
  }

  .portal-page-copilot .topbar{
    padding:8px 10px!important;
  }

  .portal-page-copilot .workspace-form select{
    min-height:44px;
    border-radius:14px;
    padding:9px 38px 9px 14px;
  }

  .copilot-chat-header{
    padding:10px 14px;
  }

  .portal-page-copilot .messages{
    padding:
      12px
      var(--copilot-mobile-page-gap)
      214px;
    gap:10px;
  }

  .copilot-welcome{
    width:100%;
    margin:0;
    padding:14px;
    gap:10px;
    border-radius:var(--copilot-mobile-card-radius);
  }

  .copilot-welcome-copy{
    padding:0 2px;
  }

  .copilot-welcome-copy h4{
    margin:2px 0 6px;
  }

  .copilot-welcome-copy>p:last-child{
    line-height:1.45;
  }

  .copilot-starter-grid,
  .copilot-starter-primary,
  .copilot-starter-secondary{
    gap:7px;
  }

  .copilot-starter,
  .copilot-starter-primary .copilot-starter,
  .copilot-starter-secondary .copilot-starter{
    min-height:58px;
    padding:10px 12px;
    border-radius:13px;
  }

  .copilot-more-starters{
    margin-top:0;
    border-radius:13px;
  }

  .copilot-more-starters summary{
    min-height:44px;
    padding:9px 12px;
  }

  .copilot-starter-secondary{
    padding:0 7px 7px;
  }

  .copilot-safety-note{
    margin:2px 0 0;
    padding:9px 11px;
    border-radius:12px;
    line-height:1.4;
  }

  .copilot-input-stack{
    left:10px;
    right:10px;
    bottom:calc(var(--copilot-mobile-dock-bottom) + env(safe-area-inset-bottom,0px));
    width:auto;
    padding:6px;
    display:grid;
    gap:0;
    background:#fff;
    border:1px solid rgba(7,17,31,.10);
    border-radius:20px;
    box-shadow:0 8px 28px rgba(7,17,31,.16);
    overflow:hidden;
  }

  .copilot-media-region{
    padding:4px;
    border:0;
    border-radius:14px 14px 0 0;
    background:#fff;
  }

  .copilot-media-actions{
    gap:6px;
  }

  .copilot-media-actions .button{
    min-height:44px;
    padding:8px 10px;
    border-radius:11px;
  }

  /* Idle explanatory copy duplicates the obvious Attach/Camera actions on mobile. */
  .copilot-media-status[data-state="idle"]{
    display:none;
  }

  .copilot-media-status{
    margin:6px 2px 2px;
    padding:0 2px;
    font-size:11px;
    line-height:1.3;
  }

  .copilot-media-preview{
    margin:6px 2px 2px;
  }

  .portal-page-copilot .voice-region{
    min-height:52px;
    padding:5px 4px;
    border:0;
    border-top:1px solid #edf1ee;
    background:#fff;
    gap:7px;
  }

  .portal-page-copilot .voice-controls{
    gap:6px;
  }

  .portal-page-copilot .voice-toggle,
  .portal-page-copilot .voice-stop,
  .portal-page-copilot .voice-cancel{
    min-height:44px;
    padding:8px 11px;
    border-radius:11px;
  }

  .portal-page-copilot .voice-status{
    font-size:11px;
    line-height:1.3;
  }

  .portal-page-copilot .voice-status[data-state="idle"]{
    color:#65706b;
  }

  .portal-page-copilot .voice-error{
    margin:2px 0 0;
    padding:7px 9px;
  }

  .chat-composer{
    min-height:58px;
    padding:6px 4px 4px;
    gap:6px;
    border:0;
    border-top:1px solid #edf1ee;
    border-radius:0 0 14px 14px;
    box-shadow:none;
  }

  .chat-composer textarea{
    height:48px;
    min-height:48px;
    max-height:104px;
    padding:10px 8px;
    border-radius:10px;
    line-height:1.4;
  }

  .send-button{
    min-width:66px;
    height:46px;
    min-height:46px;
    margin:1px 1px 1px 0;
    padding:8px 13px;
  }

  .sidebar{
    height:calc(68px + env(safe-area-inset-bottom,0px));
    padding:6px 6px max(6px,env(safe-area-inset-bottom,0px));
  }

  .sidebar .nav-link{
    min-height:50px;
  }
}

@media(max-width:390px){
  .portal-page-copilot .messages{
    padding-left:10px;
    padding-right:10px;
  }

  .copilot-input-stack{
    left:7px;
    right:7px;
    padding:5px;
  }

  .copilot-welcome{
    padding:12px;
  }

  .copilot-media-actions{
    grid-template-columns:1fr 1fr;
  }
}


/* Copilot mobile micro-polish v7 */
.copilot-tools-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  padding:8px;
  background:#fff;
  border:1px solid #d9dfdc;
  border-bottom:0;
  border-radius:18px 18px 0 0;
}
.copilot-tools-row .copilot-media-region,
.copilot-tools-row .voice-region{
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  min-height:0;
}
.copilot-tool-feedback{
  background:#fff;
  border-left:1px solid #d9dfdc;
  border-right:1px solid #d9dfdc;
  padding:0 10px;
}
.copilot-tool-feedback .voice-status,
.copilot-tool-feedback .copilot-media-status{margin:0}
.copilot-tool-feedback .voice-status[data-state="idle"],
.copilot-tool-feedback .copilot-media-status[data-state="idle"],
.copilot-media-limits{display:none}
.copilot-tool-feedback .voice-status:not([data-state="idle"]),
.copilot-tool-feedback .copilot-media-status:not([data-state="idle"]){
  padding:7px 8px;
  margin:4px 0;
  border-radius:9px;
  background:#f4fbf8;
}
.copilot-media-remove{
  margin:6px 0 2px;
  min-height:40px;
}
.chat-composer{
  border:1px solid #d9dfdc;
  border-top:0;
}
.chat-composer:focus-within{
  box-shadow:0 0 0 2px rgba(46,230,166,.35);
}
.chat-composer textarea:focus-visible{outline:none}

@media(max-width:760px){
  .copilot-input-stack{
    left:8px;
    right:8px;
    padding:5px;
    border-radius:18px;
  }

  .copilot-tools-row{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:5px;
    padding:5px;
    border-radius:14px 14px 0 0;
  }

  .copilot-tools-row .copilot-media-region,
  .copilot-tools-row .voice-region,
  .copilot-tools-row .copilot-media-actions,
  .copilot-tools-row .voice-controls{
    display:contents;
  }

  .copilot-tools-row .button{
    width:100%;
    min-height:44px;
    padding:7px 6px;
    border-radius:11px;
    font-size:12px;
    font-weight:750;
    gap:4px;
  }

  .copilot-tools-row .button span[aria-hidden="true"]{
    font-size:15px;
  }

  .copilot-tool-feedback{
    padding:0 6px;
  }

  .copilot-tool-feedback .voice-status:not([data-state="idle"]),
  .copilot-tool-feedback .copilot-media-status:not([data-state="idle"]){
    font-size:11px;
    line-height:1.3;
    padding:6px 7px;
    margin:3px 0;
  }

  .copilot-media-remove{
    width:100%;
    min-height:38px;
    margin:4px 0 2px;
    font-size:11px;
  }

  .chat-composer{
    min-height:56px;
    padding:5px;
    gap:5px;
    border-radius:0 0 14px 14px;
    align-items:center;
  }

  .chat-composer textarea{
    height:46px;
    min-height:46px;
    max-height:96px;
    padding:11px 10px;
    border-radius:12px;
  }

  .send-button{
    min-width:68px;
    height:46px;
    min-height:46px;
    margin:0;
    border-radius:23px;
    padding:8px 12px;
  }

  .sidebar{
    height:62px;
    transition:transform .16s ease,opacity .16s ease;
  }

  .sidebar .nav-link{
    min-height:46px;
    border-radius:10px;
    color:#c8d5d0;
  }

  .portal-page-copilot .sidebar .nav-link.active{
    background:rgba(46,230,166,.12);
    color:var(--y4t-mint);
    box-shadow:inset 0 2px 0 var(--y4t-mint);
  }

  body:has(#copilot-message:focus){
    padding-bottom:0;
  }

  body:has(#copilot-message:focus) .sidebar,
  body.copilot-send-pressing .sidebar{
    transform:translateY(110%);
    opacity:0;
    pointer-events:none;
  }

  body:has(#copilot-message:focus) .copilot-input-stack,
  body.copilot-send-pressing .copilot-input-stack{
    bottom:calc(6px + env(safe-area-inset-bottom,0px));
  }

  .copilot-input-stack:has(.voice-status[data-state="listening"]) .copilot-media-region,
  .copilot-input-stack:has(.voice-status[data-state="transcribing"]) .copilot-media-region{
    display:none;
  }

  .copilot-input-stack:has(.voice-status[data-state="listening"]) .copilot-tools-row,
  .copilot-input-stack:has(.voice-status[data-state="transcribing"]) .copilot-tools-row{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}


/* Copilot composer edge-spacing v8 */
@media(max-width:760px){
  .chat-composer{
    padding-left:8px;
    padding-right:7px;
  }

  .chat-composer textarea{
    padding-left:14px;
    padding-right:14px;
  }

  .send-button{
    margin-left:2px;
    margin-right:3px;
  }
}


/* Copilot unified composer boundary v9 */
@media(max-width:760px){
  .chat-composer{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:6px;
    padding:5px 6px 5px 10px;
    border:2px solid #d9dfdc;
    border-radius:16px;
    background:#fff;
    box-shadow:none;
    overflow:hidden;
  }

  .chat-composer:focus-within{
    border-color:var(--y4t-mint);
    box-shadow:0 0 0 2px rgba(46,230,166,.16);
  }

  .chat-composer textarea,
  .chat-composer textarea:focus,
  .chat-composer textarea:focus-visible{
    width:100%;
    min-width:0;
    margin:0;
    padding:10px 6px 10px 4px;
    border:0;
    outline:0;
    box-shadow:none;
    background:transparent;
  }

  .send-button{
    position:static;
    flex:none;
    justify-self:end;
    align-self:center;
    min-width:72px;
    height:46px;
    min-height:46px;
    margin:0;
    border-radius:23px;
  }
}


/* Copilot textarea-to-container spacing v10 */
@media(max-width:760px){
  .chat-composer{
    padding:10px 12px 10px 14px;
    column-gap:10px;
  }

  .chat-composer textarea,
  .chat-composer textarea:focus,
  .chat-composer textarea:focus-visible{
    padding:8px 10px;
  }
}


/* Copilot visible composer inset v11 */
@media(max-width:760px){
  .portal-page-copilot .copilot-input-stack{
    padding:8px;
  }

  .portal-page-copilot .chat-composer{
    width:calc(100% - 12px);
    justify-self:center;
    margin:0 6px 6px;
    padding:10px 12px 10px 14px;
    box-sizing:border-box;
  }

  .portal-page-copilot .chat-composer textarea,
  .portal-page-copilot .chat-composer textarea:focus,
  .portal-page-copilot .chat-composer textarea:focus-visible{
    width:auto;
    min-width:0;
    margin-left:8px;
    margin-right:0;
    padding-left:10px;
    padding-right:10px;
    box-sizing:border-box;
  }
}


/* Copilot optimistic send feedback v12 */
.copilot-optimistic-message{animation:copilot-message-enter .14s ease-out}
.copilot-typing{min-width:86px}
.copilot-typing .copilot-typing-dots{
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:18px;
  margin:0;
  padding:2px 0;
}
.copilot-typing-dot{
  display:inline-block;
  width:8px;
  height:8px;
  border-radius:999px;
  background:currentColor;
  opacity:.34;
  animation:copilot-typing-pulse 1s infinite ease-in-out;
}
.copilot-typing-dot:nth-child(2){animation-delay:.14s}
.copilot-typing-dot:nth-child(3){animation-delay:.28s}
.chat-composer[aria-busy="true"] .send-button{cursor:wait;opacity:.72}
.chat-composer[aria-busy="true"] textarea{cursor:wait}

@keyframes copilot-message-enter{
  from{opacity:.3;transform:translateY(4px)}
  to{opacity:1;transform:translateY(0)}
}
@keyframes copilot-typing-pulse{
  0%,60%,100%{opacity:.28;transform:translateY(0)}
  30%{opacity:.9;transform:translateY(-3px)}
}
@media (prefers-reduced-motion:reduce){
  .copilot-optimistic-message,
  .copilot-typing-dot{animation:none!important;transform:none!important}
  .copilot-typing-dot{opacity:.55}
}


/* Copilot persistent in-flight feedback + message media v13 */
.portal-page-copilot .send-button,
.portal-page-copilot .compact-button{
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
.portal-page-copilot .send-button[aria-busy="true"],
.portal-page-copilot .compact-button[aria-busy="true"]{
  cursor:wait;
  opacity:.72;
}
.copilot-message-media{
  width:76px;
  height:76px;
  margin:8px 0 7px;
  border-radius:10px;
  overflow:hidden;
  border:1px solid rgba(7,17,31,.12);
  background:#fff;
  box-shadow:0 1px 3px rgba(7,17,31,.08);
}
.copilot-message-media img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}
.copilot-message-media-chip{
  display:inline-flex;
  align-items:center;
  gap:5px;
  margin:8px 0 7px;
  padding:6px 8px;
  border:1px solid rgba(7,17,31,.12);
  border-radius:9px;
  background:rgba(255,255,255,.72);
  font-size:12px;
  font-weight:700;
}
.copilot-local-status p,
.copilot-local-error p{
  margin-bottom:0;
}
.copilot-local-error{
  border-left:3px solid #b42318;
}
.copilot-resetting{
  opacity:.86;
}
.portal-page-copilot .messages[aria-busy="true"]{
  cursor:progress;
}

@media(max-width:760px){
  .copilot-message-media{
    width:68px;
    height:68px;
  }
}


/* Copilot mobile conversation clearance v14 */
.copilot-welcome[hidden]{display:none!important}
@media(max-width:760px){
  .portal-page-copilot .messages{
    padding-bottom:calc(var(--copilot-composer-height, 190px) + 92px)!important;
    scroll-padding-bottom:calc(var(--copilot-composer-height, 190px) + 92px);
  }
  .portal-page-copilot .message:last-child{
    scroll-margin-bottom:calc(var(--copilot-composer-height, 190px) + 92px);
  }
}


.approval-next-step{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:14px 0;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--surface-soft)}
.approval-next-step p{margin:4px 0 0;color:var(--muted)}
@media (max-width:760px){.approval-next-step{align-items:stretch;flex-direction:column}.approval-next-step .button{width:100%;text-align:center}}


body.portal-navigating::before{content:"";position:fixed;top:0;left:0;right:0;height:3px;z-index:9999;background:currentColor;transform-origin:left;animation:portal-nav-progress 1.2s ease-in-out infinite}
body.portal-navigating .sidebar a[aria-busy="true"]{pointer-events:none;opacity:.65}
@keyframes portal-nav-progress{0%{transform:scaleX(.08)}50%{transform:scaleX(.72)}100%{transform:scaleX(.96)}}
@media (prefers-reduced-motion:reduce){body.portal-navigating::before{animation:none;transform:scaleX(.7)}}


/* Mobile full navigation drawer v2
   Native <details> disclosure is the functional baseline so the menu still
   opens if an installed PWA temporarily serves stale JavaScript. */
.mobile-menu-disclosure{display:none}

@media(max-width:760px){
  .topbar{
    display:flex;
    flex-direction:row;
    align-items:center;
    gap:8px;
  }

  .topbar>div{display:none}
  .workspace-form,
  .portal-page-copilot .workspace-form{
    flex:1 1 auto;
    width:auto;
    max-width:none;
    min-width:0;
    margin:0;
  }
  .workspace-form-label,
  .portal-page-copilot .workspace-form-label{display:none}
  .workspace-form select,
  .portal-page-copilot .workspace-form select{
    width:100%;
    min-width:0;
  }

  .mobile-menu-disclosure{
    position:relative;
    display:block;
    flex:0 0 auto;
  }
  .mobile-menu-disclosure>summary{
    list-style:none;
  }
  .mobile-menu-disclosure>summary::-webkit-details-marker{display:none}

  .mobile-menu-toggle{
    min-height:44px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    padding:8px 12px;
    border:1px solid #cbd5e1;
    border-radius:12px;
    background:#fff;
    color:#172033;
    font:inherit;
    font-size:13px;
    font-weight:800;
    cursor:pointer;
    white-space:nowrap;
    user-select:none;
  }
  .mobile-menu-disclosure[open]>.mobile-menu-toggle{
    border-color:var(--accent);
    box-shadow:0 0 0 3px rgba(37,99,235,.12);
  }
  .mobile-menu-icon{font-size:18px;line-height:1}

  .portal-page-copilot .mobile-menu-toggle{
    border-color:rgba(46,230,166,.65);
    background:#fff;
    color:var(--y4t-navy);
  }
  .portal-page-copilot .mobile-menu-disclosure[open]>.mobile-menu-toggle{
    border-color:var(--y4t-mint);
    box-shadow:0 0 0 3px rgba(46,230,166,.2);
  }

  .mobile-menu-drawer{
    display:none;
  }
  .mobile-menu-disclosure[open]>.mobile-menu-drawer{
    display:flex;
    position:fixed;
    z-index:150;
    top:60px;
    right:10px;
    bottom:calc(70px + env(safe-area-inset-bottom,0px));
    width:min(360px,calc(100vw - 20px));
    flex-direction:column;
    background:#fff;
    color:var(--ink);
    border:1px solid var(--line);
    border-radius:16px;
    box-shadow:0 24px 64px rgba(2,6,23,.28);
    padding:14px;
    overflow-y:auto;
    overscroll-behavior:contain;
  }

  .mobile-menu-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:4px 4px 14px;
    border-bottom:1px solid var(--line);
  }
  .mobile-menu-header strong{
    display:block;
    margin-top:3px;
    font-size:17px;
  }
  .mobile-menu-close{
    width:44px;
    height:44px;
    flex:0 0 44px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#f8fafc;
    color:#334155;
    font-size:28px;
    line-height:1;
    cursor:pointer;
  }

  .mobile-menu-nav{
    display:grid;
    gap:18px;
    padding:14px 0 4px;
  }
  .mobile-menu-section{
    display:grid;
    gap:4px;
  }
  .mobile-menu-section-label{
    padding:5px 10px;
    color:#64748b;
    font-size:10px;
    font-weight:900;
    letter-spacing:.11em;
    text-transform:uppercase;
  }
  .mobile-menu-drawer .mobile-menu-link{
    display:flex;
    align-items:center;
    min-height:44px;
    padding:10px 12px;
    border-radius:11px;
    color:#334155;
    font-size:14px;
    font-weight:700;
  }
  .mobile-menu-drawer .mobile-menu-link:hover,
  .mobile-menu-drawer .mobile-menu-link:focus-visible{
    background:#f1f5f9;
    color:#0f172a;
    text-decoration:none;
  }
  .mobile-menu-drawer .mobile-menu-link.active{
    background:#e8f8f1;
    color:#075b43;
    box-shadow:inset 3px 0 0 #0b7a58;
  }
  .mobile-menu-account{
    padding-top:12px;
    border-top:1px solid var(--line);
  }
  body.mobile-menu-open{overflow:hidden}
}

@media(max-width:390px){
  .mobile-menu-toggle{
    width:44px;
    padding:8px;
  }
  .mobile-menu-toggle span:last-child{display:none}
  .mobile-menu-disclosure[open]>.mobile-menu-drawer{
    right:6px;
    width:calc(100vw - 12px);
  }
}


/* Copilot continuous voice session v15 */
.portal-page-copilot .voice-mute{min-height:36px;padding:7px 10px;font-size:12px;background:#e8f0ec;color:#163b30}
.portal-page-copilot .voice-session-active .voice-controls{gap:8px}
.portal-page-copilot .voice-live-indicator{display:none;width:9px;height:9px;border-radius:999px;background:#17a673;box-shadow:0 0 0 4px rgba(23,166,115,.12)}
.portal-page-copilot .voice-session-active .voice-live-indicator{display:inline-block}
.portal-page-copilot .voice-session-muted .voice-live-indicator{background:#94a3b8;box-shadow:0 0 0 4px rgba(148,163,184,.14)}
.portal-page-copilot .voice-status[data-state="requesting_permission"],
.portal-page-copilot .voice-status[data-state="thinking"],
.portal-page-copilot .voice-status[data-state="working"],
.portal-page-copilot .voice-status[data-state="speaking"]{color:#075b43}
.portal-page-copilot .voice-status[data-state="needs_attention"]{color:var(--danger)}
.portal-page-copilot .copilot-voice-live-message{animation:voice-message-in .16s ease-out}
@keyframes voice-message-in{from{opacity:.45;transform:translateY(3px)}to{opacity:1;transform:none}}
@media(max-width:760px){
  .portal-page-copilot .voice-mute,
  .portal-page-copilot .voice-stop{min-height:36px;padding:7px 9px;font-size:11px}
  .portal-page-copilot .voice-session-active .voice-toggle{display:none}
}
@media (prefers-reduced-motion:reduce){
  .portal-page-copilot .copilot-voice-live-message{animation:none}
}


/* Copilot inline canonical workflow card v1 */
.copilot-workflow-card{
  margin-top:14px;
  border:1px solid var(--line,#d8dee8);
  border-radius:18px;
  background:var(--surface,#fff);
  padding:16px;
  box-shadow:0 8px 24px rgba(15,23,42,.06);
  color:var(--ink,#172033);
}
.copilot-workflow-header,.copilot-workflow-channel-top,.copilot-workflow-actions{
  display:flex;
  gap:12px;
  align-items:flex-start;
  justify-content:space-between;
}
.copilot-workflow-header h4{margin:2px 0 4px;font-size:1.05rem}
.copilot-workflow-header p{margin:0}
.copilot-workflow-state{
  flex:0 0 auto;
  border-radius:999px;
  padding:6px 10px;
  background:rgba(37,99,235,.1);
  font-size:.78rem;
  font-weight:700;
}
.copilot-workflow-channels{display:grid;gap:12px;margin-top:14px}
.copilot-workflow-channel{
  border:1px solid var(--line,#d8dee8);
  border-radius:14px;
  padding:14px;
  background:rgba(248,250,252,.78);
}
.copilot-workflow-channel-top strong{display:block}
.copilot-workflow-destination{display:block;margin-top:3px;font-size:.82rem;color:var(--muted,#64748b)}
.copilot-workflow-channel-status{text-align:right}
.copilot-workflow-channel-status span{display:block;font-size:.82rem;font-weight:700}
.copilot-workflow-channel-status small{display:block;margin-top:3px;color:var(--muted,#64748b)}
.copilot-workflow-preview{
  margin-top:12px;
  border-radius:12px;
  overflow:hidden;
  background:#0f172a;
  max-height:360px;
}
.copilot-workflow-preview img,.copilot-workflow-preview video{
  display:block;
  width:100%;
  max-height:360px;
  object-fit:contain;
}
.copilot-workflow-copy,.copilot-workflow-alt{margin-top:12px}
.copilot-workflow-copy>span,.copilot-workflow-alt>span{
  display:block;
  margin-bottom:4px;
  font-size:.74rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--muted,#64748b);
}
.copilot-workflow-copy p,.copilot-workflow-alt p{margin:0;white-space:normal}
.copilot-workflow-safe-message{
  margin:10px 0 0;
  padding:9px 10px;
  border-radius:10px;
  background:rgba(245,158,11,.11);
  font-size:.84rem;
}
.copilot-workflow-authority{
  margin:8px 0 0;
  padding:9px 10px;
  border-radius:10px;
  background:rgba(37,99,235,.08);
  color:var(--muted,#475569);
  font-size:.82rem;
}
.copilot-workflow-select{
  display:flex;
  gap:8px;
  align-items:center;
  margin-top:12px;
  font-size:.86rem;
  font-weight:650;
}
.copilot-workflow-select input{width:18px;height:18px}
.copilot-workflow-actions{margin-top:14px;justify-content:flex-start;flex-wrap:wrap}
.copilot-workflow-note{margin:10px 0 0;color:var(--muted,#64748b);font-size:.8rem}
.copilot-workflow-technical{margin-top:12px}
.copilot-workflow-technical summary{cursor:pointer;font-weight:650;font-size:.84rem}
.copilot-workflow-technical dl{
  display:grid;
  grid-template-columns:max-content 1fr;
  gap:6px 12px;
  margin:10px 0 0;
  font-size:.78rem;
}
.copilot-workflow-technical dt{font-weight:700}
.copilot-workflow-technical dd{margin:0;color:var(--muted,#64748b)}
.copilot-workflow-unavailable{
  margin-top:10px;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(245,158,11,.1);
  font-size:.82rem;
}
.copilot-workflow-card[data-workflow-stale="1"]{
  border-color:rgba(245,158,11,.7);
}
.copilot-workflow-card[data-workflow-busy="1"]{
  opacity:.86;
}
@media (max-width:680px){
  .copilot-workflow-card{padding:12px;border-radius:14px}
  .copilot-workflow-header,.copilot-workflow-channel-top{gap:8px}
  .copilot-workflow-header{align-items:flex-start}
  .copilot-workflow-channel-status{max-width:45%}
  .copilot-workflow-actions{display:grid;grid-template-columns:1fr}
  .copilot-workflow-actions .button{width:100%;text-align:center}
  .copilot-workflow-technical dl{grid-template-columns:1fr;gap:3px}
  .copilot-workflow-technical dd{margin-bottom:6px}
}


/* Copilot conversation history v1 */
.portal-page-copilot-history .content-shell{max-width:980px;margin:0 auto}
.copilot-history-list{gap:14px}
.copilot-history-conversation{padding:0;overflow:hidden}
.copilot-history-conversation>summary{
  list-style:none;cursor:pointer;padding:16px 18px;display:flex;align-items:center;
  justify-content:space-between;gap:12px
}
.copilot-history-conversation>summary::-webkit-details-marker{display:none}
.copilot-history-conversation>summary::after{content:"›";font-size:24px;color:var(--muted);transition:transform .15s ease}
.copilot-history-conversation[open]>summary::after{transform:rotate(90deg)}
.copilot-history-conversation>summary span{display:grid;gap:4px;min-width:0}
.copilot-history-conversation>summary strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.copilot-history-conversation>summary small{color:var(--muted);font-size:12px;font-weight:600}
.copilot-history-messages{min-height:0;padding:8px 18px 18px;border-top:1px solid var(--line)}
.copilot-history-messages .message{width:fit-content;max-width:min(78%,680px);border-radius:18px}
.copilot-history-messages .message.user{margin-left:auto;background:#eef2ff}
.copilot-history-messages .message.assistant{margin-right:auto;background:#f8fafc}
.copilot-request-receipts>summary{cursor:pointer;display:flex;justify-content:space-between;gap:12px;align-items:center}
.copilot-request-receipts[open]>summary{margin-bottom:16px}
.copilot-request-receipt{padding:14px 0;border-top:1px solid var(--line)}
.copilot-request-receipt:first-of-type{border-top:0}
@media(max-width:760px){
  .portal-page-copilot-history .content-shell{padding-bottom:84px}
  .copilot-history-conversation>summary{padding:14px}
  .copilot-history-messages{padding:8px 12px 14px}
  .copilot-history-messages .message{max-width:88%;font-size:14px}
  .copilot-request-receipts>summary{align-items:flex-start;flex-direction:column}
}


/* Durable Copilot conversation archive v2 */
.copilot-history-browser{display:grid;grid-template-columns:minmax(260px,320px) minmax(0,1fr);gap:16px;align-items:start}
.copilot-history-sidebar{position:sticky;top:88px;max-height:calc(100dvh - 118px);overflow:auto}
.copilot-history-chat-list{display:grid;gap:8px}
.copilot-history-chat-link{
  display:grid;gap:4px;padding:12px;border:1px solid var(--line);border-radius:12px;
  text-decoration:none;color:var(--ink);background:#fff
}
.copilot-history-chat-link:hover{background:#f8fafc}
.copilot-history-chat-link.active{border-color:#94a3b8;background:#f1f5f9}
.copilot-history-chat-link strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.copilot-history-chat-link span{font-size:12px;color:var(--muted);line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.copilot-history-chat-link small{font-size:10px;color:var(--muted)}
.copilot-history-transcript{min-width:0}
.copilot-history-transcript .panel-heading{margin-bottom:12px}
.copilot-history-message-pagination,.copilot-history-pagination{margin-top:12px}
@media(max-width:760px){
  .copilot-history-browser{display:block}
  .copilot-history-sidebar{position:static;max-height:none;margin-bottom:14px}
  .copilot-history-chat-list{display:flex;overflow-x:auto;gap:8px;scroll-snap-type:x mandatory;padding-bottom:4px}
  .copilot-history-chat-link{flex:0 0 82%;scroll-snap-align:start}
  .copilot-history-transcript{padding:14px}
}
