/* =========================================
   Think and Grow Rich – Learning System
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans+Hebrew:wght@300;400;600;700;800&display=swap');

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

:root {
  --gold:       #c9a227;
  --gold-light: #f0c840;
  --gold-dim:   rgba(201,162,39,0.11);
  --bg:         #f7f4ee;
  --card-bg:    #ffffff;
  --text:       #1a1607;
  --text-muted: #7a6a40;
  --border:     #e8dfc8;
  --pos-bg:     #e8f7ee;
  --pos-text:   #1a6b3a;
  --neg-bg:     #fce8e8;
  --neg-text:   #9b1c1c;
  --green:      #27ae60;
  --red:        #e74c3c;
  --radius:     14px;
  --shadow:     0 2px 20px rgba(150,100,20,0.1);
}

[data-theme="dark"] {
  --bg:         #0f0e0a;
  --card-bg:    #1c1a12;
  --text:       #f0e8cc;
  --text-muted: #a09070;
  --border:     #2c2818;
  --pos-bg:     #0d2218;
  --pos-text:   #5fba80;
  --neg-bg:     #280f0f;
  --neg-text:   #e07070;
  --shadow:     0 2px 20px rgba(0,0,0,0.5);
}

body {
  font-family: 'Open Sans Hebrew', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  direction: rtl;
}

/* ── Navigation ── */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  background: var(--card-bg);
  border-bottom: 2px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.back-link { color: var(--gold); text-decoration: none; font-size: 0.88rem; font-weight: 700; transition: opacity 0.2s; }
.back-link:hover { opacity: 0.65; }
.nav-title { font-size: 1.05rem; font-weight: 700; color: var(--gold); }
.theme-btn {
  background: none; border: 1px solid var(--border); border-radius: 50%;
  width: 36px; height: 36px; cursor: pointer; font-size: 1rem;
  transition: background 0.2s; display: flex; align-items: center; justify-content: center;
}
.theme-btn:hover { background: var(--border); }

/* ── Hero ── */
.hero {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 44px 40px 28px; max-width: 1100px; margin: 0 auto;
}
.hero-badge {
  display: inline-block; background: var(--gold); color: #1a1607;
  padding: 3px 12px; border-radius: 20px; font-size: 0.78rem;
  font-weight: 700; margin-bottom: 10px;
}
.hero-content h1 { font-size: 2rem; font-weight: 800; color: var(--gold); margin-bottom: 8px; line-height: 1.2; }
.hero-sub { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 12px; }

.hero-stats { display: flex; gap: 8px; flex-wrap: wrap; }

.streak-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--gold-dim); color: var(--gold);
  border: 1px solid rgba(201,162,39,0.3);
  padding: 4px 12px; border-radius: 20px; font-size: 0.82rem; font-weight: 700;
}

/* Ring progress */
.hero-progress { position: relative; flex-shrink: 0; width: 110px; height: 110px; }
.progress-ring { transform: rotate(-90deg); }
.ring-bg  { fill: none; stroke: var(--border); stroke-width: 9; }
.ring-fill { fill: none; stroke: var(--gold); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 0.55s ease; }
.ring-text {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-size: 1.5rem; font-weight: 800; color: var(--gold); gap: 1px;
}
.ring-denom { font-size: 0.8rem; color: var(--text-muted); align-self: flex-end; margin-bottom: 6px; }

/* ── Progress Bar ── */
.progress-bar-wrap { height: 5px; background: var(--border); }
.progress-bar { height: 100%; background: linear-gradient(to left, var(--gold-light), var(--gold)); transition: width 0.45s ease; }

/* ── Formula ── */
.formula-card {
  max-width: 1100px; margin: 28px auto 0; padding: 24px 36px;
  background: var(--card-bg); border-radius: var(--radius);
  box-shadow: var(--shadow); border-top: 4px solid var(--gold);
}
.formula-card h2 { font-size: 1.05rem; font-weight: 700; color: var(--gold); margin-bottom: 18px; }
.formula-flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.f-step {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 11px 16px; background: var(--bg); border-radius: 10px;
  border: 1px solid var(--border); min-width: 75px; text-align: center;
  transition: border-color 0.2s, transform 0.15s;
}
.f-step:hover { border-color: var(--gold); transform: translateY(-2px); }
.f-icon  { font-size: 1.4rem; }
.f-label { font-size: 0.76rem; font-weight: 600; color: var(--text-muted); }
.f-arrow { font-size: 1.2rem; color: var(--gold); font-weight: 700; }

/* ── Tab Navigation ── */
.tab-nav {
  max-width: 1100px; margin: 28px auto 0;
  padding: 20px 36px; display: flex; gap: 12px;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 2px solid var(--gold);
  box-shadow: 0 4px 32px rgba(201,162,39,0.18);
  overflow-x: auto; scrollbar-width: none;
  position: sticky; top: 53px; z-index: 90;
}
.tab-nav::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 16px 30px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 99px;
  cursor: pointer;
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.tab-btn:hover {
  color: var(--gold);
  background: var(--gold-dim);
  border-color: var(--gold);
}
.tab-btn.active {
  color: #1a1607;
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 4px 16px rgba(201,162,39,0.5);
  transform: translateY(-2px);
}
.tab-badge {
  background: rgba(0,0,0,0.1);
  color: inherit;
  border-radius: 99px;
  padding: 3px 11px;
  font-size: 0.88rem;
  font-weight: 800;
  transition: all 0.2s;
  line-height: 1.6;
}
.tab-btn:hover .tab-badge { background: rgba(201,162,39,0.25); }
.tab-btn.active .tab-badge { background: rgba(26,22,7,0.2); color: #1a1607; }

/* ── Tab Panels ── */
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: tabFadeIn 0.22s ease; }
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Scroll-to-top button ── */
.scroll-top-btn {
  position: fixed; bottom: 28px; left: 28px; z-index: 500;
  width: 44px; height: 44px;
  background: var(--gold); color: #1a1607;
  border: none; border-radius: 50%; cursor: pointer;
  font-size: 1.25rem; font-weight: 900;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: opacity 0.25s, transform 0.25s;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
}
.scroll-top-btn.visible { opacity: 1; pointer-events: auto; }
.scroll-top-btn:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }

