/* ==========================================================
   xukun.top 站点公共样式（与 NSEVS 介绍页同一套设计语言）
   使用：<link rel="stylesheet" href="/static/css/site.css">
   ========================================================== */

:root {
    --bg: #050913;
    --bg-soft: #080f1d;
    --panel: #0b1424;
    --panel-2: #0e1a2e;
    --line: rgba(148, 163, 184, .16);
    --line-strong: rgba(34, 211, 238, .32);
    --text: #e9f2ff;
    --muted: #93a7c2;
    --dim: #64748b;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --green: #34d399;
    --amber: #fbbf24;
    --red: #fb7185;
    --violet: #a78bfa;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 24px 80px rgba(0, 0, 0, .42);
    --max: 1180px;
    --font: "Inter", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
    -webkit-text-size-adjust: 100%;
}

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

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(900px 600px at 78% 2%, rgba(34, 211, 238, .13), transparent 62%),
        radial-gradient(800px 520px at 8% 18%, rgba(59, 130, 246, .12), transparent 60%),
        radial-gradient(700px 480px at 55% 100%, rgba(167, 139, 250, .08), transparent 65%),
        linear-gradient(180deg, #050913 0%, #060c18 45%, #050913 100%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .38;
    background-image:
        linear-gradient(rgba(148, 163, 184, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, .055) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 18%, #000 20%, transparent 76%);
    mask-image: radial-gradient(ellipse at 50% 18%, #000 20%, transparent 76%);
}

::selection {
    background: rgba(34, 211, 238, .28);
    color: #fff;
}

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

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3, h4, p, ul, ol, figure {
    margin: 0;
}

ul, ol {
    padding: 0;
    list-style: none;
}

.wrap,
.container {
    width: min(var(--max), calc(100% - 48px));
    margin: 0 auto;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 10px;
    z-index: 200;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--cyan);
    color: #04101a;
    font-weight: 700;
}

.skip-link:focus {
    left: 12px;
}

/* ---------- 顶部导航 ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(5, 9, 19, .82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.header-inner,
.site-header .wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: max-content;
}

.brand img,
.brand-mark img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .35));
}

.brand-name {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-name strong {
    font-size: 16px;
    letter-spacing: .04em;
}

.brand-name span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .12em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    overflow-x: auto;
    scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
    display: none;
}

.site-nav a {
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
    transition: color .2s ease, background .2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-current {
    color: var(--text);
    background: rgba(148, 163, 184, .1);
}

.site-nav a.is-current {
    color: var(--cyan);
}

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

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

.btn.primary,
.btn-primary {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #04101a;
    box-shadow: 0 12px 34px rgba(34, 211, 238, .22);
}

.btn.primary:hover,
.btn-primary:hover {
    box-shadow: 0 16px 42px rgba(34, 211, 238, .34);
}

.btn.ghost,
.btn-ghost {
    border-color: var(--line);
    background: rgba(148, 163, 184, .06);
    color: var(--text);
}

.btn.ghost:hover,
.btn-ghost:hover {
    border-color: rgba(148, 163, 184, .3);
    background: rgba(148, 163, 184, .12);
}

.btn-quiet {
    color: var(--muted);
    padding-inline: 8px;
}

/* ---------- 首屏 ---------- */
.hero {
    position: relative;
    padding: 76px 0 46px;
    overflow: hidden;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 6px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(148, 163, 184, .06);
    color: var(--muted);
    font: 600 11.5px/1 var(--mono);
    letter-spacing: .18em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 12px var(--cyan);
}

.hero h1 {
    margin: 20px 0 16px;
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    line-height: 1.16;
    letter-spacing: -.03em;
}

.hero h1 span {
    background: linear-gradient(120deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lede {
    max-width: 660px;
    color: #a8bbd4;
    font-size: clamp(15px, 1.6vw, 17px);
    line-height: 1.85;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 30px 0 20px;
}

.quick {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick a {
    display: inline-block;
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(148, 163, 184, .05);
    color: var(--muted);
    font-size: 13px;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.quick a:hover {
    border-color: var(--line-strong);
    background: rgba(34, 211, 238, .08);
    color: var(--cyan);
}

/* ---------- 区块 ---------- */
.block {
    padding: 42px 0 6px;
}

.block-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 18px;
}

h2 {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: clamp(1.15rem, 2vw, 1.35rem);
    letter-spacing: .01em;
}

h2::before {
    content: "";
    width: 4px;
    height: 20px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--cyan), var(--blue));
    box-shadow: 0 0 14px rgba(34, 211, 238, .45);
}

.hint {
    color: var(--dim);
    font: 500 12px/1.6 var(--mono);
    letter-spacing: .08em;
}

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

.card {
    padding: 22px 22px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(14, 26, 46, .86), rgba(11, 20, 36, .9));
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .35);
}

