:root {
    --page-bg: #eef5f2;
    --panel: rgba(255, 255, 255, 0.92);
    --line: rgba(17, 53, 50, 0.14);
    --ink: #142220;
    --ink-soft: #445d59;
    --brand: #0c8f7a;
    --brand-strong: #086c5d;
    --accent: #d88434;
    --accent-strong: #1f5ae0;
    --shadow-lg: 0 24px 70px rgba(9, 33, 30, 0.12);
    --shadow-md: 0 16px 40px rgba(9, 33, 30, 0.1);
    --radius-xl: 28px;
    --radius-lg: 18px;
    --body-font: "Avenir Next", "Franklin Gothic Medium", "Trebuchet MS", sans-serif;
    --display-font: "Palatino Linotype", "Book Antiqua", Palatino, serif;
    --mono-font: "Consolas", "Lucida Console", "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    position: relative;
    isolation: isolate;
    overflow-x: hidden;
    color: var(--ink);
    font-family: var(--body-font);
    background:
        radial-gradient(circle at top left, rgba(12, 143, 122, 0.18) 0, rgba(12, 143, 122, 0) 34%),
        radial-gradient(circle at top right, rgba(216, 132, 52, 0.16) 0, rgba(216, 132, 52, 0) 28%),
        linear-gradient(180deg, #f5fbf8 0%, #eef4f1 50%, #f8f4ec 100%);
}

body.overlay-active {
    overflow: hidden;
    background: #000000;
}

body.overlay-active::before,
body.overlay-active::after {
    opacity: 0;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.22) 42%, rgba(255, 255, 255, 0.72) 100%),
        url("/images/MathBackground.jpg") center top / cover no-repeat;
    opacity: 0.3;
    mix-blend-mode: multiply;
    filter: saturate(0.8) contrast(1.05);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 16% 18%, rgba(12, 143, 122, 0.14) 0, rgba(12, 143, 122, 0) 26%),
        radial-gradient(circle at 84% 12%, rgba(216, 132, 52, 0.12) 0, rgba(216, 132, 52, 0) 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.24) 100%);
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display-font); margin: 0; }

.boot-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    overflow: hidden;
    background:
        radial-gradient(circle at top, rgba(40, 255, 124, 0.14) 0, rgba(40, 255, 124, 0) 24%),
        radial-gradient(circle at bottom, rgba(15, 96, 43, 0.24) 0, rgba(15, 96, 43, 0) 52%),
        linear-gradient(180deg, #010301 0%, #020702 46%, #000000 100%);
    color: #8efda2;
    font-family: "Cascadia Mono", Consolas, "Lucida Console", monospace;
    opacity: 1;
    pointer-events: none;
    transition: opacity 5000ms linear;
}

.boot-overlay[hidden] {
    display: none !important;
}

.boot-overlay.is-fading {
    opacity: 0;
    pointer-events: none;
}

.boot-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.04) 0,
            rgba(255, 255, 255, 0.04) 1px,
            transparent 1px,
            transparent 3px
        );
    opacity: 0.16;
    mix-blend-mode: screen;
}

.boot-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at center, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0.18) 54%, rgba(0, 0, 0, 0.72) 100%);
}

