:root {
    --page-bg: #f7f9fc;
    --panel-bg: rgba(255, 255, 255, 0.92);
    --panel-strong: rgba(255, 255, 255, 0.96);
    --panel-border: rgba(90, 123, 160, 0.28);
    --text-main: #24384f;
    --text-muted: #4d6786;
    --accent: #c47b00;
    --accent-strong: #9d6100;
    --accent-soft: rgba(196, 123, 0, 0.12);
    --brand: #2f6fc8;
    --brand-strong: #214f97;
    --brand-soft: rgba(47, 111, 200, 0.12);
    --logo-color: #1f334b;
    --pill-border: rgba(77, 127, 196, 0.22);
    --pill-border-hover: rgba(77, 127, 196, 0.36);
    --pill-bg: rgba(218, 229, 245, 0.38);
    --pill-bg-hover: rgba(224, 235, 248, 0.72);
    --pill-text: #3e5877;
    --pill-text-hover: #24415f;
    --shadow: 0 20px 40px rgba(70, 98, 134, 0.14);
}

html.theme-dark {
    --page-bg: #1f2126;
    --panel-bg: rgba(43, 57, 82, 0.45);
    --panel-strong: rgba(43, 57, 82, 0.58);
    --panel-border: rgba(156, 186, 228, 0.35);
    --text-main: #d7e8ff;
    --text-muted: #bfd7f2;
    --accent: #f0a830;
    --accent-strong: #ffd27a;
    --accent-soft: rgba(240, 168, 48, 0.14);
    --brand: #67a5ff;
    --brand-strong: #8bbcff;
    --brand-soft: rgba(103, 165, 255, 0.16);
    --logo-color: #d7e8ff;
    --pill-border: rgba(77, 134, 213, 0.24);
    --pill-border-hover: rgba(111, 155, 221, 0.42);
    --pill-bg: rgba(40, 63, 98, 0.06);
    --pill-bg-hover: rgba(56, 86, 129, 0.12);
    --pill-text: #c8dbf1;
    --pill-text-hover: #eef6ff;
    --shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: "Segoe UI", "Helvetica Neue", sans-serif;
    color: var(--text-main);
    background: var(--page-bg);
}

body {
    position: relative;
    transition: background 0.2s ease, color 0.2s ease;
}

body::before,
body::after {
    display: none;
}

a {
    color: inherit;
}

.download-page {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 28px 0 56px;
}

.download-topbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
}

.download-topbar-actions {
    display: contents;
}

.download-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.download-brand-logo {
    display: block;
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    color: var(--logo-color);
    background-color: currentColor;
    -webkit-mask-image: url("../logo_bw.svg");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-image: url("../logo_bw.svg");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
}

.download-theme-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid var(--pill-border);
    border-radius: 999px;
    background: var(--pill-bg);
    color: var(--pill-text);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    transition: border-color 0.15s ease, transform 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.download-theme-switcher:hover {
    color: var(--pill-text-hover);
    border-color: var(--pill-border-hover);
    background: var(--pill-bg-hover);
    transform: translateY(-1px);
}

.download-theme-switcher span:first-child {
    width: 1rem;
    text-align: center;
    display: block;
}

.download-theme-switcher {
    justify-self: end;
}

.download-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.download-brand-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.download-brand-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.download-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    justify-self: center;
}

.download-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid var(--pill-border);
    background: var(--pill-bg);
    color: var(--pill-text);
    text-decoration: none;
    font-weight: 600;
    transition: border-color 0.15s ease, transform 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.download-nav a:hover,
.download-nav a.is-active {
    color: var(--pill-text-hover);
    border-color: var(--pill-border-hover);
    background: var(--pill-bg-hover);
    transform: translateY(-1px);
}

.download-nav svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.download-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: stretch;
    margin-bottom: 24px;
}

.download-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.download-hero-copy {
    padding: 34px 34px 32px;
}

.download-hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr);
    gap: 28px;
    align-items: center;
}

.download-hero-text {
    min-width: 0;
}

.download-hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

.download-cta-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.download-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.download-hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(1.65rem, 2.5vw, 2.4rem);
    line-height: 1.03;
    max-width: none;
}

.download-inline-platform-icon {
    display: inline-flex;
    width: 0.96em;
    height: 0.96em;
    margin: 0 0.08em 0 0.02em;
    vertical-align: -0.08em;
    color: var(--brand-strong);
}

.download-inline-platform-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.download-hero p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-muted);
    max-width: none;
}

.download-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
}

.download-secondary-link {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.4;
    color: var(--text-muted);
    text-align: right;
}

.download-availability-note {
    margin: -2px 0 0;
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--text-muted);
    text-align: right;
}

