:root {
  --navy-950: #06152f;
  --navy-900: #071c43;
  --navy-800: #0b2b5d;
  --ink: #12213f;
  --muted: #667695;
  --line: #dfe6f0;
  --line-soft: #e9eef5;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --blue: #0878f9;
  --blue-600: #0969dc;
  --blue-soft: #eaf4ff;
  --cyan: #06b6d4;
  --green: #16a66a;
  --green-soft: #eaf8f1;
  --orange: #f58a18;
  --orange-soft: #fff3e5;
  --red: #e24b4b;
  --red-soft: #fff0f0;
  --violet: #6956d9;
  --violet-soft: #f0edff;
  --shadow-sm: 0 1px 2px rgba(9, 32, 68, 0.05), 0 8px 24px rgba(9, 32, 68, 0.04);
  --shadow-md: 0 16px 48px rgba(9, 32, 68, 0.13);
  --radius: 16px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(8, 120, 249, 0.2);
  outline-offset: 2px;
}

.icon { width: 20px; height: 20px; display: inline-block; flex: 0 0 auto; }
.app-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 18px 20px;
  color: #e9f3ff;
  background:
    radial-gradient(circle at 28% -5%, rgba(17, 126, 255, 0.38), transparent 28%),
    linear-gradient(160deg, var(--navy-950), var(--navy-900) 48%, #062650);
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 22px; }
.brand-mark {
  position: relative; width: 38px; height: 46px; display: grid; place-items: end center;
}
.brand-flame {
  width: 24px; height: 38px; border: 2px solid #2da3ff; border-radius: 65% 35% 58% 42%;
  transform: rotate(34deg); box-shadow: inset 0 0 0 6px rgba(0, 126, 255, 0.08);
}
.brand-flame::after {
  content: ""; position: absolute; width: 10px; height: 17px; left: 13px; bottom: 4px;
  border: 2px solid #2da3ff; border-radius: 60% 40%; transform: rotate(-20deg);
}
.brand-name { font-size: 21px; font-weight: 760; letter-spacing: 0.08em; }
.brand-caption { margin-top: 2px; color: #9ab4d5; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
.sidebar-kicker { padding: 0 12px 11px; color: #7493bb; font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.nav-section { margin-bottom: 22px; }
.nav-divider { height: 1px; margin: 8px 10px 20px; background: rgba(255, 255, 255, 0.1); }
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 12px; margin: 3px 0;
  color: #bed0e7; background: transparent; border: 0; border-radius: 11px; text-align: left;
  font-size: 14px; transition: 160ms ease;
}
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.075); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(6, 119, 241, 0.9), rgba(6, 119, 241, 0.42)); box-shadow: 0 8px 18px rgba(0, 103, 222, 0.23); }
.nav-item .nav-label { flex: 1; }
.nav-pill { padding: 2px 7px; color: #a9c8f0; background: rgba(255, 255, 255, 0.08); border-radius: 999px; font-size: 10px; }
.sidebar-footer { margin-top: 26px; padding: 14px; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; background: rgba(255,255,255,.045); }
.quena-row { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 650; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #4bd491; box-shadow: 0 0 0 5px rgba(75, 212, 145, .12); }
.sidebar-footer p { margin: 8px 0 0; color: #8da8ca; font-size: 11px; line-height: 1.5; }

.workspace { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 15; height: 72px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 30px; background: rgba(255,255,255,.9); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(214, 224, 236, .8);
}
.icon-button.mobile-menu { display: none; }
.topbar-context { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.topbar-context strong { color: var(--ink); }
.environment-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; color: #166749; background: var(--green-soft); border-radius: 999px; font-weight: 700; font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.icon-button { position: relative; display: grid; place-items: center; width: 38px; height: 38px; color: #53698b; background: transparent; border: 1px solid transparent; border-radius: 11px; }
.icon-button:hover { color: var(--blue); background: var(--blue-soft); }
.notification-dot { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; display: grid; place-items: center; color: white; background: #ee3d3d; border: 2px solid #fff; border-radius: 999px; font-size: 9px; font-weight: 800; }
.user-menu { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; background: transparent; border: 0; border-radius: 12px; }
.user-menu:hover { background: #f3f6fa; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; color: white; background: linear-gradient(145deg, #183a70, #0e1a31); border: 3px solid #e6ecf4; border-radius: 50%; font-weight: 760; font-size: 12px; }
.user-copy { text-align: left; }
.user-copy strong { display: block; font-size: 13px; }
.user-copy span { color: var(--muted); font-size: 11px; }

.content { width: min(1440px, 100%); margin: 0 auto; padding: 30px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.eyebrow { margin-bottom: 8px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
.page-head h1 { margin-bottom: 5px; font-size: clamp(26px, 2.7vw, 38px); letter-spacing: -.035em; }
.page-subtitle { max-width: 730px; margin: 0; color: var(--muted); line-height: 1.55; font-size: 14px; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 15px;
  border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); font-weight: 700; font-size: 13px;
  box-shadow: 0 1px 1px rgba(7, 28, 67, .03); transition: 150ms ease;
}
.button:hover { transform: translateY(-1px); border-color: #c5d2e2; box-shadow: var(--shadow-sm); }
.button.primary { color: white; border-color: var(--blue); background: linear-gradient(145deg, #0a83ff, #086be4); }
.button.ghost { background: transparent; box-shadow: none; }
.button.danger { color: var(--red); border-color: #f1cece; background: #fff8f8; }
.button.small { min-height: 34px; padding: 7px 11px; font-size: 12px; }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; }

.grid { display: grid; gap: 16px; }
.home-grid { grid-template-columns: minmax(0, 1.75fr) minmax(280px, .75fr); }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.two-col { grid-template-columns: minmax(0, 1.45fr) minmax(320px, .72fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head h2, .section-head h3 { margin: 0; font-size: 16px; letter-spacing: -.015em; }
.section-head a, .text-button { color: var(--blue); background: none; border: 0; font-weight: 700; font-size: 12px; text-decoration: none; }
.muted { color: var(--muted); }

.assistant-stage {
  position: relative; overflow: visible; min-height: 354px; padding: 34px 30px 24px;
  background:
    linear-gradient(180deg, rgba(244, 249, 255, .92), rgba(255, 255, 255, .98) 62%),
    radial-gradient(circle at 78% -20%, rgba(8, 120, 249, .13), transparent 45%);
  border-color: #d5e1ef;
}
.assistant-stage::before {
  content: ""; position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(8, 120, 249, .45), transparent);
}
.assistant-stage-head { text-align: center; }
.hero-status { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 24px; color: #537095; font-size: 11px; font-weight: 650; }
.assistant-stage h1 { margin-bottom: 9px; color: #0b2247; font-size: clamp(31px, 3.5vw, 47px); line-height: 1.08; letter-spacing: -.045em; }
.assistant-stage .lead { max-width: 720px; margin: 0 auto 25px; color: #667b99; line-height: 1.55; }
.assistant-search-shell { position: relative; z-index: 4; max-width: 920px; margin: 0 auto; }
.model-select { height: 44px; padding: 0 31px 0 12px; color: #244367; background: #f0f0ff; border: 0; border-radius: 10px; font-weight: 700; font-size: 12px; margin-left: 4px; }
.model-warning { color: #e24b4b; font-size: 12px; font-weight: 600; margin-left: 8px; animation: pulse-warning 2s infinite; }
@keyframes pulse-warning { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.composer-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.composer-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 4px; }
.assistant-select { height: 44px; max-width: 184px; padding: 0 31px 0 12px; color: #244367; background: #edf5ff; border: 0; border-radius: 10px; font-weight: 700; font-size: 12px; }
.composer input { min-width: 0; height: 44px; padding: 0 10px; border: 0; color: var(--ink); }
.composer input::placeholder { color: #8997ae; }
.composer .icon-button { color: #6680a3; }
.send-button { width: 44px; height: 44px; display: grid; place-items: center; color: white; background: var(--blue); border: 0; border-radius: 11px; }
.send-button:hover { background: var(--blue-600); }
.hero-hints { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; color: #7b8da6; font-size: 10px; }
.hero-hints button { padding: 5px 9px; color: #35618f; background: #f4f8fd; border: 1px solid #dce7f2; border-radius: 999px; font-size: 10px; }
.hero-hints button:hover { color: var(--blue); background: var(--blue-soft); border-color: #b5d6fa; }

.chat-card { padding: 20px; margin-top: 16px; }
.message { display: flex; gap: 11px; margin-top: 14px; }
.message:first-child { margin-top: 0; }
.message-avatar { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; color: white; background: var(--blue); border-radius: 9px; font-size: 11px; font-weight: 800; }
.message.user .message-avatar { background: #26364f; }
.message-body { max-width: 780px; padding: 11px 14px; background: #f3f7fb; border-radius: 3px 13px 13px 13px; line-height: 1.55; font-size: 13px; }
.message.user .message-body { background: #edf5ff; }
.message-meta { margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.citations { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.citation { padding: 5px 8px; color: #275889; background: #fff; border: 1px solid #d7e2ef; border-radius: 7px; font-size: 10px; }
.typing { display: inline-flex; gap: 4px; padding: 5px 0; }
.typing i { width: 5px; height: 5px; background: #89a0bf; border-radius: 50%; animation: bounce 1s infinite; }
.typing i:nth-child(2) { animation-delay: .16s; }.typing i:nth-child(3) { animation-delay: .32s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }

.metric-card { padding: 17px; }
.metric-top { display: flex; justify-content: space-between; gap: 12px; }
.metric-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 11px; }
.metric-icon.green { color: var(--green); background: var(--green-soft); }
.metric-icon.orange { color: var(--orange); background: var(--orange-soft); }
.metric-icon.violet { color: var(--violet); background: var(--violet-soft); }
.metric-value { margin-top: 12px; font-size: 25px; font-weight: 770; letter-spacing: -.035em; }
.metric-label { margin-top: 3px; color: var(--muted); font-size: 11px; }
.delta { align-self: flex-start; padding: 4px 7px; color: #168259; background: var(--green-soft); border-radius: 999px; font-size: 10px; font-weight: 750; }
.delta.neutral { color: #637797; background: #f1f4f8; }

.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.quick-action { display: flex; gap: 11px; align-items: center; padding: 13px; text-align: left; background: #fff; border: 1px solid var(--line-soft); border-radius: 12px; transition: 140ms ease; }
.quick-action:hover { border-color: #bcd5f4; background: #f9fcff; transform: translateY(-1px); }
.quick-action .mini-icon { width: 32px; height: 32px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 9px; }
.quick-action strong { display: block; margin-bottom: 3px; font-size: 12px; }
.quick-action span { color: var(--muted); font-size: 10px; }

.assistant-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.assistant-card { min-height: 112px; padding: 14px; text-align: left; background: white; border: 1px solid var(--line); border-radius: 13px; transition: 150ms ease; }
.assistant-card:hover, .assistant-card.active { border-color: #9fc7f6; box-shadow: 0 8px 20px rgba(12, 89, 177, .08); transform: translateY(-2px); }
.assistant-card.active { background: #f7fbff; }
.assistant-badge { width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: 11px; color: white; border-radius: 10px; font-weight: 800; font-size: 11px; }
.assistant-card strong { display: block; margin-bottom: 4px; font-size: 12px; }
.assistant-card span { color: var(--muted); font-size: 10px; }

.quality-card { padding: 20px; }
.score-row { display: flex; align-items: center; gap: 18px; }
.score-ring { --score: 92; position: relative; width: 91px; height: 91px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: conic-gradient(var(--blue) calc(var(--score)*1%), #e6ecf4 0); }
.score-ring::before { content: ""; position: absolute; inset: 9px; background: white; border-radius: 50%; }
.score-value { position: relative; text-align: center; font-size: 23px; font-weight: 800; }
.score-value small { display: block; color: var(--muted); font-size: 9px; font-weight: 600; }
.quality-bars { flex: 1; }
.bar-row { margin-bottom: 10px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-label { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 10px; }
.bar-track { height: 5px; overflow: hidden; background: #e7edf5; border-radius: 99px; }
.bar-fill { height: 100%; background: var(--blue); border-radius: 99px; }
.token-block { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.token-number strong { display: block; font-size: 24px; letter-spacing: -.03em; }
.token-number span { color: var(--muted); font-size: 11px; }
.mini-donut { --p:62; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--blue) calc(var(--p)*1%), #e4eaf2 0); }
.mini-donut::after { content: attr(data-value); width: 48px; height: 48px; display: grid; place-items: center; background: white; border-radius: 50%; font-size: 13px; font-weight: 800; }
.activity-list { display: grid; gap: 12px; }
.activity-item { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.activity-icon { width: 28px; height: 28px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 8px; }
.activity-item span { flex: 1; }
.activity-item time { color: var(--muted); font-size: 10px; }

.stat-card { padding: 17px; }
.stat-card .label { color: var(--muted); font-size: 11px; }
.stat-card strong { display: block; margin: 8px 0 5px; font-size: 25px; }
.stat-card .foot { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; margin-bottom: 12px; }
.toolbar-left { display: flex; gap: 8px; flex: 1; }
.search-box { position: relative; flex: 1; min-width: 190px; }
.search-box .icon { position: absolute; left: 11px; top: 10px; color: #8392a8; width: 17px; }
.search-box input, .field input, .field select, .field textarea, .toolbar select {
  width: 100%; min-height: 38px; padding: 8px 11px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 10px;
}
.search-box input { padding-left: 36px; }
.toolbar select { width: auto; min-width: 150px; }
.table-card { overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 12px 16px; color: #7b89a0; background: #f8fafc; border-bottom: 1px solid var(--line); text-align: left; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; font-size: 12px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: 120ms ease; }
.data-table tbody tr:hover { background: #fafcff; }
.file-cell { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.file-icon { width: 34px; height: 39px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 8px; }
.file-copy strong { display: block; max-width: 290px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.file-copy span { color: var(--muted); font-size: 10px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; color: #416184; background: #eff4fa; border-radius: 999px; font-size: 10px; font-weight: 700; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 12%, transparent); }
.status.ready { color: var(--green); }
.status.processing { color: var(--orange); }
.status.paused { color: #8b98ac; }
.row-actions { display: flex; justify-content: flex-end; gap: 4px; }

.drop-zone { padding: 26px; text-align: center; border: 1.5px dashed #b9c9dd; border-radius: 14px; background: #f9fbfe; transition: 160ms ease; }
.drop-zone.dragover { border-color: var(--blue); background: var(--blue-soft); }
.drop-zone-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 12px; color: var(--blue); background: var(--blue-soft); border-radius: 14px; }
.drop-zone h3 { margin-bottom: 6px; font-size: 14px; }
.drop-zone p { margin-bottom: 14px; color: var(--muted); font-size: 11px; }
.upload-context { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 10px; }
.upload-context select { min-height: 32px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }

.rag-test { position: sticky; top: 92px; }
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 6px; color: #51627b; font-size: 11px; font-weight: 700; }
.field textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.field-hint { margin-top: 5px; color: var(--muted); font-size: 9px; }
.test-results { display: grid; gap: 9px; margin-top: 16px; }
.result-item { padding: 12px; background: #f7faff; border: 1px solid #e2eaf4; border-radius: 11px; }
.result-meta { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; color: var(--blue); font-size: 9px; font-weight: 750; }
.result-item p { margin: 0; color: #41536e; font-size: 11px; line-height: 1.5; }
.empty-state { padding: 24px; text-align: center; color: var(--muted); font-size: 12px; }

.agent-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.agent-card { position: relative; overflow: hidden; padding: 20px; }
.agent-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent, var(--blue)); }
.agent-top { display: flex; justify-content: space-between; gap: 10px; }
.agent-avatar { width: 46px; height: 46px; display: grid; place-items: center; color: white; background: var(--accent, var(--blue)); border-radius: 14px; }
.agent-card h3 { margin: 15px 0 6px; font-size: 16px; }
.agent-card > p { min-height: 40px; margin-bottom: 16px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.agent-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.agent-stat strong { display: block; font-size: 13px; }
.agent-stat span { color: var(--muted); font-size: 9px; }
.agent-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.switch { position: relative; width: 38px; height: 22px; padding: 0; background: #cbd5e1; border: 0; border-radius: 999px; transition: 150ms; }
.switch::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: white; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: 150ms; }
.switch.on { background: var(--green); }.switch.on::after { transform: translateX(16px); }
.create-agent { min-height: 280px; display: grid; place-items: center; padding: 24px; color: var(--muted); background: transparent; border: 1.5px dashed #b8c7d9; border-radius: var(--radius); text-align: center; }
.create-agent:hover { color: var(--blue); border-color: var(--blue); background: #f8fbff; }
.big-plus { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 13px; color: var(--blue); background: var(--blue-soft); border-radius: 16px; }

.quota-card { padding: 22px; }
.quota-main { display: flex; align-items: center; gap: 28px; }
.large-donut { --p:62; width: 132px; height: 132px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: conic-gradient(var(--blue) calc(var(--p)*1%), #e6ecf3 0); }
.large-donut::after { content: attr(data-value); width: 101px; height: 101px; display: grid; place-items: center; background: white; border-radius: 50%; font-size: 25px; font-weight: 800; }
.quota-copy strong { display: block; margin-bottom: 4px; font-size: 29px; }
.quota-copy p { color: var(--muted); font-size: 11px; }
.quota-scale { height: 8px; overflow: hidden; margin: 16px 0 7px; background: #e8edf4; border-radius: 99px; }
.quota-scale div { width: 62%; height: 100%; background: linear-gradient(90deg, #0878f9, #25a7ff); border-radius: 99px; }
.quota-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.settings-card { padding: 21px; }
.setting-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(210px, 1.3fr) 76px; gap: 20px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line-soft); }
.setting-row:last-child { border-bottom: 0; }
.setting-copy strong { display: block; margin-bottom: 4px; font-size: 12px; }
.setting-copy span { color: var(--muted); font-size: 10px; }
input[type="range"] { width: 100%; accent-color: var(--blue); }
.value-box { padding: 8px; text-align: center; background: #f4f7fb; border: 1px solid var(--line); border-radius: 9px; font-size: 11px; font-weight: 750; }
.usage-list { display: grid; gap: 13px; }
.usage-row { display: grid; grid-template-columns: 120px 1fr 55px; align-items: center; gap: 10px; font-size: 10px; }
.usage-bar { height: 7px; background: #e9edf3; border-radius: 99px; overflow: hidden; }
.usage-bar div { height: 100%; border-radius: 99px; background: var(--blue); }

.quality-hero { display: grid; grid-template-columns: 210px 1fr; gap: 24px; align-items: center; padding: 24px; }
.quality-detail-grid { grid-template-columns: repeat(3, 1fr); }
.quality-detail { padding: 17px; }
.quality-detail-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.quality-detail strong { font-size: 23px; }.quality-detail p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.case-list { display: grid; gap: 9px; }
.case-item { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; padding: 12px; border: 1px solid var(--line-soft); border-radius: 11px; }
.case-dot { width: 9px; height: 9px; border-radius: 50%; }.case-dot.good { background: var(--green); }.case-dot.warn { background: var(--orange); }.case-dot.bad { background: var(--red); }
.case-copy strong { display: block; margin-bottom: 3px; font-size: 11px; }.case-copy span { color: var(--muted); font-size: 9px; }.case-score { font-size: 12px; font-weight: 800; }

.architecture { padding: 24px; overflow: hidden; }
.architecture-flow { display: grid; grid-template-columns: 1fr 60px 1.25fr 60px 1fr; align-items: center; gap: 4px; margin: 26px 0; }
.arch-column { display: grid; gap: 10px; }
.arch-node { padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: white; text-align: center; box-shadow: var(--shadow-sm); }
.arch-node.primary { padding: 24px; color: white; border: 0; background: linear-gradient(145deg, #0a79f6, #124f9e); }
.arch-node h3 { margin: 9px 0 4px; font-size: 13px; }.arch-node p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }.arch-node.primary p { color: #c8ddf8; }
.arch-icon { width: 40px; height: 40px; display: grid; place-items: center; margin: auto; color: var(--blue); background: var(--blue-soft); border-radius: 12px; }.arch-node.primary .arch-icon { color: white; background: rgba(255,255,255,.13); }
.arch-arrow { position: relative; height: 2px; background: #bdd0e6; }.arch-arrow::after { content: ""; position: absolute; right: -1px; top: -4px; border-left: 8px solid #bdd0e6; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.arch-caption { margin-bottom: 8px; color: #7b8ca5; font-size: 9px; font-weight: 800; text-align: center; text-transform: uppercase; letter-spacing: .07em; }
.principles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.principle { padding: 16px; }.principle .number { color: var(--blue); font-size: 10px; font-weight: 800; }.principle h3 { margin: 11px 0 5px; font-size: 12px; }.principle p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }

.modal-backdrop { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(4, 17, 41, .55); backdrop-filter: blur(5px); z-index: 100; animation: fade .15s ease; }
.modal { width: min(560px, 100%); max-height: 90vh; overflow-y: auto; background: white; border-radius: 19px; box-shadow: var(--shadow-md); animation: rise .18s ease; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 18px; }.modal-body { padding: 22px; }.modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 22px; background: #f8fafc; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }.field.full { grid-column: 1 / -1; }
.chip-group { display: flex; flex-wrap: wrap; gap: 7px; }
.choice-chip { padding: 7px 10px; color: #52647f; background: white; border: 1px solid var(--line); border-radius: 999px; font-size: 10px; font-weight: 700; }
.choice-chip.selected { color: var(--blue); background: var(--blue-soft); border-color: #add0f8; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 120; display: flex; align-items: center; gap: 10px; max-width: 370px; padding: 13px 16px; color: white; background: #132442; border-radius: 12px; box-shadow: var(--shadow-md); font-size: 12px; animation: rise .2s ease; }
.toast .icon { color: #61d49f; }
@keyframes fade { from { opacity: 0; } } @keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* Interactive surfaces and contextual chat */
.interactive-card, .interactive-section { cursor: pointer; transition: 150ms ease; }
button.interactive-card { width: 100%; color: inherit; font: inherit; text-align: left; }
.interactive-card:hover, .interactive-section:hover { border-color: #b9d2ef; box-shadow: 0 10px 28px rgba(9, 70, 145, .09); transform: translateY(-2px); }
.composer textarea { min-width: 0; height: 44px; max-height: 128px; padding: 12px 10px 8px; border: 0; color: var(--ink); resize: none; line-height: 1.4; }
.composer textarea::placeholder { color: #8997ae; }
.home-composer {
  position: relative; z-index: 3; min-height: 88px; padding: 10px 10px 10px 12px;
  align-items: end; border: 2px solid #0878f9; border-radius: 18px;
  box-shadow: 0 13px 34px rgba(8, 74, 153, .13), 0 0 0 4px rgba(8, 120, 249, .045);
  transition: border-radius 160ms ease, box-shadow 160ms ease;
}
.home-composer:focus-within { box-shadow: 0 18px 42px rgba(8, 74, 153, .18), 0 0 0 4px rgba(8, 120, 249, .08); }
.home-composer textarea { height: 64px; padding: 9px 12px 7px; font-size: 15px; }
.home-composer .assistant-select { margin-bottom: 6px; }
.home-composer .icon-button, .home-composer .send-button { margin-bottom: 6px; }
.model-select { height: 34px; padding: 0 24px 0 10px; color: #244367; background: #f0f0ff; border: 0; border-radius: 8px; font-weight: 600; font-size: 11px; margin-left: 4px; }
.model-warning { color: #e24b4b; font-size: 11px; font-weight: 600; margin-left: 8px; animation: pulse-warning 2s infinite; }
@keyframes pulse-warning { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.conversation-composer { border-color: #0b70df; }
.draft-dropdown, .chat-dropdown {
  position: relative; z-index: 2; overflow: hidden; margin: -10px 5px 0; padding-top: 10px;
  background: #fff; border: 1px solid #cfdceb; border-top: 0; border-radius: 0 0 17px 17px;
  box-shadow: 0 24px 55px rgba(9, 44, 91, .18);
  transform-origin: top center;
}
.draft-dropdown { display: none; padding: 20px 18px 14px; animation: dropdown-in 160ms ease both; }
.assistant-stage.is-composing .draft-dropdown, .assistant-stage:focus-within .draft-dropdown { display: block; }
.draft-primary { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px; background: #f5f9fe; border: 1px solid #e1eaf4; border-radius: 12px; }
.draft-primary strong, .draft-primary small { display: block; }.draft-primary strong { margin-bottom: 4px; font-size: 12px; }.draft-primary small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.draft-icon { width: 36px; height: 36px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 10px; }
.key-hint { padding: 4px 7px; color: #7a8da7; background: #fff; border: 1px solid #d9e3ee; border-radius: 6px; font-size: 9px; }
.draft-suggestions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding-top: 12px; }.draft-suggestions > span { margin-right: 2px; color: #8292a8; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }.draft-suggestions button { padding: 7px 10px; color: #355d88; background: #fff; border: 1px solid #dce6f1; border-radius: 999px; font-size: 10px; }.draft-suggestions button:hover { color: var(--blue); background: var(--blue-soft); border-color: #acd0f7; }
.chat-dropdown { animation: dropdown-in 180ms ease both; }
@keyframes dropdown-in { from { opacity: 0; transform: translateY(-7px) scaleY(.97); } }
.chat-workspace { overflow: hidden; min-height: 560px; }
.chat-toolbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat-identity { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; overflow: hidden; }
.chat-identity strong { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.chat-identity small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.chat-toolbar .button-row { flex: 0 0 auto; justify-content: flex-end; }
.chat-thread { min-height: 330px; max-height: 520px; overflow-y: auto; padding: 18px 22px; background: linear-gradient(180deg, #fbfdff, #fff); scroll-behavior: smooth; }
.chat-dropdown .chat-thread { min-height: 300px; max-height: 500px; }
.conversation-day { display: flex; align-items: center; gap: 10px; margin: 4px 0 17px; color: #8a98ad; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.conversation-day::before, .conversation-day::after { content: ""; height: 1px; flex: 1; background: var(--line-soft); }
.message-wrap { max-width: min(780px, 88%); }
.message.user { flex-direction: row-reverse; }
.message.user .message-wrap { display: flex; align-items: flex-end; flex-direction: column; }
.message.user .message-body { border-radius: 13px 3px 13px 13px; }
.message-body p { margin: 0 0 8px; }.message-body p:last-child { margin-bottom: 0; }
.message-body ul { margin: 8px 0; padding-left: 20px; }.message-body li { margin: 4px 0; }
.message-actions { display: flex; gap: 5px; margin-top: 5px; }
.message-actions button { padding: 4px 7px; color: #7b8aa1; background: transparent; border: 0; border-radius: 6px; font-size: 9px; }
.message-actions button:hover, .message-actions button.active { color: var(--blue); background: var(--blue-soft); }
.citation { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.followup-chips { display: flex; gap: 7px; overflow-x: auto; padding: 11px 18px 0; border-top: 1px solid var(--line-soft); }
.followup-chips button { flex: 0 0 auto; padding: 7px 10px; color: #335a84; background: #f6f9fd; border: 1px solid #dce6f1; border-radius: 999px; font-size: 10px; }
.followup-chips button:hover { color: var(--blue); border-color: #a9cff9; background: var(--blue-soft); }
.chat-context-line { display: flex; align-items: center; gap: 6px; padding: 9px 20px 12px; color: #7c8da5; font-size: 9px; }
.chat-composer { margin: 10px 14px 14px; border: 1px solid #c9d8e9; box-shadow: 0 8px 26px rgba(9, 32, 68, .08); }
.activity-button { width: 100%; padding: 0; color: inherit; background: transparent; border: 0; text-align: left; }
.activity-button:hover { color: var(--blue); }
.doc-warning { display: block; margin-top: 4px; color: var(--orange); font-size: 8px; font-weight: 750; }
.result-button { width: 100%; color: inherit; text-align: left; cursor: pointer; }
.result-button:hover { border-color: #9fc7f6; background: #f2f8ff; }
.notice { padding: 12px 14px; color: #49617e; background: #f2f7fd; border: 1px solid #dce8f5; border-radius: 11px; font-size: 11px; line-height: 1.55; }
.notice.warning { color: #85561c; background: #fff8eb; border-color: #f2d8aa; }
.modal-small { width: min(430px, 100%); }.modal-wide { width: min(780px, 100%); }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.info-tile { padding: 15px; border: 1px solid var(--line-soft); border-radius: 12px; }
.info-tile h3 { margin: 12px 0 5px; font-size: 12px; }.info-tile p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.profile-card { display: flex; align-items: center; gap: 14px; padding: 4px 0 18px; margin-bottom: 17px; border-bottom: 1px solid var(--line-soft); }
.profile-card h3 { margin: 0 0 5px; font-size: 15px; }.profile-card p { margin: 0; color: var(--muted); font-size: 11px; }.profile-avatar { width: 54px; height: 54px; }
.scenario-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.scenario-tile { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 13px; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-align: left; }
.scenario-tile:hover { border-color: #a9cff9; background: #f8fbff; }.scenario-tile strong { display: block; margin-bottom: 3px; font-size: 11px; }.scenario-tile small { display: block; color: var(--muted); font-size: 9px; }
.history-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }.history-card strong, .history-card small { display: block; }.history-card small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.comparison-table { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }.comparison-row { display: grid; grid-template-columns: 1.7fr .8fr 1fr .5fr; gap: 10px; align-items: center; padding: 12px; border-bottom: 1px solid var(--line-soft); font-size: 10px; }.comparison-row:last-child { border-bottom: 0; }.comparison-row.header { color: var(--muted); background: #f7f9fc; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.goal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-top: 14px; }.choice-card { padding: 14px; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-align: left; }.choice-card:hover, .choice-card.selected { border-color: #9fc7f6; background: var(--blue-soft); }.choice-card strong, .choice-card span { display: block; }.choice-card strong { margin-bottom: 5px; font-size: 11px; }.choice-card span { color: var(--muted); font-size: 9px; }

/* Learning */
.learning-hero { display: grid; grid-template-columns: 1.5fr .75fr; gap: 28px; align-items: center; padding: 26px; background: linear-gradient(135deg, #fff, #f5f9ff); }
.learning-hero h2 { margin: 14px 0 7px; font-size: 25px; letter-spacing: -.03em; }.learning-hero p { max-width: 670px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.learning-progress, .course-progress { height: 8px; overflow: hidden; background: #e7edf5; border-radius: 99px; }.learning-progress div, .course-progress div { height: 100%; background: linear-gradient(90deg, var(--blue), #39a9ff); border-radius: 99px; }
.skill-radar { display: flex; align-items: center; justify-content: center; gap: 18px; }.radar-ring { width: 118px; height: 118px; display: grid; place-content: center; text-align: center; border: 13px solid #cfe5ff; outline: 7px solid #edf5ff; border-radius: 50%; }.radar-ring strong { font-size: 31px; }.radar-ring span { color: var(--muted); font-size: 9px; }.skill-tags { display: grid; gap: 7px; color: #47617e; font-size: 9px; }
.filter-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 17px; }.filter-tabs button { flex: 0 0 auto; padding: 7px 11px; color: #63748c; background: #f5f7fa; border: 1px solid transparent; border-radius: 999px; font-size: 10px; font-weight: 700; }.filter-tabs button.active { color: var(--blue); background: var(--blue-soft); border-color: #b7d8fc; }
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; }.course-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: 150ms; }.course-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.course-cover { position: relative; height: 112px; padding: 12px; color: white; background: linear-gradient(135deg, color-mix(in srgb, var(--course) 88%, #091d3a), var(--course)); }.course-cover::after { content: ""; position: absolute; width: 115px; height: 115px; right: -30px; bottom: -62px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; box-shadow: 0 0 0 25px rgba(255,255,255,.06); }.course-format, .course-level { display: inline-flex; padding: 4px 7px; background: rgba(255,255,255,.16); border-radius: 999px; font-size: 8px; font-weight: 750; }.course-level { float: right; }.course-mark { position: absolute; left: 14px; bottom: 13px; }.course-body { padding: 15px; }.course-rating { color: #f09a21; font-size: 10px; font-weight: 800; }.course-rating span { color: var(--muted); font-weight: 500; }.course-body h3 { min-height: 39px; margin: 8px 0 6px; font-size: 14px; line-height: 1.35; }.course-body > p { min-height: 48px; margin-bottom: 11px; color: var(--muted); font-size: 10px; line-height: 1.5; }.course-meta { display: flex; justify-content: space-between; gap: 8px; margin: 14px 0 10px; color: #718199; font-size: 9px; }.course-meta span { display: flex; align-items: center; gap: 4px; }.course-progress { height: 5px; margin-bottom: 10px; }.course-actions { display: flex; align-items: center; justify-content: space-between; }.icon-button.selected { color: var(--blue); background: var(--blue-soft); }
.instructor-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; }.instructor-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 11px; color: inherit; background: #fff; border: 1px solid var(--line-soft); border-radius: 11px; text-align: left; }.instructor-card:hover { border-color: #afd0f5; background: #f9fcff; }.instructor-avatar { width: 38px; height: 38px; display: grid; place-items: center; color: white; border-radius: 11px; font-size: 10px; font-weight: 800; }.instructor-avatar.large { width: 56px; height: 56px; font-size: 14px; }.instructor-card strong, .instructor-card small { display: block; }.instructor-card strong { margin-bottom: 3px; font-size: 11px; }.instructor-card small { margin-bottom: 4px; color: var(--muted); font-size: 9px; }.instructor-ranking { display: grid; gap: 8px; }
.format-list { display: grid; gap: 8px; }.format-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px; color: inherit; background: #fff; border: 1px solid var(--line-soft); border-radius: 11px; text-align: left; }.format-card:hover { border-color: #afd0f5; }.format-card strong, .format-card small { display: block; }.format-card strong { font-size: 11px; }.format-card small { margin-top: 3px; color: var(--muted); font-size: 9px; }.format-card b { color: var(--blue); font-size: 9px; }
.course-modal-hero { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 17px; padding: 22px; color: white; background: linear-gradient(135deg, color-mix(in srgb, var(--course) 85%, #092552), var(--course)); }.course-modal-hero p { margin: 8px 0 0; color: rgba(255,255,255,.8); font-size: 10px; line-height: 1.5; }.course-modal-rating { text-align: right; }.course-modal-rating strong, .course-modal-rating span { display: block; }.course-modal-rating span { margin-top: 4px; font-size: 9px; opacity: .8; }

/* Startup planner */
.startup-hero { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 26px; color: white; background: linear-gradient(130deg, #071d46, #0a4389 65%, #0878f9); border: 0; }.startup-hero h1 { margin: 15px 0 6px; font-size: 28px; }.startup-hero p { color: #bed5f3; font-size: 11px; }.startup-hero .button { color: white; background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.18); }
.readiness-ring { width: 124px; height: 124px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: conic-gradient(#57dfa5 calc(var(--p)*1%), rgba(255,255,255,.15) 0); }.readiness-ring::before { content: ""; grid-area: 1/1; width: 96px; height: 96px; background: #0a3976; border-radius: 50%; }.readiness-ring div { position: relative; grid-area: 1/1; text-align: center; }.readiness-ring strong, .readiness-ring span { display: block; }.readiness-ring strong { font-size: 24px; }.readiness-ring span { margin-top: 3px; color: #aecdF3; font-size: 8px; text-transform: uppercase; letter-spacing: .06em; }
.startup-steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; }.startup-step { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 3px 9px; padding: 12px; color: #61728c; background: #f6f8fb; border: 1px solid var(--line-soft); border-radius: 11px; text-align: left; }.startup-step > span { grid-row: 1/3; width: 28px; height: 28px; display: grid; place-items: center; background: #e4eaf2; border-radius: 9px; font-size: 10px; font-weight: 800; }.startup-step strong { font-size: 10px; }.startup-step small { font-size: 8px; }.startup-step.active { color: var(--blue); background: var(--blue-soft); border-color: #add1fb; }.startup-step.active > span { color: white; background: var(--blue); }.startup-step.done > span { color: white; background: var(--green); }
.resource-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }.resource-card { padding: 18px; }.resource-top { display: flex; justify-content: space-between; align-items: center; }.resource-card h3 { margin: 14px 0 4px; font-size: 14px; }.resource-card > p { min-height: 26px; color: var(--muted); font-size: 9px; }.resource-value { margin: 13px 0 9px; font-size: 21px; font-weight: 780; letter-spacing: -.03em; }.resource-foot { display: flex; justify-content: space-between; gap: 8px; min-height: 29px; margin-bottom: 13px; color: var(--muted); font-size: 8px; }.budget-mini { display: flex; gap: 3px; height: 6px; margin-bottom: 7px; }.budget-mini span { display: block; background: var(--blue); border-radius: 99px; }.budget-mini span:nth-child(2) { background: var(--cyan); }.budget-mini span:nth-child(3) { background: var(--orange); }.team-stack { display: flex; margin: 13px 0 9px; }.team-stack span { width: 31px; height: 31px; display: grid; place-items: center; margin-left: -6px; color: white; background: linear-gradient(145deg,#0878f9,#17467d); border: 2px solid white; border-radius: 50%; font-size: 8px; font-weight: 800; }.team-stack span:first-child { margin-left: 0; }
.rnd-list { display: grid; gap: 7px; }.rnd-item { display: grid; grid-template-columns: 65px 1fr auto auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line-soft); border-radius: 11px; }.rnd-code { color: var(--blue); font-size: 8px; font-weight: 800; }.rnd-item strong, .rnd-item small { display: block; }.rnd-item strong { margin-bottom: 3px; font-size: 10px; }.rnd-item small { color: var(--muted); font-size: 8px; }.rnd-effect { color: var(--green); font-size: 9px; font-weight: 750; }
.timeline { display: grid; gap: 5px; }.timeline-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px; color: inherit; background: transparent; border: 0; border-radius: 9px; text-align: left; }.timeline-item:hover { background: #f5f8fc; }.timeline-item strong, .timeline-item small { display: block; }.timeline-item strong { font-size: 10px; }.timeline-item small { margin-top: 3px; color: var(--muted); font-size: 8px; }.timeline-item .status { width: 10px; }
.team-options { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }.team-options label { padding: 10px; border: 1px solid var(--line-soft); border-radius: 9px; font-size: 10px; }.plan-summary { padding: 10px 0; }.plan-summary p { margin: 8px 0; font-size: 11px; }

@media (max-width: 1180px) {
  .course-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .resource-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 1180px) {
  .home-grid, .two-col { grid-template-columns: 1fr; }
  .rag-test { position: static; }
  .agent-grid { grid-template-columns: repeat(2, 1fr); }
  .assistant-list { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; transform: translateX(-100%); width: 264px; transition: 180ms ease; box-shadow: var(--shadow-md); }
  .sidebar.open { transform: translateX(0); }
  .icon-button.mobile-menu { display: grid; }
  .topbar { height: 64px; padding: 0 16px; }
  .topbar-context, .user-copy, .topbar-actions > .icon-button:first-child { display: none; }
  .content { padding: 20px 16px 30px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .architecture-flow { grid-template-columns: 1fr; gap: 12px; }
  .arch-arrow { width: 2px; height: 30px; margin: auto; }.arch-arrow::after { right: -4px; top: auto; bottom: -1px; border-top: 8px solid #bdd0e6; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 0; }
  .principles { grid-template-columns: repeat(2, 1fr); }
  .data-table th:nth-child(3), .data-table td:nth-child(3), .data-table th:nth-child(4), .data-table td:nth-child(4) { display: none; }
  .learning-hero { grid-template-columns: 1fr; }
  .startup-steps { grid-template-columns: repeat(2,1fr); }
  .info-grid { grid-template-columns: 1fr; }
  .chat-toolbar { align-items: flex-start; }
}

@media (max-width: 560px) {
  .assistant-stage { min-height: 330px; padding: 26px 14px 18px; }
  .assistant-stage h1 { font-size: 31px; }
  .assistant-stage .lead { font-size: 12px; }
  .composer { grid-template-columns: 1fr auto; }.assistant-select { grid-column: 1 / -1; max-width: none; }.model-select { grid-column: 1 / -1; width: 100%; margin: 4px 0; }.composer-row { flex-direction: column; align-items: stretch; }.model-warning { display: block; margin: 4px 0; text-align: center; }.composer > .icon-button { display: none; }
  .home-composer { min-height: 112px; padding: 8px; }.home-composer textarea { min-height: 58px; padding-left: 8px; font-size: 13px; }
  .draft-dropdown { padding: 18px 10px 10px; }.draft-primary { grid-template-columns: auto 1fr; }.key-hint { display: none; }.draft-suggestions > span { width: 100%; }
  .hero-hints { display: none; }
  .stats-grid, .agent-grid, .quality-detail-grid, .form-grid, .principles { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .assistant-list { grid-template-columns: repeat(2, 1fr); }
  .quality-hero { grid-template-columns: 1fr; text-align: center; }.quality-hero .score-ring { margin: auto; }
  .quota-main { align-items: flex-start; flex-direction: column; }.setting-row { grid-template-columns: 1fr; gap: 8px; }
  .toolbar { align-items: stretch; flex-direction: column; }.toolbar-left { flex-direction: column; }.toolbar select { width: 100%; }
  .data-table th:nth-child(2), .data-table td:nth-child(2) { display: none; }.data-table td, .data-table th { padding: 11px; }
  .assistant-card { min-height: 105px; }
  .course-grid, .resource-grid, .instructor-grid, .scenario-grid, .goal-grid, .team-options { grid-template-columns: 1fr; }
  .startup-steps { grid-template-columns: 1fr; }
  .startup-hero { align-items: flex-start; flex-direction: column; }
  .skill-radar { align-items: flex-start; flex-direction: column; }
  .chat-toolbar { flex-direction: column; }
  .chat-thread { padding: 15px 12px; }
  .message-wrap { max-width: 94%; }
  .comparison-row { grid-template-columns: 1.5fr .8fr; }.comparison-row > span:nth-child(3), .comparison-row > span:nth-child(4) { display: none; }
  .rnd-item { grid-template-columns: 58px 1fr auto; }.rnd-effect { display: none; }
  .course-modal-hero { grid-template-columns: auto 1fr; }.course-modal-rating { grid-column: 1 / -1; text-align: left; }
}

/* Markdown content styling */
.markdown-content { line-height: 1.6; }
.markdown-content h1, .markdown-content h2, .markdown-content h3, .markdown-content h4 {
  margin: 12px 0 8px;
  color: var(--ink);
  font-weight: 700;
}
.markdown-content h1 { font-size: 16px; }
.markdown-content h2 { font-size: 15px; }
.markdown-content h3 { font-size: 14px; }
.markdown-content p { margin: 8px 0; }
.markdown-content ul { margin: 8px 0; padding-left: 18px; }
.markdown-content li { margin: 4px 0; }
.markdown-content code {
  padding: 2px 6px;
  background: #f0f4f8;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #e83e8c;
}
.markdown-content pre {
  padding: 12px;
  background: #1e1e1e;
  color: #d4d4d4;
  border-radius: 8px;
  overflow-x: auto;
  margin: 10px 0;
}
.markdown-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: 12px;
}
.markdown-content strong { font-weight: 700; color: var(--ink); }
.markdown-content em { font-style: italic; }

/* RAG badge */
.rag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 2px 8px;
  background: var(--green-soft);
  color: var(--green);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
}

/* Citations block */
.citations-block {
  margin-top: 12px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.citations-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.citations-block .citation {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 3px;
  padding: 5px 10px;
  background: white;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  font-size: 11px;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
}
.citations-block .citation:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
}

/* Error message */
.error-message {
  padding: 10px;
  background: var(--red-soft);
  color: var(--red);
  border-radius: 8px;
  font-size: 13px;
}

/* Loading status */
.message-loading-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

/* Citation chips */
.citations-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.citation-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: white;
  border: 1px solid #c5d5e8;
  border-radius: 999px;
  font-size: 11px;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
}
.citation-chip:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
  transform: translateY(-1px);
}
.citation-num {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: white;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
}
.citation-score {
  color: var(--green);
  font-weight: 600;
  font-size: 10px;
}

/* Source panel */
.source-panel {
  margin-top: 12px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #d0d7de;
  border-radius: 10px;
  animation: slide-in 0.2s ease;
}
@keyframes slide-in {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
.source-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}
.source-close {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
}
.source-close:hover {
  background: #f0f0f0;
  color: var(--red);
}
.source-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
}
.source-score {
  color: var(--green);
  font-weight: 600;
  font-size: 11px;
}
.source-text {
  padding: 10px;
  background: white;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.6;
  color: #334155;
  max-height: 200px;
  overflow-y: auto;
}

/* Markdown tables */
.md-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 12px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.md-table th {
  background: #f0f4f8;
  color: #244367;
  font-weight: 700;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 2px solid #d0d7de;
}
.md-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}
.md-table tr:last-child td {
  border-bottom: none;
}
.md-table tr:hover td {
  background: #f8fafc;
}

/* Markdown lists */
.md-list {
  margin: 10px 0;
  padding-left: 20px;
}
.md-list li {
  margin: 5px 0;
  line-height: 1.5;
  color: #334155;
}
.li-num {
  color: #0878f9;
  font-weight: 700;
  margin-right: 6px;
}
.li-bullet {
  color: #0878f9;
  margin-right: 6px;
}

/* Markdown blockquotes */
blockquote {
  margin: 10px 0;
  padding: 10px 14px;
  border-left: 3px solid #0878f9;
  background: #f0f7ff;
  border-radius: 0 6px 6px 0;
  color: #334155;
  font-style: italic;
}

/* Markdown paragraphs in content */
.markdown-content p {
  margin: 8px 0;
  line-height: 1.6;
}
.markdown-content h1, .markdown-content h2, .markdown-content h3, .markdown-content h4 {
  margin: 16px 0 8px;
  color: #12213f;
}
.markdown-content h1 { font-size: 18px; }
.markdown-content h2 { font-size: 16px; }
.markdown-content h3 { font-size: 14px; }
.markdown-content h4 { font-size: 13px; }

/* Code blocks */
.markdown-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 14px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 10px 0;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 12px;
  line-height: 1.5;
}
.markdown-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.markdown-content code {
  background: #f1f5f9;
  color: #0f172a;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 12px;
}

/* Message content spacing */
.markdown-content {
  line-height: 1.6;
}
.markdown-content p {
  margin: 8px 0;
}
.markdown-content h1, .markdown-content h2, .markdown-content h3, .markdown-content h4 {
  margin: 16px 0 8px;
  color: #12213f;
}
.markdown-content h1 { font-size: 18px; }
.markdown-content h2 { font-size: 16px; }
.markdown-content h3 { font-size: 14px; }
.markdown-content h4 { font-size: 13px; }
