/* MANNA — DESIGN SYSTEM
   Single source of visual truth. Tokens lifted from the live landing page so
   marketing and application are one product, not two.
   Cinzel (headings, uppercase, letterspaced) + EB Garamond (body).
   Scripture always KJV, always italic, always cited. No emojis in UI. Ever.
   Sibling modules override --steel only. Navy, type, spacing never change:
     Manna #4B5563 steel | Pre-engagement #B8916E bronze | Engagement #7C3737 crimson */

:root {
  /* Accent — the only token a sibling module overrides */
  --steel:        #4B5563;
  --steel-light:  #6B7280;
  --steel-dim:    #374151;
  --steel-glow:   rgba(75, 85, 99, 0.35);

  /* Ground */
  --navy:         #0a1628;
  --navy-dark:    #060e1a;
  --navy-mid:     #0f1e30;
  --surface:      #111c2a;
  --surface2:     #162030;

  /* Ink */
  --white:        #f0ece4;
  --off-white:    #d4cfc6;
  --muted:        #8a8d99;
  --faint:        #2a3040;

  /* Edges */
  --border:        rgba(75, 85, 99, 0.18);
  --border-active: rgba(75, 85, 99, 0.45);

  /* Signal */
  --green:      #4ade80;
  --green-deep: #14532d;
  --red:        #c0182a;
  --red-soft:   #ef4444;
  --amber:      #b45309;

  /* Metrics */
  --radius:    10px;
  --radius-lg: 12px;
  --radius-sm: 6px;
  --gutter:    48px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background:     var(--navy-dark);
  color:          var(--white);
  font-family:    'EB Garamond', Georgia, serif;
  font-size:      1.0625rem;
  line-height:    1.85;
  min-height:     100vh;
  display:        flex;
  flex-direction: column;
  overflow-x:     hidden;
}

h1, h2, h3, h4 {
  font-family:    'Cinzel', 'Times New Roman', serif;
  font-weight:    700;
  line-height:    1.25;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color:          var(--steel-light);
}

a { color: var(--steel-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--off-white); }

canvas#stars {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}

/* ── Navigation ──────────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  background: rgba(6, 14, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-identity { display: flex; align-items: center; }
.forge-mark { display: inline-flex; align-items: center; line-height: 0; color: var(--steel-light); }
.forge-mark svg { display: block; height: 1.3rem; width: auto; }
.nav-divider { width: 1px; height: 28px; background: var(--border); margin: 0 14px; }
.nav-brand {
  font-family: 'Cinzel', serif; font-size: 1rem; font-weight: 700;
  letter-spacing: 5px; color: var(--steel); text-transform: uppercase;
}
.nav-brand:hover { color: var(--steel-light); }

.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; }
.nav-link {
  font-family: 'Cinzel', serif; font-size: 0.62rem; font-weight: 400;
  letter-spacing: 2px; text-transform: uppercase; color: var(--muted);
  padding: 6px 0; border-bottom: 1px solid transparent;
}
.nav-link:hover { color: var(--steel-light); }
.nav-link--active { color: var(--white); border-bottom-color: var(--steel); }
.nav-link--logout { color: var(--steel-dim); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span { display: block; width: 22px; height: 1px; background: var(--muted); }

@media (max-width: 820px) {
  :root { --gutter: 24px; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 2px;
    background: var(--navy-dark); border-bottom: 1px solid var(--border);
    padding: 16px var(--gutter);
  }
  .nav-links--open { display: flex; }
  .nav-link { padding: 8px 0; font-size: 0.68rem; }
}

/* ── Layout ──────────────────────────────────────────────────────────────── */

.page { position: relative; z-index: 1; display: flex; flex-direction: column; flex: 1; }
.main-content {
  flex: 1; width: 100%; max-width: 960px; margin: 0 auto;
  padding: 56px var(--gutter) 80px;
}
.main-content--center {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 60px); max-width: 520px;
}

.page-header { margin-bottom: 44px; }
.page-eyebrow {
  font-family: 'Cinzel', serif; font-size: 0.58rem; font-weight: 400;
  letter-spacing: 4px; text-transform: uppercase;
  color: var(--steel-light); margin-bottom: 10px;
}
.page-title {
  font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: 3px;
  color: var(--steel); margin-bottom: 12px;
}
.page-subtitle {
  font-family: 'EB Garamond', serif; font-size: 1.05rem;
  color: var(--off-white); max-width: 620px; text-transform: none;
}
.divider {
  width: 60px; height: 1px; margin: 20px 0 32px;
  background: linear-gradient(90deg, var(--steel), transparent);
}
.section-heading {
  font-family: 'Cinzel', serif; font-size: 0.7rem; font-weight: 600;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--steel-light); margin-bottom: 14px;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 30px; margin-bottom: 24px;
  transition: border-color 0.25s;
}
.card:hover { border-color: var(--border-active); }
.card--accent { position: relative; overflow: hidden; }
.card--accent::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--steel);
}
.card-label {
  font-family: 'Cinzel', serif; font-size: 0.55rem; font-weight: 400;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 16px;
}

