/* ==========================================================================
   rbx.astudlox.top —— 视觉规格（依据《NewAPI 着陆页视觉规格》实现）
   设计语言：极简 SaaS + 轻盈玻璃态 + 柔和环境光；令牌驱动，明暗一键切换。
   ========================================================================== */

/* ---------- 1. 设计令牌（浅色，默认） ---------- */
:root {
    --background: #FFFFFF;
    --foreground: #0A0A0A;

    --card: #FFFFFF;
    --card-foreground: #0A0A0A;
    --popover: #FFFFFF;

    --primary: #3EA4EC;
    --primary-foreground: #FFFFFF;
    --primary-hover: rgba(62, 164, 236, .8);

    --secondary: #EEEEEE;
    --secondary-foreground: #004F8B;

    --muted: #F5F5F5;
    --muted-foreground: #606060;

    --border: #E8E8E8;
    --input: #E8E8E8;
    --ring: rgba(62, 164, 236, .45);

    --accent-blue-text: #2563EB;
    --accent-blue-bg: rgba(59, 130, 246, .05);
    --accent-blue-border: rgba(59, 130, 246, .2);

    --success: #22C55E;
    --success-glow: rgba(16, 185, 129, .45);

    --grad-from: #60A5FA;
    --grad-via: #A78BFA;
    --grad-to: #A855F7;

    --terminal-bg: rgba(255, 255, 255, .95);
    --terminal-border: var(--border);

    --radius-lg: .5rem;
    --radius-xl: .75rem;
    --radius-2xl: 1rem;
    --radius: 1rem;

    --shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);
    --shadow-nav: 0 2px 16px -6px rgba(0, 0, 0, .08), 0 0 0 .5px rgba(0, 0, 0, .02);
    --shadow-card: 0 20px 50px -25px rgba(15, 23, 42, .18);
    --shadow-pop: 0 10px 30px -12px rgba(15, 23, 42, .22);

    --code-key: #2563EB;
    --code-str: #059669;
    --code-num: #B45309;
    --code-fn: #0369A1;
    --code-kw: #7C3AED;
    --code-dim: #606060;

    --skeleton-base: #F5F5F5;
    --skeleton-highlight: #FFFFFF;

    --glow-opacity: .25;
    --grid-opacity: .08;

    --nav-h: 60px;
    --ease-out-expo: cubic-bezier(.16, 1, .3, 1);

    /* 兼容令牌：用于玻璃/描边/半透明层（避免依赖 color-mix，兼容旧版 WebView） */
    --nav-bg: rgba(255, 255, 255, .6);
    --menu-bg: rgba(255, 255, 255, .98);
    --overlay: rgba(10, 10, 10, .45);
    --card-88: rgba(255, 255, 255, .88);
    --card-80: rgba(255, 255, 255, .8);
    --bg-85: rgba(255, 255, 255, .85);
    --border-40: rgba(0, 0, 0, .05);
    --border-50: rgba(0, 0, 0, .07);
    --border-60: rgba(0, 0, 0, .09);
    --border-70: rgba(0, 0, 0, .12);
    --muted-10: rgba(0, 0, 0, .015);
    --muted-15: rgba(0, 0, 0, .02);
    --muted-20: rgba(0, 0, 0, .03);
    --muted-30: rgba(0, 0, 0, .04);
    --muted-40: rgba(0, 0, 0, .05);
    --muted-50: rgba(0, 0, 0, .06);
    --muted-60: rgba(0, 0, 0, .075);
    --muted-70: rgba(0, 0, 0, .09);
    --input-30: rgba(0, 0, 0, .04);
    --input-50: rgba(0, 0, 0, .07);
    --primary-20: rgba(62, 164, 236, .2);
    --primary-22: rgba(62, 164, 236, .22);
    --ring-60: rgba(62, 164, 236, .27);
    --danger-30: rgba(217, 45, 32, .3);
}

