:root {
    color-scheme: light;
    --bg: #f6f8fb;
    --bg-soft: #edf3f8;
    --panel: #ffffff;
    --text: #172033;
    --muted: #5f6d82;
    --line: #dbe3ee;
    --accent: #1f6feb;
    --accent-dark: #174ea6;
    --ok: #1f7a4d;
    --warning: #8a5a00;
    --shadow: 0 24px 80px rgba(23, 32, 51, 0.08);
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
}

code {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    padding: 3px 6px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #f3f6fa;
    font-size: 0.92em;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(246, 248, 251, 0.9);
    border-bottom: 1px solid rgba(219, 227, 238, 0.88);
    backdrop-filter: blur(14px);
}

.nav-shell,
.footer-shell,
.hero,
.section,
.page-hero {
    width: min(1120px, calc(100% - 36px));
    margin: 0 auto;
}

.nav-shell {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 26px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav-links a,
.nav-cta {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    color: var(--muted);
    border-radius: 7px;
    font-size: 0.95rem;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    color: var(--text);
    background: #e9eff7;
}

.nav-cta {
    color: #fff;
    background: var(--text);
}

.hero {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 72px);
    display: grid;
    align-items: end;
    overflow: hidden;
    padding: 64px max(18px, calc((100vw - 1120px) / 2)) 42px;
    background: #dfe8f2;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(246, 248, 251, 0.96) 0%, rgba(246, 248, 251, 0.82) 38%, rgba(246, 248, 251, 0.26) 72%, rgba(246, 248, 251, 0.14) 100%),
        linear-gradient(0deg, rgba(246, 248, 251, 0.96) 0%, rgba(246, 248, 251, 0.1) 32%),
        url("/static/img/archive-hero.png") center / cover no-repeat;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 1px;
    background: var(--line);
}

.hero-copy {
    position: relative;
    z-index: 1;
    max-width: 720px;
    padding: 70px 0 28px;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    overflow-wrap: break-word;
}

h1,
h2,
h3 {
    color: var(--text);
}

h1 {
    margin: 0;
    font-size: clamp(2.45rem, 6vw, 5.2rem);
    line-height: 1.02;
    letter-spacing: 0;
}

h2 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.18;
    letter-spacing: 0;
}

h3 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.25;
    letter-spacing: 0;
}

.lead {
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 1.22rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-weight: 750;
    text-decoration: none;
}

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

.button.primary:hover {
    background: var(--accent-dark);
}

.button.secondary {
    color: var(--text);
    background: #fff;
    border-color: var(--line);
}

.button.disabled {
    color: var(--muted);
    background: #eef2f6;
    border-color: var(--line);
    cursor: not-allowed;
}

.hero-workflow {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.workflow-step {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 2px 14px;
    padding: 18px;
    background: #f8fafc;
    border: 1px solid #e7edf5;
    border-radius: 7px;
}

.workflow-step span {
    grid-row: span 2;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--accent);
    border-radius: 50%;
    font-weight: 800;
}

.workflow-step p {
    margin: 4px 0 0;
    color: var(--muted);
}

.compact-step {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    box-shadow: 0 16px 44px rgba(23, 32, 51, 0.08);
}

.section {
    padding: 72px 0;
}

.muted-band {
    width: 100%;
    max-width: none;
    padding-left: max(18px, calc((100vw - 1120px) / 2));
    padding-right: max(18px, calc((100vw - 1120px) / 2));
    background: var(--bg-soft);
}

.section-head {
    max-width: 740px;
    margin-bottom: 28px;
}

.image-split {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 42px;
    align-items: center;
}

.section-visual {
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow);
}

.section-visual img,
.safety-visual-section img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section-visual img {
    aspect-ratio: 4 / 3;
}

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

.tag-grid,
.card-grid,
.notice-grid,
.update-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.tag-grid span,
.card,
.notice,
.update-card,
.download-box,
.timeline-entry {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(23, 32, 51, 0.05);
}

.tag-grid span {
    min-height: 62px;
    display: flex;
    align-items: center;
    padding: 0 18px;
    color: var(--text);
    font-weight: 700;
}

.card,
.notice,
.update-card {
    padding: 24px;
}

.card p,
.notice p,
.update-card p,
.wide-text,
.text-stack p,
.feature-row p,
.legal-text p {
    color: var(--muted);
}

