:root {
    --onyx: #080808;
    --surface: #0f0f13;
    --surface-light: #1a1a22;
    --surface-hover: #252530;
    --gold: #ffd700;
    --gold-glow: rgba(255, 215, 0, 0.3);
    --blue-base: #0052ff;
    --blue-glow: rgba(0, 82, 255, 0.3);
    --blue-deep: #0039b3;
    --text-primary: #ffffff;
    --text-secondary: #a0a3b1;
    --text-tertiary: #6b6f7c;
    --border: #2a2c33;
    --border-light: #353740;
    --success: #00c853;
    --warning: #ffb300;
    --error: #ff3b30;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    --gradient-gold: linear-gradient(135deg, #ffd700, #ffaa00);
    --gradient-blue: linear-gradient(135deg, #0052ff, #627eea);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    --shadow-gold: 0 0 30px var(--gold-glow);
    --shadow-blue: 0 0 30px var(--blue-glow);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --font-mono: 'Space Mono', monospace;
    --font-sans: 'Inter', sans-serif;
}

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

* { cursor: default; }
a, button, .mobile-menu-btn, .mobile-nav-close,
.white-toggle, .screen-toggle, #back-to-top { cursor: pointer; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    background-color: #010010;
    color: var(--text-primary);
    font-family: var(--font-sans);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

#canvas-container {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.9;
}

.app {
    position: relative;
    z-index: 10;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.loader {
    position: fixed;
    inset: 0;
    background-color: black;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s;
}
.loader.hidden { opacity: 0; pointer-events: none; }
.loader-content { text-align: center; }
.loader-text {
    color: white;
    font-size: 1rem;
    letter-spacing: 2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 100;
    background: rgba(8, 8, 8, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    transition: all var(--transition-smooth);
}
header.scrolled {
    padding: 12px 0;
    background: rgba(8, 8, 8, 0.95);
    border-bottom-color: rgba(255, 215, 0, 0.2);
    box-shadow: var(--shadow-md);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #999999, #f9f9f9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--onyx);
    box-shadow: 0 0 10px #7f7f7f;
    transition: transform var(--transition-bounce);
}
.logo:hover .logo-icon { transform: rotate(360deg); }

.logo-text {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 1px;
    color: var(--blue-deep);
}
.logo-text span {
    color: var(--gold);
    text-shadow: 0 0 10px var(--gold-glow);
}
a.logo:active:focus:hover,
a.logo:hover .logo-text,
a.logo:focus .logo-text,
a.logo:active .logo-text { color: var(--blue-deep); }

.desktop-nav { display: flex; gap: 8px; }
.desktop-nav li { list-style: none; }

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition-smooth);
    border-radius: 6px 6px 20px 20px;
    position: relative;
}
.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 215, 0, 0.1);
}
.nav-link.active {
    color: var(--gold);
    background: rgba(255, 215, 0, 0.15);
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    width: 50%;
    height: 2px;
    background: var(--gold);
    border-radius: var(--radius-full);
    box-shadow: 0 0 10px var(--gold);
}

.wallet-section {
    display: flex;
    align-items: center;
    gap: 16px;
}
.network-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(0, 82, 255, 0.1);
    border: 1px solid rgba(0, 82, 255, 0.2);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.65rem;
}
.network-dot {
    width: 8px;
    height: 8px;
    background: var(--blue-base);
    border-radius: 50%;
    box-shadow: 0 0 2px var(--blue-base);
    animation: pulse 2.2s infinite;
}

.nav-menu { margin: -12px 0 30px -18px; }
.nav-menu li { display: unset; }

.mobile-menu-btn {
    color: var(--text-primary);
    font-size: 1.5rem;
    background: var(--surface);
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    display: flex;
}
.mobile-menu-btn i {
    color: #20b7f4;
    animation: numberPop 5s var(--transition-bounce) infinite;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--surface);
    z-index: 1000;
    padding: 100px 24px 40px;
    flex-direction: column;
    gap: 16px;
    transition: right var(--transition-smooth);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
}
.mobile-nav.active { right: 0; display: flex; }

