/* ======================================================================
   cANDLE · design system v1 (Robinhood green + market reds, light editorial)
   Adapted from the wAVE design system. Brand centered on Robinhood green.
   ====================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,300;1,9..144,400;1,9..144,500&family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* surfaces, clean whites */
  --bg:           #FAFAFA;     /* near-white main */
  --bg-warm:      #F4F2EE;     /* subtle warm cream for hover/secondary */
  --bg-elevated:  #FFFFFF;     /* pure white for cards */
  --bg-deep:      #EFEDE7;     /* warm cream for footer */

  /* ink, pure black for max readability */
  --ink:          #0A0A0A;
  --ink-mute:     #5C5C5C;
  --ink-faint:    #9A948A;

  /* lines */
  --line:         #E5E3DC;     /* warm gray subtle */
  --line-soft:    rgba(229, 227, 220, 0.5);
  --line-strong:  #0A0A0A;

  /* brand green palette, centered on #00C805 */
  --candle-base:    #00C805;     /* THE brand green (Robinhood green) */
  --candle-deep:    #0B8A00;     /* deep market green, CTAs, text accents (contrast on white) */
  --candle-blue:    #2EB84B;     /* mid-deep, secondary accents */
  --candle-cyan:    #00C805;     /* alias of base, used as highlights */
  --candle-pale:    #B7F2C6;     /* pale */
  --candle-light:   #E9FBEE;     /* near-white tinted */

  /* warm accents, secondary, kept from banner cards */
  --rose:         #F2A5C0;     /* pastel rose */
  --rose-deep:    #D67BA1;
  --gold:         #F2D070;     /* pastel amber */
  --gold-deep:    #C8A340;
  --mint:         #A6E0CC;     /* pastel mint (banner) */

  /* shadows, neutral, soft */
  --shadow-sm: 0 1px 0 rgba(10, 10, 10, 0.04);
  --shadow-md: 0 2px 8px rgba(10, 10, 10, 0.08);
  --shadow-lg: 0 12px 32px -12px rgba(10, 10, 10, 0.16);
  --shadow-xl: 0 24px 56px -16px rgba(10, 10, 10, 0.24);

  /* radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;

  /* layout */
  --maxw:      1200px;
  --maxw-tight: 720px;

  /* type */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif:   'Fraunces', 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'Menlo', monospace;
}

/* ======================================================================
   reset / base
   ====================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

/* subtle radiance, barely-there green hint (#00C805) */
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(0, 200, 5, 0.14), transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(0, 200, 5, 0.10), transparent 55%);
  pointer-events: none; z-index: 0;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--candle-deep); color: var(--bg-elevated); }

/* ======================================================================
   floating decorative background, tICK PP cards only
   ====================================================================== */
.deco-bg {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  overflow: hidden;
}
.deco-bg .deco-item {
  position: absolute;
  border-radius: 14px;
  background: var(--bg-elevated);
  padding: 6px;
  box-shadow:
    0 12px 32px -10px rgba(10, 10, 10, 0.18),
    0 2px 6px rgba(10, 10, 10, 0.06);
  border: 0.5px solid var(--line);
  animation: drift 22s ease-in-out infinite;
  opacity: 0.55;
  transition: opacity .3s;
  overflow: hidden;
}
.deco-bg .deco-item img {
  display: block;
  width: 100%; height: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.deco-bg .deco-item:nth-child(1) { top: 6%;   left: 4%;   width: 100px; height: 100px; animation-delay: 0s;    transform: rotate(-12deg); opacity: 0.85; }
.deco-bg .deco-item:nth-child(2) { top: 16%;  right: 6%;  width: 88px;  height: 88px;  animation-delay: -3s;   transform: rotate(8deg);   opacity: 0.75; filter: blur(0.5px); }
.deco-bg .deco-item:nth-child(3) { top: 36%;  left: 9%;   width: 76px;  height: 76px;  animation-delay: -6s;   transform: rotate(-5deg);  opacity: 0.65; filter: blur(1px); }
.deco-bg .deco-item:nth-child(4) { top: 50%;  right: 11%; width: 116px; height: 116px; animation-delay: -9s;   transform: rotate(15deg);  opacity: 0.80; }
.deco-bg .deco-item:nth-child(5) { top: 70%;  left: 5%;   width: 92px;  height: 92px;  animation-delay: -12s;  transform: rotate(-8deg);  opacity: 0.70; filter: blur(0.5px); }
.deco-bg .deco-item:nth-child(6) { top: 84%;  right: 5%;  width: 84px;  height: 84px;  animation-delay: -15s;  transform: rotate(10deg);  opacity: 0.78; }
.deco-bg .deco-item:nth-child(7) { top: 26%;  left: 47%;  width: 64px;  height: 64px;  animation-delay: -18s;  transform: rotate(-15deg); opacity: 0.50; filter: blur(2px); }
.deco-bg .deco-item:nth-child(8) { top: 62%;  right: 38%; width: 78px;  height: 78px;  animation-delay: -21s;  transform: rotate(6deg);   opacity: 0.58; filter: blur(1px); }

@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(var(--rot, 0deg)); }
  50%      { transform: translate(6px, -12px) rotate(var(--rot, 0deg)); }
}