.card p,
.notice p,
.update-card p {
    margin: 10px 0 0;
}

.update-card {
    border-top: 4px solid rgba(31, 111, 235, 0.75);
}

.build-notes .notice {
    background: #fbfdff;
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    gap: 42px;
    align-items: start;
}

.visual-copy {
    align-items: center;
}

.wide-visual {
    grid-column: 1 / -1;
}

.wide-visual img {
    aspect-ratio: 16 / 7;
}

.text-stack p {
    margin-top: 0;
    font-size: 1.08rem;
}

.text-link {
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
}

.wide-text {
    max-width: 800px;
    margin: 0;
    font-size: 1.1rem;
}

.page-hero {
    padding: 84px 0 34px;
}

.page-hero h1 {
    max-width: 840px;
    font-size: clamp(2.35rem, 5vw, 4.6rem);
}

.download-box {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: center;
    padding: 28px;
}

.download-box h2 {
    font-size: 1.2rem;
}

.version {
    margin: 10px 0;
    font-size: 2.2rem;
    font-weight: 850;
}

.muted {
    color: var(--muted);
}

.compact {
    padding-top: 28px;
}

.compact h2 {
    margin-bottom: 18px;
}

.feature-list,
.timeline {
    display: grid;
    gap: 14px;
}

.feature-row {
    display: grid;
    grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
    gap: 28px;
    padding: 24px 0;
    border-top: 1px solid var(--line);
}

.feature-row h2 {
    font-size: 1.35rem;
}

.feature-row p {
    margin: 0;
}

.safety-grid .card h2 {
    font-size: 1.2rem;
}

.safety-visual-section {
    padding-top: 22px;
    padding-bottom: 10px;
}

.safety-visual-section img {
    aspect-ratio: 16 / 6;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.timeline-entry {
    display: grid;
    grid-template-columns: minmax(180px, 0.3fr) minmax(0, 1fr);
    gap: 24px;
    padding: 22px;
}

.timeline-entry strong,
.timeline-entry span {
    display: block;
}

.timeline-entry span {
    margin-top: 4px;
    color: var(--muted);
}

.timeline-entry ul {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
}

.legal-text {
    max-width: 780px;
}

.legal-text h2 {
    margin-top: 28px;
    font-size: 1.4rem;
}

.legal-text h2:first-child {
    margin-top: 0;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #fff;
}

.footer-shell {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: var(--muted);
}

.footer-shell div {
    display: flex;
    gap: 18px;
}

.footer-shell a {
    color: var(--muted);
    text-decoration: none;
}

@media (max-width: 860px) {
    .nav-shell {
        min-height: auto;
        flex-wrap: wrap;
        padding: 14px 0;
        gap: 10px;
    }

    .brand {
        width: 100%;
    }

    .nav-links {
        order: 2;
        width: 100%;
        overflow-x: auto;
        margin-left: 0;
        padding-bottom: 2px;
    }

    .nav-cta {
        margin-left: auto;
    }

    .hero {
        min-height: auto;
        grid-template-columns: 1fr;
        padding: 54px max(18px, calc((100vw - 1120px) / 2)) 32px;
    }

    .hero::before {
        background:
            linear-gradient(180deg, rgba(246, 248, 251, 0.96) 0%, rgba(246, 248, 251, 0.88) 52%, rgba(246, 248, 251, 0.98) 100%),
            url("/static/img/archive-hero.png") center / cover no-repeat;
    }

    .hero-copy {
        padding-top: 160px;
    }

    .hero-workflow {
        grid-template-columns: 1fr;
    }

    .tag-grid,
    .card-grid,
    .notice-grid,
    .update-grid,
    .split,
    .image-split,
    .timeline-entry,
    .feature-row {
        grid-template-columns: 1fr;
    }

    .download-box {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .nav-shell,
    .footer-shell,
    .hero,
    .section,
    .page-hero {
        width: min(100% - 28px, 1120px);
    }

    .hero-actions,
    .button,
    .download-action {
        width: 100%;
    }

    .hero-copy {
        padding-top: 120px;
    }

    .compact-tags {
        grid-template-columns: 1fr;
    }

    .wide-visual img,
    .safety-visual-section img {
        aspect-ratio: 4 / 3;
    }

    .footer-shell {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px 0;
    }
}