.mobile-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 12px 0;
    border-bottom: 1px solid #a0a3b1;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 12px;
}
.mobile-nav a:hover { color: #fff; border-bottom-color: #31709b; }
.mobile-nav a.active { color: #ff6600; border-bottom-color: #31709b; }
.mobile-nav a i { color: #ffef99; }
.mobile-nav a:hover i { color: #ffd700; }
.mobile-nav a.active i { color: #5da9dd; }

.mobile-nav-close {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 1.5rem;
    color: #0f0f13;
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #20b7f4;
    border: none;
}
.mobile-nav-close:hover,
.mobile-nav-close:active {
    color: #20b7f4;
    background: #0f0f13;
    border: 2px solid #fff;
}

.menu-scroll { flex: 1; overflow-y: auto; }
.menu-scroll::-webkit-scrollbar { width: 6px; }
.menu-scroll::-webkit-scrollbar-track { background: #0a0a0f; border-radius: 10px; }
.menu-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #000, #000, #ffaa00, #ffd700, #ffaa00, #000, #000);
    border-radius: 25px;
}
.menu-scroll::-webkit-scrollbar-thumb:hover { background: #a79845; }

.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 1001;
    background: transparent;
}
.progress-bar {
    height: 100%;
    background: var(--gradient-gold);
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 20px var(--gold);
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0;
    position: relative;
    margin-top: 50px;
}
.hero-content { max-width: 900px; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: var(--radius-full);
    padding: 8px 20px;
    margin-bottom: 32px;
    color: var(--gold);
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}
.hero-badge i { font-size: 1rem; }

h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.h1-gradient {
    background: linear-gradient(135deg, var(--gold), #fff, var(--blue-base));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-description {
    font-size: 1.3rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin-bottom: 48px;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    gap: 48px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}
.hero-stat-item { text-align: left; position: relative; }
.hero-stat-item::after {
    content: '';
    position: absolute;
    right: -24px;
    top: 10%;
    height: 80%;
    width: 1px;
    background: var(--border);
}
.hero-stat-item:last-child::after { display: none; }

.hero-stat-value {
    font-family: var(--font-mono);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 4px;
    text-shadow: 0 0 4px var(--gold-glow);
}
.hero-stat-label {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-actions { display: flex; gap: 20px; flex-wrap: wrap; }

.btn {
    padding: 16px 32px;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}
.btn:hover::before { width: 300px; height: 300px; }

.btn-gold {
    background: var(--gradient-gold);
    color: var(--onyx);
    box-shadow: 0 2px 6px var(--gold-glow);
    font-weight: 700;
}
.btn-gold:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 2px 10px 3px var(--gold-glow);
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}
.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 2px 10px 3px var(--gold-glow);
}
.btn-large { padding: 18px 40px; font-size: 1.1rem; }

.live-ticker {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    margin: 85px 0 -85px 0;
    overflow: hidden;
    white-space: nowrap;
}
.ticker-content {
    display: inline-block;
    animation: tickerscroll 66s linear infinite;
    white-space: nowrap;
}
.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    padding: 0 24px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    border-right: 1px solid var(--border);
}
.ticker-item i { color: var(--success); font-size: 0.8rem; }
.ticker-item span { color: #ffd700; font-weight: 600; margin-left: 4px; }

@keyframes tickerscroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 80px 0 20px;
    margin-top: 80px;
    position: relative;
}
footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 30px;
}
.footer-brand { display: flex; flex-direction: column; gap: 20px; }
.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.3rem;
}
.logo-iconfooter {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #999999, #f9f9f9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--onyx);
    box-shadow: 0 0 15px #7f7f7f;
    transition: transform var(--transition-bounce);
}
.logo-descriptionfooter {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin-bottom: 48px;
    line-height: 1.6;
}

.footer-social { display: flex; gap: 16px; }
.footer-social a {
    width: 40px;
    height: 40px;
    background: var(--surface-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    border: 1px solid var(--border);
}
.footer-social a:hover {
    background: var(--gold);
    color: var(--onyx);
    transform: translateY(-3px);
}

.footer-column h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 24px;
    margin-top: 10px;
}
.footer-column a {
    display: block;
    color: var(--text-tertiary);
    text-decoration: none;
    margin-bottom: 16px;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}
.footer-column a:hover { color: var(--gold); transform: translateX(5px); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-tertiary);
    font-size: 0.9rem;
}
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: #9f732a; text-decoration: none; transition: color var(--transition-fast); }
.footer-links a:hover { color: var(--gold); }

.footer-compliance {
    margin-bottom: 30px;
    padding: 20px;
    background: #272727;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    color: #9b9b9b;
    font-size: 0.8rem;
    text-align: center;
}

#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
    font-size: 1.3rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}
#back-to-top.visible {
    opacity: 0.5;
    visibility: visible;
    background: rgba(0, 0, 0, 0);
    animation: pulse 8s var(--transition-bounce) infinite;
}
#back-to-top:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-5px);
    box-shadow: 0 2px 10px 3px var(--gold-glow);
    opacity: 1;
    background: var(--surface);
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 12px;
    z-index: 10000;
    padding: 12px 18px;
    background: var(--gold);
    color: #000;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; outline: none; }

.doc-section {
    position: relative;
    padding: clamp(4rem, 8vw, 8rem) 0;
    z-index: 2;
}
.doc-section + .doc-section { border-top: 1px solid var(--border); }
.doc-section::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 40% at 50% 0%, rgba(255, 215, 0, 0.05), transparent 70%),
        radial-gradient(ellipse 80% 50% at 50% 100%, rgba(0, 82, 255, 0.04), transparent 70%);
    z-index: -1;
}

.section-header {
    text-align: center;
    margin: 0 auto clamp(2.5rem, 5vw, 4rem);
}
.section-number {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    color: var(--gold);
    opacity: 0.85;
    margin-bottom: 1rem;
    padding: 0.35rem 0.9rem;
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: var(--radius-full);
    background: rgba(255, 215, 0, 0.08);
}
.doc-section h2 {
    font-family: var(--font-sans);
    font-size: clamp(1.85rem, 4.5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text-primary);
    margin: 0 0 1rem;
}
.section-lead {
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}

.doc-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.doc-grid-wide { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.doc-card {
    position: relative;
    padding: 2rem 1.75rem 1.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition:
        transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.35s ease,
        background 0.35s ease,
        box-shadow 0.35s ease;
    overflow: hidden;
}
.doc-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.35), transparent);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.doc-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-light);
    background: var(--surface-light);
    box-shadow: var(--shadow-md);
}
.doc-card:hover::before { opacity: 1; }

