:root {
    --bg: #0b0e14;
    --bg-soft: #111621;
    --surface: #151a23;
    --surface-2: #1b2230;
    --border: #232a36;
    --border-soft: #1c2331;
    --text: #e6edf3;
    --text-muted: #8b98a9;
    --text-dim: #6b7787;
    /* 与 App 内保持同一套主色：App 用 #fbbf24，站点若继续用 #ffb020，
       同一张图/同一个界面在两端会呈现两种黄。 */
    --accent: #fbbf24;
    --accent-strong: #f59e0b;
    --accent-rgb: 251, 191, 36;
    --accent-soft: rgba(var(--accent-rgb), 0.12);
    --on-accent: #1c1917;
    --blue: #4f8cff;
    --green: #3fb950;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.9);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
    --mono: "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Courier New", monospace;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
}

.wrap {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 22px;
}

.wrap-narrow {
    max-width: 820px;
}

/* ---------- header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 14, 20, 0.82);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border-soft);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
    gap: 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 0.2px;
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: block;
    flex: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.nav a {
    color: var(--text-muted);
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    font-size: 14.5px;
    transition: color 0.15s, background 0.15s;
}

.nav a:hover {
    color: var(--text);
    background: var(--surface-2);
    text-decoration: none;
}

.nav a.is-active {
    color: var(--text);
    background: var(--surface-2);
}

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.15s, background 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent);
    color: var(--on-accent);
    box-shadow: 0 12px 26px -14px rgba(var(--accent-rgb), 0.55);
}

.btn-ghost {
    background: var(--surface-2);
    border-color: var(--border);
    color: var(--text);
}

.btn-ghost:hover {
    background: #222b3a;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 14px;
}

/* ---------- hero ---------- */
.hero {
    padding: 84px 0 64px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -220px 0 auto 50%;
    width: 780px;
    height: 780px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.14), transparent 62%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 20px;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.16);
}

.hero h1 {
    font-size: clamp(30px, 5.2vw, 48px);
    line-height: 1.18;
    margin: 0 0 18px;
    letter-spacing: -0.5px;
}

.hero h1 em {
    font-style: normal;
    color: var(--accent);
}

.hero p.lead {
    color: var(--text-muted);
    font-size: 17px;
    margin: 0 0 30px;
    max-width: 640px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.hero-meta {
    margin-top: 18px;
    color: var(--text-dim);
    font-size: 13.5px;
}

/* ---------- sections ---------- */
.section {
    padding: 62px 0;
    border-top: 1px solid var(--border-soft);
}

.section-head {
    margin-bottom: 30px;
}

.section-head h2 {
    font-size: 25px;
    margin: 0 0 8px;
    letter-spacing: -0.2px;
}

.section-head p {
    color: var(--text-muted);
    margin: 0;
    font-size: 15.5px;
}

.grid {
    display: grid;
    gap: 18px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-tight {
    gap: 12px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
}

.card h3 {
    margin: 0 0 8px;
    font-size: 17px;
}

.card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14.5px;
}

.card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 18px;
    margin-bottom: 14px;
}

/* ---------- feature list ---------- */
.check-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.check-list li {
    position: relative;
    padding-left: 26px;
    color: var(--text-muted);
    font-size: 15px;
}

.check-list li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--accent);
}

/* ---------- download page ---------- */
.dl-page {
    padding-top: 40px;
    padding-bottom: 64px;
}

.dl-page .dl-actions {
    margin-top: 22px;
}

.dl-date {
    color: var(--text-muted);
    font-size: 14.5px;
    margin-top: 4px;
}

.dl-qr-wrap {
    text-align: center;
}

.dl-qr-hint {
    color: var(--text-dim);
    font-size: 12.5px;
    margin-top: 6px;
}

.dl-steps {
    color: var(--text-muted);
    font-size: 14.5px;
    margin: 8px 0 0;
    padding-left: 20px;
}

.dl-sha {
    font-family: var(--mono);
    font-size: 12.5px;
    word-break: break-all;
}

.dl-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.dl-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.dl-version {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.dl-version strong {
    font-size: 24px;
}

.dl-version span {
    color: var(--text-dim);
    font-size: 13.5px;
}

.dl-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin: 20px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--border-soft);
    color: var(--text-muted);
    font-size: 14px;
}

.dl-facts b {
    color: var(--text);
    font-weight: 600;
}