/* ---------- 2. 设计令牌（深色） ---------- */
html.dark,
html[data-theme="dark"] {
    --background: #1E1E1E;
    --foreground: #F3F3F3;

    --card: #2A2A2A;
    --card-foreground: #F3F3F3;
    --popover: #2F2F2F;

    --primary: #0E72BC;
    --primary-foreground: #FFFFFF;
    --primary-hover: rgba(14, 114, 188, .8);

    --secondary: #373737;
    --secondary-foreground: #9CC8E8;

    --muted: #2F2F2F;
    --muted-foreground: #B7B7B7;

    --border: rgba(255, 255, 255, .18);
    --input: rgba(255, 255, 255, .24);
    --ring: rgba(96, 165, 250, .5);

    --accent-blue-text: #60A5FA;
    --accent-blue-bg: rgba(96, 165, 250, .05);
    --accent-blue-border: rgba(96, 165, 250, .2);

    --terminal-bg: rgba(11, 15, 23, .95);
    --terminal-border: rgba(255, 255, 255, .06);

    --shadow-nav: 0 2px 16px -6px rgba(0, 0, 0, .4);
    --shadow-card: 0 20px 60px -25px rgba(0, 0, 0, .7);
    --shadow-pop: 0 12px 34px -14px rgba(0, 0, 0, .7);

    --code-key: #60A5FA;
    --code-str: #34D399;
    --code-num: #FCD34D;
    --code-fn: #7DD3FC;
    --code-kw: #C4B5FD;
    --code-dim: #B7B7B7;

    --skeleton-base: #2A2A2A;
    --skeleton-highlight: #3A3A3A;

    --glow-opacity: .12;
    --grid-opacity: .06;

    --nav-bg: rgba(30, 30, 30, .6);
    --menu-bg: rgba(30, 30, 30, .98);
    --overlay: rgba(0, 0, 0, .62);
    --card-88: rgba(42, 42, 42, .94);
    --card-80: rgba(42, 42, 42, .85);
    --bg-85: rgba(30, 30, 30, .85);
    --border-40: rgba(255, 255, 255, .07);
    --border-50: rgba(255, 255, 255, .09);
    --border-60: rgba(255, 255, 255, .12);
    --border-70: rgba(255, 255, 255, .14);
    --muted-10: rgba(255, 255, 255, .02);
    --muted-15: rgba(255, 255, 255, .03);
    --muted-20: rgba(255, 255, 255, .04);
    --muted-30: rgba(255, 255, 255, .05);
    --muted-40: rgba(255, 255, 255, .06);
    --muted-50: rgba(255, 255, 255, .07);
    --muted-60: rgba(255, 255, 255, .09);
    --muted-70: rgba(255, 255, 255, .11);
    --input-30: rgba(255, 255, 255, .08);
    --input-50: rgba(255, 255, 255, .14);
    --primary-20: rgba(96, 165, 250, .25);
    --primary-22: rgba(96, 165, 250, .3);
    --ring-60: rgba(96, 165, 250, .32);
    --danger-30: rgba(248, 113, 113, .35);
}

/* ---------- 3. 基础 ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
    margin: 0;
    background: var(--background);
    color: var(--foreground);
    font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
        "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.625;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

body.no-scroll {
    overflow: hidden;
}

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

h1,
h2,
h3,
h4 {
    margin: 0;
    letter-spacing: -.025em;
    line-height: 1.15;
    font-weight: 700;
}

p {
    margin: 0;
}

code,
kbd,
.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: .92em;
}

:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--ring);
    border-radius: var(--radius-lg);
}

.num,
.tabular {
    font-variant-numeric: tabular-nums;
}

/* 环境光晕 + 网格底纹（装饰层） */
.ambient {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(60% 50% at 20% 20%, oklch(0.72 0.18 250 / .8) 0%, transparent 70%),
        radial-gradient(50% 40% at 80% 15%, oklch(0.65 0.15 200 / .6) 0%, transparent 70%),
        radial-gradient(40% 35% at 40% 80%, oklch(0.70 0.12 280 / .4) 0%, transparent 70%);
    opacity: var(--glow-opacity);
    mix-blend-mode: normal;
}

.grid-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, var(--border) 1px, transparent 1px),
        linear-gradient(to bottom, var(--border) 1px, transparent 1px);
    background-size: 4rem 4rem;
    opacity: var(--grid-opacity);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, #000 0%, transparent 75%);
    mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, #000 0%, transparent 75%);
}

/* ---------- 4. 玻璃胶囊导航 + 滚动进度 ---------- */
.progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    z-index: 60;
    background: linear-gradient(to right, var(--grad-from), var(--grad-via), var(--grad-to));
    transition: width .1s linear;
}

.progress::after {
    content: "";
    position: absolute;
    right: 0;
    top: -1px;
    width: 5%;
    height: 4px;
    background: var(--primary);
    transform: rotate(2deg);
    box-shadow: 0 0 10px var(--primary);
}

