/* =========================================================
   BD6JYO · HamOnlineKits
   原创样式：深空蓝 + 无线电青 + 琥珀色点缀
   ========================================================= */

:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-2: #fbfcfd;
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #e6e9ef;
    --line-strong: #d3d9e2;
    --brand: #0f766e;
    --brand-strong: #115e59;
    --brand-soft: #ccfbf1;
    --accent: #f59e0b;
    --accent-soft: #fef3c7;
    --danger: #dc2626;
    --dark: #0b1220;
    --dark-2: #101a2e;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 26px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -18px rgba(15, 23, 42, .28);
    --shadow-lg: 0 24px 60px -28px rgba(15, 23, 42, .45);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    --max: 1140px;
}

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

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

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

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

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

a:hover {
    color: var(--brand-strong);
}

h1, h2, h3, h4 {
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

p {
    margin: 0;
}

ul, ol {
    margin: 0;
    padding: 0;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

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

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--dark);
    color: #fff;
    padding: 10px 16px;
    z-index: 100;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
}

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

.brand-text strong {
    font-size: 17px;
    letter-spacing: .04em;
}

.brand-text small {
    font-size: 10px;
    letter-spacing: .22em;
    color: var(--muted);
}

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

.site-nav a {
    padding: 8px 13px;
    border-radius: 999px;
    color: var(--ink-2);
    font-size: 14.5px;
    transition: background .15s ease, color .15s ease;
}

.site-nav a:hover {
    background: #eef2f6;
    color: var(--ink);
}

.site-nav a.is-active {
    color: var(--brand-strong);
    background: var(--brand-soft);
    font-weight: 600;
}

.site-nav .nav-admin {
    margin-left: 8px;
    border: 1px solid var(--line-strong);
}

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

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

/* ---------------- Hero ---------------- */

.hero {
    position: relative;
    overflow: hidden;
    color: #e8eef7;
    background:
        radial-gradient(900px 420px at 12% -10%, rgba(45, 212, 191, .22), transparent 60%),
        radial-gradient(700px 380px at 92% 8%, rgba(245, 158, 11, .16), transparent 62%),
        linear-gradient(160deg, #0b1220 0%, #0e1a2d 55%, #0b1220 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, .10) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, .10) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at 30% 20%, #000 0%, transparent 78%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 48px;
    align-items: center;
    padding-top: 74px;
    padding-bottom: 96px;
}

.kicker {
    font-size: 12px;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: #5eead4;
    margin-bottom: 14px;
}

.callsign {
    font-size: clamp(52px, 9vw, 92px);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    line-height: .95;
}

.hero-meta {
    margin-top: 16px;
    color: #a9b6c8;
    font-size: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
}

.hero-meta .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #475569;
}

.hero-lead {
    margin-top: 22px;
    max-width: 46ch;
    color: #cbd5e1;
    font-size: 17px;
}

.hero-actions {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-card {
    position: relative;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: var(--radius-lg);
    padding: 26px;
    background: linear-gradient(155deg, rgba(30, 41, 59, .72), rgba(15, 23, 42, .55));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), var(--shadow-lg);
}

.hero-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #94a3b8;
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    padding-bottom: 18px;
    border-bottom: 1px dashed rgba(148, 163, 184, .22);
}

.hero-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 20px;
    padding-top: 20px;
}

.hero-card-grid dt {
    color: #8494a8;
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.hero-card-grid dd {
    margin: 0;
    color: #e2e8f0;
    font-family: var(--mono);
    font-size: 15px;
    word-break: break-all;
}

.hero-wave {
    position: absolute;
    right: -40px;
    bottom: -56px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    border: 1px solid rgba(94, 234, 212, .18);
    box-shadow: 0 0 0 34px rgba(94, 234, 212, .05), 0 0 0 70px rgba(94, 234, 212, .035);
    pointer-events: none;
}

/* ---------------- 按钮 ---------------- */

.btn {
    --btn-bg: var(--brand);
    --btn-fg: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
    white-space: nowrap;
}

.btn:hover {
    color: var(--btn-fg);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px -12px rgba(15, 118, 110, .7);
}

.btn:active {
    transform: translateY(0);
}

.btn-ghost {
    background: transparent;
    border-color: rgba(148, 163, 184, .45);
    color: #e2e8f0;
}

.btn-ghost:hover {
    background: rgba(148, 163, 184, .12);
    color: #fff;
    box-shadow: none;
}

.btn-outline {
    background: #fff;
    border-color: var(--line-strong);
    color: var(--ink);
}

.btn-outline:hover {
    background: #f8fafc;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

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

.btn-danger {
    --btn-bg: var(--danger);
}

.btn-block {
    width: 100%;
}

/* ---------------- 查询条 ---------------- */

.quickbar {
    position: relative;
    margin-top: -46px;
    z-index: 5;
}

.quickbar-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 18px;
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 14px;
    align-items: end;
}

.quickbar-card .field {
    margin: 0;
}

/* ---------------- 统计条 ---------------- */

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    padding: 40px 0 8px;
}

