:root {
  --blue: #1769e0;
  --blue-dark: #0b4fb4;
  --blue-soft: #eaf3ff;
  --navy: #0b1f3a;
  --text: #203149;
  --muted: #718096;
  --line: #dfe8f2;
  --line-strong: #cbd9e8;
  --surface: #ffffff;
  --canvas: #f4f8fc;
  --success: #0f9f6e;
  --warning: #d97706;
  --danger: #d43f4d;
  --marker-red: #ffe2e7;
  --marker-red-text: #b4233d;
  --marker-orange: #fff0d2;
  --marker-orange-text: #805000;
  --marker-blue: #dceeff;
  --marker-blue-text: #145ca8;
  --shadow: 0 14px 40px rgba(21, 53, 91, .09);
  --font: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; color: var(--text); background: var(--canvas); font-family: var(--font); }
body { min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 7px; color: var(--blue); font-size: 11px; font-weight: 750; letter-spacing: .14em; }
.toast { position: fixed; z-index: 100; top: 24px; left: 50%; transform: translate(-50%, -15px); padding: 11px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--navy); color: white; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.auth-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.1fr) minmax(380px, .9fr); background: white; }
.auth-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 8vw; background: #eaf3ff; }
.auth-brand::before, .auth-brand::after { content: ""; position: absolute; border: 1px solid rgba(23,105,224,.12); border-radius: 50%; }
.auth-brand::before { width: 520px; height: 520px; right: -220px; top: -180px; }
.auth-brand::after { width: 280px; height: 280px; left: -130px; bottom: -100px; }
.auth-avatar { width: 78px; height: 78px; border-radius: 24px; object-fit: cover; border: 6px solid rgba(255,255,255,.8); box-shadow: 0 18px 40px rgba(23,105,224,.18); margin-bottom: 28px; }
.auth-brand h1 { max-width: 610px; margin: 0; font-size: clamp(40px, 4vw, 60px); line-height: 1.08; letter-spacing: -.045em; color: var(--navy); }
.auth-lead { max-width: 540px; margin: 26px 0; color: #506987; font-size: 18px; line-height: 1.8; }
.auth-points { display: flex; flex-wrap: wrap; gap: 10px; }
.auth-points span { padding: 8px 12px; border: 1px solid rgba(23,105,224,.18); border-radius: 999px; color: var(--blue-dark); background: rgba(255,255,255,.65); font-size: 13px; }
.auth-card { width: min(420px, 78%); align-self: center; justify-self: center; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.auth-tab { padding: 13px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); }
.auth-tab.active { color: var(--blue); border-color: var(--blue); font-weight: 700; }
.auth-form { display: grid; gap: 17px; }
label { display: grid; gap: 8px; color: #526276; font-size: 13px; font-weight: 650; }
input, textarea, select { width: 100%; border: 1px solid var(--line-strong); border-radius: 9px; padding: 11px 12px; outline: none; color: var(--navy); background: white; transition: border .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,224,.10); }
textarea { min-height: 120px; resize: vertical; line-height: 1.7; }
.primary-button, .ghost-button, .text-button, .icon-button { border-radius: 9px; padding: 10px 14px; font-weight: 700; border: 1px solid transparent; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.primary-button { color: white; background: var(--blue); box-shadow: 0 8px 20px rgba(23,105,224,.17); }
.primary-button:hover { background: var(--blue-dark); }
.compliance-lock-block .primary-button:disabled { cursor: not-allowed; color: #a0404b; background: rgba(255,255,255,.46); box-shadow: none; opacity: 1; }
.ghost-button { color: var(--blue-dark); background: white; border-color: var(--line-strong); }
.ghost-button:hover { border-color: var(--blue); background: var(--blue-soft); }
.text-button { color: var(--muted); background: transparent; }
.text-button:hover { color: var(--navy); background: #edf3f8; }
.icon-button { min-width: 38px; padding: 8px; color: var(--blue); background: var(--blue-soft); }
.full { width: 100%; }
.auth-note { margin: 20px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

.app-shell { display: grid; grid-template-columns: 246px minmax(600px, 1fr) 310px; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 15px 16px; border-right: 1px solid var(--line); background: white; }
.brand-lockup { display: flex; align-items: center; gap: 11px; padding: 0 8px 20px; }
.brand-lockup img { width: 42px; height: 42px; object-fit: cover; border-radius: 13px; }
.brand-lockup div { display: grid; gap: 2px; }
.brand-lockup strong { color: var(--navy); font-size: 15px; }
.brand-lockup span { color: var(--muted); font-size: 12px; }
.new-task { width: 100%; margin-bottom: 18px; padding: 11px; border: 1px solid var(--blue); border-radius: 9px; background: var(--blue); color: white; font-weight: 700; }
.main-nav { display: grid; gap: 3px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 11px; border: 0; border-radius: 8px; background: transparent; color: #56687e; text-align: left; }
.nav-item svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.nav-item:hover { color: var(--navy); background: #f1f5f9; }
.nav-item.active { color: var(--blue-dark); background: var(--blue-soft); font-weight: 700; }
.sidebar-foot { margin-top: auto; }
.quota-block { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #f9fbfd; margin-bottom: 10px; }
.quota-block > div:not(.quota-line) { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: 11px; }
.quota-block strong { color: var(--navy); font-size: 13px; }
.quota-line { height: 4px; margin: 6px 0 11px; overflow: hidden; border-radius: 3px; background: #dfe8f1; }
.quota-line i { display: block; height: 100%; width: 50%; background: var(--blue); border-radius: inherit; }

.workspace { min-width: 0; background: var(--canvas); }
.workspace-header { height: 82px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.93); }
.workspace-header h2 { margin: 0; color: var(--navy); font-size: 23px; letter-spacing: -.02em; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 13px; border: 1px solid var(--line); border-radius: 999px; color: #526276; font-size: 12px; background: white; }
.user-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(15,159,110,.12); }
.workspace-content { min-height: calc(100vh - 82px); padding: 28px 34px; }
.context-panel { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 26px 21px; border-left: 1px solid var(--line); background: #f9fbfd; }
.context-head { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.context-head h3 { margin: 0; color: var(--navy); font-size: 16px; }
.context-content { display: grid; gap: 12px; margin-top: 18px; }
.context-card { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.context-card h4 { margin: 0 0 8px; color: var(--navy); font-size: 13px; }
.context-card p, .context-card li { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.context-card ul { margin: 0; padding-left: 18px; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.status-pill { padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 750; color: var(--blue-dark); background: var(--blue-soft); }

.welcome { max-width: 760px; margin: 7vh auto 0; text-align: center; }
.agent-mark { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 20px; object-fit: cover; box-shadow: 0 12px 30px rgba(23,105,224,.18); }
.welcome h3 { margin: 0; color: var(--navy); font-size: 30px; letter-spacing: -.035em; }
.welcome > p { margin: 12px auto 25px; max-width: 580px; color: var(--muted); line-height: 1.75; }
.prompt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; }
.prompt-card { padding: 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: white; }
.prompt-card:hover { border-color: #a7c7ee; box-shadow: 0 8px 22px rgba(21,53,91,.06); }
.prompt-card strong { display: block; margin-bottom: 5px; color: var(--navy); font-size: 13px; }
.prompt-card span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.chat-layout { min-height: calc(100vh - 138px); display: flex; flex-direction: column; max-width: 820px; margin: 0 auto; }
.messages { display: grid; gap: 18px; padding-bottom: 150px; }
.message { display: grid; grid-template-columns: 34px 1fr; gap: 11px; align-items: start; }
.message.user { grid-template-columns: 1fr; justify-items: end; }
.message-avatar { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; }
.message-bubble { max-width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 4px 13px 13px 13px; background: white; color: #273a52; line-height: 1.8; white-space: pre-wrap; }
.message.user .message-bubble { max-width: 78%; border-color: #cfe1f7; border-radius: 13px 4px 13px 13px; background: var(--blue-soft); }
.composer { position: sticky; bottom: 14px; display: grid; grid-template-columns: 1fr auto; gap: 9px; padding: 9px; border: 1px solid var(--line-strong); border-radius: 13px; background: white; box-shadow: 0 16px 36px rgba(21,53,91,.12); }
.composer textarea { min-height: 54px; max-height: 160px; border: 0; box-shadow: none; resize: none; padding: 8px; }
.composer button { align-self: end; width: 42px; height: 42px; padding: 0; }

.view-intro { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.view-intro h3 { margin: 0 0 7px; color: var(--navy); font-size: 22px; }
.view-intro p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.panel { border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 7px 26px rgba(21,53,91,.035); }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { margin: 0; color: var(--navy); font-size: 17px; }
.panel-head small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.panel-body { padding: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 20px; }
.span-2 { grid-column: span 2; }
.link-analyzer { display: grid; grid-template-columns: 1fr auto auto; gap: 9px; }
.link-analyzer input { min-width: 0; }
.notice { padding: 12px 14px; border-left: 3px solid var(--blue); background: var(--blue-soft); color: #48627f; font-size: 12px; line-height: 1.65; }
.item-list { display: grid; gap: 9px; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.list-item:hover { border-color: #b6cee9; }
.list-main { min-width: 0; }
.list-main strong { display: block; overflow: hidden; color: var(--navy); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.list-main p { margin: 5px 0 0; overflow-wrap: anywhere; word-break: break-word; color: var(--muted); font-size: 12px; }
.list-actions { display: flex; gap: 7px; flex-shrink: 0; }
.mini-button { border: 1px solid var(--line-strong); border-radius: 7px; padding: 7px 9px; color: var(--blue-dark); background: white; font-size: 11px; font-weight: 700; }
.result-block { margin-top: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.result-block pre { max-height: 520px; overflow: auto; white-space: pre-wrap; word-break: break-word; color: #344b66; font: 12px/1.75 var(--font); }
.compliance-lock-block { margin-top: 16px; padding: 14px 16px; border-left: 3px solid var(--danger); border-radius: 0 9px 9px 0; color: var(--marker-red-text); background: var(--marker-red); }
.compliance-lock-block p { margin: 6px 0 12px; color: #8d3340; line-height: 1.65; }
.analysis-report { padding: 0; overflow: visible; scroll-behavior: smooth; }
.report-hero { display: grid; grid-template-columns: 180px 1fr; gap: 22px; padding: 22px; border-radius: 9px 9px 0 0; background: #f4f8fd; border-bottom: 1px solid var(--line); }
.report-cover { aspect-ratio: 9 / 13; overflow: hidden; border-radius: 10px; background: #dce8f5; box-shadow: 0 8px 24px rgba(20,54,94,.12); }
.report-cover img { width: 100%; height: 100%; object-fit: cover; }
.report-cover-placeholder { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 12px; }
.report-hero-copy { align-self: center; min-width: 0; }
.report-hero-copy h2 { max-width: 820px; margin: 4px 0 12px; color: var(--navy); font-size: clamp(22px, 2.2vw, 34px); line-height: 1.3; }
.report-hero-copy > p:not(.eyebrow) { color: var(--muted); line-height: 1.7; }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.report-actions a { text-decoration: none; }
.analysis-report > .report-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--line); background: #f7faff; }
.report-metric { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 16px; align-items: center; min-width: 0; padding: 15px 17px; border: 1px solid #d7e4f2; border-radius: 11px; background: white; box-shadow: 0 5px 16px rgba(27,76,127,.04); }
.report-metric-icon { display: grid; width: 58px; height: 58px; border-radius: 10px; color: white; place-items: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.28); }
.report-metric-icon svg { width: 29px; height: 29px; }
.report-metric-icon .fill-icon { fill: currentColor; stroke: none; }
.report-metric-icon .stroke-icon { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.metric-play .report-metric-icon { background: linear-gradient(145deg,#4b95ff,#1769e0); }
.metric-like .report-metric-icon { background: linear-gradient(145deg,#cf67f4,#9b36e8); }
.metric-comment .report-metric-icon { background: linear-gradient(145deg,#45b9f8,#168fe7); }
.metric-collect .report-metric-icon { background: linear-gradient(145deg,#47d493,#17ad68); }
.metric-share .report-metric-icon { background: linear-gradient(145deg,#ffb154,#ff871e); }
.metric-engagement .report-metric-icon { background: linear-gradient(145deg,#43d6d0,#18aca8); }
.report-metric-copy { min-width: 0; }
.analysis-report .report-metric-copy small { display: block; color: var(--muted); font-size: 11px; font-style: normal; }
.analysis-report .report-metric-copy strong { display: block; overflow: hidden; margin-top: 5px; color: var(--navy); font-size: clamp(20px,2vw,27px); line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.analysis-report .report-metric-copy em { display: block; overflow: hidden; margin-top: 5px; color: #8495a8; font-size: 9px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.report-reading-layout { display: grid; grid-template-columns: 174px minmax(0, 1fr); align-items: stretch; }
.report-toc { min-width: 0; border-right: 1px solid var(--line); background: #fbfdff; }
.report-section-nav { position: sticky; top: 18px; padding: 24px 14px 22px; }
.report-nav-heading { display: flex; align-items: end; justify-content: space-between; gap: 10px; padding: 0 4px; }
.report-nav-heading .eyebrow { margin-bottom: 4px; font-size: 9px; }
.report-nav-heading strong { color: var(--navy); font-size: 14px; }
.report-progress-label { color: var(--muted); font: 700 10px/1 var(--font); letter-spacing: .04em; }
.report-nav-list-wrap { position: relative; margin-top: 17px; }
.report-progress-rail { position: absolute; top: 12px; bottom: 12px; left: 17px; width: 2px; overflow: hidden; background: #e2eaf3; }
.report-progress-rail i { display: block; width: 100%; height: var(--report-progress); background: var(--blue); transition: height .25s ease; }
.report-nav-list { position: relative; display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.report-nav-list a { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: center; padding: 7px 5px; border-radius: 7px; color: #5c6f85; text-decoration: none; transition: color .16s ease, background .16s ease; }
.report-nav-list a > span { position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #d9e4ef; border-radius: 6px; color: #728399; background: #fbfdff; font-size: 9px; font-weight: 800; }
.report-nav-list a strong { overflow: hidden; font-size: 11px; font-weight: 650; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.report-nav-list a:hover { color: var(--blue-dark); background: #f0f6fd; }
.report-nav-list a.is-complete > span { border-color: #b9d5f5; color: var(--blue-dark); background: #eaf3ff; }
.report-nav-list a.active { color: var(--blue-dark); background: #eaf3ff; }
.report-nav-list a.active > span { border-color: var(--blue); color: white; background: var(--blue); }
.report-jump-control { display: none; }
.report-sections { min-width: 0; }
.report-section { padding: 26px 24px; border-bottom: 1px solid var(--line); scroll-margin-top: 20px; }
.report-section:last-child { border-bottom: 0; }
.report-section h3 { margin: 3px 0 16px; color: var(--navy); font-size: 20px; }
.report-section h4 { margin: 20px 0 10px; color: var(--navy); font-size: 14px; }
.section-title { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.report-copy { margin: 0; color: #334b66; line-height: 1.9; white-space: pre-wrap; }
.long-copy { padding: 17px 18px; border: 1px solid #dbe8f6; border-radius: 9px; background: #f9fcff; }
.report-list { display: grid; gap: 9px; }
.report-list-item { padding: 13px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fbfdff; }
.report-list-item strong { color: var(--navy); font-size: 13px; }
.report-list-item p { margin: 5px 0 0; color: #455d78; line-height: 1.75; white-space: pre-wrap; }
.report-copy, .report-list-item p, .timeline-card p { overflow-wrap: anywhere; word-break: break-word; }
.report-empty { color: var(--muted); font-size: 13px; }
.diagnosis-section { background: #fff; }
.diagnosis-overview { display: grid; grid-template-columns: 1.05fr .95fr; gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 8px 24px rgba(24,61,103,.045); }
.diagnosis-overview > div { padding: 20px; background: white; }
.diagnosis-overview > div + div { border-left: 1px solid var(--line); }
.diagnosis-overview span:not(.diagnosis-status):not(.text-marker) { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.diagnosis-overview strong { display: block; margin: 11px 0 10px; color: var(--navy); font-size: 20px; line-height: 1.55; }
.diagnosis-overview p { margin: 0; color: #405873; line-height: 1.8; }
.diagnosis-status { display: inline-flex; margin-bottom: 12px; padding: 5px 9px 6px; border-radius: 6px; font-size: 11px; font-weight: 800; }
.diagnosis-status.danger { color: var(--marker-red-text); background: var(--marker-red); }
.diagnosis-status.warn { color: var(--marker-orange-text); background: var(--marker-orange); }
.diagnosis-status.safe { color: #087a55; background: #e4f7ef; }
.diagnosis-status.info { color: var(--marker-blue-text); background: var(--marker-blue); }
.diagnosis-status.neutral { color: #52657d; background: #edf2f7; }
.compliance-card .report-list { margin-top: 11px; }
.compliance-card .report-list-item { padding: 9px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.compliance-card .report-list-item:last-child { border-bottom: 0; }
.compliance-card small { display: block; margin-top: 10px; color: var(--muted); line-height: 1.6; }
.diagnosis-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 26px 0 4px; }
.diagnosis-heading h4 { margin: 0; }
.diagnosis-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 14px; color: var(--muted); font-size: 10px; }
.diagnosis-legend span { display: inline-flex; align-items: center; gap: 5px; }
.diagnosis-legend i { width: 8px; height: 8px; border-radius: 3px; }
.diagnosis-legend i.critical { background: #ef5a70; }
.diagnosis-legend i.warning { background: #e7a037; }
.diagnosis-legend i.info { background: #57a1e8; }
.diagnosis-issues { display: grid; }
.diagnosis-issue { overflow: visible; padding: 19px 0 21px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.diagnosis-issue:last-child { border-bottom: 0; }
.diagnosis-issue header { display: flex; align-items: center; gap: 9px; padding: 0; border: 0; background: transparent; }
.diagnosis-issue header strong { color: var(--navy); font-size: 15px; }
.priority-tag, .confidence-tag { font-size: 10px; font-weight: 800; }
.confidence-tag { margin-left: auto; padding: 4px 7px; border-radius: 6px; color: #5d6f84; background: #edf2f7; }
.issue-location { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.diagnosis-issue dl { display: grid; gap: 12px; margin: 15px 0 0; }
.diagnosis-issue dl > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 0; border: 0; }
.diagnosis-issue dt { padding-top: 2px; color: var(--muted); font-size: 10px; font-weight: 750; }
.diagnosis-issue dd { margin: 0; overflow-wrap: anywhere; color: #334b66; font-size: 14px; line-height: 1.8; }
.diagnosis-issue .fix-row dd { color: #243c58; font-weight: 650; }
.text-marker { display: inline; padding: .07em .28em .11em; border: 0; border-radius: .32em; color: inherit; background: var(--marker-blue); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.marker-critical { color: var(--marker-red-text); background: var(--marker-red); }
.marker-warning { color: var(--marker-orange-text); background: var(--marker-orange); }
.marker-info { color: var(--marker-blue-text); background: var(--marker-blue); }
.diagnosis-issue dd .text-marker { font-weight: 680; line-height: 2; }
.diagnosis-bottom { margin-top: 8px; padding-top: 4px; border-top: 1px solid var(--line); }
.diagnosis-bottom > div { min-width: 0; }
.diagnosis-bottom .report-list-item { padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.diagnosis-bottom .report-list-item:last-child { border-bottom: 0; }
.priority-fix-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.priority-fix-list li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 9px; align-items: start; }
.priority-fix-list li > span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: var(--blue-dark); background: var(--marker-blue); font-size: 10px; font-weight: 800; }
.priority-fix-list p { margin: 0; color: #405873; line-height: 1.75; }
.fix-copy { max-width: 76ch; padding: 0; border: 0; border-radius: 0; background: transparent; }
.report-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.timeline-list { display: grid; gap: 10px; }
.timeline-card { display: grid; grid-template-columns: 90px 1fr; gap: 14px; align-items: start; padding: 13px 14px; border-left: 3px solid #78aee9; border-radius: 0 9px 9px 0; background: #f8fbff; }
.timeline-card > span { color: var(--blue-dark); font-size: 12px; font-weight: 800; }
.timeline-card strong { color: var(--navy); }
.timeline-card p { margin: 5px 0 0; color: #4b617a; line-height: 1.7; }
.contact-sheet { width: 100%; margin-top: 18px; border: 1px solid var(--line); border-radius: 10px; }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; margin-bottom: 6px; color: var(--navy); }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.metric { padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #fbfdff; }
.metric span { display: block; color: var(--muted); font-size: 11px; }
.metric strong { display: block; margin-top: 6px; color: var(--navy); font-size: 20px; }
.privacy-note { display: flex; align-items: center; gap: 8px; margin-top: 11px; color: var(--success); font-size: 12px; }

.modal { width: min(520px, calc(100% - 32px)); border: 0; border-radius: 14px; padding: 0; box-shadow: 0 22px 80px rgba(11,31,58,.24); }
.modal::backdrop { background: rgba(11,31,58,.42); backdrop-filter: blur(2px); }
.modal-card { padding: 24px; }
.modal-card h3 { margin: 0 0 18px; color: var(--navy); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.admin-body { background: var(--canvas); }
.admin-login { width: min(380px, calc(100% - 40px)); margin: 14vh auto; padding: 30px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: var(--shadow); text-align: center; }
.admin-login h1 { margin: 0 0 24px; color: var(--navy); }
.admin-avatar { width: 64px; height: 64px; object-fit: cover; border-radius: 18px; margin-bottom: 16px; }
.admin-topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 4vw; border-bottom: 1px solid var(--line); background: white; }
.admin-topbar .brand-lockup { padding: 0; }
.admin-topbar > div:last-child { display: flex; align-items: center; gap: 8px; }
.admin-main { width: min(1320px, calc(100% - 48px)); margin: 28px auto 60px; }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card { padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.stat-card span { color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; margin-top: 8px; color: var(--navy); font-size: 26px; }
.admin-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; margin-bottom: 16px; }
.admin-grid .panel + .panel { margin-top: 0; }
.provider-list, .code-list { display: grid; gap: 9px; padding: 18px 20px; }
.provider-row, .code-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; }
.provider-row > div { display: grid; gap: 3px; }
.provider-row strong, .code-row code { color: var(--navy); }
.ledger-code { user-select: all; color: var(--navy); font-weight: 750; letter-spacing: .02em; }
.legacy-code { display: grid; gap: 3px; color: var(--muted); }
.legacy-code small { color: #a36a16; font-size: 10px; }
.provider-row span { color: var(--muted); font-size: 12px; }
.provider-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.provider-dot.warn { background: var(--warning); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; white-space: nowrap; }
th { color: var(--muted); background: #fbfdff; font-weight: 700; }
td { color: #43566e; }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 220px minmax(560px, 1fr); }
  .context-panel { display: none; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-brand { min-height: 42vh; padding: 48px 28px; }
  .auth-brand h1 { font-size: 42px; }
  .auth-card { width: calc(100% - 48px); padding: 36px 0; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; min-width: 0; }
  .workspace, .workspace-content, .panel, .result-block, .list-item { min-width: 0; max-width: 100%; }
  .list-item { align-items: flex-start; flex-wrap: wrap; }
  .main-nav { grid-template-columns: repeat(3, 1fr); }
  .nav-item { justify-content: center; font-size: 11px; }
  .sidebar-foot { display: none; }
  .workspace-header, .workspace-content { padding-left: 18px; padding-right: 18px; }
  .prompt-grid, .form-grid, .admin-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .link-analyzer { grid-template-columns: 1fr; }
  .metric-grid, .stats-grid { grid-template-columns: 1fr 1fr; }
  .report-hero { grid-template-columns: 100px 1fr; gap: 14px; padding: 16px; }
  .analysis-report > .report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px 12px; }
  .analysis-report > .metric-grid > div { border-bottom: 1px solid var(--line); }
  .report-reading-layout { display: block; }
  .report-toc { position: sticky; top: 0; z-index: 5; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(8px); }
  .report-section-nav { display: none; }
  .report-jump-control { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; color: var(--muted); font-size: 11px; font-weight: 700; }
  .report-jump-control select { min-width: 0; padding: 8px 10px; border-radius: 7px; color: var(--navy); font-size: 12px; }
  .report-columns { grid-template-columns: 1fr; }
  .diagnosis-overview { grid-template-columns: 1fr; }
  .diagnosis-overview > div + div { border-top: 1px solid var(--line); border-left: 0; }
  .diagnosis-heading { align-items: flex-start; flex-direction: column; }
  .diagnosis-legend { justify-content: flex-start; }
  .diagnosis-issue header { flex-wrap: wrap; }
  .diagnosis-issue dl > div { grid-template-columns: 68px minmax(0, 1fr); gap: 10px; }
  .report-section { padding: 22px 16px; scroll-margin-top: 72px; }
  .timeline-card { grid-template-columns: 72px 1fr; }
  .admin-main { width: calc(100% - 24px); }
}

/* Agent onboarding, read-only records and semantic job states */
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.status-pill.status-success, .status-pill.status-completed { color: #176344; background: #e8f5ed; }
.status-pill.status-failed, .status-pill.status-danger { color: #a12f3e; background: #fdebed; }
.status-pill.status-working { color: var(--blue-dark); background: var(--blue-soft); }
.status-pill.status-neutral { color: #596b80; background: #edf2f7; }

.onboarding-welcome { max-width: 690px; }
.onboarding-welcome .eyebrow { margin: 0 0 9px; }
.onboarding-prompt { display: block; width: min(500px, 100%); margin: 24px auto 0; text-align: left; }
.sync-indicator { display: flex; justify-content: center; gap: 6px; margin: 12px auto 25px; }
.sync-indicator i { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); animation: sync-pulse 1.2s ease-in-out infinite; }
.sync-indicator i:nth-child(2) { animation-delay: .15s; }
.sync-indicator i:nth-child(3) { animation-delay: .3s; }
@keyframes sync-pulse { 0%, 70%, 100% { transform: translateY(0); opacity: .28; } 35% { transform: translateY(-6px); opacity: 1; } }
.onboarding-progress { display: flex; align-items: center; justify-content: space-between; width: min(480px, 100%); margin: 23px auto 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: white; font-size: 12px; }
.onboarding-progress strong { color: var(--blue-dark); }

.composer { grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; box-shadow: 0 14px 34px rgba(21,53,91,.08); }
.composer textarea { grid-column: 2; }
.composer > .send-button { grid-column: 3; width: 42px; height: 42px; }
.attach-button { grid-column: 1; display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 8px; color: var(--blue-dark); background: #f7faff; font-size: 22px; font-weight: 400; cursor: pointer; }
.attach-button:hover { border-color: #a7c7ee; background: var(--blue-soft); }
.attach-button input { display: none; }
.attachment-preview { grid-column: 1 / -1; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 9px; border: 1px solid #d6e4f3; border-radius: 8px; background: #f8fbff; }
.attachment-preview img { width: 42px; height: 42px; object-fit: cover; border-radius: 6px; }
.attachment-preview span { overflow: hidden; color: #536a84; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.composer .remove-attachment { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 18px; }
.composer .remove-attachment:hover { color: var(--danger); background: var(--marker-red); }
.composer-hint { margin: 7px 10px 0; color: var(--muted); font-size: 10px; text-align: center; }

.job-list { gap: 10px; }
.job-item { position: relative; align-items: stretch; overflow: hidden; padding: 15px 15px 15px 18px; }
.job-status-rail { position: absolute; inset: 0 auto 0 0; width: 3px; background: #91b8ea; }
.job-success .job-status-rail { background: var(--success); }
.job-failed .job-status-rail { background: var(--danger); }
.job-success { border-color: #d8eadf; }
.job-failed { border-color: #f1d8dc; }
.job-success:hover { border-color: #b9dcc7; }
.job-failed:hover { border-color: #e8b7bf; }
.job-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.job-heading strong { flex: 0 1 auto; max-width: min(620px, 62vw); overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; text-overflow: clip; white-space: normal; }
.job-heading .status-pill { flex: 0 0 auto; }
.job-meta { color: #8290a1 !important; }
.job-detail { display: -webkit-box; max-width: 780px; overflow: hidden; color: #5c6f85 !important; line-height: 1.55; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.job-progress { align-self: center; min-width: 42px; color: var(--blue-dark); font: 700 11px/1 var(--font); text-align: center; }
.danger-button { color: #a32f3e; border-color: #efd3d8; background: #fff; }
.danger-button:hover { border-color: #e4aeb8; background: var(--marker-red); }

.readonly-notice { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 18px; padding: 18px 20px; border: 1px solid #d8e5f2; border-radius: 10px; background: #f8fbff; }
.readonly-notice > div { min-width: 0; }
.readonly-notice span { display: block; margin-bottom: 5px; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.readonly-notice strong { display: block; color: var(--navy); font-size: 15px; }
.readonly-notice p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.readonly-notice .ghost-button { flex: 0 0 auto; }
.readonly-list { gap: 12px; }
.readonly-card { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: white; }
.readonly-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 19px 15px; border-bottom: 1px solid var(--line); }
.readonly-card h3 { margin: 5px 0; color: var(--navy); font-size: 16px; line-height: 1.45; }
.readonly-card header p { margin: 0; color: var(--muted); font-size: 11px; }
.readonly-card header a, .profile-identity a { color: var(--blue-dark); text-decoration: none; }
.record-type { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.readonly-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.readonly-grid > div { min-width: 0; padding: 14px 19px; border-bottom: 1px solid var(--line); }
.readonly-grid > div:nth-child(odd):not(.wide) { border-right: 1px solid var(--line); }
.readonly-grid .wide { grid-column: 1 / -1; }
.readonly-grid span, .profile-field span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.readonly-grid p { margin: 0; overflow-wrap: anywhere; color: #344b66; font-size: 13px; line-height: 1.7; }
.readonly-detail { border-top: 0; }
.readonly-detail summary { padding: 13px 19px; color: var(--blue-dark); font-size: 12px; font-weight: 700; cursor: pointer; list-style-position: inside; }
.readonly-detail[open] summary { border-bottom: 1px solid var(--line); background: #fbfdff; }
.readonly-detail pre { max-height: 520px; margin: 0; overflow: auto; padding: 18px 19px; color: #344b66; background: #fbfdff; font: 12px/1.75 "SF Mono", Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.detail-copy { padding: 18px 19px; background: #fbfdff; }
.detail-copy h4 { margin: 0 0 6px; color: var(--navy); font-size: 12px; }
.detail-copy h4:not(:first-child) { margin-top: 18px; }
.detail-copy p { margin: 0; color: #344b66; line-height: 1.85; white-space: pre-wrap; }
.text-link { display: block; margin: 14px auto 0; padding: 0; border: 0; color: var(--blue-dark); background: transparent; font-weight: 700; }
.compact-metrics { grid-template-columns: repeat(5, 1fr); padding: 15px 18px; }
.compact-metrics .metric { border-radius: 8px; }
.compact-metrics .metric strong { font-size: 16px; }

.profile-summary { display: grid; grid-template-columns: 1fr 340px; gap: 14px; margin-bottom: 14px; }
.profile-identity, .confidence-card { padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.profile-identity { display: flex; align-items: center; gap: 15px; }
.profile-identity img { width: 58px; height: 58px; border-radius: 15px; object-fit: cover; }
.profile-identity span, .confidence-card span { color: var(--muted); font-size: 10px; font-weight: 700; }
.profile-identity h3 { margin: 5px 0; color: var(--navy); font-size: 19px; }
.profile-identity p { margin: 0; font-size: 12px; }
.confidence-card > div:first-child { display: flex; justify-content: space-between; align-items: baseline; }
.confidence-card strong { color: var(--navy); font-size: 24px; }
.confidence-track { height: 6px; margin: 13px 0 10px; overflow: hidden; border-radius: 5px; background: #e8eef5; }
.confidence-track i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.confidence-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.profile-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.profile-field { min-height: 112px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.profile-field p { margin: 0; color: #344b66; font-size: 13px; line-height: 1.75; white-space: pre-wrap; }

@media (max-width: 760px) {
  .readonly-notice { align-items: stretch; flex-direction: column; }
  .readonly-grid, .profile-summary, .profile-fields { grid-template-columns: 1fr; }
  .readonly-grid > div:nth-child(odd):not(.wide) { border-right: 0; }
  .compact-metrics { grid-template-columns: 1fr 1fr; }
  .job-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .job-heading strong { max-width: 100%; white-space: normal; }
  .list-actions { width: 100%; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  .sync-indicator i { animation: none; opacity: .7; }
  .report-progress-rail i { transition: none; }
}
/* Workspace dashboard redesign */
.workspace-body {
  min-width: 320px;
  background:
    radial-gradient(circle at 72% 4%, rgba(139, 192, 255, .18), transparent 25%),
    linear-gradient(145deg, #edf5fe 0%, #f7faff 48%, #edf3fa 100%);
}
.workspace-body .app-shell {
  grid-template-columns: 248px minmax(620px, 1fr) 340px;
  gap: 12px;
  min-height: 100vh;
  padding: 12px;
}
.workspace-body .sidebar,
.workspace-body .workspace,
.workspace-body .context-panel {
  overflow: hidden;
  border: 1px solid rgba(199, 216, 235, .88);
  border-radius: 20px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 48px rgba(39, 78, 122, .07);
}
.workspace-body .sidebar {
  top: 12px;
  height: calc(100vh - 24px);
  padding: 22px 16px 16px;
  border-right: 1px solid rgba(199, 216, 235, .88);
}
.workspace-body .brand-lockup { padding: 0 7px 22px; }
.workspace-body .brand-lockup img { width: 44px; height: 44px; border-radius: 14px; box-shadow: 0 8px 20px rgba(23, 105, 224, .15); }
.workspace-body .brand-lockup strong { font-size: 16px; }
.workspace-body .brand-lockup span { margin-top: 1px; font-size: 11px; }
.workspace-body .new-task {
  margin-bottom: 22px;
  padding: 12px 14px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #1769e0, #3488f4);
  box-shadow: 0 10px 24px rgba(23, 105, 224, .2);
  transition: transform .18s ease, box-shadow .18s ease;
}
.workspace-body .new-task:hover { box-shadow: 0 13px 28px rgba(23, 105, 224, .27); transform: translateY(-1px); }
.sidebar-caption { margin: 0 10px 9px; color: #94a3b6; font-size: 10px; font-weight: 750; letter-spacing: .12em; }
.workspace-body .main-nav { gap: 5px; }
.workspace-body .nav-item { padding: 11px 12px; border-radius: 10px; color: #5d6f84; }
.workspace-body .nav-item:hover { color: #14365f; background: #f2f7fd; }
.workspace-body .nav-item.active { color: #0d59c7; background: linear-gradient(90deg, #e7f1ff, #f3f8ff); box-shadow: inset 3px 0 #1769e0; }
.workspace-body .sidebar-foot { display: grid; gap: 9px; }
.workspace-body .quota-block { margin: 0; padding: 13px; border-color: #d9e6f3; background: #f6faff; }
.workspace-body .quota-title-row { margin-bottom: 12px; }
.workspace-body .quota-title-row > span { color: #243d5a; font-size: 12px; font-weight: 800; }
.workspace-body .quota-title-row button { padding: 3px 7px; border: 0; border-radius: 5px; color: #1769e0; background: #e7f1ff; font-size: 9px; font-weight: 750; }
.workspace-body .quota-line { height: 5px; margin-bottom: 10px; background: #dce9f6; }
.workspace-body .quota-line i { background: linear-gradient(90deg, #1769e0, #62a7ff); }
.sidebar-profile {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid #dfe9f3;
  border-radius: 11px;
  color: #304963;
  background: #fff;
  text-align: left;
  transition: border-color .18s ease, transform .18s ease;
}
.sidebar-profile:hover { border-color: #9fc4ee; transform: translateY(-1px); }
.sidebar-profile img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.sidebar-profile > span { display: grid; min-width: 0; gap: 2px; }
.sidebar-profile strong { overflow: hidden; color: var(--navy); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-profile small { overflow: hidden; color: #8795a7; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-profile > i { color: #8da2b8; font-size: 20px; font-style: normal; }
.workspace-body .logout-button { padding: 7px; font-size: 10px; }

.workspace-body .workspace { min-width: 0; background: #f5f9fd; }
.workspace-body .workspace-header {
  min-height: 104px;
  height: auto;
  padding: 20px 30px;
  border-bottom-color: #dfe9f3;
  background: rgba(255, 255, 255, .94);
}
.workspace-heading { min-width: 0; }
.workspace-header-actions { display: flex; align-items: center; gap: 9px; }
.context-toggle,
.context-close,
.context-scrim { display: none; }
.workspace-heading .eyebrow { margin-bottom: 4px; font-size: 9px; }
.workspace-heading h2 { font-size: 23px; }
#workspace-subtitle { margin: 6px 0 0; color: #7b8b9e; font-size: 11px; line-height: 1.55; }
.workspace-body .user-chip {
  flex: 0 0 auto;
  padding: 6px 10px 6px 7px;
  border-color: #d7e3ef;
  color: #40566f;
  background: #fafdff;
  cursor: pointer;
}
.workspace-body .user-chip img { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; }
.workspace-body .user-chip i { width: 7px; height: 7px; }
.workspace-body .workspace-content { min-height: calc(100vh - 128px); padding: 24px 28px 30px; }
.workspace-body .chat-layout { min-height: calc(100vh - 166px); max-width: 900px; }
.workspace-body .messages { padding-bottom: 126px; }

.agent-home { max-width: 900px; margin: 0 auto; text-align: left; }
.agent-primary-card {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid #cfe0f2;
  border-radius: 20px;
  background:
    radial-gradient(circle at 88% 14%, rgba(92, 162, 245, .18), transparent 31%),
    linear-gradient(145deg, #ffffff 0%, #f4f9ff 100%);
  box-shadow: 0 18px 45px rgba(37, 86, 139, .08);
}
.agent-primary-card::after { content: ""; position: absolute; right: -64px; bottom: -76px; width: 210px; height: 210px; border: 1px solid rgba(23, 105, 224, .1); border-radius: 50%; }
.agent-card-mark { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; }
.agent-card-mark .agent-mark { width: 52px; height: 52px; margin: 0; border: 4px solid #fff; border-radius: 15px; box-shadow: 0 10px 26px rgba(23, 105, 224, .16); }
.agent-card-mark span { color: #1769e0; font: 800 9px/1.4 "SF Mono", Consolas, monospace; letter-spacing: .14em; }
.agent-primary-card h3 { position: relative; z-index: 1; max-width: 660px; margin: 25px 0 12px; color: #102c4d; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.18; letter-spacing: -.035em; }
.agent-primary-card > p { position: relative; z-index: 1; max-width: 670px; margin: 0; color: #657991; font-size: 14px; line-height: 1.85; }
.agent-status-note { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 18px; margin-top: 20px; padding: 10px 12px; border-radius: 9px; font-size: 11px; }
.agent-status-note.status-working { color: #125bbb; background: #eaf3ff; }
.agent-status-note.status-success { color: #176344; background: #e8f5ed; }
.agent-status-note.status-danger { color: #a12f3e; background: #fdebed; }
.homepage-submit-card.onboarding-prompt {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  width: 100%;
  margin: 28px 0 0;
  padding: 16px;
  border: 1px solid #bcd4ee;
  border-radius: 13px;
  color: #223d5c;
  background: rgba(255, 255, 255, .92);
  text-align: left;
  box-shadow: 0 8px 24px rgba(45, 92, 142, .06);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.homepage-submit-card:hover { border-color: #78abe5; box-shadow: 0 12px 28px rgba(36, 88, 145, .12); transform: translateY(-2px); }
.homepage-submit-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; color: #fff; background: linear-gradient(135deg, #1769e0, #59a0f6); font-size: 18px; }
.homepage-submit-card > span:nth-child(2) { display: grid; gap: 5px; }
.homepage-submit-card strong { color: #153555; font-size: 14px; }
.homepage-submit-card small { color: #7d8da0; font-size: 11px; line-height: 1.55; }
.homepage-submit-card > i { color: #1769e0; font-size: 20px; font-style: normal; }
.agent-quick-section { margin-top: 18px; padding: 22px; border: 1px solid #dce7f2; border-radius: 17px; background: rgba(255, 255, 255, .86); }
.agent-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.agent-section-heading span { color: #8b99aa; font-size: 10px; }
.agent-section-heading h4 { margin: 0; color: #29435f; font-size: 13px; }
.workspace-body .prompt-grid { gap: 10px; }
.workspace-body .prompt-card { position: relative; min-height: 92px; padding: 16px 38px 16px 16px; border-color: #dce7f2; border-radius: 12px; background: #fbfdff; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.workspace-body .prompt-card::after { content: "↗"; position: absolute; top: 15px; right: 15px; color: #99abc0; font-size: 13px; }
.workspace-body .prompt-card:hover { border-color: #9fc2ea; box-shadow: 0 10px 24px rgba(41, 86, 134, .08); transform: translateY(-2px); }
.workspace-body .prompt-card strong { font-size: 13px; }
.workspace-body .prompt-card span { font-size: 10px; }
.workspace-body .composer { border-color: #cbdcec; border-radius: 15px; box-shadow: 0 18px 42px rgba(36, 75, 117, .13); }

.workspace-body .context-panel {
  top: 12px;
  height: calc(100vh - 24px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px;
  border-left: 1px solid rgba(199, 216, 235, .88);
  background: rgba(248, 251, 255, .96);
}
.workspace-body .context-content { margin: 0 0 12px; }
.context-account-card,
.workspace-body .context-flywheel,
.context-shortcuts,
.publish-process { padding: 16px; border: 1px solid #dbe6f1; border-radius: 14px; background: #fff; box-shadow: 0 8px 22px rgba(38, 77, 119, .045); }
.context-account-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.context-account-head .eyebrow { margin-bottom: 4px; font-size: 8px; }
.context-account-head h3, .context-section-heading h3 { margin: 0; color: #193653; font-size: 15px; }
.context-account-head > strong { color: #1769e0; font-size: 26px; line-height: 1; }
.understanding-track { height: 7px; margin: 15px 0 12px; overflow: hidden; border-radius: 6px; background: #e3edf7; }
.understanding-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1769e0, #65aaff); }
.context-account-status { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.context-account-status > span:first-child { overflow: hidden; color: #405873; font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.context-account-card > p { margin: 10px 0 11px; color: #74869b; font-size: 10px; line-height: 1.65; }
.context-profile-link { padding: 0; border: 0; color: #1769e0; background: transparent; font-size: 10px; font-weight: 750; }
.workspace-body .context-flywheel { margin: 0 0 12px; padding-bottom: 14px; border-bottom: 1px solid #dbe6f1; }
.workspace-body .flywheel-heading { padding: 0; }
.workspace-body .flywheel-heading .eyebrow { font-size: 8px; }
.workspace-body .flywheel-heading h3 { font-size: 15px; }
.workspace-body .flywheel-heading > span { padding: 3px 6px; border-radius: 5px; background: #eaf3ff; font-size: 8px; }
.context-shortcuts, .publish-process { margin-bottom: 12px; }
.context-section-heading { margin-bottom: 12px; }
.context-section-heading .eyebrow { margin-bottom: 4px; font-size: 8px; }
.context-shortcut-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.context-shortcut-grid button { display: grid; gap: 4px; min-width: 0; padding: 10px; border: 1px solid #e0e9f2; border-radius: 9px; color: #445c75; background: #f9fbfe; text-align: left; transition: border-color .18s ease, transform .18s ease; }
.context-shortcut-grid button:hover { border-color: #a6c6ea; transform: translateY(-1px); }
.context-shortcut-grid span { color: #1769e0; font: 750 7px/1 "SF Mono", Consolas, monospace; }
.context-shortcut-grid strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.recent-conversations { display: grid; gap: 5px; margin-top: 11px; padding-top: 10px; border-top: 1px solid #e5edf5; }
.recent-conversations > p { margin: 0 0 2px; color: #91a0b1; font-size: 8px; font-weight: 750; }
.recent-conversations button { overflow: hidden; padding: 5px 0; border: 0; color: #60748a; background: transparent; font-size: 9px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.recent-conversations button:hover { color: #1769e0; }
.publish-process ol { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.publish-process li { position: relative; display: grid; grid-template-columns: 24px 1fr; gap: 9px; align-items: start; min-height: 48px; }
.publish-process li:not(:last-child)::after { content: ""; position: absolute; top: 24px; bottom: 0; left: 11px; width: 1px; background: #d4e3f3; }
.publish-process li > span { position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #1769e0; background: #eaf3ff; font-size: 8px; font-weight: 800; }
.publish-process li p { display: grid; gap: 3px; margin: 1px 0 10px; }
.publish-process li strong { color: #3b536d; font-size: 10px; }
.publish-process li small { color: #8a99aa; font-size: 8px; line-height: 1.45; }

.workspace-body .modal.modal-wide { width: min(880px, calc(100% - 32px)); max-height: calc(100vh - 34px); overflow-y: auto; }
.account-center-modal { padding: 0; color: #314961; }
.account-center-head { position: sticky; z-index: 3; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid #e0e9f2; background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); }
.account-center-user { display: flex; align-items: center; gap: 12px; }
.account-center-user img { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; }
.account-center-user p { margin: 0 0 3px; color: #1769e0; font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.account-center-user h3 { margin: 0 0 2px; font-size: 18px; }
.account-center-user span { color: #8997a7; font-size: 10px; }
.account-center-close { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px; color: #6c7c8e; background: #f1f5f9; font-size: 21px; }
.account-overview-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 10px; padding: 20px 24px 0; }
.account-overview-grid article { min-width: 0; padding: 16px; border: 1px solid #dce7f1; border-radius: 12px; background: #f9fbfd; }
.account-overview-grid .account-plan-card { color: #fff; border-color: transparent; background: linear-gradient(135deg, #145fc9, #3d91f4); }
.account-overview-grid span { display: block; color: #7f8fa1; font-size: 9px; font-weight: 700; }
.account-overview-grid .account-plan-card span, .account-overview-grid .account-plan-card small { color: rgba(255, 255, 255, .76); }
.account-overview-grid strong { display: block; overflow-wrap: anywhere; margin: 7px 0 5px; color: #163552; font-size: 20px; }
.account-overview-grid .account-plan-card strong { color: #fff; font-size: 16px; }
.account-overview-grid small { color: #8998a9; font-size: 9px; }
.account-package-section { padding: 20px 24px 0; }
.account-section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.account-section-title span { color: #1769e0; font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.account-section-title h4 { margin: 4px 0 0; color: #24425f; font-size: 14px; }
.account-section-title > small { color: #8c9aaa; font-size: 9px; }
.center-package-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.center-package-grid article { padding: 13px; border: 1px solid #dde7f1; border-radius: 10px; background: #fafcff; }
.center-package-grid article.recommended { border-color: #9fc3eb; background: #eff6ff; }
.center-package-grid span { color: #526980; font-size: 10px; font-weight: 750; }
.center-package-grid strong { display: block; margin: 7px 0 4px; color: #174c87; font-size: 18px; }
.center-package-grid small { color: #8695a6; font-size: 9px; }
.account-center-columns { display: grid; grid-template-columns: .9fr 1.1fr; gap: 12px; padding: 20px 24px 24px; }
.account-service-card, .account-redemption-card { padding: 16px; border: 1px solid #dce7f1; border-radius: 13px; background: #fbfdff; }
.account-service-card > div:last-child { display: grid; grid-template-columns: 126px 1fr; gap: 14px; align-items: center; }
.account-service-card img { width: 126px; height: 160px; padding: 5px; border: 1px solid #e0e8f1; border-radius: 9px; background: #fff; object-fit: contain; }
.account-service-card p { margin: 0; color: #718399; font-size: 10px; line-height: 1.7; }
.account-redeem-form label { margin-bottom: 7px; color: #536a82; font-size: 10px; }
.account-redeem-form > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.account-redeem-form input { min-width: 0; padding: 9px 10px; font-size: 11px; }
.account-redeem-form button { padding: 9px 12px; font-size: 10px; }
.account-redeem-form > small { display: block; margin-top: 6px; color: #8d9aaa; font-size: 8px; }
.account-unlimited-note { padding: 12px; border-radius: 9px; color: #176344; background: #e8f5ed; }
.account-unlimited-note strong { font-size: 11px; }
.account-unlimited-note p { margin: 5px 0 0; font-size: 9px; line-height: 1.55; }
.redemption-history { margin-top: 15px; padding-top: 12px; border-top: 1px solid #e1eaf3; }
.redemption-history-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.redemption-history-head strong { color: #405a74; font-size: 10px; }
.redemption-history-head small { color: #98a4b2; font-size: 8px; }
.redemption-empty { display: grid; gap: 3px; padding: 12px; border-radius: 8px; color: #8795a5; background: #f3f7fb; }
.redemption-empty strong { color: #60748a; font-size: 10px; }
.redemption-empty span { font-size: 8px; }
.redemption-list { display: grid; gap: 7px; max-height: 132px; margin: 0; overflow-y: auto; padding: 0; list-style: none; }
.redemption-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border: 1px solid #e4ebf3; border-radius: 8px; background: #fff; }
.redemption-list li > span:first-child { display: grid; gap: 3px; }
.redemption-list strong { color: #50667e; font-size: 9px; }
.redemption-list small { color: #94a0ae; font-size: 8px; }
.redemption-list li > span:last-child { color: #7a8b9d; font-size: 8px; line-height: 1.5; text-align: right; }
.redemption-list b { color: #1769e0; }
.account-center-actions { display: flex; justify-content: flex-end; padding: 0 24px 22px; }
.account-center-logout { color: #9d2f40; }

.workspace-body button:focus-visible,
.workspace-body a:focus-visible { outline: 3px solid rgba(23, 105, 224, .25); outline-offset: 2px; }

@media (max-width: 1280px) and (min-width: 1181px) {
  .workspace-body .app-shell { grid-template-columns: 220px minmax(560px, 1fr) 318px; gap: 9px; padding: 9px; }
  .workspace-body .sidebar, .workspace-body .context-panel { top: 9px; height: calc(100vh - 18px); }
  .workspace-body .context-panel { padding: 12px; }
}
@media (max-width: 1180px) {
  .workspace-body .app-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .workspace-body .context-panel { display: none; }
  .workspace-body .context-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #bfd5ee;
    border-radius: 10px;
    color: #145dbb;
    background: #edf5ff;
    font-size: 12px;
    font-weight: 750;
  }
  .workspace-body .context-panel.is-open {
    position: fixed;
    z-index: 70;
    top: 12px;
    right: 12px;
    display: block;
    width: min(354px, calc(100vw - 24px));
    height: calc(100vh - 24px);
    padding: 58px 16px 16px;
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(15, 43, 77, .2);
  }
  .workspace-body .context-close {
    position: absolute;
    z-index: 2;
    top: 13px;
    right: 13px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #d9e6f3;
    border-radius: 10px;
    color: #4d6279;
    background: #f5f9fd;
    font-size: 24px;
    line-height: 1;
  }
  .workspace-body .context-scrim {
    position: fixed;
    z-index: 60;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(10, 34, 62, .34);
    backdrop-filter: blur(3px);
  }
  .workspace-body .context-scrim.is-open { display: block; }
  .workspace-body.context-drawer-open { overflow: hidden; }
}
@media (max-width: 760px) {
  .workspace-body .app-shell { grid-template-columns: 1fr; gap: 0; padding: 0; }
  .workspace-body .sidebar, .workspace-body .workspace { border-right: 0; border-left: 0; border-radius: 0; }
  .workspace-body .sidebar { height: auto; padding: 15px 14px 12px; }
  .workspace-body .brand-lockup { padding-bottom: 13px; }
  .workspace-body .new-task { margin-bottom: 12px; }
  .workspace-body .sidebar-caption { display: none; }
  .workspace-body .workspace-header { min-height: 94px; padding: 16px 18px; }
  .workspace-body .workspace-header-actions { gap: 6px; }
  .workspace-body .context-toggle { padding: 8px 10px; white-space: nowrap; }
  .workspace-body .context-panel.is-open { top: 9px; right: 9px; width: calc(100vw - 18px); height: calc(100vh - 18px); }
  #workspace-subtitle { max-width: 220px; font-size: 9px; }
  .workspace-body .user-chip span { display: none; }
  .workspace-body .user-chip { padding-right: 7px; }
  .workspace-body .workspace-content { padding: 16px 14px 24px; }
  .agent-primary-card { padding: 24px 20px; border-radius: 16px; }
  .agent-primary-card h3 { font-size: 29px; }
  .agent-primary-card > p { font-size: 12px; }
  .homepage-submit-card.onboarding-prompt { grid-template-columns: 38px minmax(0, 1fr); }
  .homepage-submit-card > i { display: none; }
  .homepage-submit-icon { width: 38px; height: 38px; }
  .agent-quick-section { padding: 16px; }
  .agent-section-heading { align-items: flex-start; flex-direction: column-reverse; gap: 4px; }
  .workspace-body .prompt-grid { grid-template-columns: 1fr; }
  .workspace-body .modal.modal-wide { width: calc(100% - 18px); max-height: calc(100vh - 18px); }
  .account-center-head { padding: 16px; }
  .account-overview-grid, .center-package-grid, .account-center-columns { grid-template-columns: 1fr; }
  .account-overview-grid { padding: 16px 16px 0; }
  .account-package-section { padding: 16px 16px 0; }
  .account-center-columns { padding: 16px; }
  .account-service-card > div:last-child { grid-template-columns: 102px 1fr; }
  .account-service-card img { width: 102px; height: 130px; }
  .workspace-body .sidebar { position: sticky; z-index: 40; top: 0; display: grid; grid-template-areas: "brand task" "nav nav"; grid-template-columns: minmax(0,1fr) auto; gap: 9px 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid #d8e4f1; box-shadow: 0 9px 25px rgba(24,68,118,.08); }
  .workspace-body .brand-lockup { grid-area: brand; min-width: 0; padding: 0; }
  .workspace-body .brand-lockup img { width: 38px; height: 38px; border-radius: 11px; }
  .workspace-body .brand-lockup span { display: none; }
  .workspace-body .new-task { grid-area: task; width: auto; min-height: 40px; margin: 0; padding: 9px 13px; white-space: nowrap; }
  .workspace-body .main-nav { grid-area: nav; display: flex; gap: 4px; overflow-x: auto; padding: 1px 0 3px; overscroll-behavior-x: contain; scrollbar-width: none; }
  .workspace-body .main-nav::-webkit-scrollbar { display: none; }
  .workspace-body .nav-item { flex: 0 0 auto; width: auto; min-height: 40px; padding: 9px 11px; white-space: nowrap; }
  .workspace-body .nav-item.active { box-shadow: inset 0 -3px #1769e0; }
  .workspace-body .sidebar-foot { display: none; }
}
@media (max-width: 760px) { #workspace-subtitle { font-size: 11px; } }
@media (max-width: 430px) {
  .account-service-card > div:last-child, .account-redeem-form > div { grid-template-columns: 1fr; }
  .account-service-card img { width: 100%; height: 210px; }
}
@media (prefers-reduced-motion: reduce) {
  .workspace-body .new-task,
  .sidebar-profile,
  .homepage-submit-card,
  .workspace-body .prompt-card,
  .context-shortcut-grid button { transition: none; }
  .workspace-body .new-task:hover,
  .sidebar-profile:hover,
  .homepage-submit-card:hover,
  .workspace-body .prompt-card:hover,
  .context-shortcut-grid button:hover { transform: none; }
}
/* Readability, interaction and status polish */
.workspace-body .context-account-head .eyebrow,
.workspace-body .flywheel-heading .eyebrow,
.workspace-body .context-section-heading .eyebrow { font-size: 11px; }
.workspace-body .flywheel-heading > span { font-size: 11px; }
.workspace-body .orbit-mini .orbit-core span { font-size: 11px; line-height: 1.25; }
.workspace-body .orbit-mini .orbit-steps li > span { font-size: 10px; }
.workspace-body .orbit-mini .orbit-steps li > strong { font-size: 11px; line-height: 1.2; white-space: normal; }
.workspace-body .context-account-status .status-pill { min-height: 28px; font-size: 11px; }
.workspace-body .context-account-status > span:first-child,
.workspace-body .context-account-card > p,
.workspace-body .context-profile-link { font-size: 12px; }
.workspace-body .context-profile-link { min-height: 40px; padding: 8px 0; }
.workspace-body .context-shortcut-grid button { min-height: 52px; }
.workspace-body .context-shortcut-grid span { font-size: 11px; }
.workspace-body .context-shortcut-grid strong { font-size: 12px; line-height: 1.35; white-space: normal; }
.workspace-body .recent-conversations > p { font-size: 11px; }
.workspace-body .recent-conversations button { min-height: 40px; padding: 9px 2px; font-size: 11px; line-height: 1.4; }
.workspace-body .publish-process li { min-height: 56px; }
.workspace-body .publish-process li > span { font-size: 11px; }
.workspace-body .publish-process li strong { font-size: 12px; line-height: 1.4; }
.workspace-body .publish-process li small { font-size: 11px; line-height: 1.5; }

.account-center-user p,
.account-section-title span { font-size: 11px; }
.account-center-user span,
.account-overview-grid span,
.account-overview-grid small,
.account-section-title > small,
.center-package-grid small,
.account-redeem-form > small,
.account-unlimited-note p,
.redemption-history-head small,
.redemption-empty span,
.redemption-list small,
.redemption-list li > span:last-child { font-size: 11px; line-height: 1.5; }
.account-overview-grid strong { font-size: 21px; }
.account-overview-grid .account-plan-card strong { font-size: 17px; }
.center-package-grid span { font-size: 12px; }
.account-service-card p,
.account-redeem-form label { font-size: 12px; }
.account-redeem-form input { min-height: 40px; font-size: 13px; }
.account-redeem-form button { min-height: 40px; font-size: 12px; }
.account-unlimited-note strong,
.redemption-history-head strong,
.redemption-empty strong,
.redemption-list strong { font-size: 12px; }
.redemption-list li { min-height: 46px; align-items: center; }

:where(button, a, input, textarea, select, summary, [role="button"], [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 3px solid rgba(23, 105, 224, .42);
  outline-offset: 3px;
}
:where(.primary-button, .ghost-button, .text-button, .icon-button, .mini-button, .nav-item, .auth-tab, .auth-contact, .new-task, .sidebar-profile, .user-chip, .account-center-close, .dialog-close) { min-height: 40px; }
.workspace-body .quota-title-row button { min-width: 40px; min-height: 40px; font-size: 11px; }
button:disabled,
[aria-disabled="true"] { cursor: not-allowed; opacity: .62; }

.toast.toast-success,
.toast.success { border-color: rgba(144, 232, 194, .55); background: #0d7654; color: #fff; }
.toast.toast-error,
.toast.error { border-color: rgba(255, 183, 193, .6); background: #9d2f40; color: #fff; }
.toast.toast-working,
.toast.working { border-color: rgba(178, 213, 255, .62); background: #145dbb; color: #fff; }

.admin-body .mini-button.toggle-user[data-active="1"],
.admin-body .danger-button,
.admin-body button[data-danger="true"] {
  border-color: #efc3ca;
  color: #a52b3f;
  background: #fff3f5;
}
.admin-body .mini-button.toggle-user[data-active="1"]:hover,
.admin-body .danger-button:hover,
.admin-body button[data-danger="true"]:hover { border-color: #d94d60; background: #ffe6ea; }
.provider-dot { width: 10px; height: 10px; box-shadow: 0 0 0 3px rgba(15,159,110,.11); }
.provider-dot.warn { box-shadow: 0 0 0 3px rgba(217,119,6,.12); }
.provider-row:has(.provider-dot:not(.warn)) > div > span { color: #147251; font-weight: 650; }
.provider-row:has(.provider-dot.warn) > div > span { color: #925600; font-weight: 650; }
.provider-status { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 750; }
.provider-status.is-ok { color: #126648; background: #e8f7f0; }
.provider-status.is-warning { color: #805000; background: #fff0d2; }
.provider-status.is-error { color: #a52b3f; background: #ffe2e7; }

/* CTS Agent home alignment */
.workspace-body .app-shell { grid-template-columns: 220px minmax(620px, 1fr) 320px; gap: 10px; padding: 10px; }
.workspace-body .sidebar,
.workspace-body .workspace,
.workspace-body .context-panel { border-radius: 16px; box-shadow: 0 8px 28px rgba(36, 75, 117, .055); }
.workspace-body .workspace { background: #f8fbff; }
.workspace-body .workspace-header { min-height: 88px; padding: 16px 24px; }
.workspace-body .workspace-content { min-height: calc(100vh - 108px); padding: 18px 24px 28px; }
.workspace-body .chat-layout { min-height: 0; max-width: 920px; }
.workspace-body .messages { padding-bottom: 0; }

.agent-home { width: 100%; max-width: 920px; margin: 0 auto; }
.agent-primary-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 352px;
  padding: 28px clamp(28px, 5vw, 60px) 34px;
  border: 1px solid #dbe7f3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(32, 75, 122, .045);
  text-align: center;
}
.agent-primary-card::before,
.agent-primary-card::after { content: ""; position: absolute; border: 1px solid rgba(23, 105, 224, .08); border-radius: 50%; background: rgba(234, 243, 255, .58); pointer-events: none; }
.agent-primary-card::before { bottom: -58px; left: -70px; width: 190px; height: 190px; }
.agent-primary-card::after { top: -74px; right: -56px; bottom: auto; width: 210px; height: 210px; }
.agent-card-mark { flex-direction: column; gap: 8px; justify-content: center; }
.agent-card-mark .agent-mark { width: 66px; height: 66px; border: 5px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px #d6e8fb, 0 8px 22px rgba(23, 105, 224, .12); }
.agent-card-mark span { padding: 5px 12px; border-radius: 6px; color: #fff; background: #1769e0; font-size: 9px; letter-spacing: .08em; }
.agent-primary-card h3 { max-width: 720px; margin: 18px 0 10px; font-size: clamp(27px, 3vw, 36px); text-align: center; }
.agent-primary-card > p { max-width: 690px; font-size: 13px; line-height: 1.75; text-align: center; }
.agent-status-note { width: min(640px, 100%); }
.homepage-submit-card.onboarding-prompt { width: min(640px, 100%); margin: 24px auto 0; padding: 14px 16px; border-radius: 12px; box-shadow: 0 6px 18px rgba(38, 83, 132, .045); }
.homepage-submit-card:hover { box-shadow: 0 8px 20px rgba(38, 83, 132, .075); transform: translateY(-1px); }
.homepage-submit-icon { background: #1769e0; }

.agent-quick-section { margin-top: 14px; padding: 16px 18px 18px; border-radius: 14px; background: #fff; box-shadow: 0 6px 22px rgba(32, 75, 122, .035); }
.agent-section-heading { justify-content: center; flex-direction: column-reverse; gap: 3px; margin-bottom: 14px; text-align: center; }
.agent-section-heading span { font-size: 10px; }
.agent-section-heading h4 { font-size: 13px; }
.workspace-body .prompt-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.workspace-body .prompt-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 142px;
  padding: 16px 10px;
  border: 1px solid #e0e9f3;
  border-radius: 12px;
  background: #fff;
  text-align: center;
  box-shadow: none;
}
.workspace-body .prompt-card::after { display: none; }
.workspace-body .prompt-card:hover { border-color: #a9c9ee; box-shadow: 0 3px 10px rgba(34, 79, 128, .045); transform: translateY(-1px); }
.workspace-body .prompt-card-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 11px; border-radius: 12px; color: #1769e0; background: #edf5ff; }
.workspace-body .prompt-card-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.workspace-body .prompt-card strong { margin-bottom: 6px; font-size: 13px; }
.workspace-body .prompt-card .prompt-card-copy { color: #7d8da0; font-size: 10px; line-height: 1.5; }
.workspace-body .composer { position: relative; bottom: auto; margin-top: 14px; border-radius: 12px; box-shadow: 0 7px 22px rgba(36, 75, 117, .075); }
.workspace-body .composer-hint { margin-bottom: 0; }

@media (max-width: 1280px) and (min-width: 1181px) {
  .workspace-body .app-shell { grid-template-columns: 210px minmax(560px, 1fr) 300px; gap: 8px; padding: 8px; }
  .workspace-body .prompt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-body .prompt-card { min-height: 122px; }
}
@media (max-width: 1180px) {
  .workspace-body .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .workspace-body .prompt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .workspace-body .app-shell { grid-template-columns: 1fr; gap: 0; padding: 0; }
  .workspace-body .workspace-content { padding: 14px 12px 22px; }
  .agent-primary-card { min-height: 0; padding: 22px 18px 26px; }
  .agent-primary-card h3 { font-size: 27px; }
  .agent-quick-section { padding: 14px; }
  .workspace-body .prompt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-body .prompt-card { min-height: 126px; }
}
@media (max-width: 430px) {
  .workspace-body .prompt-grid { grid-template-columns: 1fr; }
  .workspace-body .prompt-card { min-height: 112px; }
}
/* Compact CTS Agent composer */
.workspace-body .composer {
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid #d9e6f3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(36, 75, 117, .045);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.workspace-body .composer:focus-within {
  border-color: #9cc4ef;
  box-shadow: 0 0 0 3px rgba(23, 105, 224, .07), 0 5px 18px rgba(36, 75, 117, .055);
}
.workspace-body .composer .attachment-preview { grid-column: 1 / -1; }
.workspace-body .composer textarea {
  grid-column: 2;
  height: 40px;
  min-height: 40px;
  max-height: 144px;
  overflow-y: hidden;
  padding: 9px 8px;
  border: 0;
  border-radius: 0;
  color: #253b55;
  background: transparent;
  box-shadow: none;
  resize: none;
  line-height: 22px;
}
.workspace-body .composer textarea::placeholder { color: #93a2b4; }
.workspace-body .composer textarea:focus { outline: 0; box-shadow: none; }
.workspace-body .attach-button {
  grid-column: 1;
  align-self: center;
  width: 32px;
  height: 32px;
  border: 1px solid #dbe7f3;
  border-radius: 8px;
  color: #1769e0;
  background: #fff;
  font-size: 0;
}
.workspace-body .attach-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.workspace-body .composer > .send-button {
  grid-column: 3;
  align-self: center;
  width: 32px;
  height: 32px;
  min-height: 32px;
  border-radius: 8px;
  color: #fff;
  background: #1769e0;
  box-shadow: 0 4px 12px rgba(23, 105, 224, .18);
}
.workspace-body .send-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: none;
}
.workspace-body .send-button:active { transform: scale(.97); }
.workspace-body .composer-hint {
  margin: 7px 8px 0;
  color: #8b9aae;
  font-size: 10px;
  line-height: 1.5;
  text-align: left;
}
@media (prefers-reduced-motion: reduce) {
  .workspace-body .composer { transition: none; }
}

/* Account spaces */
.profile-douyin-avatar,
.creator-account-avatar {
  object-fit: cover;
  background: #eef6ff;
  border: 1px solid #cfe0f5;
}
.profile-douyin-avatar {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(18, 96, 190, 0.12);
}
.creator-account-manager {
  margin: 18px 0;
  padding: 22px;
  border: 1px solid #d8e6f6;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(31, 91, 157, 0.06);
}
.creator-account-manager-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.creator-account-manager-head span {
  color: #1468df;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.creator-account-manager-head h3 {
  margin: 5px 0 6px;
  color: #102b4e;
  font-size: 21px;
}
.creator-account-manager-head .secondary-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #a9cdf8;
  border-radius: 12px;
  color: #0b67d9;
  background: #f5faff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(22, 112, 231, 0.08);
}
.creator-account-manager-head .secondary-button:hover {
  border-color: #1670e7;
  background: #eaf4ff;
}.creator-account-manager-head p {
  margin: 0;
  color: #6e829c;
  line-height: 1.65;
}
.creator-account-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.creator-account-card {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 80px;
  padding: 14px;
  border: 1px solid #dbe7f5;
  border-radius: 16px;
  background: #f9fcff;
}
.creator-account-card.is-active {
  border-color: #73adf5;
  background: linear-gradient(135deg, #eff7ff 0%, #f9fcff 100%);
  box-shadow: inset 3px 0 #1670e7;
}
.creator-account-avatar {
  width: 50px;
  height: 50px;
  border-radius: 15px;
}
.creator-account-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.creator-account-title strong {
  color: #102b4e;
  font-size: 16px;
}
.creator-account-title span {
  padding: 3px 8px;
  border-radius: 999px;
  color: #08754a;
  background: #e4f7ed;
  font-size: 11px;
  font-weight: 800;
}
.creator-account-card p {
  margin: 6px 0 0;
  color: #7488a2;
  font-size: 12px;
}
.creator-account-card > i {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  background: #1670e7;
  font-style: normal;
}
.account-expansion-modal,
.add-account-modal {
  position: relative;
  max-width: 560px;
}
.account-expansion-modal > h3,
.add-account-modal > h3 {
  margin: 8px 0 10px;
  color: #102b4e;
  font-size: 26px;
}
.account-expansion-modal > p,
.add-account-modal > p {
  color: #667d99;
  line-height: 1.7;
}
.account-expansion-privacy {
  display: grid;
  gap: 5px;
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 14px;
  color: #0f5fbf;
  background: #edf6ff;
}
.account-expansion-privacy span {
  color: #58738f;
  font-size: 13px;
  line-height: 1.6;
}
.account-expansion-contact {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 22px;
  padding: 16px;
  border: 1px solid #dbe7f5;
  border-radius: 18px;
}
.account-expansion-contact img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}
.account-expansion-contact strong {
  color: #102b4e;
  font-size: 18px;
}
.account-expansion-contact p {
  color: #6b809a;
  line-height: 1.65;
}
.stack-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}
.stack-form label {
  display: grid;
  gap: 8px;
  color: #173455;
  font-weight: 700;
}
.stack-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #cdddf0;
  border-radius: 12px;
  color: #173455;
  background: #fff;
  font: inherit;
}
.modal-footnote {
  display: block;
  margin-top: 12px;
  color: #7287a0;
}
@media (max-width: 900px) {
  .creator-account-list { grid-template-columns: 1fr; }
  .creator-account-manager-head { flex-direction: column; }
  .account-expansion-contact { grid-template-columns: 1fr; }
}
/* Account published-work metadata library */
.creator-work-library {
  margin: 18px 0;
  padding: 22px;
  border: 1px solid #d8e6f6;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(31, 91, 157, 0.06);
}
.creator-work-library-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}
.creator-work-library-head .eyebrow { margin: 0 0 5px; color: #1468df; font-size: 9px; }
.creator-work-library-head h3 { margin: 0 0 7px; color: #102b4e; font-size: 21px; }
.creator-work-library-head p { max-width: 720px; margin: 0; color: #6e829c; font-size: 12px; line-height: 1.7; }
.creator-work-library-head > strong {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 999px;
  color: #0b67d9;
  background: #eaf4ff;
  font-size: 12px;
}
.creator-work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.creator-work-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 13px;
  min-width: 0;
  min-height: 126px;
  padding: 11px;
  border: 1px solid #dce8f5;
  border-radius: 16px;
  background: #fbfdff;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.creator-work-card:hover { border-color: #9cc4ef; box-shadow: 0 10px 26px rgba(31, 91, 157, .08); transform: translateY(-1px); }
.creator-work-cover {
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 104px;
  border-radius: 11px;
  color: #1769e0;
  background: linear-gradient(145deg, #eaf4ff, #f7fbff);
  font: 800 16px/1 "SF Mono", Consolas, monospace;
}
.creator-work-cover img { width: 100%; height: 100%; min-height: 104px; object-fit: cover; }
.creator-work-main { display: flex; min-width: 0; flex-direction: column; }
.creator-work-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #8091a5; font-size: 9px; }
.creator-work-meta > span { padding: 3px 6px; border-radius: 5px; color: #1769e0; background: #edf5ff; font-weight: 750; }
.creator-work-card h4 {
  display: -webkit-box;
  overflow: hidden;
  margin: 8px 0 7px;
  color: #173654;
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.creator-work-metrics { display: flex; flex-wrap: wrap; gap: 5px; min-height: 22px; }
.creator-work-metrics span { display: inline-flex; gap: 4px; padding: 4px 6px; border-radius: 6px; color: #395673; background: #f0f5fa; font-size: 9px; }
.creator-work-metrics b { color: #8292a5; font-weight: 650; }
.creator-work-metrics em { color: #94a1b0; font-size: 9px; font-style: normal; }
.creator-work-metrics.compact { margin-top: 7px; }
.creator-work-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: auto; padding-top: 7px; }
.creator-work-actions a { color: #73879e; font-size: 10px; font-weight: 650; }
.creator-work-actions .mini-button { min-height: 29px; padding: 5px 10px; color: #fff; border-color: #1769e0; background: #1769e0; }
.creator-work-actions .mini-button:disabled { cursor: wait; opacity: .64; }
@media (max-width: 1100px) {
  .creator-work-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .creator-work-library { padding: 16px; border-radius: 17px; }
  .creator-work-library-head { flex-direction: column; gap: 10px; }
  .creator-work-card { grid-template-columns: 64px minmax(0, 1fr); }
}
.decision-contract-card,
.contract-review-card,
.strategy-archive {
  margin-top: 16px;
  border: 1px solid #d9e8fb;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff 0%, #f7fbff 100%);
  box-shadow: 0 12px 32px rgba(19, 86, 164, .06);
}
.decision-contract-card { padding: 18px; }
.decision-contract-head,
.contract-review-head,
.strategy-archive-head,
.archive-section-title,
.evidence-column > header,
.insight-track-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.decision-contract-head > div { display: grid; gap: 6px; }
.decision-contract-head span,
.contract-review-head span,
.archive-section-title h4 { color: #1769e0; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.decision-contract-head strong { color: #102d4f; font-size: 17px; line-height: 1.55; }
.contract-status { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; background: #eaf3ff; color: #1769e0; font-size: 11px; font-style: normal; font-weight: 800; }
.contract-locked,.contract-published,.contract-reviewed { background: #e8f7ef; color: #198653; }
.contract-meta { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.contract-meta span { display: grid; gap: 5px; padding: 12px 14px; border: 1px solid #e3edf8; border-radius: 12px; color: #516a84; font-size: 12px; }
.contract-meta b { color: #1b3b5f; }
.contract-signals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 10px; }
.contract-signals > div { padding: 13px; border-radius: 12px; background: #edf6ff; color: #365675; font-size: 11px; line-height: 1.65; }
.contract-signals > div:nth-child(2) { background: #fff0f1; color: #9b3542; }
.contract-signals b { color: inherit; }
.contract-signals ul { margin: 7px 0 0; padding-left: 17px; }
.contract-review-card { padding: 16px 18px; }
.contract-review-head strong { color: #163a61; font-size: 15px; }
.experience-update-list { display: grid; gap: 9px; margin-top: 12px; }
.experience-update-list article { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; background: #f5f9fe; }
.experience-update-list p { margin: 0; color: #203f61; font-size: 12px; }
.experience-update-list span { color: #6f839a; font-size: 10px; }
.insight-track { padding: 5px 8px; border-radius: 7px; color: #1769e0; background: #e6f1ff; font-size: 10px; font-style: normal; font-weight: 800; }
.track-creator { color: #7354c4; background: #f0ebff; }

.strategy-archive { padding: 24px; }
.strategy-archive-head { padding-bottom: 20px; border-bottom: 1px solid #e2edf8; }
.strategy-archive-head h3 { margin: 5px 0 7px; color: #112f50; font-size: 22px; }
.strategy-archive-head > div > span { color: #6e8299; font-size: 12px; }
.strategy-maturity { display: grid; max-width: 290px; gap: 4px; padding: 13px 15px; border-radius: 13px; background: #eaf3ff; }
.strategy-maturity strong { color: #1769e0; font-size: 14px; }
.strategy-maturity span { color: #607a95; font-size: 10px; line-height: 1.55; }
.maturity-confirmed { background: #e8f7ef; }
.maturity-confirmed strong { color: #168552; }
.archive-section-title { align-items: center; margin: 24px 0 12px; }
.archive-section-title h4 { margin: 0 0 4px; font-size: 15px; letter-spacing: 0; }
.archive-section-title p { margin: 0; color: #7890a8; font-size: 11px; }
.archive-section-title > span { padding: 5px 9px; border-radius: 999px; color: #53708d; background: #edf3f9; font-size: 10px; font-weight: 700; }
.evidence-ledger-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.evidence-column,.insight-track-card { overflow: hidden; border: 1px solid #e0eaf5; border-radius: 14px; background: #fff; }
.evidence-column > header,.insight-track-card > header { padding: 14px; border-bottom: 1px solid #edf2f7; }
.evidence-column header div,.insight-track-card header div { display: grid; gap: 3px; }
.evidence-column header strong,.insight-track-card header strong { color: #183a5c; font-size: 13px; }
.evidence-column header span,.insight-track-card header span { color: #8092a6; font-size: 9px; line-height: 1.45; }
.evidence-column header b,.insight-track-card header b { display: grid; min-width: 27px; min-height: 27px; place-items: center; border-radius: 8px; color: #1769e0; background: #eaf3ff; font-size: 11px; }
.evidence-hypothesis header b { color: #9a6b12; background: #fff3d7; }
.evidence-unknown header b { color: #68788a; background: #edf1f5; }
.evidence-items,.insight-items { display: grid; gap: 8px; max-height: 390px; padding: 10px; overflow-y: auto; }
.evidence-items article,.insight-items article { padding: 11px 12px; border-radius: 10px; background: #f6faff; }
.evidence-hypothesis .evidence-items article { background: #fff9e9; }
.evidence-unknown .evidence-items article { background: #f3f5f7; }
.evidence-items p,.insight-items p { margin: 0; color: #244564; font-size: 11px; line-height: 1.65; }
.evidence-items article > div { display: grid; gap: 5px; margin-top: 8px; }
.evidence-items span { width: max-content; padding: 3px 6px; border-radius: 5px; color: #1769e0; background: #e7f1ff; font-size: 9px; font-weight: 700; }
.evidence-items small,.insight-items small { color: #7b8fa4; font-size: 9px; line-height: 1.5; }
.empty-inline { padding: 12px; color: #91a1b1 !important; text-align: center; }
.insight-tracks { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.insight-items article > div { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
.insight-items i,.insight-items em,.insight-items span { padding: 3px 6px; border-radius: 5px; font-size: 9px; font-style: normal; font-weight: 750; }
.insight-items i { color: #8a6518; background: #fff2d4; }
.insight-items em { color: #55708b; background: #edf3f8; }
.insight-items span { margin-left: auto; color: #6f8397; }
.insight-verified { border-left: 3px solid #21a26a; }
.insight-verified i { color: #167748; background: #e4f7ed; }
.insight-falsified { border-left: 3px solid #e05261; background: #fff4f5 !important; }
.insight-falsified i { color: #b12f42; background: #ffe2e6; }
@media (max-width: 1050px) {
  .contract-signals,.evidence-ledger-grid { grid-template-columns: 1fr; }
  .insight-tracks { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .decision-contract-head,.strategy-archive-head,.archive-section-title { flex-direction: column; }
  .contract-meta { grid-template-columns: 1fr; }
  .experience-update-list article { grid-template-columns: 1fr; }
  .strategy-archive { padding: 17px; }
}
