/* Synap — Dark Theme CSS
   (c) 2026 A&E Ventures, LLC */

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #22252f;
  --accent: #6c63ff;
  --accent-hover: #5a52e0;
  --text: #e0e0e0;
  --text-dim: #888;
  --text-bright: #fff;
  --border: #2a2d37;
  --urgent: #ff5555;
  --warning: #ffb347;
  --success: #50fa7b;
  --stale: #bd93f9;
  --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  height: 100vh;
}

#app { display: flex; flex-direction: column; height: 100vh; }

/* ── Header ─────────────────────────────────────────────── */

header {
  display: flex;
  align-items: center;
  padding: 0 20px;
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  gap: 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 100;
  overflow: visible;
}
.header-left { display: flex; align-items: center; min-width: 180px; }
.logo { font-size: 20px; font-weight: 700; color: var(--accent); }
.header-center { flex: 1; max-width: 600px; margin: 0 auto; }
.header-right { display: flex; align-items: center; gap: 8px; min-width: 180px; justify-content: flex-end; }
.user-name { font-size: 13px; color: var(--text-dim); }
.btn-icon {
  background: none; border: none; font-size: 18px; cursor: pointer;
  padding: 6px; border-radius: 6px; transition: background 0.2s;
}
.btn-icon:hover { background: var(--surface2); }

/* ── Capture Bar ────────────────────────────────────────── */

