@charset "UTF-8";
/* ==========================================================================
   GTAmap — 全球多年度行政区划数据集 · 官网共享样式
   GTAmap — Global Multi-year Administrative Divisions Dataset · shared styles

   纯 CSS，无外部依赖（无 CDN 字体/图标），离线可用。
   Pure CSS, no external dependencies, works offline.

   共享类名约定（map.html / feedback.html 可直接复用）：
     Layout   : .container .section .section-head .grid .grid-2 .grid-3 .grid-4
     Header   : .site-header .site-brand .site-nav .nav-link .nav-toggle
     Footer   : .site-footer .footer-grid .footer-col
     Blocks   : .card .card-title .card-body .hero .stat-grid .stat-card
     Controls : .btn .btn-primary .btn-ghost .btn-sm .btn-danger
     Data     : .data-table .table-wrap .badge .badge-a|b|c|d .sha .mono
     Misc     : .muted .lead .eyebrow .notice .notice-warn .notice-info .tag
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计令牌 / Design tokens
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light dark;

  --bg: #f4f7fa;
  --bg-alt: #eaf0f6;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #d8e1ea;
  --border-strong: #bccbd9;

  --text: #16222e;
  --text-muted: #5a6b7c;
  --text-faint: #7b8b9a;

  --brand: #0b6b6b;
  --brand-dark: #075454;
  --brand-soft: #e2f1f0;
  --brand-contrast: #ffffff;

  --accent: #b45309;
  --accent-soft: #fdf1e3;

  --link: #0a5f8a;

  --grade-a: #14713c;
  --grade-a-bg: #e3f5e9;
  --grade-b: #1b5fa8;
  --grade-b-bg: #e4eefb;
  --grade-c: #92500a;
  --grade-c-bg: #fdf0dd;
  --grade-d: #a32020;
  --grade-d-bg: #fbe6e6;

  --shadow-sm: 0 1px 2px rgba(16, 34, 48, 0.06), 0 1px 3px rgba(16, 34, 48, 0.04);
  --shadow-md: 0 4px 12px rgba(16, 34, 48, 0.08), 0 1px 3px rgba(16, 34, 48, 0.05);
  --shadow-lg: 0 12px 32px rgba(16, 34, 48, 0.12);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --container: 1180px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "WenQuanYi Micro Hei", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

/* 深色模式：跟随系统，也可由 data-theme 强制覆盖
   Dark mode: follows the system, overridable with data-theme */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e141b;
    --bg-alt: #131c25;
    --surface: #17202a;
    --surface-2: #1c2632;
    --border: #2b3846;
    --border-strong: #3d4d5e;

    --text: #e7eef5;
    --text-muted: #9fb0c0;
    --text-faint: #7d8fa1;

    --brand: #3fb6ad;
    --brand-dark: #2d938c;
    --brand-soft: #16302f;
    --brand-contrast: #08171a;

    --accent: #e8a33d;
    --accent-soft: #33270f;

    --link: #6fb6e8;

    --grade-a: #6bd39a;
    --grade-a-bg: #14301f;
    --grade-b: #7db4ee;
    --grade-b-bg: #12263d;
    --grade-c: #e8b96a;
    --grade-c-bg: #33260f;
    --grade-d: #f08c8c;
    --grade-d-bg: #3a1a1a;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 14px 34px rgba(0, 0, 0, 0.55);
  }
}

:root[data-theme="dark"] {
  --bg: #0e141b;
  --bg-alt: #131c25;
  --surface: #17202a;
  --surface-2: #1c2632;
  --border: #2b3846;
  --border-strong: #3d4d5e;
  --text: #e7eef5;
  --text-muted: #9fb0c0;
  --text-faint: #7d8fa1;
  --brand: #3fb6ad;
  --brand-dark: #2d938c;
  --brand-soft: #16302f;
  --brand-contrast: #08171a;
  --accent: #e8a33d;
  --accent-soft: #33270f;
  --link: #6fb6e8;
  --grade-a: #6bd39a;
  --grade-a-bg: #14301f;
  --grade-b: #7db4ee;
  --grade-b-bg: #12263d;
  --grade-c: #e8b96a;
  --grade-c-bg: #33260f;
  --grade-d: #f08c8c;
  --grade-d-bg: #3a1a1a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 14px 34px rgba(0, 0, 0, 0.55);
}

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

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

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