.nav-shell {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 12px 12px 0;
    pointer-events: none;
}

.nav {
    pointer-events: auto;
    max-width: 52rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--nav-h);
    padding: 0 12px;
    border-radius: var(--radius-full, 999px);
    background: var(--nav-bg);
    -webkit-backdrop-filter: blur(40px);
    backdrop-filter: blur(40px);
    box-shadow: var(--shadow-nav), inset 0 0 0 .5px var(--border-50);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--foreground);
}

.brand:hover .brand-logo {
    transform: scale(1.05);
}

.brand-logo {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-lg);
    flex: none;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -.02em;
    background: linear-gradient(135deg, var(--grad-from), var(--grad-to));
    box-shadow: var(--shadow-xs);
    transition: transform .3s var(--ease-out-expo);
}

.brand-name {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -.025em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-links {
    display: none;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav-link {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted-foreground);
    transition: color .2s, background-color .2s;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
    color: var(--foreground);
    background: var(--muted-60);
    text-decoration: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.nav-links + .nav-actions {
    margin-left: 8px;
}

/* 图标按钮 36px */
.icon-btn {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--foreground);
    cursor: pointer;
    transition: background-color .2s, color .2s;
}

.icon-btn:hover {
    background: var(--muted);
}

.icon-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.75;
}

/* 移动端汉堡 */
.menu-btn {
    display: grid;
}

@media (min-width: 640px) {
    .menu-btn {
        display: none;
    }

    .nav-links {
        display: flex;
    }

    .nav-actions {
        margin-left: 0;
    }
}

/* 全屏毛玻璃菜单 */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    padding: calc(var(--nav-h) + 28px) 24px calc(24px + env(safe-area-inset-bottom));
    background: var(--menu-bg);
    -webkit-backdrop-filter: blur(40px);
    backdrop-filter: blur(40px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .5s var(--ease-out-expo), transform .5s var(--ease-out-expo), visibility .5s;
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.mobile-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    padding: 4px 4px;
    font-size: 18px;
    font-weight: 600;
    color: var(--foreground);
    border-bottom: 1px solid var(--border-50);
}

.mobile-menu a:last-of-type {
    border-bottom: 0;
}

.mobile-menu a:hover {
    color: var(--primary);
    text-decoration: none;
}

/* 主题下拉菜单 */
.dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 168px;
    padding: 6px;
    z-index: 55;
    border-radius: var(--radius-lg);
    background: var(--popover);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-pop);
    opacity: 0;
    transform: translateY(-6px) scale(.98);
    filter: blur(4px);
    visibility: hidden;
    transition: opacity .2s, transform .2s, filter .2s, visibility .2s;
}

.dropdown.open .dropdown-panel {
    opacity: 1;
    transform: none;
    filter: none;
    visibility: visible;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 0;
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--foreground);
    font-size: 14px;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color .2s;
}

.dropdown-item:hover {
    background: var(--muted);
}

.dropdown-item[aria-checked="true"] {
    color: var(--primary);
    font-weight: 600;
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
    margin-left: auto;
    stroke-width: 2;
}

/* ---------- 5. 容器与区块节奏 ---------- */
.wrap {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 24px;
}

main {
    padding-top: var(--nav-h);
}

.section {
    padding: 96px 0;
    border-top: 1px solid var(--border-40);
    position: relative;
}

.section:first-of-type {
    border-top: 0;
}

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

.section-head.center {
    text-align: center;
}

.section-title {
    font-size: 1.5rem;
}

.section-desc {
    margin-top: 14px;
    max-width: 46rem;
    color: var(--muted-foreground);
    font-size: 15px;
}

.section-head.center .section-desc {
    margin-left: auto;
    margin-right: auto;
}

.eyebrow {
    display: block;
    margin-bottom: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--muted-foreground);
}

@media (min-width: 768px) {
    .section {
        padding: 128px 0;
    }

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

    .section-title {
        font-size: 1.875rem;
    }

    .section-desc {
        font-size: 16px;
    }
}

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

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

.hero-copy {
    min-width: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    color: var(--accent-blue-text);
    background: var(--accent-blue-bg);
    border: 1px solid var(--accent-blue-border);
    box-shadow: var(--shadow-xs);
}

.badge .dot {
    position: relative;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-blue-text);
    flex: none;
}

.badge .dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    animation: rbx-ping 1.6s cubic-bezier(0, 0, .2, 1) infinite;
}

