:root {
    color-scheme: dark;
    --background: #07090d;
    --surface: #0d1118;
    --surface-soft: #111722;
    --border: rgba(255, 255, 255, 0.14);
    --border-strong: rgba(255, 255, 255, 0.24);
    --text: #f4f6fa;
    --muted: #abb3c1;
    --quiet: #77808f;
    --cyan: #47c8ff;
    --magenta: #f45bd1;
    --display: "Anta", "Arial Black", sans-serif;
    --eyebrow: "Offside", "Trebuchet MS", sans-serif;
    --body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --support: "Sora", "Aptos", "Segoe UI", sans-serif;
    --mono: "SFMono-Regular", "Cascadia Code", Consolas, "Liberation Mono", monospace;
    --page: 1080px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--background);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 80% 3%, rgba(90, 91, 255, 0.12), transparent 28rem),
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        var(--background);
    background-size: auto, 40px 40px, 40px 40px, auto;
    font-family: var(--body);
    line-height: 1.62;
}

body::before {
    position: fixed;
    z-index: 20;
    top: 0;
    right: 0;
    left: 0;
    height: 2px;
    content: "";
    background: linear-gradient(90deg, var(--cyan), #6e75ff 52%, var(--magenta));
}

::selection {
    color: var(--background);
    background: var(--cyan);
}

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

a {
    color: inherit;
}

a:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 4px;
}

.shell {
    width: min(calc(100% - 3rem), var(--page));
    margin: 0 auto;
}

.site-header {
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.brand,
.product-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text);
    font-family: var(--eyebrow);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

.brand::before {
    width: 20px;
    height: 2px;
    content: "";
    background: linear-gradient(90deg, var(--cyan), var(--magenta));
}

.product-mark img {
    width: 32px;
    height: 32px;
    aspect-ratio: 1;
    border-radius: 8px;
    object-fit: contain;
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: clamp(0.85rem, 2.5vw, 1.7rem);
    color: var(--muted);
    font-family: var(--eyebrow);
    font-size: 0.74rem;
}

.site-header nav a {
    text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--cyan);
    text-underline-offset: 0.45rem;
}

.hero {
    display: grid;
    align-items: center;
    gap: clamp(3rem, 9vw, 8rem);
    padding: clamp(5rem, 10vw, 8rem) 0;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 250px);
}

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

.eyebrow,
.section-label,
dt,
.updated {
    margin: 0 0 0.8rem;
    color: var(--cyan);
    font-family: var(--eyebrow);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2 {
    margin-top: 0;
    color: var(--text);
    font-family: var(--display);
    font-weight: 400;
    letter-spacing: 0.035em;
    line-height: 1.08;
    text-wrap: balance;
    text-transform: uppercase;
}

h1 {
    max-width: 12ch;
    margin-bottom: 1.2rem;
    font-size: clamp(3.25rem, 8vw, 6rem);
    font-weight: 400;
    letter-spacing: 0.035em;
}

h2 {
    margin-bottom: 1rem;
    font-size: clamp(2rem, 4.5vw, 3.35rem);
    font-weight: 400;
    letter-spacing: 0.035em;
}

p,
li,
dd,
td {
    color: var(--muted);
}

.lede {
    margin: 0 0 1rem;
    color: var(--text);
    font-size: clamp(1.25rem, 2.4vw, 1.6rem);
}

.hero-copy > p:not(.eyebrow):not(.lede) {
    max-width: 650px;
}

.caveat {
    font-size: 0.92rem;
}

.hero-icon {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 24%;
    object-fit: contain;
    filter: drop-shadow(0 18px 55px rgba(86, 91, 255, 0.25));
}

.actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.8rem;
}

.button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.95rem;
    border: 1px solid var(--border-strong);
    color: var(--text);
    background: transparent;
    font-family: var(--support);
    font-size: 0.86rem;
    font-weight: 650;
    letter-spacing: 0;
    text-decoration: none;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.button:hover {
    border-color: var(--cyan);
    background: rgba(71, 200, 255, 0.07);
}

.button.primary {
    border-color: var(--text);
    color: var(--background);
    background: var(--text);
}

.button.primary:hover {
    border-color: var(--cyan);
    background: var(--cyan);
}

.project-facts {
    display: grid;
    margin: 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    grid-template-columns: repeat(4, 1fr);
}

.project-facts div {
    padding: 1.25rem 1.5rem;
    border-right: 1px solid var(--border);
}

.project-facts div:first-child {
    padding-left: 0;
}

.project-facts div:last-child {
    border-right: 0;
}

.project-facts dt {
    margin-bottom: 0.25rem;
    color: var(--quiet);
}

.project-facts dd {
    margin: 0;
    color: var(--text);
    font-size: 0.92rem;
}

