/* UDM website styles, shared by every page.
   Palette and pixel rules follow the UDM brand kit: flat purples, square or pixel-stepped corners,
   hard shadows instead of blur, zpix for reading text, and Upheaval for headings at multiples of
   20px so it stays crisp. Pixel fonts have no bold: emphasis is carried by color. */

@font-face {
    font-family: "zpix";
    src: url("zpix.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "Upheaval";
    src: url("upheavtt.woff2") format("woff2"), url("upheavtt.ttf") format("truetype");
    font-display: swap;
}

:root {
    color-scheme: dark;

    /* Pixel frames: a 2px stroke with stepped corners, drawn as a 9-slice border image. */
    --frame-lavender: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' shape-rendering='crispEdges'%3E%3Cpath fill='%23af7be1' d='M4 0h16v2h2v2h2v16h-2v2h-2v2H4v-2H2v-2H0V4h2V2h2z'/%3E%3Cpath fill='%23170f22' d='M6 2h12v2h2v2h2v12h-2v2h-2v2H6v-2H4v-2H2V6h2V4h2z'/%3E%3C/svg%3E") 8 fill / 8px stretch;
    --frame-face: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' shape-rendering='crispEdges'%3E%3Cpath fill='%233b2a55' d='M4 0h16v2h2v2h2v16h-2v2h-2v2H4v-2H2v-2H0V4h2V2h2z'/%3E%3Cpath fill='%23170f22' d='M6 2h12v2h2v2h2v12h-2v2h-2v2H6v-2H4v-2H2V6h2V4h2z'/%3E%3C/svg%3E") 8 fill / 8px stretch;
    --frame-code: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' shape-rendering='crispEdges'%3E%3Cpath fill='%233b2a55' d='M4 0h16v2h2v2h2v16h-2v2h-2v2H4v-2H2v-2H0V4h2V2h2z'/%3E%3Cpath fill='%230c0712' d='M6 2h12v2h2v2h2v12h-2v2h-2v2H6v-2H4v-2H2V6h2V4h2z'/%3E%3C/svg%3E") 8 fill / 8px stretch;

    --bg: #100a18;
    --surface: #170f22;
    --surface-2: #1f152e;
    --segment: #2a1d3d;
    --face: #3b2a55;
    --line: #271c38;
    --line-strong: #3b2a55;

    --text: #f1eafb;
    --text-2: #c9bedb;
    --muted: #a99bbe;

    --accent: #d69efd;
    --lavender: #af7be1;
    --accent-deep: #8764b8;
    --deep: #1e1330;
    --code-bg: #0c0712;

    --font-body: "zpix", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-head: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, "SF Mono", Menlo, monospace;
    --font-pixel: "Upheaval", "Arial Black", "Segoe UI", system-ui, sans-serif;
    --extrude: 2px 2px 0 var(--face);

    --wrap: 1180px;
    --gutter: clamp(16px, 4vw, 40px);
    --header-h: 64px;
}

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

html {
    scroll-padding-top: calc(var(--header-h) + 16px);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text-2);
    font: 16px/1.75 var(--font-body);
    -webkit-font-smoothing: antialiased;
    font-synthesis: none;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

::selection {
    background: var(--lavender);
    color: var(--deep);
}

a {
    color: var(--accent);
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: rgb(214 158 253 / 0.45);
}

a:hover {
    color: var(--text);
    text-decoration-color: currentColor;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
    color: var(--text);
    margin: 0;
    font-family: var(--font-pixel);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

p {
    margin: 0 0 1em;
}

strong,
b {
    color: var(--text);
    font-weight: 400;
}

code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--segment);
    color: #eadffb;
    padding: 0.1em 0.38em;
    overflow-wrap: anywhere;
}

kbd {
    display: inline-block;
    font: 12px/12px var(--font-body);
    color: var(--text);
    background: var(--face);
    box-shadow: inset 0 -3px 0 #2a1d3d, inset 0 2px 0 #4c3870;
    padding: 5px 8px 7px;
    margin: 0 1px;
    white-space: nowrap;
    vertical-align: 1px;
    clip-path: polygon(2px 0, calc(100% - 2px) 0, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 0 calc(100% - 2px), 0 2px);
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    background: var(--lavender);
    color: var(--deep);
    padding: 10px 14px;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

/* Pixel-stepped corners (brand kit: row 0 inset 2u, row 1 inset u). */
.btn,
.stepped,
.showcase {
    --u: 3px;
    clip-path: polygon(
        calc(var(--u) * 2) 0, calc(100% - var(--u) * 2) 0,
        calc(100% - var(--u) * 2) var(--u), calc(100% - var(--u)) var(--u),
        calc(100% - var(--u)) calc(var(--u) * 2), 100% calc(var(--u) * 2),
        100% calc(100% - var(--u) * 2), calc(100% - var(--u)) calc(100% - var(--u) * 2),
        calc(100% - var(--u)) calc(100% - var(--u)), calc(100% - var(--u) * 2) calc(100% - var(--u)),
        calc(100% - var(--u) * 2) 100%, calc(var(--u) * 2) 100%,
        calc(var(--u) * 2) calc(100% - var(--u)), var(--u) calc(100% - var(--u)),
        var(--u) calc(100% - var(--u) * 2), 0 calc(100% - var(--u) * 2),
        0 calc(var(--u) * 2), var(--u) calc(var(--u) * 2),
        var(--u) var(--u), calc(var(--u) * 2) var(--u)
    );
}

.showcase {
    --u: 8px;
}

.kicker {
    display: block;
    font-family: var(--font-pixel);
    font-weight: 400;
    font-size: 20px;
    line-height: 24px;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 14px;
}

.px-icon {
    width: 24px;
    height: 24px;
    flex: none;
    fill: currentColor;
    shape-rendering: crispEdges;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    font: 16px/1 var(--font-body);
    text-decoration: none;
    color: var(--text);
    background: var(--segment);
    border: 0;
    cursor: pointer;
    white-space: nowrap;
}

.btn:hover {
    color: var(--text);
    background: var(--face);
}

.btn:active {
    transform: translate(1px, 1px);
}

.btn:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: -5px;
}

