/* Cornerstone — Christian budget & stewardship app
   Built on the 3 Strands token system. */

@import url('tokens.css');
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&display=swap');

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-page);
  color: var(--fg-2);
  font-family: var(--font-body);
  min-height: 100vh;
}

#root { min-height: 100vh; }

/* ---------- App shell ---------- */
.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: var(--bg-page);
}

/* Sidebar */
.sidebar {
  background: linear-gradient(180deg, #1F1810 0%, #2E241A 100%);
  color: var(--color-cream);
  padding: 28px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(201, 162, 39, 0.18);
  overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(201,162,39,0.2); border-radius: 3px; }

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 18px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.16);
}
.brand-lockup .crest {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-cream);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.5), 0 4px 12px rgba(0,0,0,0.3);
  flex-shrink: 0;
}
.brand-lockup .crest img { width: 30px; height: 30px; object-fit: contain; }
.brand-lockup .wordmark {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-cream);
  line-height: 1;
}
.brand-lockup .tagline {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--color-accent);
  margin-top: 4px;
}

.nav-section { display: flex; flex-direction: column; gap: 2px; }
.nav-section-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(245, 240, 225, 0.45);
  padding: 8px 12px 6px;
  font-weight: 600;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(245, 240, 225, 0.78);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 160ms ease;
  border: 1px solid transparent;
  text-align: left;
  background: transparent;
  width: 100%;
  font-family: inherit;
}
.nav-item:hover {
  background: rgba(201, 162, 39, 0.08);
  color: var(--color-cream);
}
.nav-item.active {
  background: rgba(201, 162, 39, 0.14);
  color: var(--color-cream);
  border-color: rgba(201, 162, 39, 0.35);
}
.nav-item.active::before {
  content: '';
  display: block;
  width: 3px;
  height: 16px;
  background: var(--color-accent);
  border-radius: 2px;
  margin-right: -6px;
  margin-left: -4px;
}
.nav-item .nav-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }

.household-card {
  margin-top: auto;
  padding: 14px;
  background: rgba(255, 254, 249, 0.04);
  border: 1px solid rgba(201, 162, 39, 0.18);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.household-card .hh-avatars { display: flex; }
.household-card .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #C9A227, #8B6914);
  border: 2px solid #1F1810;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 600; font-size: 13px;
  color: #1F1810;
}
.household-card .avatar:nth-child(2) { margin-left: -10px; background: linear-gradient(135deg, #7A5C4A, #3D2B22); color: var(--color-cream); }
.household-card .hh-name { font-size: 13px; font-weight: 600; color: var(--color-cream); line-height: 1.2; }
.household-card .hh-meta { font-size: 11px; color: rgba(245,240,225,0.55); margin-top: 2px; }

/* ---------- Main content ---------- */
.main {
  padding: 0;
  overflow-x: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 40px;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
}
.topbar-left { display: flex; align-items: baseline; gap: 14px; min-width: 0; flex: 1; }
.topbar-left > div { display: flex; align-items: center; gap: 14px; min-width: 0; overflow: hidden; }
.topbar .breadcrumb { white-space: nowrap; }
.topbar h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--fg-1);
  margin: 0;
}
.topbar .breadcrumb {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--color-primary);
  font-weight: 600;
}
.topbar-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

.icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--fg-2);
  transition: all 160ms ease;
}
.icon-btn:hover { background: var(--color-sand); color: var(--fg-1); }
.icon-btn.gold {
  background: linear-gradient(135deg, #D4B84A, #C9A227);
  border-color: #B08E1F;
  color: #1F1810;
}
.icon-btn.gold:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 180ms ease;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-gold {
  background: linear-gradient(180deg, #D4B84A 0%, #C9A227 100%);
  color: #1F1810;
  border: 1px solid #B08E1F;
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(201, 162, 39, 0.35); }
.btn-ghost {
  background: transparent;
  color: var(--fg-2);
  border: 1px solid var(--border-default);
}
.btn-ghost:hover { background: var(--bg-elevated); color: var(--fg-1); }
.btn-dark {
  background: var(--color-gray-900);
  color: var(--color-cream);
}
.btn-dark:hover { background: var(--color-gray-800); }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.btn-lg { padding: 14px 24px; font-size: 15px; }

/* ---------- Content area ---------- */
.page {
  padding: 28px 40px 80px;
  max-width: 1400px;
  margin: 0 auto;
}
.page-narrow { max-width: 920px; }

/* Card */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.card.ivory { background: var(--bg-elevated); }
.card.dark {
  background: linear-gradient(140deg, #1F1810 0%, #2E241A 100%);
  color: var(--color-cream);
  border-color: rgba(201, 162, 39, 0.25);
}
.card.dark h2, .card.dark h3, .card.dark h4 { color: var(--color-cream); }
.card-pad-lg { padding: 32px; }
.card-pad-xl { padding: 40px; }

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.card-header > div:first-child { min-width: 0; flex: 1; }
.card-header > div:last-child { flex-shrink: 0; }
.card-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--fg-1); margin: 0; line-height: 1.25; }
.card-subtitle { font-size: 13px; color: var(--fg-3); margin-top: 8px; line-height: 1.45; }
.card-eyebrow {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 6px;
}
.card.dark .card-eyebrow { color: var(--color-accent); }

/* ---------- Eyebrow + section heading ---------- */
.section-heading { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.section-heading .eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--color-primary);
  font-weight: 600;
}
.section-heading h2 { margin: 0; font-size: 28px; }

/* ---------- Stat block ---------- */
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
  color: var(--fg-3);
}
.stat-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--fg-1);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.stat-sub { font-size: 12px; color: var(--fg-3); }
.stat-positive { color: #2A6B3F; }
.stat-negative { color: var(--color-error); }

/* Numbers — tabular */
.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ---------- Progress bar ---------- */
.progress {
  position: relative;
  height: 8px;
  background: var(--color-sand);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  border-radius: 999px;
  transition: width 600ms var(--easing-reveal);
}
.progress.gold .progress-fill { background: linear-gradient(90deg, #C9A227, #D4B84A); }
.progress.tall { height: 12px; }

/* ---------- Pill / Badge ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
  flex-shrink: 0;
}
.pill-gold { background: rgba(201, 162, 39, 0.16); color: #8B6914; }
.pill-saddle { background: rgba(92, 64, 51, 0.1); color: var(--color-primary); }
.pill-success { background: rgba(34, 107, 63, 0.12); color: #226B3F; }
.pill-muted { background: var(--color-gray-100); color: var(--color-gray-600); }
.pill-error { background: rgba(239, 68, 68, 0.1); color: var(--color-error); }
.pill-dark { background: rgba(201, 162, 39, 0.18); color: var(--color-accent); }

/* ---------- Scripture block ---------- */
.scripture {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  color: var(--color-primary);
  line-height: 1.55;
  padding-left: 16px;
  border-left: 2px solid var(--color-accent);
}
.scripture cite {
  display: block;
  font-style: normal;
  font-family: var(--font-body);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--fg-3);
  margin-top: 8px;
  font-weight: 600;
}
.scripture-dark { color: var(--color-cream); }
.scripture-dark cite { color: rgba(245,240,225,0.6); }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 20px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-asym-2-1 { grid-template-columns: 2fr 1fr; }
.grid-asym-1-2 { grid-template-columns: 1fr 2fr; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.gap-sm { gap: 8px !important; }
.gap-md { gap: 16px !important; }
.gap-lg { gap: 24px !important; }
.gap-xl { gap: 32px !important; }

/* ---------- Divider ---------- */
.hr { border: none; border-top: 1px solid var(--border-subtle); margin: 16px 0; }
.hr-dark { border-top: 1px solid rgba(201,162,39,0.18); }

/* Laurel divider — heraldic flourish */
.laurel-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--color-accent);
  font-family: var(--font-display);
}
.laurel-divider::before, .laurel-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent) 50%, transparent);
}
.laurel-divider .ornament {
  font-size: 14px;
  letter-spacing: 0.3em;
}

/* ---------- List ---------- */
.list { display: flex; flex-direction: column; }
.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.list-item:last-child { border-bottom: none; }

