/* ============================================================
   JAIN AI — Design System
   Palette: Warm whites, saffron, soft amber, sage accents
   ============================================================ */

:root {
  /* Core palette */
  --cream:        #FBF8F0;
  --cream-deep:   #F4EEE0;
  --cream-border: #E2D5BC;
  --saffron:      #C7610A;
  --saffron-light:#DE7C1A;
  --saffron-soft: #FBEED8;
  --saffron-glow: rgba(199, 97, 10, 0.12);
  --amber:        #9C4608;
  --amber-dark:   #773204;
  /* Jade — second accent, temple forest green */
  --jade:         #2B5C3A;
  --jade-light:   #3A7B50;
  --jade-soft:    #EDF3EF;
  /* Dark nav */
  --nav-bg:       #1A0D04;
  --nav-text:     #F4EEE0;
  --nav-border:   rgba(244, 238, 224, 0.08);
  --warm-gray:    #8C7B68;
  --text-primary: #1A0D04;
  --text-secondary:#6B5940;
  --text-muted:   #A08E78;
  --white:        #FFFFFF;
  --shadow-warm:  rgba(140, 90, 20, 0.10);
  --shadow-deep:  rgba(60, 30, 5, 0.15);

  /* Layout */
  --header-h:     70px;
  --input-area-h: 130px;
  --max-w:        760px;
  --radius-sm:    5px;
  --radius-md:    10px;
  --radius-lg:    14px;
  --radius-pill:  6px;

  /* Typography */
  --font-serif:   'Cormorant Garamond', Georgia, serif;
  --font-sans:    'Plus Jakarta Sans', system-ui, sans-serif;

  /* Motion */
  --ease-out:     cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  height: 100%;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  height: 100%;
  min-height: 100dvh;
  background-color: var(--cream);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow: hidden;
  position: relative;
}

/* ── Decorative Background Ornaments ─────────────────────── */
.bg-ornament {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

.bg-ornament.top-left {
  top: -150px;
  left: -150px;
  background: radial-gradient(circle, rgba(232, 134, 10, 0.08) 0%, transparent 70%);
}

.bg-ornament.top-right {
  top: -100px;
  right: -100px;
  background: radial-gradient(circle, rgba(245, 165, 53, 0.06) 0%, transparent 70%);
}

.bg-ornament.bottom-center {
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(232, 134, 10, 0.05) 0%, transparent 70%);
}

/* ── App Container ────────────────────────────────────────── */
.app-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ── Header ───────────────────────────────────────────────── */
.app-header {
  flex-shrink: 0;
  height: var(--header-h);
  background: linear-gradient(180deg, var(--cream) 0%, rgba(253, 250, 244, 0.95) 100%);
  border-bottom: 1px solid var(--cream-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 20px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-symbol {
  font-size: 32px;
  line-height: 1;
  color: var(--saffron);
  filter: drop-shadow(0 2px 8px rgba(232, 134, 10, 0.3));
  animation: gentleSpin 20s linear infinite;
  display: inline-block;
  transform-origin: center;
}

@keyframes gentleSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.logo-text h1 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.logo-tagline {
  font-size: 10px;
  font-weight: 400;
  color: var(--saffron);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

.clear-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.clear-btn:hover {
  background: var(--saffron-soft);
  border-color: var(--saffron-light);
  color: var(--amber);
}

.clear-btn svg {
  opacity: 0.7;
}

/* ── Chat Window ──────────────────────────────────────────── */
.chat-window {
  flex: 1;
  overflow-y: auto;
  padding: 28px 20px 16px;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.chat-window::-webkit-scrollbar { width: 4px; }
.chat-window::-webkit-scrollbar-track { background: transparent; }
.chat-window::-webkit-scrollbar-thumb {
  background: var(--cream-border);
  border-radius: var(--radius-pill);
}

/* ── Welcome Banner ───────────────────────────────────────── */
.welcome-banner {
  text-align: center;
  padding: 32px 20px 20px;
  animation: fadeInUp 0.6s var(--ease-out) both;
}

.welcome-symbol {
  font-size: 52px;
  line-height: 1;
  display: inline-block;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 16px rgba(232, 134, 10, 0.25));
}

.welcome-banner h2 {
  font-family: var(--font-serif);
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.welcome-banner p {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.65;
}

.welcome-divider {
  width: 48px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--saffron-light), transparent);
  margin: 20px auto;
  border: none;
  border-radius: var(--radius-pill);
}

/* ── Message Bubbles ──────────────────────────────────────── */
.message-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
  animation: fadeInUp 0.35s var(--ease-out) both;
}

.message-group.user {
  align-items: flex-end;
}

.message-group.assistant {
  align-items: flex-start;
}

.message-meta {
  font-size: 11px;
  color: var(--text-muted);
  padding: 0 4px;
  letter-spacing: 0.03em;
}

.message-bubble {
  max-width: min(78%, 560px);
  padding: 13px 18px;
  border-radius: var(--radius-lg);
  font-size: 15px;
  line-height: 1.7;
  word-break: break-word;
  white-space: pre-wrap;
}

/* User bubble */
.message-group.user .message-bubble {
  background: var(--nav-bg);
  color: var(--nav-text);
  border-bottom-right-radius: 2px;
}

/* Assistant bubble */
.message-group.assistant .message-bubble {
  background: var(--white);
  color: var(--text-primary);
  border-bottom-left-radius: 2px;
  border: 1px solid var(--cream-border);
  border-left: 3px solid var(--jade);
}

/* Assistant avatar */
.assistant-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--jade-soft);
  border: 1.5px solid var(--jade-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  margin-bottom: 4px;
}

