/* ============================================================
   POXY Protocol Whitepaper — Lumina Dark Edition
   Stitch screen: d8136160668840818ee3afd0fd554f86
   Obsidian backdrop · glowing accent pink · code terminal
   ============================================================ */

.poxy-whitepaper-page {
  --wp-bg:          #050506;
  --wp-surface:     #0d0d0f;
  --wp-surface2:    rgba(13,13,15,0.8);
  --wp-border:      rgba(255,255,255,0.05);
  --wp-border-hi:   rgba(255,255,255,0.10);
  --wp-on:          #ffffff;
  --wp-muted:       #a1a1aa;
  --wp-dim:         #636365;
  --wp-accent:      #ff416c;
  --wp-accent-glow: rgba(255,65,108,0.15);
  --wp-teal:        #2dd4bf;
  --wp-code-bg:     rgba(5,5,6,0.85);
  --wp-radius:      1rem;
  --wp-radius-lg:   2rem;
  --wp-ease:        cubic-bezier(0.22,1,0.36,1);
  --wp-spring:      cubic-bezier(0.34,1.56,0.64,1);

  display: flex;
  flex-direction: column;
  background: var(--wp-bg);
  color: var(--wp-on);
  font-family: 'Hanken Grotesk', Inter, system-ui, sans-serif;
  position: relative;
  overflow: visible;
  overflow-x: clip;
}

/* Ambient accent glow */
.wp-ambient {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
}
.wp-ambient__glow {
  position: absolute;
  width: 800px; height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,65,108,0.07) 0%, transparent 70%);
  top: -200px; left: -200px;
  filter: blur(120px);
}

/* ── Layout shell ───────────────────────────────────────────── */
.wp-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  padding: 32px 20px 140px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}
@media (min-width: 768px) {
  .wp-shell {
    flex-direction: row;
    gap: 32px;
    padding: 40px 40px 160px;
  }
}
@media (min-width: 1280px) {
  .wp-shell { padding: 48px 64px 160px; gap: 48px; }
}

/* ── Sidebar navigation ─────────────────────────────────────── */
.wp-sidebar {
  width: 100%;
  margin-bottom: 32px;
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .wp-sidebar {
    width: 240px;
    margin-bottom: 0;
    position: sticky;
    top: 80px;
    align-self: flex-start;
  }
}
.wp-sidebar__inner {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 2.5rem;
  padding: 24px;
}
.wp-sidebar__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wp-dim);
  margin-bottom: 12px;
  padding: 0 8px;
}
.wp-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wp-sidebar__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: var(--wp-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.25s, background 0.25s, border-color 0.25s;
  text-align: left;
  background: transparent;
}
.wp-sidebar__item .material-symbols-outlined { font-size: 18px; flex-shrink: 0; }
.wp-sidebar__item:hover {
  color: #fff;
  background: rgba(255,255,255,0.04);
}
.wp-sidebar__item--active {
  color: #fff;
  background: rgba(255,65,108,0.10);
  border-color: var(--wp-accent);
  border-left-width: 3px;
  box-shadow: inset 0 0 20px rgba(255,65,108,0.04);
}
.wp-sidebar__item--active .material-symbols-outlined { color: var(--wp-accent); }

/* ── Main content area ──────────────────────────────────────── */
.wp-content {
  flex: 1;
  min-width: 0;
}

/* Kicker tag */
.wp-kicker {
  display: inline-block;
  background: rgba(255,65,108,0.10);
  color: var(--wp-accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,65,108,0.22);
  margin-bottom: 24px;
}

.wp-page-title {
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  line-height: 1;
  margin: 0 0 16px;
  /* Gradient title — matching Obsidian v2 */
  background: linear-gradient(135deg, #ffffff 35%, #fbcfe8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.wp-page-desc {
  font-size: 17px;
  line-height: 1.65;
  color: var(--wp-muted);
  margin: 0 0 48px;
  max-width: 40rem;
  border-left: 1px solid rgba(251,207,232,0.4);
  padding-left: 16px;
  padding-top: 4px;
  padding-bottom: 4px;
}

/* Section blocks */
.wp-section {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 2.5rem;
  padding: 36px;
  margin-bottom: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: visible; /* was hidden — clipped Immutable Heritage sub-cards at scroll end */
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transition: all 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
.wp-section:hover {
  border-color: rgba(255,255,255,0.12);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}
.wp-section__hover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,65,108,0.04), transparent);
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
  border-radius: inherit;
}
.wp-section:hover .wp-section__hover-overlay { opacity: 1; }
@media (min-width: 768px) { .wp-section { padding: 48px; } }

