/* ── 数字玄学 · Digital Metaphysics ─────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;600;700&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=JetBrains+Mono:wght@300;400&display=swap');

:root {
  --bg-deep:     #06080f;
  --bg-card:     #0d1120;
  --bg-nav:      rgba(6,8,15,0.88);
  --gold:        #c9a227;
  --gold-dim:    #7a6118;
  --gold-pale:   #e8d48a;
  --text:        #dcd6c8;
  --text-muted:  #7a7468;
  --border:      rgba(201,162,39,0.18);
  --border-hover:rgba(201,162,39,0.55);
  --red-accent:  #8b2020;
  --teal-accent: #1a5c5a;
  --radius:      6px;
  --nav-h:       64px;
}

/* ── 亮色主题 ──────────────────────────────────────── */
[data-theme="light"] {
  --bg-deep:     #f8f6f0;
  --bg-card:     #ffffff;
  --bg-nav:      rgba(248,246,240,0.92);
  --gold:        #9b7518;
  --gold-dim:    #6b4f10;
  --gold-pale:   #7a5c18;
  --text:        #1e1810;
  --text-muted:  #7d7468;
  --border:      rgba(155,117,24,0.22);
  --border-hover:rgba(155,117,24,0.55);
}

/* 亮色模式隐藏星场背景 */
[data-theme="light"] body::before { opacity: 0; }

/* ── 主题切换按钮 ──────────────────────────────────── */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  color: var(--gold);
  margin-left: 1.5rem;
  transition: all 0.3s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--gold);
  background: rgba(201,162,39,0.08);
  transform: rotate(15deg);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Serif SC', 'Cormorant Garamond', serif;
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.4s, color 0.4s;
  line-height: 1.8;
}

/* ── STAR FIELD BACKGROUND ──────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(201,162,39,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 10%, rgba(201,162,39,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 50%, rgba(201,162,39,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 70%, rgba(201,162,39,0.25) 0%, transparent 100%),
    radial-gradient(1px 1px at 75% 85%, rgba(201,162,39,0.2) 0%, transparent 100%),
    radial-gradient(2px 2px at 10% 80%, rgba(201,162,39,0.15) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 45%, rgba(255,255,255,0.08) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 20%, rgba(255,255,255,0.06) 0%, transparent 100%);
  pointer-events: none; z-index: 0;
}

/* ── NAVIGATION ─────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  backdrop-filter: blur(20px) saturate(1.4);
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex; align-items: center;
  transition: background 0.4s, border-color 0.4s;
}

.nav-inner {
  max-width: 1100px; width: 100%;
  margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none;
}

.nav-logo-mark {
  width: 36px; height: 36px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--gold);
  position: relative;
}

.nav-logo-mark::after {
  content: '';
  position: absolute;
  width: 42px; height: 42px;
  border: 1px solid rgba(201,162,39,0.25);
  border-radius: 50%;
  animation: pulse-ring 3s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50%       { transform: scale(1.15); opacity: 0.1; }
}

.nav-logo-text {
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  font-weight: 300;
}

.nav-logo-text strong {
  color: var(--gold);
  font-weight: 600;
}

.nav-links {
  display: flex; align-items: center; gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  transition: color 0.2s;
  font-family: 'JetBrains Mono', monospace;
}

.nav-links a:hover,
.nav-links a.active { color: var(--gold); }

/* ── PAGE LAYOUT ─────────────────────────────────────────── */
.page {
  padding-top: var(--nav-h);
  position: relative; z-index: 1;
}

.container {
  max-width: 1100px; margin: 0 auto;
  padding: 0 2rem;
}