/* ── Principles Tab ── */
.principles-tab { max-width: 1100px; margin: 0 auto; padding: 24px 40px 0; }

.today-card {
  background: linear-gradient(135deg, var(--card-bg), var(--gold-dim));
  border: 2px solid var(--gold); border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 20px;
  display: flex; align-items: flex-start; gap: 16px;
}
.today-icon { font-size: 2rem; flex-shrink: 0; }
.today-body { flex: 1; }
.today-label { font-size: 0.75rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.today-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.today-sub { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }
.today-action { flex-shrink: 0; }
.today-go-btn {
  padding: 8px 18px; background: var(--gold); color: #1a1607;
  border: none; border-radius: 8px; font-weight: 700; cursor: pointer;
  font-size: 0.85rem; transition: opacity 0.2s;
}
.today-go-btn:hover { opacity: 0.85; }

.filter-row { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }
.filter-row span { font-size: 0.82rem; color: var(--text-muted); font-weight: 600; }

.filter-btn {
  padding: 5px 14px; border-radius: 20px; border: 1px solid var(--border);
  background: none; cursor: pointer; font-size: 0.82rem; color: var(--text-muted);
  font-weight: 600; transition: all 0.18s; font-family: inherit;
}
.filter-btn:hover { border-color: var(--gold); color: var(--gold); }
.filter-btn.active { background: var(--gold); color: #1a1607; border-color: var(--gold); }

.expand-all-btn {
  margin-right: auto; background: none; border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 14px; cursor: pointer; color: var(--text-muted);
  font-size: 0.82rem; transition: all 0.2s; font-family: inherit;
}
.expand-all-btn:hover { border-color: var(--gold); color: var(--gold); }

.principles-grid { display: flex; flex-direction: column; gap: 8px; }

/* ── Principle Card ── */
.principle-card {
  background: var(--card-bg); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--border);
  overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s;
}
.principle-card:hover { border-color: var(--gold); box-shadow: 0 4px 24px rgba(201,162,39,0.14); }
.principle-card.completed { border-color: var(--gold); background: linear-gradient(135deg, var(--card-bg), var(--gold-dim)); }
.principle-card.just-completed { animation: completedPulse 0.8s ease-out; }

@keyframes completedPulse {
  0%   { box-shadow: 0 0 0 0   rgba(201,162,39,0.5); }
  50%  { box-shadow: 0 0 0 12px rgba(201,162,39,0); }
  100% { box-shadow: 0 0 0 0   rgba(201,162,39,0); }
}

.card-header { display: flex; align-items: center; gap: 14px; padding: 14px 20px; cursor: pointer; user-select: none; }
.card-num {
  width: 30px; height: 30px; border-radius: 50%; background: var(--gold);
  color: #1a1607; font-weight: 800; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.card-icon   { font-size: 1.4rem; flex-shrink: 0; }
.card-titles { flex: 1; min-width: 0; }
.card-title  { font-size: 0.98rem; font-weight: 700; }
.card-sub    { font-size: 0.74rem; color: var(--text-muted); margin-top: 2px; }
.card-status { color: var(--gold); font-size: 1.1rem; font-weight: 700; width: 22px; text-align: center; }
.card-expand { color: var(--text-muted); font-size: 0.88rem; }

.card-body { padding: 20px 24px 24px; border-top: 1px solid var(--border); animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }

.card-desc { font-size: 0.92rem; line-height: 1.7; margin-bottom: 14px; }

.info-block { border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; }
.key-lesson { background: var(--gold-dim); }
.exercise   { background: rgba(39,174,96,0.07); }

.info-label { font-weight: 700; font-size: 0.8rem; color: var(--gold); margin-bottom: 5px; display: block; }
.exercise .info-label { color: var(--green); }
.info-block p { font-size: 0.87rem; line-height: 1.65; }

.quote-block { margin: 12px 0; padding: 10px 16px; border-right: 4px solid var(--gold); }
.quote-block blockquote { font-style: italic; font-size: 0.87rem; color: var(--text-muted); line-height: 1.6; }

.notes-block { margin-bottom: 16px; }
.note-input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text); font-family: inherit; font-size: 0.87rem;
  resize: vertical; margin-top: 6px; direction: rtl; transition: border-color 0.2s;
}
.note-input:focus { outline: none; border-color: var(--gold); }

