@charset "UTF-8";
/* ==========================================================================
   南极帝国政府 · 全站样式表
   默认浅色主题；系统开启深色模式时（prefers-color-scheme: dark）自动切换。
   所有颜色都走变量，改主题只需改 :root 两处。
   ========================================================================== */

/* ── 设计变量 ───────────────────────────────────────────────────────── */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --soft: #f8f9fb;
  --line: #e8eaed;
  --line-strong: #d2d6dc;
  --text: #1a1d21;
  --body-text: #374151;
  --muted: #6b7280;
  --quote-text: #4b5563;
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --blue-soft: #eff4ff;
  --notice-line: #dbe6fe;
  --notice-text: #1e3a8a;
  --green: #059669;
  --green-soft: rgba(5, 150, 105, .16);
  --amber: #b45309;
  --amber-soft: rgba(180, 83, 9, .12);
  --nav-bg: rgba(255, 255, 255, .9);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .12);
  --radius: 10px;
  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  /* 未手动选择时跟随系统；手动选了浅色则屏蔽 */
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1115;
    --surface: #151a21;
    --soft: #171c24;
    --line: #262c36;
    --line-strong: #3a4250;
    --text: #e9ecf1;
    --body-text: #c3cad6;
    --muted: #8b95a6;
    --quote-text: #aab3c2;
    --blue: #6b9bff;
    --blue-hover: #8ab0ff;
    --blue-soft: #17213a;
    --notice-line: #26375e;
    --notice-text: #c0d0f7;
    --green: #34d399;
    --green-soft: rgba(52, 211, 153, .18);
    --amber: #fbbf24;
    --amber-soft: rgba(251, 191, 36, .14);
    --nav-bg: rgba(15, 17, 21, .86);
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  }
}

/* 手动切换：优先级高于系统设置 */
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0f1115;
    --surface: #151a21;
    --soft: #171c24;
    --line: #262c36;
    --line-strong: #3a4250;
    --text: #e9ecf1;
    --body-text: #c3cad6;
    --muted: #8b95a6;
    --quote-text: #aab3c2;
    --blue: #6b9bff;
    --blue-hover: #8ab0ff;
    --blue-soft: #17213a;
    --notice-line: #26375e;
    --notice-text: #c0d0f7;
    --green: #34d399;
    --green-soft: rgba(52, 211, 153, .18);
    --amber: #fbbf24;
    --amber-soft: rgba(251, 191, 36, .14);
    --nav-bg: rgba(15, 17, 21, .86);
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
}

/* ── 基础 ───────────────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  animation: page-in .34s ease both;
}

a { text-decoration: none; color: inherit; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }

::selection { background: var(--blue-soft); color: var(--text); }

/* 页面过渡：进入淡入，跳转淡出（见 site.js） */
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
body.leaving {
  opacity: 0 !important;
  animation: none;
  transition: opacity .16s ease;
}

/* ── 导航 ───────────────────────────────────────────────────────────── */
.nav-wrap {
  position: sticky; top: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  z-index: 50;
}

.nav {
  max-width: var(--wrap); margin: 0 auto; padding: 0 28px; height: 62px;
  display: flex; align-items: center; justify-content: space-between;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 600; letter-spacing: .3px;
}

.brand-icon {
  width: 30px; height: 30px; border: 1.5px solid var(--blue); border-radius: 7px;
  display: grid; place-items: center; color: var(--blue); font-size: 15px;
}

.menu { display: flex; gap: 26px; font-size: 13.5px; color: var(--muted); margin-left: auto; }

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

/* 深浅色切换按钮 */
.theme-toggle {
  width: 38px; height: 38px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--muted);
  font-size: 15px; line-height: 1; cursor: pointer;
  transition: color .15s, border-color .15s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--line-strong); }
.theme-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.menu a { transition: color .15s; }
.menu a:hover, .menu a.on { color: var(--text); }

