/*!
 * XpnPortal 主题样式（原生 CSS，无需构建）
 */

/* ---------------------------------------------------------------- *
 * 设计变量与基础
 * ---------------------------------------------------------------- */

:root {
    --bg: #0f1115;
    --bg-soft: #13161d;
    --card: #191e28;
    --card-2: #1f2531;
    --border: #262c3a;
    --border-strong: #333b4d;
    --text: #e6e8eb;
    --text-soft: #c3c8d1;
    --muted: #8b93a3;
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-soft: rgba(59, 130, 246, 0.14);
    --success: #22c55e;
    --success-soft: rgba(34, 197, 94, 0.14);
    --warn: #f59e0b;
    --warn-soft: rgba(245, 158, 11, 0.14);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.14);
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --header-h: 64px;
    --container: 1140px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

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

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

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(1200px 600px at 50% -200px, rgba(59, 130, 246, 0.14), transparent 70%) no-repeat,
        var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

body.modal-open,
body.nav-open {
    overflow: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: #60a5fa;
}

img {
    max-width: 100%;
    display: block;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    color: var(--text);
    line-height: 1.3;
    font-weight: 650;
    letter-spacing: -0.01em;
}

h1 {
    font-size: 26px;
}

h2 {
    font-size: 18px;
}

h3 {
    font-size: 16px;
}

p {
    margin: 0 0 8px;
}

p:last-child {
    margin-bottom: 0;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

code,
.mono {
    font-family: var(--mono);
    font-size: 13px;
}

::selection {
    background: rgba(59, 130, 246, 0.35);
}

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

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

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

.small {
    font-size: 13px;
}

.danger-text {
    color: var(--danger) !important;
}

/* ---------------------------------------------------------------- *
 * 启动 / 加载态
 * ---------------------------------------------------------------- */

.boot-loading,
.page-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--muted);
}

.boot-loading {
    min-height: 100vh;
    flex-direction: column;
}

.page-loading {
    min-height: 50vh;
}

.boot-noscript {
    padding: 40px 20px;
    text-align: center;
    color: var(--warn);
}

.spinner {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--primary);
    animation: xpn-spin 0.8s linear infinite;
    display: inline-block;
}

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

/* ---------------------------------------------------------------- *
 * 顶部导航
 * ---------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 17, 21, 0.82);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 17px;
    white-space: nowrap;
}

.brand:hover {
    color: var(--text);
    opacity: 0.9;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    object-fit: contain;
    background: var(--card);
}

.brand-text {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.nav-link {
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--text-soft);
    font-size: 14px;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
    color: #fff;
    background: var(--primary-soft);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--text-soft);
}

.site-main {
    display: block;
    min-height: calc(100vh - var(--header-h) - 200px);
}

/* ---------------------------------------------------------------- *
 * 按钮 / 标签 / 徽章 / 表单元素
 * ---------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--card-2);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 550;
    line-height: 1.3;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.06s ease,
        opacity 0.15s ease;
}

.btn:hover {
    color: var(--text);
    background: #262e3b;
}

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

.btn:disabled,
.btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

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

.btn.ghost {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text-soft);
}

.btn.ghost:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.btn.danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.btn.danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.btn.sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 8px;
}

.btn.lg {
    padding: 12px 24px;
    font-size: 15px;
    border-radius: 12px;
}

.btn.block {
    display: flex;
    width: 100%;
}

.link {
    color: var(--primary);
    font-size: 14px;
}

.link:hover {
    text-decoration: underline;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.icon-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 550;
    line-height: 1.7;
    white-space: nowrap;
}

.badge.info {
    background: var(--primary-soft);
    color: #93c5fd;
}

.badge.success {
    background: var(--success-soft);
    color: #86efac;
}

.badge.warn {
    background: var(--warn-soft);
    color: #fcd34d;
}

.badge.danger {
    background: var(--danger-soft);
    color: #fca5a5;
}

.badge.muted {
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    padding: 1px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
}

.input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #12161e;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input::placeholder {
    color: #6b7383;
}

.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.input[readonly] {
    color: var(--text-soft);
    background: #0f131a;
}

/* ---------------------------------------------------------------- *
 * 通用布局工具
 * ---------------------------------------------------------------- */

