/* ============================================================
   HEALTH PROTOCOL — Main Stylesheet
   Brand: Science-backed wellness, inspired by lunaty.ca
   Palette: Forest green + warm gold + off-white
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600&family=Vazirmatn:wght@300;400;500;600;700&display=swap');

:root {
  --primary:        #1F3D2E;
  --primary-light:  #2D5A42;
  --primary-hover:  #162D21;
  --accent:         #C8A96E;
  --accent-light:   #F5EDD9;
  --bg:             #FAFAF7;
  --white:          #FFFFFF;
  --text:           #1A1A1A;
  --text-muted:     #6B7280;
  --text-light:     #9CA3AF;
  --border:         #E5E7EB;
  --border-light:   #F3F4F6;
  --success:        #059669;
  --warning:        #D97706;
  --error:          #DC2626;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.06);
  --shadow:         0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:      0 12px 32px rgba(0,0,0,0.12);
  --radius:         8px;
  --radius-lg:      16px;
  --radius-xl:      24px;
  --transition:     0.2s ease;
  --font-serif:     'Playfair Display', Georgia, serif;
  --font-sans:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width:      1200px;
  --nav-height:     72px;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-sans); color: var(--text); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-sans); border: none; }
ul { list-style: none; }

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 600; }
h3 { font-size: 1.4rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; font-family: var(--font-sans); }
p { color: var(--text-muted); line-height: 1.75; }

/* ── Layout ─────────────────────────────────────────────── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.section-title { margin-bottom: 16px; }
.section-subtitle { max-width: 600px; font-size: 1.1rem; }
.text-center { text-align: center; }
.text-center .section-subtitle { margin: 0 auto; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: var(--radius); font-size: 0.95rem; font-weight: 500; transition: all var(--transition); }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-secondary:hover { background: var(--primary); color: var(--white); }
.btn-accent { background: var(--accent); color: var(--white); }
.btn-accent:hover { background: #b8943e; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-lg { padding: 18px 36px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 10px 20px; font-size: 0.875rem; }

/* ── Navigation ─────────────────────────────────────────── */
.nav { position: fixed; top: 0; left: 0; right: 0; height: var(--nav-height); background: rgba(250,250,247,0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); z-index: 100; transition: box-shadow var(--transition); }
.nav.scrolled { box-shadow: var(--shadow); }
.nav-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; color: var(--primary); letter-spacing: -0.02em; }
.nav-logo span { color: var(--accent); }
.nav-logo img { height: 32px; width: auto; display: block; }
.auth-brand .nav-logo img { background: rgba(255,255,255,0.95); border-radius: 6px; padding: 4px 8px; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); transition: color var(--transition); }
.nav-links a:hover { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); transition: all var(--transition); border-radius: 2px; }