/* ======================================================================
   nav
   ====================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 0.5px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 18px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand .logomark { width: 24px; height: 24px; }
.brand small {
  font-family: var(--font-mono); font-weight: 400;
  font-size: 10px; color: var(--ink-faint); margin-left: 6px;
  text-transform: uppercase; letter-spacing: 0.16em;
}
.nav-links {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--font-body); font-size: 14px;
}
.nav-links a {
  padding: 8px 14px; border-radius: var(--r-sm);
  color: var(--ink-mute);
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-warm); }
.nav-links a.active { color: var(--candle-deep); }

/* ======================================================================
   buttons
   ====================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--ink);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px; font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform .12s, background .15s, color .15s, box-shadow .15s, border-color .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--ink); color: var(--bg-elevated); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-solid { background: var(--candle-deep); color: white; border-color: var(--candle-deep); }
.btn-solid:hover { background: var(--ink); border-color: var(--ink); color: white; box-shadow: 0 6px 20px rgba(11, 138, 0, 0.35); }
.btn-coral { background: var(--candle-base); color: var(--ink); border-color: var(--candle-base); }
.btn-coral:hover { background: var(--candle-deep); border-color: var(--candle-deep); color: white; transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink-mute); background: var(--bg-elevated); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); background: var(--bg-elevated); }
.btn-arrow::after { content: "→"; transition: transform .15s; display: inline-block; }
.btn-arrow:hover::after { transform: translateX(3px); }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ======================================================================
   layout
   ====================================================================== */
main { padding-top: 90px; position: relative; z-index: 1; }
.container {
  max-width: var(--maxw); margin: 0 auto; padding: 0 32px;
  position: relative;
}
.container-tight { max-width: var(--maxw-tight); margin: 0 auto; padding: 0 32px; }
.section { padding: 120px 0; }
.section-tight { padding: 64px 0; }

/* ======================================================================
   typography
   ====================================================================== */
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.05; letter-spacing: -0.025em; color: var(--ink); }
h1 { font-size: clamp(56px, 9vw, 132px); font-weight: 500; letter-spacing: -0.04em; }
h2 { font-size: clamp(36px, 5.5vw, 88px); font-weight: 500; letter-spacing: -0.03em; }
h3 { font-size: clamp(22px, 2.6vw, 32px); font-weight: 500; letter-spacing: -0.02em; }
h4 { font-size: 18px; font-weight: 500; }
p  { color: var(--ink-mute); font-size: 17px; line-height: 1.65; max-width: 56ch; margin: 0; }
p.lead { color: var(--ink); font-size: 21px; font-weight: 400; line-height: 1.5; letter-spacing: -0.005em; }

.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.mono  { font-family: var(--font-mono); }
.mute  { color: var(--ink-mute); }
.faint { color: var(--ink-faint); }
.brand-c { color: var(--candle-deep); }
.coral-c { color: var(--candle-cyan); }
.rose-c  { color: var(--rose-deep); }
.gold-c  { color: var(--gold-deep); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--rose-deep);
  font-weight: 500;
  margin-bottom: 24px;
}
.eyebrow-line {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 500;
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 16px;
}
.eyebrow-line::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

.divider { border: none; height: 1px; background: var(--line); margin: 64px 0; }

/* ======================================================================
   hero
   ====================================================================== */
.hero {
  position: relative; z-index: 1;
  padding: 80px 32px 96px;
  text-align: center;
  min-height: 80vh;
  display: flex; align-items: center; justify-content: center;
}
.hero-content { max-width: 1100px; }
.hero h1 { margin-bottom: 32px; }
.hero h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--candle-deep);
  letter-spacing: -0.04em;
}
.hero h1 .stroke {
  -webkit-text-stroke: 1.5px var(--ink);
  color: transparent;
}
.hero-sub {
  margin: 0 auto 40px;
  max-width: 580px;
  font-size: 19px; color: var(--ink-mute);
  line-height: 1.55;
}
.hero-cta {
  display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center;
}
.hero-meta {
  margin-top: 88px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-elevated);
  border-radius: var(--r-md);
}
.hero-meta > div {
  padding: 24px 16px;
  border-right: 1px solid var(--line);
  text-align: center;
}
.hero-meta > div:last-child { border-right: none; }
.hero-meta b {
  display: block;
  font-family: var(--font-display);
  font-size: 32px; font-weight: 500; color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.hero-meta span {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-faint);
  text-transform: uppercase; letter-spacing: 0.12em;
}

