/* ============================================================
   CLEANWEALTH — ISLAMIC FINANCE CALCULATOR
   style.css  |  Day Mode Only
   Palette  : Deep forest green · Ivory · Warm gold · Slate
   Typeface : Cormorant Garamond (display) + Inter (body) + Amiri (Arabic/Urdu)
   Author   : Saqib Khan  |  linkedin.com/in/saqibzahoor
============================================================ */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  /* Green scale */
  --g-900: #0b3322;
  --g-800: #17543a;
  --g-700: #1e6b49;
  --g-600: #268a5e;
  --g-500: #30a872;
  --g-400: #52c28d;
  --g-200: #b7e4cc;
  --g-100: #e4f5ec;
  --g-50 : #f2faf5;

  /* Gold scale */
  --au-700: #a07818;
  --au-500: #c9a020;
  --au-400: #e0b830;
  --au-100: #fdf3d0;

  /* Neutral scale */
  --n-900: #18202e;
  --n-700: #2d3748;
  --n-500: #4a5568;
  --n-400: #718096;
  --n-300: #a0aec0;
  --n-200: #cbd5e0;
  --n-100: #edf2f7;
  --n-50 : #f7f9fc;

  /* Base */
  --ivory  : #fafaf6;
  --white  : #ffffff;
  --error  : #dc2626;
  --success: #16a34a;

  /* Shadows */
  --sh-xs: 0 1px 3px rgba(11,51,34,.07);
  --sh-sm: 0 2px 8px rgba(11,51,34,.08);
  --sh-md: 0 4px 20px rgba(11,51,34,.10);
  --sh-lg: 0 8px 40px rgba(11,51,34,.13);

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;

  /* Easing */
  --ease: .22s cubic-bezier(.4,0,.2,1);
}

/* ── RESET ──────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--ivory);
  color: var(--n-900);
  min-height: 100vh;
  line-height: 1.65;
  overflow-x: hidden;
}

/* ── ARABESQUE WATERMARK ────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  top: -40px;
  right: -40px;
  width: 520px;
  height: 520px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%231e6b49' stroke-width='.55' opacity='.12'%3E%3Cpolygon points='100,8 122,40 158,40 132,62 143,96 100,74 57,96 68,62 42,40 78,40'/%3E%3Cpolygon points='100,28 116,52 144,52 124,68 132,92 100,78 68,92 76,68 56,52 84,52'/%3E%3Ccircle cx='100' cy='100' r='62'/%3E%3Ccircle cx='100' cy='100' r='46'/%3E%3Ccircle cx='100' cy='100' r='30'/%3E%3Cline x1='100' y1='8'  x2='100' y2='192'/%3E%3Cline x1='8'   y1='100' x2='192' y2='100'/%3E%3Cline x1='28' y1='28'  x2='172' y2='172'/%3E%3Cline x1='172' y1='28' x2='28'  y2='172'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 0;
}

/* ══════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════ */
.header {
  background: linear-gradient(135deg, var(--g-900) 0%, var(--g-800) 55%, var(--g-700) 100%);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--sh-md);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--au-500), var(--au-400));
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 2px 10px rgba(201,160,32,.45);
  color: white;
  font-style: normal;
}

.logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .02em;
}

.logo-text span { color: var(--au-400); }

.header-tagline {
  font-size: .78rem;
  color: rgba(255,255,255,.55);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════ */
.hero {
  background: linear-gradient(135deg, var(--g-900), var(--g-800));
  padding: 56px 24px 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: 'بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ';
  font-family: 'Amiri', serif;
  font-size: 1rem;
  color: rgba(255,255,255,.15);
  position: absolute;
  bottom: 14px;
  right: 22px;
  letter-spacing: .06em;
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 14px;
}

.hero-title .accent { color: var(--au-400); }

.hero-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,.72);
  max-width: 540px;
  margin: 0 auto;
}

/* ══════════════════════════════════════════════════════════
   NAV TABS
══════════════════════════════════════════════════════════ */
.nav-tabs {
  background: var(--white);
  border-bottom: 1px solid var(--n-100);
  position: sticky;
  top: 68px;
  z-index: 999;
  box-shadow: var(--sh-xs);
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-tabs::-webkit-scrollbar { display: none; }

.nav-tabs-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  padding: 0 16px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 16px;
  font-size: .83rem;
  font-weight: 500;
  color: var(--n-500);
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--ease), border-color var(--ease);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: 'Inter', sans-serif;
}