.hero h1 {
    margin-top: 22px;
    font-size: clamp(2.25rem, 4.5vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -.025em;
}

.grad-text {
    background: linear-gradient(to right, var(--grad-from), var(--grad-via), var(--grad-to));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero .lede {
    margin-top: 22px;
    max-width: 34rem;
    color: var(--muted-foreground);
    line-height: 1.625;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--muted-foreground);
    background: var(--muted-15);
    border: 1px solid var(--border-40);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: transform .3s var(--ease-out-expo), background-color .3s, border-color .3s, color .3s;
}

.chip:hover {
    transform: scale(1.02);
    background: var(--muted-30);
    border-color: var(--accent-blue-border);
    color: var(--accent-blue-text);
}

.chip .mono {
    font-size: 12px;
}

@media (min-width: 1024px) {
    .hero {
        padding: 144px 0 112px;
    }

    .hero-inner {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 32px;
        align-items: center;
    }

    .hero-copy {
        grid-column: span 6;
    }

    .hero-aside {
        grid-column: span 6;
    }
}

/* ---------- 7. 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .2s, border-color .2s, color .2s, transform .12s;
}

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

.btn:active {
    transform: translateY(1px);
}

.btn[disabled],
.btn.is-disabled {
    opacity: .5;
    pointer-events: none;
}

.btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    transition: transform .2s;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
    box-shadow: var(--shadow-xs);
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-primary:hover svg.arrow {
    transform: translateX(2px);
}

.btn-outline {
    background: var(--background);
    color: var(--foreground);
    border-color: var(--border-50);
}

.btn-outline:hover {
    background: var(--muted-50);
    border-color: var(--border);
}

html.dark .btn-outline,
html[data-theme="dark"] .btn-outline {
    background: var(--input-30);
    border-color: var(--input);
}

html.dark .btn-outline:hover,
html[data-theme="dark"] .btn-outline:hover {
    background: var(--input-50);
}

.btn-ghost {
    background: transparent;
    color: var(--muted-foreground);
}

.btn-ghost:hover {
    color: var(--foreground);
    background: var(--muted-60);
}

.btn-sm {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

/* ---------- 8. 卡片 / 终端卡 / 代码 ---------- */
.card {
    position: relative;
    padding: 28px;
    border-radius: var(--radius-2xl);
    background: var(--card-88);
    border: 1px solid var(--border-60);
    box-shadow: var(--shadow-card);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.card-flat {
    box-shadow: none;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
}

.card-sub {
    margin-top: 6px;
    color: var(--muted-foreground);
    font-size: 13.5px;
}

.terminal {
    border-radius: var(--radius-xl);
    background: var(--terminal-bg);
    border: 1px solid var(--terminal-border);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.terminal-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-60);
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted-foreground);
}

.terminal-head .metrics {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.metric {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted-foreground);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted-foreground);
}

.status .pulse {
    position: relative;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success-glow);
    flex: none;
}

.status .pulse::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--success);
    animation: rbx-ping 1.6s cubic-bezier(0, 0, .2, 1) infinite;
}

.terminal-body {
    padding: 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.55;
    overflow-x: auto;
}

.code {
    display: block;
    padding: 12px 14px;
    border-radius: var(--radius-lg);
    background: var(--muted-70);
    border: 1px solid var(--border-50);
    color: var(--foreground);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    overflow-x: auto;
}

.code-wrap {
    position: relative;
}

.code-wrap .icon-btn {
    position: absolute;
    top: 6px;
    right: 6px;
}

.code .k {
    color: var(--code-key);
}

.code .s {
    color: var(--code-str);
}

.code .n {
    color: var(--code-num);
}

.code .f {
    color: var(--code-fn);
}

.code .kw {
    color: var(--code-kw);
}

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

.copy-done {
    color: var(--success) !important;
}

/* ---------- 9. 统计带 ---------- */
.stats {
    padding: 40px 0;
    background: var(--muted-10);
    border-top: 1px solid var(--border-40);
    border-bottom: 1px solid var(--border-40);
}

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

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -.025em;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 12px;
    color: var(--muted-foreground);
}

@media (min-width: 768px) {
    .stats {
        padding: 48px 0;
    }

    .stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 48px;
    }

    .stat-value {
        font-size: 1.875rem;
    }
}

/* ---------- 10. Bento 网格 ---------- */
.bento {
    display: grid;
    gap: 1px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-60);
    background: var(--border-40);
}

