/* =========================================================================
   BountyHunter — Article page styles
   Theme: Dark-first, gradient-accented, Solana / Jupiter inspired
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Tokens & Resets
   ------------------------------------------------------------------------- */

:root {
    /* Palette — Dark (default) */
    --bg: #0B0F14;
    --bg-elev: #11161D;
    --bg-elev-2: #161C25;
    --bg-glass: rgba(22, 28, 37, 0.65);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #E7ECF3;
    --text-muted: #98A2B3;
    --text-dim: #6B7480;

    /* Brand / Accent */
    --accent: #19FB9B;            /* Jupiter green */
    --accent-2: #C7F284;          /* Lime */
    --accent-3: #9945FF;          /* Solana purple */
    --accent-4: #FF6B6B;          /* Critical red */
    --accent-warn: #FFA94D;
    --accent-info: #4FC3F7;

    --gradient: linear-gradient(135deg, var(--accent-2) 0%, var(--accent) 100%);
    --gradient-2: linear-gradient(135deg, var(--accent-3) 0%, var(--accent) 100%);

    /* Layers */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 0 1px rgba(25, 251, 155, 0.25), 0 8px 32px rgba(25, 251, 155, 0.18);

    /* Geometry */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-pill: 999px;

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Layout */
    --container-w: 1200px;
    --nav-h: 68px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg: #F7F8FA;
    --bg-elev: #FFFFFF;
    --bg-elev-2: #F1F4F9;
    --bg-glass: rgba(255, 255, 255, 0.75);
    --border: rgba(11, 15, 20, 0.10);
    --border-strong: rgba(11, 15, 20, 0.20);
    --text: #0B0F14;
    --text-muted: #475467;
    --text-dim: #667085;

    --accent: #0FB678;
    --accent-2: #5C9E1A;
    --accent-3: #6D2BD9;
    --gradient: linear-gradient(135deg, #5C9E1A 0%, #0FB678 100%);
    --gradient-2: linear-gradient(135deg, #6D2BD9 0%, #0FB678 100%);

    --shadow-md: 0 8px 24px rgba(11, 15, 20, 0.08);
    --shadow-lg: 0 20px 60px rgba(11, 15, 20, 0.10);
    --shadow-glow: 0 0 0 1px rgba(15, 182, 120, 0.30), 0 8px 32px rgba(15, 182, 120, 0.18);
}

[data-theme="light"] .badge--reward { color: #5C7E1A; background: rgba(199, 242, 132, 0.30); border-color: rgba(92, 158, 26, 0.35); }
[data-theme="light"] .badge--chain  { color: #5B22B8; background: rgba(153, 69, 255, 0.10); border-color: rgba(153, 69, 255, 0.30); }
[data-theme="light"] .badge--live   { color: #0FB678; background: rgba(15, 182, 120, 0.10); border-color: rgba(15, 182, 120, 0.35); }
[data-theme="light"] .toc__link.is-active { background: rgba(15, 182, 120, 0.10); }
[data-theme="light"] .btn--primary { color: #FFFFFF; }
[data-theme="light"] .btn--primary:hover { color: #FFFFFF; }
[data-theme="light"] .meta__avatar { color: #FFFFFF; }
[data-theme="light"] .card__icon { color: #FFFFFF; }
[data-theme="light"] .step-list li::before { color: #FFFFFF; }
[data-theme="light"] .reward__sev { color: #0FB678; background: rgba(15, 182, 120, 0.15); }

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s var(--ease);
}

a:hover {
    color: var(--accent-2);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

::selection {
    background: rgba(25, 251, 155, 0.25);
    color: var(--text);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-elev-2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* -------------------------------------------------------------------------
   2. Utilities
   ------------------------------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 24px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.kbd {
    font-family: var(--font-mono);
    font-size: 0.85em;
    padding: 2px 8px;
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--accent);
}

.hl {
    background: linear-gradient(180deg, transparent 60%, rgba(25, 251, 155, 0.25) 60%);
    padding: 0 4px;
    color: var(--text);
    font-weight: 600;
}

.link {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(25, 251, 155, 0.35);
    text-underline-offset: 3px;
}

/* -------------------------------------------------------------------------
   3. Reading progress bar
   ------------------------------------------------------------------------- */

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--gradient);
    z-index: 1000;
    transition: width 0.1s linear;
    box-shadow: 0 0 8px rgba(25, 251, 155, 0.6);
}

/* -------------------------------------------------------------------------
   4. Navigation
   ------------------------------------------------------------------------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-h);
    background: var(--bg-glass);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--border);
    transition: border-color 0.3s var(--ease);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 24px;
}

.nav__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.01em;
}

.nav__brand:hover {
    color: var(--text);
}

.nav__logo {
    width: 32px;
    height: 32px;
}

.nav__name--accent {
    color: var(--accent);
}

.nav__menu {
    display: flex;
    gap: 6px;
    margin-left: auto;
    margin-right: 12px;
}

.nav__link {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease);
}

.nav__link:hover {
    color: var(--text);
    background: var(--bg-elev);
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav__burger {
    display: none;
    width: 36px;
    height: 36px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.nav__burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -------------------------------------------------------------------------
   5. Buttons
   ------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    border: 1px solid transparent;
    transition: transform 0.15s var(--ease), background 0.2s var(--ease),
                box-shadow 0.2s var(--ease), color 0.2s var(--ease);
    white-space: nowrap;
    cursor: pointer;
}

.btn--lg {
    padding: 14px 22px;
    font-size: 15px;
}

.btn--primary {
    background: var(--gradient);
    color: #062013;
    box-shadow: 0 4px 16px rgba(25, 251, 155, 0.25);
}

.btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(25, 251, 155, 0.4);
    color: #062013;
}

.btn--ghost {
    background: var(--bg-elev);
    color: var(--text);
    border-color: var(--border);
}

.btn--ghost:hover {
    background: var(--bg-elev-2);
    border-color: var(--border-strong);
    color: var(--text);
    transform: translateY(-1px);
}

#themeToggle {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
}

/* -------------------------------------------------------------------------
   6. Hero
   ------------------------------------------------------------------------- */

.hero {
    position: relative;
    padding: 64px 0 56px;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background-image: url('../assets/hero-bg.svg');
    background-size: cover;
    background-position: center;
    opacity: 0.9;
    z-index: 0;
    pointer-events: none;
}

[data-theme="light"] .hero__bg {
    opacity: 0.35;
    filter: brightness(1.6);
}

.hero__inner {
    position: relative;
    z-index: 1;
    max-width: 920px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 28px;
}

.breadcrumbs a {
    color: var(--text-muted);
    transition: color 0.2s var(--ease);
}

.breadcrumbs a:hover {
    color: var(--text);
}

.breadcrumbs__sep {
    opacity: 0.5;
}

.hero__head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--bg-elev);
    color: var(--text-muted);
}

.badge--live {
    background: rgba(25, 251, 155, 0.10);
    border-color: rgba(25, 251, 155, 0.30);
    color: var(--accent);
}

.badge__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(25, 251, 155, 0.7);
    animation: pulse 1.8s var(--ease) infinite;
}

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(25, 251, 155, 0.7); }
    70%  { box-shadow: 0 0 0 10px rgba(25, 251, 155, 0); }
    100% { box-shadow: 0 0 0 0 rgba(25, 251, 155, 0); }
}

.badge--reward {
    background: rgba(199, 242, 132, 0.08);
    border-color: rgba(199, 242, 132, 0.25);
    color: var(--accent-2);
}

.badge--chain {
    background: rgba(153, 69, 255, 0.10);
    border-color: rgba(153, 69, 255, 0.30);
    color: #C7A8FF;
}

.hero__title {
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.1;
    letter-spacing: -0.025em;
    font-weight: 800;
    margin: 0 0 20px;
}

.hero__title--accent { color: var(--text-muted); font-weight: 600; }
.hero__title--reward {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero__lede {
    font-size: clamp(16px, 1.4vw, 19px);
    color: var(--text-muted);
    margin: 0 0 32px;
    max-width: 760px;
}

.hero__lede strong { color: var(--text); }

.hero__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 18px 22px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    backdrop-filter: blur(8px);
}

.meta__author { display: flex; align-items: center; gap: 12px; }

.meta__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gradient);
    color: #062013;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.meta__avatar--lg { width: 56px; height: 56px; font-size: 16px; }

.meta__authorName { margin: 0; font-weight: 600; font-size: 14px; line-height: 1.3; }
.meta__sub { margin: 0; font-size: 12px; color: var(--text-dim); }

.meta__divider {
    width: 1px;
    height: 32px;
    background: var(--border);
}

.meta__group { display: flex; flex-wrap: wrap; gap: 24px; }
.meta__item { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.meta__label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); font-weight: 600; }

.status { font-weight: 600; }
.status--live { color: var(--accent); }

.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* -------------------------------------------------------------------------
   7. Stats strip
   ------------------------------------------------------------------------- */

.stats {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-elev);
}

.stats__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    padding: 0;
    background: var(--border);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
}

