/* ========================================
   CSS CUSTOM PROPERTIES — DPCLife
   Warm terracotta + amber, soft & inviting
   ======================================== */
:root {
  --emerald: #B85C38;
  --emerald-light: #D4764E;
  --emerald-dark: #8B4229;
  --emerald-glow: rgba(184,92,56,0.08);
  --gold: #C8963E;
  --gold-light: #DEAE5C;
  --gold-dark: #A67B2C;
  --red: #C0392B;
  --green: #5A9E6F;
  --navy: #2C1810;
  --navy-light: #3E2A1F;
  --bg: #FBF8F5;
  --bg-warm: #F5EDE6;
  --bg-card: #FFFFFF;
  --text: #2C1810;
  --text-secondary: #5D4E47;
  --text-muted: #998A82;
  --border: #E8DDD5;
  --border-light: #F0E8E2;
  --shadow-sm: 0 1px 3px rgba(44,24,16,0.04);
  --shadow-md: 0 4px 16px rgba(44,24,16,0.06);
  --shadow-lg: 0 12px 40px rgba(44,24,16,0.08);
  --shadow-xl: 0 24px 60px rgba(44,24,16,0.10);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Lora', Georgia, serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;
  --nav-height: 64px;
  --max-width: 1280px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

a { color: var(--emerald); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--emerald-dark); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
}

img { max-width: 100%; display: block; }

button {
  font-family: var(--font-display);
  cursor: pointer;
  border: none;
  background: none;
  font-size: inherit;
}

/* ========================================
   NAVIGATION
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(251,248,245,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  transition: box-shadow var(--transition);
}

.nav.scrolled { box-shadow: 0 1px 12px rgba(0,0,0,0.05); }

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(12,107,88,0.3);
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.5px;
}

.nav-logo-text span { color: var(--emerald); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  justify-content: center;
  padding: 0 8px;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-link {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  transition: all var(--transition);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-link:hover {
  color: var(--emerald);
  background: var(--emerald-glow);
}

.nav-link-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--transition);
}

.nav-link:hover .nav-link-num {
  background: var(--emerald);
  color: white;
}

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

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: 8px;
}

.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: all var(--transition);
  border-radius: 2px;
}

.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-card);
  z-index: 999;
  transform: translateY(-100%);
  opacity: 0;
  transition: all 0.35s ease;
  pointer-events: none;
  overflow-y: auto;
}

.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-inner { padding: 24px; }

.mobile-menu-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.mobile-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.mobile-link-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--emerald-glow);
  color: var(--emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

/* ========================================
   HERO
   ======================================== */
.hero {
  padding: 160px 24px 80px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-warm) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 80px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(12,107,88,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(212,144,44,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--emerald);
  background: var(--emerald-glow);
  border: 1px solid rgba(12,107,88,0.12);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  color: var(--navy);
  margin-bottom: 24px;
}

.hero-title span {
  background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 19px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 12px;
  transition: all var(--transition);
  text-decoration: none;
}

.hero-cta.primary {
  background: var(--emerald);
  color: white;
  box-shadow: 0 4px 14px rgba(12,107,88,0.3);
}

.hero-cta.primary:hover {
  background: var(--emerald-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(12,107,88,0.35);
  color: white;
}

.hero-cta.secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.hero-cta.secondary:hover {
  border-color: var(--emerald);
  color: var(--emerald);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 500px;
  margin: 0 auto;
}

.hero-stat { text-align: center; }

.hero-stat-num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--emerald);
  line-height: 1;
  margin-bottom: 4px;
}

.hero-stat-label {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ========================================
   SECTIONS GRID
   ======================================== */
.sections-overview {
  padding: 80px 24px;
}

.sections-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.sections-header {
  text-align: center;
  margin-bottom: 48px;
}

.sections-header h2 {
  font-size: 36px;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.sections-header p {
  font-size: 17px;
  color: var(--text-secondary);
}

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

.section-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.section-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--emerald);
  opacity: 0;
  transition: opacity var(--transition);
}

.section-card:hover {
  border-color: var(--emerald);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.section-card:hover::before { opacity: 1; }

.section-card-num {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  position: absolute;
  top: 12px;
  right: 16px;
}

.section-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--emerald-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-card-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--emerald);
}

.section-card-content { flex: 1; min-width: 0; }

.section-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.section-card-desc {
  font-size: 13px;
  font-family: var(--font-display);
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.section-card-arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-4px);
  transition: all var(--transition);
}

.section-card-arrow svg { width: 18px; height: 18px; }