h1, h2, h3, h4 {
  line-height: 1.3;
  margin: 0 0 0.6em;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 1.05rem + 1.2vw, 1.85rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

p { margin: 0 0 1em; }

a { color: var(--link); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

img, svg { max-width: 100%; height: auto; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

code, kbd, pre, .mono { font-family: var(--font-mono); font-size: 0.875em; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: var(--brand-contrast);
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   3. 布局 / Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 3.5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-tight { padding: 2.25rem 0; }

.section-head { max-width: 780px; margin-bottom: 2rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--text-muted); margin-bottom: 0; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.75rem;
}

.lead { font-size: 1.08rem; color: var(--text-muted); }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

/* --------------------------------------------------------------------------
   4. 顶部导航 / Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
/* 不支持 color-mix 的浏览器回退 / fallback */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header { background: var(--surface); }
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 62px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.06rem;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.site-brand:hover { text-decoration: none; color: var(--brand); }
.site-brand .brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--brand-contrast);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  flex: none;
}
.site-brand .brand-sub {
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0;
  display: none;
}
@media (min-width: 1080px) { .site-brand .brand-sub { display: inline; } }

.site-nav { display: flex; align-items: center; gap: 0.25rem; }

.nav-link {
  display: inline-block;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--bg-alt); text-decoration: none; }
.nav-link[aria-current="page"] {
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 700;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.4rem 0.6rem;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.4;
  font-family: inherit;
  margin-left: 0.25rem;
}
.theme-toggle:hover { color: var(--text); border-color: var(--brand); }

/* 语言选择器 / language selector — 与 .theme-toggle 同一视觉体系 */
.lang-select {
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: 0.35rem 0.45rem;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.4;
  font-family: inherit;
  margin-left: 0.25rem;
  max-width: 9.5rem;
  vertical-align: middle;
}
.lang-select:hover { color: var(--text); border-color: var(--brand); }
.lang-select:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
/* 页脚/正文中的备用位置 */
.site-footer .lang-select { margin-top: 0.5rem; color: var(--text-muted); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-block; order: 2; }
  .theme-toggle { order: 3; }
  .lang-select { order: 3; }
  .site-brand { order: 1; }
  .site-nav {
    order: 4;
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 0.5rem 12px 0.9rem;
  }
  .site-nav.is-open { display: flex; }
  .nav-link { padding: 0.7rem 0.75rem; font-size: 1rem; }
  .site-header .container { flex-wrap: wrap; position: relative; }
}

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 4rem 0 3rem;
  background:
    radial-gradient(1100px 420px at 12% -12%, var(--brand-soft), transparent 62%),
    radial-gradient(900px 380px at 92% 8%, var(--accent-soft), transparent 58%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero h1 { max-width: 20ch; margin-bottom: 0.5rem; }
.hero .lead { max-width: 62ch; font-size: 1.12rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.hero-meta {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   6. 按钮 / Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.15rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}
.btn:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-contrast);
}
.btn-primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: var(--brand-contrast);
}
.btn-ghost { background: transparent; }
.btn-sm { padding: 0.32rem 0.7rem; font-size: 0.82rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   7. 卡片 / Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}
.card-hover:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand);
  transform: translateY(-2px);
}
.card-hover { transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease; }

.card-title { display: flex; align-items: center; gap: 0.55rem; font-size: 1.06rem; margin-bottom: 0.5rem; }
.card-title .icon { font-size: 1.15rem; line-height: 1; }
.card-body { color: var(--text-muted); font-size: 0.94rem; }
.card-body p:last-child, .card > p:last-child { margin-bottom: 0; }

.card-flush { padding: 0; overflow: hidden; }
.card-head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.card-head h3, .card-head h2 { margin: 0; font-size: 1.02rem; }
.card-pad { padding: 1.25rem; }

