/* ── Design tokens ──────────────────────────────────────────────────────── */
:root {
  /* Core palette */
  --bg:         #060d07;
  --bg-raised:  #0b1a0c;
  --bg-high:    #112213;
  --surface:    rgba(14, 28, 15, 0.88);
  --surface-hi: rgba(20, 42, 22, 0.92);
  --border:     rgba(183, 239, 84, 0.10);
  --border-med: rgba(183, 239, 84, 0.20);

  /* Brand accent */
  --acid:       #b7ef54;
  --acid-dim:   rgba(183, 239, 84, 0.12);
  --acid-glow:  rgba(183, 239, 84, 0.18);
  --acid-dark:  #7db32e;

  /* Semantic */
  --orange:     #e7802e;
  --orange-dim: rgba(231, 128, 46, 0.12);
  --red:        #ef5f5f;
  --positive:   #b7ef54;
  --negative:   #ff7070;

  /* Text */
  --fg:         #f0f2e8;
  --fg-muted:   #7e9479;
  --fg-faint:   #4a6045;

  /* Layout */
  --radius-sm:  10px;
  --radius:     18px;
  --radius-lg:  26px;
  --shadow-sm:  0 4px 20px rgba(0,0,0,0.28);
  --shadow:     0 12px 50px rgba(0,0,0,0.40);
  --shadow-lg:  0 24px 80px rgba(0,0,0,0.55);

  /* Typography */
  --font-sans:  'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body:  'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:  'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 60% at 8% 0%, rgba(127,189,61,.12) 0%, transparent 60%),
    radial-gradient(ellipse 80% 40% at 92% 15%, rgba(231,128,46,.07) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(88,165,50,.06) 0%, transparent 60%);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
button, a { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
code {
  font-family: var(--font-mono);
  font-size: .87em;
  color: var(--acid);
  background: rgba(0,0,0,.22);
  padding: .1em .38em;
  border-radius: 5px;
}
h1,h2,h3 { font-family: var(--font-sans); letter-spacing: -.03em; }

/* ── Atmosphere ─────────────────────────────────────────────────────────── */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 100;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}
.atmos { position: fixed; border-radius: 50%; filter: blur(70px); pointer-events: none; z-index: -1; }
.atmos-a { width: 500px; height: 500px; background: rgba(100,195,60,.09); top: 10%; left: -200px; }
.atmos-b { width: 600px; height: 600px; background: rgba(231,128,46,.06); bottom: 0; right: -240px; }
.atmos-c { width: 300px; height: 300px; background: rgba(183,239,84,.07); top: 60%; left: 40%; }

/* ── Layout shell ───────────────────────────────────────────────────────── */
.section-shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

/* ── Scroll reveal ──────────────────────────────────────────────────────── */
.reveal-section { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.reveal-section.visible { opacity: 1; transform: none; }

/* ── Per-item stagger ───────────────────────────────────────────────────── */
.stagger-item { opacity: 0; transform: translateY(22px); transition: opacity .5s ease, transform .5s ease; }
.stagger-item.visible { opacity: 1; transform: none; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  width: min(1240px, calc(100% - 28px));
  margin: 14px auto 0;
  padding: 10px 14px 10px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  position: sticky; top: 12px; z-index: 80;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(6, 13, 7, .88);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-sm);
}
.logo { display: inline-flex; align-items: center; gap: 10px; min-width: max-content; }
.logo-coin {
  width: 44px; height: 44px; display: grid; place-items: center; flex-shrink: 0;
  font-family: var(--font-sans); font-weight: 700; font-size: .82rem; letter-spacing: -.04em;
  color: var(--bg); background: var(--acid);
  border-radius: 50%; border: 2px solid #1d3512;
  box-shadow: inset 0 0 0 2px #d9ff90, 0 5px 0 rgba(0,0,0,.3);
  transform: rotate(-6deg); flex-shrink: 0;
}
.logo-coin.sm { width: 36px; height: 36px; font-size: .72rem; }
.logo strong { display: block; font-family: var(--font-sans); font-size: 1.06rem; font-weight: 700; }
.logo small { display: block; color: var(--fg-muted); font-size: .67rem; text-transform: uppercase; letter-spacing: .12em; margin-top: 1px; }
.site-header nav {
  display: flex; align-items: center; gap: 22px;
  font-size: .88rem; color: #b8ccb4;
}
.site-header nav a { position: relative; transition: color .15s; }
.site-header nav a:hover { color: var(--fg); }
.site-header nav a::after {
  content: ""; position: absolute; height: 2px; width: 0;
  background: var(--acid); left: 0; bottom: -6px;
  transition: width .2s ease;
}
.site-header nav a:hover::after { width: 100%; }
.menu-button {
  display: none; flex-direction: column; justify-content: space-between;
  width: 40px; height: 40px; padding: 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: transparent; color: var(--fg);
}
.menu-button span { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: .2s; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.button {
  min-height: 48px; padding: 0 22px;
  display: inline-flex; justify-content: center; align-items: center;
  font-family: var(--font-sans); font-weight: 700; font-size: .9rem; letter-spacing: .01em;
  border-radius: 12px 18px 11px 17px;
  background: linear-gradient(175deg, #cafc6a 0%, #8dce3e 100%);
  color: #0e1a09;
  border: 2px solid #1a250e;
  box-shadow: 0 6px 0 #2f5218, 0 10px 24px rgba(0,0,0,.28);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.button:hover { transform: translateY(-2px) rotate(-.25deg); box-shadow: 0 8px 0 #2f5218, 0 14px 30px rgba(0,0,0,.32); }
.button:active { transform: translateY(3px); box-shadow: 0 3px 0 #2f5218; }
.button:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }
.button-sm { min-height: 40px; padding-inline: 16px; font-size: .82rem; }
.button-ghost {
  background: rgba(183,239,84,.06);
  color: var(--fg);
  border-color: var(--border-med);
  box-shadow: none;
}
.button-ghost:hover { background: rgba(183,239,84,.12); box-shadow: none; transform: translateY(-1px); }
.button-dark {
  background: #18250e; color: var(--acid);
  border-color: #0e1a09;
  box-shadow: 0 6px 0 #0a1006;
}
.button-dark:hover { box-shadow: 0 8px 0 #0a1006; }
.button-ghost-dark {
  background: rgba(14,26,9,.6); color: #e8f0c8;
  border-color: rgba(183,239,84,.3); box-shadow: none;
}
.button-ghost-dark:hover { background: rgba(14,26,9,.9); }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  min-height: 780px; padding: 90px 0 60px;
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 24px;
}
.hero-copy { position: relative; z-index: 2; }
.status-chip {
  width: fit-content; display: flex; align-items: center; gap: 9px;
  padding: 7px 14px; border: 1px solid rgba(183,239,84,.22); border-radius: 999px;
  background: rgba(28,56,28,.7); color: #c8dfb8; font-size: .78rem; font-family: var(--font-sans);
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--acid);
  box-shadow: 0 0 0 4px var(--acid-dim);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(183,239,84,0); } }
.eyebrow {
  font-family: var(--font-sans); font-weight: 700; font-size: .7rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--acid);
  margin: 0 0 14px;
}
.hero .eyebrow { margin-top: 26px; }
.eyebrow-warm { color: #9c7830; }
.eyebrow-dark { color: #4b691f; }
.hero h1 {
  font-family: var(--font-sans); font-size: clamp(3.8rem, 7.4vw, 7rem);
  line-height: .88; letter-spacing: -.055em; margin: 0;
  text-wrap: balance;
}
.hero h1 em {
  font-style: italic; color: var(--acid);
  text-shadow: 0 0 30px rgba(183,239,84,.2);
}
.hero-lede { max-width: 620px; color: #b4c8af; line-height: 1.68; font-size: 1.04rem; margin: 28px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.mini-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px; margin-top: 34px; max-width: 620px;
}
.mini-stats div {
  padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: rgba(18,38,20,.5);
}
.mini-stats span { display: block; color: var(--fg-muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; font-family: var(--font-sans); }
.mini-stats strong { display: block; margin-top: 4px; font-family: var(--font-sans); font-size: .92rem; font-weight: 600; }

/* Hero stage */
.hero-stage {
  min-height: 660px; position: relative; display: grid; place-items: center;
  isolation: isolate;
}
.sun-disc {
  width: min(520px, 94%); aspect-ratio: 1; position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 38%, #e2ff8e, #80bc3c 52%, #2a542a 73%, transparent 74%);
  opacity: .85; box-shadow: 0 0 90px rgba(120,200,65,.2); z-index: -1;
}
.sun-disc::before {
  content: ""; position: absolute; inset: 9%; border-radius: 50%;
  border: 1.5px dashed rgba(22,45,23,.25);
}
.hero-cat {
  width: min(660px, 108%); max-height: 740px; object-fit: contain;
  position: relative; z-index: 2;
  filter: drop-shadow(0 30px 20px rgba(0,0,0,.38));
  transform: translateX(-2%);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateX(-2%) translateY(0); } 50% { transform: translateX(-2%) translateY(-10px); } }
.comic-bubble {
  position: absolute; z-index: 4; padding: 11px 14px;
  color: #1c2616; background: #f1e4be;
  border: 2.5px solid #1c2416; border-radius: 55% 45% 52% 48% / 42% 56% 44% 58%;
  font-size: .7rem; line-height: 1.18; text-align: center;
  box-shadow: 0 6px 0 rgba(0,0,0,.22);
}
.comic-bubble strong { display: block; font-size: .86rem; }
.bubble-one { left: 0; top: 15%; transform: rotate(-4deg); }
.bubble-two { right: -2%; bottom: 16%; transform: rotate(5deg); }
.hero-diamond { position: absolute; color: var(--acid); opacity: .45; font-size: 1.3rem; }
.hero-diamond.diamond-a { left: 3%; bottom: 8%; transform: rotate(22deg); animation: float 7s ease-in-out infinite .5s; }
.hero-diamond.diamond-b { right: 4%; top: 11%; transform: rotate(-15deg); animation: float 8s ease-in-out infinite 1s; }

/* ── Marquee ─────────────────────────────────────────────────────────────── */
.marquee {
  background: var(--acid); color: #0f1c0a;
  overflow: hidden; transform: rotate(-.3deg) scale(1.01);
  border-block: 3px solid #1a2c0d;
  margin-block: 4px;
}
.marquee-track {
  display: flex; gap: 24px; min-width: max-content;
  padding: 11px 0;
  font-family: var(--font-sans); font-weight: 700; font-size: .8rem; letter-spacing: .09em;
  animation: crawl 40s linear infinite;
}
.marquee-track b { opacity: .45; }
@keyframes crawl { to { transform: translateX(-50%); } }

/* ── Section shared ──────────────────────────────────────────────────────── */
h2 {
  font-family: var(--font-sans); font-size: clamp(2.4rem, 4.8vw, 4.2rem);
  line-height: .95; letter-spacing: -.05em; margin: 0;
}
.section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 32px; }
.section-header.centered { justify-content: center; text-align: center; }
.section-header.centered .section-intro { margin-inline: auto; }
.section-intro { max-width: 700px; color: var(--fg-muted); line-height: 1.65; margin: 14px 0 0; }
.muted-text { color: var(--fg-muted); font-size: .8rem; }

/* ── Dashboard ───────────────────────────────────────────────────────────── */
.dashboard-section { padding: 108px 0 24px; }
.refresh-row { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 50%;
  background: var(--surface); color: var(--acid);
  transition: transform .25s ease, background .2s;
}
.icon-btn:hover { background: var(--acid-dim); transform: rotate(90deg); }
.icon-btn:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }

/* Mode banner */
.mode-banner {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
  padding: 12px 16px; border: 1px solid rgba(183,239,84,.18); border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(60,110,36,.15), rgba(14,28,15,.5));
}
.mode-dot {
  width: 10px; height: 10px; flex-shrink: 0; border-radius: 50%;
  background: var(--acid); box-shadow: 0 0 0 4px var(--acid-dim);
  animation: pulse 2.4s ease-in-out infinite;
}
.mode-banner strong { display: block; font-family: var(--font-sans); font-weight: 600; }
.mode-banner small { display: block; color: var(--fg-muted); margin-top: 2px; font-size: .82rem; }