.capture-bar {
  display: flex;
  gap: 8px;
  width: 100%;
}
.capture-bar input {
  flex: 1;
  padding: 8px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.capture-bar input:focus { border-color: var(--accent); }
.capture-bar input::placeholder { color: var(--text-dim); }
.capture-bar button {
  padding: 8px 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.capture-bar button:hover { background: var(--accent-hover); }

/* ── Layout ─────────────────────────────────────────────── */

.layout { display: flex; flex: 1; overflow: hidden; }

/* ── Sidebar ────────────────────────────────────────────── */

#sidebar {
  width: 200px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 12px 8px;
  flex-shrink: 0;
  overflow-y: auto;
}
.nav-item {
  display: block;
  padding: 10px 14px;
  color: var(--text-dim);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 14px;
  transition: all 0.15s;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { background: var(--accent); color: #fff; }

/* ── Main Content ───────────────────────────────────────── */

#content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}
.page { display: none; }
.page.active { display: block; }
.page h2 { font-size: 22px; margin-bottom: 20px; color: var(--text-bright); }

/* ── Countdown Widget ───────────────────────────────────── */

.countdown-widget {
  background: linear-gradient(135deg, #1a1d27 0%, #22252f 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  margin-bottom: 24px;
}
.countdown-label { font-size: 13px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
.countdown-time {
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin: 8px 0;
}
.countdown-time.urgent { color: var(--urgent); }
.countdown-time.warning { color: var(--warning); }
.countdown-event { font-size: 16px; color: var(--text); margin-bottom: 16px; }
.countdown-set {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.countdown-set input {
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  outline: none;
}
.countdown-set input:focus { border-color: var(--accent); }
.countdown-set button {
  padding: 6px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

/* ── Stats Row ──────────────────────────────────────────── */

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.stat-number { font-size: 32px; font-weight: 700; color: var(--text-bright); }
.stat-label { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.stat-card.urgent .stat-number { color: var(--urgent); }
.stat-card.warning .stat-number { color: var(--warning); }
.stat-card.stale .stat-number { color: var(--stale); }

/* ── Widgets ────────────────────────────────────────────── */

.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.widget h3 {
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
.widget-body { padding: 14px 18px; }

.empty-state {
  color: var(--text-dim);
  font-size: 14px;
  text-align: center;
  padding: 24px;
}

/* ── Capture Items ──────────────────────────────────────── */

.capture-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.capture-item:last-child { border-bottom: none; }
.capture-priority {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.capture-priority.urgent { background: var(--urgent); }
.capture-priority.high { background: var(--warning); }
.capture-priority.normal { background: var(--text-dim); }
.capture-priority.low { background: var(--border); }
.capture-text { flex: 1; font-size: 14px; }
.capture-meta { font-size: 11px; color: var(--text-dim); white-space: nowrap; }
.capture-actions { display: flex; gap: 4px; }
.capture-actions button {
  background: none; border: none; font-size: 14px;
  cursor: pointer; padding: 4px; border-radius: 4px;
  opacity: 0.5; transition: opacity 0.15s;
}
.capture-actions button:hover { opacity: 1; }

/* ── Inbox ──────────────────────────────────────────────── */

.inbox-controls {
  display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
}
.inbox-controls select, .inbox-controls button {
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

/* ── Toast ──────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: var(--urgent); }
.toast.success { background: var(--success); color: #000; }

/* ── Settings ───────────────────────────────────────────── */

.settings-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.settings-section h3 { margin-bottom: 16px; color: var(--text-bright); font-size: 16px; }
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.setting-row:last-child { border-bottom: none; }
.setting-label { font-size: 14px; }
.setting-input {
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  width: 260px;
  text-align: right;
}
.btn-primary {
  padding: 8px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.btn-primary:hover { background: var(--accent-hover); }

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 768px) {
  #sidebar { width: 60px; }
  .nav-item { font-size: 18px; text-align: center; padding: 10px; }
  .header-center { display: none; }
  .countdown-time { font-size: 32px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

/* ── Type Badges ─────────────────────────────────────────── */

.type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.type-task { background: #6c63ff33; color: #6c63ff; }
.type-event { background: #ff636333; color: #ff6363; }
.type-reminder { background: #63b3ff33; color: #63b3ff; }
.type-note { background: #63ff8833; color: #63ff88; }
.type-shopping { background: #ffc86333; color: #ffc863; }
.type-call { background: #ff63c833; color: #ff63c8; }
.type-email { background: #c863ff33; color: #c863ff; }
.type-pending { background: #ffffff11; color: #666; }

.due-badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 12px;
  color: #ffc863;
}

/* ── Capture Item Improvements ───────────────────────────── */

.capture-body {
  flex: 1;
  min-width: 0;
}

.capture-summary {
  font-size: 13px;
  color: #888;
  margin-top: 2px;
  font-style: italic;
}

.capture-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #1f2233;
}

.capture-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: #666;
}

.capture-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.priority-select {
  background: #0f1117;
  color: #e0e0e0;
  border: 1px solid #2a2d37;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 12px;
  cursor: pointer;
}
.priority-select.priority-urgent { border-color: #ff5555; }
.priority-select.priority-high { border-color: #ff9944; }

/* ── AI Status in Settings ───────────────────────────────── */

.ai-status {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 0;
  margin-bottom: 12px;
}

.ai-provider-status {
  font-size: 13px;
  color: #888;
}
.ai-provider-status.configured { color: #4ade80; }
.ai-provider-status.missing { color: #ff5555; }

/* Briefing */
.briefing-text {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: var(--text-primary, #e0e0e0);
  background: transparent;
  margin: 0;
  padding: 0;
}
.hidden { display: none; }
.briefing-expand { padding: 8px 0; }

/* ── Projects (Phase 3A) ────────────────────────────────── */

.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.page-header h2 { margin: 0; }

.filter-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.filter-bar select { max-width: 160px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-input {
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text-dim); }
textarea.form-input { resize: vertical; }
.form-actions { display: flex; gap: 8px; margin-top: 8px; }

.btn-secondary {
  padding: 8px 16px;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
}
.btn-secondary:hover { background: var(--border); }
.btn-danger {
  padding: 8px 16px;
  background: transparent;
  color: var(--urgent);
  border: 1px solid var(--urgent);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
}
.btn-danger:hover { background: rgba(255,85,85,0.1); }

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
  border-left: 3px solid var(--border);
}
.project-card:hover { border-color: var(--accent); }
.project-card.priority-urgent { border-left-color: var(--urgent); }
.project-card.priority-high { border-left-color: var(--warning); }
.project-card.priority-normal { border-left-color: var(--border); }
.project-card.priority-low { border-left-color: #50a0ff; }

.project-card-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.project-type-icon { font-size: 16px; }
.project-name { font-weight: 600; color: var(--text-bright); }

.stale-badge {
  font-size: 11px;
  padding: 2px 8px;
  background: rgba(189,147,249,0.15);
  color: var(--stale);
  border-radius: 10px;
  white-space: nowrap;
}
.capture-count {
  font-size: 11px;
  padding: 2px 8px;
  background: rgba(108,99,255,0.15);
  color: var(--accent);
  border-radius: 10px;
}

.project-next-action {
  font-size: 13px;
  color: var(--accent);
  margin-top: 6px;
  padding-left: 28px;
}
.project-card-meta {
  display: flex; gap: 12px; margin-top: 6px; font-size: 12px;
  color: var(--text-dim); padding-left: 28px;
}

.project-item { cursor: pointer; }

/* Project Detail */
.project-detail-header { display: flex; gap: 8px; margin-bottom: 16px; align-items: center; }
.project-meta-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  background: var(--surface); padding: 12px; border-radius: var(--radius);
  margin: 12px 0; font-size: 13px;
}
.project-meta-grid strong { color: var(--text-dim); }
.project-next-action-detail {
  padding: 10px 14px;
  background: rgba(108,99,255,0.08);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 12px 0;
  font-size: 14px;
}
.project-notes {
  padding: 10px;
  background: var(--surface);
  border-radius: var(--radius);
  margin: 12px 0;
  font-size: 13px;
  white-space: pre-wrap;
}

/* Phase 3A — Capture↔Project linking */
.project-select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 4px;
  font-size: 12px;
  cursor: pointer;
  max-width: 60px;
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
}
.project-select:hover { border-color: var(--accent); }
.project-select:focus { outline: none; border-color: var(--accent); max-width: 200px; }

.project-link-badge {
  background: rgba(108, 99, 255, 0.15);
  color: var(--accent);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  white-space: nowrap;
}

/* ── Audio (Phase 2A) ──────────────────────────────────── */

.audio-drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.audio-drop-zone:hover,
.audio-drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.05);
}
.drop-icon { font-size: 16px; color: var(--text); margin-bottom: 8px; }
.drop-hint { font-size: 12px; color: var(--text-dim); }

.audio-file-info {
  padding: 10px;
  background: var(--surface2);
  border-radius: var(--radius);
  margin-top: 12px;
  font-size: 13px;
}

.audio-progress {
  margin-top: 12px;
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  height: 32px;
}
.audio-progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.3s;
}
.audio-progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  color: var(--text-bright);
}

.audio-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.audio-card:hover { border-color: var(--accent); }
.audio-card-icon { font-size: 20px; flex-shrink: 0; padding-top: 2px; }
.audio-card-body { flex: 1; min-width: 0; }
.audio-card-title { font-weight: 600; color: var(--text-bright); font-size: 14px; }
.audio-card-meta {
  display: flex; gap: 10px; margin-top: 4px;
  font-size: 12px; color: var(--text-dim); flex-wrap: wrap;
}
.audio-card-summary {
  font-size: 13px; color: var(--text-dim);
  margin-top: 6px; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

.audio-status {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.audio-status-completed { background: rgba(80,250,123,0.15); color: var(--success); }
.audio-status-processing { background: rgba(255,179,71,0.15); color: var(--warning); }
.audio-status-error { background: rgba(255,85,85,0.15); color: var(--urgent); }
.audio-status-uploaded { background: rgba(255,255,255,0.08); color: var(--text-dim); }

.audio-error {
  padding: 10px 14px;
  background: rgba(255,85,85,0.08);
  border-left: 3px solid var(--urgent);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 12px 0;
  font-size: 13px;
  color: var(--urgent);
}

.audio-detail .widget { margin-top: 16px; }

.action-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.action-item:last-child { border-bottom: none; }
.action-item-text { flex: 1; }
.action-item-assignee { font-size: 12px; color: var(--accent); }
.action-item-due { font-size: 12px; color: var(--warning); }
.action-item-priority { font-size: 11px; }

.calendar-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.calendar-entry:last-child { border-bottom: none; }

@media (max-width: 768px) {
  .audio-drop-zone {
    padding: 64px 24px;
    min-height: 200px;
  }
  .drop-icon { font-size: 20px; }
}

/* Calendar */
.cal-time { color: var(--accent); font-weight: 600; }
.cal-allday { color: var(--warning); font-size: 12px; font-weight: 600; }
.cal-location { color: var(--text-dim); font-size: 13px; }
.cal-event { border-left: 3px solid var(--accent); }
.cal-approvals { padding: 8px 12px; background: rgba(108,99,255,0.1); border-radius: 6px; color: var(--accent); cursor: pointer; margin-top: 8px; font-size: 13px; }
.cal-approvals:hover { background: rgba(108,99,255,0.2); }
.btn-sm { padding: 4px 10px; font-size: 12px; border: none; border-radius: 4px; cursor: pointer; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--error); color: #fff; }
.btn-sm:hover { opacity: 0.85; }
.capture-actions { display: flex; gap: 6px; align-items: center; margin-left: auto; flex-shrink: 0; }

/* Profile Menu */
.profile-menu { position: relative; }
.profile-toggle { display: flex; align-items: center; gap: 8px; background: none; border: 1px solid transparent; border-radius: 8px; padding: 4px 10px; cursor: pointer; color: #e0e0e0; transition: background 0.2s; }
.profile-toggle:hover { background: #1a1d27; border-color: #2a2d37; }
.profile-avatar { width: 32px; height: 32px; border-radius: 50%; background: #6c63ff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; color: white; }
.profile-dropdown { display: none; position: absolute; right: 0; top: 100%; margin-top: 6px; background: #1a1d27; border: 1px solid #2a2d37; border-radius: 8px; min-width: 160px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); z-index: 1000; overflow: hidden; }
.profile-dropdown.open { display: block; }
.profile-dropdown a { display: block; padding: 10px 14px; color: #e0e0e0; text-decoration: none; font-size: 14px; transition: background 0.15s; }
.profile-dropdown a:hover { background: #252830; }

/* ── Nav Section (Admin) ───────────────────────────────── */

.nav-section { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--border); }
.nav-section-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-dim); padding: 4px 14px; margin-bottom: 2px;
}

/* ── Integrations Page ─────────────────────────────────── */

.integration-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  border-left: 3px solid var(--border);
}
.integration-card.int-enabled { border-left-color: var(--success); }
.integration-card.int-disabled { border-left-color: var(--text-dim); opacity: 0.7; }
.integration-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.integration-info { display: flex; flex-direction: column; gap: 2px; }
.integration-name { font-weight: 600; color: var(--text-bright); font-size: 14px; }
.integration-type { font-size: 12px; color: var(--text-dim); }
.integration-actions { display: flex; gap: 6px; align-items: center; }
.integration-config-preview { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.config-tag {
  font-size: 11px; background: var(--surface2); color: var(--text-dim);
  padding: 2px 8px; border-radius: 4px; white-space: nowrap;
  max-width: 200px; overflow: hidden; text-overflow: ellipsis;
}

.btn-sm { padding: 4px 10px; font-size: 12px; border: 1px solid var(--border); border-radius: 4px; cursor: pointer; background: var(--surface2); color: var(--text); }
.btn-sm:hover { background: var(--border); }
.btn-danger-sm { border-color: var(--urgent); color: var(--urgent); background: transparent; }
.btn-danger-sm:hover { background: rgba(255,85,85,0.1); }

/* Toggle Switch */
.toggle-switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--surface2); border-radius: 20px; transition: 0.2s;
}
.toggle-slider::before {
  content: ""; position: absolute; height: 14px; width: 14px;
  left: 3px; bottom: 3px; background: var(--text-dim);
  border-radius: 50%; transition: 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--success); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); background: #fff; }

/* ── User Management Page ──────────────────────────────── */

.user-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
}
.user-card.user-inactive { opacity: 0.5; }
.user-card-header { display: flex; align-items: center; gap: 12px; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 15px; color: white; flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-card-name { font-weight: 600; color: var(--text-bright); font-size: 14px; display: block; }
.user-card-email { font-size: 12px; color: var(--text-dim); }
.user-card-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-dim); margin-top: 6px; padding-left: 48px; }
.user-card-actions { display: flex; gap: 6px; margin-top: 8px; padding-left: 48px; }

/* ── Lana — AI Assistant Widget ──────────────────────────── */

.lana-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
}

.lana-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6c63ff 0%, #9b59b6 100%);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lana-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(108, 99, 255, 0.6);
}
.lana-fab-icon {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  font-style: italic;
  font-family: Georgia, serif;
}
.lana-widget.open .lana-fab { display: none; }

.lana-panel {
  display: none;
  width: 380px;
  height: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
  flex-direction: column;
  overflow: hidden;
}
.lana-widget.open .lana-panel { display: flex; }

.lana-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, #6c63ff 0%, #9b59b6 100%);
  flex-shrink: 0;
}
.lana-header-info { display: flex; flex-direction: column; }
.lana-name { font-size: 16px; font-weight: 700; color: #fff; }
.lana-subtitle { font-size: 11px; color: rgba(255,255,255,0.7); }
.lana-header-actions { display: flex; gap: 4px; }
.lana-header-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.lana-header-btn:hover { background: rgba(255,255,255,0.25); }

.lana-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lana-msg { display: flex; }
.lana-msg-user { justify-content: flex-end; }
.lana-msg-assistant { justify-content: flex-start; }

.lana-msg-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.lana-msg-user .lana-msg-bubble {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.lana-msg-assistant .lana-msg-bubble {
  background: var(--surface2);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.lana-msg-bubble p { margin: 0 0 8px; }
.lana-msg-bubble p:last-child { margin-bottom: 0; }
.lana-msg-bubble ul, .lana-msg-bubble ol { margin: 4px 0; padding-left: 18px; }
.lana-msg-bubble li { margin-bottom: 2px; }
.lana-msg-bubble strong { color: var(--text-bright); }
.lana-msg-bubble code {
  background: rgba(0,0,0,0.3);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
}

.lana-typing {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  background: var(--surface2);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}
.lana-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  animation: lanaBounce 1.4s infinite ease-in-out both;
}
.lana-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.lana-typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes lanaBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

.lana-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.lana-input-row input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.lana-input-row input:focus { border-color: var(--accent); }
.lana-input-row input::placeholder { color: var(--text-dim); }

.lana-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lana-send:hover { background: var(--accent-hover); }
.lana-send:active { transform: scale(0.95); }
.lana-send:disabled { opacity: 0.4; cursor: default; }

/* Full-page Lana (Chat page) */
.lana-fullpage {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 180px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.lana-messages-full {
  padding: 20px 24px;
}
.lana-messages-full .lana-msg-bubble {
  max-width: 70%;
  font-size: 14px;
}
.lana-input-full {
  padding: 16px 20px;
}
.lana-input-full input {
  font-size: 14px;
  padding: 12px 18px;
}

/* ── People CRM (Phase 6) ─────────────────────────────────── */

.person-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
  border-left: 3px solid var(--border);
}
.person-card:hover { border-color: var(--accent); }
.person-card.person-overdue { border-left-color: var(--warning); }

.person-card-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.person-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px; color: white; flex-shrink: 0;
}
.person-avatar-lg {
  width: 40px; height: 40px; border-radius: 50%; background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 18px; color: white; vertical-align: middle;
  margin-right: 8px;
}
.person-name { font-weight: 600; color: var(--text-bright); font-size: 14px; }

.person-card-meta {
  display: flex; gap: 12px; margin-top: 6px; font-size: 12px;
  color: var(--text-dim); padding-left: 42px; flex-wrap: wrap;
}

.person-detail { }
.person-notes-section {
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.person-notes-section strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Lana action confirmations */
.lana-msg-bubble hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}

/* Toast z-index bump (Lana uses 900) */
.toast { z-index: 1000; }

/* Mobile adjustments for Lana */
@media (max-width: 768px) {
  .lana-panel {
    width: calc(100vw - 32px);
    height: calc(100vh - 120px);
    position: fixed;
    bottom: 16px;
    right: 16px;
  }
  .lana-fab { width: 48px; height: 48px; }
  .lana-fab-icon { font-size: 20px; }
  .lana-widget { bottom: 16px; right: 16px; }
}

/* ── Phase 7: Interrupt System ────────────────────────────── */

.interrupt-widget { border-left: 3px solid var(--warning); }

.interrupt-item {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.interrupt-item:last-child { border-bottom: none; }
.interrupt-message { flex: 1; font-size: 14px; }
.interrupt-actions { display: flex; gap: 6px; flex-shrink: 0; }

.interrupt-gentle { border-left: 3px solid var(--text-dim); }
.interrupt-firm { border-left: 3px solid var(--warning); background: rgba(255,179,71,0.05); }
.interrupt-aggressive { border-left: 3px solid var(--urgent); background: rgba(255,85,85,0.08); }

/* Firm Banner */
.firm-banner {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: rgba(255,179,71,0.15);
  border-bottom: 2px solid var(--warning);
  z-index: 500;
  padding: 0;
}
.firm-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--warning);
  gap: 12px;
}
.firm-item div { display: flex; gap: 6px; flex-shrink: 0; }

/* Aggressive Overlay */
.aggressive-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.aggressive-content {
  text-align: center;
  max-width: 500px;
  padding: 48px;
}
.aggressive-pulse {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--urgent);
  margin: 0 auto 24px;
  animation: aggressivePulse 1s infinite;
}
@keyframes aggressivePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}
.aggressive-message {
  font-size: 28px;
  font-weight: 700;
  color: var(--urgent);
  margin-bottom: 32px;
  line-height: 1.4;
}
.aggressive-ack-btn {
  padding: 16px 48px;
  font-size: 20px;
  font-weight: 700;
  background: var(--urgent);
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.1s;
}
.aggressive-ack-btn:hover { transform: scale(1.05); }
.aggressive-ack-btn:active { transform: scale(0.95); }

/* Interrupt Badge */
.nav-badge {
  background: var(--urgent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  margin-left: 6px;
  min-width: 16px;
  text-align: center;
}

/* ── Phase 7: Offline Banner ──────────────────────────────── */

.offline-banner {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: rgba(108,99,255,0.15);
  border-bottom: 2px solid var(--accent);
  z-index: 499;
  padding: 8px 20px;
  font-size: 13px;
  color: var(--accent);
  text-align: center;
}

/* ── Phase 7: PWA Install Banner ──────────────────────────── */

.pwa-banner {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 16px 20px;
  max-width: 400px;
  z-index: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.pwa-banner-text { font-size: 13px; color: var(--text); flex: 1; }
.pwa-banner-text small { color: var(--text-dim); }

/* ── Phase 7: Email Page ──────────────────────────────────── */

.email-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.email-card:hover { border-color: var(--accent); }
.email-card.email-unread {
  border-left: 3px solid var(--accent);
}
.email-card.email-unread .email-subject { font-weight: 600; color: var(--text-bright); }

.email-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface2); display: flex; align-items: center;
  justify-content: center; font-weight: 600; font-size: 14px;
  color: var(--text-dim); flex-shrink: 0;
}
.email-card-body { flex: 1; min-width: 0; }
.email-card-header { display: flex; justify-content: space-between; gap: 8px; }
.email-from { font-size: 13px; font-weight: 500; color: var(--text); }
.email-date { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.email-subject { font-size: 14px; color: var(--text); margin-top: 2px; }
.email-snippet {
  font-size: 12px; color: var(--text-dim); margin-top: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.email-meta { display: flex; gap: 6px; margin-top: 4px; }

.email-urgency {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  font-size: 10px; font-weight: 600; text-transform: uppercase;
}
.email-urgency-urgent { background: rgba(255,85,85,0.15); color: var(--urgent); }
.email-urgency-important { background: rgba(255,179,71,0.15); color: var(--warning); }
.email-urgency-normal { background: rgba(255,255,255,0.08); color: var(--text-dim); }
.email-urgency-low { background: rgba(108,99,255,0.1); color: var(--accent); }

.email-detail { }
.email-detail h2 { margin-bottom: 12px; }

/* ── Phase 8: Habits ─────────────────────────────────────────── */

.habit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  border-left: 3px solid var(--border);
  transition: border-color 0.2s;
}
.habit-card:hover { border-color: var(--accent); }
.habit-card-done { opacity: 0.7; }

.habit-streak-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--success);
  border-radius: 2px;
  transition: width 0.3s;
}

.habit-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity 0.2s;
  font-size: 14px;
}
.habit-check-item:last-of-type { border-bottom: none; }
.habit-check-item:hover { opacity: 0.8; }
.habit-check-item.habit-done .habit-check-name {
  text-decoration: line-through;
  color: var(--text-dim);
}
.habit-check { font-size: 18px; flex-shrink: 0; }
.habit-check-name { flex: 1; }
.habit-streak {
  font-size: 12px;
  color: var(--warning);
  background: rgba(255,179,71,0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── Phase 8: Heatmap ────────────────────────────────────────── */

.heatmap {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  gap: 3px;
  max-width: 100%;
  overflow-x: auto;
}
.heatmap-cell {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}
.heatmap-miss { background: var(--surface2); }
.heatmap-done { background: var(--success); }

/* ── Phase 8: Weekly Review ──────────────────────────────────── */

.review-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 16px 0;
  overflow-x: auto;
  padding: 8px 0;
}

.review-step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface2);
  border: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.review-step-circle span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
}
.review-step-circle:hover { border-color: var(--accent); }

.review-step-active {
  border-color: var(--accent);
  background: rgba(108,99,255,0.15);
}
.review-step-active span { color: var(--accent); }

.review-step-done {
  border-color: var(--success);
  background: rgba(80,250,123,0.15);
}
.review-step-done span { color: var(--success); }

.review-step-label {
  position: absolute;
  top: 44px;
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
  text-align: center;
}

.review-step-line {
  flex: 1;
  min-width: 20px;
  height: 2px;
  background: var(--border);
}

.review-nav {
  display: flex;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
}

/* ── Phase 8: Custom Day Picker ──────────────────────────────── */

.day-picker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.day-picker label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: background 0.15s;
}
.day-picker label:has(input:checked) {
  background: rgba(108,99,255,0.15);
  border-color: var(--accent);
}
.day-picker input[type="checkbox"] {
  accent-color: var(--accent);
}

/* ── Billing Page ──────────────────────────────────────────── */

.billing-plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  max-width: 480px;
}
.billing-plan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.billing-plan-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-bright);
}
.billing-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #000;
  text-transform: capitalize;
}
.billing-plan-details {
  margin-bottom: 16px;
}
.billing-detail {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.billing-detail:last-child { border-bottom: none; }
.billing-detail span:first-child { color: var(--text-dim); }
.billing-detail span:last-child { color: var(--text-bright); font-weight: 500; }

.billing-trial-countdown {
  text-align: center;
  padding: 20px;
  margin: 16px 0;
  background: rgba(255,179,71,0.08);
  border: 1px solid rgba(255,179,71,0.2);
  border-radius: var(--radius);
}
.trial-days {
  font-size: 48px;
  font-weight: 700;
  color: var(--warning);
  line-height: 1;
}
.trial-label {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}

.billing-actions {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Subscription Banner ───────────────────────────────────── */

.subscription-banner {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  z-index: 498;
  padding: 8px 20px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.subscription-banner a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.sub-trialing {
  background: rgba(255,179,71,0.15);
  border-bottom: 2px solid var(--warning);
  color: var(--warning);
}
.sub-past-due {
  background: rgba(255,85,85,0.15);
  border-bottom: 2px solid var(--urgent);
  color: var(--urgent);
}
.sub-canceled {
  background: rgba(255,140,50,0.15);
  border-bottom: 2px solid #ff8c32;
  color: #ff8c32;
}

/* ══════════════════════════════════════════════════════════════ */
/* ── About Synap — Scoped Marketing/Explainer Page ──────── */
/* ══════════════════════════════════════════════════════════════ */

.about-page {
  --ab-bg: #faf8f5;
  --ab-surface: #ffffff;
  --ab-text: #2a2a2a;
  --ab-text-soft: #6b6b6b;
  --ab-accent: #6c63ff;
  --ab-accent-soft: #ede8ff;
  --ab-warm: #ff8a65;
  --ab-warm-soft: #fff3ed;
  --ab-green: #4caf50;
  --ab-green-soft: #e8f5e9;
  --ab-red-soft: #fce4ec;
  --ab-red: #e57373;
  --ab-brain-bg: #f0edf8;
  --ab-blue: #42a5f5;
  --ab-blue-soft: #e3f2fd;
  font-family: 'DM Sans', sans-serif;
  background: var(--ab-bg);
  color: var(--ab-text);
  line-height: 1.7;
  font-size: 17px;
  overflow-x: hidden;
}

/* Hero */
.about-page .ab-hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px 30px;
  position: relative;
  background: linear-gradient(170deg, #f5f0ff 0%, #faf8f5 40%, #fff5ee 100%);
  border-radius: 16px;
  margin-bottom: 0;
}
.about-page .ab-hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(108,99,255,0.06) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(255,138,101,0.06) 0%, transparent 50%);
  animation: ab-drift 20s ease-in-out infinite;
  border-radius: 16px;
}
@keyframes ab-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-3%, 2%); }
}
.about-page .ab-hero-content { position: relative; z-index: 1; max-width: 700px; }
.about-page .ab-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 24px;
  color: var(--ab-text);
}
.about-page .ab-hero h1 span { color: var(--ab-accent); font-style: italic; }
.about-page .ab-hero-sub {
  font-size: 1.1rem;
  color: var(--ab-text-soft);
  max-width: 520px;
  margin: 0 auto 40px;
  font-weight: 300;
}
.about-page .ab-scroll-hint {
  animation: ab-bob 2s ease-in-out infinite;
  color: var(--ab-accent);
  font-size: 1.5rem;
}
@keyframes ab-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* Sections */
.about-page .ab-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 30px;
}
.about-page .ab-section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--ab-accent);
  font-weight: 600;
  margin-bottom: 16px;
}
.about-page .ab-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  line-height: 1.25;
  margin-bottom: 24px;
  color: var(--ab-text);
}
.about-page .ab-section h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--ab-text);
}
.about-page .ab-section p { color: var(--ab-text); }
.about-page .ab-section p + p { margin-top: 16px; }

