/* =========================================================
   REFERRAL — page styles (separate CSS, scoped)
   - Light/Dark aware
   - No inline hardcodings
   - Mobile safe
   ========================================================= */

/* Tokens / fallbacks */
:root{
  --page-max: 980px;
  --primary: #1a237e;
  --text: #333;
  --muted: #666;
  --border: #e5e7eb;
  --card: #fff;
  --bg: #f7f9ff;
  --shadow: 0 2px 6px rgba(0,0,0,.06);

  /* titles: mai deschis pe light/dark */
  --section-title-color: #3f51b5; /* light */
  --code-bg: #f5f7ff;
  --code-text: #242424;

  --bottom-nav-h: 64px; /* fallback pentru bottom nav */
}
[data-theme="dark"]{
  --text: #e5e7eb;
  --muted: #9aa6b2;
  --border: #243143;
  --card: #0f172a;
  --bg: #0b1220;
  --shadow: 0 2px 12px rgba(0,0,0,.35);

  --section-title-color: #a5b4fc; /* dark */
  --code-bg: #0b1220;
  --code-text: #e5e7eb;
}

/* Page wrap */
.ref-wrap{
  max-width: var(--page-max);
  margin: 2rem auto;
  padding: 0 clamp(12px, 3vw, 20px);
  color: var(--text);
}

/* Titles */
.ref-title{
  margin: 0 0 .75rem;
  text-align: center;
  font-weight: 800;
  font-size: clamp(20px, 2.6vw, 26px);
  color: var(--section-title-color);
}
.ref-h{
  margin: 1.25rem 0 .5rem;
  font-weight: 800;
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--section-title-color);
}

/* Text */
.ref-wrap p{
  margin: 0 0 .9rem;
  line-height: 1.6;
}
.ref-wrap ul{
  margin: .2rem 0 1rem 1.1rem;
  padding: 0;
  line-height: 1.6;
}

/* Code/Example boxes */
.ref-code{
  background: var(--code-bg);
  color: var(--code-text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: .95rem;
  overflow-x: auto;
  white-space: nowrap;
  box-shadow: var(--shadow);
  margin: .4rem 0 1rem;
}

/* Divider */
.ref-hr{
  height: 1px;
  background: var(--border);
  border: 0;
  margin: 1.4rem 0 1rem;
}

/* Bottom safe area (sub bottom-nav) */
body{
  padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
}