.nav-tab:hover    { color: var(--g-600); }
.nav-tab.active   { color: var(--g-700); border-bottom-color: var(--au-500); font-weight: 600; }

/* ══════════════════════════════════════════════════════════
   CONTAINER / SECTIONS
══════════════════════════════════════════════════════════ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.section {
  display: none;
  padding: 40px 0 72px;
  animation: fadeUp .28s ease both;
}

.section.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── SECTION HEADER ── */
.section-header   { margin-bottom: 32px; }

.section-eyebrow {
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--g-600);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-eyebrow::after {
  content: '';
  flex: 1;
  max-width: 72px;
  height: 1px;
  background: var(--g-200);
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--n-900);
  line-height: 1.22;
}

.section-desc {
  font-size: .93rem;
  color: var(--n-500);
  margin-top: 8px;
  max-width: 580px;
}

/* ══════════════════════════════════════════════════════════
   DASHBOARD GRID
══════════════════════════════════════════════════════════ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 8px;
}

.dash-card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 26px 22px;
  cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
  box-shadow: var(--sh-sm);
  border: 1.5px solid transparent;
  position: relative;
  overflow: hidden;
}

.dash-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--g-600), var(--au-400));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ease);
}

.dash-card:hover              { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: var(--g-100); }
.dash-card:hover::before      { transform: scaleX(1); }

.dash-card-icon {
  width: 50px; height: 50px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}
.dash-card-icon.green { background: var(--g-100); }
.dash-card-icon.gold  { background: var(--au-100); }
.dash-card-icon.slate { background: var(--n-100); }

.dash-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--n-900);
  margin-bottom: 6px;
}

.dash-card-desc {
  font-size: .82rem;
  color: var(--n-500);
  line-height: 1.55;
}

.dash-card-arrow {
  position: absolute;
  right: 20px; top: 50%;
  transform: translateY(-50%);
  color: var(--g-400);
  font-size: 17px;
  opacity: 0;
  transition: opacity var(--ease), right var(--ease);
}

.dash-card:hover .dash-card-arrow { opacity: 1; right: 14px; }

/* ══════════════════════════════════════════════════════════
   CALCULATOR CARD
══════════════════════════════════════════════════════════ */
.calc-card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 32px;
  box-shadow: var(--sh-md);
  border: 1px solid rgba(38,138,94,.07);
  margin-bottom: 24px;
}

.calc-subheading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 18px;
}
.calc-subheading.green { color: var(--g-700); }
.calc-subheading.red   { color: var(--error); }

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group.full { grid-column: 1 / -1; }

label {
  font-size: .82rem;
  font-weight: 500;
  color: var(--n-700);
}

input[type="number"],
input[type="text"],
select {
  background: var(--n-50);
  border: 1.5px solid var(--n-200);
  border-radius: var(--r-sm);
  padding: 10px 13px;
  font-size: .93rem;
  color: var(--n-900);
  font-family: 'Inter', sans-serif;
  width: 100%;
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }

input:focus, select:focus {
  border-color: var(--g-600);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(38,138,94,.12);
}

.field-hint {
  font-size: .74rem;
  color: var(--n-400);
  margin-top: 2px;
}

.step-desc {
  font-size: .88rem;
  color: var(--n-500);
  margin-bottom: 4px;
}

.divider {
  height: 1px;
  background: var(--n-100);
  margin: 22px 0;
}

/* ── METHOD TOGGLE (Nisab) ── */
.method-toggle {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.method-btn {
  flex: 1;
  min-width: 180px;
  padding: 12px 20px;
  border-radius: var(--r-md);
  border: 2px solid var(--n-200);
  background: var(--white);
  color: var(--n-700);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--ease);
  font-family: 'Inter', sans-serif;
  text-align: center;
}

.method-btn:hover  { border-color: var(--g-400); color: var(--g-700); background: var(--g-50); }
.method-btn.active { border-color: var(--g-600); background: var(--g-100); color: var(--g-800); }

