/* ============================================================
   Kalvium DOJO — Leaderboard site
   Premium dark theme · Space Grotesk + Inter · glass panels
   ============================================================ */

:root {
  --bg: #06080f;
  --bg-soft: #0a0e1a;
  --panel: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.015));
  --panel-hover: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03));
  --border: rgba(255,255,255,0.09);
  --border-strong: rgba(251,191,36,0.45);
  --text: #eef2fa;
  --text-dim: #9aa7bd;
  --text-faint: #64718a;
  --gold: #fbbf24;
  --gold-2: #f59e0b;
  --emerald: #34d399;
  --rose: #fb7185;
  --violet: #a78bfa;
  --cyan: #38bdf8;
  --radius: 18px;
  --shadow: 0 20px 60px -20px rgba(0,0,0,0.7);
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- Aurora background -------------------------------------- */
.bg-aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.35; }
.glow-a { width: 520px; height: 520px; background: radial-gradient(circle, rgba(251,191,36,0.35), transparent 70%); top: -160px; left: -80px; }
.glow-b { width: 620px; height: 620px; background: radial-gradient(circle, rgba(99,102,241,0.30), transparent 70%); top: 8%; right: -180px; }
.glow-c { width: 480px; height: 480px; background: radial-gradient(circle, rgba(52,211,153,0.20), transparent 70%); bottom: -160px; left: 30%; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 40%, transparent 100%);
          mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 40%, transparent 100%);
}

/* ---- Header -------------------------------------------------- */
.site-header {
  max-width: 1240px; margin: 0 auto; padding: 34px 24px 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1a1205;
  box-shadow: 0 8px 24px -6px rgba(251,191,36,0.55);
}
.brand-mark svg { width: 26px; height: 26px; }
.brand h1 {
  font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: 0.2px;
  line-height: 1.1;
}
.dojo-word {
  background: linear-gradient(120deg, var(--gold), #fde68a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tagline { color: var(--text-dim); font-size: 13px; margin-top: 2px; }

.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.live-dot {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase;
  color: var(--emerald);
  border: 1px solid rgba(52,211,153,0.3); background: rgba(52,211,153,0.08);
  padding: 7px 12px; border-radius: 999px;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--emerald);
  box-shadow: 0 0 0 0 rgba(52,211,153,0.6); animation: pulse 2.2s infinite;
}
.me-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  color: #fde68a;
  border: 1px solid rgba(251,191,36,0.4); background: rgba(251,191,36,0.1);
  padding: 7px 12px; border-radius: 999px;
  box-shadow: 0 0 18px -4px rgba(251,191,36,0.45);
}
.me-chip b { color: var(--text); font-weight: 700; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52,211,153,0.55); }
  70% { box-shadow: 0 0 0 9px rgba(52,211,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 13.5px; font-weight: 600;
  padding: 10px 16px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--border); color: var(--text);
  background: var(--panel); transition: transform 0.15s ease, border-color 0.2s, background 0.2s;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-1px); border-color: rgba(255,255,255,0.22); background: var(--panel-hover); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1a1205; border-color: transparent;
  box-shadow: 0 8px 22px -8px rgba(251,191,36,0.6);
}
.btn-primary:hover { filter: brightness(1.05); border-color: transparent; }
.btn-ghost { background: transparent; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---- Layout ---------------------------------------------------- */
.page { max-width: 1240px; margin: 0 auto; padding: 26px 24px 60px; }

.summary {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 22px;
}
.stat-card {
  position: relative; overflow: hidden;
  padding: 18px 20px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--panel);
  box-shadow: var(--shadow);
  opacity: 0; transform: translateY(12px);
  animation: rise 0.5s ease forwards;
}
.stat-card::after {
  content: ''; position: absolute; right: -30px; top: -30px;
  width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent, rgba(251,191,36,0.28)), transparent 70%);
  opacity: 0.5;
}
.stat-label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.7px; text-transform: uppercase; color: var(--text-dim); }
.stat-value {
  font-family: var(--font-display); font-size: 30px; font-weight: 700;
  margin-top: 4px; letter-spacing: 0.2px;
}
.stat-value small { font-size: 15px; font-weight: 600; color: var(--text-dim); margin-left: 2px; }
.stat-foot { font-size: 12px; color: var(--text-faint); margin-top: 2px; }