/* Bento grid */
.bento-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
  margin-bottom: 14px;
}
.bento-card {
  padding: 20px 22px; border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.bento-card:hover { border-color: var(--border-med); box-shadow: var(--shadow); }
.bento-featured {
  grid-column: 1; grid-row: 1 / 3;
  background: linear-gradient(145deg, rgba(32,62,25,.92), rgba(14,30,16,.95));
  border-color: rgba(183,239,84,.2);
  display: flex; flex-direction: column;
}
.bento-accent { border-color: rgba(183,239,84,.22); }
.bento-top {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
  color: rgba(240,242,232,.65); font-family: var(--font-sans);
}
.bento-glyph { font-size: 1rem; }
.bento-value {
  display: block;
  font-family: var(--font-mono); font-size: clamp(1.7rem, 2.6vw, 2.8rem);
  font-weight: 500; letter-spacing: -.02em;
  margin-top: 18px;
  transition: color .3s;
}
.bento-featured .bento-value { font-size: clamp(2.2rem, 3.8vw, 3.8rem); margin-top: 28px; }
.bento-card small { display: block; color: var(--fg-muted); font-size: .75rem; margin-top: 6px; }
.bento-sparkbar {
  margin-top: auto; padding-top: 20px;
  height: 4px; border-radius: 99px;
  background: linear-gradient(90deg, var(--acid-dim), var(--acid) var(--bar, 64%), var(--acid-dim) var(--bar, 64%));
}

/* Flash animations */
@keyframes flash-pos { 0%,100% { color: inherit; } 40% { color: var(--positive); } }
@keyframes flash-neg { 0%,100% { color: inherit; } 40% { color: var(--negative); } }
.flash-positive { animation: flash-pos 1.2s ease; }
.flash-negative { animation: flash-neg 1.2s ease; }

/* Dashboard grid */
.dash-grid { display: grid; grid-template-columns: 1.5fr .5fr; gap: 13px; margin-top: 13px; }
.dash-bottom { grid-template-columns: 1.1fr .9fr; }

/* Panel base */
.panel {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm); padding: 22px; min-width: 0;
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.panel-head.compact { align-items: center; }
.panel-eyebrow { font-family: var(--font-sans); font-weight: 700; font-size: .68rem; letter-spacing: .17em; text-transform: uppercase; color: var(--acid); margin: 0 0 6px; }
.panel h3 { font-family: var(--font-sans); font-size: 1.3rem; font-weight: 600; margin: 0; }
.auto-note { color: var(--fg-muted); font-size: .72rem; white-space: nowrap; }

/* Chart tabs */
.chart-tabs { display: inline-flex; gap: 2px; background: rgba(0,0,0,.2); padding: 3px; border-radius: var(--radius-sm); }
.tab {
  border: 0; color: var(--fg-muted); background: transparent;
  padding: 6px 11px; border-radius: 8px; font-size: .76rem;
  font-family: var(--font-sans); font-weight: 600; letter-spacing: .02em;
  transition: background .15s, color .15s;
}
.tab:hover { color: var(--fg); }
.tab.active { color: var(--bg); background: var(--acid); }
.tab:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; }
.chart-wrap { height: 310px; margin-top: 20px; position: relative; }
#treasury-chart { width: 100%; height: 100%; }
.chart-empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--fg-muted); font-size: .88rem; text-align: center;
  display: none;
}
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: .73rem; color: var(--fg-muted); }
.legend-item { display: flex; align-items: center; gap: 7px; }
.legend-swatch { width: 24px; height: 3px; border-radius: 99px; }