.row {
    display: flex;
    align-items: center;
}

.row.gap {
    gap: 10px;
}

.row.wrap {
    flex-wrap: wrap;
}

.row.between {
    justify-content: space-between;
}

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

.hide-mobile {
    display: inline-flex;
}

.page {
    padding: 36px 20px 64px;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.page-head h1 {
    font-size: 26px;
}

.page-head p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.section {
    padding: 56px 0;
}

.section.alt {
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.015) 20%, transparent);
    border-top: 1px solid rgba(38, 44, 58, 0.6);
    border-bottom: 1px solid rgba(38, 44, 58, 0.6);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.section-head h2 {
    font-size: 22px;
}

.section-head p {
    margin: 4px 0 0;
    font-size: 14px;
}

/* ---------------------------------------------------------------- *
 * 卡片通用
 * ---------------------------------------------------------------- */

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

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.card-head h2 {
    font-size: 17px;
}

.card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

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

.kv-grid.single {
    grid-template-columns: minmax(0, 1fr);
}

.kv {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(38, 44, 58, 0.9);
    font-size: 14px;
}

.kv:last-child {
    border-bottom: 0;
}

.kv-label {
    color: var(--muted);
    white-space: nowrap;
}

.kv-value {
    color: var(--text);
    text-align: right;
    word-break: break-all;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.stat-grid.five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 22px;
}

.stat-tile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    color: var(--text);
}

a.stat-tile:hover {
    color: var(--text);
    border-color: var(--primary);
    background: var(--primary-soft);
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    word-break: break-all;
}

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

/* ---------------------------------------------------------------- *
 * 空状态 / 提示条
 * ---------------------------------------------------------------- */

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 36px 20px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.015);
    text-align: center;
}

.empty-lg {
    padding: 72px 20px;
}

.empty-icon {
    color: var(--border-strong);
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
}

.empty-lg .empty-icon {
    font-size: 44px;
}

.empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-soft);
}

.empty-desc {
    margin: 0;
    max-width: 460px;
    color: var(--muted);
    font-size: 13.5px;
}

.empty-action {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 12px;
}

.alert {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-left-width: 3px;
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    color: var(--text-soft);
    font-size: 13.5px;
    margin-bottom: 14px;
}

.alert.info {
    border-left-color: var(--primary);
    background: var(--primary-soft);
}

.alert.warn {
    border-left-color: var(--warn);
    background: var(--warn-soft);
    color: #fde68a;
}

.alert.danger {
    border-left-color: var(--danger);
    background: var(--danger-soft);
    color: #fecaca;
}

.alert.success {
    border-left-color: var(--success);
    background: var(--success-soft);
    color: #bbf7d0;
}

.form-error {
    margin-top: 12px;
    padding: 9px 12px;
    border-radius: 8px;
    background: var(--danger-soft);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
    font-size: 13.5px;
}

.form-error[hidden] {
    display: none;
}

/* ---------------------------------------------------------------- *
 * 首页 Hero
 * ---------------------------------------------------------------- */

.hero {
    position: relative;
    padding: 78px 0 64px;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -40% 30% auto;
    height: 420px;
    background: radial-gradient(closest-side, rgba(139, 92, 246, 0.22), transparent);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.hero-title {
    font-size: 42px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    max-width: 900px;
    word-break: break-word;
}

.hero-sub {
    max-width: 640px;
    color: var(--muted);
    font-size: 16px;
    margin: 0;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}

.hero-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    max-width: var(--container);
    margin: 0 auto 0;
    padding: 14px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    font-size: 14px;
}

/* ---------------------------------------------------------------- *
 * 套餐
 * ---------------------------------------------------------------- */

.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.plan-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.plan-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.plan-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.plan-head h3 {
    font-size: 18px;
    word-break: break-word;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}

.plan-price .price {
    font-size: 32px;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: #fff;
    line-height: 1.1;
}

.plan-price .price-unit {
    color: var(--muted);
    font-size: 13px;
}

