@font-face {
    font-family: "Roboto Condensed";
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url("/fonts/roboto-condensed-latin.woff2") format("woff2");
}

:root {
    --navy-950: #030C15; /* deepest background */
    --navy-900: #081B27; /* panels */
    --navy-800: #0C283E; /* body */
    --navy-600: #154462; /* primary navy */
    --navy-500: #326081; /* hover / active */
    --blue-300: #7DAFCA; /* accent */
    --blue-100: #BED7E5; /* links */
    --text: #DCDCDC; /* gainsboro */
    --text-dim: #A9BCC8;
    --success: #84BA4A;
    --error: #F85441;
    --warning: #FA8072;
    --radius: 6px;
    --gap: clamp(1rem, 3vw, 2rem);
    --max: 1200px;
    --font: "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
    --mono: Consolas, "Cascadia Mono", "Courier New", monospace;
}

/* ---------- Base ---------- */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 1rem;
}

body {
    margin: 0;
    font-family: var(--font);
    font-weight: 300;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--navy-800);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

img, svg {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4 {
    font-weight: 400;
    line-height: 1.25;
    color: #fff;
    margin: 1.6em 0 .6em;
}

h1 {
    font-size: clamp(1.8rem, 4.5vw, 2.6rem);
    margin-top: 0;
}

h2 {
    font-size: clamp(1.4rem, 3.2vw, 1.85rem);
}

h3 {
    font-size: 1.25rem;
    color: var(--blue-100);
}

h4 {
    font-size: 1.05rem;
    color: var(--blue-100);
}

p, ul, ol {
    margin: 0 0 1em;
}

strong {
    font-weight: 700;
}

a {
    color: var(--blue-100);
    text-decoration: none;
}

    a:hover {
        color: #fff;
        text-decoration: underline;
    }

    a:focus-visible, .button:focus-visible, .nav-toggle:focus-visible + .nav-toggle-label {
        outline: 2px solid var(--blue-300);
        outline-offset: 2px;
    }

hr {
    border: 0;
    border-top: 1px solid var(--navy-600);
    margin: 2rem 0;
}

.container {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gap);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--blue-300);
    color: var(--navy-950);
    padding: .5rem 1rem;
    z-index: 100;
}

    .skip-link:focus {
        left: 1rem;
    }

/* ---------- Header & navigation ---------- */

.site-header {
    background: var(--navy-950);
    border-bottom: 1px solid var(--navy-600);
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding-top: .75rem;
    padding-bottom: .75rem;
}

.brand {
    display: block;
    line-height: 0;
}

    .brand img {
        height: 56px;
        width: auto;
    }

/* Mobile menu: the checkbox is visually hidden but stays keyboard-focusable. */
.nav-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    margin: 0;
}

.nav-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    cursor: pointer;
    padding: .4rem .7rem;
    border: 1px solid var(--navy-600);
    border-radius: var(--radius);
    color: var(--text);
    user-select: none;
}

    .nav-toggle-label img {
        width: 22px;
        height: 22px;
    }

.site-nav {
    display: none;
    width: 100%;
    padding-top: .75rem;
}

.nav-toggle:checked ~ .site-nav {
    display: block;
}

.nav-list, .sub-list, .social-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .nav-list a {
        display: block;
        padding: .6rem .25rem;
        color: var(--text);
        border-bottom: 1px solid var(--navy-900);
        font-size: 1.1rem;
    }

        .nav-list a:hover {
            color: #fff;
            text-decoration: none;
            background: var(--navy-900);
        }

        .nav-list a[aria-current] {
            color: var(--blue-300);
            font-weight: 400;
        }

    .sub-list a {
        padding-left: 1.25rem;
        font-size: 1rem;
        color: var(--text-dim);
    }

.social-list {
    display: flex;
    gap: 1rem;
    padding: .9rem .25rem .25rem;
}

    .social-list a {
        display: block;
        line-height: 0;
        opacity: .85;
    }

        .social-list a:hover {
            opacity: 1;
        }

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
    background: var(--navy-900);
    font-size: .9rem;
}

    .breadcrumbs ol {
        list-style: none;
        margin: 0;
        padding: .55rem 0;
        display: flex;
        flex-wrap: wrap;
    }

    .breadcrumbs li {
        color: var(--text-dim);
    }

        .breadcrumbs li + li::before {
            content: "\203A";
            padding: 0 .5rem;
            color: var(--navy-500);
        }

    .breadcrumbs [aria-current] {
        color: var(--text);
    }

/* ---------- Sections ---------- */

.section {
    padding: clamp(2rem, 6vw, 4rem) 0;
}

.section-alt {
    background: var(--navy-900);
}

.section-title {
    text-align: center;
    margin-top: 0;
}

.section-lead {
    text-align: center;
    max-width: 46rem;
    margin: 0 auto 2rem;
    color: var(--text-dim);
}