.boot-overlay .matrix-loader__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.boot-overlay .matrix-loader__hud {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    width: min(42rem, 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.55rem;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    text-shadow: 0 0 10px rgba(40, 255, 124, 0.16);
}

.boot-overlay .matrix-loader__hud > * {
    margin: 0;
}

.boot-overlay .matrix-loader__eyebrow {
    color: rgba(167, 255, 181, 0.78);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.boot-overlay .matrix-loader__title {
    max-width: 28ch;
    color: #e1ffe8;
    font-size: clamp(1.1rem, 1.4vw + 0.75rem, 1.5rem);
    line-height: 1.5;
}

.boot-overlay .matrix-loader__copy,
.boot-overlay .matrix-loader__legend {
    max-width: 38rem;
    color: rgba(181, 255, 193, 0.74);
    line-height: 1.6;
}

.boot-overlay .matrix-loader__legend {
    color: rgba(142, 253, 162, 0.92);
    font-size: 0.88rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.boot-overlay .matrix-loader__actions {
    margin-top: 0.35rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.boot-overlay .matrix-loader__skip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(142, 253, 162, 0.24);
    background: rgba(0, 0, 0, 0.48);
    box-shadow: inset 0 0 24px rgba(40, 255, 124, 0.08), 0 0 22px rgba(40, 255, 124, 0.08);
    color: #c8ffd2;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.boot-overlay .matrix-loader__skip:hover {
    transform: translateY(-1px);
    border-color: rgba(198, 255, 208, 0.4);
    box-shadow: inset 0 0 24px rgba(40, 255, 124, 0.12), 0 0 26px rgba(40, 255, 124, 0.16);
}

.site-shell {
    position: relative;
    z-index: 1;
    width: min(1200px, calc(100% - 1.5rem));
    margin: 0 auto;
    padding: 1rem 0 1.8rem;
}

.site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

.brand-kicker,
.eyebrow,
.tool-kicker {
    margin: 0;
    color: var(--brand-strong);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.brand-lockup h1 {
    margin-top: 0.2rem;
    font-size: clamp(1.9rem, 4vw, 3rem);
}

.brand-copy,
.lead,
.panel p,
.footer-copy,
.hero-context {
    color: var(--ink-soft);
    line-height: 1.7;
}

.site-nav,
.hero-actions,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.site-nav a,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    border: 1px solid rgba(17, 53, 50, 0.12);
    background: rgba(255, 255, 255, 0.8);
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
    border-color: transparent;
}

.btn-secondary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent-strong) 0%, #133f9f 100%);
    border-color: transparent;
}

.btn-ghost {
    color: #6a3f12;
    background: #fff0de;
}

.panel,
.tool-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--panel);
    box-shadow: var(--shadow-lg);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 1fr);
    gap: 1.1rem;
    padding: 1.5rem;
    align-items: stretch;
}

