*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --bg: #f5f5f7;
    --surface: #ffffff;
    --surface-2: #f5f5f7;
    --border: rgba(0,0,0,0.08);
    --border-strong: rgba(0,0,0,0.14);
    --text: #1d1d1f;
    --text-2: #6e6e73;
    --text-3: #aeaeb2;
    --danger: #ff3b30;
    --success: #34c759;
    --r-sm: 8px; --r: 12px; --r-lg: 18px;
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --ease: 0.2s cubic-bezier(0.4,0,0.2,1);
    --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'PingFang SC', 'Helvetica Neue', sans-serif;
    --mono: 'SF Mono', 'Menlo', 'Consolas', monospace;
    --sidebar: 260px;
}
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.5; }
a { color: var(--accent); text-decoration: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 16px; border: none; border-radius: var(--r-sm); cursor: pointer; font-size: 13px; font-weight: 500; font-family: var(--font); transition: all var(--ease); white-space: nowrap; letter-spacing: -0.01em; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.98); }
.btn-outline { background: transparent; border: 1px solid var(--border-strong); color: var(--text-2); }
.btn-outline:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: rgba(0,0,0,0.04); color: var(--text); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.btn-block { width: 100%; }

/* Forms */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 5px; color: var(--text-2); letter-spacing: -0.01em; }
.form-group input { width: 100%; padding: 10px 13px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); font-size: 15px; font-family: var(--font); background: var(--surface); color: var(--text); transition: border-color var(--ease), box-shadow var(--ease); }
.form-group input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,113,227,0.15); }
.error-msg { color: var(--danger); font-size: 13px; margin: 10px 0; padding: 9px 12px; background: rgba(255,59,48,0.06); border-radius: var(--r-sm); display: none; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* Login */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg); }
.login-card { background: var(--surface); border-radius: var(--r-lg); padding: 44px 40px; width: 360px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.login-header { text-align: center; margin-bottom: 32px; }
.login-header h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.login-header p { color: var(--text-2); font-size: 14px; margin-top: 4px; }

/* App layout */
.app-layout { display: flex; height: 100vh; overflow: hidden; background: var(--bg); }

/* Sidebar */
.sidebar { width: var(--sidebar); background: rgba(255,255,255,0.85); backdrop-filter: saturate(180%) blur(20px); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; overflow: hidden; }
.sidebar-header { padding: 18px 16px 14px; border-bottom: 1px solid var(--border); }
.sidebar-logo { font-size: 15px; font-weight: 600; letter-spacing: -0.03em; }
.sidebar-user { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.sidebar-section { display: flex; flex-direction: column; overflow: hidden; border-bottom: 1px solid var(--border); }
.sidebar-section.grow { flex: 1; }
.section-label { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px 6px; font-size: 11px; font-weight: 600; color: var(--text-3); letter-spacing: 0.04em; text-transform: uppercase; }
.section-body { overflow-y: auto; padding: 4px 8px; flex: 1; }

.session-item { padding: 7px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: 13px; display: flex; justify-content: space-between; align-items: center; transition: background var(--ease); gap: 6px; min-height: 32px; }
.session-item:hover { background: rgba(0,0,0,0.04); }
.session-item.active { background: rgba(0,113,227,0.08); color: var(--accent); font-weight: 500; }
.session-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-delete { flex-shrink: 0; opacity: 0; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 11px; color: var(--text-3); transition: all var(--ease); cursor: pointer; }
.session-item:hover .session-delete { opacity: 1; }
.session-delete:hover { background: rgba(255,59,48,0.1); color: var(--danger); }

.file-item { padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; display: flex; align-items: center; gap: 8px; transition: background var(--ease); }
.file-item:hover { background: rgba(0,0,0,0.04); }
.file-item.selected { background: rgba(0,113,227,0.06); }
.file-cb { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; border: 1.5px solid var(--border-strong); appearance: none; cursor: pointer; transition: all var(--ease); position: relative; }
.file-cb:checked { background: var(--accent); border-color: var(--accent); }
.file-cb:checked::after { content: ''; position: absolute; left: 4px; top: 1.5px; width: 5px; height: 9px; border: 2px solid white; border-top: none; border-left: none; transform: rotate(45deg); }
.file-info { flex: 1; overflow: hidden; }
.file-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 11px; color: var(--text-3); margin-top: 1px; }

.upload-label { display: block; margin: 4px 8px 8px; padding: 8px; border: 1.5px dashed var(--border-strong); border-radius: var(--r-sm); text-align: center; font-size: 12px; color: var(--text-3); cursor: pointer; transition: all var(--ease); }
.upload-label:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,113,227,0.03); }