/* ======================================================================
   live tide frame
   ====================================================================== */
.tide-frame {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-lg);
  margin: 24px auto;
  max-width: 940px;
}
.tide-frame svg.tide-svg {
  width: 100%; height: auto;
  border-radius: var(--r-md);
  display: block;
}
.tide-meta {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  margin-top: 16px;
}
.tide-meta > div {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}
.tide-meta > div:last-child { border-right: none; }
.tide-meta .label {
  display: block; font-family: var(--font-mono);
  font-size: 10px; color: var(--ink-faint);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 4px;
}
.tide-meta .value { font-family: var(--font-mono); color: var(--ink); font-weight: 500; font-size: 14px; }

/* ======================================================================
   editorial layout
   ====================================================================== */
.editorial { max-width: var(--maxw-tight); margin: 0 auto; padding: 0 32px; }
.editorial-block {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 40px;
  padding: 28px 0;
  border-bottom: 0.5px solid var(--line);
}
.editorial-block:last-child { border-bottom: none; }
.editorial-block .num {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--ink-faint);
  letter-spacing: 0.04em; padding-top: 6px;
}
.editorial-block .body p {
  font-size: 17px; line-height: 1.7; color: var(--ink); max-width: none;
}
.editorial-block .body p + p { margin-top: 12px; }
.editorial-block .body strong { font-weight: 500; color: var(--ink); }

/* ======================================================================
   step cards
   ====================================================================== */
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 64px;
}
.step {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 36px 28px;
  position: relative;
  transition: background .15s, transform .15s, box-shadow .15s;
  box-shadow: var(--shadow-sm);
}
.step:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.step .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--rose-deep);
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 16px; display: block;
}
.step h3 {
  font-size: 22px; margin: 0 0 12px;
  letter-spacing: -0.02em; line-height: 1.15;
}
.step p { font-size: 15px; line-height: 1.55; color: var(--ink-mute); margin: 0; }

/* ======================================================================
   tables
   ====================================================================== */
.kv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin-top: 32px;
  background: var(--bg-elevated);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.kv-table th, .kv-table td {
  padding: 18px 20px;
  border-bottom: 0.5px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.kv-table thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-faint); font-weight: 500;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 14px;
  background: var(--bg-warm);
}
.kv-table tbody td:first-child {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.08em;
  width: 22%;
}
.kv-table .num { text-align: right; font-family: var(--font-mono); }
.kv-table tr:hover td { background: var(--bg-warm); }

/* ======================================================================
   stats grid
   ====================================================================== */