.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}

.stat-value {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.stat-label {
    margin-top: 4px;
    font-size: 12.5px;
    color: var(--muted);
    letter-spacing: .06em;
}

/* ---------------- 区块 ---------------- */

.section {
    padding: 46px 0;
}

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

.section-title {
    font-size: 22px;
    font-weight: 750;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: "";
    width: 4px;
    height: 20px;
    border-radius: 4px;
    background: linear-gradient(var(--brand), #2dd4bf);
}

.section-more {
    font-size: 14px;
    color: var(--muted);
}

.section-more:hover {
    color: var(--brand);
}

/* ---------------- 文章卡片 ---------------- */

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.post-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--line-strong);
}

.post-cover {
    aspect-ratio: 16 / 9;
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(45, 212, 191, .34), transparent 55%),
        linear-gradient(140deg, #0f172a, #1e293b);
    position: relative;
    overflow: hidden;
}

.post-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, .14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, .14) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: .5;
}

.post-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.post-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 12.5px;
    color: var(--muted);
}

.post-title {
    font-size: 17.5px;
    font-weight: 700;
    line-height: 1.4;
}

.post-title a {
    color: var(--ink);
}

.post-title a:hover {
    color: var(--brand);
}

.post-summary {
    color: var(--ink-2);
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    background: #eef2f6;
    color: var(--ink-2);
    font-size: 11.5px;
    letter-spacing: .04em;
}

.tag-brand {
    background: var(--brand-soft);
    color: var(--brand-strong);
}

/* ---------------- 表格 ---------------- */

.table-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: auto;
    box-shadow: var(--shadow-sm);
}

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

.table th {
    text-align: left;
    font-size: 11.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
    white-space: nowrap;
}

.table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

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

.table tbody tr:hover {
    background: #f8fafc;
}

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

.table .call {
    font-weight: 700;
    letter-spacing: .04em;
}

