:root {
  color-scheme: dark;
  --bg: #0b0e12;
  --panel: #11161d;
  --panel-soft: #171d25;
  --line: rgba(255,255,255,.08);
  --text: #edf1f5;
  --muted: #87909d;
  --accent: #e2b07d;
  --accent-soft: rgba(226,176,125,.13);
  --blue: #8db4ff;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; }
body { margin: 0; min-width: 900px; min-height: 620px; overflow: hidden; background: var(--bg); color: var(--text); font-family: Inter, "Microsoft YaHei", "PingFang SC", sans-serif; }
button, textarea, input { font: inherit; }
button { cursor: pointer; }
.app-shell { display: grid; grid-template-columns: 220px minmax(460px, 1fr) 270px; height: 100vh; min-height: 0; overflow: hidden; }
.sidebar, .inspector { height: 100vh; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; background: var(--panel); border-right: 1px solid var(--line); padding: 24px 18px; display: flex; flex-direction: column; }
.inspector { border-right: 0; border-left: 1px solid var(--line); }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(226,176,125,.6); color: var(--accent); border-radius: 12px; font-family: Georgia, serif; font-size: 22px; margin-bottom: 12px; }
.brand-name { font-size: 18px; letter-spacing: .03em; }
.brand-subtitle { color: var(--muted); font-size: 12px; margin-top: 4px; }
.new-session { border: 1px solid var(--line); background: var(--accent-soft); color: var(--accent); border-radius: 10px; padding: 10px 12px; text-align: left; margin: 32px 0 26px; }
.sidebar-section-title, .eyebrow { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.session-card { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; line-height: 1.5; }
.muted { color: var(--muted); }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #db7d78; box-shadow: 0 0 0 4px rgba(219,125,120,.12); }
.status-dot.online { background: #8ed39b; box-shadow: 0 0 0 4px rgba(142,211,155,.12); }
.main-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; padding: 26px 34px 16px; border-bottom: 1px solid var(--line); }
h1 { margin: 8px 0 0; font-size: 23px; font-weight: 500; }
.topbar-actions { display: flex; gap: 12px; align-items: center; }
.topbar-model-balance { display: grid; gap: 2px; min-width: 112px; color: var(--muted); font-size: 10px; line-height: 1.25; text-align: right; }
.topbar-model-balance span:first-child { color: #cbd3df; }
.topbar-model-balance span:last-child { color: var(--accent); }
.safe-toggle { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.safe-toggle input { accent-color: var(--accent); }
.quiet-button { color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12px; }
.sync-button { color: #1a1712; background: var(--accent); border: 0; border-radius: 8px; padding: 8px 12px; font-size: 12px; font-weight: 600; }
.sync-button:disabled { opacity: .5; cursor: default; }
.transcript { flex: 1; min-height: 0; overflow-y: auto; padding: 28px 34px; }
.welcome-card { max-width: 560px; margin: 5vh auto 0; padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: radial-gradient(circle at 15% 0%, rgba(226,176,125,.12), transparent 42%), var(--panel-soft); }
.welcome-kicker { color: var(--accent); font-size: 10px; letter-spacing: .18em; }
.welcome-card h2 { font-weight: 400; font-family: Georgia, "Songti SC", serif; font-size: 31px; line-height: 1.3; margin: 18px 0 14px; }
.welcome-card p { color: var(--muted); line-height: 1.7; font-size: 13px; }
.message { display: flex; margin: 13px 0; }
.message.user { justify-content: flex-end; }
.bubble { max-width: 78%; padding: 12px 15px; border-radius: 15px; line-height: 1.65; white-space: pre-wrap; font-size: 14px; }
.message.user .bubble { background: #243044; color: #eff4ff; border-bottom-right-radius: 5px; }
.message.assistant .bubble { background: var(--panel-soft); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.event-note { display: inline-flex; gap: 7px; align-items: center; color: var(--muted); font-size: 11px; margin: 7px 0 7px 4px; }
.event-note .tag { color: var(--blue); border: 1px solid rgba(141,180,255,.25); padding: 2px 6px; border-radius: 4px; }
.event-note.warning .tag { color: var(--accent); border-color: rgba(226,176,125,.3); }
.composer-wrap { padding: 0 34px 24px; }
.dialogue-thinking { display: flex; align-items: center; gap: 8px; min-height: 22px; margin: 0 3px 7px; color: var(--muted); font-size: 11px; }
.thinking-dots { display: inline-flex; gap: 3px; align-items: center; }
.thinking-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); opacity: .35; animation: thinking-pulse 1.1s infinite ease-in-out; }
.thinking-dots i:nth-child(2) { animation-delay: .15s; }
.thinking-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes thinking-pulse { 0%, 70%, 100% { opacity: .3; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-2px); } }
.composer { border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft); padding: 12px 14px 10px; }
.composer textarea { width: 100%; border: 0; outline: 0; resize: none; background: transparent; color: var(--text); line-height: 1.5; }
.composer textarea::placeholder, .approval-controls input::placeholder { color: #64707f; }
.composer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.composer-note { color: #626d7a; font-size: 11px; }
.send-button, .approve-button { background: var(--accent); color: #1a1712; border: 0; border-radius: 8px; padding: 8px 16px; font-weight: 600; }
.send-button:disabled, .approve-button:disabled { opacity: .45; cursor: default; }
.approval-bar { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: rgba(226,176,125,.08); border: 1px solid rgba(226,176,125,.24); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.approval-label { color: var(--accent); font-size: 12px; }
.approval-hint { color: var(--muted); font-size: 11px; margin-top: 4px; }
.approval-controls { display: flex; gap: 8px; min-width: 420px; }
.approval-controls input { flex: 1; min-width: 0; background: #1c2026; border: 1px solid var(--line); border-radius: 7px; color: var(--text); padding: 8px 9px; outline: 0; font-size: 12px; }
.hidden { display: none; }
.inspector { padding: 28px 17px; gap: 18px; }
.inspector h2 { margin: 7px 0 0; font-size: 17px; font-weight: 500; }
.inspector-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: rgba(255,255,255,.015); }
.inspector-title { color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.inspector-value { margin-top: 9px; font-size: 14px; }
.memory-list { margin-top: 10px; display: grid; gap: 6px; }
.memory-item { border-left: 2px solid var(--blue); padding-left: 8px; color: #bac4d1; font-size: 11px; line-height: 1.5; }
.boundary-card ul { padding-left: 17px; margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.runtime-card { margin-top: auto; }
.runtime-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 9px; color: var(--muted); font-size: 11px; }
.runtime-row strong { color: #cbd3df; font-weight: 400; }
@media (max-width: 1040px) { .app-shell { grid-template-columns: 190px minmax(460px, 1fr) 220px; } .approval-bar { flex-direction: column; align-items: stretch; } .approval-controls { min-width: 0; } }

.runtime-identity { margin: 30px 0 20px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.02); }
.runtime-name { margin-top: 7px; font-size: 15px; }
.runtime-mode { margin-top: 5px; color: var(--muted); font-size: 11px; }
.nav-tabs { display: grid; gap: 4px; }
.nav-button { border: 0; border-left: 2px solid transparent; background: transparent; color: var(--muted); text-align: left; border-radius: 7px; padding: 9px 10px; font-size: 12px; }
.nav-button:hover { color: var(--text); background: rgba(255,255,255,.035); }
.nav-button.active { color: var(--accent); background: var(--accent-soft); border-left-color: var(--accent); }
.view { display: none; min-height: 0; flex: 1; overflow: hidden; flex-direction: column; }
.view.active-view { display: flex; }
.view.hidden { display: none !important; }
.view-subtitle { color: var(--muted); font-size: 12px; margin-top: 7px; }
.runtime-activity { color: var(--muted); font-size: 11px; max-width: 180px; text-align: right; }
.view-grid { min-height: 0; overflow-y: auto; padding: 30px 34px; display: grid; gap: 12px; }
.state-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.large-card { border: 1px solid var(--line); border-radius: 15px; padding: 22px; background: radial-gradient(circle at 8% 0%, rgba(226,176,125,.1), transparent 42%), var(--panel-soft); }
.state-hero { grid-column: 1 / -1; min-height: 170px; }
.state-hero h2 { margin: 16px 0 8px; font-size: 26px; font-weight: 400; font-family: Georgia, "Songti SC", serif; }
.state-hero p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.timeline-content-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 30px; }
.timeline-hero { margin: 0 34px 12px; padding: 20px; display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; border: 1px solid rgba(226,176,125,.24); border-radius: 14px; background: radial-gradient(circle at 8% 0%, rgba(226,176,125,.1), transparent 45%), var(--panel-soft); }
.timeline-hero h3 { margin: 8px 0 0; font-size: 20px; font-weight: 500; }
.timeline-hero p { max-width: 700px; margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.timeline-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.timeline-panel { margin-top: 4px; }
.inbox-content-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 30px; }
.inbox-hero { margin: 0 34px 12px; padding: 20px; display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; border: 1px solid rgba(141,180,255,.22); border-radius: 14px; background: radial-gradient(circle at 8% 0%, rgba(141,180,255,.09), transparent 45%), var(--panel-soft); }
.inbox-hero h3 { margin: 8px 0 0; font-size: 20px; font-weight: 500; }
.inbox-hero p { max-width: 700px; margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.inbox-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inbox-panel { margin-top: 4px; }
.settings-content-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 30px; }
.settings-panel { margin: 0 34px 12px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); }
.settings-heading { padding: 0; }
.settings-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.settings-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.settings-backup-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 13px; }
.projects-content-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 30px; }
.project-form-panel, .project-board-panel { margin: 0 34px 12px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); }
.project-heading { padding: 0; }
.project-form { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) 120px auto; gap: 8px; align-items: center; margin-top: 14px; }
.project-form input, .project-form select { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #1c2026; color: var(--text); padding: 9px 10px; outline: none; font-size: 12px; }
.project-board { display: grid; gap: 9px; margin-top: 14px; }
.project-card { border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; background: rgba(255,255,255,.02); }
.project-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.project-card-title { color: #dfe6ef; font-size: 13px; line-height: 1.55; }
.project-card-status { color: var(--muted); font-size: 10px; }
.project-card-next { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.project-card-meta { margin-top: 7px; color: #626d7a; font-size: 10px; }
.project-card-controls { display: flex; gap: 7px; margin-top: 11px; }
.project-card-controls button { padding: 5px 8px; font-size: 10px; }
.sync-panel { margin: 0 34px 30px; padding: 18px; border: 1px solid rgba(141,180,255,.22); border-radius: 13px; background: linear-gradient(135deg, rgba(141,180,255,.06), rgba(255,255,255,.015)); }
.sync-panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sync-panel-heading h3 { margin: 8px 0 0; font-size: 16px; font-weight: 500; }
.sync-message { color: #cbd3df; font-size: 12px; line-height: 1.7; margin: 13px 0; }
.sync-progress-track { height: 7px; background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden; }
.sync-progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--accent)); border-radius: inherit; transition: width .25s ease; }
.sync-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 9px; color: var(--muted); font-size: 11px; }
.sync-result { margin-top: 10px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.sync-result.sync-error { color: #e2b07d; }
.distill-status-warning { color: var(--accent) !important; border-color: rgba(226,176,125,.35) !important; }
.distill-content-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 30px; }
.distill-hero { margin: 0 34px 12px; padding: 20px; display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; border: 1px solid rgba(226,176,125,.24); border-radius: 14px; background: radial-gradient(circle at 8% 0%, rgba(226,176,125,.1), transparent 45%), var(--panel-soft); }
.distill-hero h3 { margin: 8px 0 0; font-size: 19px; font-weight: 500; }
.distill-hero p { max-width: 640px; margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.distill-source-grid, .distill-rule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 0 34px 12px; }
.distill-info-card, .distill-rule-card { min-width: 0; border: 1px solid var(--line); border-radius: 11px; padding: 14px; background: rgba(255,255,255,.02); }
.distill-info-card strong, .distill-rule-card strong { color: #dfe6ef; font-size: 13px; font-weight: 400; overflow-wrap: anywhere; }
.distill-card-detail, .distill-rule-card p { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.distill-panel { margin: 0 34px 12px; padding: 18px; border: 1px solid rgba(141,180,255,.22); border-radius: 13px; background: linear-gradient(135deg, rgba(141,180,255,.06), rgba(255,255,255,.015)); }
.distill-rule-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.distill-stage-list { margin-top: 5px; }
.distill-stage-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 12px 34px 0; }
.distill-stage-card { min-width: 0; min-height: 138px; border: 1px solid var(--line); border-radius: 11px; padding: 14px; background: rgba(255,255,255,.02); }
.distill-stage-card > span { color: var(--accent); font-size: 10px; letter-spacing: .12em; }
.distill-stage-card strong { display: block; margin-top: 10px; color: #dfe6ef; font-size: 13px; font-weight: 500; }
.distill-stage-card p { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.info-card { min-height: 82px; border: 1px solid var(--line); border-radius: 11px; padding: 14px; background: rgba(255,255,255,.02); }
.card-label { color: var(--muted); font-size: 11px; margin-bottom: 10px; }
.info-card strong { color: #dfe6ef; font-size: 13px; font-weight: 400; overflow-wrap: anywhere; }
.tab-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px 34px 0; }
.tab-summary-grid .info-card { min-height: 70px; }
.memory-content-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 30px; }
.source-search-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 30px; }
.source-search-panel { margin: 0 34px 12px; padding: 18px; border: 1px solid rgba(141,180,255,.22); border-radius: 13px; background: linear-gradient(135deg, rgba(141,180,255,.06), rgba(255,255,255,.015)); }
.source-search-form { display: grid; grid-template-columns: minmax(0, 1fr) 130px 100px auto; gap: 8px; }
.source-search-form input, .source-search-form select { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #1c2026; color: var(--text); padding: 9px 10px; outline: none; font-size: 12px; }
.source-search-form input:focus, .source-search-form select:focus { border-color: rgba(141,180,255,.55); }
.source-search-note, .source-search-status { color: var(--muted); font-size: 11px; line-height: 1.65; margin-top: 10px; }
.source-search-status { color: #cbd3df; }
.source-results-heading { padding: 12px 34px 0; }
.source-search-results { padding: 12px 34px 30px; display: grid; gap: 9px; }
.source-result-card { border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.02); padding: 13px 14px; }
.source-result-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.source-result-heading strong { color: #dfe6ef; font-size: 12px; font-weight: 500; }
.source-result-controls { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.source-copy-button { padding: 5px 8px; font-size: 10px; }
.source-result-excerpt { color: #e1e6ed; font-size: 13px; line-height: 1.75; white-space: pre-wrap; margin: 10px 0 8px; }
.source-result-meta { color: var(--muted); font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.source-context-panel { margin: 0 34px 30px; padding: 16px; border: 1px solid rgba(226,176,125,.24); border-radius: 12px; background: rgba(226,176,125,.045); }
.source-context-heading { padding: 0; }
.source-context-body { display: grid; gap: 7px; margin-top: 12px; }
.source-context-row { border-left: 2px solid var(--line); padding: 8px 10px; color: #dfe6ef; font-size: 12px; line-height: 1.7; white-space: pre-wrap; }
.source-context-row.target { border-left-color: var(--accent); background: rgba(226,176,125,.08); }
.action-queue-panel { margin: 18px 34px 0; padding: 16px; border: 1px solid rgba(226,176,125,.24); border-radius: 13px; background: rgba(226,176,125,.045); }
.action-queue-heading { padding: 0; }
.action-queue-form { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-top: 14px; }
.action-queue-form input, .action-queue-form select { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #1c2026; color: var(--text); padding: 9px 10px; outline: none; font-size: 12px; }
.action-arrow { color: var(--accent); text-align: center; }
.memory-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.memory-lifecycle-panel { margin: 12px 34px 0; padding: 16px; border: 1px solid rgba(141,180,255,.2); border-radius: 12px; background: rgba(141,180,255,.035); }
.memory-lifecycle-heading { padding: 0; }
.memory-lifecycle-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin-top: 14px; }
.memory-lifecycle-summary > div { border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; background: rgba(255,255,255,.02); }
.memory-lifecycle-summary span { display: block; color: var(--muted); font-size: 10px; }
.memory-lifecycle-summary strong { display: block; margin-top: 6px; color: #dfe6ef; font-size: 16px; font-weight: 400; }
.memory-lifecycle-note { margin: 11px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.memory-lifecycle-list { display: grid; gap: 8px; margin-top: 12px; max-height: 260px; overflow-y: auto; }
.memory-lifecycle-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.memory-lifecycle-item:first-child { border-top: 0; padding-top: 0; }
.memory-lifecycle-item-main { min-width: 0; }
.memory-lifecycle-item-title { color: #dfe6ef; font-size: 12px; line-height: 1.55; }
.memory-lifecycle-item-meta { color: var(--muted); font-size: 10px; margin-top: 4px; line-height: 1.5; overflow-wrap: anywhere; }
.memory-lifecycle-item button { flex: 0 0 auto; padding: 5px 8px; font-size: 10px; }
.memory-lifecycle-retired .memory-lifecycle-item-title { color: #9ca5b1; text-decoration: line-through; }
.memory-history-block { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.memory-history-heading { padding: 0; }
.memory-history-list { display: grid; gap: 7px; margin-top: 11px; max-height: 220px; overflow-y: auto; }
.memory-history-item { border-top: 1px solid var(--line); padding-top: 9px; }
.memory-history-item:first-child { border-top: 0; padding-top: 0; }
.memory-history-title { color: #dfe6ef; font-size: 12px; line-height: 1.5; }
.memory-history-meta { color: var(--muted); font-size: 10px; line-height: 1.5; margin-top: 4px; overflow-wrap: anywhere; }
.memory-revision-item, .memory-conflict-item { border-top: 1px solid var(--line); padding-top: 10px; }
.memory-revision-item:first-child, .memory-conflict-item:first-child { border-top: 0; padding-top: 0; }
.memory-revision-versions, .memory-conflict-alternatives { display: grid; gap: 6px; margin-top: 9px; }
.memory-revision-version { display: grid; gap: 3px; border-left: 2px solid var(--line); padding: 7px 9px; color: #cbd3df; font-size: 11px; line-height: 1.55; }
.memory-revision-version.current { border-left-color: var(--blue); background: rgba(141,180,255,.06); }
.memory-revision-version strong { color: #dfe6ef; font-weight: 400; }
.memory-revision-version span { color: var(--muted); font-size: 10px; }
.memory-conflict-alternative { border-left: 2px solid rgba(226,176,125,.65); padding: 7px 9px; color: #e0c4a5; font-size: 11px; line-height: 1.55; }
.identity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px 34px 0; }
.identity-panel { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: rgba(255,255,255,.02); }
.identity-panel-wide { grid-column: 1 / -1; }
.memory-feedback-panel { margin: 12px 34px 0; padding: 16px; border: 1px solid rgba(226,176,125,.24); border-radius: 12px; background: rgba(226,176,125,.045); }
.memory-feedback-heading { padding: 0; }
.memory-feedback-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.memory-feedback-form { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(0, 1.5fr) auto; gap: 8px; align-items: center; margin-top: 13px; }
.memory-feedback-form select, .memory-feedback-form textarea { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #1c2026; color: var(--text); padding: 9px 10px; outline: none; font-size: 12px; }
.memory-feedback-form textarea { resize: vertical; line-height: 1.5; }
.memory-feedback-list { display: grid; gap: 8px; margin-top: 12px; }
.memory-feedback-item { border-top: 1px solid var(--line); padding-top: 10px; }
.memory-feedback-item:first-child { border-top: 0; padding-top: 0; }
.memory-feedback-item-title { color: #dfe6ef; font-size: 12px; line-height: 1.55; }
.memory-feedback-item-meta { color: var(--muted); font-size: 10px; margin-top: 4px; line-height: 1.55; }
.identity-panel-heading, .ledger-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.identity-panel-heading h3, .ledger-heading h3 { margin: 8px 0 0; font-size: 16px; font-weight: 500; }
.identity-section-list { display: grid; gap: 10px; margin-top: 14px; }
.identity-section { border-top: 1px solid var(--line); padding-top: 12px; }
.identity-section:first-child { border-top: 0; padding-top: 0; }
.identity-section h4 { margin: 0; color: #dfe6ef; font-size: 13px; font-weight: 500; line-height: 1.5; }
.identity-section p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; white-space: pre-wrap; }
.identity-summary { margin: 14px 0 0; color: #cbd3df; font-size: 12px; line-height: 1.75; }
.identity-empty { color: var(--muted); border: 1px dashed var(--line); border-radius: 9px; padding: 13px; font-size: 12px; line-height: 1.7; }
.key-memory-list { display: grid; gap: 9px; margin-top: 14px; }
.key-memory-item { border: 1px solid var(--line); border-radius: 9px; padding: 12px 13px; background: rgba(255,255,255,.018); }
.key-memory-statement { color: #dfe6ef; font-size: 13px; line-height: 1.65; }
.key-memory-meta { color: var(--muted); font-size: 10px; line-height: 1.6; margin-top: 7px; }
.ledger-heading { padding: 25px 34px 0; }
.memory-events-list { padding-top: 12px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; padding: 28px 34px 12px; }
.section-heading-actions { display: flex; align-items: center; gap: 8px; }
.section-heading h2 { margin: 8px 0 0; font-size: 22px; font-weight: 500; }
.boundary-pill { color: var(--blue); border: 1px solid rgba(141,180,255,.25); border-radius: 20px; padding: 6px 9px; font-size: 10px; }
.stack-list { min-height: 0; overflow-y: auto; padding: 12px 34px 30px; display: grid; gap: 9px; }
.stack-item { border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.02); padding: 13px 14px; }
.stack-item-title { color: #dfe6ef; font-size: 13px; }
.stack-item-meta { color: var(--muted); font-size: 11px; margin-top: 6px; line-height: 1.5; }
.action-card-controls { display: flex; gap: 7px; margin-top: 11px; }
.action-card-controls button { padding: 5px 8px; font-size: 10px; }
.stack-empty { color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; padding: 18px; font-size: 12px; line-height: 1.7; }
.mechanism-grid { min-height: 0; overflow-y: auto; padding: 12px 34px 30px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mechanism-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: rgba(255,255,255,.02); }
.mechanism-card .mechanism-head { display: flex; justify-content: space-between; gap: 10px; }
.mechanism-card strong { font-size: 13px; font-weight: 500; }
.mechanism-status { font-size: 10px; color: #8ed39b; }
.mechanism-status.degraded { color: #e2b07d; }
.mechanism-card p { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 10px 0 0; }
@media (max-width: 1040px) { .state-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mechanism-grid { grid-template-columns: 1fr; } }
@media (max-width: 1040px) { .tab-summary-grid, .memory-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .identity-grid { grid-template-columns: 1fr; } .identity-panel-wide { grid-column: auto; } }
@media (max-width: 1040px) { .distill-source-grid, .distill-rule-grid, .distill-stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .distill-hero { flex-direction: column; } }
@media (max-width: 1040px) { .source-search-form { grid-template-columns: minmax(0, 1fr) 1fr; } .action-queue-form { grid-template-columns: 1fr 1fr; } .action-queue-form .action-arrow { display: none; } }
@media (max-width: 1040px) { .memory-lifecycle-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1040px) { .timeline-hero { flex-direction: column; } }
@media (max-width: 1040px) { .inbox-hero { flex-direction: column; } .memory-feedback-form { grid-template-columns: 1fr; } }
@media (max-width: 1040px) { .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1040px) { .project-form { grid-template-columns: 1fr 1fr; } }

.auth-overlay { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 24px; background: rgba(10, 13, 17, .92); backdrop-filter: blur(10px); }
.auth-overlay.hidden { display: none; }
.auth-card { width: min(430px, 100%); padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: #151a20; box-shadow: 0 26px 80px rgba(0, 0, 0, .35); }
.auth-card h1 { margin: 8px 0 10px; color: var(--text); font-size: 24px; font-weight: 600; }
.auth-card p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.auth-form { display: grid; gap: 10px; margin-top: 20px; }
.auth-form input { border: 1px solid var(--line); border-radius: 9px; background: #1b2027; color: var(--text); padding: 11px 12px; outline: none; font: inherit; }
.auth-form input:focus { border-color: rgba(169, 198, 226, .65); }
.auth-status { min-height: 18px; margin-top: 12px; color: var(--muted); font-size: 11px; }
.upload-row { position: relative; padding-right: 118px; }
.upload-row-controls { position: absolute; top: 14px; right: 12px; }
.upload-delete-button { color: #d99585; border-color: rgba(217, 149, 133, .28); }
