/* ============================================================
   PepFlow — design tokens & base
   ============================================================ */
:root {
  --bg: #0a0b12;
  --bg-elevated: #12131e;
  --bg-card: #161826;
  --border: #262939;
  --border-light: #33364a;

  --text: #f4f5f9;
  --text-muted: #a7aabd;
  --text-faint: #6f7288;

  --pink: #fa2578;
  --pink-light: #ff5fa3;
  --pink-dark: #c8125a;
  --cyan: #22d3ee;
  --gold: #ffb020;
  --green: #3ddc97;
  --red: #ff5c6c;

  --gradient-brand: linear-gradient(135deg, var(--pink) 0%, #b31859 55%, #6d1b8f 100%);
  --gradient-cta: linear-gradient(135deg, var(--pink) 0%, var(--pink-light) 100%);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-card: 0 10px 30px -12px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 0 1px rgba(250, 37, 120, 0.25), 0 12px 34px -10px rgba(250, 37, 120, 0.35);

  --font-heading: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --max-width: 1180px;
}

* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(680px 420px at 85% -8%, rgba(250, 37, 120, 0.16), transparent 60%),
    radial-gradient(560px 380px at 5% 8%, rgba(34, 211, 238, 0.10), transparent 60%);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--pink-light); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #ffffff;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin: 0 0 1rem; }
h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 3rem 0 1.1rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
}
h3 { font-size: clamp(1.15rem, 2.2vw, 1.45rem); margin: 2rem 0 0.9rem; color: var(--pink-light); }
h4 { font-size: 1.1rem; margin: 1.6rem 0 0.7rem; color: #fff; }

p { margin: 0 0 1.1rem; color: var(--text-muted); }
.lead p, .lead { color: var(--text); }

ul, ol { color: var(--text-muted); padding-left: 1.3rem; margin: 0 0 1.2rem; }
li { margin-bottom: 0.55rem; }
li strong, li b { color: var(--text); }
strong, b { color: #fff; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 11, 18, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand img { height: 34px; width: auto; }
.brand span {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  letter-spacing: -0.02em;
}
.site-nav { display: flex; gap: 1.5rem; }
.site-nav a { color: var(--text-muted); font-size: 0.92rem; font-weight: 500; }
.site-nav a:hover { color: #fff; text-decoration: none; }
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gradient-cta);
  color: #1a0410 !important;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  box-shadow: var(--shadow-glow);
}
.header-cta:hover { text-decoration: none; filter: brightness(1.05); }

@media (max-width: 760px) {
  .site-nav { display: none; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero { padding: 3rem 0 1.5rem; }
.hero .badge-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.1rem; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
}
.badge.accent { color: var(--pink-light); border-color: rgba(250,37,120,0.4); }

.hero-lead { max-width: 820px; font-size: 1.08rem; }
.hero-lead p { color: var(--text); }

/* Byline */
.byline {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.5rem 0 2.2rem;
  padding: 0.9rem 1.1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  max-width: 620px;
}
.byline img {
  width: 46px; height: 46px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--pink);
}
.byline .who { font-size: 0.86rem; color: var(--text-muted); line-height: 1.4; }
.byline .who strong { color: #fff; display: block; font-size: 0.95rem; }
.byline .who a { color: var(--pink-light); font-size: 0.82rem; }

/* ============================================================
   Toplist (above the fold)
   ============================================================ */
.toplist-section {
  margin: 0 0 3rem;
  padding: 1.75rem 1.5rem 2rem;
  background: linear-gradient(180deg, rgba(250,37,120,0.10), rgba(22,24,38,0.4));
  border: 1px solid rgba(250,37,120,0.28);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.toplist-section .tl-head { margin-bottom: 1.2rem; }
.toplist-section h2 {
  border: none; margin: 0 0 0.35rem; padding: 0;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
}
.toplist-section .tl-sub { color: var(--text-muted); font-size: 0.92rem; margin: 0; }
[data-toplist] { min-height: 120px; }

/* ============================================================
   Article typography helpers
   ============================================================ */
.article { padding-bottom: 2rem; }
.article > .wrap { max-width: 880px; }

/* ------------------------------------------------------------
   Visual diagrams (replace raw ASCII-art blocks)
   ------------------------------------------------------------ */

/* Vertical pipeline (RTP architecture) */
.flow-diagram {
  margin: 1.4rem 0 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.flow-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem;
}
.flow-box-outer { padding-bottom: 1.3rem; }
.flow-box-title {
  font-family: var(--font-heading);
  font-weight: 700;
  color: #fff;
  font-size: 0.98rem;
  margin-bottom: 0.5rem;
}
.flow-box ul, .flow-subbox ul { margin: 0; padding-left: 1.1rem; }
.flow-box li, .flow-subbox li { margin-bottom: 0.25rem; font-size: 0.9rem; }
.flow-note { color: var(--text-faint); font-size: 0.82rem; margin: -0.3rem 0 0.8rem; font-style: italic; }
.flow-arrow {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--cyan);
  font-size: 0.78rem;
  font-family: "SFMono-Regular", Consolas, monospace;
  padding: 0.5rem 0;
}
.flow-arrow::before, .flow-arrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-light);
  min-width: 1.5rem;
}
.flow-subbox {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  margin-top: 0.9rem;
}
.flow-arrow-sm { height: 1.4rem; border-left: 1px dashed var(--border-light); margin-left: 1.4rem; }