.compatibility-note {
    margin-top: 1.35rem;
    padding: 1rem 1.1rem;
    border-left: 2px solid var(--magenta);
    color: var(--quiet);
    background: rgba(244, 91, 209, 0.045);
    font-size: 0.84rem;
}

.compatibility-note strong {
    color: var(--text);
}

.project-section {
    display: grid;
    gap: clamp(2.5rem, 7vw, 6rem);
    padding: clamp(5rem, 9vw, 7.5rem) 0;
    border-bottom: 1px solid var(--border);
    grid-template-columns: minmax(230px, 0.75fr) minmax(0, 1.25fr);
}

.section-heading h2 {
    max-width: 13ch;
}

.section-copy > :first-child {
    margin-top: 0;
}

.section-copy > :last-child {
    margin-bottom: 0;
}

.section-copy a {
    color: var(--cyan);
}

.proof-figure,
.pace-figure,
.table-wrap,
.mode-note {
    grid-column: 1 / -1;
}

.pace-figure {
    overflow: hidden;
    margin: 0;
    border: 1px solid var(--border-strong);
    background: #05080d;
}

.pace-figure picture {
    display: block;
}

.pace-figure img {
    display: block;
    width: 100%;
    height: auto;
}

.pace-figure figcaption {
    padding: 0.95rem 1.15rem;
    border-top: 1px solid var(--border);
    color: var(--quiet);
    background: rgba(9, 12, 17, 0.92);
    font-size: 0.8rem;
}

.pace-figure figcaption strong {
    color: var(--text);
}

.proof-figure {
    margin: 0;
}

.proof-figure picture {
    display: block;
    padding: clamp(0.45rem, 1vw, 0.75rem);
    border: 1px solid var(--border-strong);
    background: #090c11;
}

.proof-figure img {
    width: 100%;
    height: auto;
}

.proof-figure figcaption {
    margin-top: 0.8rem;
    color: var(--quiet);
    font-size: 0.8rem;
}

.field-notes {
    position: relative;
}

.plain-list {
    margin: 0 0 1.4rem;
    padding: 0;
    border-top: 1px solid var(--border);
    list-style: none;
}

.plain-list li {
    position: relative;
    padding: 1rem 0 1rem 1.4rem;
    border-bottom: 1px solid var(--border);
}

.plain-list li::before {
    position: absolute;
    top: 1.45rem;
    left: 0;
    width: 0.45rem;
    height: 0.45rem;
    content: "";
    border: 1px solid var(--cyan);
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
}

.usage-section table {
    width: 100%;
    min-width: 36rem;
    border-collapse: collapse;
    background: rgba(10, 13, 19, 0.82);
    font-size: 0.83rem;
    table-layout: fixed;
}

.usage-section th,
.usage-section td {
    padding: 0.85rem 0.9rem;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    overflow-wrap: break-word;
}

.usage-section th {
    color: var(--text);
    background: var(--surface-soft);
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.usage-section th:nth-child(1) {
    width: 28%;
}

.usage-section th:nth-child(2) {
    width: 29%;
}

.usage-section tr:last-child td {
    border-bottom: 0;
}

.usage-section th:last-child,
.usage-section td:last-child {
    border-right: 0;
}

.usage-section td:nth-child(2) {
    color: var(--text);
    font-weight: 650;
}

code {
    font-family: var(--mono);
}

.mode-note {
    padding: 1rem 1.1rem;
    border-left: 2px solid var(--cyan);
    color: var(--muted);
    background: rgba(71, 200, 255, 0.055);
    font-size: 0.9rem;
}

.mode-note strong {
    color: var(--text);
}

.install-section {
    display: grid;
    align-items: end;
    gap: 3rem;
    padding: clamp(5rem, 9vw, 7rem) 0;
    border-bottom: 1px solid var(--border);
    grid-template-columns: minmax(0, 1fr) auto;
}

.install-section h2 {
    margin-bottom: 0.8rem;
}

.install-section p:not(.section-label) {
    max-width: 680px;
    margin-bottom: 0;
}

.install-section .actions {
    justify-content: flex-end;
    margin-top: 0;
}

.hooks-note {
    max-width: 680px;
    margin-top: 1.35rem;
    padding: 1rem 1.1rem;
    border-left: 2px solid var(--magenta);
    background: rgba(244, 91, 209, 0.055);
}

.hooks-note p {
    margin: 0;
}

.hooks-note .hooks-note-label {
    margin-bottom: 0.45rem;
    color: var(--magenta);
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-transform: uppercase;
}

.hooks-note code {
    color: var(--text);
}

.guard-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 64px;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border);
}

.guard-status .section-label {
    margin: 0;
    color: var(--quiet);
}

.guard-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding-left: 1rem;
    border-left: 1px solid var(--border);
}

.guard-badge img {
    display: block;
    height: 20px;
    width: auto;
    opacity: 0.9;
    transition: opacity 160ms ease, filter 160ms ease;
}

