@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --bg-deep: #080a10;
  --bg-base: #0d1017;
  --bg-card: #141820;
  --bg-card-hover: #1a1f2b;
  --bg-elevated: #1e2430;
  --border: rgba(255,255,255,0.06);
  --border-active: rgba(255,255,255,0.12);
  --text-primary: #e8ecf4;
  --text-secondary: #8892a4;
  --text-muted: #4d566a;
  --text-accent: #c4b5fd;
  --phase1: #60a5fa;
  --phase1-dim: rgba(96,165,250,0.12);
  --phase2: #34d399;
  --phase2-dim: rgba(52,211,153,0.12);
  --phase3: #fbbf24;
  --phase3-dim: rgba(251,191,36,0.12);
  --phase4: #f472b6;
  --phase4-dim: rgba(244,114,182,0.12);
  --phase5: #a78bfa;
  --phase5-dim: rgba(167,139,250,0.12);
  --gradient-hero: linear-gradient(135deg, #1a1040 0%, #0d1017 40%, #0a1628 100%);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --sidebar-w: 240px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Noise texture overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-base);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s var(--ease);
}

.sidebar-brand {
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand h1 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-primary), var(--text-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.3;
}

.sidebar-brand .subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s var(--ease);
  border: 1px solid transparent;
  user-select: none;
  text-decoration: none;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

.nav-item.active {
  color: var(--text-primary);
  background: rgba(167,139,250,0.08);
  border-color: rgba(167,139,250,0.15);
}

.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.6; }
.nav-item.active svg { opacity: 1; }

.sidebar-footer {
  position: relative;
  padding: 12px;
  border-top: 1px solid var(--border);
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-primary);
  font-family: var(--font-body);
  text-align: left;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}

.profile-trigger:hover {
  background: var(--bg-card-hover);
  border-color: var(--border);
}

.profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--phase5-dim);
  color: var(--phase5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  text-transform: uppercase;
}

.profile-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.profile-info .person {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-info .role {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-chevron {
  flex-shrink: 0;
  opacity: 0.4;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.profile-trigger:hover .profile-chevron { opacity: 0.7; }

.sidebar-footer.menu-open .profile-chevron {
  transform: rotate(180deg);
  opacity: 0.7;
}

/* ── Profile popup menu ── */
.profile-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 4px);
  left: 12px;
  right: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-active);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 100;
}

.sidebar-footer.menu-open .profile-menu {
  display: block;
  animation: profileMenuIn 0.15s var(--ease);
}

@keyframes profileMenuIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}

.profile-menu-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.profile-menu-item svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.profile-menu-item:hover svg { opacity: 1; }

.profile-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 8px;
}

.profile-menu-danger {
  color: #f87171;
}

.profile-menu-danger:hover {
  background: rgba(248,113,113,0.08);
  color: #fca5a5;
}

.profile-menu-danger svg { color: inherit; }

/* ── Main content ── */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Dashboard Page ── */
.dashboard-hero {
  background: var(--gradient-hero);
  padding: 48px 48px 40px;
  position: relative;
  overflow: hidden;
}

.dashboard-hero::after {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(167,139,250,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-accent);
  font-weight: 600;
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.6;
}

.hero-meta {
  display: flex;
  gap: 32px;
  margin-top: 24px;
  font-size: 0.78rem;
}

.hero-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-meta-item .label {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.6rem;
  font-weight: 600;
}

.hero-meta-item .value {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  margin: 0 48px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  top: -20px;
}