.assistant-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

/* Markdown-like formatting inside bubbles */
.message-bubble strong { font-weight: 600; }
.message-bubble em { font-style: italic; opacity: 0.9; }

/* ── Typing Indicator ─────────────────────────────────────── */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  margin-bottom: 16px;
  animation: fadeInUp 0.3s var(--ease-out) both;
}

.typing-bubble {
  background: var(--white);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 12px var(--shadow-warm);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--saffron-light);
  animation: typingPulse 1.4s ease-in-out infinite;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingPulse {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30%            { transform: translateY(-5px); opacity: 1; }
}

/* ── Scroll to Bottom ─────────────────────────────────────── */
.scroll-btn {
  position: fixed;
  bottom: calc(var(--input-area-h) + 16px);
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--cream-border);
  box-shadow: 0 4px 16px var(--shadow-deep);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease-out);
  z-index: 5;
}

.scroll-btn:hover {
  background: var(--saffron-soft);
  border-color: var(--saffron-light);
  color: var(--amber);
}

.scroll-btn[hidden] { display: none; }

/* ── Suggestion Chips ─────────────────────────────────────── */
.suggestions {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  padding: 0 20px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.suggestions::-webkit-scrollbar { display: none; }

.suggestions.hidden { display: none; }

.suggestion-chip {
  flex-shrink: 0;
  padding: 8px 14px;
  background: var(--cream-deep);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
}

.suggestion-chip:hover {
  background: var(--saffron-soft);
  border-color: var(--saffron);
  color: var(--saffron);
}

/* ── Input Area ───────────────────────────────────────────── */
.input-area {
  flex-shrink: 0;
  padding: 0 20px 24px;
  background: linear-gradient(0deg, var(--cream) 80%, transparent 100%);
}

.input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--white);
  border: 1.5px solid var(--cream-border);
  border-radius: var(--radius-lg);
  padding: 10px 10px 10px 18px;
  box-shadow: 0 4px 24px var(--shadow-warm), 0 0 0 0 rgba(232, 134, 10, 0);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper:focus-within {
  border-color: var(--saffron-light);
  box-shadow: 0 4px 24px var(--shadow-warm), 0 0 0 3px var(--saffron-glow);
}

textarea#messageInput {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text-primary);
  background: transparent;
  line-height: 1.55;
  min-height: 24px;
  max-height: 140px;
  overflow-y: auto;
}

textarea#messageInput::placeholder {
  color: var(--text-muted);
}

textarea#messageInput::-webkit-scrollbar { width: 3px; }
textarea#messageInput::-webkit-scrollbar-thumb {
  background: var(--cream-border);
  border-radius: var(--radius-pill);
}

.send-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--saffron) 0%, var(--amber) 100%);
  border: none;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease-spring);
  box-shadow: 0 4px 12px rgba(232, 134, 10, 0.35);
}

.send-btn:hover:not(:disabled) {
  transform: scale(1.07);
  box-shadow: 0 6px 18px rgba(232, 134, 10, 0.45);
}