.card-actions { display: flex; justify-content: flex-end; }
.complete-btn {
  padding: 9px 22px; border: 2px solid var(--gold); border-radius: 8px;
  background: none; color: var(--gold); font-weight: 700; cursor: pointer;
  font-size: 0.87rem; transition: all 0.2s; font-family: inherit;
}
.complete-btn:hover { background: var(--gold); color: #1a1607; }
.complete-btn.done  { background: var(--gold); color: #1a1607; }

/* ── Emotions Section ── */
.emotions-section {
  max-width: 1100px; margin: 36px auto 0;
  padding: 24px 36px; background: var(--card-bg);
  border-radius: var(--radius); box-shadow: var(--shadow); border-top: 4px solid var(--gold);
}
.emotions-section h2 { font-size: 1.05rem; font-weight: 700; color: var(--gold); margin-bottom: 18px; }
.emotions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.emotion-col h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 11px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.emotion-col.positive h3 { color: var(--green); }
.emotion-col.negative h3 { color: var(--red); }
.emotion-list { display: flex; flex-direction: column; gap: 5px; }
.emotion-item { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 8px; font-size: 0.86rem; }
.positive-item { background: var(--pos-bg); color: var(--pos-text); }
.negative-item { background: var(--neg-bg); color: var(--neg-text); }
.e-icon { font-size: 1rem; }
.e-name { font-weight: 600; flex: 1; }
.e-en   { font-size: 0.74rem; opacity: 0.65; }
.emotions-note { margin-top: 14px; font-size: 0.79rem; color: var(--text-muted); text-align: center; }

/* ── Desire Tab ── */
.desire-tab {
  max-width: 800px; margin: 32px auto; padding: 0 40px 40px;
}
.tab-intro { margin-bottom: 28px; }
.tab-intro h2 { font-size: 1.4rem; font-weight: 800; color: var(--gold); margin-bottom: 8px; }
.tab-intro p  { font-size: 0.92rem; color: var(--text-muted); line-height: 1.65; }

.desire-steps { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }

.desire-step-card {
  background: var(--card-bg); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 20px 24px;
  box-shadow: var(--shadow); transition: border-color 0.2s;
}
.desire-step-card:focus-within { border-color: var(--gold); }

.desire-step-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.desire-step-num {
  width: 32px; height: 32px; border-radius: 50%; background: var(--gold);
  color: #1a1607; font-weight: 800; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.desire-step-icon  { font-size: 1.3rem; }
.desire-step-title { font-weight: 700; font-size: 0.98rem; }

.desire-step-desc { font-size: 0.83rem; color: var(--text-muted); margin-bottom: 10px; line-height: 1.5; }

.desire-input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text); font-family: inherit; font-size: 0.9rem;
  resize: vertical; direction: rtl; transition: border-color 0.2s; min-height: 52px;
}
.desire-input:focus { outline: none; border-color: var(--gold); }

.declaration-actions { display: flex; gap: 10px; justify-content: center; margin-bottom: 20px; }

.btn-primary {
  padding: 11px 28px; background: var(--gold); color: #1a1607;
  border: none; border-radius: 10px; font-weight: 800; cursor: pointer;
  font-size: 0.92rem; transition: opacity 0.2s; font-family: inherit;
}
.btn-primary:hover { opacity: 0.85; }

.btn-secondary {
  padding: 11px 22px; background: none; color: var(--gold);
  border: 2px solid var(--gold); border-radius: 10px; font-weight: 700; cursor: pointer;
  font-size: 0.92rem; transition: all 0.2s; font-family: inherit;
}
.btn-secondary:hover { background: var(--gold-dim); }

.declaration-output {
  background: var(--card-bg); border: 2px solid var(--gold);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
  display: none;
}
.declaration-output.visible { display: block; animation: fadeIn 0.3s ease; }
.declaration-output h3 { color: var(--gold); font-size: 1rem; font-weight: 700; margin-bottom: 14px; }
.declaration-text {
  font-size: 0.95rem; line-height: 1.9; color: var(--text);
  border-right: 4px solid var(--gold); padding-right: 16px; white-space: pre-wrap;
}
.copy-btn {
  margin-top: 14px; padding: 7px 18px; background: var(--gold-dim);
  color: var(--gold); border: 1px solid rgba(201,162,39,0.3); border-radius: 8px;
  cursor: pointer; font-size: 0.84rem; font-weight: 700; transition: background 0.2s; font-family: inherit;
}
.copy-btn:hover { background: var(--gold); color: #1a1607; }
.copy-btn.copied { background: var(--green); color: #fff; border-color: var(--green); }

/* ── Persistence Tab ── */
.persistence-tab {
  max-width: 800px; margin: 32px auto; padding: 0 40px 40px;
}

.q-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }

.q-item {
  background: var(--card-bg); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 18px 20px;
  box-shadow: var(--shadow);
}
.q-text { font-size: 0.92rem; font-weight: 600; margin-bottom: 12px; line-height: 1.5; }

.q-scale { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.q-scale-label { font-size: 0.75rem; color: var(--text-muted); }
.q-scale-btns  { display: flex; gap: 6px; }

.scale-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border);
  background: none; cursor: pointer; font-weight: 700; font-size: 0.88rem;
  color: var(--text-muted); transition: all 0.15s; font-family: inherit;
}
.scale-btn:hover { border-color: var(--gold); color: var(--gold); }
.scale-btn.selected { background: var(--gold); color: #1a1607; border-color: var(--gold); }

.persistence-result {
  background: var(--card-bg); border-radius: var(--radius); padding: 28px 24px;
  border: 2px solid var(--border); box-shadow: var(--shadow);
  display: none; text-align: center;
}
.persistence-result.visible { display: block; animation: fadeIn 0.3s ease; }

.result-score {
  font-size: 3rem; font-weight: 800; color: var(--gold); line-height: 1;
  margin-bottom: 6px;
}
.result-label { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.result-desc  { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }
.result-advice {
  background: var(--gold-dim); border-radius: 10px; padding: 14px 18px;
  font-size: 0.88rem; line-height: 1.65; text-align: right;
  border-right: 4px solid var(--gold);
}
.result-advice strong { color: var(--gold); }

/* ── Fears Tab ── */
.fears-tab { max-width: 900px; margin: 32px auto; padding: 0 40px 40px; }

.fears-grid { display: flex; flex-direction: column; gap: 14px; }

.fear-card {
  background: var(--card-bg); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  overflow: hidden; transition: border-color 0.2s;
}
.fear-card.rated { border-color: rgba(201,162,39,0.5); }

.fear-header { display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; user-select: none; }
.fear-icon { font-size: 1.8rem; flex-shrink: 0; }
.fear-titles { flex: 1; }
.fear-name { font-size: 1rem; font-weight: 700; }
.fear-en   { font-size: 0.77rem; color: var(--text-muted); margin-top: 2px; }
.fear-my-rating { display: flex; gap: 2px; }
.fear-star { font-size: 1rem; color: var(--border); transition: color 0.1s; }
.fear-star.lit { color: var(--gold); }
.fear-expand { color: var(--text-muted); font-size: 0.88rem; }

.fear-body { padding: 20px 24px 24px; border-top: 1px solid var(--border); animation: fadeIn 0.2s ease; }

.fear-desc { font-size: 0.92rem; line-height: 1.65; margin-bottom: 16px; }

.fear-symptoms-block { margin-bottom: 16px; }
.fear-symptoms-title { font-weight: 700; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 8px; }
.fear-symptoms { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.fear-symptoms li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 0.85rem; color: var(--text);
}
.fear-symptoms li::before {
  content: '⚠'; font-size: 0.75rem; color: var(--red); flex-shrink: 0; margin-top: 2px;
}

.fear-rating-block { margin-bottom: 16px; }
.fear-rating-label { font-weight: 700; font-size: 0.82rem; color: var(--gold); margin-bottom: 8px; display: block; }

.star-rating-interactive { display: flex; gap: 6px; margin-bottom: 6px; }
.star-btn {
  background: none; border: none; font-size: 1.6rem; cursor: pointer;
  color: var(--border); transition: color 0.1s, transform 0.1s; padding: 0;
  line-height: 1;
}
.star-btn:hover, .star-btn.lit { color: var(--gold); }
.star-btn:hover { transform: scale(1.15); }
.star-rating-text { font-size: 0.8rem; color: var(--text-muted); }

.fear-cure-block {
  background: rgba(39,174,96,0.07); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 14px;
}
.fear-cure-label { font-weight: 700; font-size: 0.82rem; color: var(--green); margin-bottom: 6px; display: block; }
.fear-cure-text  { font-size: 0.87rem; line-height: 1.65; }

.fear-notes-label { font-weight: 700; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 6px; display: block; }

/* ── Shared Utilities ── */
.section-divider {
  max-width: 1100px; margin: 28px auto 0;
  padding: 0 40px;
}

/* ── Footer ── */
.site-footer {
  text-align: center; padding: 28px;
  color: var(--text-muted); font-size: 0.78rem;
  border-top: 1px solid var(--border); margin-top: 48px;
}

/* ── Exercise Accordion ── */
.exercises-tab { max-width: 900px; margin: 0 auto; padding: 24px 40px 40px; }

.exercise-section { margin-bottom: 10px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.exercise-section-header {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px;
  background: var(--card-bg); border: 1px solid var(--border); cursor: pointer;
  user-select: none; font-weight: 700; font-size: 0.98rem;
  transition: border-color 0.2s, background 0.2s;
}
.exercise-section-header:hover { border-color: var(--gold); }
.exercise-section-header.open  { border-color: var(--gold); background: linear-gradient(to left, var(--card-bg), var(--gold-dim)); }
.exercise-section-label { flex: 1; }
.exercise-section-expand { color: var(--text-muted); font-size: 0.9rem; }
.exercise-section-body { background: var(--bg); border: 1px solid var(--border); border-top: none; padding: 24px; }

/* ── Flashcard Tab ── */
.flashcards-tab { max-width: 680px; margin: 0 auto; padding: 24px 40px 40px; }

.fc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.fc-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.fc-stat { padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; border: 1px solid var(--border); }
.fc-stat.total  { color: var(--gold);  border-color: rgba(201,162,39,0.3); background: var(--gold-dim); }
.fc-stat.known  { color: var(--green); border-color: rgba(39,174,96,0.3);  background: var(--pos-bg); }
.fc-stat.review { color: #e67e22;      border-color: rgba(230,126,34,0.3); background: rgba(230,126,34,0.07); }

.fc-progress-wrap { height: 5px; background: var(--border); border-radius: 3px; margin-bottom: 20px; overflow: hidden; }
.fc-progress-bar  { height: 100%; background: var(--gold); border-radius: 3px; transition: width 0.35s ease; }

.fc-filter-row { display: flex; gap: 6px; margin-bottom: 20px; }

/* The flip card */
.flashcard-wrapper { perspective: 1200px; height: 200px; cursor: pointer; max-width: 600px; margin: 0 auto 16px; }
.flashcard { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 0.5s ease; }
.flashcard.flipped { transform: rotateY(180deg); }
.flashcard-face {
  position: absolute; width: 100%; height: 100%; backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 22px; border-radius: var(--radius); text-align: center;
  box-shadow: var(--shadow);
}
.flashcard-front { background: var(--card-bg); border: 2px solid var(--gold); }
.flashcard-back  { background: linear-gradient(135deg, var(--card-bg), var(--gold-dim)); border: 2px solid var(--gold); transform: rotateY(180deg); }

.fc-card-icon   { font-size: 1.6rem; margin-bottom: 8px; }
.fc-badge       { font-size: 0.72rem; color: var(--text-muted); font-weight: 700; margin-bottom: 6px; }
.fc-question    { font-size: 1rem; font-weight: 700; line-height: 1.5; color: var(--text); }
.fc-answer      { font-size: 0.88rem; line-height: 1.65; color: var(--text); white-space: pre-wrap; text-align: right; }
.fc-hint        { font-size: 0.72rem; color: var(--text-muted); margin-top: 10px; }

.fc-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 14px; }
.fc-nav-btn {
  padding: 7px 16px; border: 1px solid var(--border); border-radius: 8px;
  background: none; color: var(--text-muted); cursor: pointer; font-size: 0.86rem;
  transition: all 0.2s; font-family: inherit;
}
.fc-nav-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.fc-nav-btn:disabled { opacity: 0.3; cursor: default; }
.fc-counter { font-size: 0.88rem; color: var(--text-muted); font-weight: 600; min-width: 55px; text-align: center; }

.fc-actions { display: flex; gap: 10px; justify-content: center; margin-bottom: 20px; }
.fc-btn-known  { padding: 10px 22px; background: var(--green); color: #fff; border: none; border-radius: 10px; font-weight: 700; cursor: pointer; font-size: 0.9rem; transition: opacity 0.2s; font-family: inherit; }
.fc-btn-review { padding: 10px 22px; background: none; color: #e67e22; border: 2px solid #e67e22; border-radius: 10px; font-weight: 700; cursor: pointer; font-size: 0.9rem; transition: all 0.2s; font-family: inherit; }
.fc-btn-known:hover  { opacity: 0.85; }
.fc-btn-review:hover { background: rgba(230,126,34,0.07); }
.fc-btn-reset  { padding: 7px 16px; border: 1px solid var(--border); border-radius: 8px; background: none; color: var(--text-muted); cursor: pointer; font-size: 0.82rem; font-family: inherit; transition: all 0.2s; }
.fc-btn-reset:hover { border-color: var(--red); color: var(--red); }

.fc-empty { text-align: center; padding: 48px 20px; color: var(--text-muted); font-size: 1rem; background: var(--card-bg); border-radius: var(--radius); border: 1px solid var(--border); }

/* ── Summary Tab ── */
.summary-tab { max-width: 900px; margin: 0 auto; padding: 24px 40px 40px; }

.summary-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px,1fr)); gap: 12px; margin-bottom: 28px; }
.stat-card { background: var(--card-bg); border-radius: var(--radius); padding: 20px; text-align: center; border: 1px solid var(--border); box-shadow: var(--shadow); }
.stat-icon  { font-size: 1.7rem; margin-bottom: 8px; }
.stat-num   { font-size: 2rem; font-weight: 800; color: var(--gold); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }

.summary-section { margin-bottom: 26px; }
.summary-section h3 { font-size: 1rem; font-weight: 700; color: var(--gold); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }

.timeline { display: flex; flex-direction: column; gap: 6px; }
.timeline-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--card-bg); border-radius: 10px; border: 1px solid var(--border); }
.tl-icon  { font-size: 1.1rem; }
.tl-title { flex: 1; font-weight: 600; font-size: 0.88rem; }
.tl-date  { font-size: 0.76rem; color: var(--text-muted); }
.timeline-empty { color: var(--text-muted); font-size: 0.88rem; padding: 10px 0; }

.notes-summary-list { display: flex; flex-direction: column; gap: 8px; }
.note-summary-item { background: var(--card-bg); border-radius: 10px; padding: 12px 16px; border: 1px solid var(--border); }
.note-summary-header { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; font-weight: 700; font-size: 0.88rem; }
.note-summary-text   { font-size: 0.84rem; color: var(--text-muted); line-height: 1.55; }

.export-card { background: var(--card-bg); border-radius: var(--radius); padding: 24px; border: 1px solid var(--border); box-shadow: var(--shadow); text-align: center; }
.export-card p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 16px; line-height: 1.6; }
.export-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── Reading Mode ── */
.reading-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px; background: var(--gold); color: #1a1607;
  border-radius: var(--radius); margin-bottom: 14px; font-weight: 700;
  flex-wrap: wrap;
}
.reading-bar-label  { flex: 1; font-size: 0.9rem; }
.reading-bar-counter { font-size: 0.82rem; opacity: 0.75; }
.reading-bar-btns { display: flex; gap: 6px; }
.reading-bar-btn {
  padding: 5px 14px; background: rgba(0,0,0,0.12); border: none;
  border-radius: 6px; cursor: pointer; font-weight: 700;
  color: #1a1607; font-family: inherit; font-size: 0.86rem;
  transition: background 0.15s;
}
.reading-bar-btn:hover:not(:disabled) { background: rgba(0,0,0,0.22); }
.reading-bar-btn:disabled { opacity: 0.35; cursor: default; }
.reading-bar-exit {
  padding: 5px 12px; background: rgba(0,0,0,0.08); border: 1px solid rgba(0,0,0,0.15);
  border-radius: 6px; cursor: pointer; color: #1a1607; font-family: inherit;
  font-size: 0.82rem; font-weight: 600;
}

