:root {
    color-scheme: dark;
    --black: #050505;
    --ink: #f3f2ef;
    --muted: #a4a39f;
    --line: rgba(255, 255, 255, 0.18);
    --cyan: #36f1cd;
    --pink: #ff3d9a;
    --yellow: #ffd447;
    --violet: #7c5cff;
    --max: 1500px;
    font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html {
    min-width: 320px;
    background: var(--black);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        var(--black);
    background-size: 32px 32px;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.55;
}

a { color: inherit; }

button,
input,
select { font: inherit; }

button,
input,
select,
.hero-links a,
.viewer-links a,
.viewer-links button { min-height: 44px; }

.aura-field {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.page-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    background: linear-gradient(90deg, rgba(5, 5, 5, 0.96) 0%, rgba(5, 5, 5, 0.86) 42%, rgba(5, 5, 5, 0.48) 72%, rgba(5, 5, 5, 0.82) 100%);
}

.site-header,
.hero,
.statement-band,
.system-band,
.record-band,
.links-band,
.page-footer {
    width: min(calc(100% - 40px), var(--max));
    margin-inline: auto;
}

.site-header {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font: 700 0.72rem/1.2 "Courier New", monospace;
    text-transform: uppercase;
}

.brand {
    color: var(--ink);
    text-decoration: none;
}

.hero {
    min-height: calc(100vh - 70px);
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(540px, 1.18fr);
    align-items: center;
    gap: clamp(42px, 6vw, 100px);
    padding: 58px 0 88px;
}

.eyebrow,
.section-label {
    margin: 0 0 22px;
    color: var(--cyan);
    font: 700 0.72rem/1.2 "Courier New", monospace;
    text-transform: uppercase;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1 {
    margin: 0 0 28px;
    font-size: clamp(4rem, 8.7vw, 9.2rem);
    font-weight: 900;
    line-height: 0.76;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 span { display: block; }

h1 span:last-child {
    color: transparent;
    -webkit-text-stroke: 1px var(--ink);
    text-shadow: 5px 0 var(--pink), -5px 0 var(--cyan);
}

.opening {
    max-width: 620px;
    margin-bottom: 32px;
    color: #d9d8d4;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.2rem, 1.8vw, 1.65rem);
    line-height: 1.45;
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 34px;
}

.hero-links a,
.viewer-links a,
.viewer-links button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    padding: 10px 15px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
}

.hero-links .signal-link {
    border-color: var(--cyan);
    background: var(--cyan);
    color: #050505;
}

.pulse-facts {
    max-width: 620px;
    margin: 0;
    border-top: 1px solid var(--line);
}

.pulse-facts div {
    display: grid;
    grid-template-columns: 104px 1fr;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

dt {
    color: var(--muted);
    font: 700 0.68rem/1.5 "Courier New", monospace;
    text-transform: uppercase;
}

dd { margin: 0; }

.viewer {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(8, 8, 8, 0.94);
    box-shadow: 14px 14px 0 rgba(255, 61, 154, 0.16), -14px -14px 0 rgba(54, 241, 205, 0.12);
}

.token-frame {
    --artwork-width: 1911;
    --artwork-height: 1800;
    position: relative;
    width: 100%;
    aspect-ratio: var(--artwork-width) / var(--artwork-height);
    overflow: hidden;
    background: #000;
}

.token-frame img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    opacity: 1;
    transition: opacity 180ms ease;
}

.token-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
    opacity: 0;
    transition: opacity 180ms ease;
}

.token-frame.has-live-render iframe { opacity: 1; }
.token-frame.has-live-render img { opacity: 0; }
.token-frame:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; }

.token-frame.is-loading img { opacity: 0.28; }

.frame-meta {
    position: absolute;
    inset: 0 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.78);
    font: 700 0.68rem/1 "Courier New", monospace;
    text-transform: uppercase;
}

.image-loading {
    position: absolute;
    inset: auto 12px 12px auto;
    padding: 7px 9px;
    background: #000;
    color: var(--yellow);
    font: 700 0.68rem/1 "Courier New", monospace;
    text-transform: uppercase;
}

.image-loading[hidden] { display: none; }

.token-console {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 18px;
}

.control-field {
    display: grid;
    gap: 6px;
}

.control-field label,
.holder-card > span {
    color: var(--muted);
    font: 700 0.67rem/1.2 "Courier New", monospace;
    text-transform: uppercase;
}

select,
input,
button {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 0;
    background: #090909;
    color: var(--ink);
}

select,
input { padding: 9px 11px; }

button {
    padding: 9px 12px;
    cursor: pointer;
}