.card h3 {
    margin-bottom: 10px;
    color: var(--text);
    font-size: 15px;
    letter-spacing: .02em;
}

.card ul {
    margin: 0;
}

.card li + li {
    border-top: 1px solid rgba(148, 163, 184, .1);
}

.card li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    color: var(--muted);
    font-size: 14.5px;
    transition: color .2s ease;
}

.card li a:hover {
    color: var(--cyan);
}

.tag {
    flex: none;
    padding: 2px 9px;
    border: 1px solid rgba(34, 211, 238, .3);
    border-radius: 999px;
    background: rgba(34, 211, 238, .1);
    color: var(--cyan);
    font: 500 11px/1.6 var(--mono);
}

.ext::after {
    content: "↗";
    margin-left: 6px;
    font-size: 12px;
    opacity: .55;
}

/* ---------- 折叠区 ---------- */
details.more,
details.panel {
    margin-top: 18px;
    padding: 0 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(11, 20, 36, .72);
}

details.more summary,
details.panel summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 0;
    font-size: 15px;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}

details.more summary::-webkit-details-marker,
details.panel summary::-webkit-details-marker {
    display: none;
}

details.more summary::before,
details.panel summary::before {
    content: "▸";
    color: var(--cyan);
    transition: transform .2s ease;
}

details.more[open] summary::before,
details.panel[open] summary::before {
    transform: rotate(90deg);
}

details[open] > summary {
    border-bottom: 1px solid rgba(148, 163, 184, .1);
}

.table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 0;
}

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

th, td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font: 600 11.5px/1.7 var(--mono);
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
}

td {
    color: #b6c7dd;
}

tbody tr:hover {
    background: rgba(34, 211, 238, .045);
}

.feed-list {
    margin: 0;
    padding: 16px 0;
    columns: 2;
    column-gap: 30px;
    font-size: 14px;
}

.feed-list li {
    padding: 6px 0;
    break-inside: avoid;
}

.feed-list a {
    color: var(--muted);
}

.feed-list a:hover {
    color: var(--cyan);
}

/* ---------- 页脚 ---------- */
footer,
.site-footer {
    margin-top: 64px;
    padding: 34px 0 44px;
    border-top: 1px solid var(--line);
    background: rgba(8, 15, 29, .55);
    color: var(--muted);
    font-size: 13.5px;
}

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

.footer-bottom {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, .1);
    color: var(--dim);
    font-size: 12.5px;
}

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

/* 页脚访问统计 */
.footer-stats {
    color: var(--dim);
    font-size: 12.5px;
}

.footer-stats b {
    color: var(--cyan);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ---------- 子页面标题区 ---------- */
.page-hero {
    padding: 58px 0 34px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(34, 211, 238, .05), transparent 70%);
}

.page-hero h1 {
    margin: 14px 0 12px;
    font-size: clamp(1.85rem, 3.4vw, 2.6rem);
    line-height: 1.25;
    letter-spacing: -.02em;
}

.page-hero p {
    max-width: 720px;
    color: #a8bbd4;
    font-size: 15px;
    line-height: 1.85;
}

.page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 16px;
    color: var(--dim);
    font: 500 11.5px/1.6 var(--mono);
    letter-spacing: .1em;
}

/* ---------- 正文文档样式（意识规范 / 银狐专题 / 新闻） ---------- */
.doc {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 44px 0 8px;
}

.doc section {
    padding: 26px 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(14, 26, 46, .82), rgba(11, 20, 36, .88));
}

.doc section > h2 {
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, .14);
    letter-spacing: 0;
}

.doc h3 {
    margin: 24px 0 10px;
    color: var(--cyan);
    font-size: 15px;
    letter-spacing: .01em;
}

.doc h3:first-of-type {
    margin-top: 0;
}

.doc p {
    margin: 10px 0;
    color: #b6c7dd;
    font-size: 14.5px;
    line-height: 1.9;
}