.spec-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
}

.spec-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
}

.spec-list li::before {
    content: "✓";
    color: var(--success);
    font-size: 12px;
}

.period-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.chip {
    padding: 5px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: transparent;
    color: var(--text-soft);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

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

.chip.active {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: #bfdbfe;
}

.plan-content {
    color: var(--muted);
    font-size: 13.5px;
}

.plan-content img {
    border-radius: 8px;
}

.plan-card .btn.block {
    margin-top: auto;
}

/* ---------------------------------------------------------------- *
 * 公告 / 帮助文档列表
 * ---------------------------------------------------------------- */

.split {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.notice-list,
.kb-list {
    display: flex;
    flex-direction: column;
}

.notice-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 4px;
    border-bottom: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 14px;
}

.notice-item:last-child {
    border-bottom: 0;
}

.notice-item:hover {
    color: var(--text);
}

.notice-item:hover .notice-title {
    color: var(--primary);
}

.notice-date {
    flex: none;
    color: var(--muted);
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
}

.notice-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notice-arrow {
    flex: none;
    color: var(--border-strong);
    transition: transform 0.15s ease, color 0.15s ease;
}

.notice-item:hover .notice-arrow,
.notice-card:hover .notice-arrow {
    transform: translateX(3px);
    color: var(--primary);
}

.notice-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.notice-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--text);
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.notice-card:hover {
    color: var(--text);
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.notice-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.notice-card h3 {
    font-size: 16px;
    word-break: break-word;
}

.notice-card p {
    color: var(--muted);
    font-size: 13.5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kb-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    color: var(--text);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.kb-card:hover {
    color: var(--text);
    border-color: var(--primary);
    background: var(--primary-soft);
}

.kb-list .kb-card + .kb-card {
    margin-top: 8px;
}

.kb-cat {
    align-self: flex-start;
    padding: 0 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.8;
}

.kb-title {
    font-size: 14.5px;
    font-weight: 550;
    word-break: break-word;
}

.kb-meta {
    color: var(--muted);
    font-size: 12.5px;
}

.kb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.kb-group {
    margin-bottom: 28px;
}

.kb-group > h2 {
    font-size: 16px;
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 3px solid var(--primary);
}

.search-row {
    margin-bottom: 22px;
    max-width: 520px;
}

.back-link {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 13.5px;
}

.back-link:hover {
    color: var(--primary);
}

/* ---------------------------------------------------------------- *
 * 文章（公告 / 文档详情）
 * ---------------------------------------------------------------- */

.article {
    padding: 30px;
}

.article-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.article-head h1 {
    font-size: 26px;
    word-break: break-word;
}

.article-body {
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.85;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
    margin: 24px 0 10px;
}

.article-body h1 {
    font-size: 22px;
}

.article-body h2 {
    font-size: 19px;
}

.article-body h3 {
    font-size: 16.5px;
}

.article-body p {
    margin: 0 0 12px;
}

.article-body ul,
.article-body ol {
    margin: 0 0 12px;
    padding-left: 22px;
}

.article-body ul {
    list-style: disc;
}

.article-body ol {
    list-style: decimal;
}

.article-body li {
    margin: 4px 0;
}

.article-body a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-body img {
    max-width: 100%;
    border-radius: 10px;
    margin: 8px 0;
}

.article-body blockquote {
    margin: 12px 0;
    padding: 8px 16px;
    border-left: 3px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0 8px 8px 0;
    color: var(--muted);
}

.article-body pre {
    margin: 12px 0;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #0c0f14;
    overflow: auto;
    font-size: 13px;
    line-height: 1.6;
}

.article-body code {
    padding: 1px 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.07);
}

.article-body pre code {
    padding: 0;
    background: none;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 13.5px;
}

.article-body th,
.article-body td {
    padding: 8px 10px;
    border: 1px solid var(--border);
    text-align: left;
}

.article-body th {
    background: var(--bg-soft);
}

.article-body hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

/* ---------------------------------------------------------------- *
 * 登录 / 注册 / 找回密码
 * ---------------------------------------------------------------- */

.auth-page {
    display: flex;
    justify-content: center;
    padding-top: 56px;
    padding-bottom: 80px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 30px;
}

.auth-card h1 {
    font-size: 24px;
    margin-bottom: 6px;
}

.auth-card > p.muted {
    margin-bottom: 20px;
    font-size: 14px;
}

.auth-alt {
    margin-top: 18px;
    text-align: center;
    color: var(--muted);
    font-size: 13.5px;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13.5px;
    color: var(--text-soft);
}

.field > span:first-child {
    color: var(--muted);
}

.form-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
}