/* 统计数字 / Stat tiles */
.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-sm);
}
.stat-value {
  font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 0.9rem; color: var(--text-muted); margin-top: 0.3rem; }
.stat-note { font-size: 0.78rem; color: var(--text-faint); margin-top: 0.45rem; }

/* --------------------------------------------------------------------------
   8. 徽标 / Badges · 标签
   -------------------------------------------------------------------------- */
.badge {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge-a { color: var(--grade-a); background: var(--grade-a-bg); border-color: var(--grade-a); }
.badge-b { color: var(--grade-b); background: var(--grade-b-bg); border-color: var(--grade-b); }
.badge-c { color: var(--grade-c); background: var(--grade-c-bg); border-color: var(--grade-c); }
.badge-d { color: var(--grade-d); background: var(--grade-d-bg); border-color: var(--grade-d); }
.badge-neutral {
  color: var(--text-muted);
  background: var(--bg-alt);
  border-color: var(--border-strong);
}
.badge-brand { color: var(--brand); background: var(--brand-soft); border-color: var(--brand); }
.badge-accent { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }

.tag {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-family: var(--font-mono);
}

/* 等级图例 / Grade legend */
.grade-legend { display: grid; gap: 0.75rem; }
.grade-row {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
}
.grade-row:first-child { border-top: 0; }
.grade-row .badge { font-size: 0.85rem; padding: 0.2rem 0; text-align: center; }
.grade-row .grade-title { font-weight: 700; font-size: 0.94rem; margin: 0 0 0.15rem; color: var(--text); }
.grade-row .grade-desc { margin: 0; color: var(--text-muted); font-size: 0.9rem; }
.grade-row .grade-count { color: var(--text-faint); font-size: 0.82rem; font-weight: 500; }

/* --------------------------------------------------------------------------
   9. 表格 / Tables
   -------------------------------------------------------------------------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 640px;
}
table.data-table.table-wide { min-width: 1040px; }
table.data-table tr.is-missing td { opacity: 0.6; }
.data-table caption {
  caption-side: top;
  text-align: left;
  padding: 0.85rem 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
}
.data-table th, .data-table td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table thead th {
  background: var(--surface-2);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .row-title { font-weight: 700; white-space: nowrap; }
.data-table .iso {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-left: 0.4rem;
}

/* --------------------------------------------------------------------------
   10. 控件 / Controls
   -------------------------------------------------------------------------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1rem;
}
.toolbar .grow { flex: 1 1 220px; }

.input, .select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
  line-height: 1.5;
}
.input:focus, .select:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.select { cursor: pointer; }

.pill-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pill {
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.5;
}
.pill:hover { border-color: var(--brand); color: var(--brand); }
.pill[aria-pressed="true"], .pill-active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-contrast);
}
.pill .count { opacity: 0.75; font-weight: 500; }

/* --------------------------------------------------------------------------
   11. 代码块 / Code blocks
   -------------------------------------------------------------------------- */
.code-block {
  position: relative;
  background: #101a24;
  color: #dbe7f1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.code-block .code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.9rem;
  background: #0b131b;
  border-bottom: 1px solid #24313d;
  color: #8fa3b5;
  font-size: 0.8rem;
}
.code-block pre {
  margin: 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.65;
  tab-size: 4;
}
.code-block code { color: inherit; background: none; padding: 0; font-size: inherit; }

.copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid #33455a;
  border-radius: var(--radius-sm);
  color: #c6d6e4;
  font-size: 0.78rem;
  font-family: inherit;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  line-height: 1.5;
  white-space: nowrap;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.copy-btn.is-done { color: #7ee2a8; border-color: #2f7a51; }

.copy-btn-inline {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-family: inherit;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  line-height: 1.5;
  white-space: nowrap;
}
.copy-btn-inline:hover { color: var(--brand); border-color: var(--brand); }
.copy-btn-inline.is-done { color: var(--grade-a); border-color: var(--grade-a); }

p code, li code, td code, dd code {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   12. 提示条 / Notices
   -------------------------------------------------------------------------- */
.notice {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.notice strong { color: var(--text); }
.notice-info { border-left-color: var(--grade-b); }
.notice-warn { border-left-color: var(--accent); background: var(--accent-soft); }
.notice-ok { border-left-color: var(--grade-a); }
.notice-icon { flex: none; font-size: 1rem; line-height: 1.6; }
.notice > div { min-width: 0; }
.notice p:last-child { margin-bottom: 0; }

.sha {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-faint);
  overflow-wrap: anywhere;
  word-break: break-all;
}
.sha-full { display: none; }
.sha.is-expanded .sha-short { display: none; }
.sha.is-expanded .sha-full { display: inline; }

/* --------------------------------------------------------------------------
   13. 页脚 / Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
}
.footer-col h3 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 0.8rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.45rem; }
.footer-col a { color: var(--text-muted); }
.footer-col a:hover { color: var(--brand); }
.footer-col p { color: var(--text-muted); }
.footer-cite {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  margin-top: 0.75rem;
  overflow-wrap: anywhere;
}
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  color: var(--text-faint);
  font-size: 0.82rem;
}

/* --------------------------------------------------------------------------
   14. 时间线 / Timeline（版本历史）
   -------------------------------------------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.4rem; border-left: 2px solid var(--border); }
.timeline > li { position: relative; padding: 0 0 1.75rem 0.4rem; }
.timeline > li::before {
  content: "";
  position: absolute;
  left: -1.78rem;
  top: 0.5rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--brand-soft);
}
.timeline h3 { margin-bottom: 0.2rem; }
.timeline .when { font-size: 0.8rem; color: var(--text-faint); font-family: var(--font-mono); }
.timeline ul { margin: 0.5rem 0 0; padding-left: 1.1rem; color: var(--text-muted); font-size: 0.92rem; }
.timeline ul li { margin-bottom: 0.3rem; }

/* --------------------------------------------------------------------------
   15. 列表 / Lists
   -------------------------------------------------------------------------- */
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.55rem;
  color: var(--text-muted);
  font-size: 0.94rem;
}
.check-list li::before {
  content: "▸";
  position: absolute;
  left: 0.2rem;
  color: var(--brand);
  font-weight: 700;
}
.check-list strong { color: var(--text); }

/* --------------------------------------------------------------------------
   16. 下载页专用 / Download page
   -------------------------------------------------------------------------- */
.dl-method { margin-bottom: 3rem; }
.dl-method > header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}
.dl-method > header h2 { margin: 0; }
.method-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--brand-contrast);
  font-size: 0.85rem;
  font-weight: 800;
  flex: none;
}