.section-card:hover .section-card-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--emerald);
}

/* ========================================
   FEATURES
   ======================================== */
.features {
  padding: 40px 24px 80px;
}

.features-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--emerald-glow), rgba(212,144,44,0.06));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--emerald);
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  font-family: var(--font-display);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========================================
   RESOURCES
   ======================================== */
.resources {
  padding: 80px 24px;
  background: var(--bg-warm);
}

.resources-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.resources-inner h2 {
  font-size: 32px;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.resources-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  text-align: left;
}

.resource-card {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  text-decoration: none;
}

.resource-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.resource-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gold-dark);
  background: rgba(212,144,44,0.1);
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.resource-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--navy);
}

.resource-card p {
  font-size: 13px;
  font-family: var(--font-display);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========================================
   BOTTOM CTA
   ======================================== */
.bottom-cta {
  padding: 80px 24px;
  text-align: center;
}

.bottom-cta-inner {
  max-width: 600px;
  margin: 0 auto;
}

.bottom-cta-inner h2 {
  font-size: 32px;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.bottom-cta-inner p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.bottom-cta-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  padding: 60px 24px 40px;
  background: var(--navy);
  color: rgba(255,255,255,0.7);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 48px;
}

.footer-brand .nav-logo-text { color: white; }
.footer-brand .nav-logo-text span { color: var(--emerald-light); }

.footer-tagline {
  font-family: var(--font-display);
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  margin-top: 12px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  padding: 4px 0;
  transition: color var(--transition);
  text-decoration: none;
}

.footer-col a:hover { color: white; }

.footer-bottom {
  grid-column: 1 / -1;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-bottom p {
  font-family: var(--font-display);
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  text-align: center;
}

/* ========================================
   SECTION PAGE LAYOUT
   ======================================== */
.section-page {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

.section-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 220px 1fr 300px;
  gap: 40px;
  align-items: start;
}

/* ========== SIDEBAR ========== */
.section-sidebar { position: relative; }

.sidebar-sticky {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.sidebar-progress {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}

.sidebar-step-num {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 800;
  color: var(--emerald);
  line-height: 1;
  margin-bottom: 8px;
  opacity: 0.2;
}

.sidebar-step-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.sidebar-step-desc {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.sidebar-toc {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}

.sidebar-toc h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.sidebar-toc-link {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 0;
  border-left: 2px solid transparent;
  padding-left: 12px;
  transition: all var(--transition);
  text-decoration: none;
}

.sidebar-toc-link:hover {
  color: var(--emerald);
  border-left-color: var(--emerald);
}

.sidebar-time {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.sidebar-time-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.sidebar-time-row + .sidebar-time-row { border-top: 1px solid var(--border-light); }

.sidebar-time-label {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--text-muted);
}

.sidebar-time-value {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--emerald);
}

/* ========== MAIN CONTENT ========== */
.section-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-light);
}

.section-header-num {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--emerald);
  margin-bottom: 12px;
}

.section-header h1 {
  font-size: 36px;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.section-header-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 600px;
}

.section-encouragement {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(212,144,44,0.06);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--gold-dark);
  font-weight: 500;
}

/* ========== WIKI CONTENT ========== */
.wiki-paragraph {
  margin-bottom: 48px;
}

.wiki-block {
  position: relative;
}

.wiki-heading {
  font-size: 24px;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--emerald);
  display: inline-block;
}

.wiki-callout {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: var(--emerald-glow);
  border-radius: var(--radius-md);
  border: 1px solid rgba(12,107,88,0.08);
}

.wiki-callout-bar {
  width: 3px;
  flex-shrink: 0;
  background: var(--emerald);
  border-radius: 3px;
}

.wiki-callout p {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--emerald-dark);
  line-height: 1.6;
  font-style: italic;
}

.wiki-content p {
  margin-bottom: 16px;
  line-height: 1.8;
}

.wiki-content p:last-child { margin-bottom: 0; }

/* ========== ACTIONS SIDEBAR (Todo + Chat) ========== */
.section-actions-sidebar { position: relative; }

.actions-sticky {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Todo Widget */
.todo-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.todo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 12px;
}

.todo-header h4 {
  font-size: 14px;
  font-weight: 700;
}

.todo-count {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: white;
  background: var(--emerald);
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.todo-signin-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-warm);
}

.todo-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 0 12px;
}

.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  transition: background var(--transition);
}

.todo-item:hover { background: var(--bg-warm); }
.todo-item.completed { opacity: 0.5; }
.todo-item.completed .todo-text { text-decoration: line-through; }

