@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

:root {
  --bg:       #0f1117;
  --bg2:      #13151e;
  --surface:  #1a1d28;
  --surface2: #1f2235;
  --border:   #252840;
  --border2:  #2e3250;
  --text:     #e8eaf2;
  --text-sub: #9095b0;
  --text-dim: #545878;
  --accent:   #6c8fff;
  --accent-h: #8ba5ff;
  --accent-bg: rgba(108,143,255,0.1);
  --accent-border: rgba(108,143,255,0.25);
  --green:    #4ade80;
  --green-bg: rgba(74,222,128,0.08);
  --amber:    #fbbf24;
  --amber-bg: rgba(251,191,36,0.08);
  --red:      #f87171;
  --red-bg:   rgba(248,113,113,0.08);
  --radius:   8px;
  --radius-lg: 12px;
  --sans: 'DM Sans', 'Noto Sans JP', sans-serif;
  --mono: 'DM Mono', monospace;
  --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.2);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: opacity .15s; }
a:hover { opacity: .8; }

/* ── Header ────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: 56px;
  background: rgba(15,17,23,0.92);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 0;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  letter-spacing: -.3px;
  white-space: nowrap;
  text-decoration: none;
  margin-right: 24px;
}

.site-logo:hover { opacity: 1; }

.logo-cat {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

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

.site-nav a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-sub);
  padding: 5px 12px;
  border-radius: 6px;
  transition: color .15s, background .15s;
  text-decoration: none;
}

.site-nav a:hover { color: var(--text); background: var(--surface); opacity: 1; }
.site-nav a.active { color: var(--text); background: var(--surface); }

.header-btns {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.header-blog-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text-sub) !important;
  font-size: 13px;
  font-weight: 500;
  transition: border-color .15s, color .15s, background .15s !important;
  text-decoration: none;
  opacity: 1 !important;
  white-space: nowrap;
}

.header-blog-btn:hover {
  border-color: var(--accent-border);
  color: var(--accent) !important;
  background: var(--accent-bg);
  opacity: 1 !important;
}

/* ハンバーガーボタン（スマホのみ表示） */
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text-sub);
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* スマホ用ドロワー */
@media (max-width: 680px) {
  .site-header { padding: 0 16px; }
  .site-logo { margin-right: auto; font-size: 14px; }

  .nav-toggle { display: flex; }

  .header-btns { display: none; }

  .site-nav {
    display: none;
    position: fixed;
    top: 56px;
    left: 0; right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 12px;
    z-index: 199;
  }

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

  .site-nav a {
    padding: 11px 24px;
    border-radius: 0;
    font-size: 14px;
  }

  .site-nav a:hover { background: var(--surface); }

}

/* ── Hero / First View ─────────────────────────── */
.hero {
  padding: 80px 24px 72px;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  font-family: var(--mono);
  letter-spacing: .3px;
  margin-bottom: 28px;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.8); }
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text);
}

.hero h1 .accent { color: var(--accent); }

.hero-desc {
  font-size: 16px;
  color: var(--text-sub);
  line-height: 1.75;
  margin-bottom: 40px;
  font-weight: 400;
}

/* Search */
.hero-search-wrap {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

.hero-search {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  padding: 14px 20px 14px 48px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-shadow: var(--shadow);
}

.hero-search::placeholder { color: var(--text-dim); }

.hero-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,143,255,.15), var(--shadow);
}

.hero-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
  width: 18px;
  height: 18px;
}

.hero-search-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--mono);
}

.hero-search-hint kbd {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid var(--border2);
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-dim);
}

/* Search dropdown */
.search-dropdown {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 6px);
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  display: none;
}

.search-dropdown.open { display: block; }

.sd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  cursor: pointer;
  transition: background .1s;
  border-bottom: 1px solid var(--border);
}

.sd-item:last-child { border-bottom: none; }
.sd-item:hover { background: var(--surface); }

.sd-id {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  min-width: 72px;
  flex-shrink: 0;
}