/* ---------------- 通用卡片 / 空状态 ---------------- */

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.empty {
    text-align: center;
    padding: 46px 20px;
    color: var(--muted);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.empty strong {
    display: block;
    color: var(--ink-2);
    margin-bottom: 6px;
    font-size: 16px;
}

/* ---------------- 成果 ---------------- */

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

.work-card {
    display: flex;
    gap: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease;
}

.work-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.work-year {
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 700;
    color: var(--brand);
    min-width: 54px;
    padding-top: 2px;
}

.work-title {
    font-size: 16.5px;
    font-weight: 700;
    margin-bottom: 4px;
}

.work-sub {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.work-desc {
    color: var(--ink-2);
    font-size: 14px;
}

/* ---------------- 内页头部 ---------------- */

.page-head {
    background: linear-gradient(160deg, #0b1220, #101a2e);
    color: #e2e8f0;
    padding: 54px 0 46px;
    position: relative;
    overflow: hidden;
}

.page-head::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(94, 234, 212, .16) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(180deg, #000, transparent 85%);
}

.page-head .shell {
    position: relative;
}

.page-head h1 {
    font-size: clamp(28px, 4vw, 40px);
    color: #fff;
}

.page-head p {
    margin-top: 10px;
    color: #a9b6c8;
    max-width: 62ch;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 14px;
}

.breadcrumb a {
    color: #5eead4;
}

/* ---------------- 详情页 ---------------- */

.detail-wrap {
    padding: 34px 0 60px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.detail-hero {
    background: linear-gradient(150deg, #0b1220, #12203a);
    color: #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.detail-hero::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -70px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    box-shadow: 0 0 0 30px rgba(94, 234, 212, .06), 0 0 0 62px rgba(94, 234, 212, .04);
}

.detail-hero .label {
    color: #7dd3fc;
    font-size: 11.5px;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.detail-call {
    font-size: clamp(34px, 6vw, 52px);
    font-weight: 800;
    color: #fff;
    letter-spacing: .02em;
    margin: 8px 0 6px;
    font-family: var(--mono);
}

.detail-time {
    color: #a9b6c8;
    font-size: 14px;
}

.detail-cards {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.mini {
    background: rgba(148, 163, 184, .1);
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 12px;
    padding: 12px 14px;
}

.mini dt {
    font-size: 10.5px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #8494a8;
}

.mini dd {
    margin: 4px 0 0;
    font-family: var(--mono);
    font-size: 16px;
    color: #f1f5f9;
}

.info-block {
    margin-top: 22px;
}

.info-block h3 {
    font-size: 14px;
    letter-spacing: .06em;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.info-rows {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.info-row {
    background: var(--surface);
    padding: 13px 16px;
}

.info-row dt {
    font-size: 12px;
    color: var(--muted);
}

.info-row dd {
    margin: 3px 0 0;
    font-size: 14.5px;
    word-break: break-word;
}

/* 时间线 */

.timeline {
    list-style: none;
    position: relative;
    padding-left: 26px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--line);
}

.timeline li {
    position: relative;
    padding: 0 0 22px 0;
}

.timeline li:last-child {
    padding-bottom: 0;
}

.timeline .dot {
    position: absolute;
    left: -26px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--line-strong);
}

.timeline li.done .dot {
    background: var(--brand);
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, .12);
}

.timeline li.current .dot {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, .16);
}

.timeline .step-label {
    font-weight: 650;
    font-size: 15px;
}

.timeline .step-time {
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 2px;
}

.timeline li.pending .step-label {
    color: var(--muted);
    font-weight: 500;
}

/* 二维码 */

.qr-box {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.qr-box img {
    width: 108px;
    height: 108px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--line);
}

.qr-box .qr-text {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.7;
}

/* ---------------- 表单 ---------------- */

.field {
    margin-bottom: 16px;
}

.label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
    margin-bottom: 6px;
}

.label .req {
    color: var(--danger);
}

.input,
.select,
.textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 15px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, .13);
}

.textarea {
    min-height: 320px;
    resize: vertical;
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.7;
}

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

.error-text {
    color: var(--danger);
    font-size: 12.5px;
    margin-top: 4px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
}

.form-grid .span-2 {
    grid-column: 1 / -1;
}

fieldset.group {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px 4px;
    margin: 0 0 20px;
}

fieldset.group legend {
    padding: 0 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--brand);
}

.check {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    color: var(--ink-2);
    margin-bottom: 12px;
}

.check input {
    width: 17px;
    height: 17px;
    accent-color: var(--brand);
}

.flash {
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 18px;
    border: 1px solid;
}

.flash-ok {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.flash-err {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* ---------------- 文章正文 ---------------- */

.prose {
    font-size: 16.5px;
    line-height: 1.85;
    color: #1f2937;
}

.prose > * + * {
    margin-top: 1.1em;
}

.prose h2 {
    font-size: 24px;
    margin-top: 1.8em;
    padding-bottom: .35em;
    border-bottom: 1px solid var(--line);
}

.prose h3 {
    font-size: 19px;
    margin-top: 1.6em;
}

.prose p {
    margin: 0;
}

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

.prose ul,
.prose ol {
    padding-left: 1.4em;
}

.prose li + li {
    margin-top: .35em;
}

.prose blockquote {
    margin: 0;
    padding: 14px 20px;
    border-left: 4px solid var(--brand);
    background: var(--surface-2);
    color: var(--ink-2);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.prose pre {
    background: #0b1220;
    color: #e2e8f0;
    padding: 18px 20px;
    border-radius: var(--radius);
    overflow: auto;
    font-family: var(--mono);
    font-size: 13.5px;
    line-height: 1.7;
}

.prose code {
    font-family: var(--mono);
    font-size: .9em;
    background: #eef2f6;
    padding: 2px 6px;
    border-radius: 6px;
}

.prose pre code {
    background: none;
    padding: 0;
    font-size: inherit;
}

.prose img {
    border-radius: var(--radius);
    margin: 1.2em auto;
}

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

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

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

.prose hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: 2em 0;
}

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

.site-footer {
    margin-top: 60px;
    background: var(--dark);
    color: #94a3b8;
    padding: 40px 0 26px;
    font-size: 14px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(148, 163, 184, .16);
}

.footer-brand {
    color: #e2e8f0;
    font-size: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: baseline;
}

.footer-brand strong {
    font-family: var(--mono);
    letter-spacing: .06em;
}

.footer-note {
    margin-top: 6px;
    font-size: 12.5px;
    color: #64748b;
}

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

.footer-meta a {
    color: #cbd5e1;
    font-size: 13.5px;
}

.footer-meta a:hover {
    color: #5eead4;
}

.footer-legal {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding-top: 16px;
    font-size: 12px;
    color: #64748b;
}

.footer-legal a {
    color: #94a3b8;
}

/* ---------------- 博客列表 / 文章页 ---------------- */

.article {
    max-width: 760px;
    margin: 0 auto;
}

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

.article-title {
    font-size: clamp(28px, 4.4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.article-meta {
    margin-top: 14px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13.5px;
}

.article-tags {
    margin-top: 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 34px;
}

.pagination a,
.pagination span {
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    font-size: 14px;
    color: var(--ink-2);
}

.pagination .is-current {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    font-weight: 700;
}

/* ---------------- 登录 ---------------- */

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(800px 400px at 10% 0%, rgba(45, 212, 191, .18), transparent 60%),
        radial-gradient(700px 380px at 100% 100%, rgba(245, 158, 11, .12), transparent 60%),
        #0b1220;
    padding: 30px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 22px;
    padding: 34px 32px;
    box-shadow: var(--shadow-lg);
}

.login-card h1 {
    font-size: 22px;
}

.login-card .sub {
    color: var(--muted);
    font-size: 13.5px;
    margin: 6px 0 24px;
}

.login-foot {
    margin-top: 18px;
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
}

/* ---------------- 后台 ---------------- */

.admin-shell {
    display: grid;
    grid-template-columns: 238px minmax(0, 1fr);
    min-height: 100vh;
    background: #f3f5f8;
}

.admin-side {
    background: #0b1220;
    color: #cbd5e1;
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: auto;
}

.admin-side .admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    padding: 6px 8px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, .16);
    margin-bottom: 12px;
}

.admin-side .admin-brand strong {
    font-family: var(--mono);
    letter-spacing: .06em;
}

.admin-side .admin-brand small {
    display: block;
    color: #64748b;
    font-size: 10px;
    letter-spacing: .2em;
}

.admin-side a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #cbd5e1;
    font-size: 14px;
}

.admin-side a:hover {
    background: rgba(148, 163, 184, .1);
    color: #fff;
}

.admin-side a.is-active {
    background: linear-gradient(90deg, rgba(15, 118, 110, .55), rgba(15, 118, 110, .12));
    color: #fff;
    font-weight: 600;
    box-shadow: inset 2px 0 0 #2dd4bf;
}

.admin-side .count {
    background: var(--accent);
    color: #422006;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 7px;
}

.admin-side .side-foot {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, .16);
    font-size: 12px;
    color: #64748b;
}