.qr {
    width: 132px;
    height: 132px;
    background: #fff;
    border-radius: 10px;
    padding: 8px;
}

.note {
    margin-top: 16px;
    color: var(--text-dim);
    font-size: 13.5px;
}

/* ---------- docs ---------- */
.docs-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

.docs-side {
    position: sticky;
    top: 82px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    padding-right: 6px;
}

.docs-side h4 {
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-dim);
    margin: 22px 0 8px;
}

.docs-side h4:first-child {
    margin-top: 0;
}

.docs-side ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 2px;
}

.docs-side a {
    display: block;
    padding: 6px 10px;
    border-radius: 7px;
    color: var(--text-muted);
    font-size: 14.5px;
}

.docs-side a:hover {
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
}

.docs-side a.is-active {
    background: var(--accent-soft);
    color: var(--accent);
}

.doc-card {
    display: block;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
}

.doc-card:hover {
    border-color: #2f3a4c;
    text-decoration: none;
}

.doc-card strong {
    display: block;
    margin-bottom: 6px;
}

.doc-card span {
    color: var(--text-muted);
    font-size: 14px;
}

/* ---------- markdown ---------- */
.prose {
    font-size: 16px;
    line-height: 1.85;
}

.prose > *:first-child {
    margin-top: 0;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
    line-height: 1.3;
    margin: 34px 0 12px;
}

.prose h1 {
    font-size: 28px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.prose h2 {
    font-size: 22px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-soft);
}

.prose h3 {
    font-size: 18px;
}

.prose p,
.prose ul,
.prose ol {
    color: #cbd5e1;
}

.prose a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.prose code {
    font-family: var(--mono);
    font-size: 0.88em;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 1px 6px;
}

.prose pre {
    background: #0a0d13;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    overflow-x: auto;
    font-size: 13.5px;
    line-height: 1.6;
}

.prose pre code {
    background: none;
    border: 0;
    padding: 0;
}

.prose blockquote {
    margin: 18px 0;
    padding: 2px 18px;
    border-left: 3px solid var(--accent);
    background: var(--surface);
    color: var(--text-muted);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 14.5px;
}

.prose th,
.prose td {
    border: 1px solid var(--border);
    padding: 9px 12px;
    text-align: left;
}

.prose th {
    background: var(--surface-2);
}

.prose img {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.prose hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 30px 0;
}

.prose-tight {
    font-size: 14px;
}

.prose-md {
    font-size: 15px;
}

/* ---------- changelog ---------- */
.release {
    border-left: 2px solid var(--border);
    padding: 0 0 30px 24px;
    position: relative;
}

.release::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg);
}

.release:last-child {
    border-left-color: transparent;
}

.release-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}

.release-head strong {
    font-size: 19px;
}

.release-head time {
    color: var(--text-dim);
    font-size: 13.5px;
}

/* ---------- footer ---------- */
.site-footer {
    border-top: 1px solid var(--border-soft);
    padding: 34px 0;
    margin-top: 30px;
    color: var(--text-dim);
    font-size: 14px;
}

.site-footer .wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
}

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

.site-footer a {
    color: var(--text-muted);
}

/* ---------- 通用工具类 ---------- */
.page-body {
    padding-top: 38px;
    padding-bottom: 64px;
}

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

.dim {
    color: var(--text-dim);
}

.small {
    font-size: 14px;
}

.center {
    text-align: center;
}

.flush {
    margin-top: 0;
}

p.flush {
    margin: 0;
}

/* ---------- misc ---------- */
.empty {
    padding: 40px 22px;
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-dim);
}

.pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12.5px;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid rgba(var(--accent-rgb), 0.28);
}

.page-head {
    padding: 46px 0 26px;
}

.page-head-flush {
    padding-top: 0;
}

.page-head h1 {
    margin: 0 0 8px;
    font-size: 31px;
    letter-spacing: -0.3px;
}

.page-head p {
    margin: 0;
    color: var(--text-muted);
}

/* 首页收尾区块的动作按钮居中 */
.hero-actions.center {
    justify-content: center;
    margin-top: 22px;
}

.docs-group-title {
    font-size: 19px;
    margin: 26px 0 14px;
}

@media (max-width: 860px) {
    .docs-layout {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .docs-side {
        position: static;
        max-height: none;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 16px;
    }

    .hero {
        padding: 56px 0 44px;
    }

    .section {
        padding: 46px 0;
    }
}