.download-secondary-link a {
    color: var(--brand-strong);
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.download-secondary-link a:hover {
    color: var(--brand);
}

.download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 18px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.download-button:hover {
    transform: translateY(-1px);
}

.download-button-primary {
    color: #fff;
    background: linear-gradient(180deg, var(--brand) 0%, var(--brand-strong) 100%);
    box-shadow: 0 16px 32px rgba(47, 111, 200, 0.24);
}

.microsoft-store-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 116px;
    height: 40px;
    padding: 5px 10px 5px 8px;
    border-radius: 2px;
    color: #fff;
    background: #050505;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(5, 5, 5, 0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.microsoft-store-badge:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(5, 5, 5, 0.24);
}

.microsoft-store-mark {
    display: grid;
    grid-template-columns: repeat(2, 10px);
    grid-template-rows: repeat(2, 10px);
    gap: 1px;
    flex: 0 0 auto;
}

.microsoft-store-mark span:nth-child(1) {
    background: #f35325;
}

.microsoft-store-mark span:nth-child(2) {
    background: #81bc06;
}

.microsoft-store-mark span:nth-child(3) {
    background: #05a6f0;
}

.microsoft-store-mark span:nth-child(4) {
    background: #ffba08;
}

.microsoft-store-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
    color: #fff;
    letter-spacing: 0.01em;
}

.microsoft-store-copy span {
    font-size: 0.58rem;
    font-weight: 700;
}

.microsoft-store-copy strong {
    font-size: 0.92rem;
    font-weight: 800;
}

.download-button-secondary {
    color: var(--brand-strong);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(47, 111, 200, 0.24);
}

.download-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.download-meta-card {
    padding: 14px 15px;
    border-radius: 18px;
    background: var(--panel-strong);
    border: 1px solid rgba(88, 132, 194, 0.18);
}

.download-meta-card dt {
    margin: 0 0 6px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
}

.download-meta-card dd {
    margin: 0;
    font-size: 0.96rem;
    color: var(--text-main);
    line-height: 1.45;
}

.download-hero-shot {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.download-shot-frame {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    min-height: 0;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(225, 236, 251, 0.96) 0%, rgba(203, 220, 245, 0.88) 100%);
    border: 1px solid rgba(88, 132, 194, 0.2);
}

.download-shot-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

html.theme-dark .download-shot-frame {
    background: linear-gradient(180deg, rgba(28, 45, 76, 0.96) 0%, rgba(17, 29, 51, 0.92) 100%);
}

.download-shot-note {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.download-section {
    padding: 26px 28px 28px;
}

.download-section h2 {
    margin: 0 0 16px;
    font-size: 1.45rem;
    line-height: 1.2;
}

.download-steps,
.download-requirements,
.download-notes {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-muted);
}

.download-steps li,
.download-requirements li,
.download-notes li {
    margin: 0 0 12px;
    line-height: 1.6;
}

.download-inline-code {
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.94em;
    padding: 0.14em 0.38em;
    border-radius: 8px;
    background: rgba(33, 52, 78, 0.06);
    color: var(--text-main);
}

.download-highlight {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.download-highlight article {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(88, 132, 194, 0.18);
    background: rgba(255, 255, 255, 0.7);
}

html.theme-dark .download-highlight article {
    background: rgba(17, 31, 55, 0.62);
}

.download-highlight h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: var(--accent-strong);
}

.download-highlight p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.download-footer {
    margin-top: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.download-footer a {
    color: var(--accent-strong);
    text-decoration: none;
    font-weight: 600;
}

.download-footer a:hover {
    text-decoration: underline;
}

.download-legal-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-muted);
    padding-top: 14px;
    padding-bottom: 20px;
}

.download-legal-footer a {
    color: var(--accent-strong);
    text-decoration: none;
}

.download-legal-footer a:hover {
    text-decoration: underline;
}

.download-legal-footer .legal-divider {
    display: inline-block;
    width: 1.2rem;
}

@media (max-width: 980px) {
    .download-hero-layout,
    .download-grid,
    .download-highlight {
        grid-template-columns: 1fr;
    }

    .download-hero-actions {
        align-items: flex-start;
        min-height: 0;
    }

    .download-cta-stack {
        align-items: flex-start;
    }

    .download-cta-row {
        margin-top: 10px;
    }

    .download-meta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .download-page {
        width: min(100vw, calc(100vw - 20px));
        padding-top: 18px;
        padding-bottom: 36px;
    }

    .download-topbar {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 18px;
    }

    .download-topbar-actions {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
        justify-content: flex-start;
    }

    .download-nav {
        justify-content: flex-start;
        justify-self: auto;
    }

    .download-hero-copy,
    .download-section {
        padding: 22px 20px 22px;
    }

    .download-hero h1 {
        font-size: clamp(1.55rem, 7vw, 2rem);
        max-width: none;
    }

    .download-shot-frame {
        aspect-ratio: 16 / 10;
    }

    .download-legal-footer {
        font-size: 0.84rem;
    }

    .download-legal-footer .legal-divider {
        width: 0.5rem;
    }
}