.sidebar-footer { padding: 10px 8px; border-top: 1px solid var(--border); display: flex; gap: 6px; flex-wrap: wrap; }

/* Chat main */
.chat-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); }
.chat-header { padding: 12px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
.chat-title { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.chat-context { font-size: 12px; color: var(--text-3); }
.model-switch { margin-left: auto; }
.model-switch select { font-size: 12px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text-1); cursor: pointer; outline: none; transition: border-color 0.2s; }
.model-switch select:hover { border-color: var(--accent); }
.model-switch select:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(59,130,246,.15); }

/* Messages */
.chat-messages { flex: 1; overflow-y: auto; padding: 24px 0 12px; display: flex; flex-direction: column; gap: 0; scroll-behavior: smooth; }
.chat-messages::-webkit-scrollbar { width: 5px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.msg-row { display: flex; padding: 3px 24px; animation: fadeUp 0.22s cubic-bezier(0.4,0,0.2,1) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.msg-row.user { justify-content: flex-end; }

.bubble { max-width: 72%; padding: 11px 15px; border-radius: var(--r-lg); font-size: 14px; line-height: 1.7; }
.bubble.user { background: var(--accent); color: white; border-bottom-right-radius: 5px; }
.bubble.assistant { background: var(--surface-2); color: var(--text); border-bottom-left-radius: 5px; border: 1px solid var(--border); }
.bubble.sys { background: rgba(52,199,89,0.06); color: var(--text-2); border: 1px solid rgba(52,199,89,0.2); font-size: 13px; border-bottom-left-radius: 5px; }

/* Markdown in assistant bubble */
.bubble.assistant h1,.bubble.assistant h2,.bubble.assistant h3,.bubble.assistant h4 { font-weight: 600; letter-spacing: -0.02em; margin: 14px 0 5px; line-height: 1.3; }
.bubble.assistant h1 { font-size: 18px; } .bubble.assistant h2 { font-size: 16px; } .bubble.assistant h3 { font-size: 15px; } .bubble.assistant h4 { font-size: 14px; }
.bubble.assistant h1:first-child,.bubble.assistant h2:first-child,.bubble.assistant h3:first-child,.bubble.assistant h4:first-child { margin-top: 0; }
.bubble.assistant p { margin: 0 0 8px; } .bubble.assistant p:last-child { margin-bottom: 0; }
.bubble.assistant ul,.bubble.assistant ol { padding-left: 20px; margin: 6px 0; }
.bubble.assistant li { margin: 3px 0; }
.bubble.assistant strong { font-weight: 600; }
.bubble.assistant em { font-style: italic; }
.bubble.assistant blockquote { margin: 8px 0; padding: 8px 14px; border-left: 3px solid var(--border-strong); color: var(--text-2); background: rgba(0,0,0,0.02); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.bubble.assistant hr { border: none; border-top: 1px solid var(--border); margin: 10px 0; }
.bubble.assistant pre { background: rgba(0,0,0,0.04); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px 14px; overflow-x: auto; margin: 8px 0; font-size: 13px; line-height: 1.6; }
.bubble.assistant code { font-family: var(--mono); font-size: 12.5px; }
.bubble.assistant pre code { background: none; padding: 0; font-size: 13px; }
.bubble.assistant :not(pre)>code { background: rgba(0,0,0,0.06); padding: 2px 5px; border-radius: 4px; font-size: 12.5px; }
.bubble.assistant img,.bubble.assistant canvas,.bubble.assistant video,.bubble.assistant iframe { display: block; max-width: 100%; height: auto; max-height: 420px; margin: 8px 0; }
.bubble.assistant svg:not(.code-chevron) { display: block; max-width: 100%; height: auto; max-height: 420px; margin: 8px 0; width: 100% !important; }

/* Collapsible code blocks */
.code-block-wrap { margin: 8px 0; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.code-block-wrap summary { display: flex; align-items: center; justify-content: space-between; padding: 7px 12px; background: rgba(0,0,0,0.03); cursor: pointer; user-select: none; list-style: none; font-size: 12px; color: var(--text-2); font-family: var(--mono); transition: background var(--ease); gap: 8px; }
.code-block-wrap summary::-webkit-details-marker { display: none; }
.code-block-wrap summary:hover { background: rgba(0,0,0,0.055); }
.code-block-wrap[open] summary { border-bottom: 1px solid var(--border); }
.code-block-label { font-weight: 500; letter-spacing: 0.02em; color: var(--text-2); flex: 1; }
.code-block-lines { font-size: 11px; color: var(--text-3); }
.code-chevron { transition: transform var(--ease); flex-shrink: 0; color: var(--text-3); width: 12px !important; height: 12px !important; }
.code-block-wrap[open] .code-chevron { transform: rotate(90deg); }
.code-block-wrap pre { margin: 0 !important; border: none !important; border-radius: 0 !important; }
.bubble.assistant table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: 13px; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.bubble.assistant th { background: var(--surface-2); font-weight: 600; padding: 8px 12px; text-align: left; color: var(--text-2); font-size: 12px; border-bottom: 1px solid var(--border-strong); }
.bubble.assistant td { padding: 7px 12px; border-bottom: 1px solid var(--border); }
.bubble.assistant tr:last-child td { border-bottom: none; }
.bubble.assistant tr:hover td { background: rgba(0,0,0,0.015); }
.bubble.assistant .md-table-wrap { overflow-x: auto; margin: 10px 0; }
.bubble.assistant .md-table-wrap table { min-width: 420px; margin: 0; }
.bubble.assistant mjx-container { margin: 0 0.06em; font-size: 0.98em !important; line-height: 1; vertical-align: -0.04em; }
.bubble.assistant mjx-container[display="true"] { display: block; max-width: 100%; margin: 8px 0; font-size: 0.92em !important; overflow-x: auto; overflow-y: hidden; }

/* Thinking */
.thinking-row { display: flex; padding: 3px 24px; animation: fadeUp 0.22s cubic-bezier(0.4,0,0.2,1) both; }
.thinking-bubble { padding: 11px 15px; border-radius: var(--r-lg); border-bottom-left-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; color: var(--text-2); min-width: 130px; }
.thinking-steps { display: flex; flex-direction: column; gap: 6px; }
.t-step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); animation: stepIn 0.28s cubic-bezier(0.4,0,0.2,1) both; }
@keyframes stepIn { from { opacity: 0; transform: translateX(-5px); } to { opacity: 1; transform: translateX(0); } }
.t-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; animation: dotPulse 1s ease-in-out infinite; }
.t-step.done .t-dot { background: var(--success); animation: none; }
.t-step.done { color: var(--text-3); }
@keyframes dotPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }
.dots { display: flex; gap: 4px; align-items: center; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); animation: dotBounce 1.4s infinite ease-in-out both; }
.dot:nth-child(2) { animation-delay: 0.2s; } .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce { 0%,80%,100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }

