:root {
    color-scheme: light dark;
    --background: #f7f8f9;
    --surface: #ffffff;
    --surface-muted: #edf2f7;
    --text: #17202a;
    --text-muted: #5f6f80;
    --line: #d9e1ea;
    --accent: #1d74d8;
    --accent-strong: #0f4f99;
    --dark: #08101a;
    --dark-muted: #a8b6c4;
    --shadow: 0 18px 45px rgba(24, 39, 55, 0.08);
    --content-width: 1120px;
}

* {
    box-sizing: border-box;
}

:focus-visible {
    outline: 3px solid var(--accent-strong);
    outline-offset: 4px;
}

.site-footer :focus-visible,
.hero :focus-visible {
    outline-color: white;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 1rem;
    z-index: 1100;
    padding: 0.75rem 1rem;
    background: var(--surface);
    color: var(--text);
    transform: translateY(-200%);
}

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

#main-content,
[id] {
    scroll-margin-top: 100px;
}

.primary-nav,
.site-footer nav,
.card-meta,
.article-meta {
    flex-wrap: wrap;
}

.primary-nav a,
.site-footer nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.primary-nav a.active {
    color: var(--accent-strong);
    text-decoration: underline;
    text-underline-offset: 0.4em;
    text-decoration-thickness: 2px;
}

.article-body a {
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.content-card,
.section-header > *,
.article-meta > *,
.site-footer > * {
    min-width: 0;
    overflow-wrap: anywhere;
}

.article-body img {
    max-width: 100%;
    height: auto;
}

.article-body pre {
    max-width: 100%;
    overflow-x: auto;
    padding: 1rem;
    background: var(--surface-muted);
}

.article-body table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

#blazor-error-ui .dismiss {
    min-width: 44px;
    min-height: 44px;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    font: inherit;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

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

h1,
h2,
h3 {
    margin: 0;
    color: var(--text);
    font-weight: 720;
    letter-spacing: 0;
    line-height: 1.05;
}

h1 {
    max-width: 840px;
    font-size: 4.5rem;
    overflow-wrap: anywhere;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.32rem;
}

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

.site-frame {
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    min-height: 76px;
    padding: 0 5vw;
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    backdrop-filter: blur(18px);
}

.brand,
.primary-nav,
.site-footer nav {
    display: flex;
    align-items: center;
}

.brand {
    gap: 0.7rem;
    color: var(--text);
    font-weight: 700;
    white-space: nowrap;
}

.brand-mark {
    display: block;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.primary-nav,
.site-footer nav {
    gap: 1.1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.hero {
    position: relative;
    display: grid;
    align-items: end;
    min-height: min(780px, calc(100svh - 120px));
    padding: 12vh 5vw 10vh;
    overflow: hidden;
    background: linear-gradient(90deg, rgba(5, 10, 17, 0.96), rgba(5, 10, 17, 0.78) 43%, rgba(5, 10, 17, 0.18)), url("/images/no-heroes.png") center / cover no-repeat;
}

.hero::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 28%;
    content: "";
    background: linear-gradient(180deg, transparent, rgba(5, 10, 17, 0.72));
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: var(--content-width);
}

.hero h1,
.hero .eyebrow {
    color: white;
}

.hero-copy {
    max-width: 720px;
    margin-top: 1.6rem;
    color: #d7e0ea;
    font-size: 1.25rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 2.1rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 1rem;
    border: 1px solid transparent;
    border-radius: 6px;
    font-weight: 700;
}

.button.primary {
    background: var(--accent);
    color: white;
}

.button.secondary {
    border-color: rgba(255, 255, 255, 0.34);
    color: white;
}

.section {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 5.5rem 5vw;
}

.intro-band,
.split-band {
    max-width: none;
    padding-right: max(5vw, calc((100vw - var(--content-width)) / 2 + 5vw));
    padding-left: max(5vw, calc((100vw - var(--content-width)) / 2 + 5vw));
}

.intro-band {
    background: var(--surface);
}

.split-band {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
    gap: 3rem;
    background: var(--surface-muted);
}

.section-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1.2fr);
    gap: 3rem;
    align-items: start;
    max-width: var(--content-width);
    margin: 0 auto;
}

.section-grid > p,
.split-band > div > p {
    font-size: 1.16rem;
}

.section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.section-header p {
    max-width: 620px;
    margin-top: 0.8rem;
}