.todo-check {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all var(--transition);
  color: transparent;
}

.todo-check:hover { border-color: var(--emerald); }

.todo-check.checked {
  background: var(--emerald);
  border-color: var(--emerald);
  color: white;
}

.todo-check svg { width: 14px; height: 14px; stroke-width: 3; }

.todo-text-wrap { flex: 1; min-width: 0; }

.todo-text {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
  cursor: pointer;
}

.todo-badge-chat, .todo-badge-default {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  vertical-align: middle;
}

.todo-badge-chat { background: rgba(212,144,44,0.1); color: var(--gold-dark); }
.todo-badge-default { background: var(--bg-warm); color: var(--text-muted); }

.todo-resolution {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--emerald);
  font-style: italic;
  margin-top: 2px;
}

.todo-delete {
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: 0;
  transition: all var(--transition);
  padding: 2px;
}

.todo-item:hover .todo-delete { opacity: 1; }
.todo-delete:hover { color: var(--red); }
.todo-delete svg { width: 14px; height: 14px; stroke-width: 2; }

.todo-edit-input {
  width: 100%;
  padding: 4px 8px;
  border: 1px solid var(--emerald);
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 13px;
  outline: none;
  box-shadow: 0 0 0 3px var(--emerald-glow);
}

.todo-add {
  display: flex;
  gap: 6px;
  padding: 12px;
  border-top: 1px solid var(--border-light);
}

.todo-add input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  background: var(--bg);
}

.todo-add input:focus { outline: none; border-color: var(--emerald); }

.todo-add button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--emerald);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.todo-add button:hover { background: var(--emerald-dark); }

.todo-empty {
  padding: 24px 16px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-muted);
}

/* ========== CHAT WIDGET ========== */
.chat-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

.chat-widget.collapsed .chat-body { display: none; }
.chat-widget.collapsed .chat-header-chevron { transform: rotate(180deg); }

@keyframes chatExpand {
  from { max-height: 48px; }
  to { max-height: 600px; }
}

.chat-widget.expanding { animation: chatExpand 0.4s ease forwards; }

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  width: 100%;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}

.chat-header:hover { background: var(--bg-warm); }

.chat-header-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.chat-header span {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  text-align: left;
}

.chat-header-chevron { transition: transform var(--transition); color: var(--text-muted); }

.chat-body {
  display: flex;
  flex-direction: column;
  height: 400px;
}

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

.chat-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.chat-msg.user { flex-direction: row-reverse; }

.chat-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-display);
  flex-shrink: 0;
}

.chat-msg.ai .chat-msg-avatar {
  background: var(--emerald);
  color: white;
}

.chat-msg.user .chat-msg-avatar {
  background: var(--navy);
  color: white;
}

.chat-msg-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.5;
  max-width: 85%;
}

.chat-msg.ai .chat-msg-bubble {
  background: var(--bg-warm);
  color: var(--text);
}

.chat-msg.user .chat-msg-bubble {
  background: var(--emerald);
  color: white;
}

.chat-msg-bubble.streaming::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 14px;
  background: var(--emerald);
  margin-left: 2px;
  animation: blink 0.6s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.chat-typing {
  display: none;
  padding: 0 16px 8px;
}

.chat-typing.active { display: block; }

.chat-typing-dots {
  display: flex;
  gap: 4px;
  padding: 8px 14px;
  background: var(--bg-warm);
  border-radius: 12px;
  width: fit-content;
}

.chat-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingDot 1.4s ease-in-out infinite;
}

.chat-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1); }
}

.chat-input-wrap {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border-light);
  align-items: flex-end;
}

.chat-input-wrap textarea {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.4;
  resize: none;
  max-height: 120px;
  background: var(--bg);
}

.chat-input-wrap textarea:focus { outline: none; border-color: var(--emerald); }

.chat-send {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--emerald);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.chat-send:hover { background: var(--emerald-dark); }
.chat-send:disabled { opacity: 0.4; cursor: not-allowed; }

/* ========== SECTION NAV BOTTOM ========== */
.section-nav-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 40px;
  margin-top: 40px;
  border-top: 1px solid var(--border-light);
}

.section-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--emerald);
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all var(--transition);
  text-decoration: none;
}

.section-nav-link:hover {
  border-color: var(--emerald);
  background: var(--emerald-glow);
}