.send-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.send-btn:disabled {
  background: var(--cream-deep);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

.input-footer {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  letter-spacing: 0.03em;
  opacity: 0.8;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Error Toast ──────────────────────────────────────────── */
.error-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  background: #FFF1F0;
  border: 1px solid #FFCCC7;
  color: #A8071A;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  z-index: 100;
  opacity: 0;
  transition: all 0.3s var(--ease-out);
  pointer-events: none;
  white-space: nowrap;
}

.error-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── App Container: hidden until language selected ────────── */
.app-container {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.45s var(--ease-out) 0.1s;
}

.app-container.app--visible {
  visibility: visible;
  opacity: 1;
}

/* ── Landing Screen ───────────────────────────────────────── */
.landing-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: var(--cream);
  opacity: 1;
  transition: opacity 0.55s var(--ease-out),
              transform 0.55s var(--ease-out);
  transform: translateY(0);
  -webkit-overflow-scrolling: touch;
}

.landing-screen.landing--exit {
  opacity: 0;
  transform: translateY(-18px);
  pointer-events: none;
}

/* ── Landing inner wrapper ────────────────────────────────── */
.landing-inner {
  max-width: 600px;
  margin: 0 auto;
  padding-bottom: 60px;
}

/* ── Hero section ─────────────────────────────────────────── */
.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 64px 24px 40px;
  animation: fadeInUp 0.7s var(--ease-out) both;
}

.landing-symbol {
  font-size: 64px;
  line-height: 1;
  color: var(--saffron);
  filter: drop-shadow(0 4px 20px rgba(232, 134, 10, 0.35));
  animation: gentleSpin 20s linear infinite;
  display: inline-block;
  transform-origin: center;
  margin-bottom: 20px;
}

.landing-title {
  font-family: var(--font-serif);
  font-size: clamp(42px, 10vw, 64px);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.03em;
  line-height: 1;
  margin-bottom: 10px;
}

.landing-tagline {
  font-size: 11px;
  font-weight: 400;
  color: var(--saffron);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 28px;
}

.landing-divider {
  width: 64px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--saffron-light), transparent);
  border: none;
  border-radius: var(--radius-pill);
}

/* ── Content sections ─────────────────────────────────────── */
.landing-section {
  padding: 40px 32px;
  animation: fadeInUp 0.6s var(--ease-out) 0.1s both;
}

.landing-section-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 14px;
  letter-spacing: 0.01em;
}

.landing-section-body {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ── Feature cards grid ───────────────────────────────────── */
.landing-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0 32px 40px;
  animation: fadeInUp 0.6s var(--ease-out) 0.15s both;
}

.landing-card {
  background: var(--white);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  transition: all 0.22s var(--ease-out);
  cursor: default;
}

.landing-card:hover {
  border-color: var(--saffron-light);
  box-shadow: 0 6px 24px var(--saffron-glow);
  transform: translateY(-2px);
}

.landing-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(180, 83, 9, 0.12);
  border-radius: 11px;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.landing-card-icon svg {
  width: 21px;
  height: 21px;
  stroke: var(--saffron);
  stroke-width: 1.5;
  fill: none;
}

.landing-card-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.landing-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ── How to use steps ─────────────────────────────────────── */
.landing-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 32px 40px;
  animation: fadeInUp 0.6s var(--ease-out) 0.2s both;
}

.landing-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--saffron) 0%, var(--amber) 100%);
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(232, 134, 10, 0.3);
}

.step-text {
  padding-top: 5px;
}

.step-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

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

/* ── Support note ─────────────────────────────────────────── */
.landing-support {
  margin: 0 32px 8px;
  padding: 20px 24px;
  background: var(--saffron-soft);
  border: 1px solid rgba(232, 134, 10, 0.2);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  text-align: center;
  animation: fadeInUp 0.6s var(--ease-out) 0.25s both;
}

.landing-support a {
  color: var(--amber);
  text-decoration: none;
  font-weight: 500;
}

.landing-support a:hover {
  text-decoration: underline;
}

/* ── Language pick section ────────────────────────────────── */
.landing-lang-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 32px 40px;
  animation: fadeInUp 0.6s var(--ease-out) 0.3s both;
}

.landing-lang-label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.landing-lang-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.lang-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 152px;
  padding: 22px 28px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--cream-border);
  background: var(--white);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.25s var(--ease-spring);
  box-shadow: 0 2px 12px var(--shadow-warm);
}

.lang-btn:hover {
  border-color: var(--saffron-light);
  background: var(--saffron-soft);
  box-shadow: 0 6px 28px var(--saffron-glow);
  transform: translateY(-3px) scale(1.02);
}

.lang-btn:active {
  transform: translateY(0) scale(0.97);
}

.lang-btn-label {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.1;
}

.lang-btn:hover .lang-btn-label {
  color: var(--amber);
}