/* Chart — inline inside assistant bubble */
.chart-inline { margin: 12px 0 4px; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--surface); animation: fadeUp 0.3s cubic-bezier(0.4,0,0.2,1) both; }
.chart-inline .plotly-graph-div { width: 100% !important; }
/* Legacy standalone chart (fallback) */
.chart-wrap { margin: 4px 24px; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--surface); animation: fadeUp 0.3s cubic-bezier(0.4,0,0.2,1) both; }

/* Agent Steps History — collapsible AI process in history */
.agent-steps-history { margin-bottom: 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); font-size: 13px; }
.agent-steps-history > summary { cursor: pointer; padding: 8px 12px; list-style: none; user-select: none; }
.agent-steps-history > summary::-webkit-details-marker { display: none; }
.agent-steps-toggle { color: var(--text-2); font-weight: 500; font-size: 12px; }
.agent-steps-history[open] > summary { border-bottom: 1px solid var(--border); }
.agent-steps-list { padding: 8px 12px; display: flex; flex-direction: column; gap: 8px; }
.agent-step-item { padding: 6px 0; border-bottom: 1px solid var(--border); }
.agent-step-item:last-child { border-bottom: none; }
.agent-step-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.agent-step-badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.agent-step-badge.think { background: rgba(0,113,227,0.1); color: var(--accent); }
.agent-step-badge.code { background: rgba(52,199,89,0.1); color: #1a7f3c; }
.agent-step-badge.done { background: rgba(142,142,147,0.12); color: var(--text-2); }
.agent-step-turn { font-size: 11px; color: var(--text-3); }
.agent-step-body { color: var(--text-2); font-size: 12px; line-height: 1.5; padding: 2px 0; white-space: pre-wrap; word-break: break-word; }
.agent-code-block, .agent-obs-block { margin-top: 4px; font-size: 12px; }
.agent-code-block > summary, .agent-obs-block > summary { cursor: pointer; color: var(--accent); font-size: 11px; padding: 2px 0; }
.agent-code-block pre, .agent-obs-block pre { margin: 4px 0; padding: 8px; background: rgba(0,0,0,0.03); border-radius: 4px; font-size: 11px; line-height: 1.45; overflow-x: auto; white-space: pre-wrap; word-break: break-all; max-height: 200px; overflow-y: auto; }
.agent-code-block pre code { font-family: var(--mono); }

/* Welcome */
.welcome { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; text-align: center; gap: 20px; }
.welcome-title { font-size: 26px; font-weight: 600; letter-spacing: -0.04em; }
.welcome-sub { font-size: 15px; color: var(--text-2); margin-top: -12px; }
.prompt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-width: 420px; }
.prompt-card { padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); cursor: pointer; font-size: 13px; text-align: left; color: var(--text); transition: all var(--ease); line-height: 1.45; }
.prompt-card:hover { border-color: var(--accent); background: rgba(0,113,227,0.03); }
.prompt-card strong { display: block; font-weight: 600; margin-bottom: 2px; font-size: 13px; }
.prompt-card span { color: var(--text-2); font-size: 12px; }

