:root {
    color-scheme: light;
    font-family: system-ui, sans-serif;
    color: #182b3a;
/*    background: #f4f6f8;*/
    background:rgb(169,169,169);
}

.contact-directory section {
    border-top: 1px solid #ccd5dd;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 1rem 2rem;
    padding-block: 1.75rem;
}
.contact-directory h2 { margin: 0; }
.contact-directory p { color: #455d6e; }
.contact-directory ul { list-style: none; margin: 0; padding: 0; }
.contact-directory li + li { border-top: 1px solid #ccd5dd; }
.contact-directory a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 34ch);
    gap: .25rem 1rem;
    padding: .7rem 0;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.contact-directory a:hover { color: #145978; text-decoration: underline; }
.contact-directory a span { color: #455d6e; font-weight: 400; }
.contact-sms-details { display: grid; }
.contact-sms-details small { margin-top: .25rem; line-height: 1.45; }
@media (max-width: 720px) {
    .contact-directory section { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
    .contact-directory a { grid-template-columns: minmax(0, 1fr); }
}

.site-footer .site-footer-help { flex-direction: row; gap: 1rem; }

/* Shared navy footer. */
.site-footer { margin-top: 3rem; padding: 2rem; border-radius: .8rem; background: #142d40; color: #f4f6f8; font-size: .9rem; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: .25em; }
.site-footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; }
.site-footer-grid > * { min-width: 0; }
.site-footer-brand { display: inline-flex; align-items: center; gap: .65rem; font-size: 1.4rem; font-weight: 700; }
.site-footer-brand img { width: 2rem; height: 2rem; }
.site-footer-tagline { max-width: 25ch; line-height: 1.65; color: #c3d3df; }
.site-footer-requirements { color: #c3d3df; font-size: .8rem; line-height: 1.7; }
.site-footer h2 { margin: .25rem 0 1rem; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.site-footer nav { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; }
.site-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid #3e5668; font-size: .8rem; color: #c3d3df; }
@media (max-width: 700px) {
    .site-footer { padding: 1.5rem; }
    .site-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
    .site-footer-identity { grid-column: 1 / -1; }
}
@media (max-width: 400px) {
    .site-footer-grid { grid-template-columns: 1fr; }
    .site-footer nav a { padding-block: .5rem; }
}
.legal-page { max-width: 76ch; margin-inline: auto; line-height: 1.7; overflow-wrap: anywhere; }
.legal-page h1, .legal-page h2 { line-height: 1.25; }
.legal-page section { margin-top: 2.25rem; }
.legal-page h2 { scroll-margin-top: 1.5rem; }
.legal-eyebrow { color: #145978; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.legal-contents { padding: 1rem 1.5rem; margin-top: 2rem; background: #e7eef3; border-radius: .6rem; }
.legal-contents ol { padding-left: 1.5rem; }
.legal-contents li { margin: .25rem 0; }
@media print {
    header, .site-footer, .bg-layer, .legal-contents, .legal-page .button { display: none !important; }
    .legal-page { max-width: none; color: #000; font-size: 11pt; }
    .legal-page h2 { break-after: avoid; }
}
/*body::before {
    content: "";
    position: fixed;
    inset: 0;*/
    /*background: rgb(0 0 0 / 45%);*/
    /*background: rgb(255 255 255 / 75%);
    z-index: 1;
    pointer-events: none;
}*/
body {
    margin: 0;
    min-height: 100vh;
}

/* Rotating backgrounds */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

    .bg-layer.active {
        opacity: 1;
    }

/* Page content */
/* Content above the overlay */
header,
.main-content-wrapper {
    position: relative;
    z-index: 2;
}

header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem max(1rem, calc((100vw - 960px) / 2));
    background: #142d40;
    color: white;
    gap: 1rem;
}

    header a {
        color: white;
    }

.brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
}

.brand img { display: block; width: 2rem; height: 2rem; flex-shrink: 0; }

nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}

    nav .nav-auth {
        margin: 0;
        text-decoration: none;
    }

main {
    position: relative;
    z-index: 2;
    max-width: 960px;
    margin: 3rem auto;
    padding: 2rem;
    border-radius: 12px;
    background: rgb(244 246 248 / 90%);
    color: #182b3a;
}

a {
    color: #125780;
}

article,
section[role="alertdialog"] {
    background: white;
    border: 1px solid #ccd5dd;
    border-radius: .6rem;
    padding: 1.25rem;
    margin: 1rem 0;
}

button,
.button {
    display: inline-block;
    background: #145978;
    color: white;
    border: 0;
    border-radius: .3rem;
    padding: .7rem 1rem;
    margin: .3rem .5rem .3rem 0;
    font: inherit;
    cursor: pointer;
}

    button:disabled {
        opacity: .55;
        cursor: wait;
    }

code {
    overflow-wrap: anywhere;
}

:focus-visible {
    outline: 3px solid #b36b00;
    outline-offset: 3px;
}

.faq-page {
    max-width: 78ch;
    margin: 0 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.6;
}

.faq-page h1 { line-height: 1.2; }
.faq-page h2 { margin-top: 2rem; line-height: 1.3; }
.faq-page details {
    margin: .75rem 0;
    border: 1px solid #ccd5dd;
    border-radius: .6rem;
    background: white;
}
.faq-page summary {
    padding: 1rem;
    cursor: pointer;
    font-weight: 600;
    border-radius: .6rem;
}
.faq-page summary:hover { background: #eef3f6; }
.faq-page details[open] summary { border-bottom: 1px solid #ccd5dd; }
.faq-answer { padding: 0 1rem; }
.faq-answer pre {
    white-space: pre-wrap;
    padding: .75rem;
    background: #eef3f6;
    border-radius: .3rem;
}
.faq-table-scroll { overflow-x: auto; margin: 1rem 0; }
.faq-page table { border-collapse: collapse; width: 100%; min-width: 36rem; }
.faq-page caption { text-align: left; font-weight: 600; margin-bottom: .5rem; }
.faq-page th, .faq-page td {
    padding: .6rem;
    text-align: left;
    vertical-align: top;
    border: 1px solid #ccd5dd;
}
.faq-page th { background: #eef3f6; }
nav a.active { text-underline-offset: .3em; text-decoration-thickness: 2px; }

@media (max-width: 600px) {
    main { padding: 1rem; margin: 1rem .5rem; }
}

#blazor-error-ui {
    display: none;
    background: #ffe7ad;
    padding: 1rem;
    position: fixed;
    bottom: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 10;
}

.purchase-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1rem;
}

.purchase-checkout {
    background: white;
    border: 1px solid #ccd5dd;
    border-radius: .6rem;
    padding: 1.5rem;
}

.purchase-price {
    font-size: 1.3rem;
    font-weight: 600;
}

.purchase-checkout label {
    display: block;
    margin-top: 1rem;
    margin-bottom: .4rem;
}

.purchase-checkout input,
.purchase-checkout select {
    font: inherit;
    padding: .6rem;
    max-width: 100%;
    border: 1px solid #687b89;
    border-radius: .3rem;
}

/* Homepage: scoped styles leave the rotating background layers unchanged. */
.home-page { line-height: 1.65; }
.home-page h1, .home-page h2, .home-page h3 { line-height: 1.2; text-wrap: balance; }
.home-page h1 { font-size: clamp(2rem, 3.3vw, 2.7rem); letter-spacing: -.045em; margin: .6rem 0 1.3rem; }
.home-page h2 { font-size: clamp(1.7rem, 3vw, 2.25rem); letter-spacing: -.025em; margin: .5rem 0 1.2rem; }
.home-page h3 { font-size: 1.15rem; margin: .6rem 0; }
.home-page p { margin-top: 0; }
.home-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 2rem; align-items: center; }
.home-hero > *, .home-grid > *, .home-steps > * { min-width: 0; }
.home-eyebrow, .home-card-label { font-size: .76rem; font-weight: 750; text-transform: uppercase; letter-spacing: .13em; color: #145978; }
.home-lead { font-size: 1.12rem; }
.home-note { font-size: .88rem; color: #455d6e; }
.home-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin: 1.4rem 0 .9rem; align-items: center; }
.home-actions .button { margin: 0; text-decoration: none; font-size: .94rem; font-weight: 600; }
.home-page .home-secondary { background: transparent; color: #145978; box-shadow: inset 0 0 0 1px #145978; }
.home-actions .button:hover { background: #103e55; color: white; }
.home-theatre { margin: 0; background: #142d40; border-radius: .8rem; overflow: hidden; color: #e9eef2; }
.home-theatre img { display: block; width: 100%; height: 26rem; object-fit: cover; }
.home-theatre figcaption { padding: .8rem 1rem; font-size: .8rem; }
.home-section { margin-top: 4rem; scroll-margin-top: 1.5rem; }
.home-section-intro { max-width: 72ch; }
.home-grid { display: grid; gap: 1rem; }
.home-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-grid article { margin: 0; padding: 1.5rem; }
.home-grid article p:last-child { margin-bottom: 0; }
.home-screenshot { margin: 2.5rem 0 0; }
.home-placeholder { min-height: 16rem; padding: 2rem; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 1px dashed #718b9e; border-radius: .8rem; background: #e7eef3; color: #334e62; }
.home-placeholder-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: .8rem; }
.home-placeholder strong { font-size: clamp(1.15rem, 3vw, 1.5rem); line-height: 1.3; }
.home-placeholder p { max-width: 45ch; margin: .7rem 0 0; font-size: .9rem; }
.home-screenshot figcaption { margin-top: .65rem; font-size: .85rem; color: #455d6e; text-align: center; }
.home-screenshot img { display: block; width: 100%; height: auto; border-radius: .8rem; }
.home-workflow { border-top: 1px solid #bdcbd5; border-bottom: 1px solid #bdcbd5; padding: 2.5rem 0; }
.home-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; padding: 0; list-style: none; counter-reset: workflow; }
.home-steps li { counter-increment: workflow; }
.home-steps li::before { content: "0" counter(workflow); display: block; font-size: 1.7rem; font-weight: 700; color: #145978; margin-bottom: .7rem; }
.home-cue { padding: 1rem; border-radius: .4rem; background: #e2ebf1; font-size: .9rem; }
.home-closing { margin-top: 4rem; padding: 2rem; border-radius: .8rem; background: #142d40; color: white; }
.home-closing .home-actions .home-secondary { color: white; box-shadow: inset 0 0 0 1px #9bb5c6; }
.home-closing p:last-child { margin: 1.25rem 0 0; }
.home-closing p a { color: #d3e8f5; }
@media (max-width: 800px) {
    .home-hero { grid-template-columns: 1fr; }
    .home-theatre img { height: auto; aspect-ratio: 16 / 9; }
    .home-grid-three, .home-steps { grid-template-columns: 1fr; }
    .home-steps { gap: 1rem; }
    .home-steps li::before { font-size: 1.25rem; margin-bottom: .25rem; }
}
@media (max-width: 600px) {
    .home-grid-two { grid-template-columns: 1fr; }
    .home-section, .home-closing { margin-top: 2.5rem; }
    .home-closing, .home-placeholder { padding: 1.25rem; }
    .home-placeholder { min-height: 13rem; }
    .home-actions .button { box-sizing: border-box; width: 100%; text-align: center; }
}

/* Route focus is programmatic; interactive controls retain visible keyboard focus. */
h1:focus { outline: none; }
.home-theatre { position: relative; }
.home-theatre .hero-carousel {
    position: absolute; inset: auto 0 0; padding: 1.25rem 1rem .75rem;
    background: linear-gradient(transparent, rgb(10 25 37 / 95%) 25%);
    font-size: 1rem;
}
.hero-slides { min-height: 3.3em; display: grid; align-items: end; }
.hero-slides p { margin: 0; font-weight: 600; text-wrap: balance; }
.hero-slides [hidden] { display: none; }
.hero-carousel-controls { display: flex; gap: .4rem; margin-top: .65rem; }
.hero-carousel-controls button {
    margin: 0; padding: .35rem .7rem; min-height: 2.75rem;
    background: rgb(255 255 255 / 12%); font-size: .8rem;
}
.hero-carousel-controls button:hover { background: rgb(255 255 255 / 25%); }
#osc-commands { scroll-margin-top: 1.5rem; }

.home-live-gallery .home-screenshot { margin-top: 1.5rem; }
.home-live-gallery .home-screenshot a { display: block; border-radius: .8rem; }
.home-screenshot-more { margin-top: 1.5rem; }
.home-screenshot-more summary { cursor: pointer; color: #125780; font-weight: 600; padding: .5rem 0; }

.screenshot-carousel [hidden] { display: none; }
.screenshot-carousel-controls { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: .75rem; }
.screenshot-carousel-controls button { margin: 0; min-width: 44px; min-height: 44px; }
.screenshot-carousel-controls .carousel-dot { background: transparent; color: #718b9e; padding: .4rem; font-size: 1.4rem; }
.screenshot-carousel-controls .carousel-dot[aria-pressed="true"] { color: #145978; box-shadow: inset 0 -3px #145978; }

.screenshot-carousel img { aspect-ratio: 3456 / 2234; object-fit: contain; background: #353839; }

.history-carousel img { aspect-ratio: 2960 / 2106; background: #000; }

.admin-page form { margin: 1.5rem 0; max-width: 48rem; }
.admin-page label { display:block; margin-top:1rem; }
.admin-page input, .admin-page textarea, .admin-page select { display:block; width:100%; box-sizing:border-box; margin:.4rem 0 1rem; padding:.7rem; }
.software-release { margin:2rem 0; padding-bottom:2rem; border-bottom:1px solid #777; }
.release-checksum { overflow-wrap:anywhere; }

.admin-page pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Support: common answers first, followed by direct contact. */
.support-page { line-height: 1.6; }
.support-page h1 { font-size: clamp(2rem, 4vw, 2.5rem); line-height: 1.2; letter-spacing: -.035em; margin: 0 0 .75rem; }
.support-intro { max-width: 65ch; margin: 0 0 1.75rem; color: #455d6e; }
.support-help-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.support-help-card { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; padding: 1.4rem; background: white; border: 1px solid #ccd5dd; border-radius: .6rem; }
.support-icon { display: block; width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.support-help-card > .support-icon { color: #145978; }
.support-help-card h2 { font-size: 1.1rem; line-height: 1.3; margin: 0; }
.support-help-card p { margin: 0; color: #455d6e; font-size: .94rem; }
.support-card-links { display: flex; flex-wrap: wrap; gap: .6rem 1rem; margin-top: auto; padding-top: .4rem; font-size: .9rem; }
.support-contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 2.25rem; padding: 2rem 0; margin-top: 1rem; }
.support-contact > * { min-width: 0; }
.support-contact h2 { font-size: 1.5rem; line-height: 1.3; margin: 0 0 .75rem; }
.support-contact p { margin: 0 0 1rem; color: #455d6e; }
.support-community { display: inline-block; text-decoration: none; }
.support-community:hover { background: #103e55; }
.support-checklist { border-left: 2px solid #bdcbd5; padding-left: 1.5rem; }
.support-checklist h3 { font-size: 1rem; margin: 0; }
.support-checklist ul { margin: .75rem 0; padding-left: 1.25rem; color: #455d6e; font-size: .94rem; }
.support-checklist li { margin: .4rem 0; }
.support-contact .support-privacy-note { font-size: .8rem; margin-bottom: 0; }
.support-show-note { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem 1.4rem; background: #e7eef3; border-radius: .5rem; }
.support-show-note > .support-icon { color: #145978; margin-top: .2rem; }
.support-show-note h2 { font-size: 1rem; line-height: 1.3; margin: 0; }
.support-show-note p { margin: .35rem 0 0; color: #455d6e; font-size: .94rem; }
@media (max-width: 700px) {
    .support-help-grid, .support-contact { grid-template-columns: 1fr; }
    .support-contact { gap: 1.5rem; }
    .support-card-links a { padding-block: .4rem; }
}

/* Video library and watch pages */
.video-library, .watch-video { max-width: 76rem; margin-inline: auto; }
.watch-video, .video-library .video-feature { max-width: 60rem; }
.video-feature { min-width: 0; }
.video-feature :is(h2, p), .watch-video h1, .video-grid a { overflow-wrap: anywhere; }
.video-player {
    aspect-ratio: 16 / 9;
    width: 100%;
    background: #12161c;
    border-radius: .65rem;
    overflow: hidden;
}
.video-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.video-group { margin-block: 2rem; }
.video-grid, .video-tags { list-style: none; padding: 0; }
.video-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
}
.video-grid a { display: flex; flex-direction: column; gap: .55rem; height: 100%; }
.video-grid img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: .5rem; }
.video-description { white-space: pre-wrap; overflow-wrap: anywhere; }
.video-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.video-tags li { border: 1px solid currentColor; border-radius: 1rem; padding: .15rem .6rem; overflow-wrap: anywhere; }
.video-library > h1, .video-admin > h1 { margin-top: 0; }
.video-library .video-feature {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: center;
    gap: 1.25rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #ccd5dd;
    border-radius: .75rem;
}
.video-feature-details h2 { margin: 0 0 .75rem; font-size: clamp(1.1rem, 2vw, 1.5rem); }
.watch-video { padding: 0; border: 0; background: transparent; }
.watch-video h1 { margin: .65rem 0 1rem; }
.watch-video .video-description { max-width: 75ch; line-height: 1.6; }
.watch-links { display: flex; flex-wrap: wrap; gap: .65rem 1.25rem; list-style: none; padding: 0; }
.video-admin-sync {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #ccd5dd;
    border-radius: .65rem;
    background: #fff;
}
.video-admin-sync h2, .video-admin-sync p, .video-admin-entry h3 { margin: 0; }
.video-admin-entry h3 { overflow-wrap: anywhere; }
.video-admin-status { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-block: .65rem 1rem; }
.video-status { background: #e9f0f4; border-radius: .4rem; padding: .2rem .55rem; font-size: .875rem; }
.video-admin-controls { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem 1rem; }
.video-admin-controls > label { display: grid; gap: .35rem; }
.video-admin-controls :is(select, input[type="number"]) { max-width: 100%; padding: .4rem; font: inherit; }
.video-admin-controls input[type="number"] { width: 6rem; }
.video-admin-options { display: grid; gap: .3rem; }
.video-admin-options label { display: flex; align-items: center; gap: .4rem; }
.video-admin-controls button, .video-admin-sync button { margin: 0; }
@media (max-width: 650px) {
    .video-library .video-feature { grid-template-columns: minmax(0, 1fr); gap: .85rem; }
}