.hero {
    background: linear-gradient(180deg, var(--navy-950) 0%, var(--navy-800) 100%);
    text-align: center;
    padding: clamp(2.5rem, 8vw, 5rem) 0;
}

    .hero .motto {
        font-size: clamp(1.15rem, 2.6vw, 1.5rem);
        color: var(--blue-300);
        letter-spacing: .04em;
        margin-bottom: 1rem;
    }

    .hero p {
        max-width: 44rem;
        margin-left: auto;
        margin-right: auto;
    }

.page-head {
    padding-top: clamp(1.75rem, 5vw, 3rem);
}

    .page-head .lead {
        font-size: 1.2rem;
        color: var(--text-dim);
        max-width: 48rem;
    }

.prose {
    max-width: 50rem;
}

/* ---------- Buttons ---------- */

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
    margin-top: 1.5rem;
}

    .actions.left {
        justify-content: flex-start;
    }

.button {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .7rem 1.4rem;
    border-radius: var(--radius);
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.2;
    border: 1px solid var(--blue-300);
    background: var(--blue-300);
    color: var(--navy-950);
}

    .button:hover {
        background: var(--navy-600);
        color: var(--blue-300);
        text-decoration: none;
    }

    .button.secondary {
        background: transparent;
        color: var(--blue-100);
    }

        .button.secondary:hover {
            background: var(--navy-600);
            color: #fff;
        }

    .button img {
        width: 20px;
        height: 20px;
    }

/* ---------- Cards ---------- */

.grid {
    display: grid;
    gap: var(--gap);
    grid-template-columns: 1fr;
}

