:root {
  --wp-bg: #05070c;
  --wp-panel: rgba(8, 13, 22, 0.9);
  --wp-panel-strong: rgba(11, 16, 27, 0.97);
  --wp-line: rgba(255, 138, 61, 0.28);
  --wp-line-soft: rgba(255, 255, 255, 0.1);
  --wp-orange: #ff8a3d;
  --wp-gold: #f5c84b;
  --wp-cyan: #65d7ff;
  --wp-violet: #b477ff;
  --wp-green: #75e7a8;
  --wp-red: #ff6275;
  --wp-text: #edf4ff;
  --wp-muted: #a9b6ca;
  --wp-dim: #6f7b90;
}

html {
  scroll-behavior: smooth;
}

body.whitepaper-page {
  min-height: 100vh;
  color: var(--wp-text);
  background:
    linear-gradient(180deg, rgba(5, 7, 12, 0.74), rgba(5, 7, 12, 0.96) 46%, #05070c 100%),
    linear-gradient(115deg, rgba(255, 138, 61, 0.09), transparent 34%, rgba(180, 119, 255, 0.08) 72%, transparent),
    url("/images/misfit-galaxy-background.png") center top / cover fixed,
    var(--wp-bg);
}

.wp-shell {
  width: min(100% - 40px, 1560px);
  margin: 0 auto;
  padding: 22px 0 72px;
}

.wp-hero {
  min-height: clamp(520px, 72vh, 780px);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 138, 61, 0.32);
  background: #06080d;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.52);
}

.wp-hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wp-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 6, 10, 0.98) 0%, rgba(4, 6, 10, 0.84) 38%, rgba(4, 6, 10, 0.3) 78%),
    linear-gradient(0deg, rgba(4, 6, 10, 0.96), transparent 42%);
}

.wp-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 850px;
  padding: clamp(34px, 6vw, 74px);
  display: grid;
  align-content: end;
  min-height: inherit;
}

.wp-kicker,
.wp-index-title,
.wp-tab,
.wp-btn,
.wp-facts dt,
.wp-flow span,
.wp-timeline span {
  font-family: "Share Tech Mono", monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.wp-kicker {
  margin: 0 0 12px;
  color: var(--wp-orange);
  font-size: 13px;
}

.wp-hero h1,
.wp-panel h2,
.wp-panel h3 {
  font-family: "Orbitron", "Rajdhani", system-ui, sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.wp-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(42px, 6.8vw, 94px);
  line-height: 0.98;
  text-shadow: 0 0 34px rgba(255, 138, 61, 0.28);
}

.wp-hero-lede {
  margin: 20px 0 0;
  color: #d9e2f1;
  font-size: clamp(17px, 1.7vw, 22px);
  line-height: 1.55;
  max-width: 760px;
}

.wp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.wp-btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid rgba(255, 138, 61, 0.58);
  background: rgba(255, 138, 61, 0.16);
  color: #fff;
  text-decoration: none;
  font-size: 12px;
}

.wp-btn:hover,
.wp-btn:focus-visible {
  color: #fff;
  background: rgba(255, 138, 61, 0.26);
  border-color: var(--wp-orange);
  outline: none;
}

.wp-btn-secondary {
  border-color: rgba(101, 215, 255, 0.34);
  background: rgba(101, 215, 255, 0.08);
}

.wp-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 34px 0 0;
  max-width: 720px;
}

.wp-hero-metrics div,
.wp-disclaimer,
.wp-panel,
.wp-index-inner,
.wp-feature-grid section,
.wp-principles,
.wp-flow div,
.wp-facts div,
.wp-callout,
.wp-timeline section {
  border: 1px solid var(--wp-line-soft);
  background: var(--wp-panel);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
}

.wp-hero-metrics div {
  padding: 14px;
}

