/* =========================================================
   PostPaid — shared stylesheet (professional refresh)
   Hold-to-earn. Muted institutional palette, hairline borders,
   restrained elevation. Money is set in mono (ledger identity).
   ========================================================= */

:root {
  --bg:        #0a0c10;
  --bg-2:      #0c0f14;
  --surface:   #11151b;
  --surface-2: #161b22;
  --border:    #222a33;
  --border-2:  #2c343f;
  --text:      #e9edf2;
  --text-2:    #c2cad4;
  --muted:     #8b95a1;
  --faint:     #5b6571;
  --accent:    #4f8ff7;
  --accent-2:  #6fa6fb;
  --accent-soft: rgba(79,143,247,.10);
  --pos:       #3fb950;
  --pos-soft:  rgba(63,185,80,.10);
  --warn:      #d6a23e;
  --radius:    14px;
  --radius-sm: 10px;
  --shadow:    0 1px 0 rgba(255,255,255,.02), 0 18px 40px -24px rgba(0,0,0,.7);
  --ring:      0 0 0 3px rgba(79,143,247,.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  font-size: 16px;
}
a { color: inherit; text-decoration: none; }
.lnk { color: var(--accent-2); }
.lnk:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin-top: 0; }

.mono, .amt, .stat-num, .big-number, .ledger-num,
.metric strong, td.num, .data { 
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.01em;
}

.wrap { width: min(1140px, calc(100% - 44px)); margin: 0 auto; }

/* =================== NAV =================== */
.nav {
  height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(10,12,16,.82);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -.02em; font-size: 19px; font-family: Archivo, Inter, sans-serif; }
.brand.small { font-size: 16px; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 9px; font-size: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text);
}
.nav-links { display: flex; gap: 28px; color: var(--muted); font-size: 14.5px; font-weight: 500; }
.nav-links a { transition: color .15s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-actions { display: flex; gap: 9px; align-items: center; }

.conn-chip {
  display: none; align-items: center; gap: 7px;
  padding: 6px 11px; border: 1px solid var(--border-2);
  border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--surface); color: var(--text-2);
}
.conn-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pos); }
.conn-chip.is-on { display: inline-flex; }

/* =================== BUTTONS =================== */
.btn {
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 10px 17px;
  color: var(--text);
  background: var(--surface-2);
  font-weight: 600; font-size: 14.5px;
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
.btn:hover { background: #1b212a; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary { border: 1px solid transparent; background: var(--accent); color: #061122; font-weight: 700; }
.btn-primary:hover { background: var(--accent-2); }
.btn-pos { border: 1px solid transparent; background: var(--pos); color: #04150b; font-weight: 700; }
.btn-pos:hover { filter: brightness(1.06); }
.btn-secondary { background: var(--surface-2); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface); }
.btn-large { padding: 13px 24px; font-size: 15px; }
.btn-sm { padding: 8px 14px; font-size: 13.5px; }
.full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* =================== TYPE =================== */
.display { font-family: Archivo, Inter, sans-serif; }
h1 {
  font-family: Archivo, Inter, sans-serif;
  margin: 16px 0 18px;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.02; letter-spacing: -.03em; font-weight: 700;
}
h2 {
  font-family: Archivo, Inter, sans-serif;
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -.025em; margin-bottom: 12px; font-weight: 700;
}
h3 { font-family: Archivo, Inter, sans-serif; letter-spacing: -.015em; font-weight: 600; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent-2); font-weight: 600; font-size: 12.5px;
  letter-spacing: .1em; text-transform: uppercase;
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border: 1px solid var(--border-2);
  background: var(--surface); border-radius: 999px;
  color: var(--text-2); font-weight: 600; font-size: 13px; letter-spacing: .01em;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pos); }
.section-text { color: var(--muted); font-size: 16.5px; line-height: 1.7; max-width: 620px; }

/* =================== PAGE HEADER =================== */
.page-head { padding: 60px 0 8px; border-bottom: 1px solid var(--border); }
.page-head .eyebrow { margin-bottom: 14px; }
.page-head h1 { font-size: clamp(34px, 4.6vw, 52px); }
.page-head p { color: var(--muted); font-size: 17.5px; max-width: 660px; }