/* Input */
.chat-input-area { padding: 10px 24px 16px; border-top: 1px solid var(--border); background: var(--surface); }
.input-box { display: flex; align-items: flex-end; gap: 8px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--r); padding: 8px 8px 8px 14px; transition: border-color var(--ease), box-shadow var(--ease); }
.input-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,113,227,0.1); }
.input-box textarea { flex: 1; border: none; background: transparent; resize: none; font-size: 14px; font-family: var(--font); color: var(--text); line-height: 1.5; max-height: 140px; min-height: 24px; outline: none; padding: 3px 0; }
.input-box textarea::placeholder { color: var(--text-3); }
.send-btn { flex-shrink: 0; width: 34px; height: 34px; padding: 0; background: var(--accent); color: white; border: none; border-radius: var(--r-sm); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all var(--ease); }
.send-btn:hover { background: var(--accent-hover); }
.send-btn:active { transform: scale(0.94); }
.send-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

/* Admin */
.admin-layout { max-width: 960px; margin: 0 auto; padding: 28px 24px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-header h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; margin-bottom: 16px; }
.admin-card h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 16px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th,.admin-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { background: var(--surface-2); font-weight: 600; color: var(--text-2); font-size: 12px; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--surface-2); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.badge-green { background: rgba(52,199,89,0.1); color: #1a7f3c; }
.badge-red { background: rgba(255,59,48,0.08); color: #c0392b; }
.badge-gray { background: rgba(0,0,0,0.05); color: var(--text-2); }

/* About / Architecture page */
.about-body { background: var(--surface); min-height: 100vh; }
.about-topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: rgba(255,255,255,0.92); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--border); }
.about-topbar-title { font-size: 14px; font-weight: 600; color: var(--text-2); letter-spacing: -0.02em; flex: 1; }
.about-topbar-cta { flex-shrink: 0; }
.about-layout { display: flex; max-width: 1200px; margin: 0 auto; }
.about-nav { position: sticky; top: 52px; align-self: flex-start; width: 200px; flex-shrink: 0; padding: 32px 0 32px 24px; max-height: calc(100vh - 52px); overflow-y: auto; }
.about-nav-title { font-size: 11px; font-weight: 600; color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 12px; padding-left: 10px; }
.about-nav a { display: block; padding: 6px 10px; font-size: 13px; color: var(--text-2); border-radius: var(--r-sm); transition: all var(--ease); margin-bottom: 2px; }
.about-nav a:hover { background: var(--surface-2); color: var(--text); }
.about-page { flex: 1; min-width: 0; padding: 40px 32px 80px 16px; }
.about-hero { text-align: center; margin-bottom: 48px; padding-bottom: 40px; border-bottom: 1px solid var(--border); }
.about-eyebrow { font-size: 13px; font-weight: 500; color: var(--accent); letter-spacing: 0.02em; margin-bottom: 12px; }
.about-hero h1 { font-size: 34px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.15; margin-bottom: 14px; }
.about-subtitle { font-size: 15px; color: var(--text-2); line-height: 1.75; max-width: 640px; margin: 0 auto 20px; }
.about-badge { display: inline-block; padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 500; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); }
.about-section { margin-bottom: 44px; scroll-margin-top: 68px; }
.about-section-title { font-size: 20px; font-weight: 600; letter-spacing: -0.03em; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.about-h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; margin: 24px 0 10px; color: var(--text); }
.about-lead { font-size: 14px; color: var(--text-2); line-height: 1.75; margin-bottom: 18px; }
.about-note { font-size: 12px; color: var(--text-3); margin-top: 10px; line-height: 1.6; }
.about-grid { display: grid; gap: 14px; }
.about-grid-4 { grid-template-columns: repeat(2, 1fr); }
.about-grid-3 { grid-template-columns: repeat(3, 1fr); }
.about-grid-2 { grid-template-columns: repeat(2, 1fr); }
.about-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; transition: box-shadow var(--ease); }
.about-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.05); }
.about-card-icon { font-size: 20px; margin-bottom: 10px; }
.about-card h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 6px; }
.about-card p { font-size: 13px; color: var(--text-2); line-height: 1.65; }
.about-detail-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px 22px; margin-bottom: 12px; }
.about-detail-card h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; }
.about-detail-card p { font-size: 13px; color: var(--text-2); line-height: 1.7; margin-bottom: 8px; }
.about-list { padding-left: 18px; font-size: 13px; color: var(--text-2); line-height: 1.75; }
.about-list li { margin-bottom: 4px; }
.about-list code, .about-detail-card code, .about-lead code, .about-card code { font-family: var(--mono); font-size: 12px; background: rgba(0,0,0,0.05); padding: 1px 5px; border-radius: 4px; }
.about-arch { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px 20px; margin-bottom: 16px; }
.arch-layer { text-align: center; }
.arch-label { display: inline-block; font-size: 11px; font-weight: 600; color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px; }
.arch-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.arch-items span { padding: 6px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; font-size: 13px; color: var(--text-2); }
.arch-layer-highlight { background: var(--surface); border: 1px solid rgba(0,113,227,0.15); border-radius: var(--r); padding: 18px 16px; margin: 4px 0; }
.arch-flow { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.about-arch-flow-lg { padding: 8px 0; }
.arch-step { padding: 10px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); font-size: 13px; font-weight: 600; line-height: 1.3; text-align: center; }
.arch-step small { display: block; font-size: 11px; font-weight: 400; color: var(--text-3); margin-top: 2px; }
.arch-step-active { background: rgba(0,113,227,0.08); border-color: rgba(0,113,227,0.25); color: var(--accent); }
.arch-step-arrow { color: var(--text-3); font-size: 16px; }
.arch-arrow { text-align: center; color: var(--text-3); font-size: 14px; padding: 6px 0; }
.about-diagram { margin: 16px 0; }
.about-pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 16px 18px; font-family: var(--mono); font-size: 12px; line-height: 1.65; color: var(--text-2); overflow-x: auto; white-space: pre; margin: 10px 0; }
.about-table { width: 100%; border-collapse: collapse; font-size: 13px; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; margin: 12px 0; }
.about-table th { padding: 10px 14px; text-align: left; background: var(--surface-2); font-weight: 600; color: var(--text-2); font-size: 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.about-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); line-height: 1.6; vertical-align: top; }
.about-table tr:last-child th, .about-table tr:last-child td { border-bottom: none; }
.about-table-compact th { width: 130px; }
.about-table-full thead th { font-size: 11px; letter-spacing: 0.03em; text-transform: uppercase; }
.about-table code { font-family: var(--mono); font-size: 11.5px; background: rgba(0,0,0,0.04); padding: 1px 4px; border-radius: 3px; }
.about-api-section { padding-top: 8px; }
.api-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 18px; margin-bottom: 12px; }
.api-block-highlight { border-color: rgba(0,113,227,0.2); background: rgba(0,113,227,0.02); }
.api-block p { font-size: 13px; color: var(--text-2); margin: 6px 0 8px; line-height: 1.6; }
.api-endpoint { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.api-endpoint code { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--text); }
.api-method { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; font-family: var(--mono); flex-shrink: 0; }
.api-method.get { background: rgba(52,199,89,0.12); color: #1a7f3c; }
.api-method.post { background: rgba(0,113,227,0.1); color: var(--accent); }
.api-method.put { background: rgba(255,149,0,0.12); color: #b86e00; }
.api-method.delete { background: rgba(255,59,48,0.1); color: #c0392b; }
.about-footer { text-align: center; padding-top: 36px; border-top: 1px solid var(--border); margin-top: 20px; }
.about-footer p { font-size: 13px; color: var(--text-3); margin-bottom: 8px; }
.about-footer-sub { font-size: 12px !important; color: var(--text-3) !important; margin-bottom: 16px !important; }
.login-about-link { text-align: center; margin-top: 20px; font-size: 13px; }
.login-about-link a { color: var(--text-2); transition: color var(--ease); }
.login-about-link a:hover { color: var(--accent); }

@media (max-width: 900px) {
    .about-layout { flex-direction: column; }
    .about-nav { position: static; width: 100%; max-height: none; padding: 16px 16px 0; display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); }
    .about-nav-title { display: none; }
    .about-nav a { padding: 5px 10px; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); }
    .about-page { padding: 24px 16px 60px; }
}

@media (max-width: 768px) {
    :root { --sidebar: 220px; }
    .bubble { max-width: 88%; }
    .prompt-grid { grid-template-columns: 1fr; }
    .about-hero h1 { font-size: 26px; }
    .about-grid-4, .about-grid-3, .about-grid-2 { grid-template-columns: 1fr; }
    .about-pre { font-size: 11px; padding: 12px; }
}
