/* ====== BONE PIT · WHITEPAPER ====== */

[hidden]{ display: none !important; }

.wp-body{
  background: radial-gradient(ellipse at top, #15101e 0%, #07060a 60%) fixed;
}

/* ===== HERO ===== */
.wp-hero{
  position: relative;
  padding: 80px 28px 70px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--border);
}
.wp-hero-bg{
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.32) saturate(0.7);
  z-index: -2;
}
.wp-hero-overlay{
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(232,183,58,.12), transparent 60%),
    linear-gradient(180deg, rgba(7,6,10,.7), rgba(7,6,10,.92));
  z-index: -1;
}
.wp-hero-inner{ max-width: 760px; margin: 0 auto; }
.wp-hero h1{
  font-family:'Press Start 2P', monospace;
  font-size: clamp(36px, 6vw, 72px);
  margin: 18px 0 20px;
  background: linear-gradient(180deg, var(--bone), #b8a374);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(232,183,58,.2);
  letter-spacing: 4px;
  line-height: 1.15;
}
.wp-meta{
  display: flex; gap: 18px; align-items: center; justify-content: center;
  flex-wrap: wrap;
  font-family:'VT323', monospace;
  font-size: 19px;
  color: var(--ink-dim);
  letter-spacing: 1px;
  margin-bottom: 32px;
}
.wp-badge{
  font-family:'Press Start 2P', monospace;
  font-size: 11px;
  padding: 6px 10px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  color: #000;
  letter-spacing: 2px;
}
.wp-hero-actions{
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
}

/* ===== LAYOUT ===== */
.wp-layout{
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 28px 100px;
  align-items: start;
}

/* ===== TOC ===== */
.wp-toc{
  position: sticky;
  top: 88px;
  font-family:'VT323', monospace;
}
.toc-head{
  font-family:'Press Start 2P', monospace;
  font-size: 10px;
  color: var(--gold-2);
  letter-spacing: 2px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.toc-list{
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}
.toc-list li{
  counter-increment: toc;
  margin: 0;
}
.toc-list a{
  display: block;
  padding: 6px 0 6px 28px;
  font-size: 16px;
  color: var(--ink-dim);
  letter-spacing: .5px;
  position: relative;
  border-left: 2px solid transparent;
  transition: all .15s;
}
.toc-list a::before{
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 4px; top: 6px;
  font-size: 13px;
  color: #4a3a48;
  font-family:'Press Start 2P', monospace;
}
.toc-list a:hover{
  color: var(--bone);
  background: rgba(255,255,255,.02);
}
.toc-list a.active{
  color: var(--gold-2);
  border-left-color: var(--gold-2);
  background: rgba(232,183,58,.06);
}
.toc-list a.active::before{
  color: var(--gold-2);
}

/* ===== CONTENT ===== */
.wp-content{
  max-width: 760px;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--ink);
}

.wp-section{
  padding: 30px 0 50px;
  border-bottom: 1px dashed var(--border);
}
.wp-section:last-child{ border-bottom: none; }

.wp-section h2{
  font-family:'Press Start 2P', monospace;
  font-size: clamp(18px, 2.4vw, 24px);
  color: var(--bone);
  margin: 0 0 24px;
  letter-spacing: 1.5px;
  line-height: 1.4;
  display: flex; align-items: center; gap: 16px;
  scroll-margin-top: 80px;
}
.sec-n{
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  font-family:'Press Start 2P', monospace;
  font-size: 11px;
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
  color: #000;
  flex-shrink: 0;
  letter-spacing: 0;
  border: 1px solid var(--gold);
  box-shadow: 0 0 12px rgba(232,183,58,.25);
}

.wp-content p{
  margin: 0 0 18px;
}
.wp-content strong{
  color: var(--bone);
  font-weight: 700;
}
.wp-content em{
  color: var(--gold-2);
  font-style: italic;
}
.wp-content code{
  font-family:'VT323', monospace;
  font-size: 17px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  padding: 1px 8px;
  color: var(--gold-2);
}
.wp-content ul,
.wp-content ol{
  margin: 0 0 22px;
  padding-left: 22px;
}
.wp-content li{
  margin-bottom: 10px;
}
.wp-content ul li{ list-style: none; position: relative; padding-left: 16px; }
.wp-content ul li::before{
  content: "›";
  position: absolute; left: 0; top: 0;
  color: var(--blood-2);
  font-weight: bold;
}
.wp-steps li{
  padding: 12px 0 12px 18px;
  border-left: 2px solid var(--border);
  margin-bottom: 12px;
  list-style: none;
}
.wp-steps li:hover{ border-left-color: var(--gold); }
.wp-steps{ padding-left: 0; counter-reset: step; }

/* ===== TABLES ===== */
.wp-table-wrap{
  overflow-x: auto;
  margin: 0 0 26px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.3);
}
.wp-table{
  width: 100%;
  border-collapse: collapse;
}
.wp-table th,
.wp-table td{
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-family:'VT323', monospace;
  font-size: 17px;
}
.wp-table th{
  font-family:'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--ink-dim);
  background: rgba(255,255,255,.02);
  text-transform: uppercase;
}
.wp-table tr:last-child td{ border-bottom: none; }
.wp-table tbody tr:hover{ background: rgba(255,255,255,.02); }
.wp-table .row-avatar{
  background: linear-gradient(90deg, rgba(232,183,58,.1), rgba(232,183,58,.04)) !important;
}
.wp-table .row-avatar td{ color: var(--gold-2); }
.wp-table .row-highlight{
  background: rgba(181,28,28,.08) !important;
}
.wp-table .row-highlight td{ color: var(--blood-2); }

