/* PrayFi — design system
   Palette: warm ivory + gold + deep charcoal.
   Inspired by Protestant church minimalism with a modern, golden glow. */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* surfaces */
  --bg:          #FAF6EC;
  --bg-deep:     #F2EAD8;
  --surface:     #FFFFFF;
  --surface-2:   #FBF6E8;
  --surface-3:   #F0E7CF;

  /* text */
  --ink:         #1B1714;
  --ink-2:       #3A332B;
  --ink-3:       #5C5447;
  --ink-muted:   #8C8273;

  /* borders */
  --border:      #E5DABE;
  --border-soft: #F0E7CF;
  --border-strong: #C9B98F;

  /* gold */
  --gold-1:      #E5C158;   /* bright */
  --gold-2:      #C9A04A;   /* primary */
  --gold-3:      #9B7724;   /* deep */
  --gold-4:      #7A5A14;   /* darkest */
  --gold-soft:   rgba(229, 193, 88, 0.18);
  --gold-glow:   rgba(229, 193, 88, 0.42);

  /* semantic */
  --success:     #3F6B4A;
  --success-bg:  #E6EFE2;
  --danger:      #9A3A30;
  --danger-bg:   #F4E3E0;
  --info:        #3E5C7A;
  --info-bg:     #E2E9F0;
  --warn:        #A87C28;
  --warn-bg:     #F5E9CC;

  /* type */
  --serif:  'Cormorant Garamond', 'EB Garamond', Georgia, 'Times New Roman', serif;
  --sans:   'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --mono:   'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* radii / shadow */
  --r-sm:  6px;
  --r:     10px;
  --r-lg:  16px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(28, 22, 12, 0.05);
  --shadow:    0 4px 18px -8px rgba(82, 60, 14, 0.18), 0 1px 3px rgba(28, 22, 12, 0.04);
  --shadow-lg: 0 20px 50px -20px rgba(82, 60, 14, 0.28), 0 4px 12px rgba(28, 22, 12, 0.06);
  --glow:      0 0 0 1px rgba(229, 193, 88, 0.35), 0 0 32px -4px var(--gold-glow);

  /* layout */
  --maxw: 1120px;
  --gutter: 24px;
}

/* reset-ish */
*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  /* subtle paper texture */
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(229, 193, 88, 0.10), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(201, 160, 74, 0.08), transparent 60%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--gold-3); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--gold-4); }

h1,h2,h3,h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.06; }
h2 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1.15; }
h3 { font-size: 1.25rem; line-height: 1.25; }
p  { margin: 0 0 1rem; }

img, svg { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ====== HEADER / NAV ====== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 236, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 0;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand .logo { width: 32px; height: 32px; flex: none; }
.brand .name b { color: var(--gold-3); font-weight: 700; }
.nav-links {
  display: flex; align-items: center; gap: 4px; margin-left: 8px;
  flex: 1;
}
.nav-links a {
  color: var(--ink-2);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-weight: 500;
  font-size: 0.95rem;
  transition: background .15s ease, color .15s ease;
}
.nav-links a:hover { background: var(--gold-soft); color: var(--ink); }
.nav-links a.active { background: var(--gold-soft); color: var(--gold-4); }

.nav-cta { display: flex; align-items: center; gap: 10px; }
.balance-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 6px 12px 6px 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.balance-pill img { width: 18px; height: 18px; }

.user-menu {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 4px 12px 4px 4px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.user-menu .avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-3));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem;
  text-transform: uppercase;
  font-family: var(--sans);
}
.user-menu:hover { box-shadow: var(--shadow-sm); }

.avatar img, .avatar-lg img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.avatar-upload { position: relative; }
.avatar-upload-btn {
  position: absolute; right: -2px; bottom: -2px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--gold-2);
  border-radius: 50%;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.avatar-upload-btn:hover { background: var(--gold-soft); }

