@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Inter:wght@300;400;500;600&display=swap');

/* Palette derived from pulsechain.com production bundle (assets/index-*.js): cyan→blue→violet→magenta gradients, #000 page bg, #e8eaed-adjacent text */
:root {
    --main-bg: #000000;
    --card-bg-light: #141414;
    --highlight-cyan: #00eaff;
    --highlight-blue: #0080ff;
    --highlight-violet: #8000ff;
    --highlight-magenta: #e619e6;
    /* Aliases used across existing rules (brand text + accents) */
    --highlight-purple: #00eaff;
    --text-primary: #ffffff;
    --text-secondary: #b4bac4;
    --nav-border: rgba(0, 234, 255, 0.22);
    --brand-gradient: linear-gradient(210deg, #00eaff 0%, #0080ff 28%, #8000ff 58%, #e619e6 100%);
    --brand-gradient-soft: linear-gradient(90deg, #00eaff, #8000ff);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--main-bg);
    background-image:
        radial-gradient(circle at 18% 22%, rgba(0, 234, 255, 0.12) 0%, transparent 42%),
        radial-gradient(circle at 82% 78%, rgba(128, 0, 255, 0.1) 0%, transparent 45%),
        radial-gradient(circle at 50% 100%, rgba(230, 25, 230, 0.06) 0%, transparent 38%);
    overflow-x: hidden;
    min-height: 100vh;
}

.wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* —— Nav —— */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.94);
    border-bottom: 1px solid var(--nav-border);
    backdrop-filter: blur(12px);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.menu-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
}

.brand {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
    background: var(--brand-gradient-soft);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    flex-shrink: 0;
}

.menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    list-style: none;
    padding: 4px 0;
    margin: 0;
}

.menu--primary {
    overflow-x: visible;
}

.menu a {
    display: block;
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
}

.menu a:hover {
    color: var(--text-primary);
    background: rgba(0, 234, 255, 0.15);
}

.menu a.is-active {
    color: var(--text-primary);
    background: rgba(0, 234, 255, 0.35);
}

/* —— More dropdown —— */
.menu-more-li {
    list-style: none;
    position: relative;
}

.nav-more {
    position: relative;
}

.nav-more-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(0, 234, 255, 0.12);
    border: 1px solid rgba(0, 234, 255, 0.35);
    cursor: pointer;
    list-style: none;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.nav-more-trigger::-webkit-details-marker {
    display: none;
}

.nav-more-trigger::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-top: 2px;
    opacity: 0.75;
    transition: transform 0.2s ease, margin 0.2s ease;
}

.nav-more[open] .nav-more-trigger::after {
    transform: rotate(180deg);
    margin-top: -2px;
}

.nav-more-trigger:hover {
    color: var(--text-primary);
    background: rgba(0, 234, 255, 0.22);
    border-color: rgba(0, 234, 255, 0.5);
}

.nav-more--contains-active .nav-more-trigger {
    color: var(--text-primary);
    background: rgba(0, 234, 255, 0.35);
    border-color: rgba(0, 234, 255, 0.45);
}

.nav-more-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: min(280px, calc(100vw - 48px));
    max-height: min(70vh, 400px);
    overflow-y: auto;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: rgba(12, 14, 28, 0.98);
    border: 1px solid var(--nav-border);
    border-radius: 14px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    z-index: 100;
}

.nav-more-panel li {
    list-style: none;
}

.nav-more-panel a {
    display: block;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s, background 0.2s;
}

.nav-more-panel a:hover {
    color: var(--text-primary);
    background: rgba(0, 234, 255, 0.18);
}

.nav-more-panel a.is-active {
    color: var(--text-primary);
    background: rgba(0, 234, 255, 0.35);
}

/* —— Typography & sections —— */
.page-header {
    text-align: center;
    padding: 72px 0 48px;
    border-bottom: 1px solid var(--nav-border);
    margin-bottom: 48px;
}

.page-header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 16px;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.lead {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.6;
}

.content-block {
    margin-bottom: 56px;
}

.content-block h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 16px;
}

.content-block h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 64px;
    height: 3px;
    background: var(--brand-gradient-soft);
    border-radius: 2px;
}

.content-block h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    margin: 32px 0 16px;
    color: var(--highlight-purple);
}

.content-block p {
    font-size: 1.05rem;
    margin-bottom: 18px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.content-block strong {
    color: var(--text-primary);
    font-weight: 600;
}

.card {
    background: rgba(22, 22, 22, 0.94);
    border-radius: 16px;
    padding: 36px;
    margin: 32px 0;
    border: 1px solid rgba(0, 234, 255, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--brand-gradient-soft);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 32px 0;
}

.feature {
    background: var(--card-bg-light);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(0, 234, 255, 0.2);
    transition: transform 0.25s ease, border-color 0.25s;
}

.feature:hover {
    transform: translateY(-3px);
    border-color: var(--highlight-purple);
}

.feature h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--highlight-purple);
}