.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 32px 0;
}
.stat {
  padding: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.stat .label {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 12px;
}
.stat .val {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 500; color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.stat .delta {
  font-family: var(--font-mono); font-size: 12px;
  margin-top: 8px;
  color: var(--ink-faint);
}
.stat .delta.up   { color: var(--candle-deep); }
.stat .delta.down { color: var(--rose-deep); }

/* ======================================================================
   harberger panel
   ====================================================================== */
.harberger {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 32px;
}
.h-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
}
.h-card h3 {
  font-size: 22px; margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.h-card .h-sub {
  font-size: 14px; color: var(--ink-mute); margin: 0 0 24px;
}

.kv-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 0;
  border-bottom: 0.5px solid var(--line);
  font-family: var(--font-mono); font-size: 14px;
}
.kv-row:last-child { border-bottom: none; }
.kv-row .lab { color: var(--ink-faint); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.kv-row .v   { color: var(--ink); font-weight: 500; }
.kv-row .v.coral-c { color: var(--candle-cyan); }
.kv-row .v.rose-c  { color: var(--rose-deep); }
.kv-row .v.gold-c  { color: var(--gold-deep); }
.kv-row .v.brand-c { color: var(--candle-deep); }

/* ======================================================================
   form
   ====================================================================== */
.bid-form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.input-label {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.input {
  background: var(--bg-warm);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  color: var(--ink);
  font-family: var(--font-mono); font-size: 16px; font-weight: 500;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  width: 100%;
}
.input:focus { border-color: var(--candle-deep); background: var(--bg-elevated); box-shadow: 0 0 0 3px rgba(0, 200, 5, 0.30); }
.input:disabled { opacity: 0.4; cursor: not-allowed; }
.input-group { position: relative; }
.input-group::after {
  content: attr(data-suffix);
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: var(--ink-faint);
  font-family: var(--font-mono); font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.08em;
  pointer-events: none;
}

/* ======================================================================
   palette switcher
   ====================================================================== */
.palette-row {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-top: 24px;
}
.palette-row .pal-label {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-faint);
}
.pal-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--ink);
  font-family: var(--font-mono); font-size: 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pal-chip:hover { border-color: var(--ink); }
.pal-chip.active { border-color: var(--candle-deep); background: var(--candle-deep); color: white; }
.pal-swatch {
  width: 12px; height: 12px; border-radius: 50%;
  border: 0.5px solid var(--line);
}

/* ======================================================================
   tokenomics donut
   ====================================================================== */
.tokenomics {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: center;
  margin-top: 48px;
}
.donut { display: flex; align-items: center; justify-content: center; }
.donut svg { width: 100%; max-width: 320px; }

.tok-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tok-table td { padding: 14px 0; border-bottom: 0.5px solid var(--line); }
.tok-table td:nth-child(1) { width: 50%; }
.tok-table td:nth-child(2) { font-family: var(--font-mono); text-align: right; width: 12%; font-weight: 500; }
.tok-table td:nth-child(3) { color: var(--ink-mute); padding-left: 24px; font-size: 13px; }
.tok-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 10px; }

/* ======================================================================
   footer
   ====================================================================== */
.footer {
  border-top: 1px solid var(--line);
  padding: 80px 32px 48px;
  margin-top: 120px;
  background: var(--bg-warm);
  position: relative; z-index: 2;
}
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer h4 {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-mute); margin: 0 0 16px;
  font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { padding: 6px 0; font-size: 14px; }
.footer a { color: var(--ink); transition: color .15s; }
.footer a:hover { color: var(--candle-deep); }
.footer p { color: var(--ink-mute); font-size: 14px; }
.footer .legal {
  grid-column: 1 / -1;
  border-top: 0.5px solid var(--line);
  padding-top: 32px; margin-top: 48px;
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute);
  display: flex; justify-content: space-between; align-items: center;
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* ======================================================================
   whitepaper render
   ====================================================================== */
.paper-wrap {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 32px 120px;
}
.paper-toc-side {
  position: sticky; top: 120px; align-self: start;
  font-family: var(--font-mono);
  font-size: 12px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}
.paper-toc-side h4 {
  font-size: 11px; color: var(--ink-faint);
  text-transform: uppercase; letter-spacing: 0.14em;
  margin: 0 0 14px; font-weight: 500;
}
.paper-toc-side ol { list-style: none; padding: 0; margin: 0; }
.paper-toc-side li { padding: 6px 0; }
.paper-toc-side a { color: var(--ink-mute); transition: color .15s; }
.paper-toc-side a:hover { color: var(--ink); }
.paper-toc-side a.active { color: var(--candle-deep); }