.stat {
    background: var(--bg-elev);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background 0.2s var(--ease);
}

.stat:hover { background: var(--bg-elev-2); }

.stat__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    font-weight: 600;
}

.stat__value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.stat__hint { font-size: 12px; color: var(--text-dim); }

/* -------------------------------------------------------------------------
   8. Layout — TOC + Article
   ------------------------------------------------------------------------- */

.layout { padding: 64px 0 80px; }

.layout__grid {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
}

.toc { position: sticky; top: calc(var(--nav-h) + 24px); }

.toc__card {
    padding: 22px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.toc__title {
    margin: 0 0 14px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    font-weight: 700;
}

.toc__nav { display: flex; flex-direction: column; gap: 2px; }

.toc__link {
    display: block;
    padding: 8px 12px;
    color: var(--text-muted);
    font-size: 14px;
    border-radius: var(--radius-sm);
    border-left: 2px solid transparent;
    transition: all 0.2s var(--ease);
}

.toc__link:hover {
    color: var(--text);
    background: var(--bg-elev-2);
}

.toc__link.is-active {
    color: var(--accent);
    background: rgba(25, 251, 155, 0.08);
    border-left-color: var(--accent);
    font-weight: 600;
}

.toc__divider {
    height: 1px;
    background: var(--border);
    margin: 18px 0;
}

.toc__shareLabel {
    margin: 0 0 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    font-weight: 700;
}

.toc__shareBtns { display: flex; gap: 6px; }

.iconbtn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease);
}