.sd-name {
  font-size: 13.5px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sd-type {
  margin-left: auto;
  flex-shrink: 0;
}

.sd-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

/* ── Section Commons ───────────────────────────── */
.section {
  padding: 64px 24px;
  border-top: 1px solid var(--border);
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.5px;
  color: var(--text);
  margin-bottom: 40px;
}

/* ── Stats / Chart section ─────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  transition: border-color .2s;
}

.stat-card:hover { border-color: var(--border2); }

.stat-num {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 500;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -1px;
}

.stat-label {
  font-size: 12.5px;
  color: var(--text-sub);
  font-weight: 400;
}

.stat-bar-wrap {
  margin-top: 14px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.stat-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 1s cubic-bezier(.4,0,.2,1);
}



/* ── About CWE section (トップページ) ──────────── */
.about-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 14px;
}

.about-lead {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.85;
}

.about-lead .highlight {
  display: inline-block;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: 4px;
  padding: 0 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  position: relative;
  top: -1px;
}

.about-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-size: 13.5px;
}

.about-table thead {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}

.about-table th {
  padding: 9px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--mono);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.about-table td {
  padding: 11px 16px;
  vertical-align: middle;
  color: var(--text-sub);
  line-height: 1.6;
  border-bottom: 1px solid var(--border);
}

.about-table tbody tr:last-child td { border-bottom: none; }
.about-table tbody tr { background: var(--surface); }
.about-table td:first-child { white-space: nowrap; width: 76px; }

.about-more-wrap { text-align: right; }

.about-more-link {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

.about-more-link:hover { opacity: .8; }

/* ── About page highlight ───────────────────────── */
.terms-wrap .highlight {
  display: inline-block;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: 4px;
  padding: 1px 7px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
}

/* ── Latest section ─────────────────────────────── */
.latest-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.latest-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 14px 20px;
  background: var(--bg2);
  cursor: pointer;
  transition: background .12s;
  text-decoration: none;
  color: inherit;
}

.latest-item:hover { background: var(--surface); }
.latest-item:hover { opacity: 1; }

.latest-id {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}

.latest-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-desc {
  font-size: 12px;
  color: var(--text-sub);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--accent);
  transition: gap .15s;
}

.view-all-link:hover { gap: 10px; opacity: 1; }

/* ── Badges ─────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 5px;
  white-space: nowrap;
  font-family: var(--mono);
}

.badge-w { background: rgba(251,146,60,.12); color: #fb923c; border: 1px solid rgba(251,146,60,.28); }
.badge-c { background: var(--amber-bg); color: var(--amber); border: 1px solid rgba(251,191,36,.25); }
.badge-v { background: var(--green-bg); color: var(--green); border: 1px solid rgba(74,222,128,.25); }
.badge-stable { background: var(--green-bg); color: var(--green); border: 1px solid rgba(74,222,128,.2); }
.badge-draft { background: var(--amber-bg); color: var(--amber); border: 1px solid rgba(251,191,36,.2); }
.badge-incomplete { background: var(--red-bg); color: var(--red); border: 1px solid rgba(248,113,113,.2); }
.badge-abs { background: var(--surface2); color: var(--text-sub); border: 1px solid var(--border2); }

/* ── List page ──────────────────────────────────── */
.page-hero {
  padding: 48px 24px 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.page-hero h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.75px;
  margin-bottom: 6px;
}

.page-hero p { font-size: 14px; color: var(--text-sub); }

.list-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.list-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.list-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 420px;
}

.list-search {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  padding: 9px 14px 9px 38px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.list-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,143,255,.1);
}

.list-search::placeholder { color: var(--text-dim); }

.list-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
  width: 16px;
  height: 16px;
}

.filter-tabs {
  display: flex;
  gap: 4px;
}

.filter-tab {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-sub);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  transition: all .15s;
}

.filter-tab:hover { border-color: var(--border2); color: var(--text); }
.filter-tab.active { background: var(--surface2); border-color: var(--border2); color: var(--text); }