.btn-primary {
    background: var(--lavender);
    color: var(--deep);
}

.btn-primary:hover {
    background: var(--accent);
    color: var(--deep);
}

.btn-primary:focus-visible {
    outline-color: var(--deep);
}

.btn-sm {
    min-height: 38px;
    padding: 0 16px;
    font-size: 16px;
}

.btn .px-icon {
    width: 18px;
    height: 18px;
}

.store-badge {
    display: inline-block;
    line-height: 0;
}

.store-badge img {
    height: 48px;
    width: auto;
}

.text-link {
    text-decoration: none;
}

.text-link::after {
    content: " \2192";
}

.text-link:hover {
    text-decoration: underline;
}

/* Tier labels stay quiet beside the pixel headings. */
.tier {
    display: inline-block;
    font: 12px/16px var(--font-body);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 1px 6px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--accent);
    vertical-align: middle;
    white-space: nowrap;
}

.tier.tier-both {
    background: var(--segment);
    color: var(--accent);
}

h2 .tier,
h3 .tier {
    margin-left: 6px;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    gap: 28px;
    height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font-family: var(--font-pixel);
    font-size: 20px;
    line-height: 20px;
    flex: none;
}

.brand img {
    width: 36px;
    height: 36px;
}

.brand:hover {
    color: var(--text);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.site-nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 16px;
    padding: 8px 10px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    color: var(--text);
}

.site-nav a[aria-current="page"] {
    box-shadow: inset 0 -2px 0 var(--lavender);
}

.header-cta {
    margin-left: auto;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    background: var(--segment);
    color: var(--text);
    border: 0;
    font: 16px/1 var(--font-body);
    padding: 11px 14px;
    cursor: pointer;
}

@media (max-width: 900px) {
    .nav-toggle {
        display: inline-flex;
    }

    .header-cta {
        margin-left: 0;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px var(--gutter) 16px;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
    }

    .site-header.nav-open .site-nav {
        display: flex;
    }

    .site-nav a {
        padding: 12px 0;
        font-size: 16px;
        border-bottom: 1px solid var(--line);
    }

    .site-nav a[aria-current="page"] {
        box-shadow: none;
        color: var(--accent);
    }
}

@media (max-width: 480px) {
    .header-cta {
        display: none;
    }
}

/* Home: hero */
.hero {
    padding: 72px 0 56px;
}

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

.hero h1 {
    font-family: var(--font-pixel);
    font-weight: 400;
    text-transform: uppercase;
    font-size: 60px;
    line-height: 64px;
    letter-spacing: 0;
    margin: 0 0 28px;
}

.hero h1 {
    text-shadow: 3px 3px 0 var(--face);
}

.hero h1 span {
    display: block;
    color: var(--accent);
}

.hero-lead {
    font-size: 18px;
    line-height: 1.75;
    max-width: 62ch;
    margin: 0 0 32px;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
}

.cta-row .text-link {
    margin-left: 8px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    color: var(--muted);
}

.hero-meta li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-meta li::before {
    content: "";
    width: 4px;
    height: 4px;
    background: var(--accent-deep);
}

.showcase {
    margin: 56px 0 0;
    background: var(--lavender);
    padding: 48px 48px 64px;
}

/* The Options window sits left; the Quick Menu (same scale) overlaps only its lower-right edge. */
.showcase-stage {
    position: relative;
    width: min(100%, 1052px);
    margin: 0 auto;
}

.showcase-stage img {
    display: block;
    width: 78%;
    filter: drop-shadow(10px 10px 0 var(--deep));
}

.showcase-stage .showcase-popup {
    position: absolute;
    width: 33.5%;
    right: 0;
    bottom: -5%;
}

@media (max-width: 760px) {
    .hero {
        padding-top: 48px;
        padding-bottom: 40px;
    }

    .hero h1 {
        font-size: 40px;
        line-height: 44px;
        margin-bottom: 20px;
    }

    .hero-lead {
        font-size: 17px;
    }

    .showcase {
        padding: 24px 20px 28px;
        margin-top: 40px;
    }

    .showcase-stage img {
        filter: drop-shadow(5px 5px 0 var(--deep));
    }

    .showcase-stage img {
        width: 100%;
    }

    .showcase-stage .showcase-popup {
        display: none;
    }
}

/* Home: facts */
.facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
    padding: 28px 0;
}

.fact .px-icon {
    color: var(--accent);
}

.fact h3 {
    font-size: 20px;
    line-height: 24px;
    margin: 16px 0 8px;
}

.fact p {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--muted);
    margin: 0;
}