/* Identity Card */
.about-page .ab-identity-card {
  background: var(--ab-surface);
  border-radius: 20px;
  padding: 36px 32px;
  margin: 36px 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.04);
  display: flex;
  gap: 28px;
  align-items: center;
}
.about-page .ab-identity-emoji { font-size: 3.5rem; flex-shrink: 0; }
.about-page .ab-identity-card h3 { font-family: 'Playfair Display', serif; font-size: 1.2rem; margin-bottom: 8px; }
.about-page .ab-identity-card p { font-size: 0.92rem; color: var(--ab-text-soft); line-height: 1.6; }
.about-page .ab-identity-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.about-page .ab-itag {
  font-size: 0.72rem; font-weight: 600; padding: 5px 12px;
  border-radius: 20px; background: var(--ab-accent-soft);
  color: var(--ab-accent); letter-spacing: 0.5px;
}

/* How Box */
.about-page .ab-how-box {
  background: linear-gradient(135deg, #f5f0ff, #e8f5e9);
  border-radius: 20px;
  padding: 36px 32px;
  margin: 36px 0;
  text-align: center;
}
.about-page .ab-how-box p { max-width: 520px; margin: 0 auto; font-size: 0.95rem; color: var(--ab-text-soft); }
.about-page .ab-big-quote {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--ab-text);
  margin-bottom: 12px;
}

