:root {
    color-scheme: dark;
    --background: #161a20;
    --surface: #222831;
    --surface-raised: #34383e;
    --surface-deep: #15181c;
    --terminal: #0b0d10;
    --caption: #050607;
    --menu: #24272b;
    --border: #464b52;
    --border-soft: #383c42;
    --text: #eceef1;
    --muted: #abb1b9;
    --faint: #7d858f;
    --cyan: #5ac8fa;
    --green: #34d17b;
    --amber: #d7a23a;
    --blue: #4f6df5;
    --android: #3ddc84;
    --danger: #ed5f63;
    --section-width: 1160px;
    --mono: Consolas, "Cascadia Mono", "Lucida Console", monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-color: #626873 var(--surface-deep);
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--background);
    color: var(--text);
    font-family: var(--mono);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

button {
    font: inherit;
}

::selection {
    background: #325f75;
    color: #fff;
}

.section-width {
    width: min(calc(100% - 48px), var(--section-width));
    margin-inline: auto;
}

.app-shell {
    position: sticky;
    z-index: 20;
    top: 0;
    border-bottom: 1px solid #101215;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .26);
}

.window-caption {
    display: flex;
    height: 30px;
    align-items: center;
    justify-content: space-between;
    background: var(--caption);
    font-size: 12px;
    user-select: none;
}

.caption-brand {
    display: inline-flex;
    min-width: 0;
    height: 100%;
    align-items: center;
    gap: 9px;
    padding-inline: 10px;
    color: #f4f4f4;
    text-decoration: none;
}

.caption-brand > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-icon {
    display: inline-grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border: 1px solid #767676;
    background: #111;
    color: #fff;
    font-size: 7px;
    font-weight: 700;
    line-height: 1;
}

.window-controls {
    display: flex;
    height: 100%;
}

.window-controls i {
    display: grid;
    width: 45px;
    place-items: center;
    color: #d8d8d8;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-style: normal;
}

.window-controls i:last-child {
    color: #efefef;
}

.menu-bar {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 max(16px, calc((100% - var(--section-width)) / 2));
    background: var(--menu);
    border-top: 1px solid #303338;
}

.menu-bar nav {
    display: flex;
    min-width: 0;
    align-items: stretch;
    gap: 2px;
}

.menu-bar a {
    display: inline-flex;
    min-height: 41px;
    align-items: center;
    padding-inline: 13px;
    color: #e3e5e8;
    font-size: 13px;
    text-decoration: none;
}

.menu-bar a:hover,
.menu-bar a:focus-visible {
    background: #393d43;
    color: #fff;
}

.connection-state {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.connection-state i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(52, 209, 123, .12);
}

main {
    overflow: hidden;
}

section[id] {
    scroll-margin-top: 92px;
}

.hero {
    display: grid;
    min-height: 560px;
    grid-template-columns: minmax(0, 1.18fr) minmax(330px, .82fr);
    align-items: center;
    gap: clamp(38px, 8vw, 104px);
    padding-block: 78px;
}

.terminal-label {
    margin: 0 0 12px;
    color: var(--cyan);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
}

.hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(44px, 7vw, 76px);
    line-height: 1;
    letter-spacing: -.06em;
}

.hero-summary {
    max-width: 700px;
    margin: 24px 0 0;
    color: #c9cdd3;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.75;
}

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

.button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 10px 19px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.button-primary {
    background: var(--blue);
    border-color: #6b75f5;
    color: #fff;
}

.button-primary:hover,
.button-primary:focus-visible {
    background: #6974fa;
}

.button-secondary {
    background: #30343a;
    border-color: #565c65;
    color: #f2f3f5;
}

.button-secondary:hover,
.button-secondary:focus-visible {
    background: #3b4047;
}

.button-chat {
    background: #12374a;
    border-color: #4dbbe8;
    color: #e9f8ff;
    box-shadow: inset 0 0 0 1px rgba(90, 200, 250, .08);
}