/* ========== TOAST ========== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 10px;
  color: white;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  max-width: 360px;
}

.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
.toast.info { background: var(--navy); }

@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-8px); } }

/* ========== LEGAL PAGES ========== */
.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}
.legal-page h1 { font-size: 32px; margin-bottom: 8px; }
.legal-date { color: var(--text-muted); font-size: 14px; margin-bottom: 32px; font-family: var(--font-display); }
.legal-page h2 { font-size: 20px; margin: 32px 0 12px; }
.legal-page p { margin-bottom: 16px; line-height: 1.8; }

/* ========== NEWSLETTER ========== */
.newsletter {
  background: var(--bg-warm);
  padding: 64px 24px;
}
.newsletter-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.newsletter h2 {
  font-size: 28px;
  margin-bottom: 8px;
}
.newsletter p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 16px;
}
.newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 440px;
  margin: 0 auto;
}
.newsletter-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 15px;
  background: var(--bg-card);
  color: var(--text);
  transition: border-color var(--transition);
}
.newsletter-input:focus {
  outline: none;
  border-color: var(--emerald);
}
.newsletter-btn {
  padding: 12px 24px;
  background: var(--emerald);
  color: white;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  white-space: nowrap;
}
.newsletter-btn:hover {
  background: var(--emerald-dark);
}
.newsletter-msg {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 14px;
  min-height: 20px;
}
.newsletter-msg.success { color: var(--green); }
.newsletter-msg.error { color: var(--red); }

.newsletter-inline {
  background: transparent;
  padding: 40px 0;
  margin-top: 32px;
  border-top: 1px solid var(--border-light);
}
.newsletter-inline .newsletter-inner {
  text-align: left;
}
.newsletter-inline .newsletter-form {
  margin: 0;
}

/* ========== BLOG ========== */
.blog-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 100px 24px 60px;
}
.blog-page-header {
  margin-bottom: 40px;
}
.blog-page-header h1 {
  font-size: 36px;
  margin-bottom: 8px;
}
.blog-page-header p {
  color: var(--text-secondary);
  font-size: 17px;
}
.blog-preview {
  padding: 80px 24px;
}
.blog-preview-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.blog-grid-full {
  grid-template-columns: repeat(2, 1fr);
}
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-decoration: none;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  border-color: var(--emerald);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.blog-card-category {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--emerald);
  margin-bottom: 12px;
}
.blog-card h3 {
  font-size: 18px;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--navy);
}
.blog-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  flex: 1;
}
.blog-card-meta {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

/* Blog Article */
.blog-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 100px 24px 60px;
}
.blog-article-header {
  margin-bottom: 40px;
}
.blog-back {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 24px;
  transition: color var(--transition);
}
.blog-back:hover { color: var(--emerald); }
.blog-article-category {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--emerald);
  margin-bottom: 12px;
}
.blog-article-header h1 {
  font-size: 36px;
  line-height: 1.15;
  margin-bottom: 16px;
}
.blog-article-meta {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-muted);
}
.blog-article-body {
  margin-top: 40px;
}
.blog-article-body p {
  margin-bottom: 20px;
  line-height: 1.85;
  font-size: 17px;
}
.blog-article-body h2 {
  font-size: 22px;
  margin: 40px 0 16px;
  color: var(--navy);
}

/* ========== CONTENT BLOCK (replaces wiki-paragraph for static content) ========== */
.content-block {
  margin-bottom: 48px;
}
.content-block h2 {
  font-size: 24px;
  margin-bottom: 16px;
  color: var(--navy);
}
.content-body p {
  margin-bottom: 16px;
  line-height: 1.8;
}
.content-body p:last-child { margin-bottom: 0; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1100px) {
  .section-layout { grid-template-columns: 1fr; }
  .section-sidebar { display: none; }
  .section-actions-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
  }
  .actions-sticky {
    display: flex;
    gap: 0;
    flex-direction: row;
  }
  .todo-widget { display: none; }
  .chat-widget { border-radius: 0; border: none; border-top: 1px solid var(--border); }
  .chat-widget.collapsed .chat-body { display: none; }
  .chat-widget.collapsed { background: var(--bg-card); }
  .section-main { padding-bottom: 80px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .hero-title { font-size: 36px; }
  .hero-stats { flex-direction: column; gap: 16px; align-items: center; }
  .hero-stat { text-align: center; }
  .sections-grid { grid-template-columns: 1fr; }
  .features-inner { grid-template-columns: 1fr; }
  .resources-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-grid-full { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-links { flex-direction: column; gap: 24px; }
  .bottom-cta-inner h2 { font-size: 28px; }
  .section-nav-bottom { flex-direction: column; gap: 12px; }
  .newsletter-form { flex-direction: column; }
  .newsletter-btn { text-align: center; }
}