@media (max-width: 960px) {
    .facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .facts {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Home: sections */
.section {
    padding: 104px 0;
    border-top: 1px solid var(--line);
    scroll-margin-top: -64px;
}

#features {
    padding-top: 48px;
}

.section-head {
    max-width: 720px;
    margin: 0 0 56px;
}

.section-head h2,
.feature-copy h2 {
    font-size: 40px;
    line-height: 48px;
    text-shadow: var(--extrude);
    margin: 0 0 20px;
}

.section-head p {
    font-size: 18px;
    margin: 0;
}

@media (max-width: 760px) {
    .section {
        padding: 72px 0;
    }

    .section-head {
        margin-bottom: 40px;
    }

    .section-head h2,
    .feature-copy h2 {
        font-size: 40px;
        line-height: 44px;
    }
}

/* Home: feature tour */
.feature {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 72px;
    align-items: center;
    padding: 72px 0;
}

.feature + .feature {
    border-top: 1px solid var(--line);
}

#features .feature:first-of-type {
    padding-top: 0;
}

.feature.flip {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.feature.flip .feature-media {
    order: -1;
}

.feature.even {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.feature.wide {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
}

.feature.wide .feature-copy {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 16px 72px;
    align-items: start;
}

.feature-copy > p {
    font-size: 16px;
}

.feature-media {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 8px solid transparent;
    border-image: var(--frame-face);
    padding: 32px;
    min-width: 0;
}

.feature-media img {
    display: block;
}

#home-layout-editor .feature-media {
    padding: clamp(12px, 2vw, 24px);
}

.feature-media > a {
    display: block;
    line-height: 0;
    cursor: zoom-in;
}

/* Large windows stay near native scale and are clipped by the panel; the link opens the whole window. */
.feature-media.peek {
    display: block;
    height: 460px;
    padding: 32px 0 0 32px;
    overflow: hidden;
}

.feature-media.peek > a {
    width: max-content;
}

.feature-media.peek img {
    max-width: none;
    width: var(--peek-width, 920px);
}

.feature-media.plain {
    border: 0;
    border-image: none;
    padding: 0;
}

.feature-media .code {
    width: 100%;
    margin: 0;
}

.checklist {
    list-style: none;
    padding: 0;
    margin: 20px 0 24px;
    display: grid;
    gap: 8px;
}

.checklist.cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 24px;
}

.checklist li {
    position: relative;
    padding-left: 18px;
    font-size: 16px;
    line-height: 1.6;
}

.checklist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    background: var(--accent);
}

@media (max-width: 960px) {
    .feature,
    .feature.flip,
    .feature.even,
    .feature.wide .feature-copy {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    .feature.flip .feature-media {
        order: 0;
    }

    .feature-media {
        padding: 24px;
    }

    .feature-media.peek {
        height: 400px;
        padding: 24px 0 0 24px;
    }
}

@media (max-width: 520px) {
    .checklist.cols {
        grid-template-columns: 1fr;
    }

    .feature-media {
        padding: 16px;
    }

    .feature-media.peek {
        height: 300px;
        padding: 16px 0 0 16px;
    }

    .feature-media.peek img {
        width: 640px;
    }
}

/* Home: "also included" grid */
.extras {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    margin-top: 72px;
}

.extra {
    background: var(--bg);
    padding: 28px 28px 30px;
}

.extra .px-icon {
    color: var(--accent);
}

.extra h3 {
    font-size: 20px;
    line-height: 24px;
    margin: 16px 0 8px;
}

.extra p {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--muted);
    margin: 0;
}

@media (max-width: 960px) {
    .extras {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .extras {
        grid-template-columns: 1fr;
    }
}

/* Home: videos */
.section-video {
    padding-top: 64px;
    padding-bottom: 24px;
}

.section-video .section-head {
    max-width: none;
    margin-bottom: 16px;
}

.video-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.video-heading h2 {
    margin-bottom: 0;
}

.video-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.video-nav[hidden] {
    display: none;
}

.video-position {
    min-width: 40px;
    text-align: center;
    color: var(--text-2);
    font-size: 16px;
}

.video-arrow {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 6px;
    border: 2px solid var(--lavender);
    background: var(--surface);
    color: var(--accent);
    box-shadow: 2px 2px 0 var(--face);
    cursor: pointer;
}

.video-arrow svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.video-arrow:hover:not(:disabled) {
    background: var(--segment);
    color: var(--text);
}

.video-arrow:disabled {
    border-color: var(--line-strong);
    color: var(--muted);
    box-shadow: none;
    cursor: default;
}

.video-hint {
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 12px;
}

.video-hint span {
    margin-left: 8px;
    color: var(--accent);
}

.video-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-color: var(--lavender) var(--surface);
    padding: 2px 2px 16px;
}

.video-card {
    flex: 0 0 88%;
    min-width: 0;
    scroll-snap-align: start;
}

.video-caption {
    padding: 20px 0 8px;
}

.video-caption .kicker {
    display: block;
    margin-bottom: 8px;
}

.video-caption h3 {
    font-size: 20px;
}

.video-title {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-align: left;
    text-transform: inherit;
    cursor: pointer;
}

.video-title:hover,
.video-title:focus-visible {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 4px;
}

@media (max-width: 600px) {
    .video-nav {
        gap: 8px;
    }

    .video-position {
        min-width: 40px;
        font-size: 16px;
    }

    .video-track {
        gap: 16px;
    }

    .video-card {
        flex-basis: 90%;
    }
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--surface);
    border: 1px solid var(--line);
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* A partial player first brings its card into view; the visible player stays interactive. */
.video-reveal {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.video-reveal:focus-visible {
    outline-offset: -3px;
}

/* Home section rail; compact screens get an expandable corner menu. */
.home-jump {
    position: fixed;
    top: 50%;
    left: calc(50% + var(--wrap) / 2 + 16px);
    width: 160px;
    transform: translateY(-50%);
    z-index: 35;
    font: 12px/1.5 var(--font-body);
}

.home-jump::before {
    content: "On this page";
    display: block;
    color: var(--muted);
    margin: 0 0 12px 10px;
}

.home-jump ol {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 1px solid var(--line-strong);
}

.home-jump a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    color: var(--muted);
    text-decoration: none;
    border-left: 2px solid transparent;
    margin-left: -1px;
}