@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* ---- Panels ---------------------------------------------------- */
.panel {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel); box-shadow: var(--shadow);
  padding: 22px 24px;
  opacity: 0; transform: translateY(14px);
  animation: rise 0.55s ease forwards;
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.panel-head h2 { font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: 0.2px; display: flex; align-items: center; gap: 8px; }
.panel-sub { color: var(--text-dim); font-size: 12.5px; }

.grid {
  display: grid; gap: 18px;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  margin-bottom: 18px;
}
.calendar-panel, .day-panel { animation-delay: 0.05s; }
.day-panel { animation-delay: 0.12s; }
.overall-panel { animation-delay: 0.18s; }

/* ---- Calendar -------------------------------------------------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-title { font-family: var(--font-display); font-size: 16px; font-weight: 600; text-transform: capitalize; }
.cal-nav {
  width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border); background: rgba(255,255,255,0.03);
  color: var(--text); font-size: 18px; line-height: 1;
  transition: all 0.15s;
}
.cal-nav:hover { background: rgba(255,255,255,0.09); border-color: var(--border-strong); }
.cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
  margin-bottom: 8px;
}
.cal-weekdays span { text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-faint); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }

.cal-day {
  position: relative; aspect-ratio: 1 / 1;
  border-radius: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 13.5px; font-weight: 600; color: var(--text-dim);
  border: 1px solid transparent;
  transition: transform 0.14s ease, border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.cal-day:hover { transform: translateY(-2px) scale(1.04); border-color: rgba(255,255,255,0.25); }
.cal-day.dim { opacity: 0.32; }
.cal-day.today { border: 1.5px dashed rgba(251,191,36,0.75); }
.cal-day.selected { border: 2px solid var(--gold); box-shadow: 0 0 0 3px rgba(251,191,36,0.22), 0 8px 20px -6px rgba(251,191,36,0.4); color: var(--text); transform: scale(1.05); }

.heat-0 { background: rgba(255,255,255,0.03); }
.heat-1 { background: rgba(251,191,36,0.16); }
.heat-2 { background: rgba(251,191,36,0.32); }
.heat-3 { background: rgba(251,191,36,0.50); }
.heat-4 { background: linear-gradient(135deg, rgba(251,191,36,0.72), rgba(245,158,11,0.65)); color: #1a1205; }

.cal-day .cnt {
  position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
  font-size: 9px; font-weight: 800; letter-spacing: 0.3px; color: var(--gold);
  opacity: 0.9;
}
.cal-day.heat-4 .cnt { color: #1a1205; }

.cal-legend { display: flex; align-items: center; gap: 7px; justify-content: flex-end; margin-top: 14px; }
.legend-label { font-size: 11px; color: var(--text-faint); }
.heat { width: 16px; height: 16px; border-radius: 5px; border: 1px solid var(--border); }
.heat.heat-0 { background: rgba(255,255,255,0.03); }

/* ---- Day detail ------------------------------------------------- */
.day-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); display: inline-block; box-shadow: 0 0 10px rgba(251,191,36,0.7); }

.day-mini {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 16px;
}
.day-mini .mini {
  border: 1px solid var(--border); border-radius: 12px;
  background: rgba(255,255,255,0.025); padding: 10px 12px;
}
.day-mini .mini b { display: block; font-family: var(--font-display); font-size: 19px; font-weight: 700; }
.day-mini .mini span { font-size: 10.5px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-faint); font-weight: 600; }