/* ══════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 24px;
  border-radius: var(--r-sm);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--ease);
  border: none;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--g-700), var(--g-600));
  color: #fff;
  box-shadow: 0 2px 8px rgba(30,107,73,.32);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--g-800), var(--g-700));
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(30,107,73,.42);
}

.btn-ghost {
  background: transparent;
  color: var(--g-700);
  border: 1.5px solid var(--g-200);
}
.btn-ghost:hover { background: var(--g-50); border-color: var(--g-400); }

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--g-700);
  font-size: .86rem;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 22px;
  padding: 5px 0;
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  transition: color var(--ease);
}
.back-btn:hover { color: var(--g-900); }

/* ══════════════════════════════════════════════════════════
   RESULT CARD
══════════════════════════════════════════════════════════ */
.result-card {
  background: linear-gradient(135deg, var(--g-900), var(--g-800));
  border-radius: var(--r-lg);
  padding: 28px;
  color: #fff;
  margin-top: 0;
  margin-bottom: 24px;
  display: none;
  animation: fadeUp .28s ease both;
}

.result-card.visible { display: block; }

.result-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--au-400);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.result-item {
  padding: 11px 15px;
  background: rgba(255,255,255,.08);
  border-radius: var(--r-sm);
}

.result-item-label {
  font-size: .72rem;
  color: rgba(255,255,255,.58);
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.result-item-value {
  font-size: 1.18rem;
  font-weight: 600;
  color: #fff;
}

.result-main {
  background: linear-gradient(135deg, var(--au-700), var(--au-500));
  border-radius: var(--r-md);
  padding: 18px 20px;
  text-align: center;
}

.result-main-label { font-size: .78rem; color: rgba(255,255,255,.8); margin-bottom: 4px; }
.result-main-value { font-size: 1.9rem; font-weight: 700; color: #fff; font-family: 'Cormorant Garamond', serif; }

.result-badge-row {
  text-align: center;
  margin-top: 14px;
}

.result-explanation {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,.08);
  border-radius: var(--r-sm);
  font-size: .86rem;
  color: rgba(255,255,255,.82);
  line-height: 1.55;
}

/* ── ELIGIBILITY BADGES ── */
.elig-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 24px;
  font-weight: 600;
  font-size: .92rem;
}

.elig-yes { background: rgba(22,163,74,.18); color: #4ade80; border: 1.5px solid rgba(22,163,74,.4); }
.elig-no  { background: rgba(220,38,38,.18); color: #f87171; border: 1.5px solid rgba(220,38,38,.4); }

/* ── PROGRESS BAR ── */
.progress-label-row {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: rgba(255,255,255,.5);
  margin: 12px 0 4px;
}

.progress-bar-wrap {
  background: rgba(255,255,255,.15);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--g-500), var(--au-400));
  border-radius: 99px;
  transition: width .45s ease;
}

/* ══════════════════════════════════════════════════════════
   INFO NOTE
══════════════════════════════════════════════════════════ */
.info-note {
  background: var(--au-100);
  border: 1px solid rgba(201,160,32,.22);
  border-radius: var(--r-sm);
  padding: 11px 15px;
  font-size: .82rem;
  color: var(--au-700);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.55;
}

/* ══════════════════════════════════════════════════════════
   ISLAMIC REFERENCE BOX
══════════════════════════════════════════════════════════ */
.islamic-ref-box {
  background: var(--g-50);
  border-left: 3.5px solid var(--au-500);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.ref-header {
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--g-700);
  margin-bottom: 6px;
}

.ref-ayah-id {
  font-family: 'Amiri', serif;
  font-size: 1rem;
  color: var(--au-700);
  margin-bottom: 8px;
  direction: rtl;
  text-align: right;
}

.ref-urdu {
  font-family: 'Amiri', serif;
  font-size: 1.22rem;
  color: var(--n-700);
  direction: rtl;
  text-align: right;
  line-height: 2.1;
}

/* ══════════════════════════════════════════════════════════
   QURBANI STEPS
══════════════════════════════════════════════════════════ */
.steps {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 17px; left: 16px; right: 16px;
  height: 2px;
  background: var(--n-100);
}

.step-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  position: relative;
}

.step-dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--n-100);
  border: 2px solid var(--n-200);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700;
  color: var(--n-400);
  transition: var(--ease);
  position: relative; z-index: 1;
}