.hero--radix {
    grid-template-columns: 1fr;
}
.hero--radix .hero-radix-lab {
    padding: 1.5rem 1.55rem;
    gap: 1.1rem;
}
.hero--radix .hero-radix-lab h2 {
    margin: 0.35rem 0 0;
    max-width: 16ch;
    font-size: clamp(2.8rem, 4.8vw, 4.9rem);
    line-height: 0.94;
    text-wrap: pretty;
}
.hero-radix-lab__header,
.hero-radix-lab__footer {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) max-content;
    gap: 1rem;
    align-items: start;
}
.hero-radix-lab__stats {
    justify-content: flex-end;
    align-content: start;
    justify-self: end;
    max-width: 18rem;
    gap: 0.45rem;
}
.hero-radix-lab .hero-signals span {
    border-color: rgba(143, 232, 218, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: #eef8f6;
}
.hero--radix .radix-stage {
    min-height: 20.5rem;
}
.hero--radix .radix-stage__operations {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    padding: 1.1rem;
}
.hero-radix-lab .hero-actions {
    justify-content: flex-end;
}
.hero-radix-lab .btn {
    border-color: rgba(143, 232, 218, 0.18);
    box-shadow: none;
}
.hero-radix-lab .btn-ghost {
    border-color: rgba(216, 132, 52, 0.28);
}
.hero h2 {
    margin: 0.35rem 0 0;
    font-size: clamp(2rem, 4.8vw, 3.5rem);
    line-height: 0.96;
    max-width: 10ch;
    text-wrap: pretty;
}

.lead {
    max-width: 64ch;
    font-size: 1.04rem;
}

.hero-signals {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.hero-signals span {
    display: inline-flex;
    align-items: center;
    min-height: 2.1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(17, 53, 50, 0.12);
    background: rgba(255, 255, 255, 0.78);
    color: var(--ink);
    font-weight: 700;
}

.hero-radix-lab {
    padding: 1.15rem 1.2rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(14, 40, 38, 0.18);
    background: linear-gradient(180deg, rgba(11, 35, 34, 0.97) 0%, rgba(10, 22, 31, 0.97) 100%);
    color: #eef8f6;
    display: grid;
    gap: 0.9rem;
    position: relative;
    overflow: hidden;
}

.hero-radix-lab::before {
    content: "";
    position: absolute;
    inset: auto -4rem -4rem auto;
    width: 13rem;
    height: 13rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(12, 143, 122, 0.22) 0%, rgba(12, 143, 122, 0) 72%);
}

.hero-radix-lab .eyebrow {
    color: #8fe8da;
}

.hero-radix-lab h3 {
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    line-height: 1.05;
}

.hero-radix-lab__copy,
.hero-radix-lab__note,
.radix-op__decimal {
    margin: 0;
    color: rgba(238, 248, 246, 0.84);
    line-height: 1.65;
}

.radix-stage {
    position: relative;
    min-height: 16.5rem;
    border-radius: 22px;
    border: 1px solid rgba(143, 232, 218, 0.16);
    background: rgba(5, 15, 19, 0.84);
    overflow: hidden;
}

.radix-stage__glyphs {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: stretch;
    gap: 0.2rem;
    padding: 0.8rem 0.9rem;
    opacity: 0.14;
    font-family: var(--mono-font);
    font-size: 0.82rem;
    line-height: 1.25;
    color: #9fe1d7;
    pointer-events: none;
    white-space: nowrap;
}

.radix-stage__glyphs span {
    display: block;
    overflow: hidden;
    text-overflow: clip;
}

.radix-stage__operations {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.75rem;
    padding: 0.95rem;
}

.radix-op {
    padding: 0.75rem 0.8rem;
    border-radius: 18px;
    border: 1px solid rgba(143, 232, 218, 0.16);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(6px);
}

.radix-op__mode {
    display: inline-flex;
    align-items: center;
    min-height: 1.8rem;
    padding: 0.16rem 0.52rem;
    border-radius: 999px;
    background: rgba(143, 232, 218, 0.12);
    color: #8fe8da;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.radix-op__radix {
    display: block;
    margin-top: 0.55rem;
    font-family: var(--mono-font);
    font-size: 1.02rem;
    color: #ffffff;
    word-break: break-all;
}

.radix-op__decimal {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.88rem;
}

.tool-grid,
.detail-grid {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
}

.tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tool-card,
.detail-card,
.site-footer {
    padding: 1.2rem;
}

.tool-card h3,
.detail-card h3 {
    margin: 0.45rem 0 0.7rem;
    font-size: 1.35rem;
}

.site-footer {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: end;
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 360ms ease, transform 360ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 960px) {
    .site-header,
    .hero,
    .tool-grid,
    .site-footer {
        grid-template-columns: 1fr;
    }

    .hero h2,
    .hero--radix .hero-radix-lab h2 {
        max-width: 100%;
    }

    .hero-radix-lab__header,
    .hero-radix-lab__footer,
    .hero--radix .radix-stage__operations {
        grid-template-columns: 1fr;
    }

    .hero-radix-lab .hero-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .site-shell {
        width: min(1200px, calc(100% - 1rem));
    }

    .hero,
    .tool-card,
    .detail-card,
    .site-footer,
    .boot-overlay .matrix-loader__hud {
        padding: 1rem;
    }

    .hero--radix .hero-radix-lab {
        padding: 1.15rem;
    }

    .site-nav a,
    .btn,
    .boot-overlay .matrix-loader__skip {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .boot-overlay,
    .reveal,
    .boot-overlay .matrix-loader__skip {
        transition: none;
        animation: none;
    }
}

.content-page .site-shell {
    padding-top: 1.2rem;
}

.content-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
    gap: 1rem;
    padding: 1.5rem;
}

.content-hero h1 {
    margin: 0.45rem 0 0.8rem;
    font-size: clamp(2rem, 5vw, 3.3rem);
    line-height: 1.04;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1rem;
}

.content-card {
    padding: 1.2rem;
}

.content-card h2 {
    margin: 0.45rem 0 0.7rem;
    font-size: 1.35rem;
}

.content-card p,
.content-card li,
.content-card dd,
.content-card dt {
    color: var(--ink-soft);
    line-height: 1.7;
}

.token-list,
.link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.9rem;
}

.token,
.link-chip {
    display: inline-flex;
    align-items: center;
    min-height: 2.3rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(17, 53, 50, 0.12);
    background: rgba(255, 255, 255, 0.82);
    color: var(--ink);
    font-weight: 700;
}

.metric-list,
.contact-list,
.note-list {
    margin: 0.9rem 0 0;
    padding-left: 1.1rem;
}

.metric-list li,
.contact-list li,
.note-list li {
    margin-bottom: 0.4rem;
}

.inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.inline-links a {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: 0.6rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(17, 53, 50, 0.12);
    background: rgba(255, 255, 255, 0.82);
    font-weight: 700;
}

.callout {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(17, 53, 50, 0.12);
    background: rgba(12, 143, 122, 0.08);
}

.callout p {
    margin: 0;
}

@media (max-width: 960px) {
    .content-hero,
    .content-grid {
        grid-template-columns: 1fr;
    }
}