.stat-card {
  background: var(--bg-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-card .stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-card .stat-value {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.stat-card .stat-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ── Progress bar ── */
.progress-section {
  padding: 20px 48px 40px;
}

.progress-track {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--phase1), var(--phase2), var(--phase3), var(--phase4), var(--phase5));
  transition: width 0.8s var(--ease);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Phase timeline on dashboard ── */
.phases-overview {
  padding: 0 48px 48px;
}

.phases-overview h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 20px;
}

.phase-row {
  display: flex;
  gap: 12px;
}

.phase-card-mini {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.phase-card-mini:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
}

.phase-card-mini::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.phase-card-mini[data-phase="1"]::before { background: var(--phase1); }
.phase-card-mini[data-phase="2"]::before { background: var(--phase2); }
.phase-card-mini[data-phase="3"]::before { background: var(--phase3); }
.phase-card-mini[data-phase="4"]::before { background: var(--phase4); }
.phase-card-mini[data-phase="5"]::before { background: var(--phase5); }

.phase-card-mini .phase-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.phase-card-mini .phase-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.phase-card-mini .phase-motto {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.phase-card-mini .phase-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.phase-card-mini .mini-bar {
  flex: 1;
  height: 3px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}

.phase-card-mini .mini-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s var(--ease);
}

.phase-card-mini[data-phase="1"] .mini-fill { background: var(--phase1); }
.phase-card-mini[data-phase="2"] .mini-fill { background: var(--phase2); }
.phase-card-mini[data-phase="3"] .mini-fill { background: var(--phase3); }
.phase-card-mini[data-phase="4"] .mini-fill { background: var(--phase4); }
.phase-card-mini[data-phase="5"] .mini-fill { background: var(--phase5); }

/* ── Journey Map Page ── */
.journey-header {
  padding: 40px 48px 0;
}

.journey-header h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.journey-header p {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.phase-tabs {
  display: flex;
  gap: 4px;
  padding: 24px 48px 0;
}

.phase-tab {
  padding: 10px 20px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  transition: all 0.2s var(--ease);
  user-select: none;
  text-decoration: none;
}

.phase-tab:hover { color: var(--text-secondary); }

.phase-tab.active {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border);
}

.phase-tab[data-phase="1"].active { color: var(--phase1); }
.phase-tab[data-phase="2"].active { color: var(--phase2); }
.phase-tab[data-phase="3"].active { color: var(--phase3); }
.phase-tab[data-phase="4"].active { color: var(--phase4); }
.phase-tab[data-phase="5"].active { color: var(--phase5); }

.weeks-container {
  margin: 0 48px 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0 12px 12px 12px;
  overflow: hidden;
}

.phase-info {
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--border);
}

.phase-info .pi-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 6px;
}

.phase-info .pi-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.phase-info .pi-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 600px;
}

.week-card {
  border-bottom: 1px solid var(--border);
  transition: background 0.2s var(--ease);
}

.week-card:last-child { border-bottom: none; }

.week-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 28px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s var(--ease);
}

.week-header:hover { background: rgba(255,255,255,0.02); }

.week-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  flex-shrink: 0;
  transition: all 0.2s var(--ease);
}

.week-status-dot.in-progress {
  border-color: var(--phase3);
  background: var(--phase3-dim);
  box-shadow: 0 0 8px rgba(251,191,36,0.3);
}

.week-status-dot.complete {
  border-color: var(--phase2);
  background: var(--phase2);
}

.week-title-group { flex: 1; }

.week-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.week-title {
  font-weight: 600;
  font-size: 0.92rem;
  margin-top: 2px;
}

.week-theme {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.8rem;
  color: var(--text-secondary);
  flex-shrink: 0;
  max-width: 280px;
  text-align: right;
}

.week-chevron {
  color: var(--text-muted);
  transition: transform 0.2s var(--ease);
  flex-shrink: 0;
}

.week-card.expanded .week-chevron { transform: rotate(180deg); }

.week-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease);
}

.week-card.expanded .week-body { max-height: 600px; }

.week-body-inner {
  padding: 0 28px 24px;
  padding-left: 54px;
}

.mindset-shift {
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.7;
}

.mindset-shift .old { color: var(--phase4); }
.mindset-shift .new { color: var(--phase2); }
.mindset-shift .arrow { color: var(--text-muted); margin: 4px 0; display: block; }

.deliverables-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 10px;
}

.deliverable-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.deliverable-item input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--text-muted);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  transition: all 0.15s var(--ease);
  position: relative;
}

.deliverable-item input[type="checkbox"]:checked {
  background: var(--phase2);
  border-color: var(--phase2);
}

.deliverable-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: solid var(--bg-deep);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.deliverable-item.checked span { text-decoration: line-through; color: var(--text-muted); }

.week-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.week-btn {
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-active);
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.15s var(--ease);
  font-family: var(--font-body);
}

.week-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.week-btn.primary { background: rgba(167,139,250,0.15); border-color: rgba(167,139,250,0.3); color: var(--text-accent); }
.week-btn.primary:hover { background: rgba(167,139,250,0.25); }
.week-btn.complete-btn { background: rgba(52,211,153,0.12); border-color: rgba(52,211,153,0.25); color: var(--phase2); }

/* ── Templates Page ── */
.templates-header {
  padding: 40px 48px 24px;
}