.rtp-bands {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.6rem;
}
.rtp-band {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.7rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}
.rtp-band span { font-size: 0.72rem; color: var(--text-faint); }
.rtp-band.active {
  border-color: var(--pink);
  background: rgba(250, 37, 120, 0.12);
  color: #fff;
  font-weight: 600;
}
.rtp-band.active span { color: var(--pink-light); }
@media (max-width: 560px) { .rtp-bands { grid-template-columns: 1fr; } }

/* Side-by-side comparison cards (bonus models) */
.compare-diagram {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.4rem 0 1.8rem;
}
.compare-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
}
.compare-title {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--pink-light);
  font-size: 0.92rem;
  margin-bottom: 0.8rem;
}
.compare-split { display: flex; gap: 0.5rem; margin-bottom: 0.8rem; }
.compare-split.single { display: block; }
.split-part {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.7rem;
  font-size: 0.8rem;
  color: var(--text);
  text-align: center;
}
.split-part.alt { border-color: rgba(250,37,120,0.4); color: var(--pink-light); }
.split-part.full { background: var(--bg-elevated); }
.compare-card ul { margin: 0; padding-left: 1.1rem; }
.compare-card li { font-size: 0.85rem; margin-bottom: 0.4rem; }
@media (max-width: 640px) { .compare-diagram { grid-template-columns: 1fr; } }

/* Two-column workflow pipelines (fiat vs blockchain) */
.flow-diagram-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.4rem 0 1.8rem;
}
.flow-column {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
}
.flow-column-title {
  font-family: var(--font-heading);
  font-weight: 700;
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
}
.pipeline { display: flex; flex-direction: column; gap: 0.4rem; }
.pipeline-node {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  font-size: 0.82rem;
  color: var(--text);
  text-align: center;
}
.pipeline-node span { display: block; color: var(--text-faint); font-size: 0.72rem; margin-top: 0.15rem; }
.pipeline-arrow { text-align: center; color: var(--cyan); font-size: 0.9rem; }
.flow-notes { margin: 0.8rem 0 0; padding-left: 1.1rem; }
.flow-notes li { font-size: 0.78rem; color: var(--text-faint); margin-bottom: 0.25rem; }
@media (max-width: 640px) { .flow-diagram-columns { grid-template-columns: 1fr; } }

/* Stacked tier / level cards (jurisdiction hierarchy, self-protection levels) */
.tier-diagram {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 1.4rem 0 1.8rem;
}
.tier-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--pink);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1rem 1.2rem;
}
.tier-card:nth-child(2) { border-left-color: var(--cyan); }
.tier-card:nth-child(3) { border-left-color: var(--gold); }
.tier-title {
  font-family: var(--font-heading);
  font-weight: 700;
  color: #fff;
  font-size: 0.96rem;
  margin-bottom: 0.15rem;
}
.tier-sub { color: var(--text-faint); font-size: 0.78rem; margin-bottom: 0.6rem; }
.tier-card ul { margin: 0; padding-left: 1.1rem; }
.tier-card li { font-size: 0.87rem; margin-bottom: 0.3rem; }

