:root {
  color-scheme: light;
  --ink: #202320;
  --muted: #7b817b;
  --line: #e8eae6;
  --paper: #fff;
  --canvas: #f6f7f5;
  --green: #17795a;
  --green-dark: #12684c;
  --green-light: #eaf5ef;
  --violet: #775cc7;
  --amber: #b17b24;
  --shadow: 0 10px 32px rgba(22, 35, 27, .045);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 3; display: flex; flex-direction: column; width: 248px; padding: 27px 17px 17px; background: #fff; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 7px; }
.brand-mark { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 13px; background: #187958; color: #fff; font: 800 22px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; box-shadow: 0 5px 12px #17795a2c; }
.brand strong { display: block; font: 800 20px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: -.7px; }
.brand small { display: block; margin-top: 2px; color: #989d98; font-size: 8px; font-weight: 700; letter-spacing: 1.2px; }
.workspace-label, .eyebrow { color: #9a9f99; font-size: 9px; font-weight: 700; letter-spacing: 1.35px; }
.workspace-label { margin: 42px 9px 12px; }
.main-nav { display: grid; gap: 4px; }
.main-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 8px; color: #666d67; font-size: 13px; font-weight: 500; transition: .18s; }
.main-nav a span { width: 18px; color: #929992; font-size: 17px; text-align: center; }
.main-nav a:hover { background: #f6f8f6; color: var(--ink); }
.main-nav a.active { background: #eaf5ef; color: #187958; font-weight: 700; }
.main-nav a.active span { color: #187958; }
.sidebar-bottom { margin-top: auto; }
.local-indicator { display: flex; align-items: center; gap: 10px; margin-bottom: 17px; padding: 12px 11px; border: 1px solid #e6eee9; border-radius: 9px; background: #f8fbf9; }
.local-indicator > span, .status-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #2bac77; box-shadow: 0 0 0 3px #2bac7718; }
.local-indicator strong, .local-indicator small, .account-name strong, .account-name small { display: block; }
.local-indicator strong, .account-name strong { font-size: 11px; }
.local-indicator small, .account-name small { margin-top: 3px; color: #929992; font-size: 10px; }
.account-row { display: flex; align-items: center; gap: 9px; padding: 12px 5px 2px; border-top: 1px solid var(--line); }
.avatar { display: grid; width: 31px; height: 31px; flex: 0 0 31px; place-items: center; border-radius: 50%; background: #f0eee9; color: #666; font-weight: 700; font-size: 12px; }
.avatar-ai { background: #eaf5ef; color: #17795a; }
.account-name { flex: 1; min-width: 0; }
.icon-button { border: 0; background: transparent; color: #8e958f; font-size: 17px; }
.main-area { min-height: 100vh; margin-left: 248px; }
.topbar { position: sticky; top: 0; z-index: 2; display: flex; height: 57px; align-items: center; justify-content: space-between; padding: 0 40px; border-bottom: 1px solid var(--line); background: #ffffffed; backdrop-filter: blur(10px); }
.breadcrumb { color: #8d938d; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.breadcrumb span { margin: 0 8px; color: #c4c8c3; }
.topbar-right { display: flex; align-items: center; gap: 8px; color: #7f867f; font-size: 11px; }
.topbar-right .status-dot { width: 6px; height: 6px; flex-basis: 6px; }
.version-pill, .subtle-chip { padding: 5px 8px; border: 1px solid #e8eae6; border-radius: 5px; color: #8b918b; font-size: 9px; font-weight: 700; letter-spacing: .6px; }
.page-content { max-width: 1370px; margin: 0 auto; padding: 35px 40px 60px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-heading .eyebrow { margin: 0 0 8px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
h1 { margin-bottom: 7px; font-size: clamp(25px, 3vw, 32px); letter-spacing: -1.2px; line-height: 1.2; }
.muted { color: var(--muted); line-height: 1.65; }
.page-heading .muted { margin-bottom: 0; font-size: 13px; }
.button { display: inline-flex; min-height: 39px; align-items: center; justify-content: center; gap: 10px; padding: 0 15px; border: 1px solid transparent; border-radius: 7px; font-size: 12px; font-weight: 700; transition: .18s; }
.button-primary { background: var(--green); color: white; box-shadow: 0 3px 7px #17795a1e; }
.button-primary:hover { background: var(--green-dark); transform: translateY(-1px); }
.button-secondary { border-color: #e1e5e0; background: white; color: #39423b; }
.button-secondary:hover { border-color: #b8c9bc; background: #fbfdfb; }
.notice { display: flex; gap: 12px; margin-bottom: 22px; padding: 13px 15px; border: 1px solid; border-radius: 8px; }
.notice-info { border-color: #dfebe3; background: #f4faf6; }
.notice-warning { border-color: #f0e5ce; background: #fffbf2; }
.notice-icon { display: grid; width: 20px; height: 20px; flex: 0 0 20px; place-items: center; border-radius: 50%; background: #e3f1e8; color: var(--green); font-weight: 700; font-size: 11px; }
.notice-warning .notice-icon { background: #f6ebd4; color: #9a6818; }
.notice strong { font-size: 11px; }
.notice p { margin: 3px 0 0; color: #6f796f; font-size: 11px; line-height: 1.6; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin: 22px 0; }
.stat-card, .panel { border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: var(--shadow); }
.stat-card { min-height: 127px; padding: 17px 19px; }
.stat-label { display: flex; align-items: center; justify-content: space-between; color: #8b918b; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.stat-label span { color: #a7ada7; font-size: 15px; }
.stat-value { display: block; margin-top: 15px; font: 700 29px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: -1px; }
.stat-model { overflow: hidden; font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }
.stat-card p { margin: 4px 0 0; color: #929892; font-size: 10px; }
.dashboard-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 15px; }
.panel { padding: 20px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.panel-heading .eyebrow, .panel > .eyebrow { margin: 0 0 6px; }
.panel-heading h2, .panel > h2 { margin: 0; font-size: 16px; letter-spacing: -.4px; }
.quick-links { display: grid; }
.quick-links a { display: flex; align-items: center; gap: 11px; padding: 12px 0; border-top: 1px solid #f0f1ef; }
.quick-links a > span:nth-child(2) { flex: 1; }
.quick-links a strong, .quick-links a small { display: block; }
.quick-links a strong { font-size: 11px; }
.quick-links a small { margin-top: 3px; color: #909690; font-size: 10px; }
.quick-links a > b { color: #9ca29c; font-size: 14px; }
.quick-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 8px; font-size: 15px; }
.quick-icon.violet { background: #f1eefb; color: var(--violet); }
.quick-icon.green { background: #eaf5ef; color: var(--green); }
.quick-icon.amber { background: #fbf3e5; color: var(--amber); }
.recent-list { display: grid; }
.recent-item { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid #f0f1ef; }
.task-bullet { width: 7px; height: 7px; flex: 0 0 7px; margin-top: 4px; border-radius: 50%; background: #70b58c; }
.recent-item strong, .recent-item small { display: block; }
.recent-item strong { overflow: hidden; max-width: 360px; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.recent-item small { margin-top: 4px; color: #929892; font-size: 10px; }
.empty-state { display: flex; min-height: 175px; flex-direction: column; align-items: center; justify-content: center; padding: 20px; color: #777; text-align: center; }
.empty-state > span { margin-bottom: 10px; color: #aab3ab; font-size: 22px; }
.empty-state strong { color: #454b46; font-size: 12px; }
.empty-state p { max-width: 270px; margin: 5px 0 0; color: #929892; font-size: 11px; line-height: 1.6; }
.empty-state.compact { min-height: 100px; }
.text-link { color: var(--green); font-size: 10px; font-weight: 700; }
.principle-strip, .production-note { display: flex; align-items: center; gap: 14px; margin-top: 17px; padding: 16px 18px; border: 1px solid #e3e8e2; border-radius: 9px; background: #fbfcfa; }
.principle-icon { display: grid; width: 35px; height: 35px; flex: 0 0 35px; place-items: center; border-radius: 9px; background: #e9f4ed; color: var(--green); font-size: 18px; }
.principle-strip > div:nth-child(2), .production-note > div:nth-child(2) { flex: 1; }
.principle-strip strong, .production-note strong { font-size: 11px; }
.principle-strip p, .production-note p { margin: 4px 0 0; color: #7d857e; font-size: 10px; line-height: 1.6; }
.principle-strip > a { color: var(--green); font-size: 10px; font-weight: 700; white-space: nowrap; }
.message-stack { display: grid; gap: 8px; margin-bottom: 16px; }
.alert { padding: 11px 13px; border: 1px solid; border-radius: 7px; font-size: 12px; line-height: 1.5; }
.alert-error { border-color: #f0d6d4; background: #fff7f6; color: #963e36; }
.alert-success { border-color: #d8eadd; background: #f3faf5; color: #28744d; }
.alert-warning { border-color: #f0e5ce; background: #fffbf2; color: #85601e; }
.heading-tight { margin-bottom: 19px; }
.chat-layout { display: grid; height: min(690px, calc(100vh - 185px)); min-height: 500px; grid-template-columns: 205px minmax(0, 1fr); gap: 14px; }
.chat-history { padding: 13px 10px; overflow-y: auto; }
.history-heading { padding: 3px 8px 11px; color: #9a9f99; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.history-item { display: flex; gap: 8px; overflow: hidden; padding: 9px 8px; border-radius: 6px; color: #777e78; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.history-item.selected, .history-item:hover { background: #f0f6f1; color: #277651; }
.empty-note { padding: 7px; color: #999; font-size: 10px; }
.chat-panel { display: flex; min-width: 0; flex-direction: column; overflow: hidden; padding: 0; }
.chat-top { display: flex; min-height: 57px; align-items: center; gap: 9px; padding: 10px 16px; border-bottom: 1px solid #eef0ed; }
.chat-top > div:nth-child(2) { flex: 1; }
.chat-top strong, .chat-top small { display: block; }
.chat-top strong { font-size: 11px; }
.chat-top small { display: flex; align-items: center; gap: 7px; margin-top: 3px; color: #959b95; font-size: 9px; }
.chat-top small .status-dot { width: 5px; height: 5px; flex-basis: 5px; }
.chat-boundary { padding: 5px 8px; border-radius: 5px; background: #f8f4e9; color: #907338; font-size: 9px; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 22px clamp(16px, 5vw, 54px); }
.welcome-chat { display: flex; min-height: 100%; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.welcome-mark { display: grid; width: 45px; height: 45px; margin-bottom: 18px; place-items: center; border-radius: 14px; background: #eaf5ef; color: var(--green); font-size: 23px; }
.welcome-chat .eyebrow { margin-bottom: 8px; }
.welcome-chat h2 { margin-bottom: 7px; font-size: 20px; letter-spacing: -.6px; }
.welcome-chat > p:not(.eyebrow) { max-width: 320px; color: #8a918a; font-size: 11px; line-height: 1.6; }
.suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 12px; }
.suggestions button { padding: 8px 10px; border: 1px solid #e7ebe6; border-radius: 6px; background: white; color: #687069; font-size: 10px; }
.suggestions button:hover { border-color: #b6d6c2; color: var(--green); }
.chat-message { display: flex; gap: 10px; margin-bottom: 23px; }
.chat-message .avatar { width: 27px; height: 27px; flex-basis: 27px; font-size: 10px; }
.message-body { min-width: 0; padding-top: 1px; }
.message-name { color: #4d554e; font-size: 10px; font-weight: 700; }
.message-name time { margin-left: 8px; color: #a2a7a2; font-size: 9px; font-weight: 400; }
.message-text { margin-top: 6px; color: #555d56; font-size: 11px; line-height: 1.75; overflow-wrap: anywhere; }
.user-message .message-text { color: #333b34; }
.speak-button { margin-top: 7px; padding: 3px 7px; border: 1px solid #e8ece8; border-radius: 5px; background: white; color: #7d867e; font-size: 9px; }
.chat-composer { padding: 8px 17px 10px; border-top: 1px solid #eff1ee; }
.composer-box { padding: 9px 11px 7px; border: 1px solid #dfe5df; border-radius: 9px; box-shadow: 0 3px 10px #14291b08; }
.composer-box:focus-within { border-color: #a8cdb5; box-shadow: 0 0 0 3px #19815c0b; }
.composer-box textarea { display: block; width: 100%; min-height: 33px; max-height: 100px; resize: vertical; border: 0; outline: none; color: var(--ink); font-size: 11px; }
.composer-box textarea::placeholder { color: #a4aaa4; }
.composer-actions { display: flex; align-items: center; justify-content: space-between; }
.voice-hint { color: #a0a6a0; font-size: 9px; }
.composer-actions > div { display: flex; align-items: center; gap: 7px; }
.mic-button { width: 29px; height: 29px; border-radius: 6px; font-size: 13px; }
.send-button { width: 29px; height: 29px; border: 0; border-radius: 6px; background: var(--green); color: white; font-size: 17px; }
.composer-footnote { margin: 7px 0 0; color: #a0a6a0; font-size: 9px; text-align: center; }
.composer-footnote span { margin-left: 6px; }
.learning-grid { display: grid; grid-template-columns: .78fr 1.22fr; align-items: start; gap: 15px; }
.stack-form { display: grid; gap: 8px; }
.stack-form label, .field-wrap label { margin-top: 5px; color: #505851; font-size: 10px; font-weight: 700; }
.stack-form input, .stack-form textarea, .stack-form select, .field-wrap input { width: 100%; padding: 10px 11px; border: 1px solid #e1e5e0; border-radius: 6px; outline: none; background: white; color: #353c36; font-size: 11px; }
.stack-form textarea { min-height: 125px; resize: vertical; line-height: 1.6; }
.stack-form input:focus, .stack-form textarea:focus, .stack-form select:focus, .field-wrap input:focus { border-color: #a8cdb5; box-shadow: 0 0 0 3px #19815c0b; }
.stack-form .button { justify-self: start; margin-top: 8px; }
.field-error { color: #a4443e; font-size: 10px; }
.notes-panel { min-height: 280px; }
.count-pill { display: inline-grid; min-width: 20px; height: 20px; margin-left: 4px; place-items: center; border-radius: 10px; background: #f0f3ef; color: #747b74; font: 600 9px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; vertical-align: 2px; }
.lesson-card { padding: 14px 0; border-top: 1px solid #eff1ee; }
.lesson-meta { display: flex; align-items: center; gap: 10px; }
.lesson-category { padding: 4px 7px; border-radius: 4px; background: #eef5ef; color: #4d805e; font-size: 9px; font-weight: 600; }
.lesson-meta time { flex: 1; color: #9ba19b; font-size: 9px; }
.text-action { padding: 3px 0; border: 0; background: transparent; font-size: 9px; }
.danger { color: #ab625d; }
.lesson-card h3 { margin: 10px 0 5px; font-size: 13px; }
.lesson-card p { margin: 0; color: #777e78; font-size: 10px; line-height: 1.65; }
.create-task-panel { margin-bottom: 28px; }
.task-form { display: flex; align-items: end; gap: 10px; }
.field-wrap { display: grid; flex: 1; gap: 7px; }
.field-wrap label { margin-top: 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 12px; }
.section-heading .eyebrow { margin-bottom: 5px; }
.section-heading h2 { margin: 0; font-size: 17px; }
.task-list { display: grid; gap: 12px; }
.task-card { padding: 17px 19px 13px; }
.task-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.task-id { color: #9ba29b; font-size: 8px; font-weight: 700; letter-spacing: 1px; }
.task-card h3 { margin: 5px 0 0; font-size: 14px; }
.status-badge { padding: 5px 8px; border-radius: 5px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.status-proposed { background: #fbf3e5; color: #926719; }
.status-approved { background: #eef0fb; color: #5c62a4; }
.status-simulated { background: #eaf5ef; color: #28744d; }
.plan-steps { display: grid; gap: 0; margin: 16px 0; padding: 0; list-style: none; }
.plan-steps li { display: flex; gap: 11px; padding: 10px 0; border-top: 1px solid #f0f1ef; }
.step-number { padding-top: 1px; color: #9aa49b; font: 600 10px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.plan-steps li strong { font-size: 10px; }
.plan-steps li p { margin: 3px 0 0; color: #7e857e; font-size: 10px; line-height: 1.55; }
.task-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 11px; border-top: 1px solid #eff1ee; color: #969d96; font-size: 9px; }
.task-footer > div form { margin: 0; }
.task-footer .button { min-height: 32px; font-size: 10px; }
.simulation-note { color: #34815a; font-size: 10px; font-weight: 600; }
.settings-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 15px; align-items: start; }
.connection-pill { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 5px; background: #eaf5ef; color: #2c7951; font-size: 9px; font-weight: 700; }
.connection-pill span { width: 6px; height: 6px; border-radius: 50%; background: #33a66f; }
.connection-pill.offline { background: #fff1ef; color: #a94f47; }
.connection-pill.offline span { background: #c35b50; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid #eff1ee; color: #747c75; font-size: 10px; }
.setting-row code, code { padding: 3px 5px; border-radius: 4px; background: #f3f5f2; color: #4f6655; font-size: 10px; }
.settings-panel > .alert { margin-top: 10px; }
.settings-panel > .muted { font-size: 10px; }
.model-form { margin-top: 17px; padding-top: 13px; border-top: 1px solid #eff1ee; }
.capability-panel { padding: 22px; background: linear-gradient(145deg, #fff, #f7faf7); }
.capability-panel > h2 { margin: 7px 0 8px; font-size: 20px; line-height: 1.35; }
.capability-panel > .muted { font-size: 11px; }
.capability-list { display: grid; gap: 8px; margin-top: 20px; }
.capability-list > div { display: grid; grid-template-columns: 24px 1fr; gap: 2px 8px; padding: 9px 0; border-top: 1px solid #edf0ec; }
.capability-list span { grid-row: span 2; color: #86a28d; font: 600 9px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.capability-list strong { font-size: 10px; }
.capability-list small { color: #8c948d; font-size: 9px; }
.production-note { align-items: flex-start; margin-top: 15px; }
.production-note p { font-size: 10px; }
.audit-panel { padding: 4px 20px; }
.audit-row { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid #eff1ee; }
.audit-row:last-child { border-bottom: 0; }
.audit-indicator { width: 7px; height: 7px; flex: 0 0 7px; margin: 4px 0 0 2px; border-radius: 50%; background: #72ae86; }
.audit-content strong { font-size: 10px; }
.audit-content p { margin: 4px 0; color: #7d857e; font: 10px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.audit-content time { color: #a0a6a0; font-size: 9px; }
.login-screen { display: grid; min-height: 100vh; grid-template-columns: 1fr 1fr; background: white; }
.login-card { display: flex; width: min(360px, calc(100% - 48px)); flex-direction: column; justify-content: center; margin: auto; padding: 40px 0; }
.login-brand { margin: 0 0 58px; padding: 0; }
.login-card > .eyebrow { margin-bottom: 9px; }
.login-card h1 { font-size: 31px; }
.login-card > .muted { margin-bottom: 23px; font-size: 12px; }
.login-card .stack-form { gap: 9px; }
.login-card .stack-form input { min-height: 40px; }
.button-full { width: 100%; margin-top: 12px; }
.login-footnote { margin: 25px 0 0; color: #9ba19b; font-size: 10px; line-height: 1.6; text-align: center; }
.login-aside { position: relative; display: flex; overflow: hidden; flex-direction: column; align-items: flex-start; justify-content: center; padding: 12%; background: #f1f6f2; }
.login-aside .eyebrow { position: relative; z-index: 1; color: #508264; }
.login-aside h2 { position: relative; z-index: 1; margin: 13px 0 10px; font-size: clamp(30px, 4vw, 48px); letter-spacing: -2px; line-height: 1.13; }
.login-aside p { position: relative; z-index: 1; max-width: 340px; color: #79867b; font-size: 12px; line-height: 1.7; }
.orb { position: absolute; width: 380px; height: 380px; border: 1px solid #b4d2bc66; border-radius: 50%; }
.orb::before, .orb::after { position: absolute; inset: 36px; border: 1px solid #b4d2bc55; border-radius: 50%; content: ""; }
.orb::after { inset: 76px; }
.orb-large { right: -160px; bottom: -155px; width: 500px; height: 500px; }
@media (max-width: 1050px) {
  .sidebar { width: 210px; }
  .main-area { margin-left: 210px; }
  .page-content { padding-right: 25px; padding-left: 25px; }
  .topbar { padding: 0 25px; }
  .chat-layout { grid-template-columns: 165px minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .sidebar { position: static; width: auto; height: auto; padding: 12px 15px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand-mark { width: 34px; height: 34px; }
  .workspace-label, .sidebar-bottom { display: none; }
  .main-nav { display: flex; gap: 2px; margin-top: 12px; overflow-x: auto; }
  .main-nav a { flex: 0 0 auto; gap: 6px; padding: 8px; font-size: 10px; }
  .main-nav a span { width: auto; font-size: 13px; }
  .main-area { margin-left: 0; }
  .topbar { height: 46px; padding: 0 16px; }
  .page-content { padding: 24px 15px 40px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 20px; }
  .page-heading > .button, .page-heading > form { align-self: stretch; }
  .page-heading > form .button { width: 100%; }
  .stat-grid { grid-template-columns: 1fr; gap: 8px; margin: 14px 0; }
  .stat-card { min-height: 95px; padding: 13px 15px; }
  .stat-value { margin-top: 9px; font-size: 24px; }
  .dashboard-grid, .learning-grid, .settings-grid { grid-template-columns: 1fr; }
  .principle-strip { align-items: flex-start; flex-wrap: wrap; }
  .principle-strip > a { margin-left: 49px; }
  .chat-layout { height: calc(100vh - 220px); min-height: 460px; grid-template-columns: 1fr; }
  .chat-history { display: none; }
  .chat-scroll { padding: 17px 14px; }
  .chat-boundary { font-size: 8px; }
  .chat-composer { padding: 8px; }
  .composer-footnote span { display: none; }
  .task-form { align-items: stretch; flex-direction: column; }
  .task-form .button { align-self: flex-start; }
  .task-card { padding: 14px; }
  .task-footer { align-items: flex-start; flex-direction: column; gap: 10px; }
  .login-screen { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .login-card { min-height: 100vh; }
}

:root {
  --ink: #19251f;
  --muted: #718078;
  --line: #e5ebe6;
  --canvas: #f4f7f4;
  --green: #157653;
  --green-dark: #105d41;
  --green-light: #e7f4ec;
  --shadow: 0 12px 36px rgba(21, 52, 35, .055);
}
.sidebar { background: linear-gradient(180deg, #fff 0%, #fbfdfb 100%); }
.brand-mark { border-radius: 12px; background: linear-gradient(145deg, #208761, #126647); }
.main-nav a { border: 1px solid transparent; }
.main-nav a.active { border-color: #dcece1; background: linear-gradient(110deg, #edf7f0, #e7f3eb); }
.topbar { background: #ffffffeb; }
.page-heading h1 { color: #17261e; }
.panel, .stat-card { border-color: #e5ebe6; box-shadow: 0 10px 30px rgba(23, 49, 34, .045); }
.button { border-radius: 8px; }
.button-primary { background: linear-gradient(135deg, #1c855e, #126a49); }
.button-primary:hover { background: linear-gradient(135deg, #177451, #105d41); }
.chat-panel { position: relative; }
.chat-top { min-height: 64px; background: linear-gradient(90deg, #fff, #fbfdfb); }
.chat-scroll { scroll-behavior: smooth; }
.message-text { white-space: pre-wrap; }
.chat-message { animation: message-arrive .24s ease-out both; }
.pending-message { color: #718078; }
.thinking-indicator { display: flex; align-items: center; gap: 5px; margin-top: 10px; color: #6f8075; font-size: 11px; }
.thinking-indicator span { width: 6px; height: 6px; border-radius: 50%; background: #42a476; animation: thinking-pulse 1.2s infinite ease-in-out; }
.thinking-indicator span:nth-child(2) { animation-delay: .15s; }
.thinking-indicator span:nth-child(3) { margin-right: 4px; animation-delay: .3s; }
.thinking-indicator strong { font-weight: 500; }
.send-button:disabled { cursor: wait; opacity: .58; }
.chat-composer textarea:disabled { color: #8b958d; }
.composer-footnote { line-height: 1.55; }
.demo-section { margin: 2px 0 21px; }
.demo-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 11px; }
.demo-heading .eyebrow { margin: 0 0 5px; }
.demo-heading h2 { margin: 0; font-size: 16px; letter-spacing: -.35px; }
.demo-heading p:not(.eyebrow) { margin: 5px 0 0; color: #818b83; font-size: 10px; }
.demo-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.demo-card { display: flex; min-height: 139px; flex-direction: column; align-items: flex-start; padding: 12px; border: 1px solid #e2eae3; border-radius: 9px; background: linear-gradient(155deg, #fff 10%, #f9fcf9 100%); color: var(--ink); text-align: left; box-shadow: 0 5px 15px rgba(25, 57, 35, .035); transition: transform .18s, border-color .18s, box-shadow .18s; }
.demo-card:hover, .demo-card:focus-visible { transform: translateY(-2px); border-color: #afd2ba; outline: none; box-shadow: 0 9px 22px rgba(25, 92, 52, .09); }
.demo-card:disabled { cursor: wait; opacity: .65; transform: none; }
.demo-index { display: grid; width: 23px; height: 23px; margin-bottom: 10px; place-items: center; border-radius: 7px; background: #e8f4eb; color: #287a50; font-size: 9px; font-weight: 700; }
.demo-card > strong { font-size: 10px; }
.demo-card > small { margin-top: 5px; color: #849087; font-size: 9px; line-height: 1.45; }
.demo-cta { display: flex; width: 100%; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 9px; color: #36815b; font-size: 9px; font-weight: 700; }
.demo-cta b { font-size: 13px; }
.working-status { min-height: 0; margin: 0; color: #62806c; font-size: 10px; }
.working-status.visible { margin-top: 11px; }
#generate-plan-button:disabled { cursor: wait; opacity: .72; }
.login-screen { background: radial-gradient(ellipse at 85% 30%, #edf6ef 0%, #f6f9f6 42%, #fff 78%); }
.login-card { position: relative; z-index: 1; }
.login-card .stack-form input { border-color: #e0e8e1; border-radius: 8px; }
.login-card .stack-form input:focus { border-color: #94c2a2; box-shadow: 0 0 0 4px #19815c12; }
.login-aside { background: linear-gradient(150deg, #eef6ef 0%, #e9f2eb 60%, #e4efe7 100%); }
.login-aside h2 { color: #1b3326; }
.login-capabilities { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.login-capabilities span { padding: 7px 9px; border: 1px solid #cadfce; border-radius: 5px; background: #ffffff70; color: #53765d; font-size: 8px; font-weight: 700; letter-spacing: .7px; }
.auth-link { color: #167651; font-weight: 700; }
.auth-link:hover { text-decoration: underline; }
.public-messages { position: fixed; z-index: 5; top: 14px; left: 50%; width: min(440px, calc(100% - 28px)); transform: translateX(-50%); }
.field-help { color: #8b948d; font-size: 9px; line-height: 1.5; }
.login-footnote + .login-footnote { margin-top: 10px; }
@keyframes thinking-pulse { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes message-arrive { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1100px) {
  .demo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .demo-heading { align-items: flex-start; flex-direction: column; }
  .demo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-card { min-height: 130px; }
  .thinking-indicator { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, label:focus-visible { outline: 3px solid #54a87875; outline-offset: 2px; }
.sidebar { box-shadow: 6px 0 28px rgba(24, 52, 34, .025); }
.main-nav a { min-height: 42px; }
.page-content { width: 100%; }
.page-heading { align-items: flex-end; }
.page-heading .muted { max-width: 620px; }
.panel { border-radius: 13px; }
.stat-card { border-radius: 13px; }
.notice { border-radius: 10px; }
.chat-layout { height: min(760px, calc(100vh - 174px)); }
.chat-history { border-radius: 13px; }
.chat-panel { border-radius: 13px; }
.chat-top { padding: 11px 20px; }
.chat-scroll { padding-right: clamp(22px, 7vw, 88px); padding-left: clamp(22px, 7vw, 88px); }
.message-text { max-width: 780px; color: #37443b; font-size: 13px; line-height: 1.8; }
.message-name { font-size: 11px; }
.message-name time { font-size: 10px; }
.avatar-ai { border: 1px solid #dcebe0; }
.chat-composer { padding: 12px 20px 14px; background: linear-gradient(180deg, #fff, #fcfdfc); }
.composer-box { padding: 12px 13px 9px; border-color: #dce5dd; border-radius: 12px; }
.composer-box textarea { min-height: 42px; font-size: 13px; line-height: 1.6; }
.composer-tools { display: flex; align-items: center; gap: 5px; }
.attach-button { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 7px; color: #68786d; font-size: 20px; cursor: pointer; }
.attach-button:hover, .mic-button:hover { background: #f0f6f1; color: var(--green); }
.image-preview { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; padding: 8px 10px; border: 1px solid #e2ebe3; border-radius: 9px; background: #f8fbf8; color: #5e7063; font-size: 10px; }
.image-preview[hidden] { display: none; }
.image-preview img { width: 44px; height: 38px; border-radius: 5px; object-fit: cover; }
.image-preview span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-preview button { width: 25px; height: 25px; border: 0; border-radius: 6px; background: transparent; color: #79857c; font-size: 18px; }
.image-preview button:hover { background: #f0e9e8; color: #a35148; }
.composer-footnote { font-size: 9px; }
.demo-card { min-height: 150px; padding: 14px; border-radius: 11px; }
.demo-card > strong { font-size: 11px; }
.demo-card > small { font-size: 10px; }
.create-task-panel { border-radius: 13px; }
.task-card { border-radius: 12px; }
.plan-steps li strong { font-size: 11px; }
.plan-steps li p { max-width: 920px; font-size: 11px; line-height: 1.65; }
.settings-panel, .capability-panel { border-radius: 13px; }
.vision-capability { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding: 14px 0; border-top: 1px solid #edf1ed; }
.vision-capability strong, .image-generation-note strong { font-size: 11px; }
.vision-capability p, .image-generation-note p { max-width: 430px; margin: 4px 0 0; color: #7d897f; font-size: 10px; line-height: 1.6; }
.vision-capability .connection-pill { max-width: 45%; overflow-wrap: anywhere; text-align: right; }
.image-generation-note { margin-top: 2px; padding: 13px; border: 1px solid #e9ece8; border-radius: 8px; background: #fafbf9; }
.login-screen { min-height: 100svh; }
.login-card { width: min(400px, calc(100% - 48px)); }
.login-card .stack-form { gap: 11px; }
.login-card .stack-form label { margin-top: 7px; font-size: 11px; }
.login-card .stack-form input { min-height: 45px; }
.login-aside { padding: clamp(45px, 9vw, 130px); }
.login-aside p { font-size: 13px; }
.audit-row { padding: 17px 0; }
.audit-content strong { font-size: 11px; }
.audit-content p { font-size: 11px; }
.image-studio-grid { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); align-items: start; gap: 16px; }
.image-prompt-panel, .generated-image-panel { min-height: 360px; border-radius: 13px; }
.image-generation-form textarea { min-height: 110px; line-height: 1.6; }
.image-generation-form .button { justify-self: stretch; min-height: 43px; }
.image-model-note { margin: 3px 0; font-size: 10px; }
.image-service-alert { margin-bottom: 16px; }
.image-engine-empty { min-height: 225px; }
.image-canvas-empty { min-height: 285px; border: 1px dashed #e2eae2; border-radius: 10px; background: radial-gradient(ellipse at 48% 35%, #f2f8f3 0%, #fbfdfb 68%); }
.canvas-glyph { display: grid; width: 46px; height: 46px; margin-bottom: 12px; place-items: center; border: 1px solid #dceade; border-radius: 15px; background: #eef7f0; color: #3a8b5e; font-size: 23px; }
.generated-image-wrap { display: grid; justify-items: center; gap: 12px; }
.generated-image-wrap img { display: block; width: min(100%, 680px); max-height: 68vh; border: 1px solid #e7ece7; border-radius: 10px; background: #f6f8f6; object-fit: contain; }
.download-image { justify-self: end; }
.generated-prompt { display: grid; gap: 5px; margin: 14px 0 0; padding-top: 11px; border-top: 1px solid #edf0ed; color: #758077; font-size: 10px; line-height: 1.6; }
.generated-prompt strong { color: #4d5d51; }
#generate-image-button:disabled { cursor: wait; opacity: .7; }
.rental-assistance-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 16px; }
.rental-intake-panel, .rental-chat-panel, .rental-lead-card { border-radius: 13px; }
.rental-intro { margin: -3px 0 17px; color: #788279; font-size: 11px; line-height: 1.7; }
.rental-intake-form { display: grid; gap: 13px; }
.rental-intake-form .field-wrap { display: grid; gap: 6px; }
.rental-intake-form label { color: #515b53; font-size: 11px; font-weight: 650; }
.rental-intake-form input, .rental-intake-form textarea, .rental-chat-form textarea { width: 100%; padding: 11px 12px; border: 1px solid #e1e7e1; border-radius: 8px; background: #fff; color: var(--ink); font-size: 12px; line-height: 1.6; }
.rental-intake-form input:focus, .rental-intake-form textarea:focus, .rental-chat-form textarea:focus { border-color: #81b797; outline: 3px solid #54a87820; }
.rental-intake-form textarea, .rental-chat-form textarea { resize: vertical; }
.rental-intake-form .field-wrap:has(input[type="checkbox"]) { display: grid; grid-template-columns: 18px 1fr; align-items: start; gap: 9px; }
.rental-intake-form input[type="checkbox"] { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--green); }
.rental-intake-form .field-wrap:has(input[type="checkbox"]) label { line-height: 1.6; }
.rental-consent-note { margin: 0; color: #8a928b; font-size: 10px; line-height: 1.6; }
.rental-chat-history { display: flex; min-height: 290px; max-height: 450px; flex-direction: column; gap: 10px; overflow: auto; padding: 13px; border: 1px solid #edf0ed; border-radius: 10px; background: #fbfcfb; }
.rental-chat-bubble { width: fit-content; max-width: 92%; padding: 10px 12px; border: 1px solid #e8ece8; border-radius: 10px; background: #fff; }
.rental-chat-bubble.user-message { align-self: flex-end; border-color: #dcebe0; background: #f1f8f3; }
.rental-chat-bubble strong { display: block; margin-bottom: 4px; color: #5e7063; font-size: 10px; }
.rental-chat-bubble p { margin: 0; color: #39443b; font-size: 11px; line-height: 1.65; overflow-wrap: anywhere; }
.rental-chat-listings { display: grid; gap: 7px; width: min(94%, 480px); align-self: flex-start; }
.rental-chat-listings a { display: grid; gap: 4px; padding: 11px 12px; border: 1px solid #dfe9e1; border-radius: 9px; background: #fff; }
.rental-chat-listings a:hover { border-color: #a8cbb2; background: #f9fcf9; }
.rental-chat-listings strong { color: #34483a; font-size: 11px; }
.rental-chat-listings span { color: #6e7d70; font-size: 10px; line-height: 1.5; }
.rental-chat-listings small { color: var(--green); font-size: 9px; font-weight: 700; }
.rental-chat-form { display: grid; gap: 9px; margin-top: 12px; }
.rental-chat-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rental-chat-actions span { color: #929892; font-size: 9px; }
.rental-lead-list { display: grid; gap: 14px; }
.rental-lead-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.rental-lead-heading h2 { margin: 5px 0 3px; font-size: 17px; }
.rental-lead-inquiry { margin-top: 16px; padding: 13px; border-radius: 8px; background: #f8faf8; }
.rental-lead-inquiry strong, .rental-lead-email-state strong { color: #6b756d; font-size: 10px; }
.rental-lead-inquiry p { margin: 5px 0 0; color: #475249; font-size: 11px; line-height: 1.7; }
.rental-lead-email-state { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 15px; }
.rental-lead-email-state > div { display: grid; align-content: start; gap: 5px; }
.rental-lead-email-state span, .rental-lead-meta { color: #899189; font-size: 10px; }
.rental-lead-email-state p { margin: 0; color: #48524a; font-size: 10px; line-height: 1.65; }
.rental-lead-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; padding-top: 11px; border-top: 1px solid #edf0ed; }
.rental-lead-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.rental-lead-actions .button { min-height: 34px; padding: 0 10px; font-size: 10px; }
.rental-lead-actions form { margin: 0; }
.staff-lead-entry { margin-bottom: 15px; }
.staff-lead-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.staff-lead-form .field-wrap { display: grid; gap: 6px; }
.staff-lead-form .field-wrap:nth-child(3) { grid-column: 1 / -1; }
.staff-lead-form label { color: #515b53; font-size: 11px; font-weight: 650; }
.staff-lead-form input, .staff-lead-form textarea { width: 100%; padding: 10px 11px; border: 1px solid #e1e7e1; border-radius: 8px; background: #fff; font-size: 11px; }
.staff-lead-form .field-wrap:has(input[type="checkbox"]) { display: flex; grid-column: 1 / -1; align-items: center; gap: 8px; }
.staff-lead-form input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--green); }
.staff-lead-form .button { grid-column: 1 / -1; justify-self: start; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
@media (max-width: 760px) {
  .image-studio-grid { grid-template-columns: 1fr; }
  .rental-assistance-grid { grid-template-columns: 1fr; }
  .rental-lead-email-state { grid-template-columns: 1fr; }
  .staff-lead-form { grid-template-columns: 1fr; }
  .staff-lead-form .field-wrap:nth-child(3), .staff-lead-form .button { grid-column: auto; }
  .image-prompt-panel { min-height: auto; }
  .image-canvas-empty { min-height: 210px; }
  .sidebar-bottom { display: flex; margin-top: 8px; }
  .local-indicator { display: none; }
  .account-row { padding-top: 8px; }
  .main-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; overflow: visible; }
  .main-nav a { min-width: 0; justify-content: center; white-space: nowrap; }
  .main-nav a span { display: none; }
  .page-heading { align-items: flex-start; }
  .chat-layout { height: calc(100svh - 210px); min-height: 430px; }
  .chat-scroll { padding: 16px; }
  .chat-composer { padding: 10px; }
  .vision-capability { align-items: flex-start; flex-direction: column; }
  .vision-capability .connection-pill { max-width: 100%; text-align: left; }
  .demo-card { min-height: 140px; }
}
@media (max-width: 420px) {
  .main-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main-nav a { justify-content: flex-start; font-size: 10px; }
  .main-nav a span { display: block; }
  .topbar-right { font-size: 9px; }
  .version-pill { display: none; }
  .demo-grid { grid-template-columns: 1fr; }
  .demo-card { min-height: 118px; }
  .chat-boundary { display: none; }
}