/* 移动端菜单 */
.nav-toggle {
  display: none; width: 38px; height: 38px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--text);
  font-size: 16px; line-height: 1; cursor: pointer;
}
.nav-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.mobile-menu { display: none; border-top: 1px solid var(--line); background: var(--surface); }
.mobile-menu a {
  display: block; padding: 13px 28px; font-size: 14px; color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover, .mobile-menu a.on { color: var(--text); }
.nav-wrap.open .mobile-menu { display: block; }

/* ── 容器与页头 ─────────────────────────────────────────────────────── */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

.page-head { padding: 64px 0 36px; border-bottom: 1px solid var(--line); }
.page-head .label {
  display: inline-block; font-size: 11.5px; letter-spacing: 1.2px; color: var(--blue);
  background: var(--blue-soft); padding: 5px 13px; border-radius: 30px;
  margin-bottom: 18px; font-weight: 500;
}
.page-head h1 { font-size: 34px; font-weight: 600; letter-spacing: .5px; margin-bottom: 10px; }
.page-head p { font-size: 15px; color: var(--muted); max-width: 660px; }

/* ── 首页 Hero ──────────────────────────────────────────────────────── */
.hero { padding: 80px 0 64px; border-bottom: 1px solid var(--line); }
.hero-label {
  display: inline-block; font-size: 11.5px; letter-spacing: 1.2px; color: var(--blue);
  background: var(--blue-soft); padding: 5px 13px; border-radius: 30px;
  margin-bottom: 24px; font-weight: 500;
}
.hero h1 {
  font-size: 42px; font-weight: 600; line-height: 1.28;
  letter-spacing: .5px; margin-bottom: 18px; max-width: 700px;
}
.hero h1 em { font-style: normal; color: var(--blue); }
.hero .lead { font-size: 16px; color: var(--muted); max-width: 620px; margin-bottom: 36px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 24px; border-radius: 8px; font-size: 14px; font-weight: 500;
  transition: all .16s; border: 1px solid transparent; cursor: pointer;
}
.btn-solid { background: var(--blue); color: #fff; }
.btn-solid:hover { background: var(--blue-hover); }
.btn-line { border-color: var(--line); color: var(--text); }
.btn-line:hover { background: var(--soft); }

/* ── 公告条 ─────────────────────────────────────────────────────────── */
.notice {
  margin: 36px 0 0; display: flex; align-items: center; gap: 12px;
  padding: 15px 22px; background: var(--blue-soft);
  border: 1px solid var(--notice-line); border-radius: var(--radius);
  font-size: 13.5px; color: var(--notice-text);
}
.notice i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  flex-shrink: 0; box-shadow: 0 0 0 3px var(--green-soft);
}
.notice.plain { background: var(--soft); border-color: var(--line); color: var(--muted); }
.notice.plain i { background: var(--muted); box-shadow: none; }

/* ── 数据条 ─────────────────────────────────────────────────────────── */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin: 44px 0;
}
.stat { padding: 26px 18px; text-align: center; background: var(--soft); }
.stat + .stat { border-left: 1px solid var(--line); }
.stat b {
  display: block; font-size: 27px; font-weight: 600; color: var(--blue);
  letter-spacing: -.5px; font-variant-numeric: tabular-nums;
}
.stat span { font-size: 12.5px; color: var(--muted); margin-top: 5px; display: block; }

/* ── 区块 ───────────────────────────────────────────────────────────── */
.block { padding: 52px 0; border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: none; }
.block-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 30px;
}
.block-head h2 { font-size: 19px; font-weight: 600; letter-spacing: .3px; }
.block-head small { font-size: 12.5px; color: var(--muted); letter-spacing: .5px; }
.block-head a { font-size: 12.5px; color: var(--blue); letter-spacing: .5px; }

/* ── 卡片 ───────────────────────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 24px; transition: all .18s;
}
.card:hover {
  border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px);
}
.card .ico {
  width: 38px; height: 38px; border-radius: 9px; background: var(--blue-soft);
  color: var(--blue); display: grid; place-items: center; font-size: 17px; margin-bottom: 18px;
}
.card h3 { font-size: 15px; font-weight: 600; margin-bottom: 7px; }
.card p { font-size: 13px; color: var(--muted); line-height: 1.6; flex-grow: 1; }
.card .card-btn {
  display: inline-block; margin-top: 18px; font-size: 13.5px;
  color: var(--blue); font-weight: 500; transition: opacity .15s;
}
.card .card-btn:hover { opacity: .75; }
.card .card-btn.muted { color: var(--muted); cursor: default; }
.card .card-btn.muted:hover { opacity: 1; }
.card .tagline { font-size: 12.5px; color: var(--muted); margin-top: 14px; }

/* ── 新闻列表 ───────────────────────────────────────────────────────── */
.news { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.news a {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 17px 24px; font-size: 14px; transition: background .15s;
  border-bottom: 1px solid var(--line);
}
.news a:last-child { border-bottom: none; }
.news a:hover { background: var(--soft); }
.news time {
  font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; flex-shrink: 0;
}

/* ── 理念 ───────────────────────────────────────────────────────────── */
.ideas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.idea {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; background: var(--soft);
}
.idea h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; color: var(--blue); }
.idea p { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ── 筛选器（政务公开） ─────────────────────────────────────────────── */
.filters { display: flex; gap: 10px; margin: 36px 0 24px; flex-wrap: wrap; }
.filters button {
  padding: 7px 18px; border-radius: 20px; font-size: 13.5px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  transition: all .15s;
}
.filters button:hover { border-color: var(--line-strong); color: var(--text); }
.filters button.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.filters button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ── 公告列表（政务公开） ───────────────────────────────────────────── */
.news-list {
  display: flex; flex-direction: column; gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.news-item {
  background: var(--surface); padding: 22px 28px;
  display: flex; flex-direction: column; gap: 8px; transition: background .15s;
}
.news-item:hover { background: var(--soft); }
.news-item .meta { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); }
.news-item .meta .tag { color: var(--blue); font-weight: 500; }
.news-item h3 { font-size: 16px; font-weight: 500; }
.news-item p { font-size: 13.5px; color: var(--muted); line-height: 1.6; }

/* ── 文档页（关于帝国） ─────────────────────────────────────────────── */
.doc-layout {
  display: grid; grid-template-columns: 220px 1fr; gap: 48px; padding: 44px 0 72px;
}
.toc { position: sticky; top: 86px; align-self: start; }
.toc h3 {
  font-size: 12px; letter-spacing: 1px; color: var(--muted);
  text-transform: uppercase; margin-bottom: 14px; font-weight: 600;
}
.toc ul { list-style: none; border-left: 2px solid var(--line); }
.toc li a {
  display: block; padding: 8px 0 8px 16px; font-size: 13.5px; color: var(--muted);
  border-left: 2px solid transparent; margin-left: -2px; transition: all .15s;
}
.toc li a:hover, .toc li a.on { color: var(--text); border-left-color: var(--blue); }

.doc-content section { margin-bottom: 52px; scroll-margin-top: 86px; }
.doc-content h2 {
  font-size: 21px; font-weight: 600; margin-bottom: 18px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line); letter-spacing: .3px;
}
.doc-content h3 { font-size: 15.5px; font-weight: 600; margin: 26px 0 10px; color: var(--blue); }
.doc-content p { font-size: 14.5px; color: var(--body-text); margin-bottom: 14px; }
.doc-content ul { margin: 0 0 16px 20px; font-size: 14.5px; color: var(--body-text); }
.doc-content li { margin-bottom: 7px; }
.doc-content blockquote {
  margin: 18px 0; padding: 14px 20px; background: var(--soft);
  border-left: 3px solid var(--blue); border-radius: 0 8px 8px 0;
  font-size: 14px; color: var(--quote-text); font-style: italic;
}
.doc-content hr { border: none; border-top: 1px solid var(--line); margin: 32px 0; }
.doc-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em; background: var(--soft); border: 1px solid var(--line);
  border-radius: 5px; padding: 1px 5px;
}