/* ── SECTION DIVIDER ─────────────────────────────────────── */
.divider {
  display: flex; align-items: center; gap: 1rem;
  margin: 3rem 0 2.5rem;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

.divider-symbol {
  color: var(--gold);
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  white-space: nowrap;
}

/* ── HERO SECTION ────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex; align-items: center;
  padding: 4rem 0;
  position: relative;
}

.hero-bg-glyph {
  position: absolute; right: -60px; top: 50%;
  transform: translateY(-50%);
  font-size: 28rem;
  opacity: 0.018;
  color: var(--gold);
  font-family: 'Noto Serif SC';
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.hero-content {
  max-width: 680px;
}

.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 0.75rem;
}

.hero-eyebrow::before {
  content: '';
  width: 40px; height: 1px;
  background: var(--gold);
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 300;
  line-height: 1.25;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.hero-title em {
  font-style: italic;
  color: var(--gold-pale);
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 2.5rem;
  font-weight: 300;
  max-width: 540px;
}

.hero-tags {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.hero-tag {
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 2rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  transition: all 0.2s;
}

.hero-tag:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.75rem 1.75rem;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: var(--radius);
  transition: all 0.22s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-gold {
  background: var(--gold);
  color: #0a0a0f;
  font-weight: 600;
}

.btn-gold:hover {
  background: var(--gold-pale);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(201,162,39,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.hero-cta {
  display: flex; gap: 1rem; flex-wrap: wrap;
}

/* ── STATS BAR ───────────────────────────────────────────── */
.stats-bar {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.stat-item {
  text-align: center;
  padding: 1.25rem;
}

.stat-num {
  font-size: 2rem;
  font-weight: 300;
  color: var(--gold);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  font-family: 'JetBrains Mono', monospace;
}

/* ── CARD GRID ───────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s;
  cursor: pointer;
  text-decoration: none;
  display: block;
  position: relative;
}

.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.card:hover::before { opacity: 1; }

.card-body {
  padding: 1.5rem;
}

.card-meta {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  letter-spacing: 0.05em;
  border: 1px solid;
}

.tag-tech    { color: #4db8b0; border-color: rgba(77,184,176,0.4); background: rgba(77,184,176,0.08); }
.tag-meta    { color: #c9a227; border-color: rgba(201,162,39,0.4); background: rgba(201,162,39,0.08); }
.tag-ai      { color: #9b7fd4; border-color: rgba(155,127,212,0.4); background: rgba(155,127,212,0.08); }
.tag-tool    { color: #e07b54; border-color: rgba(224,123,84,0.4);  background: rgba(224,123,84,0.08); }
.tag-combo   { color: #6aaa6a; border-color: rgba(106,170,106,0.4); background: rgba(106,170,106,0.08); }

.card-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-left: auto;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.6rem;
  line-height: 1.5;
  transition: color 0.2s;
}

.card:hover .card-title { color: var(--gold-pale); }

.card-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── TOOL CARDS ──────────────────────────────────────────── */
.tool-card .card-body {
  padding: 1.75rem;
}

.tool-icon {
  width: 48px; height: 48px;
  background: rgba(201,162,39,0.08);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  transition: all 0.25s;
}

.card:hover .tool-icon {
  background: rgba(201,162,39,0.14);
  border-color: var(--border-hover);
}

.tool-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
  transition: color 0.2s;
}

.card:hover .tool-title { color: var(--gold-pale); }

.tool-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.tool-footer {
  display: flex; align-items: center; justify-content: space-between;
}

.tool-status {
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
}

.status-live {
  color: #4db84d;
  border: 1px solid rgba(77,184,77,0.35);
  background: rgba(77,184,77,0.08);
}

.status-soon {
  color: var(--text-muted);
  border: 1px solid rgba(122,116,104,0.35);
  background: rgba(122,116,104,0.08);
}

/* ── FILTER BAR ──────────────────────────────────────────── */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 0.65rem;
  margin-bottom: 2rem;
}

.filter-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  padding: 0.35rem 1rem;
  border-radius: 2rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.2s;
}

.filter-btn:hover { border-color: var(--gold-dim); color: var(--text); }
.filter-btn.active { border-color: var(--gold); color: var(--gold); background: rgba(201,162,39,0.08); }

/* ── ARTICLE PAGE ────────────────────────────────────────── */
.article-header {
  padding: 5rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.article-header .hero-eyebrow { margin-bottom: 1.25rem; }

.article-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  line-height: 1.35;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.article-header .meta-row {
  display: flex; align-items: center; gap: 1.25rem;
  flex-wrap: wrap;
}

.article-body {
  max-width: 720px;
}

/* ── ARTICLE LAYOUT WITH TOC ────────────────────────── */
.article-layout {
  display: flex; gap: 3rem;
  align-items: flex-start;
}

.article-layout .article-main {
  flex: 1; min-width: 0;
}

.article-toc {
  width: 200px; flex-shrink: 0;
  position: sticky; top: calc(var(--nav-h) + 2rem);
  max-height: calc(100vh - var(--nav-h) - 4rem);
  overflow-y: auto;
  padding-left: 1.5rem;
  border-left: 1px solid var(--border);
}

.article-toc-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.article-toc a {
  display: block;
  padding: 0.25rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  line-height: 1.5;
  border-left: 2px solid transparent;
  padding-left: 0.6rem;
  margin-left: -0.6rem;
}

.article-toc a:hover { color: var(--text); }
.article-toc a.active {
  color: var(--gold);
  border-left-color: var(--gold);
}

@media (max-width: 1024px) {
  .article-layout { flex-direction: column; }
  .article-toc {
    position: static; width: 100%; max-height: none;
    border-left: none; padding-left: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem; margin-bottom: 1rem;
  }
  .article-toc a { display: inline-block; margin-right: 1rem; border-left: none; padding-left: 0; margin-left: 0; }
  .article-toc a.active { border-bottom: 2px solid var(--gold); }
}

.article-body h2 {
  font-size: 1.45rem;
  font-weight: 400;
  color: var(--gold-pale);
  margin: 2.5rem 0 1rem;
  display: flex; align-items: center; gap: 0.75rem;
}

.article-body h2::before {
  content: '';
  width: 3px; height: 1.2em;
  background: var(--gold);
  border-radius: 2px;
  flex-shrink: 0;
}

.article-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.75rem 0 0.75rem;
  color: var(--text);
}

.article-body p {
  margin-bottom: 1.4rem;
  font-size: 1rem;
  color: #c0bab0;
  font-weight: 300;
}

.article-body blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 2px solid var(--gold);
  background: rgba(201,162,39,0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-muted);
}