.grid       { display: grid; gap: 20px; }
.grid--2    { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3    { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ── Stats ───────────────────────────────────────────────────────────────── */

.stats-row { display: flex; flex-wrap: wrap; gap: 32px; margin-bottom: 20px; }
.stat { flex: 1; min-width: 110px; }
.stat-label {
  font-family: 'Cinzel', serif; font-size: 0.52rem; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.stat-value {
  font-family: 'Cinzel', serif; font-size: 1.35rem; font-weight: 700;
  letter-spacing: 1px; color: var(--white);
}
.stat-value--giving { color: var(--green); }
.stat-value--debt   { color: var(--red-soft); }
.stat-value--accent { color: var(--steel-light); }

/* ── Badges ──────────────────────────────────────────────────────────────── */

.badge {
  display: inline-block; padding: 4px 14px; border-radius: 100px;
  font-family: 'Cinzel', serif; font-size: 0.55rem; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase; border: 1px solid transparent;
}
.badge--locked   { background: var(--faint);      color: var(--steel-dim); }
.badge--active   { background: var(--surface2);   color: var(--steel-light); border-color: var(--border-active); }
.badge--complete { background: var(--green-deep); color: var(--green); }
.badge--early    { background: var(--green-deep); color: var(--green); }
.badge--ontime   { background: var(--surface2);   color: var(--off-white); border-color: var(--border-active); }
.badge--risk     { background: #3a1417;           color: var(--red-soft); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-block; font-family: 'Cinzel', serif; font-size: 0.66rem;
  font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase;
  padding: 12px 26px; border-radius: 7px; border: none;
  cursor: pointer; text-align: center; transition: all 0.2s;
}
.btn--primary {
  color: var(--white);
  background: linear-gradient(180deg, #5a6474 0%, #3a4252 100%);
  box-shadow: 0 2px 12px rgba(75, 85, 99, 0.3);
}
.btn--primary:hover {
  background: linear-gradient(180deg, #6b7280 0%, #4B5563 100%);
  box-shadow: 0 4px 20px rgba(75, 85, 99, 0.4);
  transform: translateY(-2px); color: var(--white);
}
.btn--ghost {
  background: transparent; color: var(--muted);
  border: 1px solid var(--border); font-weight: 400; letter-spacing: 2px;
}
.btn--ghost:hover { border-color: var(--border-active); color: var(--off-white); }
.btn--danger { background: transparent; color: var(--red-soft); border: 1px solid rgba(192,24,42,0.3); }
.btn--danger:hover { border-color: var(--red-soft); }
.btn--block { display: block; width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* ── Forms ───────────────────────────────────────────────────────────────── */

.field { margin-bottom: 22px; }
.field-label {
  display: block; font-family: 'Cinzel', serif; font-size: 0.56rem;
  font-weight: 400; letter-spacing: 2px; text-transform: uppercase;
  color: var(--steel-light); margin-bottom: 7px;
}
.field-hint { font-size: 0.85rem; color: var(--muted); margin-top: 5px; line-height: 1.6; }

.form-input, input[type=text], input[type=email], input[type=password],
input[type=number], input[type=date], select, textarea {
  display: block; width: 100%;
  background: var(--navy); border: 1px solid rgba(75, 85, 99, 0.3);
  border-radius: var(--radius-sm); color: var(--white);
  font-family: 'EB Garamond', serif; font-size: 1rem;
  padding: 11px 14px; transition: border-color 0.2s;
}
.form-input:focus, input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--border-active);
}
textarea { resize: vertical; line-height: 1.6; }
select { appearance: none; cursor: pointer; }

.choice-row { display: flex; gap: 12px; }
.choice {
  flex: 1; text-align: center; cursor: pointer;
  background: var(--navy); border: 1px solid rgba(75, 85, 99, 0.3);
  border-radius: var(--radius-sm); padding: 14px 10px;
  font-family: 'Cinzel', serif; font-size: 0.6rem; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase; color: var(--muted);
  transition: all 0.2s;
}
.choice:hover  { border-color: var(--border-active); color: var(--off-white); }
.choice--on    { border-color: var(--steel); color: var(--white); background: var(--surface2); }

.confirm-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 24px; }
.confirm-row input[type=checkbox] {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 4px; accent-color: var(--steel-light);
}
.confirm-row label {
  font-family: 'EB Garamond', serif; font-size: 0.95rem;
  text-transform: none; letter-spacing: 0; color: var(--off-white); line-height: 1.6;
}

.alert {
  border-radius: var(--radius-sm); padding: 13px 16px;
  margin-bottom: 20px; font-size: 0.92rem; line-height: 1.6;
}
.alert--error   { background: rgba(192,24,42,0.08);  border: 1px solid rgba(192,24,42,0.3);  color: var(--red-soft); }
.alert--warn    { background: rgba(180,83,9,0.08);   border: 1px solid rgba(180,83,9,0.3);   color: #f59e0b; }
.alert--success { background: rgba(74,222,128,0.06); border: 1px solid rgba(74,222,128,0.25); color: var(--green); }

.billing-banner {
  margin-bottom: 28px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-active);
  background: rgba(75, 85, 99, 0.16);
  color: var(--off-white);
}
.billing-banner p { margin: 0; }
.billing-banner .btn-row { margin-top: 12px; }
.billing-banner--soon {
  border-color: rgba(180, 83, 9, 0.75);
  background: rgba(180, 83, 9, 0.18);
  box-shadow: 0 0 0 1px rgba(180, 83, 9, 0.35);
}
.billing-banner--lapsed {
  border-color: rgba(192, 24, 42, 0.55);
  background: rgba(192, 24, 42, 0.12);
}

/* ── Tables ──────────────────────────────────────────────────────────────── */

.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th {
  font-family: 'Cinzel', serif; font-size: 0.52rem; font-weight: 400;
  letter-spacing: 2.5px; text-transform: uppercase; color: var(--muted);
  text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.table td {
  padding: 15px 16px; border-bottom: 1px solid var(--border);
  color: var(--off-white); vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--surface2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ── Progress ────────────────────────────────────────────────────────────── */

.progress-bar {
  height: 4px; background: var(--faint); border-radius: 2px;
  overflow: hidden; margin: 12px 0 8px;
}
.progress-fill {
  height: 100%; border-radius: 2px; transition: width 0.5s ease;
  background: linear-gradient(90deg, var(--steel-dim), var(--steel-light));
}
.progress-fill--good { background: linear-gradient(90deg, var(--green-deep), var(--green)); }
.progress-label { font-size: 0.86rem; color: var(--muted); }

/* ── Scripture ───────────────────────────────────────────────────────────── */

.scripture {
  font-family: 'EB Garamond', serif; font-style: italic;
  color: var(--steel-dim); font-size: 0.86rem; line-height: 1.8;
}
.scripture-block {
  border-left: 2px solid var(--steel); background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 26px; margin: 24px 0 32px;
  font-style: italic; font-size: 1.05rem; color: var(--off-white); line-height: 1.9;
}

/* ── Steps ───────────────────────────────────────────────────────────────── */

.steps { display: flex; flex-direction: column; position: relative; }
.steps::before {
  content: ''; position: absolute; left: 19px; top: 32px; bottom: 32px; width: 1px;
  background: linear-gradient(180deg, var(--steel) 0%, transparent 100%);
}
.step { display: flex; gap: 26px; align-items: flex-start; padding: 26px 0; border-bottom: 1px solid var(--border); }
.step:last-child { border-bottom: none; }
.step-num {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
  border: 1px solid var(--border-active); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cinzel', serif; font-size: 0.7rem; font-weight: 600;
  color: var(--steel-light); position: relative; z-index: 1;
}
.step-title {
  font-family: 'Cinzel', serif; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase; color: var(--steel-light); margin-bottom: 6px;
}
.step-desc { font-size: 0.96rem; color: var(--muted); line-height: 1.85; }
.step-indicator {
  font-family: 'Cinzel', serif; font-size: 0.55rem; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--steel-dim); margin-bottom: 24px;
}
.step-pane { display: none; }
.step-pane--on { display: block; }

/* ── Chat ────────────────────────────────────────────────────────────────── */

.chat { display: flex; flex-direction: column; height: calc(100vh - 300px); min-height: 420px; }
.chat-log {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 26px;
}
.chat-msg { display: flex; gap: 14px; align-items: flex-start; }
.chat-msg--user { flex-direction: row-reverse; }
.chat-avatar {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%;
  border: 1px solid var(--border-active); background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cinzel', serif; font-size: 0.48rem; font-weight: 700;
  letter-spacing: 1px; color: var(--steel-light);
}
.chat-bubble {
  max-width: 80%; padding: 13px 17px; font-size: 0.95rem; line-height: 1.8;
  background: var(--surface2); color: var(--off-white);
  border-left: 2px solid var(--steel-dim); border-radius: 2px 8px 8px 8px;
}
.chat-msg--user .chat-bubble {
  background: var(--faint); color: var(--muted);
  border-left: none; border-radius: 8px 8px 2px 8px;
}
.chat-form {
  display: flex; gap: 12px; padding: 16px;
  background: var(--surface); border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ── Covenants ───────────────────────────────────────────────────────────── */

.covenants-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.covenant-card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 24px; transition: all 0.2s;
}
.covenant-card:hover { border-color: var(--border-active); transform: translateY(-2px); }
.covenant-card--active   { border-color: var(--border-active); }
.covenant-card--complete { border-color: rgba(74,222,128,0.3); }
.covenant-card--locked   { opacity: 0.62; }
.covenant-num {
  font-family: 'Cinzel', serif; font-size: 0.52rem; font-weight: 400;
  letter-spacing: 3px; text-transform: uppercase; color: var(--steel-dim); margin-bottom: 6px;
}
.covenant-name {
  font-family: 'Cinzel', serif; font-size: 0.92rem; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; color: var(--steel-light); margin-bottom: 10px;
}
.covenant-desc { font-size: 0.9rem; color: var(--muted); line-height: 1.8; margin-bottom: 14px; }
.covenant-number-large {
  font-family: 'Cinzel', serif; font-size: 3.5rem; font-weight: 700;
  color: var(--steel); line-height: 1;
}
.breadcrumb { font-size: 0.82rem; color: var(--steel-dim); margin-bottom: 28px; }
.breadcrumb-sep { margin: 0 8px; color: var(--faint); }
.covenant-nav {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border);
}

/* ── Debt / list rows ────────────────────────────────────────────────────── */

.row-item {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.row-item:last-child { border-bottom: none; }
.row-item:hover { background: var(--surface2); }
.row-rank {
  font-family: 'Cinzel', serif; font-size: 1.3rem; color: var(--steel-dim);
  min-width: 34px; text-align: center;
}
.row-body { flex: 1; min-width: 0; }
.row-title { font-family: 'Cinzel', serif; font-size: 0.82rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--white); }
.row-meta  { font-size: 0.86rem; color: var(--muted); margin-top: 3px; }
.row-aside { text-align: right; flex-shrink: 0; }
.row-aside-value { font-family: 'Cinzel', serif; font-size: 0.85rem; color: var(--steel-light); }
.row-aside-label { font-size: 0.7rem; color: var(--steel-dim); letter-spacing: 1px; text-transform: uppercase; }

.empty-state {
  color: var(--steel-dim); text-align: center; padding: 48px 20px;
  font-style: italic; font-size: 1rem;
}
.insight {
  background: var(--surface); border-left: 2px solid var(--steel);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px; color: var(--off-white); font-size: 1rem; line-height: 1.85;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  padding: 40px var(--gutter); text-align: center;
}
.footer-brand {
  font-family: 'Cinzel', serif; font-size: 0.58rem; letter-spacing: 3px;
  text-transform: uppercase; color: var(--steel-dim); margin-bottom: 10px;
}
.footer-scripture { font-style: italic; color: var(--muted); font-size: 0.86rem; }
.footer-legal { margin-top: 14px; }
.footer-legal a {
  font-family: 'Cinzel', serif; font-size: 0.52rem; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted); text-decoration: none;
  margin: 0 10px;
}
.footer-legal a:hover { color: var(--steel-light); }

.consent {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 4px 0 22px;
  font-family: 'EB Garamond', serif; font-size: 1.02rem;
  line-height: 1.45; color: var(--off-white); cursor: pointer;
}
.consent input[type=checkbox] {
  width: auto; margin-top: 0.35em; flex-shrink: 0; accent-color: #6B7280;
}
.consent a { color: var(--steel-light); }
.consent a:hover { color: var(--white); }

/* ── Utilities ───────────────────────────────────────────────────────────── */

.hidden      { display: none !important; }
.text-muted  { color: var(--muted); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red-soft); }
.text-accent { color: var(--steel-light); }
.num { font-variant-numeric: tabular-nums; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-in.visible { opacity: 1; transform: none; }