.lang-btn-sub {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.landing-lang-footer {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  opacity: 0.75;
}

/* ── Mobile Adjustments ───────────────────────────────────── */
@media (max-width: 600px) {
  :root {
    --header-h: 60px;
    --input-area-h: 120px;
  }

  .header-inner { padding: 0 16px; }
  .chat-window  { padding: 20px 16px 12px; }
  .suggestions  { padding: 0 16px 10px; }
  .input-area   { padding: 0 16px 20px; }

  .message-bubble {
    max-width: 88%;
    font-size: 14.5px;
    padding: 11px 15px;
  }

  .logo-symbol  { font-size: 26px; }
  .logo-text h1 { font-size: 19px; }

  .clear-btn span { display: none; }
  .clear-btn      { padding: 8px 10px; }

  .welcome-banner { padding: 20px 12px 16px; }
  .welcome-symbol { font-size: 40px; }

  /* Landing mobile */
  .landing-hero         { padding: 48px 20px 32px; }
  .landing-symbol       { font-size: 48px; }
  .landing-title        { font-size: clamp(36px, 12vw, 48px); }
  .landing-section      { padding: 32px 20px; }
  .landing-section-title{ font-size: 21px; }
  .landing-cards        { grid-template-columns: 1fr; padding: 0 20px 32px; }
  .landing-steps        { padding: 0 20px 32px; }
  .landing-support      { margin: 0 20px 8px; }
  .landing-lang-section { padding: 32px 20px 40px; }
  .lang-btn             { min-width: 136px; padding: 18px 20px; }
  .lang-btn-label       { font-size: 21px; }
}

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============================================================
   MULTI-PAGE WEBSITE — Nav, Homepage, Learn, Blog, Email
   ============================================================ */

/* ── Site page body overrides ─────────────────────────────── */
body.site-page {
  overflow: auto;
  height: auto;
  min-height: 100dvh;
}

/* ── Site Navigation ──────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  height: 64px;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.nav-brand-symbol {
  font-size: 24px;
  color: var(--saffron);
  filter: drop-shadow(0 2px 6px rgba(232, 134, 10, 0.3));
  animation: gentleSpin 20s linear infinite;
  display: inline-block;
  transform-origin: center;
}

.nav-brand-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--nav-text);
  letter-spacing: 0.02em;
}

.nav-brand-symbol {
  color: var(--saffron-light);
  filter: none;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.nav-link {
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  color: rgba(244, 238, 224, 0.62);
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
}

.nav-link:hover {
  background: rgba(244, 238, 224, 0.08);
  color: var(--nav-text);
}

.nav-link.active {
  background: rgba(199, 97, 10, 0.22);
  color: var(--saffron-light);
  font-weight: 500;
}

.nav-link-chat {
  background: var(--saffron);
  color: var(--white) !important;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
}

.nav-link-chat:hover {
  background: var(--saffron-light) !important;
  transform: none;
}

.nav-spacer { flex: 1; }

.nav-subscribe-btn {
  padding: 7px 18px;
  border: 1px solid rgba(244, 238, 224, 0.28);
  border-radius: var(--radius-sm);
  background: transparent;
  color: rgba(244, 238, 224, 0.82);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  flex-shrink: 0;
  margin-left: auto;
}

.nav-subscribe-btn:hover {
  background: rgba(244, 238, 224, 0.1);
  color: var(--nav-text);
  border-color: rgba(244, 238, 224, 0.5);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--nav-text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ── Site Footer ──────────────────────────────────────────── */
.site-footer {
  background: var(--cream-deep);
  border-top: 1px solid var(--cream-border);
  padding: 56px 24px 32px;
  margin-top: 80px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
}

.footer-brand-symbol {
  font-size: 32px;
  color: var(--saffron);
  animation: gentleSpin 20s linear infinite;
  display: inline-block;
  transform-origin: center;
  margin-bottom: 12px;
}

.footer-brand-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.footer-brand-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.7;
}

.footer-col-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  text-decoration: none;
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--saffron); }

.footer-bottom {
  max-width: 1100px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--cream-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ── Site Hero ────────────────────────────────────────────── */
.site-hero {
  text-align: center;
  padding: 80px 24px 72px;
  max-width: 860px;
  margin: 0 auto;
  animation: fadeInUp 0.7s var(--ease-out) both;
}

.site-hero-symbol {
  font-size: 72px;
  color: var(--saffron);
  filter: drop-shadow(0 6px 24px rgba(232, 134, 10, 0.3));
  animation: gentleSpin 20s linear infinite;
  display: inline-block;
  transform-origin: center;
  margin-bottom: 24px;
}

.site-hero-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--saffron);
  opacity: 0.9;
  margin-bottom: 20px;
}