@media (max-width: 720px) {
  .nav-links a { padding: 6px 10px; font-size: 0.88rem; }
  .nav { gap: 10px; }
}

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--gold-1) 0%, var(--gold-2) 100%);
  color: #1B1306;
  box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset, 0 6px 20px -8px var(--gold-glow), 0 2px 6px rgba(122, 90, 20, 0.25);
  border-color: var(--gold-3);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #F0CF6F 0%, #D4A94A 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset, 0 10px 28px -8px var(--gold-glow), 0 2px 8px rgba(122, 90, 20, 0.30);
  color: #1B1306;
}
.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--gold-soft); border-color: var(--gold-2); color: var(--ink); }
.btn-ghost.active { background: var(--gold-soft); border-color: var(--gold-3); color: var(--gold-4); font-weight: 700; }
.btn-success {
  background: var(--success); color: #fff; border-color: var(--success);
}
.btn-success:hover { background: #345a3f; }
.btn-danger {
  background: transparent; color: var(--danger); border-color: var(--danger);
}
.btn-danger:hover { background: var(--danger-bg); }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ====== CARDS ====== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card.glow {
  border-color: rgba(201, 160, 74, 0.45);
  box-shadow: var(--shadow), 0 0 60px -20px var(--gold-glow);
}
.card.flat {
  box-shadow: none;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-header h2, .card-header h3 { margin: 0; }

/* ====== FORMS ====== */
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.form-row .hint {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-top: 4px;
}
.input, textarea.input, select.input {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 0.98rem;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.input:focus, textarea.input:focus, select.input:focus {
  outline: none;
  border-color: var(--gold-2);
  box-shadow: 0 0 0 4px var(--gold-soft);
  background: #FFFEFA;
}
textarea.input { min-height: 110px; resize: vertical; line-height: 1.5; font-family: var(--sans); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.checkbox-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-2);
  border-radius: var(--r);
  cursor: pointer;
}
.checkbox-row input[type=checkbox] {
  margin-top: 2px;
  accent-color: var(--gold-2);
  width: 18px; height: 18px; flex: none;
}
.checkbox-row .lbl { font-size: 0.92rem; color: var(--ink); font-weight: 500; }
.checkbox-row .lbl b { color: var(--gold-4); }

/* ====== ALERTS / FLASH ====== */
.alert {
  padding: 12px 16px;
  border-radius: var(--r);
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid transparent;
  margin-bottom: 16px;
}
.alert-ok   { background: var(--success-bg); color: var(--success); border-color: rgba(63, 107, 74, 0.25); }
.alert-err  { background: var(--danger-bg);  color: var(--danger);  border-color: rgba(154, 58, 48, 0.25); }
.alert-info { background: var(--info-bg);    color: var(--info);    border-color: rgba(62, 92, 122, 0.25); }
.alert-warn { background: var(--warn-bg);    color: var(--warn);    border-color: rgba(168, 124, 40, 0.30); }

.errors {
  list-style: none;
  padding: 12px 16px;
  margin: 0 0 18px;
  background: var(--danger-bg);
  border: 1px solid rgba(154, 58, 48, 0.25);
  border-radius: var(--r);
  color: var(--danger);
  font-size: 0.92rem;
}
.errors li { margin: 2px 0; }

/* ====== BADGES ====== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--surface-3);
  color: var(--ink-2);
  border: 1px solid var(--border);
}
.badge-gold {
  background: linear-gradient(180deg, #FAEAB3, #ECD080);
  color: var(--gold-4);
  border-color: var(--gold-2);
}
.badge-success { background: var(--success-bg); color: var(--success); border-color: rgba(63,107,74,.25); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger);  border-color: rgba(154,58,48,.25); }
.badge-info    { background: var(--info-bg);    color: var(--info);    border-color: rgba(62,92,122,.25); }
.badge-muted   { background: var(--surface-3);  color: var(--ink-3); }

/* ====== HERO ====== */
.hero {
  position: relative;
  padding: 88px 0 56px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: -10% -10% 0 -10%;
  background:
    radial-gradient(600px 320px at 50% 0%, var(--gold-glow), transparent 70%),
    radial-gradient(1000px 400px at 50% 100%, rgba(229, 193, 88, 0.10), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero > .container { position: relative; z-index: 1; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-4);
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 5.6vw, 4.2rem);
  line-height: 1.05;
  color: var(--ink);
  margin: 0 auto 14px;
  max-width: 14ch;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold-3);
  font-weight: 600;
}
.hero .sub {
  font-size: 1.1rem;
  color: var(--ink-3);
  max-width: 56ch;
  margin: 0 auto 28px;
  line-height: 1.55;
}
.hero .ctas { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ====== STATS BAND ====== */
.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 32px;
}
@media (max-width: 760px) { .stats-band { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(280px 80px at 100% 0%, var(--gold-soft), transparent 70%);
  pointer-events: none;
}
.stat .label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.stat .value {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.05;
  color: var(--ink);
}
.stat .value .unit { font-size: 1rem; color: var(--gold-3); margin-left: 4px; }
.stat .meta { font-size: 0.82rem; color: var(--ink-3); margin-top: 6px; }

/* ====== SECTION HEADER ====== */
.section {
  padding: 56px 0;
}
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 28px;
}
.section-head h2 { margin: 0; }
.section-head .sub { color: var(--ink-3); font-size: 1rem; margin: 0; }
.section-head .right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ====== TASK CARD GRID ====== */
.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.task-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex; flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  overflow: hidden;
}
.task-card::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(380px 110px at 100% 0%, var(--gold-soft), transparent 65%);
  opacity: 0.6;
  pointer-events: none;
}
.task-card > * { position: relative; z-index: 1; }
.task-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-2);
  box-shadow: var(--shadow-lg);
}
.task-card .head {
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 8px;
}
.task-card .head .titles { flex: 1; min-width: 0; }
.task-card .title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 4px;
}
.task-card .meta {
  font-size: 0.82rem;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.task-card .meta .dot { color: var(--ink-muted); }
.task-card .desc {
  color: var(--ink-3);
  font-size: 0.94rem;
  line-height: 1.5;
  margin: 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.task-card .progress {
  margin-top: auto;
  border-top: 1px dashed var(--border);
  padding-top: 14px;
}
.task-card .progress .lbl-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.84rem;
  margin-bottom: 8px;
}
.task-card .progress .lbl-row .raised {
  font-family: var(--mono);
  color: var(--ink);
  font-weight: 600;
}
.task-card .progress .lbl-row .stake { color: var(--ink-muted); font-size: 0.78rem; }
.task-card .bar {
  height: 6px;
  background: var(--surface-3);
  border-radius: var(--r-pill);
  overflow: hidden;
  position: relative;
}
.task-card .bar > i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold-3), var(--gold-1));
  border-radius: var(--r-pill);
  box-shadow: 0 0 10px var(--gold-glow);
}
.task-card .foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px;
  font-size: 0.84rem;
  color: var(--ink-3);
}
.task-card .foot .lvt {
  display: inline-flex; align-items: center; gap: 4px;
}
.task-card .foot .lvt .ic { color: var(--gold-3); }