.wp-section__title {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 24px;
  position: relative;
  z-index: 1;
}
.wp-section__title .material-symbols-outlined {
  font-size: 36px;
  color: var(--wp-accent);
  flex-shrink: 0;
}
.wp-section__body {
  color: var(--wp-muted);
  font-size: 15px;
  line-height: 1.75;
  position: relative;
  z-index: 1;
}
.wp-section__body p { margin: 0 0 16px; }
.wp-section__body p:last-child { margin-bottom: 0; }

/* List items */
.wp-list {
  list-style: none;
  padding: 0; margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wp-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #d4d4d8;
  font-size: 15px;
  line-height: 1.55;
}
.wp-list li::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--wp-accent);
  margin-top: 8px;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(255,65,108,0.5);
}

/* Code block */
.wp-code-block {
  background: var(--wp-code-bg);
  border: 1px solid var(--wp-border);
  border-radius: var(--wp-radius);
  padding: 28px;
  font-family: 'JetBrains Mono', 'Space Mono', monospace;
  font-size: 13px;
  line-height: 1.75;
  overflow-x: auto;
  box-shadow: inset 0 2px 12px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
}
.wp-code-block pre { margin: 0; }
.wp-code-block .tok-kw   { color: var(--wp-accent); font-weight: 700; }
.wp-code-block .tok-fn   { color: #fff; font-weight: 700; }
.wp-code-block .tok-str  { color: var(--wp-teal); }
.wp-code-block .tok-cmt  { color: var(--wp-dim); font-style: italic; }
.wp-code-block .tok-num  { color: #fbbf24; }
.wp-code-block .tok-def  { color: var(--wp-on); }

/* Sub-grid 2-up for phase sections */
.wp-two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 28px;
  position: relative;
  z-index: 1;
}
@media (min-width: 600px) { .wp-two-col { grid-template-columns: 1fr 1fr; } }
.wp-sub-card {
  background: rgba(5,5,6,0.5);
  border: 1px solid var(--wp-border);
  border-radius: var(--wp-radius);
  padding: 24px;
  transition: border-color 0.3s;
}
.wp-sub-card:hover { border-color: rgba(255,65,108,0.25); }
.wp-sub-card__title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 10px;
}
/* Section groups — hide/show sections */
.wp-section-group { display: none; }
.wp-section-group--active { display: block; }

.wp-code-block code { display: block; }

.wp-sub-card__body {
  font-size: 13px;
  color: var(--wp-muted);
  line-height: 1.6;
  margin: 0;
}

/* ================================================================
   WHITEPAPER v4 — STITCH "UNIFIED WHITEPAPER (OBSIDIAN EDITION) v2"
   Source: Stitch screen 4ae89bd1e68d4df38cefc7db986d088b
   Every value taken directly from the downloaded HTML.
   ================================================================ */

/* Page background */
.poxy-whitepaper-page,
#stPanelWhitepaper {
  background: #050506 !important;
}

/* ── 1. AMBIENT GLOW
   Stitch: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2
            w-[800px] h-[800px] bg-white opacity-[0.02] blur-[150px] rounded-full"
   = centered white blob, NOT a pink glow in the corner ── */
.wp-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.wp-ambient__glow {
  /* reset old positioning */
  position: static !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  /* Stitch exact values */
  width: 800px !important;
  height: 800px !important;
  background: #ffffff !important;
  opacity: 0.02 !important;
  filter: blur(150px) !important;
  border-radius: 50% !important;
  flex-shrink: 0;
}

/* ── 2. KICKER TAG
   Stitch: bg-white/[0.05] border border-white/10 text-white rounded-[2.5rem]
   with a plain "w-2 h-2 rounded-full bg-white" dot — NO animation, NO pink ── */
.wp-kicker {
  background: rgba(255,255,255,0.05) !important;
  color: #ffffff !important;
  border-color: rgba(255,255,255,0.10) !important;
  backdrop-filter: blur(12px);
  border-radius: 2.5rem !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.wp-kicker::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff !important;   /* white dot */
  animation: none !important;       /* no pulsing */
  transform: none !important;
  opacity: 1 !important;
}