.step-item.done   .step-dot { background: var(--g-700); border-color: var(--g-700); color: #fff; }
.step-item.active .step-dot { background: #fff; border-color: var(--g-700); color: var(--g-700); box-shadow: 0 0 0 4px rgba(30,107,73,.14); }

.step-label {
  font-size: .7rem;
  color: var(--n-400);
  font-weight: 500;
  text-align: center;
}

/* ── ANIMAL GRID ── */
.animal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

.animal-card {
  border: 2px solid var(--n-200);
  border-radius: var(--r-md);
  padding: 18px 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--ease);
  background: var(--white);
}

.animal-card:hover,
.animal-card.selected {
  border-color: var(--g-600);
  background: var(--g-50);
}

.animal-emoji  { font-size: 2rem; margin-bottom: 8px; }
.animal-name   { font-size: .88rem; font-weight: 700; color: var(--n-900); margin-bottom: 5px; }
.animal-badge  {
  display: inline-block;
  background: var(--g-100);
  color: var(--g-700);
  font-size: .7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  margin-bottom: 4px;
}
.animal-rule   { font-size: .72rem; color: var(--n-400); }

.selected-animal-info {
  background: var(--g-100);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: .86rem;
  font-weight: 600;
  color: var(--g-800);
  margin-bottom: 4px;
}

/* ══════════════════════════════════════════════════════════
   KNOWLEDGE CENTER
══════════════════════════════════════════════════════════ */
.knowledge-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding: 4px;
  background: var(--n-100);
  border-radius: var(--r-md);
  width: fit-content;
}

.k-tab {
  padding: 8px 20px;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-size: .86rem;
  font-weight: 600;
  color: var(--n-500);
  cursor: pointer;
  transition: var(--ease);
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}

.k-tab:hover  { color: var(--g-700); background: rgba(255,255,255,.7); }
.k-tab.active { background: var(--white); color: var(--g-800); box-shadow: var(--sh-xs); }

.k-panel      { display: none; animation: fadeUp .25s ease both; }
.k-panel.active { display: block; }

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 4px;
}

.knowledge-card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--sh-sm);
  border: 1px solid var(--g-100);
  transition: transform var(--ease), box-shadow var(--ease);
}

.knowledge-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }

.k-icon  { font-size: 1.8rem; margin-bottom: 10px; }

.k-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--n-900);
  margin-bottom: 7px;
}

.k-body {
  font-size: .84rem;
  color: var(--n-500);
  line-height: 1.62;
}

/* ══════════════════════════════════════════════════════════
   HIJRI CALENDAR
══════════════════════════════════════════════════════════ */
.hijri-hero {
  background: linear-gradient(135deg, var(--g-900), var(--g-800));
  border-radius: var(--r-lg);
  padding: 36px;
  text-align: center;
  color: #fff;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.hijri-label       { font-size: .75rem; color: rgba(255,255,255,.5); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.hijri-date-main   { font-family: 'Cormorant Garamond', serif; font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; color: var(--au-400); line-height: 1.2; margin-bottom: 6px; }
.hijri-date-greg   { font-size: .95rem; color: rgba(255,255,255,.7); }
.hijri-date-arabic { font-family: 'Amiri', serif; font-size: 1.3rem; color: rgba(255,255,255,.28); margin-top: 10px; direction: rtl; }

/* ── Month Navigation ── */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border-radius: var(--r-md);
  padding: 14px 20px;
  margin-bottom: 16px;
  box-shadow: var(--sh-sm);
  border: 1px solid var(--n-100);
}

.cal-nav-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--n-200);
  background: var(--n-50);
  color: var(--n-700);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--ease);
  font-family: 'Inter', sans-serif;
}
.cal-nav-btn:hover { background: var(--g-100); border-color: var(--g-400); color: var(--g-700); }

.cal-month-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--g-800);
  text-align: center;
}

/* ── Calendar Grid ── */
.cal-grid-wrap {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--sh-sm);
  border: 1px solid var(--n-100);
  margin-bottom: 24px;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.cal-weekdays div {
  text-align: center;
  font-size: .74rem;
  font-weight: 700;
  color: var(--n-400);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 0;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  font-size: .84rem;
  font-weight: 500;
  color: var(--n-700);
  cursor: pointer;
  transition: var(--ease);
  position: relative;
  min-height: 40px;
}