.article-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  background: rgba(255,255,255,0.06);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--gold-pale);
}

.article-body pre {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.75rem 0;
}

.article-body pre code {
  background: none;
  padding: 0;
  font-size: 0.88rem;
  color: #b8d4a8;
}

.article-body ul, .article-body ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: #c0bab0;
  font-weight: 300;
}

.article-body li { margin-bottom: 0.5rem; line-height: 1.8; }

.article-body .callout {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.callout-title {
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
}

/* ── TOOL PAGE ───────────────────────────────────────────── */
.tool-page {
  padding: 4rem 0;
}

.tool-page-header {
  display: flex; align-items: flex-start; gap: 1.5rem;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.tool-page-icon {
  width: 64px; height: 64px;
  background: rgba(201,162,39,0.08);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.tool-page-title { font-size: 1.8rem; font-weight: 300; margin-bottom: 0.4rem; }
.tool-page-desc  { color: var(--text-muted); font-size: 0.95rem; }

/* ── FORM ELEMENTS ───────────────────────────────────────── */
.form-group { margin-bottom: 1.5rem; }

.form-label {
  display: block;
  font-size: 0.82rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Noto Serif SC', serif;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(201,162,39,0.08);
}

.form-textarea { min-height: 120px; resize: vertical; }

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

/* ── RESULT PANEL ────────────────────────────────────────── */
.result-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 2rem;
  display: none;
}

.result-panel.visible { display: block; }

.result-panel h3 {
  font-size: 1rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.result-content {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.85;
  white-space: pre-wrap;
}

.loading-spinner {
  display: flex; align-items: center; gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
  padding: 4.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.page-header-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 300;
  margin-bottom: 0.75rem;
}

.page-header p {
  color: var(--text-muted);
  max-width: 560px;
  font-weight: 300;
  font-size: 0.95rem;
}

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 0;
  margin-top: 6rem;
  position: relative; z-index: 1;
}

.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 1.5rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}

/* ── Footer Stats ──────────────────────────────────── */
.footer-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1.5rem 2rem 0.5rem;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto;
}

.footer-stat-item {
  text-align: center;
}

.footer-stat-num {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--gold);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 0.2rem;
  display: block;
}

.footer-stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  font-family: 'JetBrains Mono', monospace;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
}

.footer-links {
  display: flex; gap: 2rem; list-style: none;
}

.footer-links a {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

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

.footer-icp {
  flex: 1;
  text-align: center;
}

.footer-icp a {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.footer-icp a:hover { color: var(--gold); }

.footer-gongan {
  flex: 1;
  text-align: center;
}

.footer-gongan a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.footer-gongan a:hover { color: var(--gold); }

.gongan-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── SECTION HEADER ──────────────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.03em;
}

.section-link {
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--gold-dim);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}

.section-link:hover { color: var(--gold); }

/* ── MOBILE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .stats-bar { grid-template-columns: repeat(5, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
  .form-row  { grid-template-columns: 1fr; }
  .tool-page-header { flex-direction: column; }
  .hero-bg-glyph { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-icp { order: 3; }
}

/* ── UTILITY ─────────────────────────────────────────────── */
.mt-1  { margin-top: 0.5rem;  }
.mt-2  { margin-top: 1rem;    }
.mt-3  { margin-top: 1.5rem;  }
.mt-4  { margin-top: 2rem;    }
.mb-4  { margin-bottom: 2rem; }
.text-gold { color: var(--gold); }
.text-muted{ color: var(--text-muted); }
.hidden { display: none; }

/* ── MEDIA: IMAGES ─────────────────────────────────────── */
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 1.5rem 0;
  display: block;
}

.article-body figure {
  margin: 2rem 0;
  text-align: center;
}

.article-body figcaption {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
}

/* ── MEDIA: VIDEO ──────────────────────────────────────── */
.article-body video {
  max-width: 100%;
  border-radius: var(--radius);
  display: block;
  margin: 1.5rem 0;
}

.article-body iframe {
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 1.5rem 0;
  aspect-ratio: 16/9;
  width: 100%;
  height: auto;
}

/* ── TABLES ────────────────────────────────────────────── */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.article-body th {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.6rem 1rem;
  text-align: left;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.article-body td {
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  color: var(--text);
}

.article-body tr:nth-child(even) td {
  background: rgba(201,162,39,0.03);
}

/* ── CODE HIGHLIGHT OVERRIDE ───────────────────────────── */
.article-body .codehilite {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  margin: 1.75rem 0;
  overflow-x: auto;
}

.article-body .codehilite pre {
  margin: 0;
  padding: 1.5rem;
  background: none;
  border: none;
}

.article-body .codehilite code {
  background: none;
  padding: 0;
  font-size: 0.88rem;
  color: #b8d4a8;
}

/* ── BACK TO TOP ───────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 42px;
  height: 42px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 50;
  font-size: 1.1rem;
  text-decoration: none;
}

.back-to-top.visible {
  opacity: 1;
}

.back-to-top:hover {
  border-color: var(--gold);
  background: rgba(201,162,39,0.1);
}
