@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Nunito:wght@300;400;500;600;700&display=swap');

:root {
  --sage:        #6B9E70;
  --sage-light:  #A8C5AC;
  --sage-dark:   #4A7A50;
  --sage-pale:   #EFF5F0;
  --cream:       #FAF6F0;
  --warm-white:  #FDFBF8;
  --clay:        #C4856A;
  --clay-light:  #F0D5C8;
  --clay-pale:   #FDF4F0;
  --gold:        #C9A96E;
  --gold-pale:   #FBF4E8;
  --charcoal:    #2C2C2C;
  --mid:         #555555;
  --light:       #888888;
  --border:      #E4DDD5;
  --border-soft: #EDE8E2;
  --shadow:      0 2px 16px rgba(74,122,80,0.08);
  --shadow-md:   0 4px 32px rgba(74,122,80,0.12);
  --radius:      16px;
  --radius-sm:   10px;
  --radius-lg:   24px;

  /* LARGE TYPE FOR 60+ ACCESSIBILITY */
  --text-base:   18px;
  --text-sm:     16px;
  --text-xs:     15px;
  --text-lg:     20px;
  --text-xl:     24px;
  --text-2xl:    30px;
  --text-3xl:    38px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.7;
  font-size: var(--text-base);
}

h1, h2, h3, h4 {
  font-family: 'Lora', serif;
  font-weight: 500;
  line-height: 1.3;
}

a { color: var(--sage-dark); text-decoration: underline; }
a:hover { color: var(--sage); }

/* NAV */
.nav {
  position: sticky;
  top: 0;
  background: rgba(250,246,240,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--border);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}

.nav-logo {
  font-family: 'Lora', serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--sage-dark);
  text-decoration: none;
}

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

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
  list-style: none;
}

.nav-links a {
  font-size: var(--text-sm);
  color: var(--mid);
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1.5px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.nav-links a:hover {
  background: var(--sage-pale);
  border-color: var(--sage-light);
  color: var(--sage-dark);
}

.nav-links a.active {
  background: var(--sage-dark);
  color: white;
  border-color: var(--sage-dark);
}

/* BUTTONS — large tap targets */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  font-family: 'Nunito', sans-serif;
  font-size: var(--text-base);
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  min-height: 52px;
  letter-spacing: 0.2px;
}

.btn-primary { background: var(--sage-dark); color: white; }
.btn-primary:hover { background: var(--sage); color: white; text-decoration: none; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(74,122,80,0.25); }

.btn-secondary { background: white; color: var(--sage-dark); border: 2px solid var(--sage-light); }
.btn-secondary:hover { background: var(--sage-pale); text-decoration: none; transform: translateY(-1px); }

.btn-clay { background: var(--clay); color: white; }
.btn-clay:hover { background: #B5735A; color: white; text-decoration: none; transform: translateY(-1px); }

.btn-lg { padding: 17px 36px; font-size: var(--text-lg); }
.btn-sm { padding: 10px 20px; font-size: var(--text-sm); min-height: 44px; }

/* CARDS */
.card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

/* INPUTS — large and easy to tap */
input, textarea, select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-size: var(--text-base);
  color: var(--charcoal);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  min-height: 52px;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 4px rgba(107,158,112,0.12);
}

label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--mid);
  margin-bottom: 8px;
}

.form-group { margin-bottom: 20px; }

/* BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: var(--text-xs);
  font-weight: 700;
}

.badge-sage { background: var(--sage-pale); color: var(--sage-dark); }
.badge-clay { background: var(--clay-pale); color: var(--clay); }
.badge-gold { background: var(--gold-pale); color: #9A7440; }

/* TOAST */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--charcoal);
  color: white;
  padding: 16px 28px;
  border-radius: 100px;
  font-size: var(--text-base);
  font-weight: 600;
  z-index: 999;
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-md);
  max-width: 90vw;
  text-align: center;
}

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

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44,44,44,0.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--warm-white);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-md);
  transform: translateY(16px);
  transition: transform 0.25s;
  position: relative;
}

.modal-overlay.open .modal { transform: translateY(0); }

/* DIVIDER */
.divider { border: none; border-top: 1px solid var(--border); margin: 28px 0; }

/* DISCLAIMER BAR */
.disclaimer-bar {
  background: var(--sage-pale);
  border-top: 2px solid var(--sage-light);
  padding: 14px 32px;
  font-size: var(--text-xs);
  color: var(--mid);
  text-align: center;
  line-height: 1.6;
}

/* UTILITIES */
.text-center { text-align: center; }
.text-mid { color: var(--mid); }
.text-sage { color: var(--sage-dark); }

@media (max-width: 768px) {
  .nav { padding: 12px 20px; }
  .nav-links { display: none; }
  :root { --text-base: 17px; }
}

/* ── MOBILE BOTTOM NAV ───────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 2px solid var(--border);
  z-index: 100;
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

.mobile-nav-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  min-width: 52px;
  text-decoration: none;
  color: var(--light);
  font-family: 'Nunito', sans-serif;
  font-size: 11px;
  font-weight: 700;
  border: none;
  background: none;
  cursor: pointer;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.mobile-nav-item.active { color: var(--sage-dark); }
.mobile-nav-item:hover { color: var(--sage-dark); text-decoration: none; }

.mobile-nav-item.admin-item { color: var(--clay); }

/* Push page content up so bottom nav does not cover it */
.mobile-nav-spacer { height: 80px; }

@media (max-width: 768px) {
  .mobile-nav { display: block; }
  body { padding-bottom: 0; }
}

/* Hamburger for pages folder nav on mobile - shows menu icon in top nav */
.nav-hamburger {
  display: none;
  background: none;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--mid);
  font-size: 20px;
  line-height: 1;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
}

/* Mobile slide-down menu */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(44,44,44,0.5);
  z-index: 150;
  backdrop-filter: blur(2px);
}

.mobile-menu-overlay.open { display: block; }

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(300px, 85vw);
  background: var(--warm-white);
  z-index: 200;
  padding: 24px 20px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
}

.mobile-menu-overlay.open .mobile-menu {
  transform: translateX(0);
}

.mobile-menu-close {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.mobile-menu-close button {
  background: none;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 18px;
  cursor: pointer;
  color: var(--mid);
  min-height: 44px;
  min-width: 44px;
}

.mobile-menu-links { list-style: none; }

.mobile-menu-links a,
.mobile-menu-links button {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 12px;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--charcoal);
  text-decoration: none;
  border-bottom: 1px solid var(--border-soft);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  border-radius: 0;
  min-height: 56px;
}

.mobile-menu-links a:hover,
.mobile-menu-links button:hover {
  background: var(--sage-pale);
  color: var(--sage-dark);
  text-decoration: none;
}

.mobile-menu-links a.active { color: var(--sage-dark); }
.mobile-menu-links svg { width: 22px; height: 22px; flex-shrink: 0; }
.mobile-menu-logo {
  font-family: 'Lora', serif;
  font-size: 22px;
  color: var(--sage-dark);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.mobile-menu-logo span { color: var(--clay); }


/* Dashboard SVG icon replacements */
.nav-icon {
  display: inline-block;
  width: 32px;
  height: 32px;
  vertical-align: middle;
  margin-bottom: 4px;
}

.action-card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: block;
}

.milestone-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

/* Remove emoji fallback sizing issues */
.txn-icon, .pillar-icon, .learn-emoji {
  font-size: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