.home-jump a::before {
    content: "";
    width: 4px;
    height: 4px;
    background: var(--face);
    flex: none;
}

.home-jump a:hover,
.home-jump a:focus-visible,
.home-jump a.is-active {
    color: var(--text);
    background: var(--surface);
}

.home-jump a.is-active {
    border-left-color: var(--lavender);
}

.home-jump a.is-active::before {
    background: var(--accent);
}

.home-jump-toggle {
    display: none;
    width: 100%;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    color: var(--text);
    font: inherit;
    cursor: pointer;
}

.home-jump-current {
    color: var(--accent);
    margin-left: 12px;
}

.page-progress {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--lavender);
    transform: scaleX(0);
    transform-origin: left;
    pointer-events: none;
}

@media (max-width: 1599px) {
    .home-jump {
        position: static;
        transform: none;
        width: auto;
        margin: 24px var(--gutter);
    }

    .js .home-jump {
        position: fixed;
        top: auto;
        left: auto;
        bottom: 20px;
        right: 20px;
        width: 224px;
        margin: 0;
        box-shadow: 4px 4px 0 var(--deep);
    }

    .js .home-jump::before {
        display: none;
    }

    .js .home-jump-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .js .home-jump ol {
        display: none;
        position: absolute;
        bottom: 100%;
        width: 100%;
        max-height: min(60vh, 400px);
        overflow-y: auto;
        background: var(--bg);
        border: 1px solid var(--line-strong);
        padding: 8px;
    }

    .js .home-jump.is-open ol {
        display: block;
    }
}

@media (max-width: 600px) {
    .js .home-jump {
        right: 12px;
        bottom: max(12px, env(safe-area-inset-bottom));
        width: 192px;
    }

    .home-jump a {
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .text-link::after {
        display: inline-block;
        transition: transform 160ms ease-out;
    }

    .text-link:hover::after {
        transform: translateX(3px);
    }
}

/* Home: Lite and Pro */
.compare-wrap {
    position: relative;
    overflow-x: auto;
    border: 1px solid var(--line);
}

.compare {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 16px;
}

.compare th,
.compare td {
    padding: 14px 18px;
    text-align: left;
    vertical-align: top;
    border-top: 1px solid var(--line);
}

.compare thead th {
    border-top: 0;
    font: 20px/20px var(--font-pixel);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    background: var(--surface);
}

.compare thead th.col-tier {
    color: var(--text);
    font-family: var(--font-pixel);
    font-weight: 400;
    font-size: 20px;
    line-height: 20px;
}

.compare .col-tier {
    width: 27%;
}

.compare .col-pro {
    background: rgb(175 123 225 / 0.06);
}

.compare thead .col-pro {
    background: var(--surface-2);
    color: var(--accent);
    box-shadow: inset 0 3px 0 var(--lavender);
}

.compare tbody th {
    font-family: var(--font-body);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text);
}

.compare tbody th small {
    display: block;
    font-weight: 400;
    color: var(--muted);
    font-size: 14px;
    margin-top: 4px;
}

.compare td {
    color: var(--text-2);
}

.compare .yes,
.compare .no {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.compare .yes .px-icon {
    width: 24px;
    height: 24px;
    color: var(--accent);
}

.compare .no {
    color: #6f6386;
    padding-left: 6px;
}

.compare .note {
    display: block;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.5;
    margin-top: 4px;
}

.pro-details {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: 72px;
    margin-top: 80px;
    align-items: start;
}

.pro-details h3 {
    font-size: 20px;
    line-height: 24px;
    margin: 0 0 14px;
}

.pro-details ol,
.pro-details ul {
    padding-left: 20px;
    margin: 0 0 28px;
}

.pro-details li {
    margin: 4px 0;
}

.fine {
    font-size: 14.5px;
    color: var(--muted);
}

/* On phones each comparison row becomes a block: the feature, then Lite and Pro side by side. */
@media (max-width: 640px) {
    .compare {
        min-width: 0;
    }

    .compare thead {
        display: none;
    }

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

    .compare tbody tr:first-child {
        border-top: 0;
    }

    .compare th,
    .compare td {
        border-top: 0;
        padding: 10px 16px;
    }

    .compare tbody th {
        grid-column: 1 / -1;
        padding-top: 16px;
        padding-bottom: 2px;
    }

    .compare td {
        padding-bottom: 16px;
    }

    .compare td::before {
        content: attr(data-label);
        display: block;
        font: 400 20px/20px var(--font-pixel);
        text-transform: uppercase;
        color: var(--muted);
        margin-bottom: 6px;
    }

    .compare td.col-pro::before {
        color: var(--accent);
    }

    .compare .col-tier {
        width: auto;
    }
}

@media (max-width: 960px) {
    .pro-details {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }
}

/* Home: changelog */
.release-latest {
    border: 8px solid transparent;
    border-image: var(--frame-lavender);
    padding: 24px 28px;
}

.release-latest h3 {
    font-size: 20px;
    line-height: 28px;
    margin: 0 0 18px;
}

.release-version {
    display: inline-block;
    font-family: var(--font-pixel);
    font-size: 20px;
    line-height: 20px;
    color: var(--accent);
    margin-bottom: 12px;
}

.release ul,
.release-latest ul {
    margin: 0 0 12px;
    padding-left: 20px;
}

.release li,
.release-latest li {
    margin: 6px 0;
}

.releases {
    margin-top: 16px;
    border: 1px solid var(--line);
}

.releases > summary,
.release > summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    color: var(--text);
}