.reading-mode-btn {
  padding: 5px 13px; background: none; border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; color: var(--text-muted); font-size: 0.8rem; font-weight: 600;
  transition: all 0.2s; font-family: inherit;
}
.reading-mode-btn:hover  { border-color: var(--gold); color: var(--gold); }
.reading-mode-btn.active { background: var(--gold); color: #1a1607; border-color: var(--gold); }

/* ── Daily Journal ── */
.daily-journal {
  background: var(--card-bg); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 20px 24px;
  box-shadow: var(--shadow); margin-bottom: 20px;
}
.journal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; font-weight: 700; font-size: 0.95rem; color: var(--gold);
}
.journal-date { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.journal-prompt { font-size: 0.84rem; color: var(--text-muted); margin-bottom: 10px; line-height: 1.5; }
.journal-input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text); font-family: inherit; font-size: 0.87rem;
  resize: vertical; direction: rtl; min-height: 70px; transition: border-color 0.2s;
}
.journal-input:focus { outline: none; border-color: var(--gold); }
.journal-footer {
  display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 10px;
}
.journal-count { font-size: 0.78rem; color: var(--text-muted); }
.journal-log { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.journal-entry {
  background: var(--bg); border-radius: 8px; padding: 10px 14px;
  border: 1px solid var(--border); font-size: 0.84rem; line-height: 1.55;
}
.journal-entry-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px; font-size: 0.76rem; color: var(--text-muted);
}
.journal-entry-principle { color: var(--gold); font-weight: 700; }