.form-row.between {
    justify-content: space-between;
    flex-wrap: wrap;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
    font-size: 13.5px;
    cursor: pointer;
    user-select: none;
}

.check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.input-row {
    display: flex;
    gap: 8px;
}

.input-row .input {
    flex: 1;
    min-width: 0;
}

.captcha-slot {
    margin: 2px 0;
}

.captcha-widget {
    min-height: 0;
}

.captcha-widget:empty {
    display: none;
}

/* ---------------------------------------------------------------- *
 * 用户中心
 * ---------------------------------------------------------------- */

.dash-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.traffic {
    padding: 4px 0 8px;
}

.traffic-head,
.traffic-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
}

.traffic-head {
    margin-bottom: 8px;
}

.traffic-head span:last-child,
.traffic-foot span:last-child {
    color: var(--text-soft);
    font-variant-numeric: tabular-nums;
}

.traffic-foot {
    margin-top: 6px;
    font-size: 12.5px;
}

.progress {
    position: relative;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    transition: width 0.4s ease;
}

.progress > span.danger {
    background: linear-gradient(90deg, #f97316, var(--danger));
}

.sub-card .card-actions {
    margin-top: 14px;
}

.account-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
}

.account-email {
    font-size: 15px;
    font-weight: 550;
    word-break: break-all;
}

.copy-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.copy-row .input {
    flex: 1;
    min-width: 0;
}

.subscribe-block .row {
    margin-top: 12px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
    align-items: start;
}

/* ---------------------------------------------------------------- *
 * 订单
 * ---------------------------------------------------------------- */

.tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.tab {
    padding: 6px 14px;
    border-radius: 999px;
    color: var(--text-soft);
    font-size: 13.5px;
    white-space: nowrap;
}

.tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.tab.active {
    color: #fff;
    background: var(--primary-soft);
    border: 1px solid rgba(59, 130, 246, 0.4);
    padding: 5px 13px;
}

.order-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 20px;
}

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

.order-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 15px;
    min-width: 0;
}

.order-title b {
    font-weight: 600;
    word-break: break-word;
}

.order-amount {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    color: var(--muted);
    font-size: 13px;
}

.order-meta span {
    word-break: break-all;
}

.order-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

/* ---------------------------------------------------------------- *
 * 邀请
 * ---------------------------------------------------------------- */

.invite-card {
    margin-top: 4px;
}

.invite-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.invite-item {
    display: grid;
    grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
    gap: 10px 16px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
}

.invite-code {
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 600;
    color: #bfdbfe;
    word-break: break-all;
}

.invite-meta {
    grid-column: 1 / -1;
}

.invite-item .copy-row {
    grid-column: 2;
    grid-row: 1;
}

/* ---------------------------------------------------------------- *
 * 弹层 / Toast
 * ---------------------------------------------------------------- */

#modal-root,
#toast-root {
    position: relative;
    z-index: 1000;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(5, 7, 10, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: xpn-fade 0.15s ease;
}

.modal {
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    animation: xpn-pop 0.16s ease;
    overflow: hidden;
}

.modal.modal-wide {
    max-width: 620px;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-head h3 {
    font-size: 16px;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    font-size: 14px;
}

.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
}

.confirm-text {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.7;
}

.pay-summary {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
}

.pay-summary .kv {
    border-bottom: 0;
    padding: 3px 0;
}

.pay-summary .amount {
    font-size: 18px;
    color: #fff;
}

.pay-methods > p {
    margin-bottom: 10px;
}