.templates-header h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.templates-header p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 20px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  max-width: 400px;
}

.search-bar svg { color: var(--text-muted); width: 16px; height: 16px; flex-shrink: 0; }

.search-bar input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  width: 100%;
}

.search-bar input::placeholder { color: var(--text-muted); }

.template-categories {
  padding: 0 48px 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.template-cat-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.template-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  transition: all 0.2s var(--ease);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.template-card:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
}

.template-card .tc-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.template-card .tc-name {
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 4px;
}

.template-card .tc-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.template-card .tc-phase {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 10px;
  color: var(--text-muted);
}

/* ── Template Detail Page ── */
.template-detail {
  padding: 40px 48px 48px;
  max-width: 900px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 24px;
  transition: color 0.15s var(--ease);
}

.back-link:hover { color: var(--text-primary); }

.template-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.td-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.td-meta { flex: 1; }

.td-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.td-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.td-category, .td-phase {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.td-category {
  background: rgba(167,139,250,0.12);
  color: var(--text-accent);
}

.td-phase {
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.td-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.no-content {
  color: var(--text-muted);
  font-style: italic;
  padding: 40px 0;
}

/* ── Prose (rendered markdown) ── */
.prose {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.prose h1, .prose h2, .prose h3, .prose h4 {
  color: var(--text-primary);
  font-family: var(--font-display);
  margin-top: 2em;
  margin-bottom: 0.75em;
  line-height: 1.3;
}

.prose h1 { font-size: 1.5rem; }
.prose h2 { font-size: 1.25rem; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.prose h3 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 600; }
.prose h4 { font-size: 0.92rem; font-family: var(--font-body); font-weight: 600; color: var(--text-secondary); }

.prose p { margin-bottom: 1em; }

.prose strong { color: var(--text-primary); font-weight: 600; }

.prose a {
  color: var(--text-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose ul, .prose ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
}

.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--text-muted); }

.prose blockquote {
  border-left: 3px solid var(--text-accent);
  padding: 8px 16px;
  margin: 1em 0;
  background: rgba(167,139,250,0.05);
  border-radius: 0 6px 6px 0;
  color: var(--text-primary);
  font-style: italic;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-accent);
}

.prose pre {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  overflow-x: auto;
  margin: 1em 0;
  font-size: 0.8rem;
  line-height: 1.6;
}

.prose pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: var(--text-primary);
  font-size: inherit;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.82rem;
}

.prose th, .prose td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}

.prose th {
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prose td { color: var(--text-secondary); }

.prose tr:hover td { background: rgba(255,255,255,0.02); }

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

/* ── Muscles Page ── */
.muscles-header {
  padding: 40px 48px 0;
}

.muscles-header h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.muscles-header p {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.muscles-content {
  padding: 32px 48px 48px;
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 40px;
  align-items: start;
}

.radar-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-svg { width: 340px; height: 340px; }

.radar-grid-line { stroke: var(--border-active); fill: none; stroke-width: 0.5; }
.radar-axis { stroke: rgba(255,255,255,0.06); stroke-width: 0.5; }
.radar-shape {
  fill: rgba(167,139,250,0.12);
  stroke: var(--phase5);
  stroke-width: 2;
  transition: all 0.4s var(--ease);
}

.radar-point {
  fill: var(--phase5);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  r: 5;
}

.radar-point:hover { r: 8; fill: #c4b5fd; }

.radar-label {
  fill: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-anchor: middle;
}

.muscle-sliders {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.muscle-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}

.muscle-item .mi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.muscle-item .mi-name {
  font-weight: 600;
  font-size: 0.88rem;
}

.muscle-item .mi-score {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--phase5);
}

.muscle-item .mi-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.muscle-slider {
  width: 100%;
  appearance: none;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.muscle-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--phase5);
  border: 3px solid var(--bg-card);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(167,139,250,0.3);
}

.muscle-slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--phase5); border: 3px solid var(--bg-card);
  cursor: pointer;
}

/* ── Profile Page ── */
.profile-page {
  padding: 40px;
  max-width: 640px;
  animation: fadeIn 0.3s var(--ease);
}

.profile-page-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}

.profile-page-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--phase5-dim);
  color: var(--phase5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

.profile-page-identity h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.profile-page-email {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.profile-page-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--phase5-dim);
  color: var(--phase5);
}

.profile-page-section {
  margin-bottom: 28px;
}

.profile-page-section h3 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.profile-page-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-page-field {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
}