/* ── 状态表（数字枢纲） ─────────────────────────────────────────────── */
.table-wrap {
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow-x: auto; background: var(--surface);
}
table.status { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 620px; }
table.status th, table.status td {
  padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--line);
}
table.status thead th {
  background: var(--soft); font-size: 12.5px; font-weight: 600;
  letter-spacing: .4px; color: var(--muted);
}
table.status tbody tr:last-child td { border-bottom: none; }
table.status tbody tr:hover { background: var(--soft); }
table.status td.num, table.status td.time {
  font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap;
}

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 500; padding: 3px 11px; border-radius: 20px;
  background: var(--soft); color: var(--muted); border: 1px solid var(--line);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { color: var(--green); background: var(--green-soft); border-color: transparent; }
.badge.warn { color: var(--amber); background: var(--amber-soft); border-color: transparent; }

.section-note { font-size: 12.5px; color: var(--muted); margin-top: 16px; }

/* ── 404 ────────────────────────────────────────────────────────────── */
.error-page { text-align: center; padding: 92px 0 104px; }
.error-code {
  font-size: 96px; font-weight: 600; line-height: 1;
  letter-spacing: -2px; color: var(--blue); font-variant-numeric: tabular-nums;
}
.error-page h1 { font-size: 26px; font-weight: 600; margin: 18px 0 10px; }
.error-page p { font-size: 15px; color: var(--muted); margin-bottom: 30px; }
.error-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 34px; }
.error-nav { font-size: 13.5px; color: var(--muted); }
.error-nav a { color: var(--blue); margin: 0 9px; }
.error-nav a:hover { text-decoration: underline; }

/* ── 页脚 ───────────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--line); background: var(--soft); margin-top: 52px; }
.foot {
  max-width: var(--wrap); margin: 0 auto; padding: 36px 28px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px; font-size: 12.5px; color: var(--muted);
}
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-links a { transition: color .15s; }
.foot-links a:hover { color: var(--text); }

/* ── 响应式 ─────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .cards, .ideas { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .doc-layout { grid-template-columns: 1fr; gap: 28px; }
  .toc { position: static; }
  .page-head h1 { font-size: 26px; }
  .menu { display: none; }
  .nav-actions { margin-left: auto; }
  .nav-toggle { display: inline-flex; }
}

@media (max-width: 620px) {
  .hero { padding: 56px 0 44px; }
  .hero h1 { font-size: 30px; }
  .cards, .ideas { grid-template-columns: 1fr; }
  .news a { flex-direction: column; align-items: flex-start; gap: 5px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat + .stat { border-left: none; }
  .stat:nth-child(2) { border-left: 1px solid var(--line); }
  .stat:nth-child(3) { border-top: 1px solid var(--line); }
  .stat:nth-child(4) { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
  .error-code { font-size: 72px; }
  .nav, .wrap, .foot { padding-left: 20px; padding-right: 20px; }
  .mobile-menu a { padding-left: 20px; padding-right: 20px; }
}

/* ── 无障碍：尊重"减少动态效果" ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
  body.leaving { transition: none; }
  .card:hover { transform: none; }
  * { scroll-behavior: auto !important; }
}

@media print {
  .nav-wrap, footer, .filters { display: none; }
  body { animation: none; }
}