.releases > summary::-webkit-details-marker,
.release > summary::-webkit-details-marker {
    display: none;
}

.releases > summary::after,
.release > summary::after {
    content: "+";
    margin-left: auto;
    font: 400 20px/1 var(--font-pixel);
    color: var(--accent);
}

.releases[open] > summary::after,
.release[open] > summary::after {
    content: "\2212";
}

.releases > summary:hover,
.release > summary:hover {
    background: var(--surface);
}

.release {
    border-top: 1px solid var(--line);
}

.release > summary {
    font-weight: 500;
    color: var(--text-2);
}

.release > summary b {
    font: 20px/20px var(--font-pixel);
    color: var(--accent);
    min-width: 3.2em;
}

.release > ul {
    padding: 0 24px 16px 44px;
    margin: 0;
}

@media (max-width: 600px) {
    .release-latest {
        padding: 16px 12px;
    }
}

/* Home: documentation index */
.doc-index {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.doc-index a {
    display: block;
    background: var(--bg);
    padding: 26px 28px 28px;
    text-decoration: none;
    color: var(--text-2);
}

.doc-index a:hover {
    background: var(--surface);
}

.doc-index strong {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font: 20px/24px var(--font-pixel);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.doc-index strong::after {
    content: "\2192";
    color: var(--accent);
    font-weight: 400;
}

.doc-index span {
    display: block;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--muted);
}

@media (max-width: 960px) {
    .doc-index {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .doc-index {
        grid-template-columns: 1fr;
    }
}

/* Closing call to action: the hero's lavender panel, used once more as a bookend. */
.section-closing {
    padding-top: 0;
    border-top: 0;
}

.closing {
    --u: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px 48px;
    background: var(--lavender);
    color: var(--deep);
    padding: 48px 56px;
}

.closing h2 {
    font-family: var(--font-pixel);
    font-weight: 400;
    text-transform: uppercase;
    font-size: 40px;
    line-height: 44px;
    color: var(--deep);
    margin: 0 0 8px;
}

.closing p {
    margin: 0;
    font-size: 16.5px;
}

.btn-deep {
    background: var(--deep);
    color: var(--text);
}

.btn-deep:hover {
    background: #2e1f47;
    color: var(--text);
}

@media (max-width: 600px) {
    .closing {
        padding: 32px 24px;
    }
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 56px 0 48px;
    font-size: 14.5px;
    color: var(--muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
    gap: 32px;
}

.footer-grid h2 {
    font-size: 20px;
    line-height: 20px;
    color: var(--text);
    margin: 4px 0 16px;
}

.footer-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.footer-grid a {
    color: var(--muted);
    text-decoration: none;
}

.footer-grid a:hover {
    color: var(--text);
}

.footer-about .brand {
    color: var(--text);
}

.footer-about p {
    margin: 16px 0 0;
    max-width: 34ch;
}

.footer-about p a {
    color: var(--accent);
}

@media (max-width: 760px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-about {
        grid-column: 1 / -1;
    }
}

/* Documentation layout (guide, CLI, policy, support pages) */
.doc-layout {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 64px;
    align-items: start;
}

.doc-main {
    max-width: 780px;
    min-width: 0;
    padding: 8px 0 104px;
}

.doc-title {
    font-size: 60px;
    line-height: 64px;
    text-shadow: 3px 3px 0 var(--face);
    margin: 0 0 16px;
}

.doc-intro {
    font-size: 18px;
    line-height: 1.7;
    margin: 0 0 8px;
}

/* Lavender title band on documentation pages, after the brand banner. */
.doc-banner {
    background: var(--deep) linear-gradient(90deg, var(--lavender) 8px, transparent 8px) 0 100% / 16px 4px repeat-x;
    border-bottom: 4px solid var(--accent-deep);
    color: var(--text-2);
}

.doc-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    padding-top: 56px;
    padding-bottom: 60px;
}

.doc-banner .doc-title {
    color: var(--text);
    text-shadow: 3px 3px 0 var(--face);
}

.doc-banner .doc-intro {
    color: var(--text-2);
    max-width: 60ch;
    margin: 0;
}

.banner-icon {
    flex: none;
    box-sizing: border-box;
    width: 120px;
    height: 120px;
    padding: 36px;
    background: var(--lavender);
    fill: var(--deep);
    shape-rendering: crispEdges;
    margin-right: 8px;
    clip-path: polygon(16px 0, calc(100% - 16px) 0, calc(100% - 16px) 8px, calc(100% - 8px) 8px, calc(100% - 8px) 16px, 100% 16px, 100% calc(100% - 16px), calc(100% - 8px) calc(100% - 16px), calc(100% - 8px) calc(100% - 8px), calc(100% - 16px) calc(100% - 8px), calc(100% - 16px) 100%, 16px 100%, 16px calc(100% - 8px), 8px calc(100% - 8px), 8px calc(100% - 16px), 0 calc(100% - 16px), 0 16px, 8px 16px, 8px 8px, 16px 8px);
}

@media (max-width: 760px) {
    .doc-banner-inner {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .doc-title {
        font-size: 40px;
        line-height: 44px;
    }

    .banner-icon {
        display: none;
    }
}

.doc-meta {
    font-size: 14px;
    color: var(--muted);
}

.toc {
    position: sticky;
    top: var(--header-h);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 64px 0 40px;
    scrollbar-width: thin;
    scrollbar-color: var(--face) transparent;
}

.toc-toggle {
    display: none;
}

.toc-group + .toc-group {
    margin-top: 22px;
}

.toc-heading {
    display: block;
    font: 12px/12px var(--font-body);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 10px 14px;
}

.toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc a {
    position: relative;
    display: block;
    padding: 5px 12px 5px 14px;
    border-left: 2px solid var(--line);
    color: var(--muted);
    text-decoration: none;
    font-size: 16px;
    line-height: 1.45;
}

.toc a:hover {
    color: var(--text);
    border-left-color: var(--face);
}

.toc a.is-active {
    color: var(--text);
    border-left-color: var(--lavender);
    background: var(--surface);
}

.toc a.is-active::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    background: var(--accent);
}

.toc a.toc-out::after {
    content: " \2192";
    color: var(--accent);
}

@media (max-width: 960px) {
    html:has(.toc) {
        scroll-padding-top: calc(var(--header-h) + 68px);
    }

    .doc-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .toc {
        position: sticky;
        top: var(--header-h);
        z-index: 40;
        max-height: none;
        overflow: visible;
        margin: 0 calc(var(--gutter) * -1);
        padding: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
    }

    .toc-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        background: none;
        border: 0;
        color: var(--text);
        font: 16px/1 var(--font-body);
        padding: 15px var(--gutter);
        cursor: pointer;
        text-align: left;
    }

    .toc-toggle::after {
        content: "+";
        font: 400 20px/1 var(--font-pixel);
        color: var(--accent);
    }

    .toc.is-open .toc-toggle::after {
        content: "\2212";
    }

    .toc-toggle-current {
        color: var(--muted);
        font-weight: 500;
        margin-left: 8px;
        margin-right: auto;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .toc-body {
        max-height: calc(100vh - var(--header-h) - 52px);
        overflow-y: auto;
        padding: 4px var(--gutter) 20px;
    }

    .js .toc:not(.is-open) .toc-body {
        display: none;
    }

    .doc-main {
        padding-top: 0;
    }
}

/* Documentation content */
.doc-section {
    padding-top: 64px;
}

.doc-section + .doc-section {
    margin-top: 64px;
    background: linear-gradient(90deg, var(--face) 4px, transparent 4px) 0 0 / 8px 4px repeat-x;
}

.doc-main > .callout:first-child {
    margin-top: 64px;
}

.doc-section > h2 {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 40px;
    line-height: 44px;
    text-shadow: var(--extrude);
    margin: 0 0 24px;
}

.doc-section > h2 .tier {
    margin-left: 0;
    text-shadow: none;
}

.h-tile {
    --u: 4px;
    flex: none;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    background: var(--lavender);
    color: var(--deep);
    text-shadow: none;
    clip-path: polygon(8px 0, calc(100% - 8px) 0, calc(100% - 8px) 4px, calc(100% - 4px) 4px, calc(100% - 4px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 4px) calc(100% - 8px), calc(100% - 4px) calc(100% - 4px), calc(100% - 8px) calc(100% - 4px), calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 4px), 4px calc(100% - 4px), 4px calc(100% - 8px), 0 calc(100% - 8px), 0 8px, 4px 8px, 4px 4px, 8px 4px);
}

/* Phones are high-density screens, so pixel headings can leave the 20px grid to fit long words. */
@media (max-width: 600px) {
    .doc-section > h2,
    .section-head h2,
    .feature-copy h2,
    .doc-title,
    .closing h2 {
        font-size: 30px;
        line-height: 36px;
        letter-spacing: 0.02em;
    }

    .doc-section > h2 {
        flex-wrap: wrap;
        gap: 14px;
    }

    .doc-section > h2 .h-tile {
        flex-basis: 100%;
        max-width: 52px;
    }
}

.h-tile .px-icon {
    width: 24px;
    height: 24px;
}

.h-num {
    font: 20px/20px var(--font-pixel);
    padding: 2px 0 0 2px;
}

.doc-main h3 {
    font-size: 20px;
    line-height: 28px;
    color: var(--accent);
    margin: 44px 0 12px;
}

.doc-main h2 + h3,
.doc-main .lead + h3 {
    margin-top: 28px;
}

.doc-main p,
.doc-main li {
    color: var(--text-2);
}

.doc-main ul,
.doc-main ol {
    padding-left: 22px;
    margin: 0 0 1.1em;
}

.doc-main li {
    margin: 5px 0;
}

.doc-main li::marker {
    color: var(--accent-deep);
}

.lead {
    font-size: 18px;
    line-height: 1.7;
    color: var(--text);
}

.callout {
    border: 8px solid transparent;
    border-image: var(--frame-lavender);
    padding: 8px 12px;
    margin: 24px 0 28px;
}

.callout > strong:first-child {
    color: var(--accent);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 36px;
    margin: 20px 0 28px;
}

.card {
    border-top: 1px solid var(--line-strong);
    padding: 14px 0 18px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-2);
}