.profile-page-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.profile-page-value {
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* ── Settings Page ── */
.settings-page {
  padding: 40px;
  max-width: 640px;
  animation: fadeIn 0.3s var(--ease);
}

.settings-page h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 28px;
}

.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

.settings-section h3 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.settings-section--disabled {
  opacity: 0.4;
}

.settings-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.settings-field:last-child { border-bottom: none; }

.settings-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.settings-value {
  font-size: 0.8rem;
  color: var(--text-primary);
}

.settings-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.settings-signout-btn {
  padding: 8px 20px;
  border-radius: 6px;
  border: 1px solid rgba(248,113,113,0.3);
  background: rgba(248,113,113,0.08);
  color: #f87171;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}

.settings-signout-btn:hover {
  background: rgba(248,113,113,0.15);
  border-color: rgba(248,113,113,0.5);
}

/* ── Resources Page ── */
.resources-content {
  padding: 40px 48px 48px;
}

.resources-content h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 24px;
}

.resource-section {
  margin-bottom: 32px;
}

.resource-section h3 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 12px;
}

.resource-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.resource-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.resource-item .ri-name { font-weight: 500; }
.resource-item .ri-file { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); }

.resource-item--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.resource-item--link:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
}

.ri-action {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-accent);
}

.resource-item--link:hover .ri-action { color: #d4c5ff; }

/* ── Admin Panel ── */
.admin-page {
  padding: 40px 48px 48px;
}

.admin-header {
  margin-bottom: 32px;
}

.admin-header h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.admin-header p {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.admin-back-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: color 0.15s var(--ease);
}

.admin-back-link:hover { color: var(--text-primary); }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
}

.admin-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.admin-stat-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.admin-stat-sub {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}

.admin-quick-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.admin-quick-link {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s var(--ease);
}

.admin-quick-link:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
}

.admin-quick-link svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--text-accent);
  margin-top: 2px;
}

.aql-title {
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.aql-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Admin tables */
.admin-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table th {
  text-align: left;
  padding: 14px 18px;
  background: var(--bg-elevated);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

.td-id {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  width: 50px;
}

.td-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.td-mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.td-actions {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.td-empty {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 40px 18px !important;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge-admin {
  background: rgba(167,139,250,0.15);
  color: var(--text-accent);
  border: 1px solid rgba(167,139,250,0.25);
}

.badge-user {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge-category {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.badge-has-content {
  background: rgba(52,211,153,0.12);
  color: var(--phase2);
  border: 1px solid rgba(52,211,153,0.25);
}

.badge-no-content {
  background: rgba(251,191,36,0.12);
  color: var(--phase3);
  border: 1px solid rgba(251,191,36,0.25);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-active);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  text-decoration: none;
  transition: all 0.15s var(--ease);
}

.btn:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }

.btn-sm { padding: 5px 12px; font-size: 0.72rem; }

.btn-primary {
  background: rgba(167,139,250,0.15);
  border-color: rgba(167,139,250,0.3);
  color: var(--text-accent);
}

.btn-primary:hover { background: rgba(167,139,250,0.25); }

.btn-secondary {
  background: transparent;
  border-color: var(--border-active);
  color: var(--text-secondary);
}

.btn-promote {
  background: rgba(52,211,153,0.1);
  border-color: rgba(52,211,153,0.25);
  color: var(--phase2);
}

.btn-promote:hover { background: rgba(52,211,153,0.2); }

.btn-demote {
  background: rgba(251,191,36,0.1);
  border-color: rgba(251,191,36,0.25);
  color: var(--phase3);
}

.btn-demote:hover { background: rgba(251,191,36,0.2); }

.btn-danger {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.25);
  color: #f87171;
}

.btn-danger:hover { background: rgba(239,68,68,0.2); }

.btn-edit {
  background: rgba(96,165,250,0.1);
  border-color: rgba(96,165,250,0.25);
  color: var(--phase1);
}

.btn-edit:hover { background: rgba(96,165,250,0.2); }

/* Admin edit form */
.admin-edit-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
}

.admin-edit-field {
  margin-bottom: 20px;
}

.admin-edit-field label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 10px;
}

.admin-textarea {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s var(--ease);
}

.admin-textarea:focus { border-color: rgba(167,139,250,0.4); }

.admin-edit-actions {
  display: flex;
  gap: 12px;
}

/* Sidebar admin nav */
.nav-separator {
  height: 1px;
  background: var(--border);
  margin: 8px 12px;
}

.nav-admin.active {
  background: rgba(167,139,250,0.12);
  border-color: rgba(167,139,250,0.2);
}

/* ── Deliverable Detail Page ── */
.deliverable-detail {
  padding: 40px 48px 48px;
  max-width: 900px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}

.breadcrumb a:hover { color: var(--text-primary); }

.bc-sep { color: var(--text-muted); }

.dd-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.dd-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}