.button-chat:hover,
.button-chat:focus-visible {
    background: #194c65;
    border-color: #78d5fc;
}

.button-android {
    background: #176b43;
    border-color: #2cbf73;
    color: #fff;
}

.button-android:hover,
.button-android:focus-visible { background: #208453; }

.button-disabled {
    cursor: not-allowed;
    background: #2a2d31;
    border-color: #454950;
    color: #777e87;
}

.apk-progress-panel {
    position: fixed;
    z-index: 80;
    right: 18px;
    bottom: 18px;
    width: min(390px, calc(100vw - 28px));
    padding: 15px;
    border: 1px solid #515861;
    border-radius: 6px;
    background: #171b20;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .48);
}

.apk-progress-panel[hidden] {
    display: none;
}

.apk-progress-head,
.apk-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.apk-progress-head strong {
    color: var(--android);
    font-size: 12px;
    letter-spacing: .06em;
}

.apk-progress-head button {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 3px;
    background: #292e35;
    color: var(--text);
    cursor: pointer;
}

.apk-progress-track {
    height: 7px;
    margin: 14px 0 9px;
    overflow: hidden;
    border-radius: 99px;
    background: #30353c;
}

.apk-progress-track i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--android);
    transition: width .16s linear;
}

.apk-progress-track i.is-verified {
    background: #62e69c;
}

.apk-progress-track i.is-error {
    background: var(--danger);
}

.apk-progress-meta {
    color: var(--muted);
    font-size: 12px;
}

.apk-progress-meta b {
    color: var(--text);
}

.apk-progress-panel p {
    margin: 10px 0 0;
    color: var(--faint);
    font-size: 11px;
    line-height: 1.55;
}

.apk-progress-action {
    width: 100%;
    margin-top: 12px;
    cursor: pointer;
}

.requirements {
    margin: 14px 0 0;
    color: var(--faint);
    font-size: 12px;
}

.connection-panel,
.motd-window {
    border: 1px solid #50555d;
    background: var(--surface-deep);
    box-shadow: 10px 12px 0 rgba(7, 8, 10, .25);
}

.panel-titlebar,
.motd-titlebar {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-inline: 14px;
    background: var(--surface-raised);
    border-bottom: 1px solid #4a4f57;
    color: #f1f2f3;
    font-size: 12px;
    font-weight: 700;
}

.secure-label {
    padding: 1px 6px;
    border: 1px solid #248a5a;
    border-radius: 3px;
    color: #64e39f;
    font-size: 10px;
    letter-spacing: .05em;
}

.connection-panel dl {
    margin: 0;
    padding: 10px 16px;
}

.connection-panel dl div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 14px;
    padding-block: 11px;
    border-bottom: 1px solid #30343a;
}

.connection-panel dl div:last-child {
    border-bottom: 0;
}

.connection-panel dt {
    color: var(--faint);
}

.connection-panel dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: #f5f6f7;
}

.copy-command {
    display: flex;
    width: calc(100% - 32px);
    min-height: 43px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 16px 16px;
    padding-inline: 12px;
    border: 1px solid #3f454d;
    border-radius: 3px;
    background: #0c0f12;
    color: var(--cyan);
    cursor: pointer;
    font-size: 12px;
    text-align: left;
}

.copy-command span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-command b {
    color: #fff;
    font-size: 11px;
}

.copy-command:hover,
.copy-command:focus-visible {
    border-color: var(--cyan);
}

.copy-command:disabled {
    opacity: .7;
    cursor: wait;
}

.content-section,
.commands-layout,
.release-layout {
    padding-block: 86px;
}

.section-heading {
    max-width: 720px;
}

.section-heading h2,
.download-layout h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(26px, 4vw, 39px);
    line-height: 1.22;
    letter-spacing: -.035em;
}