.admin-main {
    min-width: 0;
    padding: 26px 30px 50px;
}

.admin-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.admin-top h1 {
    font-size: 22px;
}

.admin-top .sub {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

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

.admin-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.admin-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}

.admin-card .n {
    font-size: 26px;
    font-weight: 800;
}

.admin-card .t {
    color: var(--muted);
    font-size: 12.5px;
}

.admin-grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.admin-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

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

.admin-panel-head h2 {
    font-size: 15.5px;
}

.admin-panel-body {
    padding: 20px;
}

.admin-panel .table {
    min-width: 0;
}

.actions-cell {
    white-space: nowrap;
}

.actions-cell a,
.actions-cell button {
    margin-right: 10px;
    font-size: 13px;
    color: var(--brand);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

/* 录入页：表单 + 右侧最近记录 */
.log-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: start;
}

.log-side {
    position: sticky;
    top: 88px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stats-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stats-mini > div {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
}

.stats-mini b {
    display: block;
    font-size: 20px;
    line-height: 1.2;
}

.stats-mini span {
    font-size: 11.5px;
    color: var(--muted);
}

.table.compact th,
.table.compact td {
    padding: 9px 10px;
    font-size: 12.5px;
}

.table.compact {
    min-width: 0;
}

@media (max-width: 1180px) {
    .log-layout {
        grid-template-columns: 1fr;
    }

    .log-side {
        position: static;
    }
}

/* 录入页紧凑模式：整屏尽量放下全部字段 */
.compact-form .field {
    margin-bottom: 8px;
}

.compact-form .input,
.compact-form .select {
    padding: 7px 9px;
    font-size: 14px;
}

.compact-form .label {
    font-size: 12px;
    margin-bottom: 3px;
}

.compact-form fieldset.group {
    padding: 10px 14px 2px;
    margin-bottom: 10px;
}

.compact-form fieldset.group legend {
    font-size: 10.5px;
    padding: 0 6px;
}

.compact-form .form-grid {
    gap: 0 14px;
}

.compact-form .textarea {
    min-height: 54px;
}

.compact-form .hint {
    display: none;
}

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

@media (max-width: 900px) {
    .form-grid.three {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 620px) {
    .form-grid.three {
        grid-template-columns: 1fr;
    }
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 4px;
    padding: 10px 0 6px;
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, rgba(243, 245, 248, 0), var(--bg) 40%);
}

.form-buttons {
    margin-left: auto;
    display: flex;
    gap: 10px;
    align-items: center;
}

.actions-cell button.danger {
    color: var(--danger);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: #eef2f6;
    color: var(--ink-2);
    white-space: nowrap;
}

.status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .6;
}