.bento-cell {
    padding: 28px;
    background: var(--background);
    transition: background-color .3s;
}

.bento-cell:hover {
    background: var(--muted-20);
}

.bento-cell .card-title {
    font-size: 14px;
}

.cell-idx {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    color: var(--muted-foreground);
}

.bento-rows {
    margin-top: 16px;
    display: grid;
    gap: 8px;
}

.bento-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--muted-foreground);
}

.bento-row svg {
    width: 16px;
    height: 16px;
    stroke-width: 1.75;
    color: var(--primary);
    flex: none;
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
}

.spec {
    padding: 10px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-50);
    background: var(--muted-30);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    text-align: center;
    color: var(--muted-foreground);
    transition: border-color .3s, background-color .3s, color .3s;
}

.spec:hover {
    border-color: var(--accent-blue-border);
    background: var(--accent-blue-bg);
    color: var(--accent-blue-text);
}

@media (min-width: 768px) {
    .bento {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .bento-cell.span-2 {
        grid-column: span 2;
    }

    .bento-cell {
        padding: 32px;
    }
}

/* ---------- 11. 流程三步 ---------- */
.steps {
    display: grid;
    gap: 32px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.step-icon {
    position: relative;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-60);
    background: var(--muted-40);
    color: var(--primary);
}

.step-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.75;
}

.step-no {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 10px;
    font-weight: 700;
    display: grid;
    place-items: center;
}

.step-title {
    margin-top: 18px;
    font-size: 15px;
    font-weight: 600;
}

.step-text {
    margin-top: 8px;
    max-width: 260px;
    color: var(--muted-foreground);
    font-size: 13.5px;
}

@media (min-width: 768px) {
    .steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 48px;
    }
}

/* ---------- 12. 元信息 / 参数表 / 列表 ---------- */
.meta {
    display: grid;
    gap: 0;
}

.meta-row {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-50);
    font-size: 14px;
}

.meta-row:last-child {
    border-bottom: 0;
}

.meta-key {
    flex: none;
    width: 92px;
    color: var(--muted-foreground);
    font-size: 13px;
}

.meta-val {
    min-width: 0;
    word-break: break-all;
}

.table-wrap {
    margin-top: 14px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-60);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table.data-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 14px;
}

table.data-table th,
table.data-table td {
    padding: 11px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border-50);
}

table.data-table th {
    background: var(--muted-60);
    color: var(--muted-foreground);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

table.data-table tr:last-child td {
    border-bottom: 0;
}

table.data-table td code {
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--muted-70);
}

.req-yes {
    color: #d92d20;
    font-weight: 600;
}

.req-no {
    color: var(--muted-foreground);
}

html.dark .req-yes,
html[data-theme="dark"] .req-yes {
    color: #F87171;
}

/* 移动端：参数表堆叠为卡片列表，避免横向滚动 */
@media (max-width: 767px) {
    table.data-table {
        min-width: 0;
    }

    table.data-table thead {
        display: none;
    }

    table.data-table,
    table.data-table tbody,
    table.data-table tr,
    table.data-table td {
        display: block;
        width: 100%;
    }

    table.data-table tr {
        padding: 12px 14px;
        border-bottom: 1px solid var(--border-50);
    }

    table.data-table tr:last-child {
        border-bottom: 0;
        padding-bottom: 14px;
    }

    table.data-table td {
        position: relative;
        padding: 3px 0 3px 88px;
        border: 0;
    }

    table.data-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        top: 3px;
        width: 80px;
        color: var(--muted-foreground);
        font-size: 12px;
    }

    table.data-table td:first-child {
        padding: 0 0 6px;
        font-weight: 600;
    }

    table.data-table td:first-child::before {
        position: static;
        display: block;
        width: auto;
        font-size: 11px;
        letter-spacing: .06em;
        text-transform: uppercase;
    }
}

/* ---------- 13. 条目块（文档） ---------- */
.item {
    padding: 22px 0 6px;
    border-top: 1px dashed var(--border-70);
}

.item:first-child {
    border-top: 0;
    padding-top: 0;
}

.item-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.item-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    color: var(--muted-foreground);
    background: var(--muted-60);
    border: 1px solid var(--border-50);
}

.item-desc {
    margin-top: 8px;
    color: var(--muted-foreground);
    font-size: 13.5px;
}

.item-meta {
    margin-top: 12px;
}

