:root {
    --bg: #f5f4fa;
    --bg2: #eceaf5;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --muted2: #9ca3af;
    --line: #e8e6f0;
    --purple: #7c5cff;
    --purple-d: #6439f0;
    --purple-s: rgba(124,92,255,.12);
    --green: #10b981;
    --green-s: rgba(16,185,129,.12);
    --red: #ef4444;
    --blue: #3b82f6;
    --amber: #f59e0b;
    --shadow: 0 1px 2px rgba(17,24,39,.04), 0 8px 24px rgba(76,29,149,.06);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: Inter, system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: none; background: none; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; letter-spacing: -.02em; }
.wrap { width: min(1080px, calc(100% - 28px)); margin: 0 auto; }

.topbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(245,244,250,.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.topbar-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; padding: 12px 0;
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); }
.brand-logo { width: 34px; height: 34px; display: block; filter: drop-shadow(0 6px 14px rgba(91,46,240,.32)); }
.brand-word { display: flex; flex-direction: column; line-height: 1.05; gap: 1px; }
.brand-word .name { font-size: 16px; font-weight: 800; letter-spacing: -.45px; }
.brand-word .name em {
    font-style: normal;
    background: linear-gradient(105deg, #7c5cff 0%, #a78bfa 45%, #5b2ef0 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-word .tag { font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted2); }
.nav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-links a {
    padding: 7px 11px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted);
}
.nav-links a:hover, .nav-links a.on { color: var(--purple); background: var(--purple-s); }
.btn-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 14px; border-radius: 999px; font-size: 13px; font-weight: 750;
    background: var(--purple); color: #fff;
    box-shadow: 0 8px 20px rgba(124,92,255,.28);
}
.btn-pill:hover { background: var(--purple-d); }
.btn-ghost {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 14px; border-radius: 999px; font-size: 13px; font-weight: 750;
    border: 1px solid var(--line); background: #fff; color: var(--text);
}
.btn-ghost:hover { border-color: #d6d0f0; color: var(--purple); }

.hero {
    margin-top: 22px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 28px 28px 24px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: auto -10% -40% 40%;
    height: 180px;
    background: radial-gradient(circle, rgba(124,92,255,.18), transparent 70%);
    pointer-events: none;
}
.eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
    color: var(--purple); background: var(--purple-s);
    padding: 5px 10px; border-radius: 999px; margin-bottom: 12px;
}
.hero h1 {
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 800; letter-spacing: -.7px; line-height: 1.15;
    margin-bottom: 10px; max-width: 18ch;
}
.hero p { color: var(--muted); font-size: 15px; max-width: 54ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.layout {
    margin: 18px auto 40px;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}
.side-nav {
    position: sticky; top: 78px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 12px;
}
.side-nav h4 {
    font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
    color: var(--muted2); font-weight: 800; padding: 6px 8px 8px;
}
.side-nav a {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 10px; border-radius: 10px;
    font-size: 13px; font-weight: 650; color: var(--muted);
}
.side-nav a i { width: 16px; text-align: center; opacity: .8; }
.side-nav a:hover, .side-nav a.on { background: var(--purple-s); color: var(--purple); }

.content { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 18px 18px 16px;
}
.card h2 {
    font-size: 18px; font-weight: 800; letter-spacing: -.3px; margin-bottom: 8px;
}
.card h3 {
    font-size: 14px; font-weight: 800; margin: 14px 0 8px;
}
.card p, .card li { color: var(--muted); font-size: 14px; }
.card ul, .card ol { padding-left: 18px; }
.card li { margin: 6px 0; }
.card p + p { margin-top: 8px; }

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.stat {
    background: #faf9fd;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
}
.stat .k { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted2); }
.stat .v { margin-top: 6px; font-size: 22px; font-weight: 800; letter-spacing: -.4px; }
.stat .s { margin-top: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.stat.ok .v { color: var(--green); }
.stat.warn .v { color: var(--amber); }
.stat.bad .v { color: var(--red); }

.code {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 12px;
    line-height: 1.55;
    overflow-x: auto;
    margin-top: 10px;
}
.code .cm { color: #94a3b8; }
.code .ky { color: #c4b5fd; }
.code .st { color: #86efac; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.table th {
    text-align: left; font-size: 10px; letter-spacing: .05em; text-transform: uppercase;
    color: var(--muted2); padding: 8px 6px; border-bottom: 1px solid var(--line);
}
.table td {
    padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: top;
    color: var(--text); font-weight: 600;
}
.table td.muted { color: var(--muted); font-weight: 500; }
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 750;
    background: var(--purple-s); color: var(--purple);
}
.badge.green { background: var(--green-s); color: #059669; }
.badge.amber { background: rgba(245,158,11,.12); color: #b45309; }

.faq details {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    background: #faf9fd;
    margin-top: 8px;
}
.faq summary {
    cursor: pointer; font-weight: 750; font-size: 14px; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary { margin-bottom: 8px; color: var(--purple); }
.faq details p { font-size: 13px; }

.cta-banner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
    padding: 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, #120b2e 0%, #2a1468 48%, #5b2ef0 100%);
    color: #fff;
}
.cta-banner h3 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.cta-banner p { font-size: 13px; opacity: .82; max-width: 46ch; }
.cta-banner .btn-pill { background: #fff; color: #2a1468; box-shadow: none; }

.footer {
    margin: 28px auto 40px;
    display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 20px;
    padding-top: 18px; border-top: 1px solid var(--line);
}
.footer h4 { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted2); margin-bottom: 10px; }
.footer p { font-size: 13px; color: var(--muted); line-height: 1.55; max-width: 360px; }
.footer a { display: block; margin-top: 7px; font-size: 13px; color: var(--muted); }
.footer a:hover, .footer a.on { color: var(--purple); }
.footer .copy { margin-top: 12px; font-size: 12px; color: var(--muted2); }

.live-dot {
    width: 7px; height: 7px; border-radius: 50%; background: var(--green);
    box-shadow: 0 0 0 3px rgba(16,185,129,.2);
    display: inline-block;
    animation: pulse 1.6s ease infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.25); opacity: .6; }
}

@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    .side-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
    .side-nav h4 { width: 100%; }
    .grid-3 { grid-template-columns: 1fr; }
    .footer { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .hero { padding: 20px 16px 18px; }
    .hero h1 { max-width: none; font-size: 26px; }
    .hero p { font-size: 14px; }
    .card { padding: 14px; }
    .cta-banner { padding: 16px; }
    .cta-banner .btn-pill { width: 100%; justify-content: center; }
    .code { font-size: 11px; padding: 12px; }
    .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .topbar-inner { gap: 8px; }
    .btn-pill { padding: 8px 12px; font-size: 12px; }
    .live-dot { animation: none; }
    .detail-row { grid-template-columns: 96px 1fr; }
}

@media (max-width: 560px) {
    .wrap { width: calc(100% - 16px); }
    .stat .v { font-size: 18px; }
    .grid-3 { gap: 8px; }
}

/* Detail pages (tx / block) */
.pv-hash {
    margin: 12px 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--purple-s);
    border: 1px solid rgba(124,92,255,.22);
    color: var(--purple-d);
    font-size: 12.5px;
    word-break: break-all;
}
.detail-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.detail-row {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 8px 14px;
    align-items: start;
    font-size: 13px;
}
.detail-row .k { color: var(--muted); font-weight: 600; }
.detail-row .v { word-break: break-all; }
.hash-link { color: var(--purple-d); font-weight: 600; }
.hash-link:hover { text-decoration: underline; }
.table-wrap { overflow-x: auto; margin-top: 10px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.table .right { text-align: right; }
.muted { color: var(--muted); }
.badge.green { background: var(--green-s); color: var(--green); }

