/* ── Design tokens ─────────────────────────────────────────────────────────── */
:root {
  --bg:           #F9F8F6;
  --surface:      #FFFFFF;
  --accent:       #2D6A4F;
  --accent-light: #D8F3DC;
  --text-primary: #1A1A1A;
  --text-muted:   #6B6B6B;
  --border:       #E8E6E1;
  --positive:     #40916C;
  --negative:     #C0392B;
  --warning:      #E67E22;

  /* Chart palette */
  --chart-1: #2D6A4F;
  --chart-2: #52B788;
  --chart-3: #74C69D;
  --chart-4: #B7E4C7;
  --chart-5: #E9C46A;
  --chart-6: #F4A261;

  --radius:    8px;
  --radius-lg: 12px;
  --shadow:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ─────────────────────────────────────────────────────────────── */
.amount {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: -0.01em;
}
.amount-lg       { font-size: 28px; font-weight: 700; }
.amount-md       { font-size: 18px; font-weight: 600; }
.amount-secondary { font-size: 12px; color: var(--text-muted); font-weight: 400; }

h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 24px; }
h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 16px; }

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* Side navigation */
.sidenav {
  width: 220px;
  min-height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  flex-shrink: 0;
}
.sidenav-brand {
  padding: 0 20px 24px;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.03em;
}
.sidenav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 20px;
}
.sidenav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.15s;
  text-decoration: none;
  font-size: 14px;
  user-select: none;
}
.sidenav-item:hover  { background: var(--bg); color: var(--text-primary); }
.sidenav-item.active { background: var(--accent-light); color: var(--accent); }
.sidenav-spacer      { flex: 1; }

/* Main content */
.main {
  flex: 1;
  padding: 32px 40px;
  overflow-y: auto;
}

/* ── Cards ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn-primary:hover    { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg); }
.btn-danger {
  background: #fdf0ed;
  color: var(--negative);
  border-color: #f5c6bc;
}
.btn-danger:hover { background: #fbe3de; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-full { width: 100%; padding: 12px; }

/* ── Forms ──────────────────────────────────────────────────────────────────── */
.form-field   { margin-bottom: 16px; }
.form-label   { display: block; font-weight: 500; margin-bottom: 6px; }
.form-input, .form-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  background: var(--bg);
  color: var(--text-primary);
  transition: border-color 0.15s;
  outline: none;
}
.form-input:focus, .form-select:focus { border-color: var(--accent); background: var(--surface); }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Tables ─────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
th {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg);
}
tr:hover td { background: #fafaf8; }
td.amount-cell { font-variant-numeric: tabular-nums; text-align: right; }

/* ── Filters / toolbar ──────────────────────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.search-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  background: var(--surface);
  outline: none;
  width: 240px;
}
.search-input:focus { border-color: var(--accent); }

/* ── Badges ─────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
}
.badge-category {
  background: var(--accent-light);
  color: var(--accent);
  cursor: pointer;
}
.badge-uncategorized {
  background: #FFF3CD;
  color: #856404;
  cursor: pointer;
}
.badge-reimbursable {
  background: #E3F2FD;
  color: #1565C0;
}
.badge-internal {
  background: #F3E5F5;
  color: #6A1B9A;
}

/* ── Modals ─────────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  padding: 32px;
  width: 480px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
}
.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ── Status / feedback ──────────────────────────────────────────────────────── */
.error-message {
  background: #fdf0ed;
  border: 1px solid #f5c6bc;
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--negative);
  margin-bottom: 16px;
  font-size: 13px;
}
.success-message {
  background: #d8f3dc;
  border: 1px solid #b7e4c7;
  border-radius: var(--radius);
  padding: 10px 14px;
  color: #1b4332;
  margin-bottom: 16px;
  font-size: 13px;
}
.info-box {
  background: #E3F2FD;
  border: 1px solid #BBDEFB;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 13px;
  color: #1565C0;
  margin-bottom: 16px;
}