/* ── Hero ────────────────────────────────────────────────── */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: var(--nav-height); background: linear-gradient(135deg, #F0F4F1 0%, var(--bg) 60%, var(--accent-light) 100%); overflow: hidden; position: relative; }
.hero::before { content: ''; position: absolute; top: -200px; right: -200px; width: 600px; height: 600px; background: radial-gradient(circle, rgba(200,169,110,0.12) 0%, transparent 70%); pointer-events: none; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--border); border-radius: 100px; padding: 6px 16px; font-size: 0.8rem; font-weight: 500; color: var(--text-muted); margin-bottom: 24px; box-shadow: var(--shadow-sm); }
.hero-badge-dot { width: 8px; height: 8px; background: var(--success); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.hero h1 { margin-bottom: 24px; }
.hero h1 em { font-style: normal; color: var(--primary-light); }
.hero-desc { font-size: 1.15rem; margin-bottom: 40px; max-width: 480px; }
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-trust { display: flex; align-items: center; gap: 24px; margin-top: 48px; padding-top: 48px; border-top: 1px solid var(--border); }
.hero-trust-item { display: flex; flex-direction: column; }
.hero-trust-item strong { font-size: 1.5rem; font-family: var(--font-serif); color: var(--primary); }
.hero-trust-item span { font-size: 0.78rem; color: var(--text-muted); }
.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-card { background: var(--white); border-radius: var(--radius-xl); padding: 32px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); width: 100%; max-width: 400px; }
.hero-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.hero-card-title { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 600; }
.hero-card-badge { background: var(--accent-light); color: var(--accent); font-size: 0.75rem; font-weight: 600; padding: 4px 10px; border-radius: 100px; }
.pillar-item { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border-light); }
.pillar-item:last-child { border-bottom: none; }
.pillar-icon { width: 40px; height: 40px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.pillar-info { flex: 1; }
.pillar-name { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.pillar-desc { font-size: 0.78rem; color: var(--text-muted); }
.pillar-bar-wrap { margin-top: 6px; background: var(--border-light); border-radius: 100px; height: 4px; overflow: hidden; }
.pillar-bar { height: 100%; border-radius: 100px; background: var(--primary); transition: width 1s ease; }

/* ── Trust Bar ───────────────────────────────────────────── */
.trust-bar { background: var(--primary); padding: 20px 0; }
.trust-bar-inner { display: flex; align-items: center; justify-content: center; gap: 48px; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.85); font-size: 0.875rem; font-weight: 500; }
.trust-item-icon { font-size: 1.2rem; }

/* ── Pillars Section ─────────────────────────────────────── */
.pillars { background: var(--white); }
.pillars-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 56px; }
.pillar-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px 24px; transition: all var(--transition); position: relative; overflow: hidden; }
.pillar-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--primary); opacity: 0; transition: opacity var(--transition); }
.pillar-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.pillar-card:hover::before { opacity: 1; }
.pillar-card-icon { font-size: 2rem; margin-bottom: 16px; }
.pillar-card h3 { margin-bottom: 12px; font-size: 1.2rem; }
.pillar-card p { font-size: 0.9rem; margin-bottom: 20px; }
.pillar-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pillar-tag { background: var(--white); border: 1px solid var(--border); border-radius: 100px; padding: 3px 10px; font-size: 0.73rem; color: var(--text-muted); font-weight: 500; }

/* ── How It Works ────────────────────────────────────────── */
.how-it-works { background: var(--bg); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 56px; position: relative; }
.steps::before { content: ''; position: absolute; top: 32px; left: 12.5%; right: 12.5%; height: 1px; background: var(--border); z-index: 0; }
.step { text-align: center; position: relative; z-index: 1; }
.step-num { width: 64px; height: 64px; border-radius: 50%; background: var(--primary); color: var(--white); font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; box-shadow: var(--shadow); }
.step h4 { margin-bottom: 10px; color: var(--text); }
.step p { font-size: 0.875rem; }