.task-card .badges { display: flex; gap: 6px; flex-wrap: wrap; }

/* ====== TASK DETAIL ====== */
.task-detail {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
}
@media (max-width: 920px) { .task-detail { grid-template-columns: 1fr; } }
.task-detail .main h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  margin-bottom: 12px;
}
.task-detail .meta-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  color: var(--ink-3); font-size: 0.92rem;
  margin-bottom: 24px;
}
.task-detail .meta-bar .dot { color: var(--ink-muted); }
.task-detail .body-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.task-detail .body-block h3 {
  font-size: 0.86rem;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  font-weight: 700;
  margin-bottom: 10px;
}
.task-detail .body-block .body-text {
  font-size: 1.04rem;
  line-height: 1.65;
  color: var(--ink-2);
  white-space: pre-line;
}
.task-detail .conditions {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--gold-2);
  position: relative;
}
.task-detail .conditions::before {
  content: "✓";
  position: absolute; top: -12px; left: 24px;
  width: 24px; height: 24px;
  background: var(--gold-2);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
  box-shadow: 0 0 0 4px var(--surface), 0 0 16px var(--gold-glow);
}
.task-detail .conditions h3 { color: var(--gold-4); }

.task-detail .side {
  position: sticky; top: 92px;
  align-self: start;
}
.task-detail .side .capital-card {
  background: linear-gradient(180deg, #FFFDF5, #FFF8E2);
  border: 1px solid var(--gold-2);
  border-radius: var(--r-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 60px -25px var(--gold-glow);
}
.task-detail .side .capital-card::after {
  content: "";
  position: absolute; top: -40%; right: -30%;
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--gold-glow), transparent 60%);
  pointer-events: none;
}
.task-detail .side .capital-card .lbl {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-muted); font-weight: 700;
}
.task-detail .side .capital-card .big {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--ink);
  margin: 4px 0 14px;
}
.task-detail .side .capital-card .rows {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 0.9rem;
  color: var(--ink-3);
  border-top: 1px dashed var(--border-strong);
  padding-top: 12px;
}
.task-detail .side .capital-card .row { display: flex; justify-content: space-between; }
.task-detail .side .capital-card .row b { color: var(--ink); font-weight: 600; }
.task-detail .side .actions {
  display: flex; flex-direction: column; gap: 8px; margin-top: 14px;
}