/* ── 3. PAGE TITLE
   Stitch: "text-white uppercase leading-none drop-shadow-lg"
   Plain white — no gradient, no pink ── */
.wp-page-title {
  color: #ffffff !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #ffffff !important;
  background-clip: unset !important;
}

/* ── 4. PAGE DESC LEFT BORDER
   Stitch: border-l (plain) — maps to white/20 ── */
.wp-page-desc {
  border-left-color: rgba(255,255,255,0.20) !important;
}

/* ── 5. ACTIVE SIDEBAR ITEM
   Stitch: "text-white border-l-[3px] bg-transparent"
   White left border, transparent background — NOT pink ── */
.wp-sidebar__item--active {
  color: #ffffff !important;
  background: transparent !important;
  border-color: transparent !important;
  border-left: 3px solid #ffffff !important;
  box-shadow: none !important;
}
.wp-sidebar__item--active .material-symbols-outlined {
  color: #ffffff !important;
}

/* ── 6. SECTION TITLE ICONS
   Stitch: icons have no explicit color class → inherit text-white ── */
.wp-section__title .material-symbols-outlined {
  color: #ffffff !important;
  font-size: 36px;
}

/* ── 7. SECTION HOVER OVERLAY
   Stitch: "absolute inset-0 bg-gradient-to-br from-white/[0.02] to-transparent" ── */
.wp-section__hover-overlay {
  background: linear-gradient(135deg, rgba(255,255,255,0.02), transparent) !important;
}

/* ── 8. LIST BULLETS
   Stitch uses list-disc list-inside (native bullets)
   Our custom ::before bullet should be white ── */
.wp-list li::before {
  background: #ffffff !important;
  box-shadow: none !important;
}

/* ── 9. SUB-CARDS
   Stitch: "bg-white/5 border border-white/10 p-6 rounded-xl" ── */
.wp-sub-card {
  background: rgba(255,255,255,0.05) !important;
  border-color: rgba(255,255,255,0.10) !important;
}
.wp-sub-card:hover {
  border-color: rgba(255,255,255,0.20) !important;
}
.wp-sub-card__title {
  color: #ffffff !important;
}

/* ── 10. CODE BLOCK
   Stitch: bg-[#020203], green keywords, white function names,
   teal strings (text-teal-accent = #2dd4bf), gray comments ── */
.wp-code-block {
  background: #020203 !important;
  border-color: rgba(255,255,255,0.08) !important;
}
.wp-code-block .tok-kw  { color: #4ade80 !important; font-weight: 700; }  /* green */
.wp-code-block .tok-fn  { color: #ffffff !important; font-weight: 700; }  /* white */
.wp-code-block .tok-str { color: #2dd4bf !important; }                    /* teal */
.wp-code-block .tok-cmt { color: #636363 !important; font-style: italic; } /* gray */
.wp-code-block .tok-num { color: #fbbf24 !important; }                    /* amber */

/* ── 11. SYS_LOG terminal block (Phase 3)
   Stitch: "bg-[#020203] border border-white/10 p-6 rounded-xl text-sm font-mono text-gray-500"
   with "text-green-400" SYS_LOG: label ── */
.wp-sys-log {
  background: #020203;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  padding: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #6b7280;
  margin-top: 32px;
}
.wp-sys-log__label {
  color: #4ade80;
}

/* ── 12. SIDEBAR inner card ── */
.wp-sidebar__inner {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 2.5rem;
}

/* ── 13. SIDEBAR LABEL — Stitch: "text-gray-500 uppercase tracking-widest font-bold" ── */
.wp-sidebar__label {
  font-family: 'Hanken Grotesk', Inter, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #6b7280;
  text-transform: uppercase;
}

/* ── Scroll fix: Philosophy / Immutable Heritage bottom clearance ── */
#stPanelWhitepaper.st-spa-panel,
#stPanelWhitepaper .poxy-whitepaper-page {
  min-height: auto !important;
  height: auto;
  overflow: visible;
}
.wp-section-group--active {
  padding-bottom: 24px;
}
.wp-section-group--active .wp-section:last-child {
  margin-bottom: 0;
}
body.poxy-stitch-dash:has(#stPanelWhitepaper:not([hidden])) {
  scroll-padding-bottom: 96px;
}
