/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #07070f;
  --bg2:       #0d0d1a;
  --card:      #13132a;
  --border:    rgba(124,58,237,.18);
  --border2:   rgba(255,255,255,.07);
  --purple:    #7c3aed;
  --purple-l:  #9d5df5;
  --cyan:      #06b6d4;
  --cyan-l:    #22d3ee;
  --green:     #10b981;
  --yellow:    #f59e0b;
  --red:       #ef4444;
  --text:      #e2e8f0;
  --muted:     #94a3b8;
  --dim:       #64748b;
  --grad:      linear-gradient(135deg, #7c3aed, #06b6d4);
  --grad2:     linear-gradient(135deg, #9d5df5, #22d3ee);
  --sidebar-w: 260px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--purple-l); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: 'JetBrains Mono', monospace;
  font-size: .82em;
  background: rgba(124,58,237,.12);
  border: 1px solid rgba(124,58,237,.2);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--purple-l);
}

/* ─── TOP BAR ─── */
.wp-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7,7,15,.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border2);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 32px;
  height: 60px;
}

.wp-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  text-decoration: none;
}
.wp-logo-icon {
  font-size: 1.3rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.wp-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: var(--dim);
  margin-left: 8px;
}
.wp-dot { color: var(--border2); }

.wp-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
  align-items: center;
}
.wp-btn-outline {
  background: none;
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  padding: 7px 14px;
  cursor: pointer;
  transition: all .2s;
}
.wp-btn-outline:hover { border-color: var(--purple); color: var(--purple-l); }
.wp-btn-primary {
  background: var(--grad);
  border-radius: 8px;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  padding: 8px 16px;
  text-decoration: none;
  transition: opacity .2s;
}
.wp-btn-primary:hover { opacity: .85; text-decoration: none; }

/* ─── LAYOUT ─── */
.wp-layout {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 60px);
}

/* ─── SIDEBAR ─── */
.wp-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 32px 0 32px 24px;
  border-right: 1px solid var(--border2);
  display: flex;
  flex-direction: column;
}
.wp-sidebar::-webkit-scrollbar { width: 3px; }
.wp-sidebar::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 99px; }

.toc-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--dim);
  margin-bottom: 12px;
}

.toc { display: flex; flex-direction: column; gap: 2px; flex: 1; }

.toc-link {
  font-size: .8rem;
  color: var(--dim);
  padding: 5px 10px 5px 8px;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all .15s;
  text-decoration: none;
  line-height: 1.4;
}
.toc-link:hover { color: var(--text); background: rgba(255,255,255,.04); text-decoration: none; }
.toc-link.active {
  color: var(--purple-l);
  border-left-color: var(--purple);
  background: rgba(124,58,237,.08);
}
.toc-sub { padding-left: 20px; font-size: .75rem; }

.toc-footer { padding-top: 20px; border-top: 1px solid var(--border2); margin-top: 16px; }
.toc-back {
  font-size: .78rem;
  color: var(--dim);
  text-decoration: none;
  transition: color .2s;
}
.toc-back:hover { color: var(--purple-l); text-decoration: none; }

/* ─── MAIN ─── */
.wp-main {
  flex: 1;
  padding: 48px 64px 80px;
  max-width: 820px;
}

/* cover */
.wp-cover {
  text-align: center;
  padding: 48px 0 56px;
  border-bottom: 1px solid var(--border2);
  margin-bottom: 56px;
}
.cover-hex {
  font-size: 3.5rem;
  background: var(--grad2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}
.cover-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 10px;
}
.cover-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 20px;
}
.cover-meta {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: .78rem;
  color: var(--dim);
}

/* sections */
section { margin-bottom: 0; scroll-margin-top: 80px; }

.wp-h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0 0 20px;
  padding-top: 48px;
}
.wp-h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--purple-l);
  scroll-margin-top: 80px;
}

.wp-lead {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 16px;
}

p { color: var(--muted); margin-bottom: 14px; font-size: .95rem; }

.wp-divider {
  border: none;
  border-top: 1px solid var(--border2);
  margin: 0;
}

/* lists */
.wp-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 16px;
}
.wp-list li {
  font-size: .92rem;
  color: var(--muted);
  padding-left: 18px;
  position: relative;
  line-height: 1.6;
}
.wp-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-weight: 700;
}
.wp-list-ol { list-style: none; counter-reset: ol-counter; }
.wp-list-ol li { counter-increment: ol-counter; }
.wp-list-ol li::before {
  content: counter(ol-counter) '.';
  color: var(--purple-l);
  font-weight: 700;
  font-size: .8rem;
}

/* callout */
.wp-callout {
  background: rgba(124,58,237,.08);
  border: 1px solid rgba(124,58,237,.25);
  border-left: 3px solid var(--purple);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: .88rem;
  color: var(--muted);
  margin: 16px 0;
  line-height: 1.6;
}
.callout-info {
  background: rgba(6,182,212,.07);
  border-color: rgba(6,182,212,.25);
  border-left-color: var(--cyan);
}
.callout-warn {
  background: rgba(245,158,11,.07);
  border-color: rgba(245,158,11,.2);
  border-left-color: var(--yellow);
}
.callout-warning {
  background: rgba(239,68,68,.06);
  border-color: rgba(239,68,68,.2);
  border-left-color: #ef4444;
}

/* IDO metrics grid */
.ido-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  overflow: hidden;
  margin: 20px 0;
}
.ido-metric {
  background: var(--bg2);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ido-metric-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.ido-metric-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}
.ido-metric-value small {
  font-size: .72rem;
  font-weight: 500;
  color: var(--muted);
  margin-left: 2px;
}

/* Highlight row in tables (Zenthis row in comparables) */
.highlight-row td {
  background: rgba(124,58,237,.08);
  color: var(--text);
}