.contribution-list { list-style: none; padding: 0; margin: 0; }
.contribution-list li {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
}
.contribution-list li:last-child { border-bottom: 0; }
.contribution-list .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-3));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.82rem;
  text-transform: uppercase;
}
.contribution-list .name { font-weight: 600; color: var(--ink); font-size: 0.96rem; }
.contribution-list .when { font-size: 0.78rem; color: var(--ink-muted); }
.contribution-list .comment {
  font-size: 0.92rem; color: var(--ink-2); margin-top: 4px; font-style: italic;
}
.contribution-list .prayer-note {
  margin-top: 6px;
  font-size: 0.86rem;
  color: var(--gold-4);
  background: var(--gold-soft);
  border-left: 2px solid var(--gold-2);
  padding: 6px 10px;
  border-radius: 0 var(--r) var(--r) 0;
}
.contribution-list .amount {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--gold-3);
  font-size: 1rem;
  white-space: nowrap;
}

/* ====== AUTH PAGES ====== */
.auth-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 56px 0 80px;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: "";
  position: absolute; top: -80px; right: -80px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, var(--gold-glow), transparent 60%);
  pointer-events: none;
}
.auth-card > * { position: relative; }
.auth-card h1 { font-size: 2rem; margin-bottom: 6px; }
.auth-card .sub { color: var(--ink-3); margin-bottom: 22px; font-size: 0.96rem; }
.auth-card .alt { text-align: center; font-size: 0.92rem; color: var(--ink-3); margin-top: 18px; }

/* ====== MODAL ====== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(20, 16, 8, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--gold-2);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 480px;
  padding: 28px;
  box-shadow: var(--shadow-lg), 0 0 80px -20px var(--gold-glow);
  position: relative;
}
.modal h2 { font-size: 1.5rem; margin-bottom: 4px; }
.modal .sub { color: var(--ink-3); margin-bottom: 18px; font-size: 0.95rem; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

/* ====== EMPTY STATE ====== */
.empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--ink-3);
}
.empty .icon {
  width: 80px; height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--gold-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-3);
  font-size: 1.8rem;
  border: 1px solid var(--gold-2);
}
.empty h3 { color: var(--ink); margin-bottom: 6px; }

/* ====== FOOTER ====== */
.site-footer {
  margin-top: 80px;
  padding: 40px 0 50px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, var(--bg-deep));
  color: var(--ink-3);
  font-size: 0.92rem;
}
.site-footer .grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
}
@media (max-width: 720px) { .site-footer .grid { grid-template-columns: 1fr; } }
.site-footer h4 {
  font-family: var(--sans);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  font-weight: 700;
  margin-bottom: 12px;
}
.site-footer a { color: var(--ink-2); display: block; padding: 4px 0; }
.site-footer a:hover { color: var(--gold-3); }
.site-footer .brand-block .blurb { margin-top: 8px; max-width: 36ch; line-height: 1.5; }
.site-footer .legal {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 0.84rem;
  color: var(--ink-muted);
}

/* ====== PROFILE ====== */
.profile-head {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 24px;
}
.profile-head .avatar-lg {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-3));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.6rem;
  text-transform: uppercase;
  font-family: var(--serif);
  box-shadow: 0 0 0 4px var(--bg), 0 0 24px var(--gold-glow);
}
.profile-head .info h1 { margin: 0 0 4px; }
.profile-head .info .handle { color: var(--ink-muted); font-size: 0.94rem; }