.feature p {
    margin: 0;
    font-size: 0.98rem;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.topic-card {
    display: block;
    padding: 28px;
    border-radius: 14px;
    background: var(--card-bg-light);
    border: 1px solid rgba(0, 234, 255, 0.25);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.topic-card:hover {
    border-color: var(--highlight-purple);
    box-shadow: 0 12px 40px rgba(0, 234, 255, 0.12);
}

.topic-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.topic-card p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 24px 0;
    padding: 20px 24px;
    background: var(--card-bg-light);
    border-radius: 12px;
    border-left: 4px solid var(--highlight-purple);
}

.stat-row div strong {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.stat-row div span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.image-container {
    margin: 40px 0;
    text-align: center;
}

.image-container img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 234, 255, 0.2);
}

.hero-image {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
}

ul.plain-list {
    margin: 20px 0;
    padding-left: 22px;
    color: var(--text-secondary);
}

ul.plain-list li {
    margin-bottom: 10px;
}

.back-note {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--nav-border);
    font-size: 0.95rem;
}

.back-note a {
    color: var(--highlight-purple);
    text-decoration: none;
    font-weight: 500;
}

.back-note a:hover {
    text-decoration: underline;
}

.text-link {
    color: var(--highlight-purple);
    text-decoration: none;
    font-weight: 500;
}

.text-link:hover {
    text-decoration: underline;
}

/* Long-form article (home + shared markup) */
.article-body {
    padding-bottom: 24px;
}

.article-body > p,
.article-body > ul {
    margin-top: 0;
}

.article-body h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.65rem, 3vw, 2.1rem);
    margin: 48px 0 24px;
    position: relative;
    padding-bottom: 16px;
    color: var(--text-primary);
}

.article-body h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 64px;
    height: 3px;
    background: var(--brand-gradient-soft);
    border-radius: 2px;
}

.article-body h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    margin: 28px 0 12px;
    color: var(--text-primary);
}

.article-body p {
    font-size: 1.05rem;
    margin-bottom: 18px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.article-body ul {
    margin: 20px 0 28px;
    padding-left: 0;
    list-style: none;
}

.article-body ul li {
    margin-bottom: 14px;
    padding-left: 26px;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.65;
}

.article-body ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--highlight-purple);
    font-weight: bold;
}

.article-body ul.plain-list {
    list-style: disc;
    padding-left: 1.35rem;
}

.article-body ul.plain-list li {
    padding-left: 0;
    position: static;
}

.article-body ul.plain-list li::before {
    content: none;
    display: none;
}

.article-body ol.numbered-list {
    margin: 20px 0 28px;
    padding-left: 1.5rem;
    list-style: decimal;
    color: var(--text-secondary);
}

.article-body ol.numbered-list li {
    margin-bottom: 14px;
    padding-left: 0.35rem;
    position: static;
    line-height: 1.65;
}

.article-body ol.numbered-list li::before {
    content: none;
    display: none;
}

.article-body .tags-line {
    margin-top: 2rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.article-body a {
    color: var(--highlight-purple);
    text-decoration: none;
    font-weight: 600;
}

.article-body a:hover {
    text-decoration: underline;
}

.article-table-wrap {
    margin: 28px 0 36px;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(0, 234, 255, 0.25);
    background: var(--card-bg-light);
}

.metrics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.98rem;
}

.metrics-table th,
.metrics-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 234, 255, 0.2);
    color: var(--text-secondary);
}

.metrics-table th {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(0, 234, 255, 0.12);
}

.metrics-table tbody tr:last-child td {
    border-bottom: none;
}

.metrics-table td:first-child {
    font-weight: 600;
    color: var(--highlight-purple);
    white-space: nowrap;
}

.resource-links-block {
    margin: 8px 0 32px;
    padding: 20px 24px;
    border-radius: 12px;
    background: var(--card-bg-light);
    border: 1px solid rgba(0, 234, 255, 0.25);
}

.resource-links-block p {
    margin: 0 0 14px;
}

.resource-links-block p:last-child {
    margin-bottom: 0;
}

.resource-links-block a {
    display: inline-block;
    font-size: 1.05rem;
}

@media (max-width: 768px) {
    .nav-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .menu-wrap {
        justify-content: stretch;
    }

    .menu--primary {
        justify-content: flex-start;
    }

    .nav-more-panel {
        right: 0;
        left: 0;
        min-width: unset;
    }
}
