@font-face {
    font-family: "IBM Plex Sans";
    src: url("/static/fonts/ibm-plex-sans-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
}

@font-face {
    font-family: "IBM Plex Mono";
    src: url("/static/fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "IBM Plex Mono";
    src: url("/static/fonts/ibm-plex-mono-500-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: "IBM Plex Mono";
    src: url("/static/fonts/ibm-plex-mono-600-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}

:root,
[data-theme="light"] {
    color-scheme: light;
    --canvas: #edf1f4;
    --canvas-grid: rgba(27, 46, 62, 0.045);
    --surface: #ffffff;
    --surface-alt: #f5f7f8;
    --surface-raised: #ffffff;
    --surface-inverse: #071321;
    --ink: #111b24;
    --ink-soft: #34424e;
    --muted: #5c6974;
    --faint: #77848e;
    --line: #d2d9de;
    --line-strong: #a9b4bc;
    --brand: #102ead;
    --brand-strong: #081e82;
    --brand-soft: #e8edff;
    --gold: #a87500;
    --gold-bright: #f7c432;
    --gold-soft: #fff5d5;
    --success: #16704e;
    --success-soft: #e5f5ed;
    --warning: #925900;
    --warning-soft: #fff0d1;
    --danger: #b4232d;
    --danger-soft: #fdebed;
    --info: #096d78;
    --info-soft: #e2f4f5;
    --map-panel: rgba(7, 19, 33, 0.93);
    --map-panel-ink: #f4f7f9;
    --shadow-low: 0 1px 2px rgba(7, 19, 33, 0.08);
    --shadow-mid: 0 8px 24px rgba(7, 19, 33, 0.12);
    --shadow-high: 0 20px 50px rgba(7, 19, 33, 0.2);
    --header-height: 72px;
    --radius-sm: 3px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --font-sans: "IBM Plex Sans", "Avenir Next", sans-serif;
    --font-mono: "IBM Plex Mono", "SFMono-Regular", monospace;
}

[data-theme="dark"] {
    color-scheme: dark;
    --canvas: #07111d;
    --canvas-grid: rgba(191, 208, 222, 0.045);
    --surface: #0d1b2a;
    --surface-alt: #112438;
    --surface-raised: #152b40;
    --surface-inverse: #f4f7f9;
    --ink: #f2f6f8;
    --ink-soft: #d2dce3;
    --muted: #a9b7c2;
    --faint: #8293a1;
    --line: #294156;
    --line-strong: #47627a;
    --brand: #8daaff;
    --brand-strong: #b9c8ff;
    --brand-soft: #172958;
    --gold: #f5c33b;
    --gold-bright: #ffd867;
    --gold-soft: #3a3014;
    --success: #65d2a7;
    --success-soft: #13392d;
    --warning: #ffc55b;
    --warning-soft: #3e2d12;
    --danger: #ff8991;
    --danger-soft: #431e27;
    --info: #6ed6df;
    --info-soft: #11383d;
    --map-panel: rgba(7, 17, 29, 0.94);
    --map-panel-ink: #f4f7f9;
    --shadow-low: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-mid: 0 10px 28px rgba(0, 0, 0, 0.32);
    --shadow-high: 0 24px 60px rgba(0, 0, 0, 0.46);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --canvas: #07111d;
        --canvas-grid: rgba(191, 208, 222, 0.045);
        --surface: #0d1b2a;
        --surface-alt: #112438;
        --surface-raised: #152b40;
        --surface-inverse: #f4f7f9;
        --ink: #f2f6f8;
        --ink-soft: #d2dce3;
        --muted: #a9b7c2;
        --faint: #8293a1;
        --line: #294156;
        --line-strong: #47627a;
        --brand: #8daaff;
        --brand-strong: #b9c8ff;
        --brand-soft: #172958;
        --gold: #f5c33b;
        --gold-bright: #ffd867;
        --gold-soft: #3a3014;
        --success: #65d2a7;
        --success-soft: #13392d;
        --warning: #ffc55b;
        --warning-soft: #3e2d12;
        --danger: #ff8991;
        --danger-soft: #431e27;
        --info: #6ed6df;
        --info-soft: #11383d;
        --map-panel: rgba(7, 17, 29, 0.94);
        --map-panel-ink: #f4f7f9;
        --shadow-low: 0 1px 2px rgba(0, 0, 0, 0.35);
        --shadow-mid: 0 10px 28px rgba(0, 0, 0, 0.32);
        --shadow-high: 0 24px 60px rgba(0, 0, 0, 0.46);
    }
}

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

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background-color: var(--canvas);
    background-image:
        linear-gradient(var(--canvas-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--canvas-grid) 1px, transparent 1px);
    background-size: 32px 32px;
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
}

body.menu-open {
    overflow: hidden;
}

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

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
}

button,
select {
    cursor: pointer;
}

a {
    color: var(--brand);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--brand-strong);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--ink);
    font-weight: 600;
    line-height: 1.12;
}

h1 {
    font-size: clamp(2.25rem, 5vw, 4.75rem);
}

h2 {
    font-size: clamp(1.65rem, 3vw, 2.65rem);
}

h3 {
    font-size: 1.08rem;
}

:focus-visible {
    outline: 3px solid var(--gold-bright);
    outline-offset: 3px;
}

::selection {
    background: var(--gold-bright);
    color: #071321;
}

.skip-link {
    position: fixed;
    top: 0;
    left: 1rem;
    z-index: 5000;
    padding: 0.7rem 1rem;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    background: var(--gold-bright);
    color: #071321;
    font-weight: 600;
    text-decoration: none;
    transform: translateY(-120%);
    transition: transform 160ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

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

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.9rem;
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
}