.status-ok {
    background: #ecfdf5;
    color: #047857;
}

.status-warn {
    background: #fffbeb;
    color: #b45309;
}

.status-info {
    background: #eff6ff;
    color: #1d4ed8;
}

.status-muted {
    background: #f1f5f9;
    color: #64748b;
}

.status-danger {
    background: #fef2f2;
    color: #b91c1c;
}

.status-rejected {
    background: #e2e8f0;
    color: #1f2937;
    border: 1px solid #cbd5e1;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.report-box {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
}

.report-box summary {
    cursor: pointer;
    font-size: 13.5px;
    color: var(--brand);
    list-style: none;
}

.report-box summary::-webkit-details-marker {
    display: none;
}

.report-box summary::before {
    content: "＋ ";
    font-weight: 700;
}

.report-box[open] summary::before {
    content: "－ ";
}

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

@media (max-width: 980px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 34px;
        padding-top: 56px;
        padding-bottom: 80px;
    }

    .hero-card {
        max-width: 520px;
    }

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

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

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

    .admin-side {
        position: static;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        padding: 12px;
    }

    .admin-side .admin-brand {
        border: none;
        margin: 0;
        padding: 4px 8px;
    }

    .admin-side a {
        padding: 8px 10px;
        font-size: 13px;
    }

    .admin-side .side-foot {
        display: none;
    }

    .admin-main {
        padding: 20px;
    }

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

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

@media (max-width: 760px) {
    .nav-toggle {
        display: flex;
    }

    .site-nav {
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--line);
        padding: 10px 16px 16px;
        flex-direction: column;
        align-items: stretch;
        display: none;
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        padding: 11px 12px;
    }

    .site-nav .nav-admin {
        margin-left: 0;
        text-align: center;
    }

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

    .stats {
        grid-template-columns: repeat(2, 1fr);
        padding-top: 30px;
    }

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

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

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

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

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

    .section {
        padding: 34px 0;
    }

    .hero-lead {
        font-size: 15.5px;
    }

    .table {
        min-width: 560px;
    }

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

    .admin-top {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 460px) {
    .shell {
        padding: 0 16px;
    }

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

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

    .qr-box {
        flex-direction: column;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