/* ---------- Envelope (budget) ---------- */
.envelope {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 180ms ease;
  cursor: pointer;
}
.envelope:hover {
  background: var(--bg-surface);
  border-color: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.envelope-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.envelope-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--fg-1);
}
.envelope-amount {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--fg-1);
  font-variant-numeric: tabular-nums;
}
.envelope-meta { font-size: 12px; color: var(--fg-3); display: flex; justify-content: space-between; }
.envelope.tithe {
  background: linear-gradient(140deg, rgba(201,162,39,0.08), rgba(201,162,39,0.02));
  border-color: rgba(201,162,39,0.4);
}
.envelope.tithe .envelope-name { color: #8B6914; }

/* ---------- Path / Step indicator ---------- */
.path-steps {
  display: flex;
  align-items: stretch;
  gap: 0;
  position: relative;
}
.path-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  padding-top: 6px;
}
.path-step .ring {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--color-sand);
  border: 2px solid var(--color-sand);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--fg-3);
  position: relative;
  z-index: 2;
  transition: all 200ms ease;
}
.path-step.done .ring {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-cream);
}
.path-step.current .ring {
  background: linear-gradient(135deg, #D4B84A, #C9A227);
  border-color: #B08E1F;
  color: #1F1810;
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.2);
}
.path-step-name {
  font-size: 11px;
  text-align: center;
  color: var(--fg-3);
  font-weight: 500;
  max-width: 90px;
  line-height: 1.3;
}
.path-step.done .path-step-name, .path-step.current .path-step-name {
  color: var(--fg-1);
  font-weight: 600;
}
.path-step::after {
  content: '';
  position: absolute;
  top: 23px; /* center on ring */
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--color-sand);
  z-index: 1;
}
.path-step:last-child::after { display: none; }
.path-step.done::after { background: var(--color-primary); }

/* On dark backgrounds */
.dark .path-step .ring { background: rgba(255,254,249,0.06); border-color: rgba(255,254,249,0.15); color: rgba(245,240,225,0.5); }
.dark .path-step.done .ring { background: var(--color-cream); border-color: var(--color-cream); color: var(--color-primary-dark); }
.dark .path-step.current .ring { background: linear-gradient(135deg, #D4B84A, #C9A227); border-color: #C9A227; color: #1F1810; }
.dark .path-step-name { color: rgba(245,240,225,0.6); }
.dark .path-step.done .path-step-name, .dark .path-step.current .path-step-name { color: var(--color-cream); }
.dark .path-step::after { background: rgba(255,254,249,0.12); }
.dark .path-step.done::after { background: var(--color-cream); }

/* ---------- Crest watermark ---------- */
.crest-watermark {
  position: absolute;
  opacity: 0.05;
  pointer-events: none;
}

/* ---------- Inputs ---------- */
.input, .textarea, select.input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--fg-1);
  transition: all 160ms ease;
}
.input:focus, .textarea:focus, select.input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(92, 64, 51, 0.12);
}
.label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  margin-bottom: 6px;
}