/* ── Loading ─────────────────────────────────────────────────────────────────── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  color: var(--text-muted);
}
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Login page ─────────────────────────────────────────────────────────────── */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.login-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 48px 40px;
  width: 380px;
  box-shadow: var(--shadow-md);
}
.login-title    { font-size: 28px; font-weight: 700; color: var(--accent); letter-spacing: -0.03em; margin-bottom: 4px; }
.login-subtitle { color: var(--text-muted); margin-bottom: 32px; }

/* ── Page header ─────────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-header h1 { margin-bottom: 0; }

/* ── Utilities ──────────────────────────────────────────────────────────────── */
.text-muted    { color: var(--text-muted); }
.text-positive { color: var(--positive); }
.text-negative { color: var(--negative); }
.text-right    { text-align: right; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.gap-8  { gap: 8px; }
.flex   { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* Category color dot */
.color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ── Coming soon placeholder ────────────────────────────────────────────────── */
.coming-soon {
  padding: 64px;
  text-align: center;
  color: var(--text-muted);
}
.coming-soon-icon { font-size: 32px; margin-bottom: 12px; }
.coming-soon-title { font-size: 18px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }

/* ── Review Mode ────────────────────────────────────────────────────────────── */
.review-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.review-container { max-width: 680px; margin: 0 auto; }
.review-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.review-counterparty {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 4px 0 6px;
}
.review-amount {
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}
.review-amount.negative { color: var(--negative); }
.review-amount.positive { color: var(--positive); }
.review-description {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.4;
}
.review-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 20px 0;
}
.review-cat-btn {
  padding: 10px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg);
  transition: all 0.12s;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}
.review-cat-btn:hover:not(:disabled) {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}
.review-cat-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.key-hint {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
  background: var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  flex-shrink: 0;
}
.review-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.review-hint { font-size: 12px; }
.rule-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #FFFDE7;
  border: 1px solid #F9A825;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-top: 16px;
  font-size: 13px;
}

/* ── Search overlay ─────────────────────────────────────────────────────────── */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  z-index: 200;
}
.search-box {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  width: 480px;
  overflow: hidden;
}
.search-results { max-height: 320px; overflow-y: auto; }
.search-result-item {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--accent-light); color: var(--accent); }

/* ── Investments ──────────────────────────────────────────────────────────── */

.portfolio-summary {
  display: flex;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.portfolio-stat {
  flex: 1;
  min-width: 120px;
}
.portfolio-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.portfolio-stat-value {
  font-size: 18px;
  font-weight: 700;
}
.portfolio-stat-value.positive { color: var(--positive); }
.portfolio-stat-value.negative { color: var(--negative); }

.platform-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.platform-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.position-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}
.position-row:hover { background: var(--accent-light); margin: 0 -20px; padding: 10px 20px; }
.position-row.expanded { background: var(--accent-light); margin: 0 -20px; padding: 10px 20px; }

.position-detail {
  padding: 16px 0 8px;
  border-top: 1px solid var(--border);
}
.position-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 6px;
}

.events-list,
.entries-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.events-list-item,
.entries-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: var(--bg);
  border-radius: 4px;
  flex-wrap: wrap;
}

/* ── Dashboard ────────────────────────────────────────────────────────────── */

.dashboard-networth {
  display: flex;
  align-items: center;
  gap: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.dashboard-networth-main { flex: 1; }
.dashboard-networth-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.dashboard-networth-value { font-size: 28px; font-weight: 700; }
.dashboard-networth-side { display: flex; gap: 32px; }
.dashboard-networth-item-label { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.dashboard-networth-item-value { font-size: 16px; font-weight: 600; }

.dashboard-pending {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFF9DB;
  border: 1px solid #E9C46A;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 900px) { .dashboard-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .dashboard-cards { grid-template-columns: 1fr; } }

.dashboard-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}
.dashboard-card-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.dashboard-card-value { font-size: 20px; font-weight: 700; }
.dashboard-card-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.dashboard-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 800px) { .dashboard-charts { grid-template-columns: 1fr; } }

.dashboard-chart-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}
.dashboard-chart-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.dashboard-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.dashboard-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Analytics ────────────────────────────────────────────────────────────── */