.dd-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.dd-completion {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 4px;
}

.dd-checkbox {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--text-muted);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s var(--ease);
  position: relative;
}

.dd-checkbox:checked {
  background: var(--phase2);
  border-color: var(--phase2);
}

.dd-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 5px; top: 1px;
  width: 6px; height: 11px;
  border: solid var(--bg-deep);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.dd-completion-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.dd-meta {
  display: flex;
  gap: 12px;
  font-size: 0.72rem;
}

.dd-meta-phase {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.dd-meta-week {
  color: var(--text-muted);
  font-weight: 500;
}

.dd-meta-prompts {
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.dd-section-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 12px;
}

.dd-guidance {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 24px;
}

.dd-guidance .prose { margin-top: 0; }
.dd-guidance .prose h1:first-child,
.dd-guidance .prose h2:first-child,
.dd-guidance .prose h3:first-child,
.dd-guidance .prose p:first-child { margin-top: 0; }

.dd-template-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 24px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s var(--ease);
}

.dd-template-card:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
}

.dd-tc-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.dd-tc-info { flex: 1; }

.dd-tc-name {
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 2px;
}

.dd-tc-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.dd-tc-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.15s var(--ease);
}

.dd-template-card:hover .dd-tc-arrow { transform: translateX(2px); }

.dd-workbook {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 24px;
}

.dd-prompt {
  margin-bottom: 24px;
}

.dd-prompt:last-child { margin-bottom: 0; }

.dd-prompt-label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.dd-prompt-help {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.dd-prompt-field {
  position: relative;
}

.dd-input, .dd-textarea {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.6;
  outline: none;
  transition: border-color 0.15s var(--ease);
}

.dd-textarea {
  resize: vertical;
  min-height: 100px;
}

.dd-input:focus, .dd-textarea:focus {
  border-color: rgba(167,139,250,0.4);
}

.dd-input::placeholder, .dd-textarea::placeholder {
  color: var(--text-muted);
}

.dd-save-indicator {
  min-height: 20px;
  margin-top: 4px;
}

.dd-save-status {
  font-size: 0.72rem;
  color: var(--phase2);
  font-weight: 500;
  animation: fadeInOut 2s ease-in-out forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; }
  10% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

.dd-saving-text { display: none; font-size: 0.72rem; color: var(--text-muted); }
.dd-save-indicator.htmx-request .dd-saving-text { display: inline; animation: pulse 1s ease-in-out infinite; }
.dd-save-indicator.htmx-request .dd-save-status { display: none; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.dd-save-status::after { content: ' \2713'; }

/* ── Continue Where You Left Off Card ── */
.continue-card {
  margin: 0 48px 24px;
}

.continue-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.continue-link:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
}

.continue-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--phase5-dim);
  color: var(--phase5);
  border-radius: 10px;
  font-size: 1rem;
  flex-shrink: 0;
}

.continue-info {
  flex: 1;
  min-width: 0;
}

.continue-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.continue-title {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.continue-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.continue-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.15s var(--ease);
}

.continue-link:hover .continue-arrow {
  transform: translateX(3px);
}

.dd-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: color 0.15s var(--ease);
}

.dd-back:hover { color: var(--text-primary); }

/* ── AI Coaching Section ── */
.dd-coaching {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 24px;
}

.dd-coaching-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.dd-coaching-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  background: linear-gradient(135deg, rgba(167,139,250,0.25), rgba(96,165,250,0.2));
  color: var(--text-accent);
  border: 1px solid rgba(167,139,250,0.3);
  transition: all 0.2s var(--ease);
}

.dd-coaching-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(167,139,250,0.35), rgba(96,165,250,0.3));
  transform: translateY(-1px);
}