.eyebrow::before {
    width: 1.75rem;
    height: 2px;
    background: currentColor;
    content: "";
}

.fa-icon {
    display: inline-flex;
    width: 1em;
    height: 1em;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.fa-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.header {
    position: sticky;
    top: 0;
    z-index: 2000;
    min-height: var(--header-height);
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    box-shadow: var(--shadow-low);
    backdrop-filter: blur(14px);
}

.header::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--gold-bright);
    content: "";
}

.header-content {
    width: min(100%, 1920px);
    min-height: var(--header-height);
    margin: 0 auto;
    padding: 0.55rem 1.25rem 0.55rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--ink);
    text-decoration: none;
}

.brand-logo {
    width: 172px;
    height: 52px;
    object-fit: contain;
}

.brand-mark {
    display: none;
    width: 46px;
    height: 46px;
}

.product-signature {
    min-width: 0;
    padding-left: 0.85rem;
    border-left: 1px solid var(--line);
    display: grid;
    gap: 0.05rem;
}

.product-name {
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 650;
    line-height: 1.1;
}

.product-caption {
    overflow: hidden;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.nav-link {
    min-height: 42px;
    padding: 0.65rem 0.75rem;
    border-bottom: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 550;
    text-decoration: none;
}

.nav-link:hover {
    border-bottom-color: var(--line-strong);
    color: var(--ink);
}

.nav-link.active,
.nav-link[aria-current="page"] {
    border-bottom-color: var(--gold);
    color: var(--ink);
}

.theme-toggle,
.menu-toggle {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-alt);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover,
.menu-toggle:hover {
    border-color: var(--line-strong);
    background: var(--surface-raised);
}

.theme-toggle__icon {
    width: 1rem;
    height: 1rem;
    color: var(--gold);
}

.theme-toggle__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
}

.menu-toggle__bar {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle.is-active .menu-toggle__bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle.is-active .menu-toggle__bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active .menu-toggle__bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.status-indicator {
    min-height: 42px;
    padding: 0 0.7rem;
    border-left: 1px solid var(--line);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 16%, transparent);
}

.cta-button,
.button {
    min-height: 42px;
    padding: 0.62rem 0.9rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-size: 0.84rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.cta-button,
.button-primary {
    background: var(--surface-inverse);
    color: var(--canvas);
}

[data-theme="dark"] .cta-button,
[data-theme="dark"] .button-primary {
    background: var(--gold-bright);
    color: #071321;
}

.cta-button:hover,
.button-primary:hover {
    background: var(--brand-strong);
    color: #ffffff;
    transform: translateY(-1px);
}

.button-secondary {
    border-color: var(--line-strong);
    background: transparent;
    color: var(--ink);
}

.button-secondary:hover {
    background: var(--surface-alt);
    color: var(--ink);
}

.about-footer {
    margin-top: 0;
    border-top: 4px solid var(--gold-bright);
    background: #071321;
    color: #e5ebef;
}

.footer-content {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 3rem 0 2.5rem;
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(170px, 1fr));
    gap: 3rem;
}

.footer-brand {
    width: min(250px, 100%);
    margin-bottom: 1.2rem;
}

.footer-section h2,
.footer-section h3 {
    margin-bottom: 1rem;
    color: #ffffff;
    font-size: 0.82rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
}

.footer-section p,
.footer-section a {
    color: #aab8c3;
    font-size: 0.9rem;
}

.footer-section a {
    width: fit-content;
    margin-bottom: 0.55rem;
    display: block;
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--gold-bright);
}

.footer-bottom {
    border-top: 1px solid #294156;
}

.footer-bottom p {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1rem 0;
    color: #8192a0;
    font-family: var(--font-mono);
    font-size: 0.7rem;
}

@media (max-width: 1180px) {
    .brand-logo {
        width: 145px;
    }

    .product-caption,
    .status-indicator {
        display: none;
    }
}

@media (max-width: 900px) {
    .header-content {
        min-height: 64px;
        padding: 0.45rem 0.75rem 0.45rem 1rem;
    }

    .brand-logo {
        display: none;
    }

    .brand-mark {
        display: block;
    }

    .product-signature {
        padding-left: 0.65rem;
    }

    .menu-toggle {
        margin-left: auto;
        display: inline-flex;
    }

    body.has-mobile-menu .header-nav {
        position: fixed;
        inset: 64px 0 auto;
        max-height: calc(100dvh - 64px);
        padding: 0.75rem;
        border-bottom: 1px solid var(--line);
        background: var(--surface);
        box-shadow: var(--shadow-high);
        display: grid;
        gap: 0.35rem;
        overflow-y: auto;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        visibility: hidden;
        transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
    }

    body.has-mobile-menu .header-nav.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
        visibility: visible;
    }

    .nav-link,
    .theme-toggle,
    .status-indicator,
    .cta-button {
        width: 100%;
        min-height: 48px;
        border: 1px solid var(--line);
        border-radius: var(--radius-md);
        justify-content: flex-start;
    }

    .nav-link {
        padding: 0.75rem 0.9rem;
    }

    .nav-link.active,
    .nav-link[aria-current="page"] {
        border-color: var(--gold);
        background: var(--gold-soft);
    }

    .theme-toggle {
        padding: 0 0.9rem;
        gap: 0.65rem;
    }

    .theme-toggle__label {
        position: static;
        width: auto;
        height: auto;
        clip: auto;
        overflow: visible;
    }

    .status-indicator {
        padding: 0 0.9rem;
        display: inline-flex;
        border-left: 1px solid var(--line);
    }

    .cta-button {
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-section:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .product-caption {
        display: none;
    }

    .product-name {
        font-size: 0.96rem;
    }

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

    .footer-section:first-child {
        grid-column: auto;
    }
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}