:root {
    --paper: #f8f1df;
    --paper-soft: #fff9eb;
    --ink: #201a13;
    --muted: #6d5f4d;
    --blue: #1f3b91;
    --seal: #b83a2f;
    --line: rgba(83, 65, 39, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    color: var(--ink);
    background: var(--paper);
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

body {
    min-width: 0;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 14% 0, rgba(184, 58, 47, 0.12), transparent 28rem),
        radial-gradient(circle at 94% 18%, rgba(31, 59, 145, 0.13), transparent 26rem),
        linear-gradient(180deg, #fff9eb, #f5e8ca);
}

a {
    color: inherit;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.site-header,
main,
footer {
    width: min(980px, calc(100% - 40px));
    margin-inline: auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 0;
}

.brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand img {
    flex: 0 0 auto;
    border-radius: 12px;
    box-shadow: 0 12px 22px -16px #000;
}

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

.brand small,
.manual-note {
    color: var(--muted);
}

.home-link {
    flex: 0 0 auto;
    color: var(--blue);
    font-weight: 800;
    text-underline-offset: 4px;
}

main {
    display: grid;
    gap: 24px;
    padding: clamp(34px, 8vw, 74px) 0 80px;
}

.intro {
    max-width: 790px;
    padding-bottom: clamp(16px, 3vw, 30px);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--seal);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

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

h1 {
    max-width: 13ch;
    margin-bottom: 22px;
    font-size: clamp(2.7rem, 8vw, 5rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

h2 {
    margin-bottom: 12px;
    font-size: clamp(1.45rem, 4vw, 2.2rem);
    line-height: 1.2;
}

.lede {
    max-width: 62ch;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 1.07rem;
}

.channel-section,
.apk-card {
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: 0 28px 74px -60px rgba(32, 26, 19, 0.9);
}

.channel-section,
.apk-card {
    padding: clamp(24px, 6vw, 48px);
    background: rgba(255, 249, 235, 0.82);
}

.section-heading {
    margin-bottom: 24px;
}

.channel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.channel-card {
    display: grid;
    min-width: 0;
    min-height: 122px;
    align-content: center;
    gap: 3px;
    padding: 18px 20px;
    border: 1px solid rgba(31, 59, 145, 0.14);
    border-radius: 18px;
    color: var(--ink);
    background: rgba(31, 59, 145, 0.055);
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.channel-card.wide {
    grid-column: 1 / -1;
}

.channel-card:hover,
.channel-card:focus-visible {
    border-color: rgba(31, 59, 145, 0.38);
    background: rgba(31, 59, 145, 0.1);
    box-shadow: 0 18px 34px -28px rgba(31, 59, 145, 0.8);
    transform: translateY(-2px);
}

.channel-platform {
    color: var(--seal);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.09em;
}

.channel-card strong {
    font-size: 1.08rem;
}

.channel-card-disabled strong {
    text-decoration: line-through;
    text-decoration-thickness: 2px;
}

.channel-card-disabled {
    border-style: dashed;
    background: rgba(31, 59, 145, 0.025);
}

.channel-card small {
    color: var(--muted);
}

.apk-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.arch-badge {
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid rgba(31, 59, 145, 0.18);
    border-radius: 999px;
    color: var(--blue);
    background: rgba(31, 59, 145, 0.08);
    font-size: 0.8rem;
    font-weight: 900;
}

.apk-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 24px 0 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--line);
}

.apk-facts div {
    min-width: 0;
    padding: 13px 15px;
    background: var(--paper-soft);
}

.apk-facts dt,
.digest span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.apk-facts dd {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
    font-weight: 800;
}

.digest {
    min-width: 0;
    padding: 13px 15px;
    border-left: 3px solid var(--blue);
    background: rgba(31, 59, 145, 0.06);
}

.digest span,
.digest code {
    display: block;
}

.digest code {
    margin-top: 3px;
    overflow-wrap: anywhere;
    font-size: 0.82rem;
}

.apk-button {
    display: flex;
    min-height: 70px;
    flex-direction: column;
    justify-content: center;
    margin-top: 22px;
    padding: 12px 20px;
    border-radius: 16px;
    color: #fff;
    background: var(--blue);
    box-shadow: 0 20px 38px -26px rgba(31, 59, 145, 0.9);
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.apk-button span {
    font-size: 0.74rem;
    opacity: 0.74;
}

.apk-button:hover,
.apk-button:focus-visible {
    box-shadow: 0 24px 44px -26px rgba(31, 59, 145, 0.95);
    transform: translateY(-2px);
}

.manual-note {
    margin: 12px 0 0;
    font-size: 0.88rem;
}

:focus-visible {
    outline: 3px solid rgba(31, 59, 145, 0.46);
    outline-offset: 4px;
}

footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 0 48px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

footer p {
    margin: 0;
}

footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

@media (max-width: 680px) {
    .site-header,
    main,
    footer {
        width: calc(100% - 24px);
    }

    .brand small {
        display: none;
    }

    main {
        padding-top: 28px;
    }

    .channel-grid,
    .apk-facts {
        grid-template-columns: 1fr;
    }

    .channel-card.wide {
        grid-column: auto;
    }

    .apk-heading,
    footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .apk-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