.site-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(40px, 7vw, 70px);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin-bottom: 20px;
}

.site-hero-subtitle {
  font-size: clamp(15px, 2.2vw, 18px);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: var(--saffron);
  color: var(--white);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.2s var(--ease-out);
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
}

.btn-primary:hover {
  background: var(--saffron-light);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  background: transparent;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border: 1.5px solid var(--cream-border);
  transition: all 0.2s var(--ease-out);
}

.btn-secondary:hover {
  border-color: var(--saffron);
  color: var(--saffron);
}

/* ── Section layout ───────────────────────────────────────── */
.site-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.section-link {
  font-size: 14px;
  color: var(--saffron);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.section-link:hover { opacity: 0.75; }

/* ── Three Pillars ────────────────────────────────────────── */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto 80px;
  padding: 0 24px;
  animation: fadeInUp 0.6s var(--ease-out) 0.1s both;
}

.pillar-card {
  background: var(--white);
  border: 1px solid var(--cream-border);
  border-top: 3px solid var(--jade);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  text-align: center;
  text-decoration: none;
  transition: all 0.22s var(--ease-out);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.pillar-card:hover {
  border-top-color: var(--saffron);
  box-shadow: 0 6px 24px var(--shadow-warm);
  transform: translateY(-3px);
}

.pillar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--jade-soft);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.pillar-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--jade);
  stroke-width: 1.5;
  fill: none;
}

.pillar-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--text-primary);
}

.pillar-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.pillar-cta {
  margin-top: 6px;
  font-size: 13px;
  color: var(--saffron);
  font-weight: 500;
}

/* ── Topic cards ──────────────────────────────────────────── */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.topic-card {
  background: var(--white);
  border: 1px solid var(--cream-border);
  border-left: 3px solid var(--jade);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-decoration: none;
  transition: all 0.22s var(--ease-out);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}

.topic-card:hover {
  border-left-color: var(--saffron);
  box-shadow: 0 4px 20px var(--shadow-warm);
  transform: translateY(-2px);
}

.topic-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--jade-soft);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.topic-icon svg {
  width: 21px;
  height: 21px;
  stroke: var(--jade);
  stroke-width: 1.5;
  fill: none;
}

.topic-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.2;
}

.topic-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.topic-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--jade-soft);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--jade);
  font-weight: 600;
  width: fit-content;
  margin-top: 4px;
}

/* ── Blog cards ───────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  transition: all 0.22s var(--ease-out);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  box-shadow: 0 6px 24px var(--shadow-warm);
  transform: translateY(-3px);
}

.blog-card-thumb {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #92400e 0%, #b45309 100%);
  border-bottom: 1px solid var(--cream-border);
}

/* Category-specific thumbnail — earthy, non-gradient tones */
.blog-thumb-philosophy { background: #4A3520; }
.blog-thumb-festival   { background: #8C3A10; }
.blog-thumb-lifestyle  { background: #2B5C3A; }
.blog-thumb-history    { background: #1E3045; }
.blog-thumb-practice   { background: #5C3A1E; }
.blog-thumb-culture    { background: #6B4215; }

.blog-card-thumb svg {
  width: 40px;
  height: 40px;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 1.5;
  fill: none;
}

.blog-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.blog-card-category {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--saffron);
}

.blog-card-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
}

.blog-card-excerpt {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.blog-card-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.blog-card-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--cream-border);
  display: inline-block;
  flex-shrink: 0;
}

/* ── Homepage journal list (editorial, no cards) ─────────── */
.journal-list {
  border-top: 1.5px solid var(--cream-border);
}

.journal-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--cream-border);
  text-decoration: none;
  color: inherit;
  transition: background 0.18s var(--ease-out);
  align-items: start;
}

.journal-item:hover {
  background: transparent;
}

.journal-item-main {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.journal-item-category {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--saffron);
}

.journal-item-title {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2vw, 23px);
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
  transition: color 0.2s;
}

.journal-item:hover .journal-item-title {
  color: var(--amber);
}

.journal-item-excerpt {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 680px;
  margin-top: 1px;
}

.journal-item-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  padding-top: 2px;
  min-width: 100px;
}

.journal-item-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.journal-item-arrow {
  font-size: 17px;
  color: var(--saffron-light);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s var(--ease-out);
  transform: translateX(-6px);
  line-height: 1;
}

.journal-item:hover .journal-item-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ── Featured blog card ───────────────────────────────────── */
.blog-featured {
  background: var(--white);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  margin-bottom: 48px;
  text-decoration: none;
  transition: all 0.25s var(--ease-out);
}