.doc-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 1.15rem;
    color: var(--gold);
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.22);
    border-radius: 12px;
    margin-bottom: 1.25rem;
    transition: transform 0.35s ease, color 0.35s ease;
}
.doc-card:hover .doc-card-icon { transform: translateY(-2px) rotate(-3deg); }

.doc-card h3 {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin: 0 0 0.85rem;
}
.doc-card p {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0 0 0.75rem;
}
.doc-card p:last-child { margin-bottom: 0; }
.doc-card strong { color: var(--text-primary); font-weight: 600; }
.doc-card code {
    font-family: var(--font-mono);
    font-size: 0.82em;
    padding: 0.12em 0.4em;
    border-radius: 4px;
    background: rgba(255, 215, 0, 0.08);
    color: var(--gold);
}
.doc-card-path {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--gold) !important;
    opacity: 0.85;
    padding-top: 0.75rem;
    border-top: 1px dashed rgba(255, 215, 0, 0.18);
}
.doc-card-note {
    font-size: 0.8rem !important;
    color: var(--text-tertiary) !important;
    font-style: italic;
}
.doc-card-list { list-style: none; padding: 0; margin: 0 0 0.85rem; }
.doc-card-list li {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-secondary);
    padding: 0.35rem 0 0.35rem 1.4rem;
    position: relative;
}
.doc-card-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #00ff45;
    opacity: 0.7;
}

.mode-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 2.5rem;
}
.mode-card {
    position: relative;
    padding: 1.75rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s, box-shadow 0.35s;
    overflow: hidden;
}
.mode-card:hover {
    transform: translateY(-4px);
    border-color: currentColor;
    box-shadow: 0 20px 40px -20px currentColor;
}
.mode-0 { color: var(--blue-base); }
.mode-1 { color: #4ad9d9; }
.mode-2 { color: var(--gold); }
.mode-3 { color: #ff7518; }
.mode-3::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, #ff7518, transparent 60%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.mode-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: currentColor;
    padding: 0.3rem 0.7rem;
    border: 1px solid currentColor;
    border-radius: 6px;
    background: color-mix(in srgb, currentColor 12%, transparent);
    margin-bottom: 0.9rem;
    opacity: 0.95;
}
.mode-card h3 {
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin: 0 0 0.85rem;
}
.mode-card p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 0 1.25rem;
}
.mode-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.mode-features li {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.03em;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.doc-callout {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1.75rem 1.75rem 1.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 117, 24, 0.06), rgba(255, 117, 24, 0.02));
    border: 1px solid rgba(255, 117, 24, 0.22);
    border-left: 3px solid #ff7518;
    border-radius: var(--radius-md);
    margin-top: 1rem;
}
.doc-callout > i {
    flex-shrink: 0;
    color: #ff7518;
    font-size: 1.35rem;
    margin-top: 0.15rem;
}
.doc-callout strong {
    color: var(--text-primary);
    font-weight: 600;
    display: block;
    margin-bottom: 0.75rem;
}
.doc-callout p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0.75rem 0 0;
    line-height: 1.6;
}
.precondition-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
}
.precondition-list li {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 0.25rem;
}
.precondition-list li strong {
    display: inline;
    color: #00ff45;
    margin: 0 0.35rem 0 0;
}
.precondition-list code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    padding: 0.15em 0.45em;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.prime-table {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-bottom: 2.5rem;
}
.prime-row {
    display: grid;
    grid-template-columns: 80px 1fr 180px;
    gap: 1rem;
    align-items: center;
    padding: 1.05rem 1.5rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.25s ease;
}
.prime-row:last-child { border-bottom: none; }
.prime-row:not(.prime-header):hover { background: var(--surface-light); }
.prime-header {
    background: rgba(255, 215, 0, 0.05);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--gold);
    padding: 0.9rem 1.5rem;
}
.prime-id {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.02em;
}
.prime-row > div:nth-child(2) {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.5;
}
.prime-fail {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--error);
    letter-spacing: 0.02em;
    justify-self: end;
    padding: 0.3rem 0.7rem;
    border: 1px solid rgba(255, 59, 48, 0.25);
    border-radius: 6px;
    background: rgba(255, 59, 48, 0.06);
}

.cost-grid {
    padding: 2rem 1.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.cost-title {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.25rem;
    letter-spacing: -0.01em;
}
.cost-tiers {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    margin-bottom: 1.5rem;
}
.tier {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.tier:hover {
    border-color: rgba(255, 215, 0, 0.35);
    background: rgba(255, 215, 0, 0.05);
    transform: translateY(-1px);
}
.tier-name {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}
.tier-pct {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gold);
}
.cost-note {
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--border);
}
.cost-note strong { color: var(--text-primary); font-weight: 600; }
.cost-note code {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.82em;
    padding: 0.15em 0.5em;
    margin: 0 0.15em;
    border-radius: 4px;
    background: #000000;
    color: #00ff45;
    border: 1px dashed #ffffff;
}