/* ── Today-card enhancements ── */
.today-exercise {
  font-size: 0.81rem; color: var(--text-muted); margin-top: 8px;
  padding-top: 8px; border-top: 1px solid rgba(201,162,39,0.2); line-height: 1.5;
}
.today-btns { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.today-done-btn {
  padding: 8px 14px; background: none; border: 2px solid var(--gold);
  border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 0.8rem;
  color: var(--gold); transition: all 0.2s; font-family: inherit; white-space: nowrap;
}
.today-done-btn:hover { background: var(--gold-dim); }
.today-done-btn.done-active { background: var(--gold); color: #1a1607; }

/* ── Quiz Tab ── */
.quiz-tab { max-width: 660px; margin: 0 auto; padding: 24px 40px 40px; }
.quiz-start-box { text-align: center; padding: 32px 16px; }
.quiz-last-result {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 24px; text-align: center; display: none;
}
.quiz-last-result.visible { display: block; }
.quiz-last-score { font-size: 2.4rem; font-weight: 800; color: var(--gold); line-height: 1; }
.quiz-last-meta  { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

.quiz-progress-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.quiz-step { font-size: 0.82rem; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.quiz-bar-wrap { flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.quiz-bar { height: 100%; background: var(--gold); border-radius: 3px; transition: width 0.35s ease; }

.quiz-question-card {
  background: var(--card-bg); border-radius: var(--radius); border: 2px solid var(--gold);
  padding: 24px; margin-bottom: 16px; box-shadow: var(--shadow); text-align: center;
}
.quiz-q-icon      { font-size: 2rem; margin-bottom: 8px; }
.quiz-q-principle { font-size: 0.74rem; color: var(--gold); font-weight: 700; margin-bottom: 8px; }
.quiz-q-text      { font-size: 0.98rem; font-weight: 700; line-height: 1.5; }

.quiz-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.quiz-option {
  padding: 12px 18px; background: var(--card-bg); border: 2px solid var(--border);
  border-radius: 10px; cursor: pointer; font-size: 0.88rem; font-weight: 600;
  text-align: right; transition: all 0.18s; font-family: inherit; color: var(--text); direction: rtl;
}
.quiz-option:hover:not(:disabled) { border-color: var(--gold); background: var(--gold-dim); }
.quiz-option.selected { border-color: var(--gold); background: var(--gold-dim); color: var(--gold); }
.quiz-option.correct  { border-color: var(--green); background: var(--pos-bg); color: var(--pos-text); }
.quiz-option.wrong    { border-color: var(--red);   background: var(--neg-bg); color: var(--neg-text); }
.quiz-option:disabled { cursor: default; }

.quiz-feedback { text-align: center; font-size: 0.9rem; font-weight: 700; margin-bottom: 14px; min-height: 20px; }
.quiz-feedback.correct { color: var(--green); }
.quiz-feedback.wrong   { color: var(--red); }

.quiz-result-box {
  background: var(--card-bg); border: 2px solid var(--gold); border-radius: var(--radius);
  padding: 32px 24px; text-align: center; box-shadow: var(--shadow);
}
.quiz-final-score { font-size: 3.5rem; font-weight: 800; color: var(--gold); line-height: 1; margin-bottom: 8px; }
.quiz-final-label { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.quiz-final-desc  { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 24px; line-height: 1.6; }
.quiz-breakdown   { text-align: right; margin-bottom: 24px; }
.quiz-breakdown h4 { font-size: 0.88rem; color: var(--gold); font-weight: 700; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.quiz-breakdown-item { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; padding: 4px 0; }
.qbi-icon   { font-size: 0.95rem; flex-shrink: 0; }
.qbi-label  { flex: 1; }
.qbi-result { font-weight: 800; font-size: 1rem; }
.qbi-correct { color: var(--green); }
.qbi-wrong   { color: var(--red); }

/* ── TGR Notification section ── */
.tgr-notif-section {
  background: var(--card-bg); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 20px 24px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.tgr-notif-header  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-weight: 700; font-size: 0.95rem; }
.tgr-notif-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tgr-notif-status  { font-size: 0.82rem; color: var(--text-muted); margin-top: 8px; min-height: 16px; }

/* ── Backup section ── */
.backup-section {
  background: var(--card-bg); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 20px 24px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.backup-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 6px; }
.backup-desc  { font-size: 0.84rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; }
.backup-btns  { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.backup-status { font-size: 0.82rem; color: var(--text-muted); margin-top: 8px; min-height: 16px; }

/* ── Daily quote banner ── */
.daily-quote-banner {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--gold-dim); border-right: 4px solid var(--gold);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px;
  font-size: 0.88rem; line-height: 1.65; color: var(--text);
}
.dq-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.dq-text { font-style: italic; }

/* ── WhatsApp share button ── */
.today-share-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 20px; font-size: 0.82rem; font-weight: 600;
  background: #25d366; color: #fff; text-decoration: none;
  transition: opacity .2s; border: none; cursor: pointer;
}
.today-share-btn:hover { opacity: .85; }

/* ── Principle resources section ── */
.principle-resources { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 14px; }
.res-toggle {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 14px; font-size: 0.83rem; color: var(--text-muted);
  cursor: pointer; transition: background .15s;
}
.res-toggle:hover { background: var(--hover-bg); color: var(--text); }
.res-body { margin-top: 12px; display: flex; flex-direction: column; gap: 14px; }
.res-section { display: flex; flex-direction: column; gap: 8px; }
.res-section-label { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.res-link {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; text-decoration: none; color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.res-link:hover { border-color: var(--gold); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.res-link-video { border-right: 3px solid #e74c3c; }
.res-link-icon  { font-size: 1.1rem; flex-shrink: 0; }
.res-link-title { font-weight: 600; font-size: 0.88rem; display: block; }
.res-link-note  { font-size: 0.8rem; color: var(--text-muted); display: block; margin-top: 2px; }

/* ── Quiz history ── */
.quiz-history-list { display: flex; flex-direction: column; gap: 8px; }
.qh-item {
  display: grid; grid-template-columns: 90px 1fr 48px;
  align-items: center; gap: 10px; font-size: 0.87rem;
}
.qh-date   { color: var(--text-muted); font-size: 0.82rem; }
.qh-bar-wrap { background: var(--border); border-radius: 99px; height: 8px; overflow: hidden; }
.qh-bar    { height: 100%; border-radius: 99px; transition: width .4s; }
.qh-score  { font-weight: 700; text-align: center; }

/* ── UX Polish ── */

/* Card header subtle hover */
.card-header:hover { background: var(--gold-dim); }
.fear-header:hover { background: var(--gold-dim); }

/* Today-card hover elevation */
.today-card { transition: box-shadow 0.25s, transform 0.22s; }
.today-card:hover {
  box-shadow: 0 8px 36px rgba(201,162,39,0.22);
  transform: translateY(-2px);
}

/* Filter row: card-like container */
.filter-row {
  background: var(--card-bg);
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

/* Stat card hover lift */
.stat-card { transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(201,162,39,0.15);
  border-color: rgba(201,162,39,0.35);
}

/* Timeline item hover */
.timeline-item { transition: border-color 0.2s, background 0.18s; }
.timeline-item:hover {
  border-color: rgba(201,162,39,0.4);
  background: linear-gradient(to left, var(--card-bg), var(--gold-dim));
}

/* Exercise section hover when not open */
.exercise-section-header:not(.open):hover {
  background: linear-gradient(to left, var(--card-bg), var(--gold-dim));
}

/* Desire step card hover */
.desire-step-card:hover { border-color: rgba(201,162,39,0.4); box-shadow: 0 4px 20px rgba(201,162,39,0.1); }

/* Focus-visible rings for accessibility */
.tab-btn:focus-visible,
.filter-btn:focus-visible,
.complete-btn:focus-visible,
.today-go-btn:focus-visible,
.today-done-btn:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .hero { flex-direction: column; padding: 28px 20px 20px; text-align: center; }
  .hero-content h1 { font-size: 1.6rem; }
  .formula-card { margin-left: 12px; margin-right: 12px; padding-left: 16px; padding-right: 16px; }
  .principles-tab, .exercises-tab, .flashcards-tab, .summary-tab, .quiz-tab { padding-left: 16px; padding-right: 16px; }
  .emotions-grid { grid-template-columns: 1fr; }
  .tab-nav { padding: 12px 14px; gap: 8px; }
  .tab-btn { padding: 12px 16px; font-size: 0.88rem; }
  .card-sub { display: none; }
  .summary-stats { grid-template-columns: 1fr 1fr; }
  .today-card { flex-direction: column; }
  .today-btns { flex-direction: row; }
  .search-input { min-width: 120px; }
  .resume-btn { font-size: 0.78rem; padding: 5px 10px; }
}

/* ══════════════════════════════════════════════════
   NEW FEATURES CSS
══════════════════════════════════════════════════ */

/* Dark/light smooth transition */
body, .principle-card, .card-body, .card-header, .today-card,
.formula-card, .tab-nav, .tab-btn, .stat-card, .daily-journal,
.export-card, .backup-section, .tgr-notif-section, .fear-card,
.fear-body, .exercise-section-body, .flashcard-face, .quiz-question-card,
.quiz-result-box, .note-input, .journal-input, .desire-input, .search-input {
  transition: background-color 0.28s ease, border-color 0.22s ease, color 0.2s ease,
              box-shadow 0.22s ease;
}

/* Confetti */
.confetti-piece {
  position: fixed;
  top: -24px;
  z-index: 9999;
  pointer-events: none;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* Toast */
.tgr-toast {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(-14px);
  background: var(--card-bg);
  color: var(--text);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 14px 30px;
  font-size: 1rem;
  font-weight: 700;
  z-index: 1000;
  box-shadow: 0 8px 36px rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  white-space: nowrap;
  text-align: center;
}
.tgr-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Streak shield */
.streak-chip.streak-shield {
  background: var(--gold);
  color: #1a1607;
  animation: shieldPulse 2.5s ease infinite;
}
@keyframes shieldPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,162,39,0.5); }
  50%       { box-shadow: 0 0 0 10px rgba(201,162,39,0); }
}

/* Reading time badge */
.readmin-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1px 7px;
  vertical-align: middle;
  margin-right: 6px;
  font-weight: 600;
}

/* Search input */
.search-input {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  color: var(--text);
  font-family: 'Open Sans Hebrew', 'Segoe UI', sans-serif;
  font-size: 0.87rem;
  direction: rtl;
  min-width: 160px;
  margin-right: auto;
}
.search-input:focus { outline: none; border-color: var(--gold); }
.search-input::placeholder { color: var(--text-muted); }

/* Resume button */
.resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: none;
  border: 1.5px solid var(--gold);
  border-radius: 20px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
  margin-top: 8px;
}
.resume-btn:hover { background: var(--gold); color: #1a1607; }

/* Heat map */
.heat-map-wrap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  max-width: 320px;
  margin-bottom: 10px;
}
.heat-day {
  aspect-ratio: 1;
  border-radius: 4px;
  transition: transform 0.15s;
  cursor: default;
}
.heat-day:hover { transform: scale(1.25); }
.heat-0 { background: var(--border); }
.heat-1 { background: rgba(201,162,39,0.4); }
.heat-2 { background: var(--gold); }
.heat-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.heat-legend .heat-day {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Deep read section */
.deep-read-section {
  border-top: 1px solid var(--border);
  margin-top: 14px;
  padding-top: 12px;
}
.deep-read-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 0.84rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
  font-weight: 600;
}
.deep-read-toggle:hover {
  border-color: var(--gold);
  color: var(--text);
  background: var(--gold-dim);
}
.deep-read-body {
  margin-top: 14px;
  padding: 18px 20px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
  border-right: 3px solid var(--gold);
  font-size: 0.88rem;
  line-height: 1.75;
  animation: fadeIn 0.2s ease;
}
.deep-read-body h4 {
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--gold);
  margin: 14px 0 7px;
}
.deep-read-body h4:first-child { margin-top: 0; }
.deep-read-body ol, .deep-read-body ul {
  padding-right: 20px;
  margin-bottom: 10px;
}
.deep-read-body li { margin-bottom: 5px; }
.deep-read-body strong { color: var(--gold); }
.deep-read-body p { margin-bottom: 10px; }
.dr-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.he-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s;
}
.he-link:hover { border-color: var(--gold); background: var(--gold-dim); }

/* ═══════════════════════════════════════════════
   NAV ACTIONS (font size + theme)
═══════════════════════════════════════════════ */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.font-size-btns {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 5px;
}
.font-sz-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 14px;
  padding: 2px 6px;
  font-weight: 700;
  font-family: inherit;
  transition: color 0.15s, background 0.15s;
  line-height: 1;
}
.font-sz-btn:nth-child(1) { font-size: 0.72rem; }
.font-sz-btn:nth-child(2) { font-size: 0.92rem; }
.font-sz-btn:nth-child(3) { font-size: 1.1rem; }
.font-sz-btn.active, .font-sz-btn:hover { color: var(--gold); background: var(--gold-dim); }

/* Font size classes on body */
body.font-sm { font-size: 14px; }
body.font-md { font-size: 16px; }
body.font-lg { font-size: 19px; }

/* ═══════════════════════════════════════════════
   FOCUS TIMER WIDGET
═══════════════════════════════════════════════ */
.focus-timer-widget {
  position: fixed;
  bottom: 72px;
  left: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.focus-timer-toggle {
  background: var(--card-bg);
  border: 1.5px solid var(--gold);
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 2px 12px rgba(201,162,39,0.18);
  transition: background 0.18s, box-shadow 0.18s;
  white-space: nowrap;
}
.focus-timer-toggle:hover { background: var(--gold-dim); box-shadow: 0 4px 20px rgba(201,162,39,0.32); }
.focus-timer-panel {
  background: var(--card-bg);
  border: 1.5px solid var(--gold);
  border-radius: 16px;
  padding: 18px 20px;
  margin-top: 8px;
  min-width: 160px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.22);
  text-align: center;
}
.ft-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}
.ft-display {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 2px;
  line-height: 1;
  margin-bottom: 14px;
}
.ft-actions { display: flex; gap: 8px; justify-content: center; }
.ft-btn { font-size: 0.82rem; padding: 7px 14px; }

/* ═══════════════════════════════════════════════
   ACHIEVEMENTS GRID
═══════════════════════════════════════════════ */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.achievement-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 10px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  opacity: 0.38;
  filter: grayscale(1);
  transition: opacity 0.3s, filter 0.3s, border-color 0.3s, box-shadow 0.3s;
  gap: 5px;
}
.achievement-badge.unlocked {
  opacity: 1;
  filter: none;
  border-color: var(--gold);
  background: var(--gold-dim);
  box-shadow: 0 2px 12px rgba(201,162,39,0.2);
}
.ach-icon { font-size: 1.8rem; line-height: 1; }
.ach-title { font-size: 0.78rem; font-weight: 700; color: var(--text); }
.ach-desc { font-size: 0.68rem; color: var(--text-muted); }

/* ═══════════════════════════════════════════════
   FUTURE LETTER (TIME CAPSULE)
═══════════════════════════════════════════════ */
.future-letter-form { display: flex; flex-direction: column; gap: 12px; }
.fl-desc { font-size: 0.88rem; color: var(--text-muted); margin: 0; }
.fl-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.7;
  resize: vertical;
  direction: rtl;
  box-sizing: border-box;
  transition: border-color 0.18s;
}
.fl-textarea:focus { outline: none; border-color: var(--gold); }
.fl-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fl-label { font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.fl-date-input {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
}
.future-letter-saved {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fl-meta { font-size: 0.78rem; color: var(--gold); font-weight: 700; }
.fl-preview {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
  border-right: 3px solid var(--gold);
  padding-right: 12px;
  line-height: 1.65;
}
.fl-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.fl-full {
  padding: 16px 18px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
  border-right: 3px solid var(--gold);
  animation: fadeIn 0.25s ease;
}
.fl-text {
  font-size: 0.9rem;
  line-height: 1.8;
  white-space: pre-wrap;
}

/* ═══════════════════════════════════════════════
   PRINT CSS
═══════════════════════════════════════════════ */
@media print {
  .top-nav, .tab-nav, .progress-bar-wrap, .scroll-top-btn,
  .focus-timer-widget, .btn-primary, .btn-secondary,
  .export-btns, .backup-btns, .backup-section,
  .tgr-notif-section, .deep-read-toggle, .deep-read-body,
  .filter-row, .today-share-btn, .resume-btn, .journalAIBtn,
  .font-size-btns, .nav-actions .theme-btn { display: none !important; }

  body { background: white !important; color: black !important; font-size: 12pt; }
  .tab-panel { display: block !important; page-break-after: always; }
  .hero { background: none !important; box-shadow: none !important; color: black !important; }
  .principle-card, .today-card, .stat-card, .summary-section { box-shadow: none !important; border: 1px solid #ccc !important; }
  a { color: black !important; text-decoration: underline; }
  .achievements-grid { grid-template-columns: repeat(4, 1fr); }
}