.card {
    background: var(--navy-800);
    border: 1px solid var(--navy-600);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.section-alt .card {
    background: var(--navy-800);
}

.section:not(.section-alt) .card {
    background: var(--navy-900);
}

.card h3 {
    margin-top: 0;
    color: #fff;
}

.card p {
    color: var(--text-dim);
}

.card ul {
    padding-left: 1.1rem;
    margin-bottom: 0;
}

.card li {
    margin-bottom: .25rem;
}

.card .card-links {
    margin-top: auto;
    padding-top: 1rem;
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.card-head {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin-bottom: .75rem;
}

    .card-head .card-icon {
        margin: 0;
    }

    .card-head h3 {
        margin: 0;
    }


/* ---------- Product pages ---------- */

.product-head {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

    .product-head img {
        width: 72px;
        height: 72px;
        flex: none;
    }

    .product-head h1 {
        margin: 0;
    }

.feature-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: .9rem;
    grid-template-columns: 1fr;
}

    .feature-list li {
        background: var(--navy-900);
        border-left: 3px solid var(--blue-300);
        padding: .9rem 1.1rem;
        border-radius: 0 var(--radius) var(--radius) 0;
    }

    .feature-list strong {
        color: #fff;
        display: block;
        font-weight: 400;
        font-size: 1.1rem;
    }

.facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: .4rem 1.25rem;
    margin: 0 0 1.5rem;
}

    .facts dt {
        color: var(--text-dim);
    }

    .facts dd {
        margin: 0;
    }

.cta-band {
    text-align: center;
}

    .cta-band h2 {
        margin-top: 0;
    }

/* ---------- Manual (rendered README) ---------- */

.manual-layout {
    display: grid;
    gap: var(--gap);
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 3rem;
}

.toc {
    background: var(--navy-900);
    border: 1px solid var(--navy-600);
    border-radius: var(--radius);
    font-size: .95rem;
}

    .toc summary, .toc .toc-title {
        cursor: pointer;
        padding: .75rem 1rem;
        color: #fff;
        font-weight: 400;
        margin: 0;
        font-size: 1rem;
    }

    .toc .toc-title {
        cursor: default;
    }

.toc-desktop {
    display: none;
}

.toc ol {
    list-style: none;
    margin: 0;
    padding: 0 1rem 1rem;
}

    .toc ol ol {
        padding: 0 0 0 .9rem;
    }

.toc li {
    margin: .2rem 0;
}

.toc a {
    color: var(--text-dim);
}

    .toc a:hover {
        color: #fff;
    }

.toc .toc-h2 > a {
    color: var(--blue-100);
}

.markdown {
    min-width: 0;
}

    .markdown > h1:first-child {
        display: none;
    }

    .markdown h2 {
        border-bottom: 1px solid var(--navy-600);
        padding-bottom: .3rem;
    }

        .markdown h2:first-child {
            margin-top: 0;
        }

    .markdown .anchor {
        margin-left: .4rem;
        color: var(--navy-500);
        font-size: .85em;
        opacity: 0;
    }

        .markdown :is(h2, h3, h4):hover .anchor, .markdown .anchor:focus {
            opacity: 1;
            text-decoration: none;
        }

    .markdown code {
        font-family: var(--mono);
        font-size: .88em;
        background: var(--navy-950);
        color: #E6EEF3;
        padding: .1em .35em;
        border-radius: 4px;
    }

    .markdown pre {
        background: var(--navy-950);
        border: 1px solid var(--navy-600);
        border-radius: var(--radius);
        padding: 1rem;
        overflow-x: auto;
        line-height: 1.45;
        margin: 0 0 1.25rem;
    }

        .markdown pre code {
            background: none;
            padding: 0;
            font-size: .9rem;
            white-space: pre;
        }

.table-wrap {
    overflow-x: auto;
    margin: 0 0 1.25rem;
    border: 1px solid var(--navy-600);
    border-radius: var(--radius);
}

.markdown table {
    border-collapse: collapse;
    width: 100%;
    font-size: .95rem;
}

.markdown th, .markdown td {
    padding: .55rem .75rem;
    border-bottom: 1px solid var(--navy-600);
    text-align: left;
    vertical-align: top;
}

.markdown th {
    background: var(--navy-600);
    color: #fff;
    font-weight: 400;
    white-space: nowrap;
}

.markdown tr:last-child td {
    border-bottom: 0;
}

.markdown tbody tr:nth-child(even) {
    background: rgba(3, 12, 21, .35);
}

.markdown td code {
    white-space: nowrap;
}

.markdown blockquote {
    margin: 0 0 1.25rem;
    padding: .5rem 1rem;
    border-left: 3px solid var(--blue-300);
    background: var(--navy-900);
    color: var(--text-dim);
}

.markdown li {
    margin-bottom: .3rem;
}

.manual-meta {
    font-size: .9rem;
    color: var(--text-dim);
    margin-top: 2rem;
}

/* ---------- Contact ---------- */

.contact-options {
    display: grid;
    gap: var(--gap);
    grid-template-columns: 1fr;
    max-width: 52rem;
}

    .contact-options .card {
        text-align: left;
    }

    .contact-options .button {
        align-self: flex-start;
        margin-top: auto;
    }

/* ---------- Sitemap page ---------- */

.sitemap-list {
    list-style: none;
    padding: 0;
}

    .sitemap-list ul {
        list-style: none;
        padding-left: 1.4rem;
        border-left: 1px solid var(--navy-600);
        margin: .3rem 0 .6rem .3rem;
    }

    .sitemap-list li {
        margin: .35rem 0;
    }

    .sitemap-list .desc {
        color: var(--text-dim);
        font-size: .92rem;
    }

/* ---------- Error pages ---------- */

.error-code {
    font-size: clamp(4rem, 14vw, 7rem);
    line-height: 1;
    color: var(--warning);
    margin: 0;
    font-weight: 300;
}

/* ---------- Footer ---------- */

.site-footer {
    background: var(--navy-950);
    border-top: 1px solid var(--navy-600);
    font-size: .9rem;
    color: var(--text-dim);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

    .footer-inner p {
        margin: 0 0 .25rem;
    }

/* ==========================================================================
   >= 600px : large phones / small tablets
   ========================================================================== */
@media (min-width: 600px) {
    .grid.cols-2, .grid.cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feature-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .brand img {
        height: 72px;
    }
}

/* ==========================================================================
   >= 900px : tablet landscape / desktop - full navigation
   ========================================================================== */
@media (min-width: 900px) {
    .brand img {
        height: 96px;
    }

    .nav-toggle, .nav-toggle-label {
        display: none;
    }

        .site-nav, .nav-toggle:checked ~ .site-nav {
            display: flex;
            align-items: center;
            gap: 1.5rem;
            width: auto;
            padding: 0;
        }

    .nav-list {
        display: flex;
        gap: .25rem;
    }

        .nav-list > li {
            position: relative;
        }

        .nav-list a {
            border: 0;
            border-radius: var(--radius);
            padding: .5rem .8rem;
        }

        .nav-list > li > a[aria-current] {
            background: var(--navy-600);
            color: #fff;
        }

    .has-sub > a::after {
        content: " \25BE";
        font-size: .8em;
        color: var(--blue-300);
    }

    .sub-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 12rem;
        z-index: 20;
        background: var(--navy-900);
        border: 1px solid var(--navy-600);
        border-radius: var(--radius);
        padding: .35rem 0;
        box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
    }

    .has-sub:hover .sub-list, .has-sub:focus-within .sub-list {
        display: block;
    }

    .sub-list a {
        padding: .5rem 1rem;
        border-radius: 0;
        color: var(--text);
    }

    .social-list {
        padding: 0;
        gap: .8rem;
    }

    .grid.cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .footer-right {
        text-align: right;
        flex: none;
    }

    .manual-layout {
        grid-template-columns: 17rem minmax(0, 1fr);
        align-items: start;
    }

    .toc-mobile {
        display: none;
    }

    .toc-desktop {
        display: block;
        position: sticky;
        top: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
}

/* ==========================================================================
   >= 1200px : wide desktop - full-size logo (128px, per brand requirement)
   ========================================================================== */
@media (min-width: 1200px) {
    .brand img {
        height: 128px;
    }

    .feature-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

@media print {
    .site-header, .site-footer, .breadcrumbs, .toc, .skip-link {
        display: none;
    }

    body {
        background: #fff;
        color: #000;
    }

    a {
        color: #000;
    }

    .markdown pre, .markdown code {
        background: #f4f4f4;
        color: #000;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.h3 {
    font-size: 1.25rem;
    margin: 0;
    color: #fff;
}