.routes-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    margin-bottom: 2.5rem;
}
.route-card {
    position: relative;
    padding: 1.75rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s, box-shadow 0.35s;
}
.route-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(255, 215, 0, 0.08), transparent 60%);
    opacity: 0;
    transition: opacity 0.35s;
    pointer-events: none;
}
.route-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 215, 0, 0.35);
    box-shadow: 0 20px 40px -20px rgba(255, 215, 0, 0.25);
}
.route-card:hover::before { opacity: 1; }

.route-id {
    display: block;
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--gold);
    opacity: 0.35;
    margin-bottom: 0.6rem;
    letter-spacing: -0.02em;
    transition: opacity 0.35s, transform 0.35s;
}
.route-card:hover .route-id {
    opacity: 0.7;
    transform: translateX(2px);
}
.route-card h3 {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
    letter-spacing: -0.01em;
}
.route-vector {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0 0 1rem;
}
.route-drift {
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--text-tertiary);
    margin: 0;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--border);
}
.drift-label {
    font-family: var(--font-mono);
    color: #00ff45;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    opacity: 0.8;
    margin-right: 0.25rem;
}

.eternal-cycle {
    padding: 2rem 1.75rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.04), rgba(0, 82, 255, 0.03));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
}
.cycle-steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.cycle-step {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 0.6rem 1.1rem;
    color: var(--gold);
    background: rgba(255, 215, 0, 0.06);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: var(--radius-full);
}
.cycle-arrow {
    color: var(--text-tertiary);
    font-size: 1.1rem;
    opacity: 0.5;
}
.cycle-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}
.cycle-note strong { color: var(--gold); font-weight: 600; }

.loop-block {
    margin-bottom: 2.5rem;
    padding: 2rem 1.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.loop-block:hover {
    border-color: var(--border-light);
    box-shadow: 0 20px 40px -20px rgba(255, 215, 0, 0.15);
}
.loop-block-protocol {
    background: linear-gradient(135deg, rgba(0, 82, 255, 0.04), var(--surface));
    border-color: rgba(0, 82, 255, 0.2);
}
.loop-block-agent {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.04), var(--surface));
    border-color: rgba(255, 215, 0, 0.25);
}
.loop-block-organism {
    background: linear-gradient(135deg, rgba(255, 117, 24, 0.04), var(--surface));
    border-color: rgba(255, 117, 24, 0.25);
}

.loop-block-header { margin-bottom: 1.5rem; }
.loop-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--gold);
    padding: 0.3rem 0.7rem;
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 6px;
    background: rgba(255, 215, 0, 0.06);
    margin-bottom: 0.85rem;
}
.loop-block-header h3 {
    font-family: var(--font-sans);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.35rem;
    letter-spacing: -0.01em;
}
.loop-period {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin: 0;
    letter-spacing: 0.02em;
}

.loop-chain {
    --count: 9;
    --cycle: 9s;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--radius-md);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.loop-block-protocol .loop-chain { --count: 7; --cycle: 8s; }
.loop-block-organism .loop-chain { --count: 5; --cycle: 10s; }

.loop-node {
    position: relative;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    animation: nodeActivate var(--cycle) infinite both;
    animation-delay: calc(var(--i, 0) * (var(--cycle) / var(--count)));
    transition: transform 0.25s ease, border-color 0.25s ease;
}
.loop-node:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 215, 0, 0.4);
}
.loop-node-return {
    color: var(--onyx);
    background: var(--gradient-gold);
    border-color: var(--gold);
    font-weight: 800;
    animation:
        nodeActivate var(--cycle) infinite both,
        returnBurst var(--cycle) infinite both;
    animation-delay:
        calc(var(--i, 0) * (var(--cycle) / var(--count))),
        calc(var(--i, 0) * (var(--cycle) / var(--count)));
}

.loop-arrow {
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 1rem;
    opacity: 0.35;
    animation: arrowPulse var(--cycle) infinite both;
    animation-delay: calc(var(--i-arrow, 0) * (var(--cycle) / var(--count)) + 0.15s);
}

.loop-return {
    color: #00ff45;
    font-size: 1.35rem;
    font-weight: 700;
    margin-left: 0.25rem;
    display: inline-block;
    transform-origin: center;
    animation: returnSpin var(--cycle) linear infinite;
    animation-delay: calc(var(--cycle) * 0.92);
}

.loop-feedback {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}
.loop-feedback strong {
    color: var(--gold);
    font-weight: 600;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.03em;
}

.loop-closure {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2.5rem 1.5rem 1rem;
    text-align: center;
}
.loop-closure-ring {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-top-color: #e75f2e;
    animation: loopClosureSpin 1.5s linear infinite;
}
.loop-closure-ring::after {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-bottom-color: #0bbcfd;
    animation: loopClosureSpin 1s linear infinite reverse;
}
@keyframes loopClosureSpin {
    to { transform: rotate(360deg); }
}
.loop-closure-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
    max-width: 480px;
}
.loop-closure-accent {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: #00ff45;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.7rem;
    border: 1px solid #00ff45;
    border-radius: 6px;
    background: rgba(0, 0, 0);
    margin-bottom: 1rem;
}
.loop-closure-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.loop-node:nth-child(1)  { --i: 0; }
.loop-node:nth-child(3)  { --i: 1; }
.loop-node:nth-child(5)  { --i: 2; }
.loop-node:nth-child(7)  { --i: 3; }
.loop-node:nth-child(9)  { --i: 4; }
.loop-node:nth-child(11) { --i: 5; }
.loop-node:nth-child(13) { --i: 6; }
.loop-node:nth-child(15) { --i: 7; }
.loop-node:nth-child(17) { --i: 8; }