button:hover,
.viewer-links a:hover,
.viewer-links button:hover,
.hero-links a:not(.signal-link):hover {
    border-color: var(--pink);
    color: var(--pink);
}

.search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.search-row button { width: auto; }

#token-help,
.viewer-status {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted);
    font-size: 0.72rem;
}

.holder-card {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
    padding: 13px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.holder-card a {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    text-decoration: none;
}

.holder-card small {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.token-stepper {
    display: grid;
    grid-template-columns: 1fr 82px 1fr;
}

.token-stepper output {
    display: grid;
    place-items: center;
    min-height: 44px;
    border-block: 1px solid var(--line);
    font: 700 0.78rem/1 "Courier New", monospace;
}

.viewer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.viewer-links a + a,
.viewer-links button + a { border-left: 0; }

.statement-band,
.system-band,
.record-band,
.links-band {
    border-top: 1px solid var(--line);
    padding: clamp(76px, 9vw, 132px) 0;
}

.statement-band {
    display: grid;
    grid-template-columns: minmax(320px, 0.7fr) minmax(0, 1.3fr);
    gap: clamp(50px, 10vw, 160px);
}

.statement-heading h2,
.section-intro h2,
.record-band h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.5rem, 5vw, 5.8rem);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: 0;
}

.statement-copy p {
    max-width: 850px;
    color: #d8d7d2;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.2rem, 1.9vw, 1.65rem);
    line-height: 1.55;
}

.statement-copy p + p { margin-top: 26px; }

.system-band {
    display: grid;
    grid-template-columns: minmax(280px, 0.5fr) minmax(0, 1.5fr);
    gap: clamp(40px, 7vw, 110px);
}

.system-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line);
}

.system-grid article {
    min-height: 235px;
    padding: 22px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.42);
}

.system-grid article:nth-child(2n) { border-right: 0; }

.system-grid article > span {
    color: var(--pink);
    font: 700 0.7rem/1 "Courier New", monospace;
}

.system-grid h3 {
    margin: 56px 0 12px;
    font-size: 1.25rem;
    text-transform: uppercase;
}

.system-grid p {
    margin: 0;
    color: var(--muted);
}

.record-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.75fr);
    gap: clamp(50px, 10vw, 160px);
}

.record-copy > p {
    color: #d7d6d1;
    font-size: 1.1rem;
}

.record-copy dl { margin: 34px 0 0; }

.record-copy dl div {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.record-copy dl div:last-child { border-bottom: 1px solid var(--line); }

.record-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line);
}

.record-links a {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 30px;
    padding: 18px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-decoration: none;
}

.record-links a:last-child { border-right: 0; }

.record-links a:hover { background: var(--cyan); color: #050505; }

.record-links span {
    color: var(--muted);
    font-size: 0.76rem;
}

.record-links a:hover span { color: #050505; }

.page-footer {
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font: 700 0.7rem/1.3 "Courier New", monospace;
    text-transform: uppercase;
}

.page-footer p { margin: 0; }

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

    .hero-copy { max-width: 780px; }

    .viewer {
        width: min(100%, 820px);
        margin-inline: auto;
    }

    .statement-band,
    .system-band,
    .record-band { grid-template-columns: 1fr; }

    .statement-heading,
    .section-intro { max-width: 760px; }
}

@media (max-width: 720px) {
    .site-header,
    .hero,
    .statement-band,
    .system-band,
    .record-band,
    .links-band,
    .page-footer { width: min(calc(100% - 28px), var(--max)); }

    .site-header span { text-align: right; }

    .hero { padding: 44px 0 68px; }

    h1 { font-size: clamp(3.4rem, 19vw, 5.5rem); }

    .viewer { box-shadow: 7px 7px 0 rgba(255, 61, 154, 0.16), -7px -7px 0 rgba(54, 241, 205, 0.12); }

    .token-console { grid-template-columns: 1fr; }

    #token-help,
    .viewer-status,
    .holder-card { grid-column: 1; }

    .holder-card a {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .viewer-links { grid-template-columns: 1fr; }

    .viewer-links a + a,
    .viewer-links button + a { border-left: 1px solid var(--line); border-top: 0; }

    .system-grid { grid-template-columns: 1fr; }

    .system-grid article,
    .system-grid article:nth-child(2n) { border-right: 0; }

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

    .record-links a:nth-child(2n) { border-right: 0; }

    .page-footer {
        min-height: 130px;
        align-items: flex-start;
        justify-content: center;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .aura-field { display: none; }
    .token-frame img { transition: none; }
}