/* =================== HERO =================== */
.hero {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px;
  align-items: center; padding: 70px 0 40px;
}
.hero-copy > p { color: var(--muted); font-size: 18px; line-height: 1.7; max-width: 540px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 11px; flex-wrap: wrap; }

.trust-row { display: flex; gap: 26px; margin-top: 36px; flex-wrap: wrap; }
.trust-row .ti { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14px; }
.trust-row .ti .ck { color: var(--pos); font-weight: 700; }

/* ---- eligibility card (signature) ---- */
.elig-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.elig-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.elig-head .t { font-weight: 600; font-size: 15px; font-family: Archivo, sans-serif; }
.status-tag { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border-2); color: var(--muted); background: var(--bg-2); }
.status-tag.ok { color: var(--pos); border-color: rgba(63,185,80,.35); background: var(--pos-soft); }
.status-tag.partial { color: var(--warn); border-color: rgba(214,162,62,.35); background: rgba(214,162,62,.08); }

.elig-rows { display: grid; gap: 10px; margin-bottom: 18px; }
.elig-row {
  display: flex; align-items: center; gap: 13px;
  padding: 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg-2);
}
.elig-row .ic { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--surface-2); border: 1px solid var(--border-2); font-size: 15px; }
.elig-row .lab { font-size: 13px; color: var(--muted); }
.elig-row .lab b { display: block; color: var(--text); font-size: 14px; font-weight: 600; }
.elig-row .v { margin-left: auto; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.elig-row .v.set { color: var(--text); }
.elig-row .v.good { color: var(--pos); }
.elig-row.done { border-color: var(--border-2); }
.elig-row.done .ic { background: var(--pos-soft); border-color: rgba(63,185,80,.3); color: var(--pos); }

.elig-foot { font-size: 13px; color: var(--muted); text-align: center; padding-top: 4px; }

/* =================== SECTIONS =================== */
.section { padding: 72px 0; }
.section + .section { padding-top: 0; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.split { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }

/* steps */
.steps { display: grid; gap: 12px; }
.step {
  padding: 22px; display: flex; gap: 18px; align-items: flex-start;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.step .n { font-family: "JetBrains Mono", monospace; color: var(--accent-2); font-weight: 600; font-size: 13px; padding-top: 3px; min-width: 22px; }
.step h4 { margin-bottom: 6px; font-size: 16px; }
.step p { margin-bottom: 0; color: var(--muted); line-height: 1.6; font-size: 14.5px; }

/* cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 26px; }
.card h3 { margin-bottom: 9px; font-size: 17px; }
.card p { color: var(--muted); margin-bottom: 0; font-size: 14.5px; line-height: 1.65; }
.card .ic-badge { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; margin-bottom: 18px; background: var(--surface-2); border: 1px solid var(--border-2); color: var(--accent-2); }
.card .ic-badge.green { color: var(--pos); }
.card .ic-badge.warn { color: var(--warn); }

/* tables / ledger */
.ledger-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.ledger { width: 100%; border-collapse: collapse; }
.ledger th, .ledger td { text-align: left; padding: 15px 18px; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.ledger th { color: var(--muted); font-weight: 500; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; background: var(--bg-2); }
.ledger td.num { text-align: right; font-weight: 600; }
.ledger td .pos { color: var(--pos); }
.ledger tr:last-child td { border-bottom: 0; }

/* note */
.note {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--border); border-left: 2px solid var(--accent);
  border-radius: var(--radius-sm); background: var(--accent-soft);
  padding: 16px 18px; color: var(--text-2); font-size: 14.5px; line-height: 1.6;
}
.note.warn { border-left-color: var(--warn); background: rgba(214,162,62,.06); }
.note b { color: var(--text); }
.note .mono { color: var(--text); }

/* faq */
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 2px 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 19px 0; font-weight: 600; font-size: 15.5px; display: flex; justify-content: space-between; align-items: center; gap: 14px; font-family: Archivo, sans-serif; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-2); font-size: 20px; font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq p { color: var(--muted); padding: 0 0 19px; margin: 0; line-height: 1.7; font-size: 14.5px; }

/* callout */
.callout { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 48px; text-align: center; }
.callout h2 { margin-bottom: 12px; }
.callout p { color: var(--muted); max-width: 520px; margin: 0 auto 26px; font-size: 16.5px; }
.callout .hero-actions { justify-content: center; }

/* =================== DASHBOARD =================== */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 24px; }
.panel .plabel { color: var(--muted); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.profile-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.avatar { width: 48px; height: 48px; border-radius: 12px; font-size: 19px; display: grid; place-items: center; font-weight: 700; background: var(--surface-2); border: 1px solid var(--border-2); flex: none; }
.profile-row h3 { margin: 0 0 2px; font-size: 17px; }
.profile-row .w { color: var(--muted); font-size: 13px; }
.kv { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .val { font-weight: 600; }
.big-number { font-size: clamp(34px, 5vw, 44px); font-weight: 700; letter-spacing: -.03em; margin: 4px 0 8px; }
.verified-row { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; font-weight: 600; margin-top: 4px; }
.verified-row .on { color: var(--pos); }
.verified-row .off { color: var(--faint); }

.empty-state {
  border: 1px dashed var(--border-2); border-radius: var(--radius);
  background: var(--bg-2); padding: 40px 24px; text-align: center; color: var(--muted);
}
.empty-state .em-ic { font-size: 24px; margin-bottom: 10px; opacity: .6; }
.empty-state b { color: var(--text); display: block; margin-bottom: 4px; font-size: 15px; }

/* =================== FOOTER =================== */
.footer { padding: 36px 0 52px; margin-top: 48px; border-top: 1px solid var(--border); color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer .f-links { display: flex; gap: 24px; font-size: 14px; font-weight: 500; }
.footer .f-links a:hover { color: var(--text); }

/* =================== MODAL =================== */
.modal-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(4,6,9,.7); backdrop-filter: blur(5px); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal { width: min(440px, 100%); border: 1px solid var(--border-2); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); padding: 30px; position: relative; animation: rise .22s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.modal h3 { font-size: 21px; margin-bottom: 6px; }
.modal .sub { color: var(--muted); font-size: 14.5px; margin-bottom: 22px; line-height: 1.55; }
.modal .x-btn { position: absolute; top: 22px; right: 22px; background: transparent; border: none; color: var(--muted); font-size: 24px; line-height: 1; }
.modal .x-btn:hover { color: var(--text); }

.connect-step { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 12px; background: var(--bg-2); }
.step-row { display: flex; align-items: center; gap: 13px; }
.step-row .ic { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; flex: none; border: 1px solid var(--border-2); background: var(--surface-2); }
.step-row .ic.x { background: #000; color: #fff; }
.step-row .ic.w { color: var(--pos); }
.step-row .meta { flex: 1; }
.step-row .meta b { display: block; font-size: 14.5px; }
.step-row .meta span { color: var(--muted); font-size: 12.5px; }
.state-badge { font-size: 12px; font-weight: 600; color: var(--muted); padding: 5px 10px; border: 1px solid var(--border-2); border-radius: 999px; }
.state-badge.done { color: var(--pos); border-color: rgba(63,185,80,.35); background: var(--pos-soft); }

.x-input-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.x-input-row .at { color: var(--muted); font-family: "JetBrains Mono", monospace; font-size: 15px; padding-left: 2px; }
.x-input-row input { flex: 1; padding: 11px 13px; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--surface); color: var(--text); font: inherit; font-size: 14.5px; }
.x-input-row input:focus { outline: none; box-shadow: var(--ring); border-color: var(--accent); }
.field-hint { color: var(--faint); font-size: 12px; margin: 9px 0 0; }
.field-hint.err { color: #e0685f; }

.connect-step.done { border-color: var(--border-2); }
.connect-step.done .x-input-row { display: none; }
.connect-step.done .field-hint { display: none; }

/* toast */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(18px); background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text); font-weight: 600; font-size: 14px; padding: 12px 20px; border-radius: var(--radius-sm); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 120; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: rgba(63,185,80,.4); }
.toast.warn { border-color: rgba(214,162,62,.45); }

/* =================== RESPONSIVE =================== */
@media (max-width: 920px) {
  .nav-links { display: none; }
  .hero, .split, .dashboard-grid, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding-top: 34px; }
  .section-heading { flex-direction: column; align-items: flex-start; }
  .footer { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .conn-chip { display: none !important; }
  .callout { padding: 32px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