/* Strategy panel */
.health-pill {
  font-family: var(--font-sans); font-size: .63rem; letter-spacing: .12em; font-weight: 700;
  color: var(--bg); background: var(--acid); border-radius: 999px; padding: 6px 10px;
  white-space: nowrap;
}
.health-ring-wrap { display: grid; place-items: center; padding: 22px 0 18px; }
.health-ring {
  --health: 60%; width: 168px; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(var(--acid) var(--health), rgba(255,255,255,.06) 0);
  position: relative;
  transition: --health .5s ease;
}
.health-inner {
  position: absolute; inset: 16px; border-radius: 50%;
  background: var(--bg-raised); border: 1px solid var(--border);
  display: grid; place-items: center; text-align: center;
}
.health-ring strong { display: block; font-family: var(--font-mono); font-size: 1.9rem; font-weight: 500; line-height: 1; }
.health-ring small { color: var(--fg-muted); font-size: .68rem; margin-top: 2px; }
.stat-list { margin: 0; }
.stat-list div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 0; border-bottom: 1px dashed rgba(255,255,255,.08); }
.stat-list div:last-child { border-bottom: 0; }
.stat-list dt { color: var(--fg-muted); font-size: .81rem; }
.stat-list dd { margin: 0; font-family: var(--font-mono); font-size: .88rem; font-weight: 500; text-align: right; }
.positive { color: var(--positive) !important; }
.negative { color: var(--negative) !important; }