.guard-badge:hover img,
.guard-badge:focus-visible img {
    opacity: 1;
    filter: brightness(1.12);
}

.site-footer {
    display: grid;
    gap: 1rem;
    padding: 1.8rem 0 2.6rem;
    grid-template-columns: 1fr auto;
    color: var(--quiet);
    font-size: 0.78rem;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: var(--muted);
}

/* Support, privacy, and terms */
.legal-page .shell {
    max-width: 940px;
}

.legal-main {
    display: grid;
    gap: clamp(2.5rem, 7vw, 5rem);
    padding: clamp(4.5rem, 9vw, 7rem) 0;
    grid-template-columns: minmax(210px, 0.55fr) minmax(0, 1fr);
}

.legal-title {
    position: sticky;
    top: 2rem;
    align-self: start;
}

.legal-title h1 {
    max-width: 8ch;
    margin-bottom: 1rem;
    font-size: clamp(3rem, 7vw, 5.3rem);
}

.updated {
    color: var(--quiet);
}

.legal-copy {
    border-top: 1px solid var(--border-strong);
}

.legal-copy section {
    padding: 1.6rem 0;
    border-bottom: 1px solid var(--border);
}

.legal-copy h2 {
    max-width: none;
    margin-bottom: 0.7rem;
    font-size: clamp(1.35rem, 2.4vw, 1.8rem);
    letter-spacing: -0.025em;
}

.legal-copy p,
.legal-copy ul {
    margin: 0;
}

.legal-copy p + p,
.legal-copy ul {
    margin-top: 0.75rem;
}

.legal-copy a {
    color: var(--cyan);
    text-decoration-color: rgba(71, 200, 255, 0.45);
}

@media (max-width: 780px) {
    .hero {
        gap: 2.5rem;
        grid-template-columns: minmax(0, 1fr) 150px;
    }

    .project-facts {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-facts div:nth-child(2) {
        border-right: 0;
    }

    .project-facts div:nth-child(-n + 2) {
        border-bottom: 1px solid var(--border);
    }

    .project-facts div:nth-child(3) {
        padding-left: 0;
    }

    .project-section,
    .legal-main,
    .install-section {
        grid-template-columns: 1fr;
    }

    .legal-title {
        position: static;
    }

    .install-section .actions {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .shell {
        width: min(calc(100% - 2rem), var(--page));
    }

    .site-header {
        min-height: 70px;
    }

    .brand {
        position: relative;
        width: 22px;
        height: 12px;
        overflow: hidden;
        color: transparent;
        white-space: nowrap;
    }

    .brand::before {
        position: absolute;
        top: 5px;
        left: 0;
    }

    .site-header nav {
        gap: 0.9rem;
        font-size: 0.72rem;
    }

    .site-header nav a:first-child {
        display: none;
    }

    .site-header nav a:last-child {
        display: none;
    }

    .hero {
        padding: 4rem 0;
        grid-template-columns: 1fr;
    }

    .hero-icon {
        width: 118px;
        grid-row: 1;
    }

    h1 {
        font-size: clamp(3.1rem, 15vw, 4.5rem);
    }

    .project-facts div {
        padding: 1rem;
    }

    .project-facts dd {
        font-size: 0.82rem;
    }

    .project-section {
        padding: 4.5rem 0;
    }

    .site-footer {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}

/* CUAR uses the shared page system, but its proof is a fixed reading sequence rather
   than an interactive gallery. Dense conversation captures need room to breathe. */
.cuar-prompt-proof {
    overflow: hidden;
    border: 1px solid var(--border-strong);
    background: var(--surface-soft);
}

.cuar-prompt-proof img {
    width: 100%;
    aspect-ratio: 1418 / 440;
    object-fit: cover;
}

.cuar-capture {
    display: grid;
    align-content: start;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
}

.cuar-capture-wide {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 0.88fr) minmax(15rem, 0.72fr);
}

.cuar-capture a {
    display: block;
    min-width: 0;
}

.cuar-capture img {
    width: 100%;
    height: auto;
    border-bottom: 1px solid var(--border);
    background: var(--surface-soft);
}

.cuar-capture-wide img {
    border-right: 1px solid var(--border);
    border-bottom: 0;
}

.cuar-capture figcaption {
    padding: clamp(1rem, 2.2vw, 1.55rem);
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.58;
}

.cuar-capture figcaption span {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--cyan);
    font-family: var(--eyebrow);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cuar-capture figcaption strong {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--text);
    font-family: var(--support);
    font-size: 1rem;
    line-height: 1.34;
}

@media (max-width: 760px) {
    .cuar-capture-wide {
        grid-column: auto;
        grid-template-columns: 1fr;
    }

    .cuar-capture-wide img {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
}