/* Brain Compare */
.about-page .ab-brain-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 40px 0;
}
.about-page .ab-brain-card {
  border-radius: 20px;
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
}
.about-page .ab-brain-card.neurotypical { background: var(--ab-green-soft); border: 1px solid rgba(76,175,80,0.15); }
.about-page .ab-brain-card.adhd { background: var(--ab-red-soft); border: 1px solid rgba(229,115,115,0.15); }
.about-page .ab-brain-card .ab-emoji { font-size: 2.2rem; margin-bottom: 12px; display: block; }
.about-page .ab-brain-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.about-page .ab-brain-card p { font-size: 0.92rem; color: var(--ab-text-soft); line-height: 1.6; }
.about-page .ab-brain-tag {
  display: inline-block; font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.5px;
  padding: 4px 10px; border-radius: 20px; margin-bottom: 14px;
}
.about-page .neurotypical .ab-brain-tag { background: rgba(76,175,80,0.15); color: #2e7d32; }
.about-page .adhd .ab-brain-tag { background: rgba(229,115,115,0.2); color: #c62828; }

/* Callout */
.about-page .ab-callout {
  background: var(--ab-warm-soft);
  border-radius: 16px;
  padding: 28px;
  margin: 28px 0;
  border-left: 4px solid var(--ab-warm);
}
.about-page .ab-callout p { font-size: 0.95rem; color: var(--ab-text); }
.about-page .ab-callout strong { color: var(--ab-warm); }

/* Metaphor */
.about-page .ab-metaphor {
  background: linear-gradient(170deg, #f5f0ff, #faf8f5);
  border-radius: 28px;
  padding: 50px 40px;
  margin: 40px 0;
  text-align: center;
}
.about-page .ab-metaphor .ab-big-emoji { font-size: 3.5rem; margin-bottom: 20px; display: block; }
.about-page .ab-metaphor p { max-width: 520px; margin: 0 auto; color: var(--ab-text-soft); }

/* Machine / Flow Chart */
.about-page .ab-machine {
  max-width: 960px;
  margin: 0 auto;
  padding: 60px 20px 80px;
}
.about-page .ab-flow-columns {
  display: flex;
  align-items: stretch;
  gap: 0;
  justify-content: center;
  margin-top: 40px;
}
.about-page .ab-flow-column { flex: 1; max-width: 280px; min-width: 200px; }
.about-page .ab-flow-header {
  text-align: center; padding: 16px; border-radius: 16px 16px 0 0;
  font-weight: 600; font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 2px; color: white;
}
.about-page .ab-flow-column.inputs .ab-flow-header { background: var(--ab-blue); }
.about-page .ab-flow-column.engine .ab-flow-header { background: var(--ab-accent); }
.about-page .ab-flow-column.outputs .ab-flow-header { background: var(--ab-green); }
.about-page .ab-flow-body {
  border-radius: 0 0 16px 16px;
  padding: 16px 14px;
  min-height: 380px;
}
.about-page .ab-flow-column.inputs .ab-flow-body { background: var(--ab-blue-soft); border: 1px solid rgba(66,165,245,0.15); border-top: none; }
.about-page .ab-flow-column.engine .ab-flow-body { background: var(--ab-accent-soft); border: 1px solid rgba(108,99,255,0.12); border-top: none; }
.about-page .ab-flow-column.outputs .ab-flow-body { background: var(--ab-green-soft); border: 1px solid rgba(76,175,80,0.15); border-top: none; }
.about-page .ab-flow-item {
  background: white; border-radius: 12px; padding: 12px 14px;
  margin-bottom: 8px; box-shadow: 0 1px 6px rgba(0,0,0,0.04);
  display: flex; align-items: flex-start; gap: 10px;
  transition: transform 0.15s ease;
}
.about-page .ab-flow-item:hover { transform: translateY(-1px); }
.about-page .ab-fi-emoji { font-size: 1.15rem; flex-shrink: 0; margin-top: 1px; }
.about-page .ab-fi-text { font-size: 0.82rem; line-height: 1.45; color: var(--ab-text); }
.about-page .ab-fi-text strong { display: block; font-size: 0.8rem; margin-bottom: 2px; }
.about-page .ab-fi-text span { color: var(--ab-text-soft); font-size: 0.76rem; }
.about-page .ab-flow-arrow {
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--ab-accent); padding: 0 6px;
  flex-shrink: 0; align-self: center; opacity: 0.5;
}
.about-page .ab-engine-process {
  background: white; border-radius: 12px; padding: 12px 14px;
  margin-bottom: 8px; border-left: 3px solid var(--ab-accent);
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.about-page .ab-engine-process strong { font-size: 0.8rem; color: var(--ab-accent); display: block; margin-bottom: 2px; }
.about-page .ab-engine-process span { font-size: 0.76rem; color: var(--ab-text-soft); line-height: 1.45; }

/* Scenario Cards */
.about-page .ab-scenario {
  background: var(--ab-surface);
  border-radius: 20px;
  padding: 32px 28px;
  margin: 24px 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.04);
  position: relative;
}
.about-page .ab-scenario::before {
  content: ''; position: absolute; left: 0; top: 24px; bottom: 24px;
  width: 4px; border-radius: 4px;
}
.about-page .ab-scenario.before::before { background: var(--ab-red); }
.about-page .ab-scenario.after::before { background: var(--ab-green); }
.about-page .ab-scenario-label {
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 2px; font-weight: 600; margin-bottom: 10px;
}
.about-page .ab-scenario.before .ab-scenario-label { color: var(--ab-red); }
.about-page .ab-scenario.after .ab-scenario-label { color: var(--ab-green); }
.about-page .ab-scenario-moment {
  font-family: 'Playfair Display', serif;
  font-style: italic; font-size: 1.1rem;
  color: var(--ab-text); margin-bottom: 8px;
}
.about-page .ab-scenario-detail { font-size: 0.9rem; color: var(--ab-text-soft); }

/* Feature Grid */
.about-page .ab-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 36px 0;
}
.about-page .ab-feature-card {
  background: var(--ab-surface);
  border-radius: 16px;
  padding: 28px 24px;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 2px 12px rgba(0,0,0,0.03);
  transition: transform 0.2s ease;
}
.about-page .ab-feature-card:hover { transform: translateY(-2px); }
.about-page .ab-feature-card .ab-icon { font-size: 1.5rem; margin-bottom: 10px; display: block; }
.about-page .ab-feature-card h4 { font-family: 'Playfair Display', serif; font-size: 1.02rem; margin-bottom: 6px; color: var(--ab-text); }
.about-page .ab-feature-card p { font-size: 0.86rem; color: var(--ab-text-soft); line-height: 1.55; }

/* Promise */
.about-page .ab-promise {
  text-align: center;
  padding: 80px 30px 100px;
}
.about-page .ab-promise h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  margin-bottom: 20px;
  color: var(--ab-text);
}
.about-page .ab-promise h2 span { color: var(--ab-accent); }
.about-page .ab-promise p {
  max-width: 480px; margin: 0 auto;
  color: var(--ab-text-soft); font-size: 1.05rem; font-weight: 300;
}

.about-page .ab-subtle-note {
  text-align: center; font-size: 0.82rem;
  color: var(--ab-text-soft); padding: 20px; opacity: 0.7;
}

/* Fade-in Animations */
.about-page .ab-fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.about-page .ab-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 700px) {
  .about-page .ab-brain-compare { grid-template-columns: 1fr; }
  .about-page .ab-flow-columns { flex-direction: column; align-items: center; }
  .about-page .ab-flow-arrow { transform: rotate(90deg); margin: 8px auto; }
  .about-page .ab-feature-grid { grid-template-columns: 1fr; }
  .about-page .ab-identity-card { flex-direction: column; text-align: center; }
  .about-page .ab-identity-tags { justify-content: center; }
}
