/* ============================================================
   EMILIA TOKEN — White Paper (web + print/PDF)
   ============================================================ */

:root {
  --wp-purple: #9945ff;
  --wp-purple-dim: rgba(153, 69, 255, 0.15);
  --wp-green: #14f195;
  --wp-green-dim: rgba(20, 241, 149, 0.12);
  --wp-bg: #0a0e18;
  --wp-bg-card: #121828;
  --wp-bg-card2: #161d30;
  --wp-border: rgba(153, 69, 255, 0.35);
  --wp-text: #eaecf5;
  --wp-muted: #9aa3b8;
  --wp-accent: linear-gradient(135deg, #9945ff 0%, #14f195 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--wp-bg);
  color: var(--wp-text);
  line-height: 1.65;
  font-size: 11pt;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.wp-page {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 18mm 20mm;
  position: relative;
  page-break-after: always;
  break-after: page;
}

.wp-page:last-child {
  page-break-after: auto;
  break-after: auto;
}

/* ---- Cover ---- */
.wp-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(153, 69, 255, 0.25), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(20, 241, 149, 0.12), transparent 50%),
    var(--wp-bg);
  padding: 24mm 20mm;
}

.wp-cover-logo {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  margin-bottom: 28px;
  box-shadow: 0 0 60px rgba(153, 69, 255, 0.45), 0 0 30px rgba(20, 241, 149, 0.2);
}

.wp-cover-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--wp-border);
  background: var(--wp-purple-dim);
  color: var(--wp-green);
  font-size: 9pt;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.wp-cover h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 36pt;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 8px;
}

.wp-cover h1 span {
  background: var(--wp-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.wp-cover-sub {
  font-size: 16pt;
  color: var(--wp-muted);
  font-weight: 500;
  margin-bottom: 32px;
}

.wp-cover-meta {
  font-size: 10pt;
  color: var(--wp-muted);
  line-height: 1.8;
}

.wp-cover-meta strong { color: var(--wp-text); }

.wp-cover-footer {
  position: absolute;
  bottom: 18mm;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 9pt;
  color: var(--wp-muted);
}

.wp-cover-footer a {
  color: var(--wp-green);
  text-decoration: none;
}

/* ---- Header bar (inner pages) ---- */
.wp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid;
  border-image: var(--wp-accent) 1;
}

.wp-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 11pt;
}

.wp-header-brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.wp-header-doc {
  font-size: 8pt;
  color: var(--wp-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---- Typography ---- */
h2.wp-section-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 18pt;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--wp-text);
}