.day-board .day-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 12px;
  border: 1px solid transparent; transition: background 0.15s, border-color 0.15s;
}
.day-board .day-row:hover { background: rgba(255,255,255,0.04); border-color: var(--border); }
.day-row .rank {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 9px;
  display: grid; place-items: center; font-family: var(--font-display); font-size: 13px; font-weight: 700;
  background: rgba(255,255,255,0.06); color: var(--text-dim);
}
.day-row.r1 .rank { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1a1205; box-shadow: 0 4px 14px -3px rgba(251,191,36,0.6); }
.day-row.r2 .rank { background: linear-gradient(135deg, #cbd5e1, #94a3b8); color: #0f172a; }
.day-row.r3 .rank { background: linear-gradient(135deg, #d8a47f, #b47a4e); color: #241610; }
.day-row .name { flex: 1 1 auto; min-width: 0; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-row .name small { display: block; font-size: 10.5px; color: var(--text-faint); font-weight: 500; margin-top: 1px; }
.day-row .day-num { text-align: right; font-family: var(--font-display); font-weight: 700; font-size: 16px; min-width: 30px; }
.day-row .day-num .unit { font-size: 10px; color: var(--text-faint); font-weight: 600; margin-left: 2px; }
.day-row .timechip { font-size: 12px; color: var(--text-dim); font-weight: 600; background: rgba(255,255,255,0.05); border: 1px solid var(--border); padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.day-row .skipchip { font-size: 12px; color: var(--rose); background: rgba(251,113,133,0.09); border: 1px solid rgba(251,113,133,0.25); padding: 4px 9px; border-radius: 999px; white-space: nowrap; }

.empty-state { text-align: center; padding: 34px 12px; color: var(--text-dim); }
.empty-orb { font-size: 40px; margin-bottom: 10px; filter: drop-shadow(0 6px 18px rgba(0,0,0,0.5)); }
.empty-state p { font-size: 13.5px; max-width: 300px; margin: 0 auto; }

/* ---- Overall table --------------------------------------------- */
.overall-body { display: grid; gap: 8px; }
.ov-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.02);
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
  animation: rise 0.4s ease forwards; opacity: 0;
}
.ov-row:hover { transform: translateX(4px); background: rgba(255,255,255,0.05); border-color: rgba(251,191,36,0.35); }
.ov-row .rank { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 14px; background: rgba(255,255,255,0.06); color: var(--text-dim); }
.ov-row.r1 .rank, .ov-row.r2 .rank, .ov-row.r3 .rank { color: #111; }
.ov-row.r1 .rank { background: linear-gradient(135deg, #fbbf24, #f59e0b); box-shadow: 0 4px 16px -4px rgba(251,191,36,0.7); }
.ov-row.r2 .rank { background: linear-gradient(135deg, #e2e8f0, #94a3b8); }
.ov-row.r3 .rank { background: linear-gradient(135deg, #d8a47f, #b47a4e); }
.ov-row .avatar { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; color: #0d1220; background: linear-gradient(135deg, #fde68a, #f59e0b); }
.ov-row .who { flex: 1 1 auto; min-width: 0; }
.ov-row .who b { font-size: 14.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-row .who small { font-size: 11.5px; color: var(--text-faint); }
.ov-row .today-chip { font-size: 11px; font-weight: 700; color: var(--gold); background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.3); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.ov-row .streak-chip { font-size: 11px; font-weight: 700; color: var(--violet); background: rgba(167,139,250,0.1); border: 1px solid rgba(167,139,250,0.3); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.ov-row .time-cell { font-size: 12.5px; color: var(--text-dim); font-weight: 600; min-width: 74px; text-align: right; white-space: nowrap; }
.ov-row .solved-cell { font-family: var(--font-display); font-weight: 700; font-size: 18px; min-width: 44px; text-align: right; }
.ov-row .solved-cell .unit { font-size: 10px; color: var(--text-faint); font-weight: 600; }

.empty-msg { text-align: center; padding: 40px 12px; color: var(--text-dim); font-size: 14px; }

/* ---- Today's leaderboard -------------------------------------- */
.today-panel { animation-delay: 0.04s; border-color: rgba(251,191,36,0.28); }
.t-row .today-num { font-family: var(--font-display); font-weight: 700; font-size: 21px; min-width: 62px; text-align: right; white-space: nowrap; }
.t-row .today-num .unit { font-size: 10px; color: var(--text-faint); font-weight: 600; margin-left: 2px; }
.t-row .today-num.hot { color: var(--gold); text-shadow: 0 0 18px rgba(251,191,36,0.45); }
.t-row .today-num.zero { color: var(--text-faint); }

/* ---- 'You' highlight ------------------------------------------ */
.ov-row.me {
  border-color: rgba(251,191,36,0.55);
  background: linear-gradient(90deg, rgba(251,191,36,0.10), rgba(255,255,255,0.03));
  box-shadow: 0 0 0 1px rgba(251,191,36,0.15), 0 8px 28px -10px rgba(251,191,36,0.35);
}
.ov-row.me .who b { color: #fde68a; }
.ov-row.me .avatar { box-shadow: 0 0 0 2px rgba(251,191,36,0.6); }
.me-chip-sm {
  font-size: 11px; font-weight: 800; letter-spacing: 0.3px; text-transform: uppercase;
  color: #1a1205; background: linear-gradient(135deg, #fbbf24, #f59e0b);
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 4px 12px -3px rgba(251,191,36,0.6);
}

/* ---- Footer ----------------------------------------------------- */
.site-footer { text-align: center; padding: 10px 24px 46px; color: var(--text-faint); font-size: 12.5px; }

/* ---- Animations ------------------------------------------------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp 0.5s ease both; }

/* ---- Responsive ------------------------------------------------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
  .site-header { padding-top: 24px; }
}
@media (max-width: 560px) {
  .stat-value { font-size: 24px; }
  .ov-row .streak-chip { display: none; }
  .day-row .timechip { display: none; }
  .day-mini { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}

/* ---- Top navigation ------------------------------------------- */
.topnav {
  max-width: 1240px; margin: 0 auto; padding: 20px 24px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.nav-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text);
  text-decoration: none;
}
.kalvium-mark { width: 26px; height: 26px; color: var(--gold); flex: 0 0 auto; }
.nav-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-link {
  font-size: 13.5px; font-weight: 600; color: var(--text-dim); text-decoration: none;
  padding: 8px 14px; border-radius: 10px; transition: all 0.15s;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--gold); background: rgba(251,191,36,0.1); box-shadow: inset 0 0 0 1px rgba(251,191,36,0.25); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-icon {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  color: var(--text-dim); border: 1px solid var(--border); transition: all 0.15s;
}
.nav-icon:hover { color: var(--text); border-color: var(--border-strong); background: rgba(255,255,255,0.05); transform: translateY(-1px); }
.kalvium-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px 5px 6px;
}
.kalvium-chip .kalvium-mark { width: 20px; height: 20px; color: var(--gold); }
.nav-crumb { font-size: 14px; font-weight: 600; color: var(--text-faint); letter-spacing: 0; }

.made-by { color: var(--text-dim); }
.made-by b { color: var(--gold); }
.kalvium-foot { color: var(--text-dim); font-weight: 700; }

/* ---- Landing page ---------------------------------------------- */
.home { max-width: 1240px; margin: 0 auto; padding: 40px 24px 60px; }
.hero { text-align: center; padding: 46px 10px 26px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--emerald); border: 1px solid rgba(52,211,153,0.3); background: rgba(52,211,153,0.07);
  padding: 8px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero-title {
  font-family: var(--font-display); font-size: clamp(34px, 6vw, 62px); font-weight: 700;
  line-height: 1.08; letter-spacing: -0.5px; max-width: 820px; margin: 0 auto;
}
.grad-text {
  background: linear-gradient(120deg, var(--gold), #fde68a, var(--rose));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--text-dim); font-size: 16.5px; max-width: 640px; margin: 20px auto 0; line-height: 1.65; }
.hero-sub b { color: var(--text); }
.hero-cta { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-stats {
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  margin-top: 40px;
}
.hero-stat {
  min-width: 150px; padding: 16px 22px; border-radius: 16px;
  border: 1px solid var(--border); background: var(--panel);
}
.hero-stat b { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--gold); }
.hero-stat span { font-size: 12px; color: var(--text-faint); letter-spacing: 0.4px; text-transform: uppercase; }

.home-section { margin-top: 56px; }
.section-title {
  font-family: var(--font-display); font-size: 26px; font-weight: 700; text-align: center; margin-bottom: 26px;
}
.feature-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.feature-card {
  padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(251,191,36,0.4); box-shadow: 0 20px 50px -20px rgba(251,191,36,0.25); }
.feature-ico { font-size: 30px; margin-bottom: 12px; }
.feature-card h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.feature-card p { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; }

.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step {
  position: relative; padding: 24px 24px 24px 64px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--panel);
}
.step-num {
  position: absolute; left: 18px; top: 22px; width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; color: #1a1205;
  background: linear-gradient(135deg, #fbbf24, #f59e0b); box-shadow: 0 4px 14px -3px rgba(251,191,36,0.6);
}
.step h3 { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.step p { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; }

.gh-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.gh-cta h3 { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.gh-cta p { color: var(--text-dim); font-size: 14px; margin-top: 4px; max-width: 520px; }
.gh-cta .btn { white-space: nowrap; }

/* ---- Goals page ------------------------------------------------ */
.goals-page { padding-top: 26px; }
.goals-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.goals-title { font-family: var(--font-display); font-size: 30px; font-weight: 700; }
.goals-sub { color: var(--text-dim); font-size: 13.5px; margin-top: 2px; }

.warn-panel { border-color: rgba(251,191,36,0.4); margin-bottom: 18px; }
.warn-panel h3 { font-family: var(--font-display); font-size: 17px; margin-bottom: 6px; }
.warn-panel p { color: var(--text-dim); font-size: 14px; max-width: 620px; margin-bottom: 14px; }

.goal-card { max-width: 720px; margin: 0 auto 18px; }
.goal-set h3, .goal-top h3 { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.goal-hint { color: var(--text-dim); font-size: 13.5px; margin: 4px 0 18px; }
.goal-controls { display: grid; gap: 16px; }
.goal-quick { display: flex; gap: 10px; flex-wrap: wrap; }
.chip-btn {
  min-width: 56px; padding: 12px 16px; font-size: 15px; font-weight: 700; font-family: var(--font-display);
  border-radius: 12px; cursor: pointer; color: var(--text); border: 1px solid var(--border);
  background: rgba(255,255,255,0.04); transition: all 0.15s;
}
.chip-btn:hover { border-color: var(--border-strong); background: rgba(251,191,36,0.12); transform: translateY(-2px); }
.goal-custom { display: flex; gap: 10px; flex-wrap: wrap; }
.goal-input, #goal-input {
  flex: 1 1 160px; min-width: 0; padding: 12px 14px; font-size: 15px; font-weight: 600;
  border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,0.04);
  color: var(--text); font-family: var(--font-body);
}
.goal-input:focus, #goal-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(251,191,36,0.15); }

.goal-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.goal-top b { color: var(--gold); }
.progress-track {
  height: 16px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
}
.progress-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  box-shadow: 0 0 18px rgba(251,191,36,0.5);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.progress-fill.complete {
  background: linear-gradient(90deg, #34d399, #10b981);
  box-shadow: 0 0 20px rgba(52,211,153,0.55);
}
.progress-labels { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 13.5px; color: var(--text-dim); }
.progress-labels b { color: var(--text); font-family: var(--font-display); }
.prog-remaining { color: var(--gold); font-weight: 600; }
.goal-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.fact { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; background: rgba(255,255,255,0.02); }
.fact b { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--gold); }
.fact span { font-size: 11px; color: var(--text-faint); letter-spacing: 0.4px; text-transform: uppercase; font-weight: 600; }

.done-card {
  max-width: 720px; margin: 0 auto; text-align: center; padding: 44px 28px;
  border-color: rgba(52,211,153,0.5);
  box-shadow: 0 0 60px -12px rgba(52,211,153,0.35);
  animation: pulse-done 2s ease-in-out infinite;
}
@keyframes pulse-done {
  0%, 100% { box-shadow: 0 0 60px -12px rgba(52,211,153,0.35); }
  50% { box-shadow: 0 0 80px -10px rgba(52,211,153,0.55); }
}
.done-orb { font-size: 64px; margin-bottom: 14px; animation: bounce-orb 1.4s ease infinite; }
@keyframes bounce-orb {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.08); }
}
.done-card h2 { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--emerald); }
.done-card p { color: var(--text-dim); font-size: 14.5px; max-width: 440px; margin: 8px auto 22px; }
.done-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* ---- Confetti --------------------------------------------------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.confetti span {
  position: absolute; top: -18px; border-radius: 2px; opacity: 0;
  animation: fall 2.8s ease-in forwards;
}
@keyframes fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0.4; }
}

/* ---- Responsive additions -------------------------------------- */
@media (max-width: 560px) {
  .goal-facts { grid-template-columns: 1fr; }
  .hero-stats { gap: 10px; }
  .hero-stat { min-width: 130px; }
  .nav-brand span { display: none; }
}

/* ---- Our Contributors ----------------------------------------- */
.section-sub {
  max-width: 620px;
  margin: -8px auto 30px;
  text-align: center;
  color: var(--text-dim);
  font-size: 15px;
}
.contrib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 760px;
  margin: 0 auto 30px;
}
.contrib-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.contrib-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}
.contrib-avatar {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700; font-size: 26px;
  color: #1a1205;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 10px 26px -8px rgba(251,191,36,0.55);
}
.contrib-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}
.contrib-role {
  color: var(--text-dim);
  font-size: 13.5px;
  min-height: 40px;
  margin-bottom: 14px;
}
.contrib-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.contrib-link:hover {
  border-color: var(--border-strong);
  background: rgba(255,255,255,0.08);
}
.contrib-cta {
  text-align: center;
}
.contrib-hint {
  margin-top: 10px;
  color: var(--text-faint);
  font-size: 13px;
}

/* ---- Contributor survey modal --------------------------------- */
.survey-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 6, 12, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.survey-overlay[hidden] { display: none; }
.survey-modal {
  position: relative;
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #10162a, #0a0e1a);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 30px 28px 24px;
  box-shadow: var(--shadow), 0 0 40px rgba(251,191,36,0.12);
}
.survey-modal h3 {
  font-family: var(--font-display);
  font-size: 22px;
  margin-bottom: 4px;
}
.survey-made {
  color: var(--text-faint);
  font-size: 12.5px;
  margin-bottom: 20px;
}
.survey-x {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
}
.survey-x:hover { border-color: var(--border-strong); color: var(--text); }
.survey-q {
  display: block;
  margin: 14px 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}
.survey-choice {
  display: flex;
  gap: 16px;
  margin-bottom: 4px;
}
.survey-choice label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  color: var(--text);
}
.survey-input {
  width: 100%;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.045);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease;
}
.survey-input:focus { border-color: var(--border-strong); }
.survey-input::placeholder { color: var(--text-faint); }
#name-select option {
  background: #0a0e1a;
  color: var(--text);
}
.survey-input[type="text"], .survey-input:not(select) { margin-bottom: 2px; }
.survey-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}
.survey-actions .btn { flex: 1; justify-content: center; }