.section-heading > p:last-child,
.download-layout > div:first-child > p:last-child {
    margin: 15px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.motd-window {
    margin-top: 32px;
    box-shadow: none;
}

.motd-titlebar span:last-child {
    color: var(--green);
    font-size: 11px;
}

.motd-lines {
    min-height: 330px;
    padding: 18px 20px;
    background: var(--terminal);
    color: #e7e9ec;
    font-size: 13px;
    line-height: 1.75;
}

.motd-lines p {
    margin: 0;
    overflow-wrap: anywhere;
}

.motd-lines time {
    display: inline-block;
    width: 55px;
    color: #656d77;
}

.motd-lines b {
    color: var(--cyan);
    font-weight: 700;
}

.motd-input {
    display: flex;
    min-height: 45px;
    align-items: center;
    gap: 8px;
    padding-inline: 15px;
    background: #1b1e22;
    border-top: 1px solid #363b42;
    color: #bec3ca;
    font-size: 13px;
}

.motd-input > span:first-child {
    color: var(--cyan);
}

.motd-input i {
    width: 7px;
    height: 16px;
    background: #dfe3e7;
    opacity: .75;
}

.network-section,
.commands-section,
.release-section {
    background: #181b1f;
    border-block: 1px solid #32363c;
}

.network-grid,
.commands-layout {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(440px, 1.2fr);
    gap: clamp(42px, 8vw, 100px);
    align-items: start;
}

.network-grid {
    padding-block: 78px;
}

.network-table,
.command-table {
    border: 1px solid #41464e;
    background: #22252a;
}

.network-table > div,
.command-table > div {
    display: grid;
    min-height: 48px;
    align-items: center;
    gap: 20px;
    padding: 10px 14px;
    border-bottom: 1px solid #3b3f46;
}

.network-table > div {
    grid-template-columns: minmax(130px, .8fr) minmax(0, 1.2fr);
}

.network-table > div:last-child,
.command-table > div:last-child {
    border-bottom: 0;
}

.network-table span {
    color: var(--muted);
}

.network-table strong {
    overflow-wrap: anywhere;
    color: #fff;
    font-weight: 600;
}

.feature-list {
    margin-top: 34px;
    border-top: 1px solid var(--border);
}

.feature-list article {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 22px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}

.feature-list article > span {
    color: var(--cyan);
    font-size: 12px;
    font-weight: 700;
}

.feature-list h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
}

.feature-list p {
    margin: 5px 0 0;
    color: var(--muted);
}

.command-table > div {
    grid-template-columns: minmax(180px, .8fr) minmax(0, 1.2fr);
}

.command-table code,
.rules-box code {
    color: var(--cyan);
    font-family: inherit;
}

.command-table span {
    color: var(--muted);
}

.prefix-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    margin-top: 30px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.prefix-grid > div {
    display: flex;
    min-height: 112px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 8px;
    border-right: 1px solid var(--border);
    text-align: center;
}

.prefix-grid > div:last-child {
    border-right: 0;
}

.prefix-grid b {
    color: var(--amber);
    font-size: 25px;
    line-height: 1;
}

.prefix-grid span {
    color: #cbd0d6;
    font-size: 12px;
}

.rules-box {
    display: grid;
    grid-template-columns: minmax(180px, .5fr) minmax(0, 1.5fr);
    gap: 32px;
    margin-top: 30px;
    padding: 25px 28px;
    border-left: 3px solid var(--amber);
    background: #181b1f;
}

.rules-box h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
}

.rules-box ol {
    margin: 0;
    padding-left: 22px;
    color: var(--muted);
}

.rules-box li + li {
    margin-top: 7px;
}

.release-layout {
    display: grid;
    grid-template-columns: minmax(240px, .8fr) minmax(300px, 1fr);
    gap: 28px 80px;
}

.release-details {
    margin: 0;
    border: 1px solid #41464e;
    background: #22252a;
}

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