.cal-day:hover              { background: var(--g-100); color: var(--g-800); }
.cal-day.today              { background: var(--g-700); color: #fff; font-weight: 700; }
.cal-day.today:hover        { background: var(--g-800); }
.cal-day.empty              { pointer-events: none; }
.cal-day .day-event-dot     { width: 5px; height: 5px; border-radius: 50%; background: var(--au-500); position: absolute; bottom: 4px; }

/* ── Sub heading ── */
.sub-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--n-900);
  margin-bottom: 14px;
}

/* ── Countdowns ── */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.countdown-card {
  background: var(--white);
  border-radius: var(--r-md);
  padding: 18px;
  text-align: center;
  box-shadow: var(--sh-sm);
  border: 1px solid var(--g-100);
}

.countdown-days  { font-family: 'Cormorant Garamond', serif; font-size: 2.4rem; font-weight: 700; color: var(--g-700); line-height: 1; margin-bottom: 4px; }
.countdown-emoji { font-size: 1.6rem; margin-bottom: 6px; }
.countdown-label { font-size: .78rem; color: var(--n-500); font-weight: 500; }

/* ── Events ── */
.events-list { display: flex; flex-direction: column; gap: 10px; }

.event-item {
  background: var(--white);
  border-radius: var(--r-md);
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--sh-xs);
  border: 1px solid var(--n-100);
  transition: box-shadow var(--ease);
}

.event-item:hover          { box-shadow: var(--sh-sm); }
.event-icon                { font-size: 1.5rem; }
.event-info-name           { font-weight: 600; color: var(--n-900); font-size: .93rem; }
.event-info-date           { font-size: .78rem; color: var(--n-400); margin-top: 2px; }
.event-days                { margin-left: auto; text-align: right; white-space: nowrap; }
.event-days-num            { font-size: 1.1rem; font-weight: 700; color: var(--g-700); }
.event-days-label          { font-size: .68rem; color: var(--n-300); }
.event-days-num.past       { color: var(--n-300); }

/* ══════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════ */
footer {
  background: var(--g-900);
  color: rgba(255,255,255,.65);
  text-align: center;
  padding: 32px 20px;
  margin-top: 60px;
  position: relative;
  z-index: 1;
}

.footer-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.footer-brand span { color: var(--au-400); }

.footer-by     { font-size: .82rem; margin-bottom: 4px; }
.footer-author { font-size: 1rem; margin-bottom: 6px; }

footer a {
  color: var(--au-400);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .04em;
  transition: color var(--ease);
}

footer a:hover { color: #f0d060; text-decoration: underline; }

.footer-note {
  font-size: .72rem;
  opacity: .45;
  margin-top: 8px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ══════════════════════════════════════════════════════════
   UTILITIES
══════════════════════════════════════════════════════════ */
.hidden      { display: none !important; }
.mt-4        { margin-top: 16px; }
.mt-6        { margin-top: 24px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar        { width: 5px; height: 5px; }
::-webkit-scrollbar-track  { background: transparent; }
::-webkit-scrollbar-thumb  { background: var(--g-400); border-radius: 3px; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .hero        { padding: 40px 20px 56px; }
  .section     { padding: 24px 0 48px; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .nav-tab     { padding: 12px 11px; font-size: .76rem; }
  .calc-card   { padding: 22px; }
  .header-tagline { display: none; }
}

@media (max-width: 640px) {
  .calc-grid      { grid-template-columns: 1fr; }
  .result-grid    { grid-template-columns: 1fr; }
  .knowledge-tabs { width: 100%; }
  .k-tab          { flex: 1; padding: 8px 12px; font-size: .78rem; }
}

@media (max-width: 480px) {
  .dashboard-grid   { grid-template-columns: 1fr; }
  .knowledge-grid   { grid-template-columns: 1fr; }
  .countdown-grid   { grid-template-columns: 1fr 1fr; }
  .animal-grid      { grid-template-columns: 1fr 1fr; }
  .method-toggle    { flex-direction: column; }
}

/* ── ACCESSIBILITY ── */
@media (prefers-contrast: high) {
  :root { --sh-sm: 0 0 0 1px #000; --sh-md: 0 0 0 2px #000; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}