.dd-coaching-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.dd-coaching-spinner {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.dd-coaching-spinner.htmx-request {
  display: flex;
}

.dd-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-active);
  border-top-color: var(--text-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.dd-coaching-result {
  margin-bottom: 16px;
}

.dd-coaching-overall {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.dd-coaching-overall p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.dd-coaching-prompt-fb {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.dd-coaching-prompt-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.dd-coaching-fb-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.dd-coaching-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.7rem;
  margin-top: 1px;
}

.dd-coaching-icon--strength {
  background: rgba(52,211,153,0.15);
  color: var(--phase2);
}

.dd-coaching-icon--suggestion {
  background: rgba(251,191,36,0.15);
  color: var(--phase3);
}

.dd-coaching-example {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 10px 12px;
  background: rgba(167,139,250,0.06);
  border-radius: 6px;
  border-left: 3px solid rgba(167,139,250,0.3);
  margin-top: 8px;
}

.dd-coaching-next {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.dd-coaching-next p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.dd-coaching-error {
  padding: 12px 16px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 8px;
  color: #f87171;
  font-size: 0.82rem;
  margin-bottom: 12px;
}

/* Deliverable links on journey page */
.deliverable-link {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.15s var(--ease);
}

.deliverable-link:hover {
  color: var(--text-accent);
  border-bottom-color: var(--text-accent);
}

.deliverable-item.checked .deliverable-link {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); margin: 0 24px; }
  .dashboard-hero, .journey-header, .phase-tabs, .templates-header, .muscles-header, .resources-content, .admin-page, .deliverable-detail { padding-left: 24px; padding-right: 24px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-quick-links { grid-template-columns: 1fr; }
  .continue-card { margin-left: 24px; margin-right: 24px; }
  .weeks-container, .template-categories, .phases-overview, .progress-section { margin-left: 24px; margin-right: 24px; padding-left: 24px; padding-right: 24px; }
  .muscles-content { grid-template-columns: 1fr; padding: 32px 24px; }
  .template-detail { padding: 24px; }
  .mobile-toggle { display: flex !important; }
}

.mobile-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 200;
  width: 36px;
  height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
}

/* ── Journey Catalog ── */
.catalog-header {
  padding: 40px 48px 0;
}

.catalog-header h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.catalog-header p {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.catalog-section {
  padding: 24px 48px;
}

.catalog-section-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 16px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.catalog-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.2s var(--ease);
}

.catalog-tile--enrolled {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  position: relative;
}

.catalog-tile--enrolled:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
}

.ct-icon {
  font-size: 2rem;
  line-height: 1;
}

.ct-info {
  flex: 1;
}

.ct-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.ct-tagline {
  font-size: 0.82rem;
  color: var(--text-accent);
  font-weight: 500;
  margin-bottom: 4px;
}

.ct-duration {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.ct-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.5;
}

.ct-progress {
  margin-top: auto;
}

.ct-progress-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.ct-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--phase1), var(--phase5));
  border-radius: 3px;
  transition: width 0.3s var(--ease);
}

.ct-progress-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.ct-arrow {
  position: absolute;
  top: 24px;
  right: 24px;
  color: var(--text-muted);
  transition: transform 0.15s var(--ease);
}

.catalog-tile--enrolled:hover .ct-arrow {
  transform: translateX(3px);
}

.ct-enroll-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  background: linear-gradient(135deg, rgba(167,139,250,0.25), rgba(96,165,250,0.2));
  color: var(--text-accent);
  border: 1px solid rgba(167,139,250,0.3);
  transition: all 0.2s var(--ease);
  align-self: flex-start;
}

.ct-enroll-btn:hover {
  background: linear-gradient(135deg, rgba(167,139,250,0.35), rgba(96,165,250,0.3));
  transform: translateY(-1px);
}