.wp-hero-metrics dt {
  color: var(--wp-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.wp-hero-metrics dd {
  margin: 5px 0 0;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
}

.wp-disclaimer {
  margin-top: 18px;
  padding: 16px 18px;
  color: #d4deed;
  line-height: 1.55;
  border-color: rgba(245, 200, 75, 0.24);
  background: rgba(35, 25, 12, 0.8);
}

.wp-disclaimer strong {
  color: var(--wp-gold);
}

.wp-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.wp-index {
  position: relative;
}

.wp-index-inner {
  position: sticky;
  top: 18px;
  padding: 16px;
  background: rgba(8, 13, 22, 0.82);
}

.wp-index-title {
  margin: 0 0 10px;
  color: var(--wp-orange);
  font-size: 12px;
}

.wp-index a {
  display: block;
  padding: 8px 10px;
  color: var(--wp-muted);
  border-left: 2px solid transparent;
  text-decoration: none;
  font-size: 14px;
}

.wp-index a:hover,
.wp-index a.is-active {
  color: #fff;
  border-left-color: var(--wp-orange);
  background: rgba(255, 138, 61, 0.08);
}

.wp-document {
  min-width: 0;
}

.wp-tabs-wrap {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0 0 12px;
  background: linear-gradient(180deg, rgba(5, 7, 12, 0.96), rgba(5, 7, 12, 0.72));
  backdrop-filter: blur(12px);
}

.wp-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px;
  border: 1px solid var(--wp-line-soft);
  background: rgba(8, 13, 22, 0.9);
  scrollbar-width: thin;
}

.wp-tab {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--wp-muted);
  cursor: pointer;
  font-size: 12px;
}

.wp-tab:hover,
.wp-tab:focus-visible,
.wp-tab.is-active {
  color: #fff;
  border-color: rgba(255, 138, 61, 0.64);
  background: rgba(255, 138, 61, 0.14);
  outline: none;
}

.wp-panel {
  padding: clamp(22px, 3.8vw, 44px);
  min-height: 600px;
  border-color: rgba(255, 138, 61, 0.18);
}

.wp-panel + .wp-panel {
  margin-top: 18px;
}

.wp-panel[hidden] {
  display: none;
}

.wp-panel h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
}

.wp-panel h3 {
  margin: 0 0 10px;
  color: var(--wp-gold);
  font-size: 16px;
}

.wp-panel p,
.wp-panel li {
  color: #c8d3e4;
  font-size: 16px;
  line-height: 1.68;
}

.wp-panel p {
  margin: 0 0 14px;
}

.wp-panel ul {
  margin: 0;
  padding-left: 18px;
}

.wp-panel-grid,
.wp-media-row {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.72fr);
  gap: 22px;
  align-items: start;
}

.wp-principles,
.wp-feature-grid section {
  padding: 18px;
}

.wp-media-row {
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1fr);
}

.wp-media-row img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid rgba(255, 138, 61, 0.22);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.32);
}

.wp-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.wp-feature-grid.wp-tight section {
  min-height: 145px;
}

.wp-flow,
.wp-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 0;
}

.wp-flow div,
.wp-facts div {
  padding: 16px;
  min-height: 108px;
}

.wp-flow span,
.wp-facts dt {
  display: block;
  color: var(--wp-cyan);
  font-size: 11px;
}

.wp-flow strong,
.wp-facts dd {
  display: block;
  margin: 8px 0 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.25;
}

.wp-facts dd {
  margin-left: 0;
}

.wp-callout {
  margin-top: 20px;
  padding: 16px 18px;
  color: #d4deed;
  line-height: 1.6;
  border-color: rgba(101, 215, 255, 0.24);
  background: rgba(8, 22, 34, 0.82);
}

.wp-callout strong {
  color: var(--wp-cyan);
}

.wp-warning {
  border-color: rgba(255, 98, 117, 0.28);
  background: rgba(42, 13, 19, 0.82);
}

.wp-warning strong {
  color: var(--wp-red);
}

.wp-timeline {
  display: grid;
  gap: 14px;
}

.wp-timeline section {
  padding: 18px;
  border-left: 3px solid rgba(255, 138, 61, 0.6);
}

.wp-timeline span {
  display: block;
  color: var(--wp-cyan);
  font-size: 11px;
  margin-bottom: 8px;
}

.tok-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.tok-stat,
.tok-allocation article,
.tok-callout {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 13, 22, 0.9);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
}