/* ── About Expert ────────────────────────────────────────── */
.expert { background: var(--white); }
.expert-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.expert-img-wrap { position: relative; }
.expert-img-placeholder { width: 100%; aspect-ratio: 4/5; background: linear-gradient(135deg, var(--primary-light), var(--primary)); border-radius: var(--radius-xl); display: flex; align-items: center; justify-content: center; font-size: 5rem; object-fit: cover; object-position: center top; }
.expert-badge-float { position: absolute; bottom: -20px; right: -20px; background: var(--white); border-radius: var(--radius-lg); padding: 16px 20px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.expert-badge-float strong { display: block; font-family: var(--font-serif); font-size: 1.1rem; color: var(--primary); }
.expert-badge-float span { font-size: 0.8rem; color: var(--text-muted); }
.expert-content .section-label { display: block; margin-bottom: 12px; }
.expert-content h2 { margin-bottom: 20px; }
.expert-content p { margin-bottom: 16px; }
.expert-credentials { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
.credential { display: flex; align-items: center; gap: 12px; }
.credential-icon { width: 36px; height: 36px; background: var(--accent-light); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.credential p { margin: 0; font-size: 0.875rem; color: var(--text); }

/* ── Pricing ─────────────────────────────────────────────── */
.pricing { background: var(--bg); }
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; margin-top: 56px; max-width: 800px; margin-left: auto; margin-right: auto; }
.pricing-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 40px; position: relative; }
.pricing-card.featured { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.pricing-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--primary); color: var(--white); font-size: 0.75rem; font-weight: 600; padding: 4px 16px; border-radius: 100px; white-space: nowrap; }
.pricing-name { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 8px; }
.pricing-price { font-family: var(--font-serif); font-size: 3rem; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.pricing-price span { font-size: 1rem; color: var(--text-muted); font-family: var(--font-sans); }
.pricing-desc { font-size: 0.875rem; margin-bottom: 32px; }
.pricing-features { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.pricing-feature { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; color: var(--text); }
.pricing-feature::before { content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0; }
.pricing-tbd { text-align: center; padding: 48px; background: var(--accent-light); border-radius: var(--radius-xl); margin-top: 56px; }

/* ── FAQ ─────────────────────────────────────────────────── */
.faq { background: var(--white); }
.faq-list { max-width: 720px; margin: 56px auto 0; display: flex; flex-direction: column; gap: 16px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.faq-question { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; background: none; font-family: var(--font-sans); font-size: 0.95rem; font-weight: 600; color: var(--text); text-align: left; transition: background var(--transition); }
.faq-question:hover { background: var(--bg); }
.faq-question.active { background: var(--primary); color: var(--white); }
.faq-icon { font-size: 1.2rem; transition: transform var(--transition); }
.faq-question.active .faq-icon { transform: rotate(45deg); }
.faq-answer { padding: 0 24px; max-height: 0; overflow: hidden; transition: all 0.3s ease; }
.faq-answer.open { max-height: 200px; padding: 20px 24px; }
.faq-answer p { font-size: 0.9rem; }

/* ── Footer ──────────────────────────────────────────────── */
.footer { background: var(--primary); color: rgba(255,255,255,0.8); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand .nav-logo { color: var(--white); margin-bottom: 16px; display: block; }
.footer-brand p { font-size: 0.875rem; max-width: 280px; }
.footer-col h5 { color: var(--white); font-weight: 600; font-size: 0.875rem; margin-bottom: 16px; letter-spacing: 0.04em; text-transform: uppercase; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { font-size: 0.875rem; transition: color var(--transition); }
.footer-col ul a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 32px; display: flex; align-items: center; justify-content: space-between; font-size: 0.8rem; }
.footer-links { display: flex; gap: 24px; }
.footer-links a:hover { color: var(--white); }

/* ── Auth Pages ──────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-brand { background: linear-gradient(160deg, var(--primary) 0%, var(--primary-light) 100%); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-brand-content { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.auth-brand h2 { color: var(--white); font-size: 2.5rem; margin-bottom: 20px; }
.auth-brand p { color: rgba(255,255,255,0.75); font-size: 1.05rem; margin-bottom: 40px; }
.auth-social-proof { display: flex; flex-direction: column; gap: 16px; }
.auth-proof-item { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,0.85); font-size: 0.9rem; }
.auth-proof-icon { font-size: 1.2rem; }
.auth-form-wrap { background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 48px; }
.auth-form-inner { width: 100%; max-width: 420px; }
.auth-form-inner .nav-logo { margin-bottom: 40px; display: block; }
.auth-form-inner h1 { font-size: 2rem; margin-bottom: 8px; }
.auth-form-inner .subtitle { margin-bottom: 40px; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--text); margin-bottom: 8px; }
.form-input { width: 100%; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: var(--radius); font-family: var(--font-sans); font-size: 0.95rem; color: var(--text); background: var(--white); transition: border-color var(--transition); }
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31,61,46,0.08); }
.form-input::placeholder { color: var(--text-light); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-check { display: flex; align-items: flex-start; gap: 10px; font-size: 0.85rem; color: var(--text-muted); }
.form-check input { margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; }
.form-submit { width: 100%; margin-top: 8px; }
.form-footer { text-align: center; margin-top: 24px; font-size: 0.875rem; color: var(--text-muted); }
.form-footer a { color: var(--primary); font-weight: 500; }
.form-divider { display: flex; align-items: center; gap: 16px; margin: 24px 0; }
.form-divider::before, .form-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.form-divider span { font-size: 0.8rem; color: var(--text-light); }

/* ── Dashboard ───────────────────────────────────────────── */
.dash-main { padding-top: var(--nav-height); background: var(--bg); min-height: 100vh; }
.dash-header { background: var(--white); border-bottom: 1px solid var(--border); padding: 20px 32px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: var(--nav-height); z-index: 10; }
.dash-header h1 { font-size: 1.5rem; font-family: var(--font-serif); }
.dash-header-actions { display: flex; align-items: center; gap: 12px; }
.dash-content { padding: 32px; }
.dash-greeting { margin-bottom: 32px; }
.dash-greeting h2 { font-family: var(--font-serif); font-size: 1.8rem; margin-bottom: 4px; }
.dash-greeting p { font-size: 0.9rem; }
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.stat-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.stat-card-icon { font-size: 1.5rem; }
.stat-card-trend { font-size: 0.75rem; font-weight: 600; color: var(--success); background: rgba(5,150,105,0.08); padding: 2px 8px; border-radius: 100px; }
.stat-card-value { font-family: var(--font-serif); font-size: 2rem; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.stat-card-label { font-size: 0.8rem; color: var(--text-muted); }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.dash-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.dash-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.dash-card-title { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 600; }
.dash-pillars-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-pillar-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; transition: all var(--transition); }
.dash-pillar-item:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.dash-pillar-item-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.dash-pillar-item-icon { font-size: 1.3rem; }
.dash-pillar-item-name { font-size: 0.875rem; font-weight: 600; }
.dash-pillar-item-progress { font-size: 0.75rem; color: var(--text-muted); text-align: right; margin-bottom: 6px; }
.progress-bar { background: var(--border-light); border-radius: 100px; height: 6px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 100px; background: var(--primary); }
.progress-fill.green { background: var(--success); }
.progress-fill.gold { background: var(--accent); }
.activity-list { display: flex; flex-direction: column; gap: 16px; }
.activity-item { display: flex; align-items: flex-start; gap: 12px; }
.activity-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); margin-top: 5px; flex-shrink: 0; }
.activity-dot.gold { background: var(--accent); }
.activity-dot.green { background: var(--success); }
.activity-text { font-size: 0.875rem; color: var(--text); }
.activity-time { font-size: 0.75rem; color: var(--text-light); margin-top: 2px; }
.video-preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.video-thumb { border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, var(--primary-light), var(--primary)); aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; font-size: 2rem; cursor: pointer; transition: transform var(--transition); position: relative; }
.video-thumb:hover { transform: scale(1.03); }
.video-thumb iframe { border-radius: var(--radius); }
.video-play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 48px; height: 48px; border-radius: 50%; background: rgba(31, 61, 46, 0.75); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1rem; padding-left: 3px; box-shadow: 0 2px 8px rgba(0,0,0,0.25); transition: background var(--transition), transform var(--transition); }
.video-thumb:hover .video-play-btn { background: var(--accent, #C8A96E); transform: translate(-50%, -50%) scale(1.08); }
.video-thumb-info { margin-top: 8px; }
.video-thumb-title { font-size: 0.8rem; font-weight: 500; color: var(--text); line-height: 1.4; }
.video-thumb-duration { font-size: 0.72rem; color: var(--text-muted); }

/* ── App bottom tab navigation ───────────────────────────── */
.app-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: var(--primary);
  border-top: 1px solid rgba(255,255,255,0.1);
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.app-bottom-nav-inner { display: flex; height: 100%; }
.app-bottom-nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  color: rgba(255,255,255,0.5); font-size: 0.6rem; font-weight: 600;
  text-decoration: none; transition: color var(--transition);
  letter-spacing: 0.02em; -webkit-tap-highlight-color: transparent;
}
.app-bottom-nav-item.active { color: var(--accent); }
.app-bottom-nav-item:not(.active):hover { color: rgba(255,255,255,0.85); }
.app-bottom-nav-icon { font-size: 1.2rem; line-height: 1; }
@media (min-width: 769px) { .app-bottom-nav { display: none; } }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { display: none; }
  .pillars-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
  .expert-inner { grid-template-columns: 1fr; }
  .expert-img-wrap { max-width: 360px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .pillars-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .trust-bar-inner { gap: 24px; }
  /* Landing page: tighten nav actions so both buttons fit next to the hamburger */
  .nav-actions { gap: 6px; }
  .nav-actions .btn-sm { padding: 7px 10px; font-size: 0.72rem; white-space: nowrap; }
  /* Dashboard content: clearance above bottom tab bar */
  .dash-content { padding-bottom: 80px; }
  /* Expert badge: stay within right container edge on narrow viewports */
  .expert-badge-float { right: 0; bottom: -10px; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  /* Stacked layout: without this, align-items:center (meant for centering
     items vertically in the row) instead centers each item's box
     horizontally — since each stat's box width differs, the numbers and
     labels end up staggered instead of lined up. text-align:center keeps
     every number/label pair centered on the same axis regardless of width. */
  .hero-trust { flex-direction: column; gap: 16px; align-items: center; }
  .hero-trust-item { text-align: center; }
  .dash-stats { grid-template-columns: 1fr; }
  .video-preview-grid { grid-template-columns: 1fr; }
  /* Stack two-column form rows on small phones */
  .form-row { grid-template-columns: 1fr; }
  /* Expert badge: go static on smallest screens so it never clips */
  .expert-badge-float { position: static; margin-top: 16px; display: inline-block; }
}

/* ── Language switcher ──────────────────────────────────────── */
.lang-switcher {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--border-light); border-radius: var(--radius);
  padding: 4px 6px; margin-right: 8px;
}
.lang-btn {
  background: none; border: none; font-size: 0.75rem; font-weight: 600;
  color: var(--text-muted); padding: 3px 6px; border-radius: 4px;
  cursor: pointer; transition: all var(--transition); letter-spacing: 0.04em;
}
.lang-btn.active { background: var(--primary); color: #fff; }
.lang-btn:not(.active):hover { color: var(--text); background: var(--border); }
.lang-sep { color: var(--border); font-size: 0.8rem; }

/* ── RTL / Farsi layout ─────────────────────────────────────── */
[dir="rtl"] body,
body.lang-fa {
  --font-sans: 'Vazirmatn', Tahoma, Arial, sans-serif;
  --font-serif: 'Vazirmatn', Tahoma, Arial, sans-serif;
}

[dir="rtl"] .nav-inner { flex-direction: row-reverse; }
[dir="rtl"] .nav-actions { flex-direction: row-reverse; }

.nav-signout { margin-left: 48px; }
[dir="rtl"] .nav-signout { margin-left: 0; margin-right: 48px; }
[dir="rtl"] .footer-bottom { flex-direction: row-reverse; }
[dir="rtl"] .footer-links  { flex-direction: row-reverse; }

/* Flip margins/paddings that assume LTR */
[dir="rtl"] .section-label { letter-spacing: 0; }
[dir="rtl"] .lang-switcher { margin-right: 0; margin-left: 8px; }

[dir="rtl"] .stat-card-header    { flex-direction: row-reverse; }

/* Today's Habits card: when all done, drop the green summary onto its own
   line under the title instead of crowding it in the header row. */
[dir="rtl"] .dash-card-header { flex-wrap: wrap; }
[dir="rtl"] #habits-summary.habits-all-done { flex-basis: 100%; margin-top: 6px; }

/* Checkin */
[dir="rtl"] .checkin-top   { flex-direction: row-reverse; }
[dir="rtl"] .week-strip    { flex-direction: row-reverse; }
[dir="rtl"] .habit-row     { flex-direction: row-reverse; }
[dir="rtl"] .ring-wrap     { flex-direction: row-reverse; }
[dir="rtl"] .week-banner   { flex-direction: row-reverse; }
[dir="rtl"] .habit-group-header { flex-direction: row-reverse; }

/* Account / action lists */
[dir="rtl"] .action-header    { flex-direction: row-reverse; }
[dir="rtl"] .video-actions    { flex-direction: row-reverse; }
[dir="rtl"] .video-info       { text-align: right; }
[dir="rtl"] .week-panel-intro { border-left: none; border-right: 3px solid var(--accent); }
[dir="rtl"] .continuing-note  { text-align: right; }
[dir="rtl"] .gate-info        { text-align: right; }

/* Tracker */
[dir="rtl"] .streak-row      { flex-direction: row-reverse; }
[dir="rtl"] .charts-card-header { flex-direction: row-reverse; }
[dir="rtl"] .cp-row          { flex-direction: row-reverse; }
[dir="rtl"] .heatmap-legend  { flex-direction: row-reverse; }

/* Onboarding / Retest */
[dir="rtl"] .ob-agree-row { flex-direction: row-reverse; }
[dir="rtl"] .ob-nav       { flex-direction: row-reverse; }
[dir="rtl"] .ob-week-row  { flex-direction: row-reverse; }
[dir="rtl"] .ob-week-info { text-align: right; }
[dir="rtl"] .ob-what-includes ul { padding-left: 0; padding-right: 18px; }
[dir="rtl"] .ob-goal-block { text-align: right; }
[dir="rtl"] .score-grid   { direction: rtl; }

/* General text alignment for RTL */
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { text-align: right; }
[dir="rtl"] p  { text-align: right; }
[dir="rtl"] .text-center h1, [dir="rtl"] .text-center h2,
[dir="rtl"] .text-center h3, [dir="rtl"] .text-center p { text-align: center; }
[dir="rtl"] .stat-card  { text-align: right; }
[dir="rtl"] .cp-row-label { text-align: right; }
[dir="rtl"] .ob-eyebrow { text-align: right; }
[dir="rtl"] .ob-title   { text-align: right; }
[dir="rtl"] .ob-lead    { text-align: right; }
[dir="rtl"] .ob-step-label { letter-spacing: 0; }
[dir="rtl"] .section-title, [dir="rtl"] .account-section-title { text-align: right; }
[dir="rtl"] .tracker-hero h1, [dir="rtl"] .tracker-hero p { text-align: right; }
[dir="rtl"] .account-greeting { text-align: right; }
[dir="rtl"] .week-banner-label, [dir="rtl"] .week-banner-sub { text-align: right; }
[dir="rtl"] .action-body { text-align: right; }
[dir="rtl"] .worksheet-label { text-align: right; }
[dir="rtl"] .no-data-msg p { text-align: center; }
[dir="rtl"] .cp-label, [dir="rtl"] .cp-title, [dir="rtl"] .cp-date,
[dir="rtl"] .cp-pending-msg { text-align: right; }

/* Daily snapshot card */
[dir="rtl"] .snapshot-field-label { text-align: right; letter-spacing: 0; }
[dir="rtl"] .snapshot-skip     { text-align: right; }
[dir="rtl"] .snapshot-skipped-lbl { text-align: right; }

/* Recovery / return banner */
[dir="rtl"] .recovery-banner       { flex-direction: row-reverse; }
[dir="rtl"] .recovery-banner-body strong,
[dir="rtl"] .recovery-banner-body p { text-align: right; }

/* Paused habits */
[dir="rtl"] .paused-habit-row   { flex-direction: row-reverse; }
[dir="rtl"] .paused-section-label { text-align: right; letter-spacing: 0; }

/* Insights & readiness (tracker) */
[dir="rtl"] .insight-item-title { text-align: right; letter-spacing: 0; }
[dir="rtl"] .insight-item-body  { text-align: right; }
[dir="rtl"] .insight-item-note  { text-align: right; }
[dir="rtl"] .readiness-row      { flex-direction: row-reverse; }
[dir="rtl"] .correlation-note   { text-align: right; }

/* FAQ (index.html override) */
[dir="rtl"] .faq-question { text-align: right; }