/* ---------- Util ---------- */
.text-display { font-family: var(--font-display); }
.text-body { font-family: var(--font-body); }
.text-mono { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.text-muted { color: var(--fg-3); }
.text-strong { color: var(--fg-1); font-weight: 600; }
.text-gold { color: var(--color-accent); }
.text-saddle { color: var(--color-primary); }
.text-success { color: #2A6B3F; }
.text-error { color: var(--color-error); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11.5px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 18px; }
.text-2xl { font-size: 22px; }
.text-3xl { font-size: 28px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.uppercase { text-transform: uppercase; letter-spacing: 0.18em; font-size: 11px; font-weight: 600; }
.serif { font-family: var(--font-display); }
.pad-0 { padding: 0 !important; }
.mt-0 { margin-top: 0; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mt-xl { margin-top: 32px; }
.mb-md { margin-bottom: 16px; }
.flex-1 { flex: 1; }
.full-w { width: 100%; }
.relative { position: relative; }

/* Coach chat */
.coach-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  min-height: 600px;
}
.chat-msg {
  display: flex;
  gap: 12px;
  padding: 12px 0;
}
.chat-msg .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.chat-msg .bubble {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 14.5px;
  line-height: 1.55;
  max-width: 540px;
}
.chat-msg.user { flex-direction: row-reverse; }
.chat-msg.user .bubble { background: var(--color-primary); color: var(--color-white); border-color: transparent; }
.chat-msg.coach .bubble { background: var(--bg-elevated); }

/* Calendar grid */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
}
.cal-cell {
  background: var(--bg-surface);
  min-height: 110px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}
.cal-cell.muted { background: var(--bg-page); }
.cal-cell.today { background: rgba(201, 162, 39, 0.06); }
.cal-cell-date { font-family: var(--font-display); font-size: 14px; color: var(--fg-2); font-weight: 600; }
.cal-cell.today .cal-cell-date {
  background: var(--color-primary); color: var(--color-cream);
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px;
}
.cal-bill {
  font-size: 11px;
  padding: 3px 6px;
  background: rgba(92, 64, 51, 0.08);
  color: var(--color-primary);
  border-radius: 4px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 6px;
}
.cal-bill.paid { background: rgba(34, 107, 63, 0.1); color: #226B3F; text-decoration: line-through; opacity: 0.7; }
.cal-bill.tithe { background: rgba(201, 162, 39, 0.16); color: #8B6914; }
.cal-cell-header {
  background: var(--color-primary-dark);
  color: var(--color-cream);
  min-height: auto;
  text-align: center;
  padding: 10px 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
}

/* Medal / seal */
.seal {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E5C95C 0%, #C9A227 50%, #8B6914 100%);
  display: grid;
  place-items: center;
  color: #2E241A;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  box-shadow: 0 0 0 3px var(--color-cream), 0 0 0 4px rgba(201,162,39,0.45), 0 6px 18px rgba(92, 64, 51, 0.25);
  position: relative;
  flex-shrink: 0;
}
.seal::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px dashed rgba(46, 36, 26, 0.3);
}
.seal.locked {
  background: linear-gradient(135deg, var(--color-sand), var(--color-khaki));
  color: var(--color-gray-500);
  box-shadow: 0 0 0 3px var(--color-cream), 0 0 0 4px var(--border-subtle);
}
.seal.sm { width: 44px; height: 44px; font-size: 14px; }
.seal.lg { width: 96px; height: 96px; font-size: 32px; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(31, 24, 16, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: grid; place-items: center;
  padding: 40px;
}
.modal {
  background: var(--bg-page);
  border-radius: 20px;
  width: 100%;
  max-width: 540px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

/* AI insight band */
.ai-band {
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.08), rgba(92, 64, 51, 0.04));
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 14px;
  padding: 18px 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.ai-band .ai-mark {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #D4B84A, #C9A227);
  display: grid; place-items: center;
  flex-shrink: 0;
  color: #1F1810;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
}
.ai-band .ai-eyebrow {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-weight: 600;
  color: #8B6914;
  margin-bottom: 4px;
}
.ai-band .ai-body { font-size: 14px; color: var(--fg-2); line-height: 1.55; }

/* Confetti dots */
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fade-up 500ms var(--easing-reveal) both; }

/* Account row */
.account-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--bg-elevated);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 160ms ease;
}
.account-row:hover { background: var(--bg-surface); border-color: var(--color-primary-light); }
.account-row .acct-logo {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--color-cream);
  flex-shrink: 0;
}
.account-row .acct-name { font-weight: 600; color: var(--fg-1); font-size: 14px; }
.account-row .acct-meta { font-size: 12px; color: var(--fg-3); }

/* Tab strip */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}
.tab {
  background: transparent;
  border: none;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-3);
  cursor: pointer;
  position: relative;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab.active { color: var(--fg-1); border-bottom-color: var(--color-primary); }
.tab:hover:not(.active) { color: var(--fg-2); }

/* ============================================================
   Sidebar hide button (visible only on mobile)
   ============================================================ */
.sidebar-close { display: none; }
.sidebar-toggle { display: none !important; }

/* ============================================================
   Auth tabs hover
   ============================================================ */
.auth-tabs button:hover { opacity: 0.9; }

/* ============================================================
   Empty-state polish
   ============================================================ */
.card[style*="text-align: center"] > svg {
  margin-bottom: 4px;
}