@media (max-width: 600px) {
    .card-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.card > strong:first-child {
    display: block;
    color: var(--text);
    margin-bottom: 4px;
    font-size: 16px;
}

.card > strong:first-child::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 10px 2px 0;
    background: var(--lavender);
}

.card .tier {
    margin-left: 2px;
}

.steps {
    list-style: none;
    counter-reset: step;
    padding: 0 !important;
    margin: 20px 0 28px;
    display: grid;
    gap: 10px;
}

.steps li {
    counter-increment: step;
    position: relative;
    min-height: 28px;
    padding: 2px 0 0 44px;
    margin: 0;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    background: var(--segment);
    color: var(--accent);
    font: 400 20px/1 var(--font-pixel);
    padding-top: 2px;
    clip-path: polygon(4px 0, calc(100% - 4px) 0, calc(100% - 4px) 2px, calc(100% - 2px) 2px, calc(100% - 2px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 2px) calc(100% - 4px), calc(100% - 2px) calc(100% - 2px), calc(100% - 4px) calc(100% - 2px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 4px), 0 calc(100% - 4px), 0 4px, 2px 4px, 2px 2px, 4px 2px);
}

.link-list {
    list-style: none;
    padding: 0 !important;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
}

.link-list li {
    margin: 0;
    border-top: 1px solid var(--line);
}