.iconbtn:hover {
    background: var(--bg);
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-1px);
}

/* -------------------------------------------------------------------------
   9. Article body
   ------------------------------------------------------------------------- */

.article { min-width: 0; }

.section { margin-bottom: 56px; scroll-margin-top: calc(var(--nav-h) + 32px); }
.section:last-of-type { margin-bottom: 0; }

.section__head { margin-bottom: 24px; }

.section__kicker {
    display: inline-block;
    margin-bottom: 12px;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: var(--bg-elev);
    border: 1px solid var(--border);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent);
    font-family: var(--font-mono);
}

.section__title {
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-weight: 700;
    margin: 0;
    color: var(--text);
}

.article p { margin: 0 0 16px; color: var(--text-muted); font-size: 16px; }
.article p strong { color: var(--text); font-weight: 600; }

.article code:not(pre code) {
    font-family: var(--font-mono);
    font-size: 0.88em;
    padding: 2px 8px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--accent-2);
}

/* Callouts */
.callout {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    margin: 24px 0;
    border: 1px solid var(--border);
    background: var(--bg-elev);
}

.callout > svg { flex-shrink: 0; margin-top: 2px; }
.callout > div { font-size: 15px; color: var(--text-muted); }
.callout > div strong { color: var(--text); }

.callout--info { border-color: rgba(79, 195, 247, 0.30); background: rgba(79, 195, 247, 0.06); }
.callout--info > svg { color: var(--accent-info); }

.callout--success { border-color: rgba(25, 251, 155, 0.30); background: rgba(25, 251, 155, 0.06); }
.callout--success > svg { color: var(--accent); }

