:root {
    --page-bg: #f3f4f6;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-accent: #eff6ff;
    --text: #1f2937;
    --text-strong: #111827;
    --text-soft: #4b5563;
    --text-muted: #6b7280;
    --line: #e5e7eb;
    --line-strong: #d1d5db;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --blue-soft: #dbeafe;
    --red: #ef4444;
    --red-dark: #dc2626;
    --red-soft: #fef2f2;
    --violet: #6366f1;
    --hero-start: #3b82f6;
    --hero-middle: #ef4444;
    --hero-end: #6366f1;
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 20px 50px rgba(0, 0, 0, 0.18);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.14);
    --radius-xl: 24px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --site-width: 1100px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Roboto", sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--page-bg);
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    color: var(--blue-dark);
}

img {
    max-width: 100%;
    display: block;
}

code,
pre {
    font-family: Consolas, "Cascadia Code", "Courier New", monospace;
}

.site-shell {
    width: 100%;
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--surface);
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0;
}

.header-nav-cluster {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.25rem;
    flex: 1;
    min-width: 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: inherit;
    text-decoration: none;
}

.brand::before {
    content: "";
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background:
        linear-gradient(180deg, #ffffff 0 50%, #dc2626 50% 100%),
        linear-gradient(90deg, #1d4ed8 0 42%, transparent 42% 100%);
    box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.08);
}

.brand__eyebrow {
    display: block;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-soft);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand__title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-strong);
}

.top-nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.top-nav__link {
    color: var(--text-soft);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.top-nav__link:hover,
.top-nav__link:focus-visible,
.top-nav__link.is-active {
    color: var(--blue);
}

.header-cta-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.header-cta--primary {
    background-color: var(--blue);
    color: #ffffff;
    border-color: var(--blue);
}

.header-cta--primary:hover,
.header-cta--primary:focus-visible {
    background-color: var(--blue-dark);
    border-color: var(--blue-dark);
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.25);
}

.header-cta--secondary {
    background-color: var(--surface);
    color: var(--blue);
    border-color: var(--line-strong);
}

.header-cta--secondary:hover,
.header-cta--secondary:focus-visible {
    background-color: var(--surface-accent);
    border-color: #93c5fd;
    color: var(--blue-dark);
}

.page-shell {
    padding: 3rem 0;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 3.2rem 0 2.8rem;
    background: linear-gradient(135deg, var(--hero-start) 0%, var(--hero-middle) 50%, var(--hero-end) 100%);
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(239, 68, 68, 0.2) 0%, transparent 50%);
    animation: bgShift 30s ease infinite;
}

.page-hero__inner {
    padding-top: 3.2rem;
    padding-bottom: 2.8rem;
}

.page-hero__inner > * {
    position: relative;
    z-index: 1;
}

.page-content-shell {
    margin-top: 1.5rem;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
    align-items: center;
    font-size: 0.88rem;
    color: #dbeafe;
}

.breadcrumbs a {
    color: #f3f4f6;
}

.breadcrumbs__divider {
    color: rgba(255, 255, 255, 0.72);
}

