:root {
  color-scheme: dark;
  --bg: #111116;
  --surface: #19191f;
  --surface-2: #222229;
  --surface-hover: #292931;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f7f5ff;
  --muted: #9c99aa;
  --accent: #ff6a00;
  --accent-soft: rgba(255, 106, 0, 0.14);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f7f9;
  --surface: #ffffff;
  --surface-2: #f0f0f4;
  --surface-hover: #e9e9ef;
  --line: rgba(22, 22, 28, 0.09);
  --text: #1f1e25;
  --muted: #706d7b;
  --accent-soft: rgba(255, 106, 0, 0.1);
  --shadow: 0 18px 50px rgba(23, 22, 28, 0.08);
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; min-height: 0; overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, textarea, input { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.brand { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 720; letter-spacing: -0.02em; }
.brand b { color: #b8aeff; }
.brand--center { justify-content: center; }
.brand-logo { width: 29px; height: 29px; flex: 0 0 auto; }

.login-shell { min-height: 100%; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 24%, var(--accent-soft), transparent 33%), var(--bg); }
.login-card { width: min(100%, 430px); padding: 34px; border: 1px solid var(--line); border-radius: 28px; background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: var(--shadow); }
.login-copy { margin: 26px 0 24px; text-align: center; }
.login-copy h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: -0.04em; }
.login-copy p { margin: 0; color: var(--muted); line-height: 1.55; }
.login-form { display: grid; gap: 15px; }
.login-form label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.login-form input { width: 100%; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); color: var(--text); padding: 13px 14px; outline: none; }
.login-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.primary-button { border: 0; border-radius: 999px; padding: 13px 20px; background: var(--accent); color: white; font-weight: 720; cursor: pointer; }
.primary-button:hover { filter: brightness(1.06); }
.form-error { margin: -4px 0 0; color: #ff817a; font-size: 13px; }

.app-shell { width: 100%; height: 100vh; height: 100dvh; min-height: 0; max-height: 100dvh; display: grid; grid-template-columns: 270px minmax(0, 1fr); overflow: hidden; }
.sidebar { position: relative; z-index: 20; display: flex; min-width: 0; min-height: 0; height: 100%; overflow: hidden; flex-direction: column; border-right: 1px solid var(--line); background: var(--surface); }
.sidebar-head { display: flex; height: 64px; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--line); }
.client-picker { display: grid; gap: 6px; margin: 15px 16px 2px; }
.client-picker label { color: var(--muted); font-size: 10px; font-weight: 780; letter-spacing: 0.12em; text-transform: uppercase; }
.client-picker select { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 12px; outline: 0; background: var(--surface-2); color: var(--text); padding: 10px 34px 10px 11px; cursor: pointer; }
.client-picker select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.client-picker small { min-height: 16px; overflow: hidden; color: var(--muted); font-size: 10.5px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.main-nav { display: grid; gap: 3px; padding: 12px 10px 10px; border-bottom: 1px solid var(--line); }
.view-clients .main-nav, .view-audit .main-nav { align-content: start; flex: 1; }
.view-clients .chat-only, .view-audit .chat-only { display: none; }
.main-nav button { display: grid; grid-template-columns: 25px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.main-nav button:hover { background: var(--surface-hover); color: var(--text); }
.main-nav button.active { background: var(--surface-2); color: var(--text); box-shadow: inset 2px 0 #4d8dff; }
.nav-symbol { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 10px; font-weight: 800; }
.nav-count { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.nav-group-title { margin: 8px 10px 2px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.sidebar-section { display: flex; align-items: center; gap: 8px; padding: 14px 16px 8px; }
.sidebar-section > p { margin: 0; color: var(--muted); font-size: 9.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.new-chat-button { display: flex; align-items: center; justify-content: center; gap: 5px; margin-left: auto; padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); font-size: 10.5px; cursor: pointer; }
.new-chat-button:hover { background: var(--surface-hover); }
.chat-list { min-height: 0; flex: 1; overflow-y: auto; padding: 0 10px 12px; }
.chat-list button { width: 100%; padding: 11px 12px; border: 0; border-radius: 11px; background: transparent; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.chat-list button:hover { background: var(--surface-hover); color: var(--text); }
.chat-list button.active { background: var(--accent-soft); color: var(--text); box-shadow: inset 2px 0 var(--accent); }
.sidebar-foot { display: flex; align-items: center; gap: 7px; padding: 15px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #59d88b; box-shadow: 0 0 0 4px rgba(89, 216, 139, 0.1); }
.text-button { margin-left: auto; border: 0; background: none; color: var(--muted); cursor: pointer; }

.chat-layout { position: relative; display: grid; min-width: 0; min-height: 0; height: 100%; overflow: hidden; grid-template-rows: 64px minmax(0, 1fr) auto auto auto; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 0 22px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 91%, transparent); backdrop-filter: blur(16px); }
.chat-head > div:not(.orb) { display: grid; gap: 2px; min-width: 0; }
.chat-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.chat-head small { color: var(--muted); font-size: 11px; }
.head-action { margin-left: auto; }
.icon-button { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.icon-button:hover { background: var(--surface-hover); }

.empty-state { align-self: center; justify-self: center; width: min(760px, calc(100% - 36px)); text-align: center; padding: 34px 0; }
.empty-state h1 { margin: 8px 0 10px; font-size: clamp(28px, 4vw, 48px); letter-spacing: -0.05em; }
.empty-state > p:not(.eyebrow) { max-width: 540px; margin: 0 auto; color: var(--muted); line-height: 1.6; }
.eyebrow { margin: 26px 0 0; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 0.15em; }
.prompt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 30px auto 0; max-width: 620px; }
.prompt-grid button { padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; text-align: left; }
.prompt-grid button:hover { border-color: rgba(255, 106, 0, 0.45); background: var(--accent-soft); }

.messages { width: 100%; max-width: 100%; min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; -webkit-overflow-scrolling: touch; padding: 34px max(24px, calc((100% - 820px) / 2)) 16px; scroll-behavior: smooth; }
.message { display: grid; max-width: 100%; min-width: 0; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; margin: 0 0 26px; }
.message.user { grid-template-columns: minmax(0, 1fr); }
.message.user .bubble { justify-self: end; max-width: min(78%, 650px); padding: 12px 15px; border-radius: 18px 18px 5px 18px; background: var(--surface-2); white-space: pre-wrap; line-height: 1.55; }
.message .bubble { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.message.assistant .bubble { max-width: 100%; min-width: 0; line-height: 1.68; }
.message.assistant .bubble > :first-child { margin-top: 0; }
.message.assistant .bubble > :last-child { margin-bottom: 0; }
.message.assistant .bubble p { margin: 0 0 12px; }
.message.assistant .bubble p:last-child { margin-bottom: 0; }
.message.assistant .bubble h1, .message.assistant .bubble h2, .message.assistant .bubble h3 { margin: 22px 0 10px; line-height: 1.25; letter-spacing: -0.025em; }
.message.assistant .bubble h1 { font-size: 22px; }
.message.assistant .bubble h2 { font-size: 18px; }
.message.assistant .bubble h3 { font-size: 15px; }
.message.assistant .bubble ul, .message.assistant .bubble ol { margin: 9px 0 15px; padding-left: 24px; }
.message.assistant .bubble li { margin: 5px 0; padding-left: 2px; }
.message.assistant .bubble blockquote { margin: 14px 0; padding: 2px 0 2px 14px; border-left: 3px solid var(--accent); color: var(--muted); }
.message.assistant .bubble hr { margin: 22px 0; border: 0; border-top: 1px solid var(--line); }
.message.assistant .bubble pre { max-width: 100%; overflow-x: auto; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); white-space: pre; }
.message.assistant .bubble code { padding: 2px 5px; border-radius: 5px; background: var(--surface-2); }
.message.assistant .bubble pre code { padding: 0; background: transparent; }
.message.assistant .bubble a { color: var(--accent); }
.table-wrap { position: relative; display: block; width: 100%; max-width: 100%; margin: 16px 0; overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 8px 26px rgba(0, 0, 0, 0.08); scrollbar-gutter: stable; -webkit-overflow-scrolling: touch; }
.table-wrap:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.message.assistant table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; line-height: 1.45; }
.message.assistant th, .message.assistant td { min-width: 112px; max-width: 360px; padding: 11px 13px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.message.assistant th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--text); font-size: 11.5px; font-weight: 780; letter-spacing: 0.015em; }
.message.assistant th:last-child, .message.assistant td:last-child { border-right: 0; }
.message.assistant tbody tr:last-child td { border-bottom: 0; }
.message.assistant tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 46%, transparent); }
.message.assistant tbody tr:hover { background: var(--accent-soft); }
.message.assistant td.numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-card { width: 100%; max-width: 100%; margin: 16px 0; padding: 16px 16px 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 8px 26px rgba(0, 0, 0, 0.08); }
.chart-frame { position: relative; width: 100%; height: 340px; min-height: 260px; }
.message.assistant .bubble pre.chart-error { position: relative; padding-top: 42px; border-color: rgba(255, 106, 0, 0.35); }
.message.assistant .bubble pre.chart-error::before { content: attr(data-error); position: absolute; inset: 10px 12px auto; color: var(--accent); font-family: Inter, ui-sans-serif, sans-serif; font-size: 12px; font-weight: 700; }
.assistant-mark { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; }
.thinking { color: var(--muted); }
.thinking::after { content: ""; display: inline-block; width: 18px; height: 4px; margin-left: 7px; border-radius: 99px; background: linear-gradient(90deg, var(--accent) 30%, transparent 30% 40%, var(--accent) 40% 70%, transparent 70% 80%, var(--accent) 80%); animation: pulse 1s infinite; }

.recommendations { width: min(820px, calc(100% - 36px)); margin: 0 auto 12px; padding: 15px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--surface) 94%, var(--accent) 6%); box-shadow: 0 10px 34px rgba(0, 0, 0, 0.1); }
.recommendations-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.recommendations-kicker { margin: 0 0 4px; color: var(--accent); font-size: 9.5px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.recommendations-head h2 { margin: 0; font-size: 15px; letter-spacing: -0.015em; }
.recommendations-head > div > p:last-child { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.recommendations-refresh { flex: 0 0 auto; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 11px; cursor: pointer; }
.recommendations-refresh:hover { border-color: rgba(255, 106, 0, 0.4); color: var(--text); }
.recommendations-refresh:disabled { cursor: default; opacity: 0.55; }
.recommendations-state { margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.recommendations-state:empty { display: none; }
.recommendations-state.is-error { color: #ff817a; }
.recommendations-list { display: grid; grid-auto-columns: minmax(245px, 1fr); grid-auto-flow: column; gap: 10px; margin-top: 12px; padding-bottom: 2px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.recommendation-card { display: flex; min-height: 148px; flex-direction: column; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.recommendation-card-head { display: flex; align-items: center; gap: 8px; }
.recommendation-priority { padding: 4px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.recommendation-priority[data-priority="high"] { background: rgba(255, 106, 0, 0.14); color: var(--accent); }
.recommendation-priority[data-priority="medium"] { background: rgba(242, 177, 52, 0.14); color: #dca126; }
.recommendation-card h3 { margin: 9px 0 5px; font-size: 13px; line-height: 1.3; }
.recommendation-card p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.recommendation-impact { margin-top: 8px !important; color: var(--text) !important; font-weight: 650; }
.recommendation-discuss { align-self: flex-start; margin-top: auto; padding: 9px 0 0; border: 0; background: transparent; color: var(--accent); font-size: 11px; font-weight: 720; cursor: pointer; }
.recommendation-discuss:hover { text-decoration: underline; }

.composer { width: min(820px, calc(100% - 36px)); margin: 0 auto; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); box-shadow: var(--shadow); padding: 12px; }
.composer:focus-within { border-color: rgba(255, 106, 0, 0.55); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.composer textarea { display: block; width: 100%; max-height: 180px; resize: none; overflow-y: auto; border: 0; outline: 0; background: transparent; color: var(--text); padding: 2px 4px 9px; line-height: 1.5; }
.composer-foot { display: flex; align-items: center; gap: 12px; }
.composer-foot span { color: var(--muted); font-size: 11px; }
.composer-foot button { display: grid; width: 35px; height: 35px; margin-left: auto; place-items: center; border: 0; border-radius: 50%; background: var(--accent); color: #fff; font-size: 20px; cursor: pointer; }
.composer-foot button:disabled { opacity: 0.45; cursor: default; }
.disclaimer { margin: 8px auto 12px; color: var(--muted); font-size: 10.5px; text-align: center; }

.orb { position: relative; overflow: hidden; flex: 0 0 auto; border-radius: 50%; background: #ff6a00; box-shadow: 0 0 28px rgba(255, 106, 0, 0.22); }
.orb i { position: absolute; inset: 10%; border-radius: 43% 57% 62% 38%; background: rgba(255, 224, 163, 0.54); filter: blur(3px); animation: orbit 6s ease-in-out infinite alternate; }
.orb i:nth-child(2) { inset: 24% 8% 7% 27%; background: rgba(143, 47, 255, 0.38); animation-duration: 8s; animation-direction: alternate-reverse; }
.orb i:nth-child(3) { inset: 7% 32% 29% 9%; background: rgba(255, 255, 255, 0.5); animation-duration: 5s; }
.orb--small { width: 30px; height: 30px; }
.orb--large { width: 78px; height: 78px; margin: 28px auto 0; }
.orb--hero { width: 92px; height: 92px; margin: auto; }
.mobile-only { display: none; }
.scrim { position: fixed; inset: 0; z-index: 10; border: 0; background: rgba(0, 0, 0, 0.52); }

.page-layout { min-width: 0; min-height: 0; height: 100%; overflow-y: auto; padding: 38px clamp(22px, 4vw, 56px) 64px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; max-width: 1180px; margin: 0 auto 24px; }
.page-kicker { margin: 0 0 6px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.page-head h1 { margin: 0 0 8px; font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.04em; }
.page-head > div > p:last-child { max-width: 680px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.page-actions { display: flex; align-items: center; gap: 8px; }
.secondary-button { flex: 0 0 auto; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer; }
.secondary-button:hover { background: var(--surface-hover); }
.metric-grid { display: grid; max-width: 1180px; margin: 0 auto 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.metric-card { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.metric-card span { display: block; color: var(--muted); font-size: 10.5px; }
.metric-card strong { display: block; margin-top: 7px; font-size: 21px; font-variant-numeric: tabular-nums; letter-spacing: -0.035em; }
.content-card { max-width: 1180px; margin: 0 auto 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.content-card-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px; border-bottom: 1px solid var(--line); }
.content-card h2 { margin: 0; font-size: 15px; }
.content-card-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.clients-toolbar { display: flex; align-items: center; gap: 8px; }
.clients-toolbar input, .clients-toolbar select { height: 36px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: var(--surface-2); color: var(--text); padding: 0 11px; font-size: 11.5px; }
.clients-toolbar input { width: 220px; }
.clients-toolbar input:focus, .clients-toolbar select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.page-state { padding: 18px; color: var(--muted); font-size: 12px; }
.page-state:empty { display: none; }
.clients-list { display: grid; }
.client-row { display: grid; grid-template-columns: minmax(180px, 1.55fr) repeat(4, minmax(80px, 0.75fr)) minmax(122px, auto); align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.client-row:last-child { border-bottom: 0; }
.client-row:hover { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.client-identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.client-avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--accent); font-size: 11px; font-weight: 800; }
.client-identity strong, .client-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-identity strong { font-size: 12.5px; }
.client-identity small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.client-stat span { display: block; color: var(--muted); font-size: 9.5px; }
.client-stat strong { display: block; margin-top: 4px; font-size: 12px; font-variant-numeric: tabular-nums; }
.client-attention { color: var(--accent) !important; }
.open-client { padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); font-size: 10.5px; cursor: pointer; }
.open-client:hover { border-color: rgba(255, 106, 0, 0.45); background: var(--accent-soft); }
.connect-card { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 20px; }
.connect-card > div > p:last-child { max-width: 760px; margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.primary-button.compact { flex: 0 0 auto; padding: 10px 15px; font-size: 11.5px; }
.audit-empty { display: flex; min-height: 420px; align-items: center; justify-content: center; flex-direction: column; padding: 48px 24px; text-align: center; }
.audit-icon { width: 62px; height: 62px; margin-bottom: 24px; }
.audit-empty h2 { margin: 0 0 9px; font-size: 22px; letter-spacing: -0.025em; }
.audit-empty > p { max-width: 560px; margin: 0 0 22px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.audit-empty .primary-button { min-width: 190px; }
.audit-status { min-height: 18px; margin: 14px 0 0 !important; color: var(--muted); font-size: 11.5px !important; }
.audit-status.is-error { color: #ff817a; }
.audit-overview { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; padding: 22px; }
.audit-overview h2 { margin: 0 0 8px; font-size: 19px; letter-spacing: -0.025em; }
.audit-overview-copy { max-width: 850px; margin: 0; color: var(--text); font-size: 13px; line-height: 1.65; }
.audit-meta { margin: 9px 0 0; color: var(--muted); font-size: 10.5px; }
.audit-findings-card select { height: 36px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: var(--surface-2); color: var(--text); padding: 0 11px; font-size: 11.5px; }
.audit-findings-card select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.audit-findings { display: grid; }
.audit-finding { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 16px; padding: 18px; border-bottom: 1px solid var(--line); }
.audit-finding:last-child { border-bottom: 0; }
.audit-severity { align-self: start; justify-self: start; padding: 5px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.audit-severity[data-severity="critical"] { background: rgba(229, 79, 141, 0.14); color: #e54f8d; }
.audit-severity[data-severity="warning"] { background: rgba(255, 106, 0, 0.14); color: var(--accent); }
.audit-severity[data-severity="opportunity"] { background: rgba(45, 185, 163, 0.14); color: #2db9a3; }
.audit-finding-category { margin: 0 0 5px; color: var(--muted); font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.audit-finding h3 { margin: 0 0 7px; font-size: 13.5px; }
.audit-finding p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.audit-finding-recommendation { margin-top: 8px !important; color: var(--text) !important; }
.audit-discuss { align-self: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 10.5px; cursor: pointer; }
.audit-discuss:hover { border-color: rgba(255, 106, 0, 0.45); background: var(--accent-soft); }
.audit-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 20px; }
.audit-details h2 { margin: 0 0 10px; font-size: 13px; }
.audit-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.audit-tags span { padding: 6px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 10px; }
.audit-details ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 11.5px; line-height: 1.55; }

@keyframes orbit { to { transform: rotate(60deg) scale(1.22) translate(3px, -2px); border-radius: 62% 38% 45% 55%; } }
@keyframes pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; } }

@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .mobile-only { display: grid; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(86vw, 320px); height: 100vh; height: 100dvh; transform: translateX(-102%); transition: transform 180ms ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .chat-head { padding: 0 13px; }
  .messages { padding: 24px 15px 12px; }
  .message.user .bubble { max-width: 88%; }
  .message.assistant th, .message.assistant td { min-width: 104px; max-width: 260px; padding: 10px 11px; }
  .chart-card { padding: 12px 10px 8px; border-radius: 14px; }
  .chart-frame { height: 300px; min-height: 240px; }
  .prompt-grid { grid-template-columns: 1fr; }
  .composer { width: calc(100% - 20px); border-radius: 17px; }
  .recommendations { width: calc(100% - 20px); margin-bottom: 9px; padding: 13px; border-radius: 16px; }
  .recommendations-head { align-items: center; }
  .recommendations-head > div > p:last-child { max-width: 220px; }
  .recommendations-list { grid-auto-columns: minmax(248px, 86vw); }
  .recommendation-card { min-height: 140px; }
  .composer-foot span { display: none; }
  .disclaimer { padding: 0 12px; }
  .empty-state { padding: 18px 0; }
  .orb--hero { width: 76px; height: 76px; }
  .login-card { padding: 28px 22px; }
  .page-layout { padding: 24px 12px 48px; }
  .page-head { align-items: center; }
  .page-head .secondary-button { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-card-head { align-items: stretch; flex-direction: column; }
  .clients-toolbar { align-items: stretch; flex-direction: column; }
  .clients-toolbar input { width: 100%; }
  .client-row { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .client-row .client-stat { display: none; }
  .connect-card { align-items: flex-start; flex-direction: column; }
  .audit-overview { flex-direction: column; }
  .audit-finding { grid-template-columns: 1fr; gap: 10px; }
  .audit-discuss { justify-self: start; }
  .audit-details { grid-template-columns: 1fr; }
}