.loop-arrow:nth-child(2)  { --i-arrow: 0; }
.loop-arrow:nth-child(4)  { --i-arrow: 1; }
.loop-arrow:nth-child(6)  { --i-arrow: 2; }
.loop-arrow:nth-child(8)  { --i-arrow: 3; }
.loop-arrow:nth-child(10) { --i-arrow: 4; }
.loop-arrow:nth-child(12) { --i-arrow: 5; }
.loop-arrow:nth-child(14) { --i-arrow: 6; }
.loop-arrow:nth-child(16) { --i-arrow: 7; }

.agent-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: agent;
}
.agent-list li {
    position: relative;
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--text-secondary);
    padding: 0.55rem 0 0.55rem 2rem;
    counter-increment: agent;
}
.agent-list li::before {
    content: counter(agent, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0.55rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gold);
    opacity: 0.6;
}
.agent-list code {
    font-family: var(--font-mono);
    font-size: 0.82em;
    padding: 0.1em 0.4em;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}
.agent-list-no { counter-reset: none; }
.agent-list-no li::before {
    content: "✕";
    font-size: 0.75rem;
    color: var(--error);
    opacity: 0.85;
    top: 0.65rem;
}

.refusal-block {
    margin-top: 2rem;
    padding: 2rem 1.75rem;
    background: rgba(255, 59, 48, 0.03);
    border: 1px solid rgba(255, 59, 48, 0.18);
    border-radius: var(--radius-lg);
}
.refusal-block h3 {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.refusal-block h3::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--error);
    box-shadow: 0 0 12px var(--error);
}
.refusal-pre {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.75;
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 59, 48, 0.15);
    border-radius: var(--radius-md);
    padding: 2.25rem 1.5rem 1.5rem;
    margin: 0 0 1rem;
    overflow-x: auto;
    white-space: pre;
    position: relative;
}
.refusal-pre::before {
    content: "REFUSED.txt";
    position: absolute;
    top: 0; left: 0;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    padding: 0.3rem 0.75rem;
    background: rgba(255, 59, 48, 0.15);
    color: var(--error);
    border-radius: var(--radius-md) 0 var(--radius-md) 0;
    opacity: 0.85;
}
.refusal-note {
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--text-tertiary);
    margin: 0;
    font-style: italic;
}