.pay-method {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
}

.pay-method input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pay-method-body {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    color: var(--text-soft);
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.pay-method:hover .pay-method-body {
    border-color: var(--primary);
    color: var(--text);
}

.pay-method input[type="radio"]:checked + .pay-method-body {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: #fff;
}

.pay-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.pay-emoji {
    font-size: 18px;
    line-height: 1;
}

.pay-result-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pay-result-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.pay-code {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #0c0f14;
    max-height: 180px;
    overflow: auto;
}

.pay-code code {
    color: #93c5fd;
    word-break: break-all;
    white-space: pre-wrap;
    font-size: 12.5px;
}

#toast-root {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none;
}

.toast {
    max-width: min(360px, calc(100vw - 36px));
    padding: 10px 16px;
    border: 1px solid var(--border-strong);
    border-left-width: 3px;
    border-radius: var(--radius-sm);
    background: var(--card-2);
    color: var(--text);
    font-size: 13.5px;
    box-shadow: var(--shadow);
    animation: xpn-slide-in 0.18s ease;
    word-break: break-word;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.warn {
    border-left-color: var(--warn);
}

.toast.error,
.toast.danger {
    border-left-color: var(--danger);
}

.toast.info {
    border-left-color: var(--primary);
}

.toast-out {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

@keyframes xpn-fade {
    from {
        opacity: 0;
    }
}

@keyframes xpn-pop {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
}

@keyframes xpn-slide-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

/* ---------------------------------------------------------------- *
 * 页脚
 * ---------------------------------------------------------------- */

.site-footer {
    margin-top: 40px;
    padding: 36px 0 28px;
    border-top: 1px solid var(--border);
    background: rgba(10, 12, 16, 0.6);
    font-size: 13.5px;
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
    gap: 24px;
    align-items: start;
}

.footer-brand {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.footer-brand-block p {
    max-width: 420px;
}

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

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

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

.footer-copy {
    text-align: right;
}

/* ---------------------------------------------------------------- *
 * 响应式
 * ---------------------------------------------------------------- */

@media (max-width: 980px) {
    .split,
    .dash-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .dash-grid .span-2 {
        grid-column: auto;
    }

    .stat-grid.five {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .footer-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .footer-copy {
        text-align: left;
    }

    .invite-item {
        grid-template-columns: minmax(0, 1fr);
    }

    .invite-item .copy-row {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 760px) {
    .site-header .header-inner {
        gap: 12px;
    }

    .nav-toggle {
        display: flex;
    }

    .hide-mobile {
        display: none !important;
    }

    .site-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        z-index: 49;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 12px 16px 18px;
        background: var(--bg-soft);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
    }

    body.nav-open .site-nav {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav-link {
        padding: 11px 12px;
        border-radius: var(--radius-sm);
    }

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

    .hero-title {
        font-size: 30px;
    }

    .hero-sub {
        font-size: 14.5px;
    }

    .section {
        padding: 36px 0;
    }

    .page {
        padding: 24px 16px 48px;
    }

    .card {
        padding: 18px;
    }

    .article {
        padding: 20px;
    }

    .article-head h1 {
        font-size: 21px;
    }

    .auth-page {
        padding-top: 28px;
        padding-bottom: 48px;
    }

    .auth-card {
        padding: 22px;
    }

    .kv-grid {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .plan-grid,
    .kb-grid,
    .notice-cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .copy-row {
        flex-wrap: wrap;
    }

    .copy-row .input {
        flex-basis: 100%;
    }

    .modal-backdrop {
        padding: 0;
        align-items: flex-end;
    }

    .modal {
        max-width: none;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-height: 92vh;
    }

    #toast-root {
        left: 12px;
        right: 12px;
        bottom: 12px;
        align-items: stretch;
    }

    .toast {
        max-width: none;
    }
}

@media (max-width: 420px) {
    .brand-text {
        max-width: 130px;
        font-size: 15px;
    }

    .hero-title {
        font-size: 26px;
    }

    .stat-grid,
    .stat-grid.five {
        grid-template-columns: minmax(0, 1fr);
    }
}

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