.link-list a {
    display: block;
    padding: 9px 0;
    text-decoration: none;
}

.link-list a::before {
    content: "\2192";
    margin-right: 10px;
    color: var(--accent-deep);
}

@media (max-width: 600px) {
    .link-list {
        grid-template-columns: 1fr;
    }
}

/* Tables */
.table-wrap {
    position: relative;
    overflow-x: auto;
    border: 1px solid var(--line);
    margin: 16px 0 28px;
}

.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.6;
}

.table-wrap th {
    text-align: left;
    color: var(--text);
    background: var(--surface-2);
    padding: 12px 16px 10px;
    font: 20px/20px var(--font-pixel);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table-wrap td {
    padding: 10px 16px;
    border-top: 1px solid var(--line);
    vertical-align: top;
    color: var(--text-2);
}

.table-wrap td:first-child {
    width: 40%;
}

.table-wrap td:first-child code {
    background: none;
    padding: 0;
    color: var(--accent);
}

.table-wrap tbody tr:hover td {
    background: var(--surface);
}

/* Code blocks */
.code {
    border: 8px solid transparent;
    border-image: var(--frame-code);
    margin: 20px 0 28px;
    min-width: 0;
}

.code-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 40px;
    padding: 0 0 4px 10px;
    background: linear-gradient(90deg, var(--face) 4px, transparent 4px) 0 100% / 8px 4px repeat-x;
    font: 12px/12px var(--font-body);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}

.copy {
    font: 12px/12px var(--font-body);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--segment);
    color: var(--text);
    border: 0;
    padding: 8px 10px;
    cursor: pointer;
    clip-path: polygon(2px 0, calc(100% - 2px) 0, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 0 calc(100% - 2px), 0 2px);
}

.copy:hover {
    background: var(--face);
}

.code pre {
    margin: 0;
    padding: 14px 10px 10px;
    overflow-x: auto;
    font: 14px/1.7 var(--font-mono);
    color: #e8def8;
    tab-size: 4;
}

.code pre code {
    background: none;
    padding: 0;
    font-size: inherit;
    color: inherit;
    overflow-wrap: normal;
}

/* Screenshots */
.shot {
    margin: 24px 0 32px;
}

.shot > a {
    display: flex;
    justify-content: center;
    border: 8px solid transparent;
    border-image: var(--frame-face);
    padding: 20px;
    cursor: zoom-in;
}

.shot > a:hover {
    border-image: var(--frame-lavender);
}

.shot img {
    display: block;
}

.shot figcaption {
    font-size: 14px;
    color: var(--muted);
    margin-top: 10px;
    padding-left: 16px;
    position: relative;
}

.shot figcaption::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    background: var(--accent-deep);
}

.inline-control-shot {
    height: 1.35em;
    width: auto;
    vertical-align: -0.3em;
}

@media (max-width: 600px) {
    .shot > a {
        padding: 6px;
    }
}

/* Lightbox */
.lightbox {
    border: 0;
    padding: 0;
    background: transparent;
    max-width: min(96vw, 1600px);
    max-height: 94vh;
    color: var(--text-2);
}

.lightbox::backdrop {
    background: rgb(8 4 14 / 0.88);
}

.lightbox-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.lightbox img {
    display: block;
    max-width: min(96vw, 1600px);
    max-height: calc(94vh - 64px);
    width: auto;
    height: auto;
}

.lightbox-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
}

.lightbox-close {
    font: 14px/1 var(--font-body);
    background: var(--segment);
    color: var(--text);
    border: 0;
    padding: 9px 12px;
    cursor: pointer;
}

/* Forms (support page) */
.form-panel {
    border: 8px solid transparent;
    border-image: var(--frame-face);
    padding: 24px;
    margin: 24px 0 32px;
}

.report-form {
    position: relative;
    display: grid;
    gap: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 16px;
}

.field {
    display: grid;
    gap: 8px;
    align-content: start;
    min-width: 0;
}

.field.full {
    grid-column: 1 / -1;
}

.field label,
.field > span {
    font-size: 16px;
    color: var(--text);
}

.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 var(--font-body);
    padding: 11px 13px;
}

.field select {
    appearance: none;
    padding-right: 36px;
    background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(-45deg, transparent 50%, var(--accent) 50%);
    background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
}

.field select option {
    background: var(--bg);
    color: var(--text);
}

.field textarea {
    min-height: 128px;
    resize: vertical;
}

.field ::placeholder {
    color: #7d7093;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: 2px solid var(--lavender);
    outline-offset: -1px;
    border-color: var(--lavender);
}