/* ── Bot terminal ─────────────────────────────────────────────────────────── */
.terminal-panel {
  margin-bottom: 12px; padding: 0; overflow: hidden;
  background: #060d07 !important; border-color: rgba(183,239,84,.12) !important;
}
.terminal-header {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px; border-bottom: 1px solid rgba(183,239,84,.08);
  background: #080f09;
}
.terminal-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }
.terminal-title {
  flex: 1; margin-left: 4px;
  font-family: var(--font-mono); font-size: .72rem; color: rgba(183,239,84,.45); letter-spacing: .06em;
}
.terminal-live {
  font-family: var(--font-mono); font-size: .68rem; color: var(--acid); letter-spacing: .1em;
  animation: pulse-live 2s ease-in-out infinite;
}
@keyframes pulse-live { 0%,100%{opacity:1} 50%{opacity:.35} }
.terminal-body {
  font-family: var(--font-mono); font-size: .78rem; line-height: 1.65;
  padding: 14px 16px; max-height: 320px; overflow-y: auto;
  display: flex; flex-direction: column-reverse;
}
.terminal-body::-webkit-scrollbar { width: 4px; }
.terminal-body::-webkit-scrollbar-track { background: transparent; }
.terminal-body::-webkit-scrollbar-thumb { background: rgba(183,239,84,.15); border-radius: 99px; }
.terminal-line { display: grid; grid-template-columns: 68px 56px 1fr; gap: 8px; align-items: baseline; padding: 1px 0; }
.terminal-line.muted { display: block; color: rgba(183,239,84,.25); padding: 20px 0; text-align: center; }
.t-time { color: rgba(183,239,84,.35); white-space: nowrap; }
.t-kind { font-size: .65rem; padding: 1px 5px; border-radius: 3px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; justify-self: start; }
.t-kind-bridge  { background: rgba(56,189,248,.12); color: #38bdf8; }
.t-kind-fund    { background: rgba(183,239,84,.12); color: var(--acid); }
.t-kind-trade   { background: rgba(99,102,241,.15); color: #a5b4fc; }
.t-kind-harvest { background: rgba(251,191,36,.12); color: #fbbf24; }
.t-kind-buyback { background: rgba(232,121,249,.12); color: #e879f9; }
.t-kind-error   { background: rgba(239,68,68,.12); color: #f87171; }
.t-kind-default { background: rgba(255,255,255,.06); color: var(--fg-muted); }
.t-msg { color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-msg .t-detail { color: rgba(255,255,255,.32); font-size: .72rem; margin-left: 4px; }
.terminal-tx { color: var(--acid); opacity: .55; font-size: .68rem; margin-left: 4px; text-decoration: none; }
.terminal-tx:hover { opacity: 1; }

/* Events */
.events-list { display: grid; gap: 8px; margin-top: 16px; max-height: 380px; overflow-y: auto; padding-right: 4px; }
.events-list::-webkit-scrollbar { width: 4px; }
.events-list::-webkit-scrollbar-track { background: transparent; }
.events-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
.event-item {
  display: grid; grid-template-columns: 40px 1fr auto;
  gap: 10px; align-items: start; padding: 12px;
  border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,.04);
  background: rgba(0,0,0,.14);
}
.event-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--acid-dim); color: var(--acid); font-size: .95rem;
  flex-shrink: 0;
}
.event-item h4 { margin: 0; font-family: var(--font-sans); font-size: .9rem; font-weight: 600; }
.event-item p { margin: 3px 0 0; color: var(--fg-muted); font-size: .79rem; line-height: 1.4; }
.event-meta { text-align: right; color: var(--fg-faint); font-size: .65rem; white-space: nowrap; }
.event-tx { display: inline-block; margin-top: 3px; color: var(--acid); font-size: .65rem; opacity: .7; text-decoration: underline; }
.empty-state { padding: 28px 20px; border: 1px dashed var(--border); border-radius: var(--radius-sm); color: var(--fg-muted); text-align: center; font-size: .88rem; }

/* Contract panel */
.contract-panel {
  background: linear-gradient(155deg, #eedaa2, #c9a258) !important;
  color: #1c1508; border-color: #f6e9c0 !important;
  transform: rotate(.25deg); overflow: hidden;
}
.contract-panel::after {
  content: "WANTED"; position: absolute; right: -22px; top: 28px;
  font-family: var(--font-sans); font-size: 4.2rem; font-weight: 700; opacity: .06;
  transform: rotate(12deg); pointer-events: none;
}
.contract-panel h3 { font-family: var(--font-sans); font-size: 1.3rem; margin: 8px 0 12px; }
.contract-body { color: #4b3d24; line-height: 1.55; font-size: .88rem; margin: 0 0 14px; }
.contract-addr {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 13px 15px; margin-bottom: 14px;
  border: 2px dashed #6b552b; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.2); color: #1c1508;
  font-size: .83rem; overflow: hidden;
}
.contract-addr span { overflow: hidden; text-overflow: ellipsis; }
.contract-addr b { flex-shrink: 0; font-family: var(--font-sans); font-size: .7rem; letter-spacing: .08em; color: #5c461f; }
.contract-addr:hover { background: rgba(255,255,255,.3); }
.contract-addr:focus-visible { outline: 2px solid #5c461f; outline-offset: 2px; }
.link-row { display: grid; grid-template-columns: 1fr 1fr 44px 44px; gap: 8px; }
.icon-link {
  height: 44px; display: grid; place-items: center; border-radius: var(--radius-sm);
  background: #1a2810; color: #f0e8c4; border: 2px solid #0e1808;
  transition: background .15s;
}
.icon-link:hover { background: #243a15; }
.icon-link:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; }
.hidden-link { display: none !important; }
.legal { display: block; margin-top: 14px; color: #5f5031; font-size: .74rem; line-height: 1.45; }

/* ── Loop section ────────────────────────────────────────────────────────── */
.loop-section { padding: 108px 0 24px; }
.loop-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.loop-card {
  min-height: 320px; padding: 22px; border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(155deg, var(--surface-hi), var(--surface));
  position: relative; overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.loop-card:hover { transform: translateY(-5px) rotate(-.3deg); border-color: var(--border-med); box-shadow: var(--shadow); }
.loop-num {
  position: absolute; top: 14px; right: 16px;
  font-family: var(--font-sans); font-size: 2.6rem; font-weight: 700; opacity: .07; line-height: 1;
}
.loop-icon {
  width: 58px; height: 58px; display: grid; place-items: center;
  background: var(--acid-dim); border: 1px solid rgba(183,239,84,.18);
  border-radius: 20px 13px 21px 14px; color: var(--acid);
}
.loop-card h3 { font-family: var(--font-sans); font-size: 1.35rem; font-weight: 700; margin: 22px 0 10px; }
.loop-card p { color: var(--fg-muted); line-height: 1.6; font-size: .88rem; min-height: 90px; margin: 0 0 14px; }
.loop-card b { color: var(--acid); font-family: var(--font-sans); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; }

/* ── Lore section ────────────────────────────────────────────────────────── */
.lore-section { margin-top: 100px; position: relative; overflow: hidden; }
.lore-bg {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #1e4026, #0c1f10);
  border-block: 1px solid rgba(200,240,160,.12);
}
.lore-inner {
  min-height: 720px; display: grid; grid-template-columns: .9fr 1.1fr;
  align-items: end; gap: 20px; position: relative; z-index: 1;
  padding-block: 60px;
}
.lore-art { align-self: end; }
.lore-art img { max-height: 680px; object-fit: contain; filter: drop-shadow(0 30px 20px rgba(0,0,0,.42)); }
.scroll-card {
  align-self: center;
  background: linear-gradient(150deg, #f2e8c4, #d5bb78);
  color: #1c1508;
  padding: clamp(28px, 5vw, 52px);
  border: 3px solid #6e5225; border-radius: var(--radius-lg) 14px var(--radius-lg) 16px;
  box-shadow: 0 20px 0 rgba(4,9,4,.2), inset 0 0 60px rgba(120,76,18,.08);
  transform: rotate(.6deg);
}
.scroll-card .eyebrow-warm { color: #775525; }
.scroll-card h2 { font-family: var(--font-sans); font-size: clamp(2.2rem, 4.2vw, 3.8rem); }
.scroll-card p { color: #4a3e28; line-height: 1.72; margin: 14px 0 0; }
.scroll-card blockquote {
  margin: 22px 0 12px; padding: 16px 20px;
  border-left: 4px solid #4e7028;
  background: rgba(255,255,255,.2);
  font-family: var(--font-sans); font-size: 1.25rem; font-style: italic; font-weight: 600;
}
.signature { text-align: right; color: #62522c; font-weight: 700; font-family: var(--font-sans); font-size: .88rem; margin-top: 12px; }

/* ── Character grid ──────────────────────────────────────────────────────── */
.character-section { padding: 108px 0 24px; }
.character-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.char-card {
  padding: 22px; border-top: 3px solid var(--acid);
  background: rgba(16,32,18,.7); border-radius: 0 0 var(--radius) var(--radius);
  border-left: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.char-icon {
  width: 52px; height: 52px; display: grid; place-items: center;
  background: var(--acid-dim); border-radius: var(--radius-sm); color: var(--acid);
  margin-bottom: 16px;
}
.char-card h3 { font-family: var(--font-sans); font-size: 1.15rem; font-weight: 700; margin: 0 0 10px; }
.char-card p { margin: 0; color: var(--fg-muted); line-height: 1.58; font-size: .88rem; }

/* ── Roadmap ─────────────────────────────────────────────────────────────── */
.roadmap-section { padding: 108px 0 24px; }
.roadmap-line { position: relative; max-width: 900px; margin: 44px auto 0; }
.roadmap-line::before {
  content: ""; position: absolute; left: 26px; top: 24px; bottom: 24px; width: 2px;
  background: linear-gradient(180deg, var(--acid), rgba(183,239,84,.1));
}
.roadmap-step { display: grid; grid-template-columns: 54px 1fr; gap: 22px; padding-bottom: 36px; }
.step-node {
  width: 54px; height: 54px; display: grid; place-items: center;
  border-radius: 50%; background: #0e2210; border: 2px solid #3a5c28;
  color: var(--fg-muted); font-family: var(--font-sans); font-weight: 700; font-size: .82rem;
  z-index: 1;
}
.roadmap-step.active .step-node {
  background: var(--acid); color: var(--bg); border-color: #d7fb90;
  box-shadow: 0 0 0 8px rgba(183,239,84,.08);
}
.step-body small { font-family: var(--font-sans); font-weight: 700; font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; color: var(--acid); }
.step-body h3 { font-family: var(--font-sans); font-size: 1.45rem; font-weight: 700; margin: 5px 0 8px; }
.step-body p { color: var(--fg-muted); margin: 0; line-height: 1.58; font-size: .88rem; }

/* ── FAQ ─────────────────────────────────────────────────────────────────── */
.faq-section { padding: 108px 0 24px; }
.faq-list { display: grid; gap: 8px; max-width: 960px; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: rgba(14,28,15,.7); overflow: hidden;
}
.faq-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%;
  padding: 18px 20px; border: 0; background: transparent; color: var(--fg); text-align: left;
  font-family: var(--font-sans); font-size: .97rem; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.faq-trigger:hover { background: rgba(183,239,84,.04); }
.faq-trigger:focus-visible { outline: 2px solid var(--acid); outline-offset: -2px; }
.faq-icon { flex-shrink: 0; color: var(--acid); font-size: 1.3rem; font-weight: 300; line-height: 1; transition: transform .25s ease; }
.faq-trigger[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-body { padding: 0 20px; overflow: hidden; }
.faq-body p { color: var(--fg-muted); line-height: 1.65; margin: 0 0 18px; }

/* ── Final CTA ───────────────────────────────────────────────────────────── */
.final-cta-section { margin-top: 90px; background: var(--acid); transform: rotate(.15deg); border-block: 3px solid #1a2c0c; }
.final-cta-inner {
  min-height: 280px; display: flex; align-items: center; justify-content: space-between; gap: 30px;
  transform: rotate(-.15deg); padding-block: 48px;
}
.final-cta-section h2 { font-family: var(--font-sans); color: #0d1a08; }
.final-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  min-height: 160px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  color: var(--fg-muted); font-size: .82rem; padding-block: 24px;
}
.footer-logo { color: var(--fg); }
.back-top { transition: color .15s; }
.back-top:hover { color: var(--acid); }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 22px;
  transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: 999px;
  color: var(--bg); background: var(--acid);
  font-family: var(--font-sans); font-weight: 700; font-size: .88rem;
  z-index: 200; transition: .22s ease; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .site-header nav {
    position: fixed; inset: 70px 14px auto; display: none; flex-direction: column;
    align-items: stretch; padding: 16px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: #090f0a; box-shadow: var(--shadow);
    z-index: 90;
  }
  .site-header nav.open { display: flex; }
  .menu-button { display: flex; order: 2; margin-left: auto; }
  .button-sm.site-header { order: 3; }
  .hero { grid-template-columns: 1fr; padding-top: 80px; }
  .hero-copy { text-align: center; }
  .status-chip, .hero-lede { margin-inline: auto; }
  .hero-actions, .mini-stats { justify-content: center; margin-inline: auto; }
  .hero-stage { min-height: 580px; }
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-featured { grid-column: 1 / -1; grid-row: auto; }
  .dash-grid, .dash-bottom, .lore-inner { grid-template-columns: 1fr; }
  .loop-grid, .character-grid { grid-template-columns: repeat(2, 1fr); }
  .lore-art { order: 2; }
  .lore-art img { max-height: 500px; margin-inline: auto; }
  .scroll-card { margin-top: 50px; }
}
@media (max-width: 680px) {
  .site-header { width: calc(100% - 16px); top: 8px; margin-top: 8px; padding: 8px 10px; }
  .logo small { display: none; }
  .button-sm { display: none; }
  .section-shell { width: min(100% - 24px, 1180px); }
  .hero { min-height: auto; padding: 60px 0 32px; }
  .hero h1 { font-size: clamp(3.3rem, 16vw, 5rem); }
  .mini-stats { grid-template-columns: 1fr; }
  .hero-stage { min-height: 460px; }
  .hero-cat { width: 112%; max-width: none; }
  .section-header { display: block; }
  .refresh-row { margin-top: 14px; justify-content: space-between; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-featured { grid-column: auto; grid-row: auto; }
  .dashboard-section,.loop-section,.character-section,.roadmap-section,.faq-section { padding-top: 76px; }
  .loop-grid,.character-grid { grid-template-columns: 1fr; }
  .panel { padding: 16px; }
  .panel-head { display: block; }
  .chart-tabs { margin-top: 12px; }
  .chart-wrap { height: 260px; }
  .link-row { grid-template-columns: 1fr 1fr; }
  .icon-link { display: none; }
  .event-item { grid-template-columns: 36px 1fr; }
  .event-meta { grid-column: 2; text-align: left; }
  .lore-inner { min-height: auto; padding-block: 40px; }
  .scroll-card { transform: none; margin-top: 30px; }
  .lore-art img { max-height: 440px; }
  .final-cta-inner { display: block; min-height: 300px; padding-block: 50px; }
  .final-actions { margin-top: 22px; }
  .site-footer { padding-block: 36px; flex-direction: column; align-items: flex-start; }
  .bubble-one { left: -2%; top: 12%; }
  .bubble-two { right: -1%; bottom: 14%; }
  .comic-bubble { font-size: .62rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-cat { animation: none; }
  .reveal-section { opacity: 1; transform: none; transition: none; }
  .stagger-item { opacity: 1; transform: none; transition: none; }
}