.paper {
  max-width: 720px;
  background: var(--bg-elevated);
  padding: 48px 56px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.paper > .eyebrow { margin-bottom: 16px; }
.paper h1 {
  font-size: clamp(48px, 6vw, 88px);
  letter-spacing: -0.04em;
  margin: 0 0 16px;
  font-weight: 500;
}
.paper .subtitle {
  font-family: var(--font-serif); font-style: italic;
  font-size: 28px; color: var(--ink-mute); font-weight: 400;
  margin: 0 0 32px;
  letter-spacing: -0.02em;
}
.paper h2 {
  font-size: 32px; margin: 72px 0 20px;
  letter-spacing: -0.025em; font-weight: 500;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.paper h3 { font-size: 20px; margin: 36px 0 14px; color: var(--ink); font-weight: 500; }
.paper h4 { font-size: 16px; margin: 24px 0 10px; color: var(--ink-mute); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; }
.paper p, .paper li { font-size: 16px; line-height: 1.75; color: var(--ink); max-width: none; }
.paper ul, .paper ol { padding-left: 24px; }
.paper li { padding: 4px 0; }
.paper code {
  background: var(--bg-warm);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono); font-size: 14px;
  color: var(--candle-deep);
  border: 0.5px solid var(--line);
}
.paper pre {
  background: var(--bg-warm);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px; overflow-x: auto;
  font-family: var(--font-mono); font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
}
.paper pre code { background: none; padding: 0; color: inherit; border: none; }
.paper blockquote {
  border-left: 2px solid var(--candle-deep);
  padding: 4px 20px;
  color: var(--ink-mute);
  font-style: italic;
  margin: 16px 0;
  font-family: var(--font-serif);
  font-size: 18px;
}
.paper table {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
  margin: 16px 0;
}
.paper table th, .paper table td {
  padding: 10px 12px;
  border-bottom: 0.5px solid var(--line);
  text-align: left;
}
.paper table th {
  font-family: var(--font-mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-faint);
  font-weight: 500;
  border-bottom: 1px solid var(--ink);
}
.paper hr { border: none; border-top: 0.5px solid var(--line); margin: 64px 0; }

/* ======================================================================
   misc
   ====================================================================== */
.spacer-32 { height: 32px; }
.spacer-64 { height: 64px; }
.text-center { text-align: center; }

/* announcement bar (subtle) */
.announce {
  background: var(--ink);
  color: var(--bg-elevated);
  padding: 10px 16px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.announce a { color: var(--candle-cyan); margin-left: 12px; }

/* ======================================================================
   nav brand image (PP tICK)
   ====================================================================== */
.brand-pp {
  width: 38px; height: 38px; border-radius: 8px;
  display: block; object-fit: cover;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(10, 10, 10, 0.10);
}

/* ======================================================================
   nav icon button (X / Twitter, etc.)
   ====================================================================== */
.nav-icon {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink);
  background: var(--bg-elevated);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .12s;
}
.nav-icon:hover {
  background: var(--ink); color: var(--bg-elevated); border-color: var(--ink);
  transform: translateY(-1px);
}
.nav-icon svg { width: 14px; height: 14px; display: block; }
.nav-right {
  display: flex; align-items: center; gap: 10px;
}

/* ======================================================================
   Connect Wallet modal
   ====================================================================== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 31, 15, 0.45);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  animation: fade-in .18s ease-out;
}
.modal-backdrop.open { display: flex; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in  { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

.modal {
  background: var(--bg-elevated);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 440px;
  padding: 32px;
  animation: pop-in .22s ease-out;
  position: relative;
}
.modal h3 {
  font-size: 22px; margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.modal .modal-sub {
  font-size: 14px; color: var(--ink-mute);
  margin: 0 0 24px;
}
.modal-close {
  position: absolute; top: 18px; right: 18px;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: transparent; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--ink-mute);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--bg-warm); color: var(--ink); }

.wallet-list { display: flex; flex-direction: column; gap: 8px; }
.wallet-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-warm);
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .12s;
  font-family: var(--font-body); font-size: 15px; font-weight: 500;
  color: var(--ink);
  text-align: left;
}
.wallet-row:hover { border-color: var(--candle-deep); background: var(--bg-elevated); transform: translateY(-1px); }
.wallet-row .wallet-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
}
.wallet-row .wallet-name { flex: 1; }
.wallet-row .wallet-status {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-faint);
}

.wallet-disclaimer {
  margin-top: 24px; padding-top: 20px;
  border-top: 0.5px solid var(--line);
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.04em; line-height: 1.6;
  text-align: center;
}

.btn-connected {
  background: var(--bg-elevated) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
  font-family: var(--font-mono);
  font-size: 12px;
}
.btn-connected::before {
  content: ""; width: 8px; height: 8px;
  border-radius: 50%; background: #00C758;
  margin-right: 6px; display: inline-block;
}

/* ======================================================================
   responsive
   ====================================================================== */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero { padding: 60px 24px 80px; min-height: auto; }
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .hero-meta > div:nth-child(2) { border-right: none; }
  .hero-meta > div:nth-child(1), .hero-meta > div:nth-child(2) { border-bottom: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
  .harberger { grid-template-columns: 1fr; }
  .tokenomics { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .paper-wrap { grid-template-columns: 1fr; padding: 40px 24px 80px; }
  .paper { padding: 32px 28px; }
  .paper-toc-side { position: relative; top: 0; max-height: none; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
  .container, .container-tight { padding: 0 20px; }
  .editorial-block { grid-template-columns: 40px 1fr; gap: 16px; }
  .tide-meta { grid-template-columns: 1fr 1fr; }
  .tide-meta > div:nth-child(2) { border-right: none; }
  .section { padding: 80px 0; }
}
@media (max-width: 540px) {
  .steps { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-meta { grid-template-columns: 1fr; }
  .hero-meta > div { border-right: none; border-bottom: 1px solid var(--line); }
  .hero-meta > div:last-child { border-bottom: none; }
}