.doc strong,
.doc b {
    color: var(--text);
}

.doc em {
    color: var(--amber);
    font-style: normal;
}

.doc a {
    color: var(--cyan);
    border-bottom: 1px dashed rgba(34, 211, 238, .4);
}

.doc a:hover {
    border-bottom-color: var(--cyan);
}

.doc ul,
.doc ol {
    display: grid;
    gap: 7px;
    margin: 12px 0;
}

.doc li {
    position: relative;
    padding-left: 20px;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.85;
}

.doc ul > li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: .76em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(34, 211, 238, .75);
    box-shadow: 0 0 10px rgba(34, 211, 238, .45);
}

.doc ol {
    counter-reset: item;
}

.doc ol > li {
    counter-increment: item;
}

.doc ol > li::before {
    content: counter(item) ".";
    position: absolute;
    left: 0;
    color: var(--cyan);
    font: 600 12px/1.9 var(--mono);
}

.doc blockquote {
    margin: 16px 0;
    padding: 14px 18px;
    border-left: 3px solid var(--cyan);
    border-radius: 0 10px 10px 0;
    background: rgba(34, 211, 238, .07);
    color: #cfe2f5;
    font-size: 14px;
}

.doc code {
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(34, 211, 238, .1);
    color: #a5f3fc;
    font-family: var(--mono);
    font-size: .92em;
}

.doc .table-wrap {
    margin: 16px 0 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0 14px;
}

/* ---------- 新闻列表 ---------- */
.news-list {
    display: grid;
    gap: 14px;
    padding: 40px 0 8px;
}

.news-item {
    padding: 20px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(11, 20, 36, .72);
    transition: border-color .2s ease, transform .2s ease;
}

.news-item:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
}

.news-item h2 {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.6;
}

.news-item h2::before {
    display: none;
}

.news-item h2 a {
    color: var(--text);
}

.news-item h2 a:hover {
    color: var(--cyan);
}

.news-time {
    margin: 0 0 10px;
    color: var(--dim);
    font: 500 11.5px/1.6 var(--mono);
    letter-spacing: .06em;
}

.news-desc {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.85;
}

/* ---------- 正文里的提示块 ---------- */
.doc .memo-item {
    margin: 14px 0;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(148, 163, 184, .05);
}

.doc .memo-item > strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 14.5px;
}

.doc .memo-item ul {
    margin: 0;
}

.doc .tip-box {
    margin-top: 18px;
    padding: 14px 18px;
    border-left: 3px solid var(--amber);
    border-radius: 0 12px 12px 0;
    background: rgba(251, 191, 36, .08);
    color: #e6d6ae;
    font-size: 14px;
    line-height: 1.85;
}

.doc .tip-box strong {
    color: var(--amber);
}

.doc .tip-box em {
    color: #f4e3bd;
}

.doc .text-indent {
    text-indent: 2em;
}

.doc .code-block {
    margin: 14px 0;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #060d17;
    color: #a5f3fc;
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-all;
    overflow-x: auto;
}

.footer-note {
    margin-top: 10px;
    max-width: 420px;
    color: var(--dim);
    font-size: 12.5px;
    line-height: 1.7;
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
    .wrap,
    .container {
        width: calc(100% - 40px);
    }

    .header-inner,
    .site-header .wrap {
        gap: 12px;
        padding: 10px 0;
        min-height: auto;
        flex-wrap: wrap;
    }

    .site-nav {
        width: 100%;
        margin-left: 0;
        padding-bottom: 2px;
    }

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

    .hero h1 {
        font-size: clamp(2rem, 9vw, 2.8rem);
    }

    .actions .btn {
        flex: 1 1 auto;
    }

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

    .hint {
        display: none;
    }

    .feed-list {
        columns: 1;
    }

    .doc {
        padding-top: 28px;
    }

    .doc section {
        padding: 22px 18px;
    }

    .doc .table-wrap {
        margin: 14px 0 4px;
        padding: 0 10px;
    }

    .doc th,
    .doc td {
        padding: 8px 10px;
        font-size: 12.5px;
    }

    .page-hero {
        padding: 40px 0 26px;
    }

    .block {
        padding: 30px 0 4px;
    }

    .footer-main,
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

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

    * {
        transition: none !important;
        animation: none !important;
    }
}