.eyebrow {
    margin-bottom: 0.7rem;
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.text-link {
    color: var(--accent-strong);
    font-weight: 700;
    white-space: nowrap;
}

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

.content-card {
    display: flex;
    flex-direction: column;
    min-height: 270px;
    padding: 1.35rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.content-card h2,
.content-card h3 {
    margin-top: 1rem;
    font-size: 1.32rem;
    line-height: 1.3;
}

.content-card p {
    margin-top: 0.8rem;
}

.card-submeta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.card-submeta a,
.article-meta a {
    color: var(--accent-strong);
}

.card-meta,
.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin-left: 0.45rem;
    padding: 0.08rem 0.45rem;
    border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
    border-radius: 999px;
    color: var(--accent-strong);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.draft-notice {
    display: inline-flex;
    margin-bottom: 1rem;
    padding: 0.55rem 0.75rem;
    background: color-mix(in srgb, var(--accent) 9%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
    border-radius: 6px;
    color: var(--accent-strong);
    font-size: 0.94rem;
    font-weight: 700;
}

.tag-row,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.tag-row {
    margin-top: auto;
    padding-top: 1.2rem;
}

.tag-row a,
.tag-row span,
.tag-cloud a,
.series-row a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0.25rem 0.65rem;
    border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
    border-radius: 999px;
    color: var(--accent-strong);
    font-size: 0.86rem;
    font-weight: 700;
}

.section-note {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.5rem;
    padding: 0.9rem 1rem;
    background: color-mix(in srgb, var(--accent) 7%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
    border-radius: 8px;
}

.section-note strong {
    color: var(--text);
}

.section-note span,
.section-note a {
    color: var(--text-muted);
}

.section-note a {
    font-weight: 800;
}

.series-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1.5rem;
}

.series-row.expanded {
    margin-bottom: 0;
}

.featured-card {
    display: grid;
    gap: 1rem;
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.featured-card h2 {
    max-width: 820px;
}

.featured-card p:not(.eyebrow) {
    max-width: 720px;
    font-size: 1.1rem;
}

.path-list,
.stack-list {
    display: grid;
    gap: 0.8rem;
}

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

.path-list a,
.stack-list > div {
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.path-list small {
    color: var(--accent-strong);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.path-list span,
.stack-list h3 {
    color: var(--text);
    font-weight: 800;
}

.stack-list p {
    margin-top: 0.25rem;
}

.link-list {
    display: grid;
    gap: 0.8rem;
}

.link-list a {
    display: grid;
    gap: 0.25rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.link-list span {
    color: var(--text);
    font-weight: 800;
}

.link-list small {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.page-hero {
    padding-top: 7rem;
    padding-bottom: 2.5rem;
}

.page-hero h1 {
    font-size: 3.5rem;
}

.page-hero p:not(.eyebrow) {
    max-width: 740px;
    margin-top: 1rem;
    font-size: 1.16rem;
}

.article-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 7rem 5vw 6rem;
}

.article-header {
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--line);
}

.article-header h1 {
    font-size: 3.5rem;
}

.article-header > p:not(.eyebrow) {
    margin-top: 1rem;
    font-size: 1.16rem;
}

.article-meta {
    justify-content: start;
    margin-top: 1.35rem;
}

.article-body {
    max-width: 760px;
    margin: 2.5rem auto 0;
}

.article-body.standalone {
    margin-top: 0;
}

.article-body p,
.article-body li {
    color: var(--text);
    font-size: 1.08rem;
}

.article-body p + p,
.article-body p + h2,
.article-body ul + h2 {
    margin-top: 1.25rem;
}

.article-body h2 {
    margin-top: 2.2rem;
    font-size: 2rem;
}

.article-body a {
    color: var(--accent-strong);
    font-weight: 700;
}

.article-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 3rem;
}

.article-nav a {
    display: grid;
    gap: 0.35rem;
    min-height: 96px;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.article-nav small {
    color: var(--accent-strong);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.article-nav span {
    color: var(--text);
    font-weight: 800;
}

.related-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--line);
}

.card-grid.compact .content-card {
    min-height: 220px;
}

.narrow-page {
    max-width: 760px;
    padding-top: 7rem;
}

.narrow-page p {
    margin-top: 1rem;
}

.narrow-page .button {
    margin-top: 1.5rem;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem 5vw;
    background: var(--dark);
    color: white;
}

.site-footer p {
    max-width: 680px;
    color: var(--dark-muted);
}

.site-footer a {
    color: white;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1000;
    padding: 0.8rem 1rem;
    background: #8a1f2d;
    color: white;
    border-radius: 6px;
}

#blazor-error-ui .dismiss {
    margin-left: 1rem;
    cursor: pointer;
}

h1:focus {
    outline: none;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #0c1117;
        --surface: #111923;
        --surface-muted: #151f2a;
        --text: #edf4fb;
        --text-muted: #a7b4c2;
        --line: #253343;
        --accent: #58a6ff;
        --accent-strong: #8ec4ff;
        --shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
    }

    .button.primary {
        color: #06111f;
    }
}

@media (max-width: 860px) {
    .site-header {
        position: static;
        align-items: flex-start;
        flex-direction: column;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .primary-nav {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.1rem;
    }

    .hero {
        min-height: 560px;
        padding-top: 7rem;
    }

    .section,
    .intro-band,
    .split-band {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .section-grid,
    .split-band,
    .section-header {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: start;
        gap: 1.5rem;
    }

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

    .path-list,
    .article-nav {
        grid-template-columns: 1fr;
    }

    .content-card {
        min-height: auto;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

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

    .page-hero h1,
    .article-header h1 {
        font-size: 2.4rem;
    }

    h2 {
        font-size: 2rem;
    }
    h1 {
        font-size: 2.65rem;
    }

    .brand {
        white-space: normal;
    }

    .hero {
        min-height: 480px;
        background-position: 58% center;
    }

    .button {
        width: 100%;
    }

    .article-page,
    .page-hero,
    .narrow-page {
        padding-top: 4.5rem;
    }
}

@media (min-width: 1920px) {
    :root {
        font-size: 20px;
        --content-width: 1440px;
    }

    .site-header {
        padding-inline: max(5vw, calc((100vw - 1600px) / 2));
    }

    .hero {
        padding-inline: max(5vw, calc((100vw - 1440px) / 2));
    }
}

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