:root {
    --gd-cyan: #00f0ff;
    --gd-teal: #38f29b;
    --gd-violet: #9b7cff;
    --gd-pink: #ff4ca8;
    --gd-ink: #05000f;
    --gd-panel: rgba(12, 5, 31, .82);
    --gd-panel-strong: rgba(16, 8, 39, .94);
    --gd-border: rgba(157, 130, 255, .22);
    --gd-border-cyan: rgba(0, 240, 255, .3);
    --gd-muted: rgba(235, 240, 255, .7);
    --gd-dim: rgba(235, 240, 255, .46);
}

.gd-page {
    position: relative;
    z-index: 2;
    width: min(1560px, 100%);
    margin: 0 auto;
    padding: clamp(2.25rem, 5vw, 5rem) clamp(1rem, 4vw, 4rem) 6rem;
    color: #f7f8ff;
}

.gd-page a {
    color: inherit;
}

.gd-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr);
    gap: clamp(1.2rem, 4vw, 4rem);
    align-items: stretch;
}

.gd-hero-copy,
.gd-identity {
    border: 1px solid var(--gd-border);
    border-radius: 22px;
    background:
        radial-gradient(circle at 12% 5%, rgba(0, 240, 255, .12), transparent 31%),
        radial-gradient(circle at 94% 100%, rgba(155, 124, 255, .16), transparent 37%),
        linear-gradient(145deg, rgba(16, 7, 41, .94), rgba(7, 2, 21, .9));
    box-shadow: 0 28px 80px rgba(0, 0, 0, .3);
}

.gd-hero-copy {
    padding: clamp(1.5rem, 4vw, 3.5rem);
}