.catalog-empty {
  padding: 48px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

@media (max-width: 1024px) {
  .catalog-header, .catalog-section { padding-left: 24px; padding-right: 24px; }
  .catalog-grid { grid-template-columns: 1fr; }
}

/* ── Admin Journey Status Badges ── */
.badge-active {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.badge-draft {
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.3);
}

.badge-archived {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* ── Admin Form Styles ── */
.admin-form-container {
  max-width: 720px;
  padding: 0 32px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.admin-form-full {
  grid-column: 1 / -1;
}

.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.admin-input, .admin-select, .admin-textarea {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: border-color 0.15s ease;
}

.admin-input:focus, .admin-select:focus, .admin-textarea:focus {
  outline: none;
  border-color: var(--text-accent);
}

.admin-textarea {
  resize: vertical;
  min-height: 80px;
}

.admin-form-actions {
  display: flex;
  gap: 12px;
  padding-top: 12px;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(167,139,250,0.25), rgba(96,165,250,0.2));
  color: var(--text-accent);
  border: 1px solid rgba(167,139,250,0.3);
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  transition: all 0.15s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, rgba(167,139,250,0.35), rgba(96,165,250,0.3));
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.btn-status {
  background: rgba(96,165,250,0.1);
  color: #60a5fa;
  border-color: rgba(96,165,250,0.3);
}

.admin-header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.admin-journey-name {
  font-weight: 600;
  font-size: 0.88rem;
}

.admin-journey-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.td-icon { font-size: 1.4rem; }
.td-slug code {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}
.td-count {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* ── Journey Builder Styles ── */
.builder-tree {
  padding: 0 32px;
}

.builder-level {
  margin-left: 24px;
  border-left: 2px solid var(--border);
  padding-left: 16px;
}

.builder-phase {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}

.builder-phase-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.builder-phase-header:hover {
  background: var(--bg-elevated);
}

.builder-phase-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}

.builder-phase-body {
  padding: 0 20px 16px;
}

.builder-week {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 14px 16px;
}

.builder-week-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.builder-week-title {
  font-weight: 600;
  font-size: 0.88rem;
}

.builder-deliverable {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}

.builder-deliverable:last-child {
  border-bottom: none;
}

.builder-prompt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px 6px 24px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.builder-muscle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.builder-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.builder-inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px;
  background: var(--bg-deep);
  border-radius: 6px;
  margin-top: 8px;
}

.builder-inline-form input,
.builder-inline-form textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.82rem;
  color: var(--text-primary);
  font-family: var(--font-body);
}

.builder-section-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 24px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ── Analytics Styles ── */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 0 32px;
  margin-bottom: 32px;
}

.analytics-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}

.analytics-card-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.analytics-card-value {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.analytics-card-value .unit {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 400;
}

.analytics-bar {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}

.analytics-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--phase1), var(--phase3));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.analytics-table {
  width: 100%;
  margin: 0 32px;
  max-width: calc(100% - 64px);
}

/* ---------- Journal ---------- */
.journal-page { padding: 32px; max-width: 800px; }
.journal-breadcrumb { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 16px; }
.journal-breadcrumb a { color: var(--text-accent); text-decoration: none; }
.journal-breadcrumb-sep { margin: 0 6px; }
.journal-page h2 { font-family: var(--font-display); margin-bottom: 4px; }
.journal-subtitle { color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 24px; }
.journal-textarea {
  width: 100%;
  min-height: 320px;
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}
.journal-textarea:focus { border-color: var(--text-accent); }
.journal-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.journal-save-indicator { font-size: 0.78rem; color: var(--text-muted); }
.journal-save-indicator.saved { color: var(--phase2); }
.journal-back-link { font-size: 0.82rem; color: var(--text-accent); text-decoration: none; }
.journal-link-row { margin-top: 12px; }
.journal-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-accent);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.journal-link:hover { opacity: 1; }

/* ---------- Profile Edit ---------- */
.profile-edit-form { max-width: 480px; }
.profile-form-field { margin-bottom: 16px; }
.profile-form-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.profile-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.profile-input:focus { border-color: var(--text-accent); }
.profile-save-btn {
  padding: 10px 24px;
  background: rgba(167,139,250,0.2);
  border: 1px solid rgba(167,139,250,0.3);
  border-radius: 8px;
  color: var(--text-accent);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}
.profile-save-btn:hover { background: rgba(167,139,250,0.3); }
.profile-success {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.2);
  border-radius: 8px;
  color: var(--phase2);
  font-size: 0.82rem;
}
.profile-error {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(244,114,182,0.1);
  border: 1px solid rgba(244,114,182,0.2);
  border-radius: 8px;
  color: var(--phase4);
  font-size: 0.82rem;
}

/* ---------- Settings Forms ---------- */
.settings-form { max-width: 480px; }
.settings-form-field { margin-bottom: 16px; }
.settings-form-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.settings-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.settings-input:focus { border-color: var(--text-accent); }
.settings-save-btn {
  padding: 10px 24px;
  background: rgba(167,139,250,0.2);
  border: 1px solid rgba(167,139,250,0.3);
  border-radius: 8px;
  color: var(--text-accent);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}