.endpoints-block {
    margin-top: 2rem;
    padding: 2rem 1.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.endpoints-block h3 {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.25rem;
}
.endpoints-block h4 {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 22px 0 10px;
    opacity: 0.85;
    letter-spacing: 0.01em;
}
.endpoints-block h4:first-of-type {
    margin-top: 0;
}
.endpoints-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.endpoint {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.3s, background 0.3s, transform 0.3s;
}
.endpoint:hover {
    border-color: rgba(255, 215, 0, 0.4);
    background: rgba(255, 215, 0, 0.04);
    transform: translateY(-2px);
}
.endpoint i {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--gold);
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 10px;
}
.endpoint div { min-width: 0; }
.endpoint strong {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.endpoint span {
    display: block;
    font-size: 0.72rem;
    color: var(--text-tertiary);
    margin-top: 0.15rem;
    letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════════════
   TOOLS BLOCK — 12 tools grid
   ═══════════════════════════════════════════════════════════ */
.tools-block {
    margin-top: 2rem;
    padding: 2rem 1.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.tools-block h3 {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.25rem;
}
.tools-grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.tool-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.tool-card:hover {
    border-color: rgba(255, 215, 0, 0.35);
    background: rgba(255, 215, 0, 0.04);
    transform: translateY(-2px);
}
.tool-card code {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: #00f542;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tool-card span {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.doc-section-eternal {
    text-align: center;
    padding: clamp(5rem, 10vw, 10rem) 0;
}
.doc-section-eternal::before {
    background:
        radial-gradient(ellipse 50% 60% at 50% 50%, rgba(255, 215, 0, 0.08), transparent 70%),
        radial-gradient(ellipse 70% 50% at 50% 50%, rgba(0, 82, 255, 0.05), transparent 70%);
}
.eternal { max-width: 720px; margin: 0 auto; }
.eternal .section-number { margin-bottom: 1.5rem; }
.eternal-title {
    font-family: var(--font-sans);
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0 0 3rem;
    background: linear-gradient(180deg, #ffffff 30%, rgba(255, 215, 0, 0.9) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.eternal-lines { margin: 0 auto 2rem; }
.eternal-lines p {
    font-family: var(--font-sans);
    font-size: clamp(1rem, 2vw, 1.35rem);
    font-weight: 400;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0.35rem 0;
}
.eternal-lines-strong p {
    font-size: clamp(1.15rem, 2.4vw, 1.55rem);
    font-weight: 500;
    color: var(--text-primary);
    margin: 0.85rem 0;
}
.eternal-final {
    font-family: var(--font-mono) !important;
    font-size: clamp(1.15rem, 2.6vw, 1.5rem) !important;
    font-weight: 700 !important;
    color: #00ff45 !important;
    letter-spacing: 0.15em;
    margin-top: 1.5rem !important;
    position: relative;
    display: inline-block;
}
.eternal-final::after {
    content: "";
    display: block;
    width: 40px;
    height: 2px;
    margin: 1.25rem auto 0;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.cybernetics-block {
  margin-top: 2rem;
  padding: 2rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.cybernetics-block h3 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1.25rem;
}
.cybernetics-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.cyber-card {
  padding: 1.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.25s, transform 0.25s;
}
.cyber-card:hover {
  border-color: rgba(255, 215, 0, 0.35);
  transform: translateY(-2px);
}
.cyber-card i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 1rem;
  color: var(--gold);
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 10px;
  margin-bottom: 1rem;
}
.cyber-card h4 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
  letter-spacing: 0.02em;
}
.cyber-card p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

body.white .cybernetics-block { background: #ffffff; border-color: rgba(10, 14, 26, 0.1); }
body.white .cybernetics-block h3 { color: #0a0e1a; }
body.white .cyber-card { background: #fafafa; border-color: rgba(10, 14, 26, 0.08); }
body.white .cyber-card:hover { border-color: rgba(184, 134, 11, 0.4); }
body.white .cyber-card i { color: #b8860b; background: rgba(184, 134, 11, 0.08); border-color: rgba(184, 134, 11, 0.2); }
body.white .cyber-card h4 { color: #0a0e1a; }
body.white .cyber-card p { color: #4a5568; }

@keyframes nodeActivate {
    0%, 15%, 100% {
        color: var(--text-secondary);
        background: rgba(255, 255, 255, 0.03);
        border-color: var(--border);
        transform: scale(1);
        box-shadow: none;
    }
    3% {
        color: var(--text-primary);
        background: rgba(255, 215, 0, 0.10);
        border-color: rgba(255, 215, 0, 0.55);
        transform: scale(1.06);
        box-shadow:
            0 0 18px rgba(255, 215, 0, 0.35),
            0 0 4px rgba(255, 215, 0, 0.6);
    }
    8% {
        color: var(--text-primary);
        background: rgba(255, 215, 0, 0.06);
        border-color: rgba(255, 215, 0, 0.35);
        transform: scale(1.02);
        box-shadow: 0 0 8px rgba(255, 215, 0, 0.2);
    }
}

@keyframes arrowPulse {
    0%, 100% { opacity: 0.35; color: var(--text-tertiary); }
    4%       { opacity: 1;    color: var(--gold); text-shadow: 0 0 10px var(--gold); }
    10%      { opacity: 0.6;  color: var(--gold); }
    15%      { opacity: 0.35; color: var(--text-tertiary); }
}

@keyframes returnBurst {
    0%, 88%, 100% { box-shadow: none; transform: scale(1); }
    92% {
        box-shadow:
            0 0 40px rgba(255, 215, 0, 0.7),
            0 0 15px rgba(255, 215, 0, 0.9),
            inset 0 0 8px rgba(255, 255, 255, 0.3);
        transform: scale(1.15);
    }
    96% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
        transform: scale(1.05);
    }
}

@keyframes returnSpin {
    0%, 92% { transform: rotate(0deg); }
    100%    { transform: rotate(-360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.3; transform: scale(1.1); box-shadow: 0 0 6px var(--blue-base); }
}

@keyframes numberPop {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(0.9); opacity: 0.3; }
}

[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
[data-aos].visible {
    opacity: 1;
    transform: translateY(0);
}

.white-toggle,
.screen-toggle {
    position: fixed;
    top: 27px;
    padding: 6px 6px 5px 6px;
    font-size: 16px;
    border: none;
    border-radius: 50%;
    background: #5d5d5d;
    color: #ffea7f;
    transition: all 0.3s;
    z-index: 1000;
}
.white-toggle { left: 20px; }
.screen-toggle { left: 70px; }
.white-toggle:hover,
.screen-toggle:hover { transform: scale(1.1); }

body.white {
    --text-primary: #0a0e1a;
    --text-secondary: rgba(10, 14, 26, 0.72);
    --text-tertiary: rgba(10, 14, 26, 0.48);
    --surface: rgba(10, 14, 26, 0.025);
    --surface-light: rgba(10, 14, 26, 0.045);
    --border: rgba(10, 14, 26, 0.1);
    --border-light: rgba(10, 14, 26, 0.2);
    --gold: #b8860b;
}

body.white header {
    background: rgba(255, 255, 255, 0.9) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(10px);
}
body.white header.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom-color: rgba(0, 0, 0, 0.2) !important;
}
body.white .logo-text { color: #0039b3 !important; }
body.white .logo-icon {
    background: linear-gradient(135deg, #cccccc, #ffffff) !important;
    color: #000 !important;
    box-shadow: 0 0 5px #7f7f7f !important;
}
body.white .network-badge {
    background: rgba(0, 147, 255, 0.16) !important;
    border-color: rgba(0, 71, 209, 0.66) !important;
    color: #0343cb !important;
}
body.white .mobile-menu-btn {
    background: #ffffff !important;
    border: 1px solid #ccc !important;
    color: #333 !important;
}
body.white .mobile-menu-btn i { color: #0052ff !important; }
body.white .mobile-nav {
    background: #f2f8ff !important;
    border-left: 1px solid #999999 !important;
}
body.white .mobile-nav a {
    color: #333 !important;
    border-bottom-color: #ccc !important;
}
body.white .mobile-nav a:hover {
    color: #000 !important;
    background: rgba(0, 0, 0, 0.05) !important;
}
body.white .mobile-nav a i { color: #009f42 !important; }
body.white .mobile-nav-close {
    background: #0052ff !important;
    color: #ffffff !important;
}
body.white .desktop-nav .nav-link { color: #002b87 !important; }
body.white .nav-link:hover {
    color: #4d4d4d !important;
    background: #e5d78c !important;
    box-shadow: 0 0 2px #0039b3 !important;
}

body.white .doc-section::before {
    background:
        radial-gradient(ellipse 60% 40% at 50% 0%, rgba(184, 134, 11, 0.05), transparent 70%),
        radial-gradient(ellipse 80% 50% at 50% 100%, rgba(0, 82, 255, 0.03), transparent 70%);
}
body.white .doc-card,
body.white .mode-card,
body.white .route-card,
body.white .cost-grid,
body.white .prime-table,
body.white .endpoints-block,
body.white .loop-block {
    background: #ffffff;
    border-color: rgba(10, 14, 26, 0.1);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
body.white .doc-card:hover,
body.white .route-card:hover {
    background: #fafafa;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
body.white .refusal-pre {
    background: rgba(255, 59, 48, 0.04);
    color: #0a0e1a;
    border-color: rgba(255, 59, 48, 0.2);
}
body.white .refusal-pre::before { color: #d32f2f; }
body.white .prime-row:not(.prime-header):hover { background: rgba(10, 14, 26, 0.03); }
body.white .prime-row > div:nth-child(2) { color: #333; }
body.white .mode-card h3,
body.white .route-card h3,
body.white .doc-card h3,
body.white .cost-title { color: #0a0e1a; }
body.white .prime-id,
body.white .tier-pct,
body.white .route-id { color: #b8860b; }
body.white .eternal-title {
    background: linear-gradient(180deg, #0a0e1a 30%, #b8860b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
body.white .eternal-lines p { color: #4a5568; }
body.white .eternal-lines-strong p { color: #0a0e1a; }
body.white .eternal-final { color: #b8860b !important; }
body.white .cycle-step {
    background: rgba(184, 134, 11, 0.06);
    border-color: rgba(184, 134, 11, 0.25);
    color: #b8860b;
}
body.white .endpoint {
    background: #fafafa;
    border-color: rgba(10, 14, 26, 0.08);
}
body.white .endpoint:hover {
    border-color: rgba(184, 134, 11, 0.4);
    background: rgba(184, 134, 11, 0.04);
}
body.white .endpoint strong { color: #0a0e1a; }
body.white .endpoint i {
    color: #b8860b;
    background: rgba(184, 134, 11, 0.08);
    border-color: rgba(184, 134, 11, 0.2);
}
body.white .doc-card-icon {
    color: #b8860b;
    background: rgba(184, 134, 11, 0.08);
    border-color: rgba(184, 134, 11, 0.22);
}

body.white .loop-block-protocol {
    background: linear-gradient(135deg, rgba(0, 82, 255, 0.04), #ffffff);
}
body.white .loop-block-agent {
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.05), #ffffff);
}
body.white .loop-block-organism {
    background: linear-gradient(135deg, rgba(210, 105, 30, 0.05), #ffffff);
}
body.white .loop-chain {
    background: rgba(10, 14, 26, 0.03);
    border-color: rgba(10, 14, 26, 0.1);
}
body.white .loop-node {
    background: #ffffff;
    border-color: rgba(10, 14, 26, 0.15);
    color: #4a5568;
}
body.white .loop-node-return {
    background: linear-gradient(135deg, #b8860b, #d4a017);
    color: #ffffff;
}
body.white .loop-arrow { color: rgba(10, 14, 26, 0.3); }
body.white .loop-badge {
    color: #b8860b;
    border-color: rgba(184, 134, 11, 0.3);
    background: rgba(184, 134, 11, 0.08);
}
body.white .loop-feedback strong { color: #b8860b; }
body.white .loop-closure-ring { border-top-color: #b8860b; }
body.white .loop-closure-ring::after { border-bottom-color: #b8860b; }
body.white .loop-closure-accent {
    color: #b8860b;
    border-color: rgba(184, 134, 11, 0.3);
    background: rgba(184, 134, 11, 0.06);
}
body.white .loop-closure-text strong { color: #0a0e1a; }

body.white .loop-node { animation-name: nodeActivateWhite; }
body.white .loop-node-return { animation-name: nodeActivateWhite, returnBurst; }
body.white .loop-arrow { animation-name: arrowPulseWhite; }

@keyframes nodeActivateWhite {
    0%, 15%, 100% {
        color: #4a5568;
        background: #ffffff;
        border-color: rgba(10, 14, 26, 0.15);
        transform: scale(1);
        box-shadow: none;
    }
    3% {
        color: #0a0e1a;
        background: rgba(184, 134, 11, 0.12);
        border-color: rgba(184, 134, 11, 0.6);
        transform: scale(1.06);
        box-shadow:
            0 0 18px rgba(184, 134, 11, 0.35),
            0 0 4px rgba(184, 134, 11, 0.6);
    }
    8% {
        color: #0a0e1a;
        background: rgba(184, 134, 11, 0.06);
        border-color: rgba(184, 134, 11, 0.35);
        transform: scale(1.02);
        box-shadow: 0 0 8px rgba(184, 134, 11, 0.2);
    }
}

@keyframes arrowPulseWhite {
    0%, 100% { opacity: 0.35; color: rgba(10, 14, 26, 0.3); }
    4%       { opacity: 1;    color: #b8860b; }
    10%      { opacity: 0.6;  color: #b8860b; }
    15%      { opacity: 0.35; color: rgba(10, 14, 26, 0.3); }
}

body.white .tools-block { background: #ffffff; border-color: rgba(10, 14, 26, 0.1); }
body.white .tools-block h3 { color: #0a0e1a; }
body.white .tool-card {
  background: #fafafa;
  border-color: rgba(10, 14, 26, 0.08);
}
body.white .tool-card:hover {
  border-color: rgba(184, 134, 11, 0.4);
  background: rgba(184, 134, 11, 0.04);
}
body.white .tool-card code { color: #b8860b; }
body.white .tool-card span {
  color: #4a5568;
  background: rgba(10, 14, 26, 0.03);
  border-color: rgba(10, 14, 26, 0.1);
}
body.white .endpoints-block h4 { color: #0a0e1a; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--onyx); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #000, #000, #ffaa00, #ffd700, #ffaa00, #000, #000);
    border-radius: var(--radius-full);
    border: 2px solid var(--onyx);
}
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

section#vision { margin: 0 auto; }

@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 900px) {
    .desktop-nav { display: none; }
    .live-ticker { font-size: 10px; margin: 84px 0 -84px 0; padding: 6px 0; }
}

@media (max-width: 800px) {
    .mobile-nav { width: 275px; }
}

@media (min-width: 768px) {
    .live-ticker { margin-top: 85px; }
}

@media (max-width: 768px) {
    .hero-stats { gap: 30px; }
    .hero-stat-item::after { display: none; }
    .hero-stat-value { font-size: 1.8rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    #back-to-top { right: 60px; }

    .doc-section { padding: 4rem 0; }
    .section-header { margin-bottom: 2.5rem; }

    .doc-grid,
    .doc-grid-wide,
    .mode-grid,
    .routes-grid,
    .endpoints-grid,
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .prime-row {
        grid-template-columns: 56px 1fr;
        gap: 0.5rem 0.75rem;
        padding: 0.9rem 1rem;
    }
    .prime-row .prime-fail {
        grid-column: 1 / -1;
        justify-self: start;
        margin-top: 0.35rem;
    }

    .doc-callout {
        flex-direction: column;
        gap: 0.85rem;
        padding: 1.5rem;
    }

    .cycle-steps { gap: 0.5rem; }
    .cycle-arrow { display: none; }
    .cycle-step { font-size: 0.72rem; padding: 0.5rem 0.85rem; }

    .refusal-block,
    .endpoints-block,
    .tools-block,
    .cost-grid {
        padding: 1.5rem 1.25rem;
    }
    .refusal-pre { font-size: 0.72rem; padding: 2.25rem 1rem 1.25rem; }

    .loop-chain {
        --cycle: 12s;
        padding: 1rem;
        gap: 0.4rem;
    }
    .loop-node { font-size: 0.68rem; padding: 0.35rem 0.6rem; }
    .loop-arrow { font-size: 0.85rem; }
}

@media (max-width: 640px) {
    .constellation { max-width: 95vw; height: 80px; }
}

@media (max-width: 600px) {
    .mobile-nav { width: 250px; }
}

@media (max-width: 520px) {
    .wallet-section { display: none; }
}

@media (max-width: 480px) {
    .mobile-nav { width: 225px; }
    .hero-actions { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
    .hero-stats { flex-direction: column; gap: 20px; }
    .container { padding: 0 20px; }

    .doc-card { padding: 1.5rem 1.25rem; }
    .mode-card,
    .route-card { padding: 1.5rem 1.25rem; }
    .eternal-title { margin-bottom: 2rem; }

    .loop-chain { --cycle: 14s; }
}

@media (max-width: 420px) {
    section#vision h1 { font-size: 2.2rem; }
    #back-to-top { width: 48px; height: 48px; }
}

@media (min-width: 376px) {
    section#vision { margin-top: 170px; }
}

@media (max-width: 375px) {
    .live-ticker { display: none; }
    section#vision { margin-top: 100px; }
    #vision h1 { font-size: 2.4rem; }
    .mobile-nav { width: 250px; }
    #back-to-top { width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .doc-card,
    .mode-card,
    .route-card,
    .endpoint,
    .tier {
        transition: none !important;
    }
    .doc-card:hover,
    .mode-card:hover,
    .route-card:hover,
    .endpoint:hover,
    .tier:hover {
        transform: none !important;
    }
    #canvas-container { display: none; }

    .loop-node,
    .loop-arrow,
    .loop-node-return,
    .loop-return,
    .loop-closure-ring,
    .loop-closure-ring::after { animation: none !important; }
    .loop-node {
        color: var(--text-primary);
        background: rgba(255, 215, 0, 0.06);
        border-color: rgba(255, 215, 0, 0.25);
    }
    .loop-arrow {
        color: var(--gold);
        opacity: 0.6;
    }
}