.result-count { font-size: 0.85rem; color: var(--text-muted); margin: 0.75rem 0; }
.result-count strong { color: var(--text); }

.empty-state {
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.empty-state .big { font-size: 1.8rem; display: block; margin-bottom: 0.5rem; }

.row-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.file-path {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-faint);
  overflow-wrap: anywhere;
}

.filter-count { font-variant-numeric: tabular-nums; }

.load-more { margin-top: 1rem; text-align: center; }

/* --------------------------------------------------------------------------
   17. 响应式 / Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  body { font-size: 15.5px; }
  .section { padding: 2.5rem 0; }
  .hero { padding: 2.75rem 0 2.25rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .card { padding: 1.15rem; }
  .card-pad { padding: 1rem; }
  .data-table { font-size: 0.86rem; }
  .data-table th, .data-table td { padding: 0.6rem 0.65rem; }
  .timeline { padding-left: 1.1rem; }
}

@media (max-width: 420px) {
  .hero-actions .btn { width: 100%; }
  .stat-value { font-size: 1.75rem; }
}

/* 打印 / Print */
@media print {
  .site-header, .site-footer, .nav-toggle, .theme-toggle, .hero-actions, .copy-btn { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .table-wrap { box-shadow: none; border-color: #999; }
  a { color: #000; text-decoration: underline; }
}

/* 减少动效 / Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .card-hover:hover { transform: none; }
}