/* outcome rows */
.wp-table .r-crit td:first-child{ color: var(--blood-2); font-weight: bold; }
.wp-table .r-strong td:first-child{ color: var(--gold-2); }
.wp-table .r-normal td:first-child{ color: var(--ink); }
.wp-table .r-weak td:first-child{ color: #888; }
.wp-table .r-miss td:first-child{ color: #555; }

/* ===== QUOTE / CALLOUT ===== */
.wp-quote{
  margin: 0 0 22px;
  padding: 20px 26px;
  border-left: 4px solid var(--blood);
  background: linear-gradient(90deg, rgba(181,28,28,.12), rgba(0,0,0,.4));
  color: var(--bone);
  font-size: 16.5px;
  font-style: normal;
}
.wp-quote strong{ color: var(--blood-2); }

.wp-example{
  margin: 0 0 22px;
  padding: 18px 22px;
  background: rgba(0,0,0,.4);
  border: 1px solid var(--gold);
  border-left-width: 4px;
}
.ex-label{
  display: inline-block;
  font-family:'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #000;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  padding: 4px 8px;
  margin-bottom: 10px;
}
.wp-example p{ margin: 0; color: var(--ink); }

.wp-disclaimer{
  padding: 22px 26px;
  border: 1px dashed var(--blood);
  background: linear-gradient(90deg, rgba(181,28,28,.06), rgba(0,0,0,.3));
}
.wp-disclaimer p{
  margin: 0;
  font-style: italic;
  color: var(--ink-dim);
  font-size: 15px;
}

/* ===== FINAL SECTION ===== */
.wp-final{
  text-align: center;
  padding-bottom: 30px;
}
.wp-final p{
  font-size: 18px;
  max-width: 580px;
  margin: 0 auto 30px;
}
.wp-end{
  font-family:'Press Start 2P', monospace;
  font-size: 24px;
  background: linear-gradient(180deg, var(--bone), #b8a374);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 4px;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

/* ===== BACK TO TOP ===== */
.back-top{
  position: fixed;
  bottom: 22px;
  left: 22px;
  padding: 10px 14px;
  font-family:'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
  background: rgba(7,6,10,.85);
  border: 1px solid var(--border);
  color: var(--ink-dim);
  cursor: pointer;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all .25s;
  backdrop-filter: blur(8px);
}
.back-top.visible{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-top:hover{
  border-color: var(--gold);
  color: var(--gold-2);
}

/* ===== NAV ACTIVE ===== */
.nav-active{
  color: var(--gold-2) !important;
  position: relative;
}
.nav-active::after{
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px){
  .wp-layout{
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 40px 20px 80px;
  }
  .wp-toc{
    position: static;
    border: 1px solid var(--border);
    padding: 16px 20px;
    background: rgba(0,0,0,.35);
  }
  .toc-list{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 14px;
  }
}
@media (max-width: 640px){
  .wp-hero{ padding: 50px 16px 40px; }
  .wp-section h2{
    font-size: 16px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .sec-n{ width: 36px; height: 36px; font-size: 10px; }
  .toc-list{ grid-template-columns: 1fr; }
  .wp-content{ font-size: 15.5px; }
  .back-top{ left: 12px; bottom: 76px; }
}