.note {
    margin-top: 14px;
    padding: 10px 14px;
    border-left: 2px solid var(--primary);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    background: var(--muted-50);
    color: var(--muted-foreground);
    font-size: 13px;
}

.hint {
    margin-top: 10px;
    color: var(--muted-foreground);
    font-size: 12.5px;
}

/* ---------- 14. 锚点导航 / 分组 ---------- */
.anchor-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.anchor-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-60);
    background: var(--card-80);
    color: var(--foreground);
    font-size: 13px;
    transition: border-color .2s, color .2s, background-color .2s;
}

.anchor-nav a:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}

/* ---------- 15. 表单 ---------- */
.field-grid {
    display: grid;
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.field label {
    font-size: 13px;
    color: var(--muted-foreground);
}

.field .flag {
    color: #d92d20;
    font-weight: 700;
}

input[type="text"],
input[type="search"],
input:not([type]),
select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--input);
    border-radius: var(--radius-lg);
    background: var(--card);
    color: var(--foreground);
    font-family: inherit;
    font-size: 16px;
    transition: border-color .2s, box-shadow .2s;
}

select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 34px;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted-foreground) 50%),
        linear-gradient(135deg, var(--muted-foreground) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 2px),
        calc(100% - 13px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 3px var(--ring-60);
}

.hint-err {
    color: #d92d20;
}

html.dark .hint-err,
html[data-theme="dark"] .hint-err {
    color: #F87171;
}