.installer-card {
    position: relative;
    padding: 26px;
    border: 1px solid #46505d;
    background: linear-gradient(145deg, #252b34, #181c22);
}

.installer-card.android-card { border-color: #287c55; }
.installer-card h3 { margin: 18px 0 7px; font-size: 21px; }
.installer-card p { min-height: 48px; margin: 0 0 22px; color: var(--muted); }
.platform-badge { padding: 4px 8px; border: 1px solid var(--cyan); color: var(--cyan); font-size: 11px; }
.android-card .platform-badge { border-color: var(--android); color: var(--android); }

.security-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 32px; }
.security-grid article { padding: 22px; border: 1px solid var(--border); background: var(--surface-deep); }
.security-grid b { color: var(--cyan); }
.security-grid h3 { margin: 15px 0 7px; font-size: 16px; }
.security-grid p { margin: 0; color: var(--muted); }
.verification-stack { display: grid; gap: 10px; margin-top: 22px; }
.install-guide { margin-top: 22px; padding: 24px 27px; border-left: 3px solid var(--android); background: #111b17; }
.install-guide h3 { margin: 0 0 12px; }
.install-guide ol { margin: 0; padding-left: 20px; color: var(--muted); }
.install-guide li + li { margin-top: 6px; }

.policy-section { padding-block: 76px; border-block: 1px solid #344557; background: #121820; }
.policy-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .85fr); gap: 70px; }
.policy-layout h2 { margin: 0; font-size: clamp(26px, 4vw, 39px); }
.policy-layout p, .policy-layout li { color: var(--muted); }
.policy-layout aside { padding: 25px; border: 1px solid #3e4c5d; background: #1b222b; }
.policy-layout aside h3 { margin-top: 0; }
.policy-layout ul { padding-left: 20px; }
.copy-presentation { padding: 10px 13px; border: 1px solid var(--cyan); background: transparent; color: var(--cyan); cursor: pointer; }

.manifest-section { padding-block: 76px; border-top: 1px solid #35404d; background: #171c22; }
.manifest-layout { display: grid; gap: 30px; }
.manifest-status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.manifest-status-grid article { padding: 24px; border: 1px solid #414b57; background: #101419; }
.manifest-status-grid h3 { margin: 15px 0; font-size: 20px; }
.manifest-status-grid dl { margin: 0; }
.manifest-status-grid dl div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; padding-block: 7px; border-top: 1px solid #2d343d; }
.manifest-status-grid dt { color: var(--faint); }
.manifest-status-grid dd { margin: 0; overflow-wrap: anywhere; color: var(--text); }
.manifest-state { display: inline-flex; padding: 3px 8px; border: 1px solid; font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.manifest-state.is-ready { border-color: var(--green); color: var(--green); }
.manifest-state.is-blocked { border-color: var(--amber); color: var(--amber); }
.manifest-actions { display: flex; align-items: center; gap: 16px; }
.manifest-actions span { color: var(--muted); font-size: 12px; }

.release-details > div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 20px;
    padding: 12px 15px;
    border-bottom: 1px solid #3b3f46;
}

.release-details > div:last-child {
    border-bottom: 0;
}

.release-details dt {
    color: var(--faint);
}

.release-details dd {
    margin: 0;
    color: #fff;
}

.checksum-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid #3d4249;
    background: #0d1013;
}

.checksum-panel > span {
    color: var(--muted);
    font-size: 12px;
}

.checksum-panel code {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--green);
    font-family: inherit;
    font-size: 12px;
}

.checksum-panel p {
    grid-column: 2 / -1;
    margin: 0;
    color: var(--faint);
}

.checksum-panel button,
.checksum-actions a {
    min-height: 34px;
    padding-inline: 11px;
    border: 1px solid #4b5159;
    border-radius: 3px;
    background: #262a2f;
    color: #fff;
    cursor: pointer;
    font-size: 11px;
}

.checksum-panel button:hover,
.checksum-panel button:focus-visible,
.checksum-actions a:hover,
.checksum-actions a:focus-visible {
    border-color: var(--cyan);
}

.checksum-actions {
    display: flex;
    gap: 6px;
}

.checksum-actions a {
    display: inline-flex;
    align-items: center;
    color: var(--text);
    text-decoration: none;
}

.download-section {
    border-top: 1px solid #4b5058;
    background: #30343a;
}

.download-layout {
    display: grid;
    min-height: 260px;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
    align-items: center;
    gap: 60px;
    padding-block: 50px;
}

.download-action {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
}

.download-action span:last-child {
    color: var(--muted);
    font-size: 12px;
}

footer {
    background: #0f1114;
    border-top: 1px solid #3a3e44;
}

.footer-layout {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 36px;
    min-height: 122px;
    color: var(--muted);
    font-size: 12px;
}

.footer-layout > div {
    display: flex;
    flex-direction: column;
}

.footer-layout strong {
    color: #fff;
    font-size: 13px;
}

.footer-layout small {
    color: var(--faint);
}

:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .hero,
    .network-grid,
    .commands-layout,
    .release-layout,
    .download-layout,
    .policy-layout {
        grid-template-columns: 1fr;
    }

    .security-grid { grid-template-columns: 1fr; }
    .manifest-status-grid { grid-template-columns: 1fr; }

    .hero {
        min-height: auto;
        gap: 48px;
        padding-block: 66px;
    }

    .connection-panel {
        max-width: 600px;
    }

    .prefix-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .prefix-grid > div:nth-child(3) {
        border-right: 0;
    }

    .prefix-grid > div:nth-child(-n+3) {
        border-bottom: 1px solid var(--border);
    }

    .checksum-panel {
        grid-column: auto;
    }

    .footer-layout {
        grid-template-columns: 1fr auto;
    }

    .footer-layout small {
        grid-column: 1 / -1;
        padding-bottom: 24px;
    }
}

@media (max-width: 640px) {
    .section-width {
        width: min(calc(100% - 28px), var(--section-width));
    }

    .window-controls {
        display: none;
    }

    .menu-bar {
        overflow-x: auto;
        padding-inline: 5px;
        scrollbar-width: none;
    }

    .menu-bar::-webkit-scrollbar {
        display: none;
    }

    .menu-bar nav {
        flex: 0 0 auto;
    }

    .menu-bar a {
        padding-inline: 10px;
        font-size: 11px;
    }

    .connection-state {
        display: none;
    }

    .hero {
        padding-block: 54px;
    }

    .hero h1 {
        font-size: 46px;
    }

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

    .installer-grid { grid-template-columns: 1fr; }
    .manifest-actions { align-items: stretch; flex-direction: column; }

    .content-section,
    .commands-layout,
    .release-layout {
        padding-block: 62px;
    }

    .network-grid {
        padding-block: 62px;
    }

    .connection-panel dl div,
    .network-table > div,
    .command-table > div,
    .release-details > div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .motd-lines {
        min-height: 0;
        padding: 14px 12px;
        font-size: 11px;
    }

    .motd-lines time {
        width: 45px;
    }

    .feature-list article {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 12px;
    }

    .prefix-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .prefix-grid > div:nth-child(3) {
        border-right: 1px solid var(--border);
    }

    .prefix-grid > div:nth-child(even) {
        border-right: 0;
    }

    .prefix-grid > div:nth-child(-n+4) {
        border-bottom: 1px solid var(--border);
    }

    .rules-box {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 22px;
    }

    .checksum-panel {
        grid-template-columns: 1fr;
    }

    .checksum-panel p {
        grid-column: auto;
    }

    .checksum-panel button,
    .checksum-actions {
        justify-self: start;
    }

    .download-layout {
        gap: 28px;
    }

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

    .footer-layout {
        grid-template-columns: 1fr;
        gap: 15px;
        padding-block: 28px;
    }

    .footer-layout small {
        grid-column: auto;
        padding-bottom: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

.footer-network {
    margin-left: auto;
    text-align: right;
}