.gd-kicker,
.gd-eyebrow {
    margin: 0 0 .75rem;
    color: var(--gd-cyan);
    font: 700 .7rem/1.4 "JetBrains Mono", monospace;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.gd-hero h1 {
    max-width: 1000px;
    margin: 0;
    font: 800 clamp(2.35rem, 6vw, 5.6rem)/.98 "Orbitron", sans-serif;
    letter-spacing: -.035em;
}

.gd-hero h1 span {
    display: inline-block;
    color: transparent;
    background: linear-gradient(100deg, #fff 5%, var(--gd-cyan) 48%, var(--gd-teal));
    -webkit-background-clip: text;
    background-clip: text;
}

.gd-full-name {
    margin: 1rem 0 0;
    color: var(--gd-violet);
    font: 700 clamp(1rem, 2vw, 1.3rem)/1.45 "JetBrains Mono", monospace;
}

.gd-lead {
    max-width: 760px;
    margin: 1.25rem 0 0;
    color: var(--gd-muted);
    font-size: clamp(.95rem, 1.4vw, 1.08rem);
    line-height: 1.78;
}

.gd-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    margin-top: 1.7rem;
}

.gd-btn {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gd-border-cyan);
    border-radius: 10px;
    padding: .68rem 1rem;
    color: var(--gd-cyan);
    background: rgba(0, 240, 255, .05);
    font: 750 .75rem/1.2 "JetBrains Mono", monospace;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.gd-btn-primary {
    color: #041116;
    border-color: transparent;
    background: linear-gradient(110deg, var(--gd-cyan), var(--gd-teal));
}

.gd-identity {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    padding: clamp(1.25rem, 3vw, 2.2rem);
}

.gd-identity > div {
    min-width: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    padding: .85rem .65rem;
}

.gd-identity > div:nth-last-child(-n+2) {
    border-bottom: 0;
}

.gd-identity dt {
    margin-bottom: .32rem;
    color: var(--gd-dim);
    font: 650 .62rem/1.3 "JetBrains Mono", monospace;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.gd-identity dd {
    margin: 0;
    color: #fff;
    font-size: .84rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.gd-identity a {
    color: var(--gd-cyan);
    text-decoration: none;
}

.gd-identity .gd-aliases {
    grid-column: 1 / -1;
}

.gd-note {
    display: flex;
    gap: .8rem 1.25rem;
    align-items: flex-start;
    margin-top: 1rem;
    border: 1px solid rgba(255, 196, 66, .28);
    border-radius: 12px;
    padding: 1rem 1.15rem;
    color: rgba(255, 246, 218, .78);
    background: rgba(255, 180, 40, .055);
    line-height: 1.65;
}

.gd-note strong {
    flex: 0 0 auto;
    color: #ffd875;
    font-family: "JetBrains Mono", monospace;
}

.gd-context,
.gd-comparison,
.gd-results {
    margin-top: clamp(2.8rem, 6vw, 5.5rem);
}

.gd-section-heading {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.gd-section-heading h2 {
    margin: 0;
    font: 750 clamp(1.45rem, 3vw, 2.45rem)/1.15 "Orbitron", sans-serif;
    letter-spacing: -.02em;
}

.gd-section-copy {
    max-width: 580px;
    margin: 0;
    color: var(--gd-dim);
    font-size: .85rem;
    line-height: 1.65;
}

.gd-context-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.gd-context-card {
    border: 1px solid var(--gd-border);
    border-radius: 16px;
    padding: 1.25rem;
    background: linear-gradient(145deg, rgba(17, 8, 42, .86), rgba(8, 3, 23, .82));
}

.gd-context-top {
    display: flex;
    gap: .75rem;
    align-items: center;
    justify-content: space-between;
}

.gd-context-top a {
    color: var(--gd-cyan);
    font: 700 .65rem/1.3 "JetBrains Mono", monospace;
    text-decoration: none;
    text-transform: uppercase;
}

.gd-context-top span {
    border: 1px solid rgba(56, 242, 155, .3);
    border-radius: 999px;
    padding: .22rem .45rem;
    color: var(--gd-teal);
    font: 700 .58rem/1.2 "JetBrains Mono", monospace;
    white-space: nowrap;
}

.gd-context-card h3 {
    margin: 1rem 0 .2rem;
    font: 750 1.2rem/1.3 "Orbitron", sans-serif;
}

.gd-context-name {
    margin: 0;
    color: var(--gd-violet);
    font-size: .78rem;
}

.gd-context-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
    margin: 1rem 0;
}

.gd-context-card dl div {
    border-left: 2px solid rgba(0, 240, 255, .2);
    padding-left: .6rem;
}

.gd-context-card dt {
    color: var(--gd-dim);
    font: 650 .58rem/1.3 "JetBrains Mono", monospace;
    text-transform: uppercase;
}

.gd-context-card dd {
    margin: .2rem 0 0;
    color: #fff;
    font-size: .76rem;
    line-height: 1.45;
}

.gd-context-card > p:not(.gd-context-name) {
    color: var(--gd-muted);
    font-size: .8rem;
    line-height: 1.65;
}

.gd-pmid {
    color: var(--gd-cyan) !important;
    font: 700 .68rem/1.3 "JetBrains Mono", monospace;
    text-decoration: none;
}

.gd-loading,
.gd-error {
    display: flex;
    min-height: 110px;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    border: 1px solid var(--gd-border);
    border-radius: 16px;
    color: var(--gd-muted);
    background: var(--gd-panel);
    font: 650 .78rem/1.5 "JetBrains Mono", monospace;
}

.gd-error {
    border-color: rgba(255, 76, 168, .4);
    color: #ff9dce;
}

.gd-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(0, 240, 255, .18);
    border-top-color: var(--gd-cyan);
    border-radius: 50%;
    animation: gd-spin .75s linear infinite;
}

.gd-atlas {
    display: grid;
    gap: .75rem;
}

.gd-panel {
    overflow: hidden;
    border: 1px solid var(--gd-border);
    border-radius: 18px;
    background: var(--gd-panel-strong);
    box-shadow: 0 22px 70px rgba(0, 0, 0, .24);
}

.gd-panel > header {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    padding: .9rem 1.1rem;
}

.gd-panel > header > div {
    display: flex;
    gap: .75rem;
    align-items: center;
}

.gd-panel-index {
    color: var(--gd-cyan);
    font: 800 .68rem/1.2 "JetBrains Mono", monospace;
}

.gd-panel h3 {
    margin: 0;
    font: 720 1rem/1.3 "Orbitron", sans-serif;
}

.gd-panel header p {
    margin: 0;
    color: var(--gd-dim);
    font: 600 .65rem/1.3 "JetBrains Mono", monospace;
}

.gd-canvas-wrap {
    position: relative;
    min-height: 420px;
    background:
        linear-gradient(rgba(116, 94, 190, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(116, 94, 190, .035) 1px, transparent 1px),
        #060016;
    background-size: 42px 42px;
}

.gd-canvas-wrap canvas {
    display: block;
    width: 100%;
    height: clamp(420px, 54vw, 680px);
}

.gd-axis {
    position: absolute;
    color: rgba(255, 255, 255, .38);
    font: 600 .58rem/1 "JetBrains Mono", monospace;
    letter-spacing: .08em;
    pointer-events: none;
}

.gd-axis-x {
    right: 1rem;
    bottom: .7rem;
}

.gd-axis-y {
    top: 1rem;
    left: .7rem;
    transform: rotate(-90deg) translateX(-100%);
    transform-origin: left top;
}

.gd-panel-caption {
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, .06);
    padding: .8rem 1.1rem;
    color: var(--gd-dim);
    font-size: .72rem;
    line-height: 1.55;
}

.gd-match-guide {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: .7rem;
    align-items: center;
    color: var(--gd-violet);
    font: 700 .62rem/1.3 "JetBrains Mono", monospace;
    letter-spacing: .09em;
    text-align: center;
    text-transform: uppercase;
}

.gd-match-guide span {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(155, 124, 255, .45), transparent);
}

.gd-expression-scale {
    position: absolute;
    right: 1rem;
    top: 1rem;
    display: flex;
    gap: .4rem;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    padding: .35rem .55rem;
    color: rgba(255, 255, 255, .72);
    background: rgba(4, 0, 15, .78);
    font: 650 .55rem/1 "JetBrains Mono", monospace;
    pointer-events: none;
}

.gd-expression-scale i {
    width: 92px;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(90deg, #39364d, #542788, #9b3588, #e35b61, #ffb13b, #fff06a);
}

.gd-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .8rem;
    margin-bottom: 1rem;
}

.gd-stats div {
    min-width: 0;
    border: 1px solid var(--gd-border);
    border-radius: 14px;
    padding: 1rem;
    background: var(--gd-panel);
}

.gd-stats span {
    display: block;
    margin-bottom: .45rem;
    color: var(--gd-dim);
    font: 650 .62rem/1.3 "JetBrains Mono", monospace;
    text-transform: uppercase;
}

.gd-stats strong {
    display: block;
    color: var(--gd-cyan);
    font: 750 clamp(1rem, 2vw, 1.35rem)/1.25 "Orbitron", sans-serif;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gd-sort {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.gd-sort button {
    border: 1px solid var(--gd-border);
    border-radius: 999px;
    padding: .42rem .65rem;
    color: var(--gd-muted);
    background: rgba(255, 255, 255, .03);
    cursor: pointer;
    font: 650 .62rem/1.2 "JetBrains Mono", monospace;
}

.gd-sort button.active {
    color: #041116;
    border-color: transparent;
    background: var(--gd-cyan);
}

.gd-ranking-wrap {
    overflow-x: auto;
    border: 1px solid var(--gd-border);
    border-radius: 16px;
    background: var(--gd-panel);
}

.gd-ranking {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
}

.gd-ranking th,
.gd-ranking td {
    border-bottom: 1px solid rgba(255, 255, 255, .065);
    padding: .72rem .8rem;
    text-align: left;
}

.gd-ranking th {
    color: var(--gd-cyan);
    background: rgba(0, 240, 255, .055);
    font: 700 .62rem/1.3 "JetBrains Mono", monospace;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.gd-ranking td {
    color: var(--gd-muted);
    font-size: .76rem;
    font-variant-numeric: tabular-nums;
}

.gd-ranking tbody tr {
    transition: background .14s ease;
}

.gd-ranking tbody tr:hover,
.gd-ranking tbody tr:focus-within {
    background: rgba(0, 240, 255, .075);
}

.gd-rank {
    color: var(--gd-violet) !important;
    font-family: "JetBrains Mono", monospace;
}

.gd-cell-type {
    min-width: 290px;
}

.gd-cell-link {
    display: inline-flex;
    align-items: center;
    gap: .68rem;
    min-height: 48px;
    color: #fff;
    text-decoration: none;
}

.gd-cell-link:focus-visible {
    border-radius: 10px;
    outline: 2px solid var(--gd-cyan);
    outline-offset: 3px;
}

.gd-cell-thumb {
    position: relative;
    display: inline-grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    overflow: visible;
    border: 1px solid rgba(0, 240, 255, .24);
    border-radius: 10px;
    background: rgba(245, 250, 255, .94);
    box-shadow: 0 7px 18px rgba(0, 0, 0, .2);
}

.gd-cell-thumb img {
    width: 100%;
    height: 100%;
    padding: 3px;
    border-radius: inherit;
    object-fit: contain;
}

.gd-cell-fallback {
    display: none;
    font-size: 1.25rem;
    line-height: 1;
}

.gd-cell-thumb.is-fallback .gd-cell-fallback {
    display: inline;
}

.gd-cell-label {
    display: grid;
    gap: .16rem;
    min-width: 0;
}

.gd-cell-label strong {
    color: #fff;
    font-weight: 700;
    line-height: 1.25;
    transition: color .14s ease;
}

.gd-cell-label small {
    color: var(--gd-dim);
    font: 600 .58rem/1.3 "JetBrains Mono", monospace;
    white-space: nowrap;
}

.gd-cell-link:hover .gd-cell-label strong,
.gd-cell-link:focus-visible .gd-cell-label strong {
    color: var(--gd-cyan);
}

.gd-cell-dot {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 10px;
    height: 10px;
    border: 2px solid #09141e;
    border-radius: 50%;
    box-shadow: 0 0 12px currentColor;
}

.gd-cell-link-note {
    margin: 0 0 .75rem;
    color: var(--gd-dim);
    font-size: .7rem;
    line-height: 1.6;
}

.gd-mean-cell {
    min-width: 190px;
}

.gd-bar-track {
    position: relative;
    width: 100%;
    height: 5px;
    margin-top: .32rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
}

.gd-bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--gd-violet), var(--gd-cyan));
}

.gd-method {
    margin: .85rem 0 0;
    color: var(--gd-dim);
    font-size: .7rem;
    line-height: 1.65;
}

@keyframes gd-spin {
    to { transform: rotate(360deg); }
}

@media (hover: hover) and (pointer: fine) {
    .gd-btn:hover,
    .gd-btn:focus-visible {
        transform: translateY(-2px);
        border-color: var(--gd-cyan);
        background-color: rgba(0, 240, 255, .12);
    }

    .gd-btn-primary:hover,
    .gd-btn-primary:focus-visible {
        background: linear-gradient(110deg, #8df8ff, #7bffc1);
    }

    .gd-context-top a:hover,
    .gd-pmid:hover,
    .gd-identity a:hover {
        text-decoration: underline;
        text-underline-offset: .22em;
    }
}

@media (max-width: 1050px) {
    .gd-hero {
        grid-template-columns: 1fr;
    }

    .gd-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .gd-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .gd-page {
        padding-right: .8rem;
        padding-left: .8rem;
    }

    .gd-hero-copy,
    .gd-identity {
        border-radius: 16px;
    }

    .gd-identity {
        grid-template-columns: 1fr;
    }

    .gd-identity > div,
    .gd-identity > div:nth-last-child(-n+2) {
        border-bottom: 1px solid rgba(255, 255, 255, .07);
    }

    .gd-identity > div:last-child {
        border-bottom: 0;
    }

    .gd-identity .gd-aliases {
        grid-column: auto;
    }

    .gd-note {
        flex-direction: column;
    }

    .gd-context-grid {
        grid-template-columns: 1fr;
    }

    .gd-context-card dl {
        grid-template-columns: 1fr;
    }

    .gd-panel > header {
        align-items: flex-start;
        flex-direction: column;
    }

    .gd-canvas-wrap,
    .gd-canvas-wrap canvas {
        min-height: 340px;
        height: 340px;
    }

    .gd-expression-scale i {
        width: 70px;
    }

    .gd-stats {
        grid-template-columns: 1fr;
    }

    .gd-cell-type {
        min-width: 250px;
    }

    .gd-cell-link {
        min-height: 40px;
    }

    .gd-cell-thumb {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        border-radius: 8px;
    }

    .gd-cell-label small {
        white-space: normal;
    }

    .gd-sort {
        width: 100%;
    }

    .gd-sort button {
        flex: 1 1 100%;
    }
}

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