/* Cards grid */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.card {
    padding: 24px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.card__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    background: linear-gradient(135deg, var(--c1, var(--accent)), var(--c2, var(--accent-2)));
    color: #062013;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.card__title { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--text); }
.card p { margin: 0; font-size: 14px; }

/* Reward grid */
.reward-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.reward {
    padding: 22px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}

.reward:hover { transform: translateY(-2px); border-color: var(--border-strong); }

.reward--critical {
    border-color: rgba(25, 251, 155, 0.40);
    background: linear-gradient(180deg, rgba(25, 251, 155, 0.07) 0%, var(--bg-elev) 100%);
    box-shadow: var(--shadow-glow);
    position: relative;
}

.reward--critical::before {
    content: 'FEATURED';
    position: absolute;
    top: -10px;
    right: 16px;
    background: var(--gradient);
    color: #062013;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
}

.reward__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.reward__sev {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(25, 251, 155, 0.15);
    color: var(--accent);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.reward__sev--high     { background: rgba(255, 169, 77, 0.15);  color: var(--accent-warn); }
.reward__sev--medium   { background: rgba(79, 195, 247, 0.15);  color: var(--accent-info); }
.reward__sev--low      { background: rgba(255, 255, 255, 0.06); color: var(--text-muted); }

.reward__amt {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.reward__desc { margin: 0 0 12px; font-size: 14px; color: var(--text-muted); }

.reward__list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px dashed var(--border);
    padding-top: 12px;
}

.reward__list li {
    position: relative;
    padding-left: 18px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.reward__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.6;
}

/* Table */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-elev);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table thead th {
    text-align: left;
    padding: 14px 18px;
    background: var(--bg-elev-2);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    font-weight: 700;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--bg-elev-2); color: var(--text); }
.table td code { color: var(--accent-2); }

.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tag--web   { background: rgba(79, 195, 247, 0.15);  color: var(--accent-info); }
.tag--smart { background: rgba(153, 69, 255, 0.15);  color: #C7A8FF; }
.tag--api   { background: rgba(255, 169, 77, 0.15);  color: var(--accent-warn); }

/* Lists */
.check-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    display: grid;
    gap: 10px;
}

.check-list li {
    position: relative;
    padding: 12px 14px 12px 44px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 15px;
}

.check-list li::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(25, 251, 155, 0.15);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2319FB9B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6L9 17l-5-5'/></svg>");
    background-size: 12px 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.check-list--cross li::before {
    background-color: rgba(255, 107, 107, 0.15);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF6B6B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M18 6L6 18M6 6l12 12'/></svg>");
}

.step-list {
    counter-reset: step;
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    display: grid;
    gap: 12px;
}

.step-list li {
    position: relative;
    padding: 16px 18px 16px 60px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    counter-increment: step;
}

.step-list li::before {
    content: counter(step);
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gradient);
    color: #062013;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-list li strong { color: var(--text); }

/* Code block */
.codeblock {
    margin: 18px 0 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #0A0E14;
}

[data-theme="light"] .codeblock { background: #1A1F2A; }

.codeblock__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
}

.codeblock__lang {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dim);
    letter-spacing: 0.04em;
}

.codeblock__copy {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-muted);
    transition: all 0.2s var(--ease);
}

.codeblock__copy:hover {
    color: var(--accent);
    background: rgba(25, 251, 155, 0.08);
    border-color: rgba(25, 251, 155, 0.3);
}

.codeblock__copy.is-copied { color: var(--accent); border-color: rgba(25, 251, 155, 0.3); }

.codeblock pre {
    margin: 0;
    padding: 18px 20px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    color: #DCE3EE;
}

.codeblock code { font-family: inherit; color: inherit; }

