:root {
    color-scheme: light;
    --navy: #101b31;
    --ivory: #f5ecdd;
    --paper: #fffaf1;
    --red: #f24c40;
    --muted: #505968;
    --line: #d6cdbc;
    font: 100%/1.55 system-ui, -apple-system, sans-serif;
    color: var(--navy);
    background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: .24em; }
a:hover { text-decoration-thickness: .14em; }
:focus-visible { outline: 3px solid #b7322d; outline-offset: 4px; }
.wrap { width: min(72rem, calc(100% - 3rem)); margin-inline: auto; }
.skip { position: absolute; transform: translateY(-150%); background: var(--paper); padding: .5rem; z-index: 2; }
.skip:focus { transform: none; }
.site-header { background: var(--ivory); border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.header-inner { min-height: 5rem; padding-block: .8rem; }
.brand img { width: 10rem; height: auto; }
nav { display: flex; gap: .5rem 1.5rem; flex-wrap: wrap; }
.site-header nav a { text-decoration: none; font-weight: 650; }
.site-header nav a:hover, .site-header a[aria-current=page] { text-decoration: underline; }
h1, h2 { margin: 0 0 .65em; line-height: 1.02; font-family: Georgia, serif; letter-spacing: -.035em; }
h1 { font-size: clamp(2.65rem, 6vw, 5.5rem); }
h2 { font-size: clamp(1.85rem, 3.6vw, 3.05rem); }
h3 { margin: 0 0 .45em; line-height: 1.2; }
p { margin: 0 0 1.2rem; }
.hero { background: var(--navy); color: var(--ivory); }
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(2rem, 7vw, 6rem); padding-block: clamp(2.75rem, 8vw, 6.25rem); }
.hero-copy > p:first-of-type { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 34ch; }
.hero-copy .requirements { margin: .8rem 0 0; font-size: .9rem; }
.button { display: inline-block; width: fit-content; border: 1px solid transparent; border-radius: .3rem; background: var(--red); color: #111827; padding: .67rem 1.12rem; font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; }
.button:hover { background: #ff7869; }
.button.secondary { background: transparent; border-color: var(--navy); }
.hero :focus-visible, .site-footer :focus-visible { outline-color: var(--red); }
figure { margin: 0; }
.hero-preview { width: 100%; height: auto; border-radius: .45rem; }
.features, .backdrops, .interior { padding-block: clamp(2.5rem, 7vw, 5.5rem); }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 2rem; }
.feature-grid article { padding-top: 1.15rem; border-top: 2px solid #b7322d; }
.feature-grid p, .interior > p, .contact-directory p { color: var(--muted); }
.backdrops { background: var(--ivory); }
.backdrop-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 1.5rem; }
.backdrop-grid img { width: min(100%, 8.5rem); height: auto; border-radius: .35rem; }
.backdrop-options { padding: 1.1rem; border: 1px solid var(--line); border-radius: .35rem; background: var(--paper); }
.backdrop-options p { margin-bottom: 0; }
.transparent-backdrop { background: repeating-conic-gradient(#ded7cb 0% 25%, #f9f4eb 0% 50%) 0 0 / 1.2rem 1.2rem; }
.backdrop-grid figcaption { padding-top: .55rem; font-weight: 650; }
.interior { max-width: 61rem; }
.interior h1 { font-size: clamp(2.55rem, 5vw, 4.75rem); }
.contact-directory { margin-top: 2rem; border-top: 1px solid var(--line); }
.contact-directory section { display: grid; grid-template-columns: 1fr 1.2fr; gap: .5rem 2rem; padding: 1.45rem 0; border-bottom: 1px solid var(--line); }
.contact-directory h2, .release h2, .admin-heading + h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); }
.contact-directory ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.contact-directory a { display: block; background: var(--ivory); border-radius: .3rem; padding: .75rem 1rem; font-weight: 700; }
.contact-directory span, .contact-directory small { display: block; color: var(--muted); font-weight: 400; }
.notice, .release { margin-block: 1.5rem; padding: 1.2rem; background: var(--ivory); border-radius: .35rem; }
.release details, .release h3 { margin-top: 1rem; }
.release code { overflow-wrap: anywhere; }
.admin-heading { display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap; justify-content: space-between; }
.admin-form { display: grid; gap: .65rem; max-width: 38rem; margin-block: 1rem; }
.admin-form label { font-weight: 650; }
.admin-form input, .admin-form textarea { width: 100%; border: 1px solid #7d766c; border-radius: .25rem; padding: .55rem; font: inherit; background: white; }
.admin-form small { color: var(--muted); }
.admin-form p { margin-block: .5rem 0; }
.admin-form [role=alert] { color: #9d2525; }
.validation-summary-valid { display: none; }
.site-footer { background: var(--navy); color: var(--ivory); }
.footer-inner { padding-block: 1.35rem; }
.footer-brand { display: flex; align-items: center; gap: .65rem; font-weight: 650; line-height: 1.35; }
.footer-inner small { color: #e1d5c3; font-size: .82rem; font-weight: 400; }
@media (max-width: 48rem) {
    .hero-inner { grid-template-columns: 1fr; }
    .backdrop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .feature-grid, .contact-directory section { grid-template-columns: 1fr; }
}
@media (max-width: 35rem) {
    .wrap { width: calc(100% - 2rem); }
    .backdrop-options { grid-column: 1 / -1; }
    .header-inner nav { flex-basis: 100%; gap: .45rem 1rem; }
}

.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1.25rem; }
.screenshots h1 { margin-bottom: .55em; }
.screenshots section > p { max-width: 66ch; }
.screenshot-feature { margin-block: 1.15rem 1.8rem; }
.screenshot-setup-title { margin-bottom: .85rem; }
.screenshot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.screenshots figure a { display: block; border: 1px solid var(--line); border-radius: .4rem; overflow: hidden; }
.screenshots figure img { width: 100%; height: auto; }
.screenshots figcaption { padding-top: .5rem; }
.screenshots figcaption p { margin: .25rem 0 0; color: var(--muted); }
.screenshot-styles { margin-top: 3rem; }
.screenshot-viewer {
    width: min(96vw, 105rem);
    max-width: none;
    max-height: calc(100% - 1rem);
    padding: 0;
    border: 1px solid #6f7887;
    border-radius: .55rem;
    background: var(--navy);
    color: var(--ivory);
}
.screenshot-viewer::backdrop { background: rgb(9 15 27 / 86%); }
body:has(.screenshot-viewer[open]) { overflow: hidden; }
.screenshot-panel { display: grid; gap: .65rem; padding: .8rem; }
.screenshot-panel header, .screenshot-controls { display: flex; align-items: center; gap: .45rem .7rem; }
.screenshot-panel header { justify-content: space-between; }
.screenshot-panel h2 { margin: 0; font-size: clamp(1.25rem, 3vw, 1.75rem); }
.screenshot-panel img { display: block; width: 100%; height: min(72dvh, 65rem); object-fit: contain; }
.screenshot-controls { justify-content: center; flex-wrap: wrap; }
.screenshot-panel button { min-height: 2.75rem; padding: .35rem .7rem; border: 1px solid #9ea7b5; border-radius: .3rem; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.screenshot-panel header button { min-width: 2.75rem; font-size: 1.45rem; line-height: 1; }
.screenshot-panel button:hover { background: #243955; }
.screenshot-panel :focus-visible { outline-color: var(--red); }
@media (max-width: 45rem) {
    .screenshot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
}
@media (max-width: 30rem) {
    .screenshot-grid { grid-template-columns: 1fr; }
    .screenshot-panel img { height: min(64dvh, 50rem); }
}

.documentation section { margin-block: 2rem; }
.documentation h2 { font-size: clamp(1.65rem, 4vw, 2.35rem); }
.documentation li + li { margin-top: .5rem; }
.documentation code { overflow-wrap: anywhere; }
.documentation-sources { font-size: .9rem; }
.cue-layers { width: 100%; margin-block: 1rem; border-collapse: collapse; }
.cue-layers th, .cue-layers td { padding: .6rem .5rem; text-align: left; border-bottom: 1px solid var(--line); }
.cue-layers thead { background: var(--ivory); }
.osc-commands { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.osc-commands li { margin: 0; padding: .85rem; background: var(--ivory); border-radius: .35rem; }
.osc-commands li + li { margin: 0; }
.osc-commands p { margin: .35rem 0 0; }
.osc-example { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .35rem .75rem; }
.osc-example button { padding: .25rem .6rem; min-height: 2.75rem; }
.osc-example button[hidden] { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 42rem) {
    .osc-commands { grid-template-columns: 1fr; }
}