.analytics-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}
.analytics-tab {
  padding: 8px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
  font-family: inherit;
}
.analytics-tab:hover { color: var(--text); }
.analytics-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.analytics-content { min-height: 300px; }

.analytics-chart-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.analytics-chart-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.analytics-table { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-top: 8px; }
.analytics-table-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  padding: 10px 16px;
  background: var(--bg);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.analytics-table-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  align-items: center;
}

.analytics-stat-row { display: flex; gap: 16px; margin-bottom: 16px; }
.analytics-stat { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px; flex: 1; }
.analytics-stat-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.analytics-stat-value { font-size: 24px; font-weight: 700; }
.analytics-stat-value.positive { color: var(--positive); }
.analytics-stat-value.negative { color: var(--negative); }

.color-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; flex-shrink: 0; }

/* Budget */
.budget-list { display: flex; flex-direction: column; gap: 12px; }
.budget-item { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; }
.budget-item-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.budget-bar-track { background: var(--bg); border-radius: 4px; height: 8px; overflow: hidden; }
.budget-bar-fill { height: 100%; border-radius: 4px; transition: width 0.3s ease; }

/* ── Ask Kasa ───────────────────────────────────────────────────────────────── */
.ask-input-area { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.ask-textarea { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; resize: vertical; min-height: 72px; background: var(--surface); color: var(--text); box-sizing: border-box; }
.ask-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 15%, transparent); }
.ask-examples { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.ask-example-chip { background: var(--surface-2,#F5F5F3); border: 1px solid var(--border); border-radius: 16px; padding: 4px 12px; font-size: 12px; color: var(--text-muted); cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.ask-example-chip:hover { border-color: var(--accent); color: var(--accent); }
.ask-answer { padding: 16px 20px; background: var(--surface-2,#F5F5F3); border-radius: 8px; border-left: 3px solid var(--accent); white-space: pre-wrap; line-height: 1.65; margin-bottom: 16px; font-size: 15px; }
.ask-collapsible { margin-bottom: 12px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.ask-collapsible-header { padding: 10px 14px; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; background: var(--surface); user-select: none; }
.ask-collapsible-header:hover { background: var(--surface-2,#F5F5F3); }
.ask-collapsible-body { padding: 12px 14px; background: var(--bg); border-top: 1px solid var(--border); }
.ask-sql { font-family: monospace; font-size: 12px; white-space: pre-wrap; word-break: break-all; margin: 0; }
.ask-data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ask-data-table th, .ask-data-table td { padding: 4px 8px; border: 1px solid var(--border); text-align: left; }
.ask-data-table th { background: var(--surface); font-weight: 600; }
.ask-disabled { text-align: center; padding: 32px; color: var(--text-muted); background: var(--surface-2,#F5F5F3); border-radius: 8px; line-height: 1.5; }
.ask-disabled code { background: var(--bg); padding: 1px 6px; border-radius: 4px; font-size: 13px; color: var(--text); }

/* ── Monthly Narratives ─────────────────────────────────────────────────────── */
.narrative-header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.narrative-select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; background: var(--surface); color: var(--text); }
.narrative-text { white-space: pre-wrap; line-height: 1.75; font-size: 15px; padding: 20px 24px; background: var(--surface-2,#F5F5F3); border-radius: 8px; margin-bottom: 20px; }
.narrative-insights { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 20px; }
.insight-card { padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.insight-card-icon { font-size: 20px; margin-bottom: 6px; }
.insight-card-type { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 4px; font-weight: 600; }
.insight-card-message { font-size: 13px; line-height: 1.5; }