.page-hero__meta {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.65rem;
    margin-top: 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fef2f2;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.page-hero h1 {
    margin: 0.9rem 0 0.55rem;
    color: #ffffff;
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    line-height: 1.12;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-hero__summary {
    max-width: 68ch;
    margin: 0;
    color: #f3f4f6;
    font-size: 1.02rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.page-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    list-style: none;
    padding: 0;
    margin: 1.2rem 0 0;
}

.page-hero__chips li {
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #f8fafc;
    font-size: 0.87rem;
    font-weight: 500;
}

.shot-panel,
.sidebar-card,
.article-card,
.redirect-shell .page-hero {
    background-color: var(--surface);
    border-radius: 0.9rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(229, 231, 235, 0.9);
}

.shot-panel {
    padding: 1.25rem 1.4rem;
}

.section-tag,
.sidebar-card h2 {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.65rem;
    border-radius: 999px;
    background: var(--surface-accent);
    color: var(--blue-dark);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.shot-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.shot-grid.is-single {
    grid-template-columns: minmax(0, 1fr);
}

.shot-grid.is-multi {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.shot-card {
    display: grid;
    gap: 0.8rem;
    margin: 0;
}

.shot-card img {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    background-color: #ffffff;
}

.shot-card figcaption {
    display: grid;
    gap: 0.28rem;
    color: var(--text-soft);
}

.shot-card strong {
    color: var(--text-strong);
    font-size: 0.98rem;
    font-weight: 600;
}

.shot-card small {
    color: var(--text-muted);
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(250px, 295px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
    margin-top: 1.5rem;
}

.content-layout--wide {
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
}

.sidebar {
    display: grid;
    gap: 1rem;
    position: sticky;
    top: 5.7rem;
}

.sidebar-card {
    padding: 1rem 1rem 1.1rem;
}

.sidebar-card h2 {
    margin: 0 0 0.8rem;
}

.sidebar-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.25rem;
}

.sidebar-card a {
    display: block;
    padding: 0.55rem 0.7rem;
    border-radius: 12px;
    color: var(--text-soft);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-card a:hover,
.sidebar-card a:focus-visible {
    background-color: var(--surface-accent);
    color: var(--blue-dark);
}

.sidebar-link.is-active {
    background-color: var(--surface-accent);
    color: var(--blue-dark);
    font-weight: 600;
}

.article-card {
    padding: 1.4rem 1.6rem;
    min-width: 0;
}

.article-card > :first-child {
    margin-top: 0;
}

.article-card h2 {
    margin-top: 2rem;
    margin-bottom: 0.55rem;
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--text-strong);
    scroll-margin-top: 6rem;
}

.article-card h3 {
    margin-top: 1.35rem;
    margin-bottom: 0.45rem;
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--text-strong);
}

.article-card p,
.article-card li {
    color: var(--text-soft);
}

.article-card ul,
.article-card ol {
    padding-left: 1.3rem;
}

.article-card li + li {
    margin-top: 0.32rem;
}

.article-card strong {
    color: var(--text-strong);
}

.article-card pre {
    padding: 1rem 1.1rem;
    overflow-x: auto;
    border-radius: var(--radius-md);
    background: #0f172a;
    color: #f8fafc;
}

.article-card code {
    padding: 0.12rem 0.38rem;
    border-radius: 8px;
    background: var(--red-soft);
    color: var(--red-dark);
}

.article-card pre code {
    padding: 0;
    background: transparent;
    color: inherit;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    margin: 1.1rem 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: var(--surface);
}

.table-scroll table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
}

.table-scroll th,
.table-scroll td {
    padding: 0.82rem 0.9rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
}

.table-scroll thead th {
    background: #f8fafc;
    color: var(--text-strong);
}

.article-card hr {
    border: 0;
    border-top: 1px solid var(--line-strong);
    margin: 2rem 0;
}

.site-footer {
    padding: 2rem 0 3rem;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.35rem;
    border-radius: 0.9rem;
    background-color: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.site-footer p {
    margin: 0;
    color: var(--text-soft);
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-footer__links a {
    color: var(--text-soft);
}

.site-footer__links a:hover {
    color: var(--blue);
}

.redirect-shell {
    padding: 3rem 0;
}

@media (max-width: 1040px) {
    .content-layout,
    .content-layout--wide {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        order: 2;
    }
}

@media (max-width: 720px) {
    .site-shell {
        padding: 0 1rem;
    }

    .site-header__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-nav-cluster {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.85rem;
    }

    .top-nav {
        gap: 1rem;
        justify-content: flex-start;
    }

    .header-cta-row {
        width: 100%;
    }

    .header-cta {
        flex: 1 1 auto;
    }

    .page-shell {
        padding-top: 1.5rem;
    }

    .page-hero {
        border-radius: 0;
    }

    .page-hero__inner {
        padding-top: 2.2rem;
        padding-bottom: 2rem;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    .table-scroll table {
        min-width: 420px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .page-hero,
    .shot-panel,
    .sidebar-card,
    .article-card {
        animation: rise-in 420ms ease-out both;
    }

    .shot-card:nth-child(2),
    .sidebar-card:nth-child(2) {
        animation-delay: 80ms;
    }

    .shot-card:nth-child(3),
    .sidebar-card:nth-child(3) {
        animation-delay: 140ms;
    }
}

@keyframes bgShift {
    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(20px, 20px);
    }
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}