.blog-featured:hover {
  border-color: var(--saffron-light);
  box-shadow: 0 10px 40px var(--saffron-glow);
}

.blog-featured-thumb {
  background: linear-gradient(135deg, #78350f 0%, #b45309 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  border-right: 1px solid var(--cream-border);
}

.blog-featured-body {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

.blog-featured-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--saffron);
}

.blog-featured-title {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.25;
}

.blog-featured-excerpt {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.blog-featured-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

/* ── Blog / Learn page heroes ─────────────────────────────── */
.page-hero {
  text-align: center;
  padding: 64px 24px 48px;
  animation: fadeInUp 0.7s var(--ease-out) both;
}

.page-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(38px, 6vw, 60px);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  margin-bottom: 14px;
}

.page-hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 520px;
  margin: 0 auto;
}

/* ── Learn topics grid ────────────────────────────────────── */
.learn-topics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ── CTA Banner ───────────────────────────────────────────── */
.cta-banner {
  background: var(--nav-bg);
  border-radius: var(--radius-md);
  padding: 52px 40px;
  text-align: center;
  max-width: 820px;
  margin: 0 auto 80px;
}

.cta-banner-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 500;
  color: var(--white);
  margin-bottom: 12px;
}

.cta-banner-body {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Email capture section ────────────────────────────────── */
.email-section {
  background: var(--cream-deep);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-md);
  padding: 56px 48px;
  text-align: center;
  max-width: 680px;
  margin: 0 auto 80px;
}

.email-section-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--jade-soft);
  border-radius: var(--radius-sm);
  margin: 0 auto 20px;
}
.email-section-symbol svg {
  width: 26px;
  height: 26px;
  stroke: var(--jade);
  stroke-width: 1.5;
  fill: none;
}

/* Featured blog thumbnail SVG */
.blog-featured-thumb svg {
  width: 56px;
  height: 56px;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 1.2;
  fill: none;
}

.email-section-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.email-section-body {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 28px;
}

.email-form {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin: 0 auto;
}

.email-input {
  flex: 1;
  padding: 13px 18px;
  border: 1.5px solid var(--cream-border);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 14.5px;
  color: var(--text-primary);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.email-input:focus {
  border-color: var(--jade-light);
  box-shadow: 0 0 0 3px rgba(43, 92, 56, 0.12);
  outline: none;
}

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

.email-submit-btn {
  padding: 13px 24px;
  background: var(--saffron);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
}

.email-submit-btn:hover {
  background: var(--saffron-light);
}

.email-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.email-privacy {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 12px;
}

.email-feedback {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 500;
  min-height: 20px;
}

.email-feedback.success { color: #2e7d32; }
.email-feedback.error   { color: #c62828; }

/* ── Email Modal ──────────────────────────────────────────── */
.email-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 32, 23, 0.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
}

.email-modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.email-modal {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s var(--ease-spring);
  box-shadow: 0 24px 80px rgba(44, 32, 23, 0.25);
}

.email-modal-overlay.show .email-modal {
  transform: translateY(0) scale(1);
}

.email-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--cream-deep);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}

.email-modal-close:hover {
  background: var(--cream-border);
  color: var(--text-primary);
}

.email-modal-symbol { font-size: 44px; margin-bottom: 16px; display: block; }

.email-modal-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.email-modal-body {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 24px;
}

/* ── Site divider ─────────────────────────────────────────── */
.site-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--saffron-light), transparent);
  margin: 0 auto 56px;
  border: none;
  border-radius: var(--radius-pill);
  display: block;
}

/* ── Daily Thought ────────────────────────────────────────── */
.daily-thought {
  border-top: 1px solid var(--cream-border);
  border-bottom: 1px solid var(--cream-border);
  background: var(--cream-deep);
  padding: 52px 24px;
  text-align: center;
}

.daily-thought-eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--jade);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.daily-thought-eyebrow::before,
.daily-thought-eyebrow::after {
  content: '';
  display: block;
  width: 36px;
  height: 1px;
  background: var(--jade-light);
  opacity: 0.5;
}

.daily-thought-quote {
  font-family: var(--font-serif);
  font-size: clamp(19px, 2.6vw, 27px);
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto 20px;
}

.daily-thought-quote::before { content: '\201C'; }
.daily-thought-quote::after  { content: '\201D'; }