/* Vertical timeline (complaint escalation phases) */
.timeline-diagram { margin: 1.4rem 0 1.8rem; }
.timeline-step {
  display: flex;
  gap: 1rem;
  position: relative;
  padding-bottom: 1.4rem;
}
.timeline-step::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 34px;
  bottom: 0;
  width: 1px;
  background: var(--border-light);
}
.timeline-step:last-child::before { display: none; }
.timeline-marker {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gradient-cta);
  color: #1a0410;
  font-weight: 700;
  font-family: var(--font-heading);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
}
.timeline-final .timeline-marker { background: var(--green); color: #06231a; }
.timeline-title { font-family: var(--font-heading); font-weight: 700; color: #fff; font-size: 0.95rem; margin-bottom: 0.4rem; }
.timeline-content ul { margin: 0 0 0.5rem; padding-left: 1.1rem; }
.timeline-content li { font-size: 0.87rem; margin-bottom: 0.25rem; }
.timeline-content p { margin: 0; font-size: 0.87rem; }
.timeline-condition { color: var(--pink-light); font-size: 0.8rem; font-style: italic; }

.formula {
  background: var(--bg-elevated);
  border-left: 3px solid var(--pink);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.85rem 1.1rem;
  margin: 1rem 0 1.4rem;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.9rem;
  color: var(--text);
  overflow-x: auto;
}

/* ============================================================
   Tables
   ============================================================ */
.table-scroll { overflow-x: auto; margin: 1.2rem 0 1.8rem; border-radius: var(--radius-md); }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: 0.92rem;
}
thead th {
  background: #1c1e2e;
  color: #fff;
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.84rem;
  white-space: nowrap;
}
tbody td {
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}
tbody tr:nth-child(odd) { background: rgba(255,255,255,0.015); }
td.k { color: #fff; font-weight: 600; width: 34%; }
td.v { color: var(--text-muted); }

/* Mobile: genuinely stacked tables, not just scrollable */
@media (max-width: 700px) {
  .table-scroll { overflow-x: visible; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  table { border: none; background: none; }
  tr {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 0.8rem;
    padding: 0.4rem 0.2rem;
  }
  td { border-top: none; padding: 0.45rem 0.9rem; }

  /* Full data-label stacking for multi-column tables */
  table.stack td:not(.k):not(.v)::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--pink-light);
    font-weight: 700;
    margin-bottom: 0.15rem;
  }

  /* Simple key/value stacking for 2-col spec tables */
  table.spec td.k { padding-bottom: 0.1rem; }
  table.spec td.v { padding-top: 0.1rem; margin-bottom: 0.3rem; }
}

/* ============================================================
   Brand review cards
   ============================================================ */
.brand-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.6rem 1.7rem;
  margin: 1.4rem 0 2.2rem;
  box-shadow: var(--shadow-card);
}
.brand-card .bc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}
.brand-card .bc-title { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.brand-card .bc-title h4 { margin: 0; font-size: 1.35rem; color: #fff; }
.bc-rating { color: var(--gold); font-weight: 700; font-size: 0.9rem; white-space: nowrap; }
.bc-bonus {
  font-size: 0.95rem;
  color: var(--pink-light);
  font-weight: 600;
  margin: 0.2rem 0 1rem;
}
.bc-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gradient-cta);
  color: #1a0410;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  box-shadow: var(--shadow-glow);
  white-space: nowrap;
}
.bc-cta:hover { text-decoration: none; filter: brightness(1.06); }

.bc-features { margin: 1rem 0 0; }
.bc-features li { color: var(--text-muted); }

.bc-proscons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.2rem;
}
.bc-pro, .bc-con {
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
}
.bc-pro { background: rgba(61, 220, 151, 0.08); border: 1px solid rgba(61, 220, 151, 0.3); }
.bc-con { background: rgba(255, 92, 108, 0.08); border: 1px solid rgba(255, 92, 108, 0.3); }
.bc-pro .bc-box-title { color: var(--green); }
.bc-con .bc-box-title { color: var(--red); }
.bc-box-title { font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; margin: 0 0 0.5rem; }
.bc-proscons ul { margin: 0; padding-left: 1.1rem; }
.bc-proscons li { margin-bottom: 0.3rem; color: var(--text-muted); }

@media (max-width: 560px) {
  .bc-proscons { grid-template-columns: 1fr; }
}

/* ============================================================
   Comparison table wrap already covered by table.stack
   ============================================================ */

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { margin: 1.2rem 0 2rem; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.7rem;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.2rem;
  font-weight: 600;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--pink-light);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-a { padding: 0 1.2rem 1.1rem; color: var(--text-muted); }
.faq-item .faq-a p:last-child { margin-bottom: 0; }

/* ============================================================
   Author bio box
   ============================================================ */
.author-box {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
  margin: 1.6rem 0 2.4rem;
}
.author-box img {
  width: 78px; height: 78px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--pink); flex-shrink: 0;
}
.author-box h3 { margin: 0 0 0.2rem; color: #fff; font-size: 1.1rem; }
.author-box .role { color: var(--pink-light); font-size: 0.85rem; font-weight: 600; margin-bottom: 0.6rem; }
.author-box p { font-size: 0.92rem; margin-bottom: 0.5rem; }

@media (max-width: 560px) {
  .author-box { flex-direction: column; align-items: center; text-align: center; }
}

/* ============================================================
   Comparison intro table (4 operators) reuse .stack
   ============================================================ */

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.4rem 0 2.6rem;
  margin-top: 2rem;
  background: var(--bg-elevated);
}
.footer-disclaimer {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.6rem;
  font-size: 0.84rem;
  color: var(--text-faint);
}
.footer-disclaimer .age-badge {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gradient-cta);
  color: #1a0410;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-bottom: 1.2rem;
}
.footer-links a { color: var(--text-muted); font-size: 0.86rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--text-faint);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  padding-top: 1.2rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.2rem; }
.footer-brand img { height: 26px; }
.footer-brand span { font-family: var(--font-heading); font-weight: 700; color: #fff; }

/* Back to top */
.back-top {
  display: inline-block;
  margin-top: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}
