:root {
  --bg: #020605;
  --bg2: #04100c;
  --panel: rgba(6, 22, 17, 0.72);
  --line: rgba(29, 233, 160, 0.18);
  --line-hi: rgba(29, 233, 160, 0.55);
  --neon: #1de9a0;
  --neon-2: #b6ffe0;
  --ink: #e6fff5;
  --muted: #7fa396;
  --warn: #ff7a5c;
  --r: 18px;
  --glow: 0 0 24px rgba(29, 233, 160, 0.35), 0 0 2px rgba(29, 233, 160, 0.9);
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 Inter, system-ui, sans-serif;
  overflow-x: hidden;
}
a { color: inherit; }
h1, h2, h3, .caps, .brand span, .n { font-family: Michroma, Inter, sans-serif; letter-spacing: 0.02em; }
.hl { color: var(--neon); text-shadow: 0 0 18px rgba(29, 233, 160, 0.55); }
.muted { color: var(--muted); }
code { font-family: "JetBrains Mono", monospace; color: var(--neon-2); font-size: 0.92em; }

/* ── bar ─────────────────────────────────────────────────────────────── */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: linear-gradient(180deg, rgba(2, 6, 5, 0.94), rgba(2, 6, 5, 0.7));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 14px; }
.brand img { filter: drop-shadow(0 0 8px rgba(29, 233, 160, 0.6)); }
.links { display: flex; gap: 22px; margin-left: auto; font-size: 13px; }
.links a { text-decoration: none; color: var(--muted); }
.links a:hover { color: var(--neon); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px; border: 1px solid var(--line-hi);
  font: 600 14px Inter, sans-serif; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 0.12s, box-shadow 0.2s, background 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: var(--neon); color: #01140d; border-color: var(--neon); box-shadow: var(--glow); }
.btn-primary:hover:not(:disabled) { background: var(--neon-2); }
.btn-ghost { background: rgba(29, 233, 160, 0.06); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { background: rgba(29, 233, 160, 0.14); box-shadow: var(--glow); }
.btn-warn { background: rgba(255, 122, 92, 0.08); border-color: rgba(255, 122, 92, 0.55); color: #ffd9cf; }
.wide { width: 100%; }

/* ── hero ────────────────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: calc(100vh - 58px);
  display: flex; align-items: center;
  padding: 60px clamp(16px, 6vw, 88px);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url(/art/hero.webp) center right / cover no-repeat;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 5, 0.96) 0%, rgba(2, 6, 5, 0.75) 38%, rgba(2, 6, 5, 0.05) 70%),
    linear-gradient(0deg, var(--bg) 0%, rgba(2, 6, 5, 0) 30%);
}
.hero-copy { position: relative; max-width: 620px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font: 500 12px "JetBrains Mono", monospace; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--neon); box-shadow: var(--glow); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
h1 { font-size: clamp(36px, 6vw, 72px); line-height: 1.08; margin: 18px 0 20px; }
.lede { font-size: 17px; color: #bfdcd1; max-width: 520px; }
.cta { display: flex; gap: 12px; margin: 28px 0 40px; flex-wrap: wrap; }
.ticker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ticker > div { background: rgba(2, 10, 8, 0.8); padding: 14px 16px; }
.ticker dt, .stats dt, .grid-2 dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.ticker dd, .stats dd { margin: 4px 0 0; font: 600 18px "JetBrains Mono", monospace; color: var(--neon-2); }

/* ── sections ────────────────────────────────────────────────────────── */
section { padding: 90px clamp(16px, 6vw, 88px); }
h2 { font-size: clamp(22px, 3vw, 34px); margin: 0 0 8px; }
.sub { color: var(--muted); font-size: 12px; letter-spacing: 0.3em; margin: 0 0 40px; }

/* ── console ─────────────────────────────────────────────────────────── */
.console { background: radial-gradient(1200px 500px at 20% 0%, rgba(29, 233, 160, 0.07), transparent 60%), var(--bg); border-top: 1px solid var(--line); }
.console-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.console-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; }
.tank-stage, .readouts, .actions {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: inset 0 1px 0 rgba(182, 255, 224, 0.06);
}
.tank-stage { position: relative; display: grid; place-items: center; min-height: 420px; overflow: hidden; background: #000; }
.tank-stage img { position: relative; width: 100%; height: 100%; object-fit: cover; }
.tank-glow { position: absolute; inset: 0; background: radial-gradient(circle at 50% 60%, rgba(29, 233, 160, 0.35), transparent 60%); opacity: 0.2; transition: opacity 0.6s; z-index: 1; mix-blend-mode: screen; pointer-events: none; animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { filter: brightness(1.5); } }
.tank-badge { position: absolute; left: 14px; bottom: 14px; z-index: 2; padding: 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.7); border: 1px solid var(--line-hi); font: 500 12px "JetBrains Mono", monospace; }
.tank-badge span { color: var(--neon); }
.readouts { padding: 22px; display: flex; flex-direction: column; gap: 22px; }
.gauge-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.gauge { margin: 0; position: relative; overflow: hidden; aspect-ratio: 1; max-width: 180px; justify-self: center; width: 100%; }
.gauge svg { width: 100%; height: 100%; transform: rotate(135deg); }
.g-track, .g-val { fill: none; stroke-width: 9; stroke-linecap: round; stroke-dasharray: 235.6 314.2; }
.g-track { stroke: rgba(29, 233, 160, 0.1); }
.g-val { stroke: var(--neon); stroke-dasharray: 0 314.2; filter: drop-shadow(0 0 6px rgba(29, 233, 160, 0.8)); transition: stroke-dasharray 0.8s ease; }
.vent .g-val { stroke: var(--warn); filter: drop-shadow(0 0 6px rgba(255, 122, 92, 0.7)); }
.gauge figcaption { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.gauge b { font: 700 22px "JetBrains Mono", monospace; }
.gauge span { font-size: 11px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 18px; margin: 0; }
.grid-2 dd { margin: 3px 0 0; font: 600 16px "JetBrains Mono", monospace; overflow-wrap: anywhere; }
.grid-2 i { font-style: normal; color: var(--muted); font-size: 12px; }
.earn dd { color: var(--neon); text-shadow: 0 0 12px rgba(29, 233, 160, 0.5); }
.actions { padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.act label { display: block; font: 500 11px "JetBrains Mono", monospace; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field { display: flex; align-items: center; background: #010504; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.field:focus-within { border-color: var(--neon); box-shadow: var(--glow); }
.field input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--ink); font: 600 17px "JetBrains Mono", monospace; padding: 12px 14px; }
.mini { background: transparent; border: 0; color: var(--neon); font: 700 11px "JetBrains Mono", monospace; padding: 0 14px; cursor: pointer; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.hint { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.toast { min-height: 22px; margin: 18px 0 0; font: 500 13px "JetBrains Mono", monospace; color: var(--neon-2); }
.toast.err { color: var(--warn); }

/* ── how ─────────────────────────────────────────────────────────────── */
.how { text-align: center; background: linear-gradient(180deg, var(--bg), var(--bg2)); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: s; }
.steps li { position: relative; text-align: left; padding: 26px 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.steps li:not(:last-child)::after { content: "→"; position: absolute; right: -15px; top: 50%; color: var(--neon); font-size: 18px; transform: translateY(-50%); }
.n { font-size: 12px; color: var(--neon); }
.steps h3 { margin: 10px 0 8px; font-size: 16px; }
.steps p { margin: 0; color: #a9c7bb; font-size: 14px; }

/* ── ladder ──────────────────────────────────────────────────────────── */
.ladder { background: var(--bg2); }
.rungs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.rung { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #000; position: relative; }
.rung img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.rung .meta { padding: 12px 14px 14px; background: linear-gradient(180deg, rgba(2, 10, 8, 0.6), rgba(2, 10, 8, 1)); }
.rung .lv { font: 700 11px "JetBrains Mono", monospace; color: var(--neon); }
.rung h3 { font-size: 13px; margin: 4px 0 6px; }
.rung p { margin: 0; font: 500 12px "JetBrains Mono", monospace; color: var(--muted); }
.rung.me { border-color: var(--neon); box-shadow: var(--glow); }
.rung.me::before { content: "YOUR TANK"; position: absolute; top: 10px; left: 10px; z-index: 1; padding: 4px 8px; border-radius: 6px; background: var(--neon); color: #01140d; font: 700 10px "JetBrains Mono", monospace; }

/* ── plant ───────────────────────────────────────────────────────────── */
.plant-head { margin-bottom: 26px; }
.plant-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stats > div { background: rgba(4, 16, 12, 0.95); padding: 20px; }
.flush-card { padding: 22px; border: 1px solid var(--line-hi); border-radius: var(--r); background: radial-gradient(400px 200px at 50% 0%, rgba(29, 233, 160, 0.12), transparent), var(--panel); }
.flush-card h3 { margin: 0; font-size: 14px; }
.flush-card .big { font: 700 26px "JetBrains Mono", monospace; margin: 10px 0; color: var(--neon-2); }
.flush-card .big i { font-style: normal; font-size: 13px; color: var(--muted); }
.flush-card p.muted { font-size: 13px; }
.board-title { margin: 40px 0 14px; font-size: 14px; }
.board { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.board table { width: 100%; border-collapse: collapse; font: 500 13px "JetBrains Mono", monospace; }
.board th, .board td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.board th { color: var(--muted); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.board tr.me td { color: var(--neon); }
.board p { padding: 18px; margin: 0; }

/* ── rules ───────────────────────────────────────────────────────────── */
.rules { background: var(--bg2); border-top: 1px solid var(--line); }
.rule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.rule-grid article { padding: 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.rule-grid h3 { margin: 0 0 10px; font-size: 13px; color: var(--neon-2); }
.rule-grid p { margin: 0; color: #a9c7bb; font-size: 14px; overflow-wrap: anywhere; }
.rule-grid a { color: var(--neon); }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 26px clamp(16px, 6vw, 88px); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.foot span { display: inline-flex; gap: 8px; align-items: center; }

/* ── responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .console-grid { grid-template-columns: 1fr 1fr; }
  .tank-stage { grid-row: span 2; }
  .rungs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .links { display: none; }
  .bar .btn { margin-left: auto; }
  .ticker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .console-grid, .plant-grid { grid-template-columns: minmax(0, 1fr); }
  .tank-stage { grid-row: auto; min-height: 300px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -22px; transform: none; }
  .rule-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-bg { background-position: 70% center; }
  .hero-bg::after { background: linear-gradient(0deg, rgba(2, 6, 5, 0.97) 35%, rgba(2, 6, 5, 0.55) 100%); }
  section { padding: 64px 16px; }
  .hero { padding: 48px 16px; }
  .board th:nth-child(3), .board td:nth-child(3) { display: none; }
}
@media (max-width: 480px) {
  .rungs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .gauge b { font-size: 18px; }
}
