@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
    color-scheme: light;
    --bg: #f4f4f4;
    --bg-elevated: #ffffff;
    --bg-soft: #f8f8f8;
    --surface-hover: #edf5ff;
    --border: #d9d9d9;
    --text: #161616;
    --text-muted: #525252;
    --accent: #0f62fe;
    --accent-strong: #0043ce;
    --accent-soft: #d0e2ff;
    --success: #198038;
    --danger: #da1e28;
    --hero-glow: radial-gradient(circle at 18% 10%, #dce7ff 0%, transparent 45%),
        radial-gradient(circle at 90% 0%, #d5ddff 0%, transparent 40%);
    --shadow: 0 20px 42px rgba(22, 22, 22, 0.08);
    --shadow-soft: 0 10px 20px rgba(22, 22, 22, 0.06);
    --radius: 0;
    --layout-max: 1200px;
    --transition: 180ms ease;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg: #161616;
        --bg-elevated: #262626;
        --bg-soft: #1f1f1f;
        --surface-hover: #393939;
        --border: #525252;
        --text: #f4f4f4;
        --text-muted: #c6c6c6;
        --accent: #78a9ff;
        --accent-strong: #a6c8ff;
        --accent-soft: #003a6d;
        --success: #42be65;
        --danger: #ff8389;
        --hero-glow: radial-gradient(circle at 18% 10%, #003a6d 0%, transparent 45%),
            radial-gradient(circle at 90% 0%, #0043ce 0%, transparent 40%);
        --shadow: 0 24px 44px rgba(0, 0, 0, 0.38);
        --shadow-soft: 0 12px 24px rgba(0, 0, 0, 0.32);
    }
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f4f4f4;
    --bg-elevated: #ffffff;
    --bg-soft: #f8f8f8;
    --surface-hover: #edf5ff;
    --border: #d9d9d9;
    --text: #161616;
    --text-muted: #525252;
    --accent: #0f62fe;
    --accent-strong: #0043ce;
    --accent-soft: #d0e2ff;
    --success: #198038;
    --danger: #da1e28;
    --hero-glow: radial-gradient(circle at 18% 10%, #dce7ff 0%, transparent 45%),
        radial-gradient(circle at 90% 0%, #d5ddff 0%, transparent 40%);
    --shadow: 0 20px 42px rgba(22, 22, 22, 0.08);
    --shadow-soft: 0 10px 20px rgba(22, 22, 22, 0.06);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #161616;
    --bg-elevated: #262626;
    --bg-soft: #1f1f1f;
    --surface-hover: #393939;
    --border: #525252;
    --text: #f4f4f4;
    --text-muted: #c6c6c6;
    --accent: #78a9ff;
    --accent-strong: #a6c8ff;
    --accent-soft: #003a6d;
    --success: #42be65;
    --danger: #ff8389;
    --hero-glow: radial-gradient(circle at 18% 10%, #003a6d 0%, transparent 45%),
        radial-gradient(circle at 90% 0%, #0043ce 0%, transparent 40%);
    --shadow: 0 24px 44px rgba(0, 0, 0, 0.38);
    --shadow-soft: 0 12px 24px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
}

a {
    color: var(--accent);
}

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

.site-bg {
    min-height: 100vh;
    background-image: var(--hero-glow);
    background-repeat: no-repeat;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(7px);
}

.header-inner {
    max-width: var(--layout-max);
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    font-weight: 600;
}

.brand img {
    width: 16rem;
}

.nav-toggle {
    margin-left: auto;
    display: none;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font: inherit;
    padding: 0.6rem 0.9rem;
    cursor: pointer;
}

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

.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    padding: 0;
    margin: 0;
}

.nav-menu a {
    display: inline-flex;
    align-items: center;
    padding: 0.48rem 0.65rem;
    text-decoration: none;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--text);
    border-color: var(--accent);
    background: var(--surface-hover);
}

.main {
    max-width: var(--layout-max);
    margin: 0 auto;
    padding: 1.15rem 1rem 3rem;
}

.hero {
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 2rem;
    padding: clamp(1.3rem, 3vw, 2.5rem);
}

.hero h1 {
    margin: 0 0 1rem;
    font-size: clamp(1.95rem, 4.4vw, 3.2rem);
    line-height: 1.06;
}

.hero p {
    margin: 0;
    color: var(--text-muted);
    max-width: 64ch;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
}

.hero-mark {
    display: inline-block;
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 0.86rem;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: var(--accent-strong);
    margin-bottom: 0.8rem;
}

.hero-side {
    border-left: 2px solid var(--accent);
    padding-left: 1rem;
}

.hero-side h2 {
    margin-top: 0;
    font-size: 1.2rem;
}

.hero-side ul {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text-muted);
}

.hero-side li {
    margin-bottom: 0.6rem;
}

.actions-row {
    margin-top: 1.3rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text);
    font-weight: 600;
    padding: 0.66rem 1rem;
    transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.btn:hover {
    transform: translateY(-1px);
    background: var(--surface-hover);
    color: var(--text);
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
    color: #ffffff;
}

.chips {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text-muted);
    padding: 0.25rem 0.55rem;
    font-size: 0.86rem;
    font-family: "IBM Plex Mono", Consolas, monospace;
}

.section {
    margin-top: 2rem;
}

.section h2 {
    margin: 0 0 0.65rem;
    font-size: clamp(1.4rem, 3.2vw, 2rem);
}

.section p.lead {
    margin: 0;
    color: var(--text-muted);
    max-width: 78ch;
}

.stats {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.stat {
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    padding: 1rem;
}

.stat-number {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    margin-top: 0.45rem;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.grid-2,
.grid-3,
.grid-4 {
    margin-top: 1rem;
    display: grid;
    gap: 0.75rem;
}

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

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

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

.card {
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    padding: 1rem;
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition), border-color var(--transition);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 0.45rem;
    font-size: 1.04rem;
}

.card p {
    margin: 0;
    color: var(--text-muted);
}

.card:hover {
    transform: translateY(-1px);
    border-color: var(--accent);
}

.timeline {
    margin-top: 1rem;
    border-left: 2px solid var(--border);
    padding-left: 1rem;
}

.timeline-step {
    position: relative;
    margin-bottom: 1rem;
    padding-left: 0.35rem;
}

.timeline-step::before {
    content: "";
    width: 0.62rem;
    height: 0.62rem;
    background: var(--accent);
    position: absolute;
    left: -1.39rem;
    top: 0.35rem;
}

.timeline-step h3 {
    margin: 0 0 0.3rem;
}

.timeline-step p {
    margin: 0;
    color: var(--text-muted);
}

.table-wrap {
    margin-top: 1rem;
    border: 1px solid var(--border);
    overflow-x: auto;
    background: var(--bg-elevated);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

th,
td {
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    padding: 0.75rem;
    font-size: 0.95rem;
}

th {
    background: var(--bg-soft);
    font-weight: 600;
}

tbody tr:hover {
    background: var(--surface-hover);
}

.code {
    margin-top: 1rem;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    padding: 0.9rem;
    overflow-x: auto;
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 0.87rem;
    line-height: 1.5;
}

.banner {
    margin-top: 1rem;
    border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
    background: color-mix(in srgb, var(--accent) 11%, var(--bg-elevated));
    padding: 0.9rem 1rem;
    color: var(--text);
}

.banner strong {
    color: var(--accent-strong);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--border);
    font-size: 0.82rem;
    font-family: "IBM Plex Mono", Consolas, monospace;
    padding: 0.22rem 0.5rem;
    background: var(--bg-soft);
}

.ok {
    color: var(--success);
}

.warn {
    color: var(--danger);
}

.footer {
    max-width: var(--layout-max);
    margin: 2rem auto 0;
    padding: 1rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.5fr auto;
    gap: 1rem;
    align-items: start;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-brand-logo {
    width: min(100px, 100%);
    height: auto;
    object-fit: contain;
}

.footer-brand p {
    margin: 0;
}

.footer-nav-title {
    margin: 0;
    color: var(--text);
    font-size: 0.95rem;
}

.footer-links {
    margin-top: 0.55rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.footer-theme {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 170px;
}

.footer-theme label {
    color: var(--text);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-family: "IBM Plex Mono", Consolas, monospace;
}

.theme-select {
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font: inherit;
    padding: 0.42rem 0.48rem;
}

.footer-actions {
    margin-top: 0.6rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer .btn {
    padding: 0.45rem 0.75rem;
    font-size: 0.82rem;
}

.footer-meta {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
}

.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 450ms ease, transform 450ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

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

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

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

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

@media (max-width: 800px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-shell {
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
    }

    .nav-shell.open {
        display: flex;
    }

    .nav-menu {
        width: 100%;
        flex-direction: column;
    }

    .nav-menu a {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }

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

    .footer-theme {
        min-width: 0;
    }

    .theme-select {
        width: 100%;
    }

    .stats,
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .actions-row {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }
}