/* Token colors (basic syntax highlighting) */
.tk-c { color: #6B7480; font-style: italic; }   /* comment */
.tk-k { color: #C7A8FF; }                        /* keyword */
.tk-f { color: #19FB9B; }                        /* function */
.tk-a { color: #FFA94D; }                        /* attribute */
.tk-l { color: #4FC3F7; }                        /* lifetime */
.tk-n { color: #FFB86B; }                        /* number */

/* FAQ */
.faq { margin-top: 12px; display: grid; gap: 10px; }

.faq__item {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.2s var(--ease);
}

.faq__item[open] { border-color: var(--border-strong); }

.faq__item summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    color: var(--text);
    font-size: 15px;
    user-select: none;
}

.faq__item summary::-webkit-details-marker { display: none; }

.faq__chev {
    transition: transform 0.25s var(--ease);
    color: var(--text-muted);
    flex-shrink: 0;
}

.faq__item[open] .faq__chev { transform: rotate(180deg); color: var(--accent); }

.faq__body {
    padding: 0 20px 18px 20px;
    color: var(--text-muted);
    font-size: 15px;
    border-top: 1px dashed var(--border);
    margin-top: 0;
    padding-top: 14px;
}

.faq__body p { margin: 0; }

/* CTA */
.cta {
    margin-top: 64px;
    padding: 48px 32px;
    background:
        radial-gradient(circle at 20% 20%, rgba(25, 251, 155, 0.18), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(153, 69, 255, 0.18), transparent 50%),
        var(--bg-elev);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    text-align: center;
    overflow: hidden;
    position: relative;
}

.cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'><path d='M40 0H0v40' fill='none' stroke='%23ffffff' stroke-opacity='0.04'/></svg>");
    pointer-events: none;
}

.cta__inner { position: relative; z-index: 1; }

.cta__logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    filter: drop-shadow(0 8px 20px rgba(25, 251, 155, 0.4));
}

.cta__title {
    margin: 0 0 8px;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.cta__sub { margin: 0 0 24px; color: var(--text-muted); font-size: 17px; }

.cta__buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Author footer */
.author {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.author__name { margin: 0 0 6px; font-weight: 700; font-size: 16px; color: var(--text); }
.author__bio { margin: 0 0 12px; color: var(--text-muted); font-size: 15px; }

.author__tags { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
    padding: 4px 10px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* -------------------------------------------------------------------------
   10. Site footer
   ------------------------------------------------------------------------- */

.footer {
    border-top: 1px solid var(--border);
    background: var(--bg-elev);
    padding: 48px 0 0;
    margin-top: 40px;
}

.footer__inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer__col { display: flex; flex-direction: column; gap: 10px; }

.footer__col--brand .nav__brand { margin-bottom: 6px; }
.footer__tag { color: var(--text-muted); font-size: 14px; margin: 0; max-width: 320px; }

.footer__title {
    margin: 0 0 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    font-weight: 700;
}

.footer__link {
    color: var(--text-muted);
    font-size: 14px;
    transition: color 0.2s var(--ease);
}

.footer__link:hover { color: var(--accent); }

.footer__bottom {
    border-top: 1px solid var(--border);
    padding: 20px 0;
}

.footer__bottomInner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--text-dim);
    font-size: 13px;
}

.footer__bottomInner p { margin: 0; }

/* -------------------------------------------------------------------------
   11. Toast
   ------------------------------------------------------------------------- */

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translate(-50%, 30px);
    padding: 12px 22px;
    background: var(--bg-elev-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
    z-index: 1000;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}

/* -------------------------------------------------------------------------
   12. Reveal-on-scroll animation
   ------------------------------------------------------------------------- */

.section,
.card,
.reward,
.stat {
    animation: fadeUp 0.6s var(--ease) backwards;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* -------------------------------------------------------------------------
   13. Responsive
   ------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .layout__grid { grid-template-columns: 1fr; gap: 32px; }
    .toc { position: static; }
    .toc__card { padding: 18px; }
    .toc__nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
    .stats__grid { grid-template-columns: repeat(3, 1fr); }
    .stats__grid .stat:nth-child(n+4) { border-top: 1px solid var(--border); }
    .footer__inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 720px) {
    .nav__menu { display: none; }
    .nav__menu.is-open {
        display: flex;
        position: absolute;
        top: var(--nav-h);
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-elev);
        border-bottom: 1px solid var(--border);
        padding: 12px 16px;
        gap: 4px;
        margin: 0;
    }
    .nav__burger { display: flex; }
    .nav__actions .btn:not(#themeToggle) { display: none; }

    .hero { padding: 40px 0 32px; }
    .hero__meta { padding: 14px; gap: 14px; }
    .meta__divider { display: none; }
    .meta__group { gap: 16px; width: 100%; }

    .stats__grid { grid-template-columns: repeat(2, 1fr); }
    .stats__grid .stat:nth-child(n+3) { border-top: 1px solid var(--border); }

    .layout { padding: 40px 0 56px; }
    .toc__nav { grid-template-columns: 1fr; }

    .cta { padding: 32px 20px; }

    .author { flex-direction: column; }

    .footer__inner { grid-template-columns: 1fr; gap: 24px; }
    .footer__bottomInner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
