:root {
  --bg: #080c14;
  --surface: #101726;
  --surface-2: #162033;
  --border: #233048;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --emerald: #10b981;
  --sky: #38bdf8;
  --violet: #a78bfa;
  --amber: #f59e0b;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(8, 12, 20, 0.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, #10b981 0%, #38bdf8 50%, #a78bfa 100%);
  color: #061214; font-family: var(--mono); font-weight: 800; font-size: 13px;
  display: grid; place-items: center;
}
.kofi-btn {
  display: inline-flex; align-items: center; gap: 7px; background: var(--amber);
  color: #111827; font-weight: 700; font-size: 13px; padding: 9px 15px; border-radius: 8px;
}
.kofi-btn:hover { text-decoration: none; filter: brightness(1.07); }

.container { max-width: 1180px; margin: 0 auto; padding: 28px 20px 52px; }
.hero {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(56, 189, 248, 0.08), rgba(167, 139, 250, 0.08));
  border: 1px solid var(--border); border-radius: 16px; padding: 26px; margin-bottom: 22px;
}
.hero-tag {
  display: inline-block; font-family: var(--mono); font-size: 11.5px; color: var(--emerald);
  background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.32);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
}
.hero h1 { margin: 0 0 8px; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.hero p { margin: 0 0 18px; color: var(--text-muted); max-width: 780px; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  padding: 10px 16px; border-radius: 9px; font-size: 13.5px; font-weight: 650;
  cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
}
.btn-primary { background: var(--emerald); border-color: var(--emerald); color: #051610; font-weight: 750; }
.btn:hover { text-decoration: none; filter: brightness(1.06); }

.metrics {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px;
}
.metric {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
}
.metric-k { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.metric-v { margin-top: 4px; font-family: var(--mono); font-size: 20px; font-weight: 800; }

.cards {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px;
}
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
}
.card-wide { grid-column: 1 / -1; }
.card-badge {
  display: inline-block; font-family: var(--mono); font-size: 11px; padding: 3px 8px;
  border-radius: 6px; margin-bottom: 8px;
}
.card h2 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0 0 10px; font-size: 13.5px; color: var(--text-muted); }
.card ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-muted); }
.card li { margin-bottom: 4px; }
.code-snippet {
  background: #060a11; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
  font-family: var(--mono); font-size: 11.5px; color: #cbd5e1; overflow-x: auto; white-space: nowrap;
  scrollbar-width: thin; scrollbar-color: #334155 #060a11;
}
.code-snippet::-webkit-scrollbar { height: 6px; }
.code-snippet::-webkit-scrollbar-track { background: #060a11; border-radius: 4px; }
.code-snippet::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }

.inspector-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; margin-bottom: 24px;
}
.inspector-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.inspector-head h3 { margin: 0 0 4px; font-size: 16.5px; }
.inspector-head p { margin: 0; font-size: 13px; color: var(--text-muted); max-width: 720px; }
.tab-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tab-btn {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
  border-radius: 8px; padding: 7px 12px; font-family: var(--mono); font-size: 12px;
  font-weight: 650; cursor: pointer;
}
.tab-btn.active {
  background: rgba(16, 185, 129, 0.14); border-color: var(--emerald); color: #6ee7b7;
}
.hash-bar {
  background: #060a11; border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 12px; margin-bottom: 10px; font-family: var(--mono); font-size: 11.5px;
  color: #93c5fd; word-break: break-all;
}
.source-pre {
  margin: 0; background: #060a11; border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; max-height: 290px; overflow: auto; font-family: var(--mono); font-size: 12px;
  line-height: 1.5; color: #cbd5e1; white-space: pre;
  scrollbar-width: thin; scrollbar-color: #334155 #060a11;
}

.log-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px;
}
.log-box h3 { margin: 0 0 12px; font-size: 16px; }
.log-item { border-left: 2px solid var(--emerald); padding: 2px 0 12px 14px; margin-left: 4px; font-size: 13.5px; }
.log-item:last-child { padding-bottom: 0; }
.footer {
  max-width: 1180px; margin: 0 auto; padding: 18px 20px 36px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-muted);
}

@media (max-width: 960px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .metrics { grid-template-columns: 1fr; }
  .hero h1 { font-size: 22px; }
}