.daily-thought-source {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.daily-thought-source::before { content: '— '; }

/* ============================================================
   AUTH & USER ACCOUNT STYLES
   ============================================================ */

/* ── Nav sign-in / user avatar button ──────────────────────── */
.nav-sign-in-btn {
  padding: 6px 14px;
  border: 1px solid rgba(244, 238, 224, 0.28);
  border-radius: var(--radius-sm);
  background: transparent;
  color: rgba(244, 238, 224, 0.75);
  font-size: 13.5px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.nav-sign-in-btn:hover {
  color: var(--nav-text);
  border-color: rgba(244, 238, 224, 0.5);
  background: rgba(244, 238, 224, 0.08);
}

.nav-user-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(199, 97, 10, 0.25);
  color: var(--saffron-light);
  font-size: 12px;
  font-weight: 600;
  display: none;  /* hidden until logged in — JS sets display:flex */
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid rgba(222, 124, 26, 0.4);
  overflow: hidden;
  transition: all 0.2s;
  flex-shrink: 0;
}

.nav-user-btn:hover {
  background: rgba(199, 97, 10, 0.4);
}

.nav-user-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Auth page ──────────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 80px;
}

.auth-card {
  background: var(--white);
  border: 1px solid var(--cream-border);
  border-top: 3px solid var(--jade);
  border-radius: var(--radius-md);
  padding: 52px 44px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 32px var(--shadow-warm);
}

.auth-symbol {
  display: block;
  font-size: 48px;
  margin-bottom: 20px;
  line-height: 1;
}

.auth-title {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.auth-subtitle {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

.btn-google-signin {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 24px;
  background: var(--white);
  border: 1.5px solid var(--cream-border);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  justify-content: center;
  box-shadow: 0 2px 8px var(--shadow-warm);
}

.btn-google-signin:hover:not(:disabled) {
  border-color: var(--jade-light);
  box-shadow: 0 4px 16px var(--shadow-warm);
}

.btn-google-signin:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.google-logo {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.auth-footnote {
  margin-top: 24px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.65;
}

.auth-feedback {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  min-height: 20px;
}

/* ── Article actions row (bookmark, share) ───────────────── */
.article-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.bookmark-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s;
}

.bookmark-btn:hover {
  border-color: var(--saffron-light);
  color: var(--saffron);
  background: var(--saffron-soft);
}

.bookmark-btn.bookmarked {
  border-color: var(--saffron);
  color: var(--saffron);
  background: var(--saffron-soft);
}

.bookmark-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  transition: fill 0.15s;
}

.bookmark-btn.bookmarked svg {
  fill: var(--saffron);
}

/* ── Comments section ───────────────────────────────────── */
.comments-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 64px;
  border-top: 1px solid var(--cream-border);
}

.comments-heading {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.comment-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--cream-border);
}

.comment-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--saffron-soft);
  color: var(--amber-dark);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-author {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
}

.comment-time {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-left: auto;
}

.comment-text {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.comment-form {
  margin-top: 28px;
  padding-top: 24px;
}

.comment-form-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: block;
}

.comment-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--cream);
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s;
  display: block;
}

.comment-textarea:focus {
  outline: none;
  border-color: var(--saffron-light);
}

.comment-submit-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 10px;
}

.comment-submit-btn {
  padding: 9px 22px;
  background: var(--saffron);
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.comment-submit-btn:hover { background: var(--amber); }
.comment-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.comment-signin-prompt {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 18px 20px;
  background: var(--cream-deep);
  border-radius: var(--radius-md);
  text-align: center;
}

.comment-signin-prompt a {
  color: var(--saffron);
  text-decoration: none;
  font-weight: 500;
}

.comment-signin-prompt a:hover { text-decoration: underline; }

.comment-empty {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  padding: 8px 0 16px;
}

/* ── Profile page ────────────────────────────────────────── */
.profile-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 52px 24px 80px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 32px;
  border-bottom: 1.5px solid var(--cream-border);
  margin-bottom: 44px;
  flex-wrap: wrap;
}

.profile-avatar-lg {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--saffron-soft);
  border: 2px solid var(--saffron-light);
  color: var(--amber-dark);
  font-size: 22px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.profile-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info { flex: 1; }

.profile-name {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 4px;
}

.profile-email {
  font-size: 13.5px;
  color: var(--text-muted);
}

.btn-signout {
  padding: 8px 18px;
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  margin-left: auto;
  transition: all 0.2s;
}

.btn-signout:hover {
  border-color: #dc2626;
  color: #dc2626;
}

.profile-section { margin-bottom: 44px; }

.profile-section-title {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--cream-border);
}

.profile-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--cream-border);
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
}

.profile-item:hover .profile-item-title { color: var(--saffron); }

.profile-item-category {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 3px;
}

