/* KLV Whale-Watch — mobile-first, no horizontal overflow at 380px. */
:root {
  --bg: #070b12;
  --bg-2: #0d1420;
  --panel: #111a28;
  --panel-2: #162131;
  --line: #223145;
  --ink: #eaf2ff;
  --muted: #93a4bd;
  --brand: #38d6ff;      /* deep-sea cyan */
  --brand-2: #6c8cff;    /* current blue */
  --ok: #35c98b;
  --warn: #ffbf47;
  --err: #ff5c6c;
  --radius: 14px;
  --maxw: 960px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1100px 500px at 82% -10%, rgba(56,214,255,.14), transparent 60%),
    radial-gradient(900px 500px at -10% 8%, rgba(108,140,255,.10), transparent 55%),
    var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }

/* ── Nav ─────────────────────────────────────────────────── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 14px 0; flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .3px; }
.logo .spark { filter: drop-shadow(0 0 6px rgba(56,214,255,.6)); }
.badge {
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  color: var(--brand); border: 1px solid var(--line);
  background: var(--panel); padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero { padding: 26px 0 8px; }
.kicker {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--brand);
}
.hero h1 {
  font-size: clamp(27px, 8vw, 50px); line-height: 1.05; margin: 8px 0 12px;
  letter-spacing: -0.5px;
}
.hero h1 .grad {
  background: linear-gradient(92deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub { color: var(--muted); font-size: clamp(15px, 4vw, 19px); max-width: 52ch; }

/* ── Controls ────────────────────────────────────────────── */
.controls {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end;
  margin: 18px 0 10px; padding: 14px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1 1 120px; }
.field label { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.field input, .field select {
  background: var(--bg-2); color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 11px; font: inherit; width: 100%; min-width: 0;
}
.btn {
  appearance: none; cursor: pointer; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--ink); border-radius: 10px;
  padding: 10px 16px; font: inherit; font-weight: 600; white-space: nowrap;
}
.btn.primary {
  border: none; color: #04121a;
  background: linear-gradient(92deg, var(--brand), var(--brand-2));
}
.btn:hover { filter: brightness(1.08); }

/* ── Feed ────────────────────────────────────────────────── */
.feed-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; flex-wrap: wrap; margin: 20px 0 10px;
}
.feed-head h2 { font-size: 18px; margin: 0; }
.feed-meta { color: var(--muted); font-size: 13px; }
.feed { display: flex; flex-direction: column; gap: 10px; }

.whale {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 12px;
  padding: 13px 14px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); min-width: 0;
}
.whale .amount { font-weight: 800; font-size: clamp(17px, 5vw, 22px); letter-spacing: -.3px; }
.whale .amount .asset { color: var(--brand); font-weight: 700; margin-left: 4px; }
.whale .usd { color: var(--muted); font-weight: 600; font-size: 13px; }
.whale .route {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; font-size: 13px; color: var(--muted); min-width: 0;
}
.whale .route .addr {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px;
  color: var(--ink); background: var(--bg-2); border: 1px solid var(--line);
  padding: 2px 7px; border-radius: 7px; word-break: break-all; max-width: 100%;
}
.whale .route .arrow { color: var(--brand); }
.whale .meta { grid-column: 1 / -1; display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.whale .meta a { font-size: 12px; }

.notice {
  padding: 14px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--panel); color: var(--muted); font-size: 14px;
}
.notice.error { border-color: rgba(255,92,108,.4); color: #ffb3bb; }
.notice.warn { border-color: rgba(255,191,71,.4); color: #ffe0a3; }

.skeleton { height: 74px; border-radius: var(--radius); background:
  linear-gradient(100deg, var(--panel) 30%, var(--panel-2) 50%, var(--panel) 70%);
  background-size: 200% 100%; animation: sh 1.2s infinite; }
@keyframes sh { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── How / footer ────────────────────────────────────────── */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 26px 0; }
.how .card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.how .card b { display: block; margin-bottom: 4px; }
.how .card .n { display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center;
  border-radius: 999px; background: var(--panel-2); color: var(--brand); font-size: 12px; margin-right: 6px; }
.how .card span { color: var(--muted); font-size: 13.5px; }

footer { color: var(--muted); font-size: 13px; padding: 24px 0 40px; border-top: 1px solid var(--line); margin-top: 24px; }
footer code { background: var(--bg-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }

@media (max-width: 560px) {
  .how { grid-template-columns: 1fr; }
  .whale { grid-template-columns: 1fr; }
  .whale .usd { grid-column: 1; }
}