.count-tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-left: auto;
}

.data-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table thead {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}

.data-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--mono);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  cursor: pointer;
  transition: background .1s;
}

.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface); }

.data-table td { padding: 11px 16px; vertical-align: middle; }

.td-id { font-family: var(--mono); font-size: 12.5px; color: var(--accent); font-weight: 500; white-space: nowrap; }
.td-name { font-weight: 500; color: var(--text); }
.td-desc { color: var(--text-sub); font-size: 13px; }

.desc-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Pagination */
.pagination {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.pg-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-sub);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 6px 11px;
  transition: all .12s;
  min-width: 34px;
  text-align: center;
}

.pg-btn:hover { border-color: var(--accent); color: var(--accent); }
.pg-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.pg-btn:disabled { opacity: .3; cursor: default; }
.pg-sep { padding: 6px 4px; color: var(--text-dim); font-family: var(--mono); font-size: 12px; }

/* ── Detail page ────────────────────────────────── */
.detail-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-sub);
  padding: 40px 0 32px;
  transition: color .15s;
  text-decoration: none;
}

.back-link:hover { color: var(--text); opacity: 1; }
.back-link svg { width: 14px; height: 14px; }

.detail-header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.detail-cwe-id {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.detail-title {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -.5px;
  line-height: 1.25;
  margin-bottom: 14px;
  color: var(--text);
}

.detail-title-en {
  font-size: 13px;
  color: var(--text-dim);
  font-family: var(--mono);
  margin-bottom: 14px;
  line-height: 1.5;
}

.detail-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Detail sections */
.detail-section { margin-bottom: 28px; }

.detail-section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 12px;
}

.detail-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.8;
}

.detail-card.ja {
  border-left: 3px solid var(--accent);
  color: var(--text);
}

.detail-card .lang-badge {
  float: right;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  letter-spacing: .5px;
  margin-left: 10px;
}

.related-list { display: flex; flex-direction: column; gap: 6px; }

.related-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .12s, background .12s;
  color: var(--text);
  text-decoration: none;
}

.related-item:hover { border-color: var(--border2); background: var(--surface2); opacity: 1; }

.related-nature {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .5px;
  min-width: 56px;
  flex-shrink: 0;
}

.bullet-list { display: flex; flex-direction: column; gap: 6px; }

.bullet-item {
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.7;
}


.ext-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  transition: border-color .15s, background .15s;
  text-decoration: none;
}

.ext-link:hover { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); opacity: 1; }
.ext-link svg { width: 15px; height: 15px; opacity: .6; }

/* ── Terms page ─────────────────────────────────── */
.terms-wrap {
  max-width: 740px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.terms-wrap h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.5px;
  margin-bottom: 8px;
}

.terms-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 40px;
}

.terms-wrap h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 32px 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.terms-wrap p {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.85;
  margin-bottom: 10px;
}

.terms-wrap ul {
  list-style: none;
  margin: 10px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.terms-wrap ul li {
  font-size: 14px;
  color: var(--text-sub);
  padding-left: 16px;
  position: relative;
  line-height: 1.7;
}

.terms-wrap ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--text-dim);
}

/* ── Footer ─────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px;
}

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

.footer-logo {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-logo .logo-cat { width: 22px; height: 22px; }

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 12.5px;
  color: var(--text-dim);
  transition: color .15s;
  text-decoration: none;
}

.footer-links a:hover { color: var(--text-sub); opacity: 1; }

.footer-copy {
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--mono);
}

/* ── Scroll top ─────────────────────────────────── */
#scrolltop {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 38px;
  height: 38px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text-sub);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, border-color .15s;
  z-index: 300;
}

#scrolltop.visible { opacity: 1; pointer-events: auto; }
#scrolltop:hover { border-color: var(--accent); color: var(--accent); }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 860px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .about-cols  { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 56px 20px 48px; }
  .section { padding: 48px 20px; }
  .latest-item { grid-template-columns: 72px 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .filter-tabs { flex-wrap: wrap; }
}