h2.wp-section-title .grad {
  background: var(--wp-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h3.wp-subtitle {
  font-family: "Space Grotesk", sans-serif;
  font-size: 12pt;
  font-weight: 600;
  margin: 18px 0 8px;
  color: var(--wp-green);
}

p { margin-bottom: 10px; color: var(--wp-text); }
p.wp-lead { font-size: 12pt; color: var(--wp-muted); margin-bottom: 16px; }
.wp-muted { color: var(--wp-muted); font-size: 9.5pt; }

ul, ol { margin: 0 0 12px 18px; }
li { margin-bottom: 5px; }

/* ---- TOC ---- */
.wp-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
}

.wp-toc li {
  counter-increment: toc;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 10.5pt;
}

.wp-toc li::before {
  content: counter(toc, decimal-leading-zero) ".";
  color: var(--wp-purple);
  font-weight: 700;
  margin-right: 12px;
  min-width: 28px;
}

.wp-toc a {
  color: var(--wp-text);
  text-decoration: none;
  flex: 1;
}

/* ---- Cards & boxes ---- */
.wp-card {
  background: var(--wp-bg-card);
  border: 1px solid var(--wp-border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.wp-card h4 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 11pt;
  margin-bottom: 6px;
  color: var(--wp-green);
}

.wp-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}

.wp-highlight {
  background: var(--wp-green-dim);
  border-left: 3px solid var(--wp-green);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  margin: 14px 0;
  font-size: 10pt;
}

.wp-warning {
  background: rgba(255, 180, 50, 0.08);
  border: 1px solid rgba(255, 180, 50, 0.35);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 14px 0;
  font-size: 9.5pt;
}

.wp-warning strong { color: #ffb432; }

/* ---- Tokenomics chart ---- */
.wp-tokenomics {
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 16px 0;
}

.wp-donut-wrap {
  flex-shrink: 0;
  position: relative;
  width: 130px;
  height: 130px;
}

.wp-donut {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: conic-gradient(
    var(--wp-purple) 0deg 108deg,
    #14f195 108deg 252deg,
    #6366f1 252deg 306deg,
    #f59e0b 306deg 342deg,
    #64748b 342deg 360deg
  );
  box-shadow: 0 0 30px rgba(153, 69, 255, 0.3);
}

.wp-donut-center {
  position: absolute;
  inset: 22px;
  background: var(--wp-bg-card);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", sans-serif;
}

.wp-donut-center strong { font-size: 14pt; }
.wp-donut-center span { font-size: 7pt; color: var(--wp-muted); }

.wp-legend { flex: 1; }

.wp-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 9.5pt;
}

.wp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.wp-dot-1 { background: var(--wp-purple); }
.wp-dot-2 { background: var(--wp-green); }
.wp-dot-3 { background: #6366f1; }
.wp-dot-4 { background: #f59e0b; }
.wp-dot-5 { background: #64748b; }

/* ---- Tables ---- */
.wp-table-wrap {
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--wp-border);
  margin: 14px 0;
}

table.wp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9pt;
}

.wp-table th {
  background: var(--wp-purple-dim);
  color: var(--wp-green);
  text-align: left;
  padding: 8px 10px;
  font-weight: 600;
  font-size: 8.5pt;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wp-table td {
  padding: 7px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.wp-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

.wp-table code {
  font-size: 8pt;
  word-break: break-all;
  color: var(--wp-muted);
}

/* ---- Pipeline ---- */
.wp-pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 14px 0;
  font-size: 9pt;
}

.wp-pipe-step {
  background: var(--wp-bg-card2);
  border: 1px solid var(--wp-border);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
  min-width: 72px;
}

.wp-pipe-step strong {
  display: block;
  color: var(--wp-green);
  font-size: 8pt;
  margin-bottom: 2px;
}

.wp-pipe-arrow { color: var(--wp-purple); font-weight: 700; }

/* ---- Roadmap phases ---- */
.wp-phase {
  border-left: 3px solid var(--wp-purple);
  padding: 0 0 12px 14px;
  margin-bottom: 12px;
}

.wp-phase.active { border-color: var(--wp-green); }
.wp-phase.done { border-color: rgba(153, 69, 255, 0.4); opacity: 0.85; }

.wp-phase-badge {
  display: inline-block;
  font-size: 8pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wp-purple);
  margin-bottom: 4px;
}

.wp-phase.active .wp-phase-badge { color: var(--wp-green); }

.wp-phase h4 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 11pt;
  margin-bottom: 6px;
}

.wp-phase ul { font-size: 9.5pt; margin-left: 16px; }

/* ---- FAQ ---- */
.wp-faq-item {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wp-faq-item strong {
  display: block;
  color: var(--wp-green);
  margin-bottom: 4px;
  font-size: 10pt;
}

.wp-faq-item p { font-size: 9.5pt; margin: 0; }

/* ---- Footer page ---- */
.wp-page-footer {
  position: absolute;
  bottom: 12mm;
  left: 20mm;
  right: 20mm;
  display: flex;
  justify-content: space-between;
  font-size: 8pt;
  color: var(--wp-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 8px;
}

/* ---- Web-only toolbar ---- */
.wp-toolbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
  background: rgba(10, 14, 24, 0.95);
  border-bottom: 1px solid var(--wp-border);
  backdrop-filter: blur(12px);
}

.wp-toolbar a {
  color: var(--wp-text);
  text-decoration: none;
  font-size: 10pt;
}

.wp-toolbar-actions { display: flex; gap: 10px; }

.wp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 10pt;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.wp-btn-primary {
  background: var(--wp-accent);
  color: #0a0e18;
}

.wp-btn-ghost {
  background: transparent;
  color: var(--wp-text);
  border: 1px solid var(--wp-border);
}

@media print {
  .wp-toolbar { display: none; }
  body { background: var(--wp-bg); }
  .wp-page { margin: 0; width: auto; min-height: auto; }
}

@media screen {
  body { padding-bottom: 40px; }
  .wp-page {
    margin-top: 24px;
    margin-bottom: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
  }
}