/* ============================================================
   Subtle micro-interactions
   ============================================================ */
.account-row:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.envelope:hover {
  transform: translateY(-2px);
}
@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.2); }
  50%      { box-shadow: 0 0 0 8px rgba(201, 162, 39, 0.08); }
}
.path-step.current .ring {
  animation: pulse-gold 2.4s ease-in-out infinite;
}

/* ============================================================
   Form polish — error state, taller inputs for $ prefix
   ============================================================ */
.input, .textarea, select.input {
  min-height: 42px;
}
.input-error {
  border-color: var(--color-error) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}
.input-help-error {
  color: var(--color-error);
  font-size: 12px;
  margin-top: 6px;
}

/* Mobile-class utility — used in topbar */
.hide-mobile { display: inline-flex; }
.show-mobile { display: none !important; }

/* ============================================================
   Tablet ≤ 1024px — sidebar becomes off-canvas drawer
   ============================================================ */
@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-close { display: grid; place-items: center; }
  .sidebar-toggle { display: grid !important; place-items: center; }
  .topbar {
    padding: 14px 20px;
  }
  .page {
    padding: 20px 24px 60px;
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-asym-2-1, .grid-asym-1-2 {
    grid-template-columns: 1fr;
  }
  .coach-shell {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Mobile ≤ 768px — single column, compact spacing
   ============================================================ */
@media (max-width: 768px) {
  .topbar {
    padding: 12px 16px;
    gap: 12px;
  }
  .topbar-left .breadcrumb.hide-mobile {
    display: none;
  }
  .topbar-left > div > span.hide-mobile {
    display: none;
  }
  .topbar-right .hide-mobile { display: none !important; }
  .topbar-right .btn span.hide-mobile { display: none; }
  .icon-btn.hide-mobile { display: none !important; }
  .page {
    padding: 16px 16px 48px;
  }
  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 18px;
  }
  .card-pad-lg { padding: 22px; }
  .card-pad-xl { padding: 26px; }

  /* Calendar shrinks gracefully */
  .cal-cell { min-height: 80px; padding: 6px; }
  .cal-cell-date { font-size: 12px; }
  .cal-bill { font-size: 10px; padding: 2px 4px; }
  .cal-cell-header { font-size: 10px; padding: 8px 4px; }

  /* Path steps shrink */
  .path-step .ring { width: 30px; height: 30px; font-size: 12px; }
  .path-step-name { font-size: 10px; max-width: 70px; }
  .path-step::after { top: 20px; }

  /* Headings */
  h2 { font-size: 26px !important; }
  h3 { font-size: 18px; }

  /* Modal */
  .modal-backdrop { padding: 16px; }

  /* Hero summary stats in dark cards */
  .card.dark .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .stat-value { font-size: 24px; }
}

/* ============================================================
   Small mobile ≤ 480px
   ============================================================ */
@media (max-width: 480px) {
  .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .card.dark .grid-4 { grid-template-columns: 1fr; }
  .stat-value { font-size: 22px; }
  .modal { max-width: 100%; }
  .modal-backdrop { padding: 8px; }
  .topbar { padding: 10px 12px; }
  .page { padding: 12px 12px 40px; }
  .card { padding: 14px; border-radius: 12px; }
  .card-pad-lg { padding: 18px; }
  .card-pad-xl { padding: 20px; }
  .seal { width: 56px; height: 56px; font-size: 18px; }
  .seal.lg { width: 80px; height: 80px; font-size: 28px; }
  .scripture { font-size: 15px; padding-left: 12px; }
  h1 { font-size: 30px !important; }
  h2 { font-size: 22px !important; }
  /* Calendar gets a single-column list feel on tiny screens */
  .cal-grid { font-size: 11px; }
  .cal-cell { min-height: 64px; }
  .cal-cell-header { padding: 6px 2px; font-size: 9px; }
}

/* ============================================================
   Touch tweaks — bigger tap targets
   ============================================================ */
@media (hover: none) and (pointer: coarse) {
  .btn-sm { padding: 10px 14px; }
  .nav-item { padding: 12px 14px; }
  .icon-btn { width: 42px; height: 42px; }
}