.tok-stat {
  min-height: 136px;
  padding: 18px;
}

.tok-stat span,
.tok-allocation span {
  display: block;
  color: var(--wp-cyan);
  font-family: "Share Tech Mono", monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.tok-stat strong {
  display: block;
  margin-top: 10px;
  color: #fff;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1;
}

.tok-stat em {
  display: block;
  margin-top: 10px;
  color: var(--wp-muted);
  font-style: normal;
}

.tok-callout {
  margin-top: 18px;
  padding: 16px 18px;
  color: #d4deed;
  line-height: 1.6;
  border-color: rgba(245, 200, 75, 0.3);
  background: rgba(37, 27, 10, 0.82);
}

.tok-callout strong {
  color: var(--wp-gold);
}

.tok-table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 13, 22, 0.9);
}

.tok-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.tok-table th,
.tok-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.tok-table th {
  color: var(--wp-orange);
  font-family: "Share Tech Mono", monospace;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: rgba(255, 138, 61, 0.08);
}

.tok-table td {
  color: #d3deee;
}

.tok-table .tok-recommended td {
  color: #fff;
  background: rgba(117, 231, 168, 0.08);
}

.tok-allocation {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.tok-allocation article {
  padding: 16px;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.tok-allocation article::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  width: calc(var(--pct) * 1%);
  background: linear-gradient(90deg, var(--wp-orange), var(--wp-cyan));
}

.tok-allocation strong {
  display: block;
  color: #fff;
  font-size: 36px;
  line-height: 1;
}

.tok-allocation span {
  margin-top: 6px;
}

.tok-allocation p {
  margin: 0;
}

@media (max-width: 1040px) {
  .wp-layout {
    grid-template-columns: 1fr;
  }

  .wp-index {
    display: none;
  }

  .wp-panel-grid,
  .wp-media-row,
  .wp-feature-grid,
  .wp-flow,
  .wp-facts,
  .tok-stat-grid,
  .tok-allocation article {
    grid-template-columns: 1fr;
  }

  .wp-media-row img {
    order: -1;
  }
}

@media (max-width: 680px) {
  .wp-shell {
    width: min(100% - 24px, 1560px);
    padding-top: 12px;
  }

  .wp-hero {
    min-height: 620px;
  }

  .wp-hero-shade {
    background:
      linear-gradient(180deg, rgba(4, 6, 10, 0.72) 0%, rgba(4, 6, 10, 0.96) 58%, rgba(4, 6, 10, 0.98) 100%);
  }

  .wp-hero-copy {
    padding: 28px 18px;
    align-content: end;
  }

  .wp-hero-metrics {
    grid-template-columns: 1fr;
  }

  .wp-panel {
    padding: 20px 16px;
    min-height: auto;
  }

  .wp-tabs {
    padding: 8px;
  }

  .wp-tab {
    min-height: 40px;
    padding: 0 11px;
    font-size: 11px;
  }

  .tok-stat-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  body.whitepaper-page {
    background: #fff !important;
    color: #111 !important;
  }

  .customer-nav-header,
  .wp-tabs-wrap,
  .wp-index,
  .wp-hero-actions {
    display: none !important;
  }

  .wp-shell {
    width: 100%;
    padding: 0;
  }

  .wp-hero,
  .wp-disclaimer,
  .wp-panel,
  .wp-feature-grid section,
  .wp-principles,
  .wp-flow div,
  .wp-facts div,
  .wp-callout,
  .wp-timeline section {
    box-shadow: none !important;
    background: #fff !important;
    color: #111 !important;
    border-color: #999 !important;
  }

  .wp-hero {
    min-height: auto;
  }

  .wp-hero-art,
  .wp-hero-shade {
    display: none;
  }

  .wp-hero-copy {
    min-height: auto;
    max-width: none;
    padding: 24px 0;
  }

  .wp-panel[hidden] {
    display: block;
  }

  .wp-panel {
    page-break-inside: avoid;
    min-height: auto;
    margin-top: 16px;
  }

  .wp-panel p,
  .wp-panel li,
  .wp-disclaimer {
    color: #222 !important;
  }
}