.balance-card {
  background: linear-gradient(180deg, #FFFDF5, #FFF6DD);
  border: 1px solid var(--gold-2);
  border-radius: var(--r-lg);
  padding: 22px;
  text-align: center;
  box-shadow: var(--shadow), 0 0 60px -25px var(--gold-glow);
}
.balance-card .lbl {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-muted); font-weight: 700;
}
.balance-card .big {
  font-family: var(--serif);
  font-size: 2.6rem; font-weight: 600; color: var(--ink);
  margin: 4px 0 4px;
  display: inline-flex; align-items: center; gap: 8px;
}
.balance-card .big img { width: 36px; height: 36px; }
.balance-card .meta { color: var(--ink-3); font-size: 0.88rem; }

.ledger { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.ledger th, .ledger td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border-soft); }
.ledger th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); }
.ledger td.amt { font-family: var(--mono); font-weight: 600; text-align: right; }
.ledger td.amt.pos { color: var(--success); }
.ledger td.amt.neg { color: var(--danger); }

/* ====== UTIL ====== */
.row { display: flex; gap: 16px; }
.row.between { justify-content: space-between; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.text-center { text-align: center; }
.muted { color: var(--ink-muted); }
.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); }
.gold { color: var(--gold-3); }
.bold { font-weight: 600; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

.charity-card {
  background: linear-gradient(180deg, #FFFEFA, #FFF7E0);
  border: 1px solid var(--gold-2);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex; align-items: center; gap: 22px;
  box-shadow: var(--shadow), 0 0 60px -25px var(--gold-glow);
}
.charity-card .icon { font-size: 2.4rem; }
.charity-card .body { flex: 1; }
.charity-card .body h3 { margin: 0 0 4px; }
.charity-card .body p  { color: var(--ink-3); margin: 0; }

/* ====== AUTHOR NOTE (own task) ====== */
.author-note {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r);
  padding: 14px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink-2);
}
.author-note .ic { font-size: 1.6rem; flex: none; }
.author-note b { color: var(--gold-4); }

/* ====== WELCOME PAGE ====== */
.welcome-wrap { padding: 32px 0 80px; display: flex; flex-direction: column; gap: 28px; }
.hcaptcha-slot { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.puzzle-status { text-align: center; min-height: 1.2em; }
.puzzle-status.ok  { color: var(--success); }
.puzzle-status.err { color: var(--danger); }
.welcome-hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  align-items: center;
  padding: 36px;
  margin-bottom: 28px;
}
.welcome-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-4);
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.welcome-hero h1 { margin-bottom: 14px; }
.welcome-hero h1 b { color: var(--gold-3); }
.welcome-hero .sub { color: var(--ink-3); font-size: 1.04rem; line-height: 1.6; margin: 0; }
.welcome-hero-text { min-width: 0; }
.welcome-hero-side { display: flex; justify-content: center; }
.welcome-balance {
  width: 100%;
  max-width: 320px;
  background: linear-gradient(180deg, #FFFDF5, #FFF6DD);
  border: 1px solid var(--gold-2);
  border-radius: var(--r-lg);
  padding: 22px;
  text-align: center;
  box-shadow: 0 0 60px -25px var(--gold-glow);
}
.welcome-balance .lbl {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-muted); font-weight: 700;
}
.welcome-balance .big {
  font-family: var(--serif);
  font-size: 2.4rem; font-weight: 600; color: var(--ink);
  margin: 4px 0 4px;
  display: inline-flex; align-items: center; gap: 8px;
}
.welcome-balance .big img { width: 32px; height: 32px; }
.welcome-balance .meta { color: var(--ink-3); font-size: 0.88rem; }
@media (max-width: 760px) {
  .welcome-hero { grid-template-columns: 1fr; padding: 24px; }
}

/* ====== ROADMAP ====== */
.roadmap {
  position: relative;
  display: flex; flex-direction: column;
  gap: 28px;
  padding: 8px 0 8px 56px;
  margin: 8px 0;
}
.roadmap-line {
  position: absolute;
  top: 0; bottom: 0; left: 23px;
  width: 2px;
  background: linear-gradient(180deg, var(--border-strong), var(--gold-2) 30%, var(--gold-2) 70%, var(--border-strong));
  border-radius: 1px;
}
.roadmap-line .dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 0 4px var(--bg), 0 0 12px var(--gold-glow);
}
.roadmap-line .dot[data-step="1"] { top: 12%; }
.roadmap-line .dot[data-step="2"] { top: 50%; }
.roadmap-line .dot[data-step="3"] { top: 88%; }
@media (max-width: 600px) {
  .roadmap { padding-left: 44px; }
  .roadmap-line { left: 17px; }
  .roadmap-line .dot { width: 10px; height: 10px; }
}