@media (min-width: 640px) {
    .field-grid.cols {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    input[type="text"],
    input:not([type]),
    select {
        font-size: 14px;
    }
}

.btn-row.tight {
    margin-top: 20px;
}

/* ---------- 16. 骨架屏 ---------- */
.skeleton {
    border-radius: var(--radius-lg);
    background: linear-gradient(90deg, var(--skeleton-base) 0%, var(--skeleton-highlight) 40%, var(--skeleton-base) 80%);
    background-size: 300% 100%;
    animation: rbx-shimmer 1.8s ease-in-out infinite;
}

.skeleton-line {
    height: 14px;
    margin-bottom: 10px;
}

.skeleton-title {
    height: 26px;
    width: 45%;
    margin-bottom: 18px;
}

.skeleton-card {
    height: 140px;
    margin-bottom: 16px;
}

/* ---------- 17. 弹窗（跳转提示） ---------- */
.modal-root {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

.modal-root[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: var(--overlay);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: rbx-fade-in .3s var(--ease-out-expo) both;
}

.modal-card {
    position: relative;
    width: min(26rem, 100%);
    max-height: 88vh;
    overflow-y: auto;
    padding: 26px 22px calc(22px + env(safe-area-inset-bottom));
    border-radius: var(--radius-2xl);
    background: var(--card);
    border: 1px solid var(--border-70);
    box-shadow: var(--shadow-card);
    text-align: center;
    animation: rbx-scale-in .38s var(--ease-out-expo) both;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
}

.modal-spinner {
    width: 44px;
    height: 44px;
    margin: 4px auto 18px;
    border-radius: 50%;
    border: 3px solid var(--primary-22);
    border-top-color: var(--primary);
    animation: rbx-spin .8s linear infinite;
}

.modal-root[data-state="error"] .modal-spinner {
    border-top-color: #d92d20;
    animation: none;
    border-color: var(--danger-30);
    border-top-color: #d92d20;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.modal-sub {
    margin-top: 8px;
    color: var(--muted-foreground);
    font-size: 13.5px;
    word-break: break-all;
}

.modal-root[data-state="error"] .modal-sub {
    color: #d92d20;
}

html.dark .modal-root[data-state="error"] .modal-sub,
html[data-theme="dark"] .modal-root[data-state="error"] .modal-sub {
    color: #F87171;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.modal-actions .btn {
    flex: 1 1 auto;
    min-width: 132px;
}

.modal-hint {
    margin-top: 16px;
    color: var(--muted-foreground);
    font-size: 12.5px;
    text-align: left;
}

.modal-progress {
    margin-top: 16px;
    height: 3px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--primary-20);
}

.modal-progress i {
    display: block;
    height: 100%;
    width: 40%;
    border-radius: 999px;
    background: var(--primary);
    animation: rbx-indeterminate 1.2s ease-in-out infinite;
}

/* ---------- 18. CTA / 页脚 ---------- */
.cta {
    position: relative;
    overflow: hidden;
    text-align: center;
    border-top: 1px solid var(--border-40);
}

.cta .ambient-soft {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(50% 40% at 30% 30%, oklch(0.72 0.18 250 / .8) 0%, transparent 70%),
        radial-gradient(40% 35% at 75% 60%, oklch(0.70 0.12 280 / .5) 0%, transparent 70%);
    opacity: calc(var(--glow-opacity) * .8);
}

.cta-title {
    font-size: 1.5rem;
}

@media (min-width: 768px) {
    .cta-title {
        font-size: 2.25rem;
    }
}

.cta .btn-row {
    justify-content: center;
}

.footer {
    padding: 48px 0;
    border-top: 1px solid var(--border-40);
    color: var(--muted-foreground);
    font-size: 13px;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
}

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

.footer-links a {
    color: var(--muted-foreground);
}

.footer-links a:hover {
    color: var(--foreground);
}

@media (min-width: 768px) {
    .footer {
        padding: 64px 0;
    }

    .footer-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* 悬浮快捷按钮（移动端友好） */
.fabs {
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 45;
}

.fab {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid var(--border-60);
    background: var(--bg-85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-nav);
    color: var(--foreground);
    cursor: pointer;
}

.fab svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.75;
}

.fab:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* ---------- 19. 动效 ---------- */
@keyframes rbx-fade-up {
    0% {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rbx-fade-in {
    0% {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes rbx-scale-in {
    0% {
        opacity: 0;
        transform: scale(.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rbx-ping {
    0% {
        transform: scale(1);
        opacity: .7;
    }

    75%,
    to {
        transform: scale(2.4);
        opacity: 0;
    }
}

@keyframes rbx-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes rbx-shimmer {
    0% {
        background-position: 300% 50%;
    }

    to {
        background-position: 0 50%;
    }
}

@keyframes rbx-indeterminate {
    0% {
        transform: translateX(-110%);
    }

    100% {
        transform: translateX(260%);
    }
}

.anim {
    animation-duration: .6s;
    animation-timing-function: var(--ease-out-expo);
    animation-fill-mode: both;
}

.anim-fade-up {
    animation-name: rbx-fade-up;
}

.anim-fade-in {
    animation-name: rbx-fade-in;
}

.anim-scale-in {
    animation-name: rbx-scale-in;
}

.d1 {
    animation-delay: 60ms;
}

.d2 {
    animation-delay: 120ms;
}

.d3 {
    animation-delay: 180ms;
}

.d4 {
    animation-delay: 240ms;
}

.d5 {
    animation-delay: 320ms;
}

.reveal {
    opacity: 0;
    will-change: transform, opacity;
}

.reveal.is-in {
    animation: rbx-fade-up .6s var(--ease-out-expo) both;
}

.reveal.is-in.anim-scale-in {
    animation-name: rbx-scale-in;
}

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    .anim,
    .reveal.is-in,
    .modal-card,
    .modal-backdrop,
    .skeleton,
    .badge .dot::after,
    .status .pulse::after,
    .modal-progress i {
        animation: none !important;
    }

    .reveal {
        opacity: 1;
    }

    * {
        transition-duration: .01ms !important;
    }
}


/* 长串防溢出（移动端友好）：URL、token、逗号长列表 */
code,
.mono,
.meta-val,
.item-desc,
.modal-sub,
.chip {
    overflow-wrap: anywhere;
    word-break: break-word;
}

table.data-table td {
    overflow-wrap: anywhere;
}

/* ---------- 20. 移动端细节 ---------- */
@media (max-width: 639px) {
    .wrap {
        padding: 0 18px;
    }

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

    .card {
        padding: 22px 18px;
    }

    .section {
        padding: 72px 0;
    }

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

    .bento-cell {
        padding: 22px 18px;
    }

    .btn-row .btn {
        flex: 1 1 100%;
    }

    .modal-card {
        width: 100%;
    }
}

/* 触控设备：加大点击区、避免双击缩放 */
@media (hover: none) and (pointer: coarse) {

    .btn,
    .nav-link,
    .anchor-nav a,
    .dropdown-item,
    .fab,
    .icon-btn {
        touch-action: manipulation;
    }

    .nav-link {
        min-height: 40px;
        display: inline-flex;
        align-items: center;
    }
}

/* 表格横向滚动容器在 iOS 上的顺滑滚动 */
.table-wrap,
.code,
.terminal-body {
    -webkit-overflow-scrolling: touch;
}