.field input[type="file"] {
    padding: 8px 10px;
}

.field input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 8px 12px;
    border: 0;
    background: var(--segment);
    color: var(--text);
    font: 14px/1 var(--font-body);
    cursor: pointer;
}

.field-help {
    margin: 0;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.55;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    background: var(--bg);
    font-weight: 400 !important;
    cursor: pointer;
}

.checkbox-row input {
    width: 16px;
    height: 16px;
    margin: 3px 0 0;
    flex: none;
    accent-color: var(--lavender);
}

.turnstile-wrap {
    min-height: 70px;
    display: flex;
    align-items: center;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.submit-button {
    --u: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 24px;
    border: 0;
    background: var(--lavender);
    color: var(--deep);
    font: 16px/1 var(--font-body);
    cursor: pointer;
    clip-path: polygon(6px 0, calc(100% - 6px) 0, calc(100% - 6px) 3px, calc(100% - 3px) 3px, calc(100% - 3px) 6px, 100% 6px, 100% calc(100% - 6px), calc(100% - 3px) calc(100% - 6px), calc(100% - 3px) calc(100% - 3px), calc(100% - 6px) calc(100% - 3px), calc(100% - 6px) 100%, 6px 100%, 6px calc(100% - 3px), 3px calc(100% - 3px), 3px calc(100% - 6px), 0 calc(100% - 6px), 0 6px, 3px 6px, 3px 3px, 6px 3px);
}

.submit-button:hover {
    background: var(--accent);
}

.submit-button:focus-visible {
    outline: 2px solid var(--deep);
    outline-offset: -5px;
}

.submit-button[disabled] {
    cursor: wait;
    opacity: 0.62;
}

.submit-button[aria-busy="true"]::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--deep);
    animation: submit-blink 0.9s steps(2, jump-none) infinite;
}

@keyframes submit-blink {
    to {
        opacity: 0.15;
    }
}

@media (prefers-reduced-motion: reduce) {
    .submit-button[aria-busy="true"]::before {
        animation: none;
    }
}

.form-status {
    margin: 0;
    min-height: 1.4em;
    color: var(--muted);
}

.form-status.success {
    color: #9fe3b4;
}

.form-status.error {
    color: #ff9fb0;
}

.form-status.progress {
    color: var(--text);
}

.footnote {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.honeypot-field {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.card-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 760px) {
    .card-grid.cols-3 {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    .form-panel {
        padding: 12px 8px;
    }

    .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* 404 */
.not-found {
    padding: 120px 0 140px;
    max-width: 640px;
}

.not-found .doc-title {
    margin-bottom: 20px;
}

.not-found .cta-row {
    margin-top: 32px;
}

/* Quick find */
.search-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 168px;
    height: 38px;
    padding: 0 8px 0 12px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--muted);
    font: 16px/1 var(--font-body);
    cursor: pointer;
}

.search-toggle:hover {
    color: var(--text);
    border-color: var(--lavender);
}

.search-toggle .px-icon {
    width: 24px;
    height: 24px;
    color: var(--accent);
}

.search-toggle kbd {
    margin-left: auto;
}

.search {
    width: min(680px, calc(100vw - 32px));
    max-height: min(640px, calc(100vh - 96px));
    margin: 12vh auto auto;
    padding: 12px;
    border: 8px solid transparent;
    border-image: var(--frame-lavender);
    background: transparent;
    color: var(--text-2);
    overflow: hidden;
}

.search[open] {
    display: flex;
    flex-direction: column;
}

.search::backdrop {
    background: rgb(8 4 14 / 0.8);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 4px 12px;
    background: linear-gradient(90deg, var(--face) 4px, transparent 4px) 0 100% / 8px 4px repeat-x;
}

.search-box .px-icon {
    color: var(--accent);
}

.search-input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: none;
    color: var(--text);
    font: 20px/1.4 var(--font-body);
    padding: 6px 0;
}

.search-input:focus {
    outline: none;
}

.search-input::-webkit-search-cancel-button {
    display: none;
}

.search-close {
    font: 12px/12px var(--font-body);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--segment);
    color: var(--muted);
    border: 0;
    padding: 7px 8px;
    cursor: pointer;
}

.search-hint {
    margin: 12px 4px 4px;
    font-size: 14px;
    color: var(--muted);
}

.search-hint:empty {
    display: none;
}

.search-results {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--face) transparent;
}

.search-results a {
    display: grid;
    gap: 2px;
    padding: 10px 12px 10px 16px;
    text-decoration: none;
    color: inherit;
    border-left: 2px solid transparent;
}

.search-results [aria-selected="true"] a {
    background: var(--surface-2);
    border-left-color: var(--lavender);
}

.search-title {
    color: var(--text);
}

.search-title.is-code {
    font-family: var(--font-mono);
    font-size: 14.5px;
    color: var(--accent);
}

.search-context {
    font: 12px/1.4 var(--font-body);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-deep);
}

.search-desc {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
}

.search mark {
    background: none;
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.search-title.is-code mark {
    color: var(--text);
}

@media (max-width: 1100px) {
    .search-toggle {
        min-width: 0;
    }

    .search-toggle kbd {
        display: none;
    }
}

@media (max-width: 900px) {
    .search-toggle {
        margin-left: auto;
    }

    .nav-toggle {
        margin-left: 0;
    }
}

@media (max-width: 600px) {
    .search-toggle-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .search-toggle {
        padding: 0 7px;
    }

    .search {
        margin-top: 16px;
    }
}