.stage-card {
  position: relative;
  padding: 24px 28px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.stage-card.stage-active {
  border-color: var(--gold-2);
  box-shadow: var(--shadow), 0 0 60px -22px var(--gold-glow);
}
.stage-card.stage-done {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border-color: rgba(63, 107, 74, 0.35);
}
.stage-card.stage-locked {
  opacity: 0.55;
  filter: saturate(0.6);
}
.stage-card.stage-locked .stage-marker-circle {
  background: var(--surface-3);
  color: var(--ink-muted);
  box-shadow: 0 0 0 4px var(--bg);
}
.stage-card.stage-done::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(380px 120px at 100% 0%, rgba(63, 107, 74, 0.06), transparent 60%);
  pointer-events: none;
  border-radius: var(--r-lg);
}

.stage-marker {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 16px;
  position: relative;
}
.stage-marker-circle {
  position: absolute;
  left: -64px; top: -2px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-3));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 0 0 4px var(--bg), 0 0 16px var(--gold-glow);
}
@media (max-width: 600px) {
  .stage-marker-circle { left: -52px; width: 40px; height: 40px; font-size: 1rem; }
}
.stage-card.stage-done .stage-marker-circle {
  background: linear-gradient(135deg, #6FA178, #3F6B4A);
  box-shadow: 0 0 0 4px var(--bg), 0 0 16px rgba(63, 107, 74, 0.4);
}
.stage-card.stage-done .stage-marker-num { display: none; }
.stage-card:not(.stage-done) .stage-marker-circle .ic,
.stage-card.stage-done .stage-marker-circle .stage-marker-num { display: none; }
.stage-marker-eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  font-weight: 700;
}
.stage-marker-meta h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin: 2px 0 0;
}
.stage-card.stage-done .stage-marker-meta h3 { color: var(--success); }

.stage-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  margin-bottom: 16px;
}
.stage-body.no-reward { grid-template-columns: 1fr; }
@media (max-width: 720px) {
  .stage-body { grid-template-columns: 1fr; }
}
.stage-reward {
  background: linear-gradient(180deg, #FFFEFA, #FFF8E2);
  border: 1px solid var(--gold-2);
  border-radius: var(--r);
  padding: 18px;
  text-align: center;
}
.stage-reward .lbl {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-muted); font-weight: 700;
}
.stage-reward .big {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--gold-3);
  margin: 4px 0 4px;
}
.stage-reward .meta { color: var(--ink-3); font-size: 0.82rem; }
.stage-info p { font-size: 0.96rem; color: var(--ink-2); line-height: 1.6; margin: 0 0 10px; }
.stage-info p:last-child { margin-bottom: 0; }
.small { font-size: 0.84rem; }
.stage-info .small { color: var(--ink-muted); }

.stage-action {
  display: flex; flex-direction: column; gap: 16px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.stage-action .start-stage-btn { align-self: flex-start; }

.stage-status {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-radius: var(--r);
  font-size: 0.96rem;
}
.stage-status-done {
  background: rgba(63, 107, 74, 0.10);
  border: 1px solid rgba(63, 107, 74, 0.25);
  color: var(--success);
}
.stage-status-done .ic {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--success);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  flex: none;
}

/* PoW status bar inside the stage-action area */
.pow-status { display: flex; flex-direction: column; gap: 6px; }
.pow-bar {
  height: 8px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}
.pow-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold-3), var(--gold-1));
  border-radius: 999px;
  box-shadow: 0 0 12px var(--gold-glow);
  transition: width .25s ease;
}
.pow-status-text { font-family: var(--mono); }
.pow-status-text.ok  { color: var(--success); }
.pow-status-text.err { color: var(--danger); }

.all-done-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: linear-gradient(180deg, #FFFDF5, #FFF6DD);
  border-color: var(--gold-2);
  flex-wrap: wrap;
}
.all-done-banner h3 { margin: 0 0 4px; color: var(--gold-3); }
.all-done-banner .ctas { display: flex; gap: 10px; flex-wrap: wrap; }