.settings-save-btn:hover { background: rgba(167,139,250,0.3); }
.settings-danger-zone {
  border-color: rgba(244,114,182,0.3);
}
.settings-danger-zone h3 { color: var(--phase4); }
.settings-delete-btn {
  padding: 10px 24px;
  background: rgba(244,114,182,0.15);
  border: 1px solid rgba(244,114,182,0.3);
  border-radius: 8px;
  color: var(--phase4);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}
.settings-delete-btn:hover { background: rgba(244,114,182,0.25); }

/* ---------- Progress Report ---------- */
.report-page { padding: 32px; max-width: 900px; }
.report-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.report-header h2 { font-family: var(--font-display); margin-bottom: 4px; }
.report-header p { color: var(--text-secondary); font-size: 0.88rem; }
.report-date { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }
.report-print-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(167,139,250,0.2);
  border: 1px solid rgba(167,139,250,0.3);
  border-radius: 8px;
  color: var(--text-accent);
  font-family: var(--font-body);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}
.report-print-btn:hover { background: rgba(167,139,250,0.3); }
.report-stats { display: flex; gap: 16px; margin-bottom: 32px; }
.report-stat {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.report-stat-value { font-family: var(--font-display); font-size: 1.6rem; }
.report-stat-value .unit { font-size: 0.8rem; color: var(--text-muted); }
.report-stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }
.report-section { margin-bottom: 32px; }
.report-section h3 { font-family: var(--font-display); margin-bottom: 12px; }
.report-muscles { display: flex; flex-wrap: wrap; gap: 8px; }
.report-muscle {
  display: flex;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  min-width: 200px;
  flex: 1;
}
.report-muscle-name { font-size: 0.85rem; }
.report-muscle-score { font-weight: 600; color: var(--text-accent); }
.report-phase { margin-bottom: 28px; }
.report-phase h3 { font-family: var(--font-display); margin-bottom: 12px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.report-phase-pct { color: var(--text-muted); font-size: 0.85rem; }
.report-week { margin-bottom: 16px; margin-left: 12px; }
.report-week h4 { font-size: 0.9rem; margin-bottom: 8px; color: var(--text-secondary); }
.report-deliverable { margin-bottom: 12px; margin-left: 12px; }
.report-deliverable-title { font-size: 0.85rem; margin-bottom: 4px; }
.report-check { color: var(--phase2); margin-right: 4px; }
.report-uncheck { color: var(--text-muted); margin-right: 4px; }
.report-response { margin-left: 20px; margin-bottom: 8px; }
.report-response-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.report-response-text { font-size: 0.85rem; color: var(--text-secondary); white-space: pre-wrap; }
.report-journal { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 14px; margin-bottom: 12px; }
.report-journal-meta { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; }
.report-journal-text { font-size: 0.85rem; white-space: pre-wrap; }
.admin-export-btn {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(52,211,153,0.15);
  border: 1px solid rgba(52,211,153,0.3);
  border-radius: 8px;
  color: var(--phase2);
  font-size: 0.82rem;
  text-decoration: none;
  margin-right: 12px;
  transition: all 0.2s;
}
.admin-export-btn:hover { background: rgba(52,211,153,0.25); }

/* ── Template Export Bar ── */
.template-export-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.te-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 4px;
}
.te-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(167,139,250,0.1);
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: 8px;
  color: var(--text-accent);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s var(--ease);
  cursor: pointer;
}
.te-btn:hover {
  background: rgba(167,139,250,0.2);
  border-color: rgba(167,139,250,0.35);
}
.te-btn svg { opacity: 0.8; }

/* ── Template Print Page ── */
.template-print { max-width: 820px; margin: 0 auto; }
.template-print-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.template-print-header h2 { font-family: var(--font-display); font-size: 1.6rem; }
.template-print-meta { font-size: 0.82rem; color: var(--text-secondary); margin-top: 4px; }
.template-print-body { line-height: 1.7; }

@media print {
  .sidebar, .mobile-toggle, .report-print-btn, .template-export-bar { display: none !important; }
  .main { margin-left: 0 !important; padding: 0 !important; }
  .report-page, .template-print { max-width: 100%; }
  body { background: white; color: black; }
  body::before { display: none; }
  .template-print-header { border-color: #ccc; }
  .template-print-header h2 { -webkit-text-fill-color: black; background: none; }
  .prose { color: black; }
  .prose h1, .prose h2, .prose h3, .prose h4 { color: black; }
  .prose a { color: #1a56db; }
  .report-stat { border-color: #ccc; }
  .report-phase h3 { border-color: #ccc; }
}
