:root {
    color-scheme: light;
    --ink: #082f35;
    --muted: #567076;
    --green: #087f5b;
    --green-dark: #056247;
    --blue: #1559a8;
    --gold: #f4b400;
    --surface: #ffffff;
    --line: #d9e5e3;
    --page: #f3f8f7;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--page);
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
}

.site-header {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 10px clamp(20px, 5vw, 72px);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}

.brand img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.brand span {
    display: grid;
    line-height: 1.05;
}

.brand strong {
    font-size: 1.1rem;
}

.brand small {
    margin-top: 5px;
    color: var(--muted);
    font-weight: 700;
}

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

main {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.download-intro {
    min-height: calc(100vh - 236px);
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
    gap: clamp(36px, 7vw, 92px);
    align-items: center;
    padding: clamp(48px, 8vh, 92px) 0;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 900;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    max-width: 760px;
    margin-bottom: 10px;
    font-size: clamp(2.4rem, 6vw, 5.1rem);
    line-height: 0.98;
    letter-spacing: 0;
}

.tagline {
    margin-bottom: 22px;
    color: var(--green-dark);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 850;
}

.summary {
    max-width: 700px;
    margin-bottom: 30px;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.75;
}

.download-button {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    background: var(--green);
    border: 1px solid var(--green);
    border-radius: 7px;
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 900;
    text-decoration: none;
    transition: background 160ms ease, transform 160ms ease;
}

.download-button:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
}

.download-button.disabled {
    background: #7a8b8e;
    border-color: #7a8b8e;
    cursor: not-allowed;
}

.build-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 36px 0 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.build-facts div {
    min-width: 0;
    padding: 16px 14px 16px 0;
}

.build-facts dt {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.build-facts dd {
    margin: 7px 0 0;
    font-size: 0.9rem;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.phone-download {
    padding-left: clamp(0px, 2vw, 26px);
    border-left: 4px solid var(--gold);
}

.qr-frame {
    width: min(260px, 100%);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    padding: 20px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

#downloadQr,
#downloadQr img,
#downloadQr canvas {
    width: 100% !important;
    height: 100% !important;
}

.phone-download h2 {
    margin: 24px 0 8px;
    font-size: 1.35rem;
}

.phone-download p {
    max-width: 390px;
    margin-bottom: 14px;
    color: var(--muted);
    line-height: 1.55;
}

.phone-download code {
    display: block;
    max-width: 390px;
    padding: 10px 12px;
    background: #e5efed;
    border-radius: 6px;
    color: var(--ink);
    font-size: 0.76rem;
    overflow-wrap: anywhere;
}

.test-build-note,
.release-notes {
    max-width: 700px;
    margin: 0 0 22px;
    padding: 12px 14px;
    border-left: 4px solid var(--gold);
    background: #fff8e0;
    border-radius: 6px;
    line-height: 1.5;
}

.release-notes {
    margin-top: 22px;
    background: #e9f5f1;
    border-left-color: var(--green);
}

.verify-panel {
    margin: 32px 0;
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.verify-panel h2 {
    margin-bottom: 6px;
    font-size: 1.1rem;
}

.verify-panel p {
    color: var(--muted);
}

.verify-panel dl {
    display: grid;
    gap: 12px;
    margin: 0;
}

.verify-panel dt {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.verify-panel dd {
    margin: 4px 0 0;
}

.verify-panel code {
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}

footer a {
    color: var(--green-dark);
    font-weight: 700;
}

.install-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.install-strip div {
    min-width: 0;
    padding: 22px;
}

.install-strip div + div {
    border-left: 1px solid var(--line);
}

.install-strip strong,
.install-strip span {
    display: block;
}

.install-strip strong {
    margin-bottom: 7px;
    color: var(--blue);
}

.install-strip span {
    color: var(--muted);
    line-height: 1.45;
}

footer {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px clamp(20px, 5vw, 72px);
    color: var(--muted);
    font-size: 0.82rem;
}

@media (max-width: 850px) {
    .download-intro {
        grid-template-columns: 1fr;
        gap: 44px;
        padding: 46px 0;
    }

    .phone-download {
        padding: 28px 0 0;
        border-top: 4px solid var(--gold);
        border-left: 0;
    }

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

    .install-strip {
        grid-template-columns: 1fr;
    }

    .install-strip div + div {
        border-top: 1px solid var(--line);
        border-left: 0;
    }
}

@media (max-width: 520px) {
    .site-header {
        padding-inline: 18px;
    }

    .brand img {
        width: 46px;
        height: 46px;
    }

    .back-link {
        font-size: 0.82rem;
    }

    main {
        width: min(100% - 28px, 1180px);
    }

    h1 {
        font-size: 2.45rem;
    }

    .download-button {
        width: 100%;
    }

    .build-facts {
        grid-template-columns: 1fr 1fr;
    }

    footer {
        align-items: flex-start;
        flex-direction: column;
        padding-inline: 18px;
    }
}