/* steps */
.wp-steps { display: flex; flex-direction: column; gap: 0; margin: 16px 0; }
.wp-step {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border2);
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.6;
}
.wp-step:last-child { border-bottom: none; }
.step-n {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  background: var(--grad2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
  width: 20px;
  margin-top: 2px;
}

/* figure */
.wp-figure { margin: 24px 0; }
.figure-diagram {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 10px;
}
.fragmentation-diagram {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.fd-chain {
  background: rgba(124,58,237,.1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: .85rem;
  min-width: 80px;
}
.fd-chain span { display: block; font-size: .75rem; color: var(--dim); font-weight: 400; margin-top: 4px; }
.figure-caption {
  font-size: .75rem;
  color: var(--dim);
  text-align: center;
  font-style: italic;
}

/* tables */
.wp-table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border2); margin: 16px 0; }
.wp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.wp-table th, .wp-table td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border2);
  color: var(--muted);
}
.wp-table thead th {
  background: var(--card);
  font-weight: 700;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--dim);
}
.wp-table tbody tr:last-child td { border-bottom: none; }
.wp-table tbody tr:hover { background: rgba(255,255,255,.02); }
.highlight-col {
  background: rgba(124,58,237,.06) !important;
  border-left: 2px solid var(--purple) !important;
  border-right: 2px solid var(--purple) !important;
  color: var(--text) !important;
  font-weight: 600;
}
thead .highlight-col { color: var(--purple-l) !important; }
.total-row td { font-weight: 700; color: var(--text); border-top: 1px solid var(--border2); }
.wp-caption { font-size: .75rem; color: var(--dim); font-style: italic; }

/* utility grid */
.wp-utility-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 16px 0;
}
.utility-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 20px;
}
.utility-icon { font-size: 1.5rem; margin-bottom: 10px; }
.utility-card h4 { font-size: .88rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.utility-card p { font-size: .82rem; margin: 0; }

/* audit list */
.wp-audit-list { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.wp-audit-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 12px 16px;
}
.audit-firm { font-weight: 700; font-size: .9rem; width: 110px; flex-shrink: 0; }
.certik-color  { color: #3b82f6; }
.tob-color     { color: #f59e0b; }
.halborn-color { color: #ef4444; }
.audit-scope { font-size: .82rem; color: var(--muted); flex: 1; }
.audit-status { font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; flex-shrink: 0; }
.audit-status.pass { background: rgba(16,185,129,.12); color: #10b981; border: 1px solid rgba(16,185,129,.25); }

/* roadmap */
.wp-roadmap { display: flex; flex-direction: column; gap: 0; margin-top: 8px; }
.wp-rm-row {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border2);
  font-size: .88rem;
}
.wp-rm-row:last-child { border-bottom: none; }
.wp-rm-period { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: .78rem; color: var(--cyan); width: 90px; flex-shrink: 0; }
.wp-rm-content { flex: 1; color: var(--muted); line-height: 1.5; }
.wp-rm-content strong { color: var(--text); }
.wp-rm-status { font-size: .65rem; font-weight: 700; padding: 2px 10px; border-radius: 99px; flex-shrink: 0; text-transform: uppercase; letter-spacing: .06em; }
.wp-rm-status.done     { background: rgba(16,185,129,.12); color: #10b981;  border: 1px solid rgba(16,185,129,.25); }
.wp-rm-status.current  { background: rgba(6,182,212,.12);  color: var(--cyan); border: 1px solid rgba(6,182,212,.3); }
.wp-rm-status.upcoming { background: rgba(245,158,11,.1);  color: var(--yellow); border: 1px solid rgba(245,158,11,.2); }
.wp-rm-status.future   { background: rgba(100,116,139,.1); color: var(--dim); border: 1px solid rgba(100,116,139,.2); }
.wp-rm-row.completed .wp-rm-content { opacity: .8; }
.wp-rm-row.active .wp-rm-period { color: var(--cyan-l); }

/* team */
.wp-team { display: flex; flex-direction: column; gap: 24px; margin: 16px 0; }
.wp-team-member {
  display: flex;
  gap: 20px;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 20px;
}
.wp-avatar {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}
.wp-avatar-ai { background: linear-gradient(135deg, var(--cyan), #06d6a0); }
.wp-member-name { font-weight: 700; font-size: .95rem; margin-bottom: 3px; display: flex; align-items: center; gap: 8px; }
.wp-anon-tag, .wp-ai-tag {
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.wp-anon-tag { background: rgba(245,158,11,.1); color: var(--yellow); border: 1px solid rgba(245,158,11,.2); }
.wp-ai-tag   { background: rgba(6,182,212,.1);  color: var(--cyan);   border: 1px solid rgba(6,182,212,.25); }
.wp-member-role { font-size: .8rem; color: var(--dim); margin-bottom: 8px; }
.wp-team-member p { font-size: .85rem; margin: 0; }

/* disclaimer */
.wp-disclaimer { font-size: .8rem; color: var(--dim); line-height: 1.7; }

/* ─── PRINT ─── */
@media print {
  .wp-topbar, .wp-sidebar { display: none; }
  .wp-main { padding: 0; max-width: 100%; }
  body { background: #fff; color: #000; }
  .wp-callout { border: 1px solid #ccc; background: #f9f9f9; }
  a { color: #000; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .wp-sidebar { display: none; }
  .wp-main { padding: 32px 24px 60px; }
  .wp-utility-grid { grid-template-columns: 1fr; }
  .wp-topbar { padding: 0 16px; }
  .wp-meta { display: none; }
}
@media (max-width: 600px) {
  .cover-title { font-size: 2rem; }
  .wp-rm-row { flex-wrap: wrap; gap: 8px; }
  .wp-rm-period { width: auto; }
}