.profile-item-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.35;
  transition: color 0.15s;
}

.profile-item-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 3px;
}

.profile-item-arrow {
  font-size: 16px;
  color: var(--saffron-light);
  margin-left: auto;
  align-self: center;
  flex-shrink: 0;
}

.profile-empty {
  font-size: 14px;
  color: var(--text-muted);
  padding: 20px 0;
  font-style: italic;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 960px) {
  .topics-grid,
  .learn-topics-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured-thumb { min-height: 180px; border-right: none; border-bottom: 1px solid var(--cream-border); }
  .pillars-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    padding: 16px 20px;
    gap: 4px;
    z-index: 99;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  }
  .nav-menu.open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-subscribe-btn { display: none; }
  .pillars-grid { grid-template-columns: 1fr; }
  .topics-grid,
  .learn-topics-grid { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .journal-item { grid-template-columns: 1fr; gap: 6px; }
  .journal-item-side { flex-direction: row; align-items: center; justify-content: space-between; min-width: unset; }
  .journal-item-arrow { opacity: 1; transform: translateX(0); }
  .email-form { flex-direction: column; }
  .email-section { padding: 40px 24px; }
  .email-modal { padding: 36px 24px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .site-hero { padding: 56px 20px 56px; }
  .pillars-grid { padding: 0 20px; }
  .cta-banner { padding: 36px 24px; margin: 0 20px 60px; }
  .section-header { flex-direction: column; gap: 8px; }
  .blog-featured-body { padding: 28px 24px; }
}

/* ============================================================
   ARTICLE / TOPIC READER PAGE
   ============================================================ */

.article-page-hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 40px;
  animation: fadeInUp 0.6s var(--ease-out) both;
}

.article-breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-breadcrumb a {
  color: var(--saffron);
  text-decoration: none;
}

.article-breadcrumb a:hover { text-decoration: underline; }

.article-breadcrumb-sep { opacity: 0.5; }

.article-category-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--saffron-soft);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
}

.article-title {
  font-family: var(--font-serif);
  font-size: clamp(30px, 5vw, 50px);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin-bottom: 16px;
}

.article-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 20px;
}

.article-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  color: var(--text-muted);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--cream-border);
}

.article-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--cream-border);
  display: inline-block;
}

.article-emoji-header {
  text-align: center;
  padding: 40px 0 32px;
  font-size: 64px;
}

/* ── Article body typography ──────────────────────────────── */
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 60px;
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-body p {
  margin-bottom: 24px;
  color: var(--text-secondary);
}

.article-body h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 40px 0 16px;
  letter-spacing: 0.01em;
}

.article-body h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 28px 0 12px;
}

.article-body ul, .article-body ol {
  padding-left: 24px;
  margin-bottom: 24px;
  color: var(--text-secondary);
}

.article-body li {
  margin-bottom: 10px;
  line-height: 1.7;
}

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

.article-body blockquote {
  margin: 32px 0;
  padding: 20px 28px;
  background: var(--saffron-soft);
  border-left: 3px solid var(--saffron);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-serif);
  font-size: 18px;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.7;
}

.article-body .highlight-box {
  background: var(--cream-deep);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin: 28px 0;
}

.article-body .highlight-box h3 {
  margin-top: 0;
  font-size: 16px;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 12px;
}

.article-divider {
  width: 48px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--saffron-light), transparent);
  margin: 40px auto;
  border: none;
  display: block;
}

/* ── Article bottom CTA ───────────────────────────────────── */
.article-cta {
  max-width: 760px;
  margin: 0 auto 60px;
  padding: 0 24px;
}

.article-cta-inner {
  background: linear-gradient(135deg, var(--text-primary) 0%, #5a3820 100%);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.article-cta-text h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 6px;
}

.article-cta-text p {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
}

/* ── Loading state ────────────────────────────────────────── */
.reader-loading {
  text-align: center;
  padding: 120px 24px;
  color: var(--text-muted);
  font-size: 15px;
}

.reader-loading .loading-symbol {
  font-size: 48px;
  animation: gentleSpin 3s linear infinite;
  display: block;
  margin-bottom: 20px;
}

@media (max-width: 700px) {
  .article-page-hero { padding: 40px 20px 32px; }
  .article-body { padding: 0 20px 48px; font-size: 15.5px; }
  .article-body blockquote { font-size: 16px; padding: 16px 20px; }
  .article-cta { padding: 0 20px; }
  .article-cta-inner { flex-direction: column; text-align: center; }
  .article-meta-row { flex-wrap: wrap; gap: 8px; }
}
