/* ============ 主题变量 ============ */
:root {
  --bg: #f4f7fb;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --card-hover: #ffffff;
  --text: #16203a;
  --text-soft: #5d6b85;
  --text-mute: #8a97ad;
  --primary: #4f46e5;
  --primary2: #06b6d4;
  --accent: #8b5cf6;
  --border: #e7ecf6;
  --border-soft: #f0f3fa;
  --shadow: 0 8px 24px rgba(20, 32, 66, .07);
  --shadow-lg: 0 18px 46px rgba(20, 32, 66, .13);
  --grad: linear-gradient(120deg, #4f46e5, #06b6d4);
  --grad-soft: linear-gradient(120deg, #6366f1, #22d3ee);
  --radius: 16px;
  --topbar-h: 62px;
}

[data-theme="dark"] {
  --bg: #0d1117;
  --bg-soft: #151b26;
  --card: #161d2a;
  --card-hover: #1b2432;
  --text: #e6edf6;
  --text-soft: #9aa8bd;
  --text-mute: #6b7a91;
  --border: #232c3b;
  --border-soft: #1c2431;
  --shadow: 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 18px 46px rgba(0, 0, 0, .5);
}

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

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 22px; }
.muted { color: var(--text-mute); font-size: .9rem; }

/* ============ 顶部导航 ============ */
.topbar {
  position: sticky; top: 0; z-index: 60;
  height: var(--topbar-h);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.topbar-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; letter-spacing: .5px;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .35);
}
.logo-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.mainnav { display: flex; gap: 8px; font-size: .95rem; color: var(--text-soft); }
.mainnav a {
  position: relative; padding: 7px 15px; border-radius: 999px;
  transition: color .25s, background .25s, box-shadow .25s;
}
.mainnav a:hover { color: var(--primary); background: rgba(79, 70, 229, .08); }

/* 当前页面：淡紫胶囊 + 描边 + 底部渐变指示条 */
.mainnav a.active {
  color: var(--primary); font-weight: 600;
  background: rgba(79, 70, 229, .1);
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, .26);
}
.mainnav a.active::after {
  content: ''; position: absolute; left: 50%; bottom: -7px;
  width: 20px; height: 3px; border-radius: 3px; transform: translateX(-50%);
  background: var(--grad); box-shadow: 0 3px 10px rgba(79, 70, 229, .45);
}

/* 深色模式下提高胶囊对比度 */
[data-theme="dark"] .mainnav a:hover { background: rgba(99, 102, 241, .14); }
[data-theme="dark"] .mainnav a.active {
  background: rgba(99, 102, 241, .2);
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, .42);
}

.mainnav .nav-admin {
  padding: 6px 15px; border-radius: 999px;
  border: 1px solid var(--border); font-size: .88rem;
}
.mainnav .nav-admin:hover { background: var(--grad); color: #fff; border-color: transparent; }
.mainnav .nav-admin.active {
  background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .32);
}
.mainnav .nav-admin.active::after { display: none; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg);
  cursor: pointer; font-size: 1rem; color: var(--text);
  transition: .25s; flex-shrink: 0;
}
.theme-toggle:hover { transform: rotate(-18deg) scale(1.06); }

/* ============ HERO ============ */
.hero { position: relative; padding: 56px 0 44px; overflow: hidden; text-align: center; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(700px 340px at 18% 12%, rgba(99, 102, 241, .28), transparent 62%),
    radial-gradient(620px 320px at 82% 26%, rgba(6, 182, 212, .26), transparent 62%),
    radial-gradient(500px 300px at 50% 100%, rgba(139, 92, 246, .18), transparent 62%);
  animation: heroFloat 14s ease-in-out infinite alternate;
}
@keyframes heroFloat {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(0, -18px, 0) scale(1.05); }
}
.hero-inner { position: relative; z-index: 2; }
.hero-title {
  font-size: clamp(2rem, 5.2vw, 3.2rem); font-weight: 800; letter-spacing: 2px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-slogan { color: var(--text-soft); margin-top: 8px; letter-spacing: 3px; font-size: 1rem; }

/* 搜索框 */
.searchbox { max-width: 720px; margin: 28px auto 0; }
.engine-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.engine {
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-soft);
  padding: 6px 16px; border-radius: 20px; font-size: .86rem; cursor: pointer; transition: .25s;
}
.engine:hover { color: var(--primary); }
.engine.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(79, 70, 229, .3); }
.search-input-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 40px; padding: 8px 8px 8px 20px;
  box-shadow: var(--shadow); transition: .3s;
}
.search-input-wrap:focus-within { border-color: var(--primary); box-shadow: 0 10px 30px rgba(79, 70, 229, .18); }
.search-icon { color: var(--text-mute); flex-shrink: 0; }
.search-input-wrap input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 1rem; color: var(--text); padding: 8px 0; min-width: 0;
}
.search-btn {
  border: none; cursor: pointer; padding: 12px 30px; border-radius: 30px;
  background: var(--grad); color: #fff; font-weight: 600; font-size: .95rem;
  transition: .25s; flex-shrink: 0;
}
.search-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* 统计 */
.stats { display: flex; justify-content: center; gap: 42px; margin-top: 30px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat b {
  display: block; font-size: 1.7rem; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat span { font-size: .84rem; color: var(--text-mute); }

/* ============ 分类导航条（可左右滑动） ============ */
.catbar {
  position: sticky; top: var(--topbar-h); z-index: 50;
  background: var(--bg-soft); border-bottom: 1px solid var(--border);
  padding: 12px 0;
  box-shadow: 0 4px 14px rgba(20, 32, 66, .03);
}
.catbar-wrap { display: flex; align-items: center; gap: 10px; }

.catbar-inner {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; gap: 10px;
  /* 上下留白，避免 hover 上浮与焦点环被 overflow 裁切 */
  padding: 6px 4px;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  cursor: grab;
  /* 两端淡出，提示还可以滑动 */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
}
.catbar-inner::-webkit-scrollbar { display: none; }
.catbar-inner.at-start {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 16px), transparent 100%);
          mask-image: linear-gradient(90deg, #000 calc(100% - 16px), transparent 100%);
}
.catbar-inner.at-end {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px);
          mask-image: linear-gradient(90deg, transparent 0, #000 16px);
}
.catbar-inner.at-start.at-end,
.catbar-inner.no-scroll { -webkit-mask-image: none; mask-image: none; cursor: default; }

/* 拖拽中：关闭平滑与吸附，避免跟手延迟 */
.catbar-inner.dragging { cursor: grabbing; scroll-behavior: auto; scroll-snap-type: none; }
.catbar-inner.dragging .cat-chip { pointer-events: none; }

.cat-nav {
  flex: 0 0 auto;
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-soft);
  box-shadow: 0 2px 8px rgba(20, 32, 66, .08);
  cursor: pointer; transition: .22s;
}
.cat-nav svg { display: block; }
.cat-nav:hover:not([disabled]) {
  color: #fff; border-color: transparent; background: var(--grad);
  box-shadow: 0 8px 18px rgba(79, 70, 229, .30);
  transform: translateY(-1px);
}
.cat-nav:active:not([disabled]) { transform: scale(.92); }
.cat-nav[disabled] {
  opacity: .3; cursor: default; transform: none; color: var(--text-mute);
  background: var(--bg-soft); box-shadow: none;
}
/* 分类不足以滚动时隐藏箭头 */
.catbar.no-scroll .cat-nav { display: none; }

.cat-chip {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 22px; font-size: .9rem;
  border: 1px solid var(--border); background: var(--bg); color: var(--text-soft);
  transition: .25s; white-space: nowrap;
  scroll-snap-align: start;
  -webkit-user-select: none; user-select: none;
}
.cat-chip i { font-style: normal; }
.cat-chip em { font-style: normal; font-size: .76rem; color: var(--text-mute); }
.cat-chip:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.cat-chip.active { background: var(--grad); color: #fff; border-color: transparent; }
.cat-chip.active em { color: rgba(255, 255, 255, .8); }

/* 窄屏下的紧凑排布 */
@media (max-width: 720px) {
  .catbar { padding: 10px 0; }
  .catbar-wrap { gap: 6px; }
  .catbar-inner { gap: 8px; padding: 5px 2px; }
  .cat-nav { width: 30px; height: 30px; }
  .cat-nav svg { width: 14px; height: 14px; }
  .cat-chip { padding: 6px 13px; border-radius: 20px; font-size: .85rem; }
  .cat-chip em { font-size: .72rem; }
}

/* ============ 主体布局 ============ */
.main { padding: 34px 22px 50px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }

/* 分类区块 */
.cat-block { margin-bottom: 38px; scroll-margin-top: 130px; }
.cat-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.cat-head h2 { font-size: 1.2rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.cat-head h2 i { font-style: normal; font-size: 1.15rem; }
.more {
  font-size: .85rem; color: var(--primary); padding: 4px 14px;
  border: 1px solid var(--border); border-radius: 18px; transition: .25s;
}
.more:hover { background: var(--grad); color: #fff; border-color: transparent; }
.cat-count, .result-meta { font-size: .85rem; color: var(--text-mute); display: flex; align-items: center; gap: 10px; }
.result-meta b { color: var(--primary); }
.sort-btn { padding: 3px 12px; border-radius: 14px; border: 1px solid var(--border); font-size: .8rem; }
.sort-btn.active { background: var(--grad); color: #fff; border-color: transparent; }

/* 卡片网格 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(252px, 1fr)); gap: 16px; }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  transition: .3s cubic-bezier(.2, .8, .3, 1);
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0;
  background: var(--grad-soft); opacity: 0; transition: .3s; pointer-events: none;
}
.card:hover {
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  background: var(--card-hover);
}
.card:hover::before { opacity: .05; }
.card-head { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.card-icon {
  position: relative; width: 42px; height: 42px; border-radius: 12px;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0; font-weight: 700; color: var(--primary);
}
.card-icon img { width: 24px; height: 24px; object-fit: contain; border-radius: 4px; }
.card-icon.fallback img { display: none; }
.card-icon.fallback::after { content: attr(data-initial); font-size: 1.05rem; }
.card:hover .card-icon { transform: scale(1.08) rotate(-3deg); }
.card-title-wrap { min-width: 0; flex: 1; }
.card-title { font-size: .98rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-host { font-size: .76rem; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.badge-hot {
  font-size: .68rem; font-weight: 700; color: #fff; padding: 2px 7px; border-radius: 6px;
  background: linear-gradient(120deg, #f97316, #ef4444); flex-shrink: 0;
}
.card-desc {
  font-size: .85rem; color: var(--text-soft); line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.8em; margin-bottom: 12px;
}
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tag {
  font-size: .72rem; color: var(--primary); background: var(--bg);
  border: 1px solid var(--border); padding: 2px 9px; border-radius: 12px;
}
.card-foot .tag + .tag { margin-left: 6px; }
.hits { font-size: .76rem; color: var(--text-mute); margin-left: auto; }

/* ============ 侧边栏 ============ */
.sidebar { position: sticky; top: calc(var(--topbar-h) + 76px); display: flex; flex-direction: column; gap: 18px; }
.side-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  scroll-margin-top: 130px;
}
.side-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 14px; }
.hot-list { list-style: none; }
.hot-list li { border-bottom: 1px dashed var(--border-soft); }
.hot-list li:last-child { border-bottom: none; }
.hot-list a { display: flex; align-items: center; gap: 10px; padding: 9px 0; transition: .25s; }
.hot-list a:hover { color: var(--primary); transform: translateX(3px); }
.rank {
  width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0;
  background: var(--bg); border: 1px solid var(--border); color: var(--text-mute);
  font-size: .75rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.rank.rank-top { background: var(--grad); color: #fff; border-color: transparent; }
.hot-name { flex: 1; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hot-list em { font-style: normal; font-size: .78rem; color: var(--text-mute); }

.side-cats { display: flex; flex-direction: column; gap: 4px; }
.side-cats a {
  display: flex; align-items: center; gap: 9px; padding: 7px 10px;
  border-radius: 10px; font-size: .88rem; color: var(--text-soft); transition: .25s;
}
.side-cats a i { font-style: normal; }
.side-cats a span { flex: 1; }
.side-cats a em { font-style: normal; font-size: .75rem; color: var(--text-mute); }
.side-cats a:hover { background: var(--bg); color: var(--primary); }
.side-cats a.active { background: var(--grad); color: #fff; }
.side-cats a.active em { color: rgba(255, 255, 255, .8); }
.tip-card p { font-size: .85rem; color: var(--text-soft); margin-bottom: 8px; }
.tip-card b { color: var(--primary); }

/* ============ 分页 / 空状态 ============ */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 26px; flex-wrap: wrap; }
.page-btn {
  padding: 7px 15px; border-radius: 10px; font-size: .86rem;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-soft); transition: .25s;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--grad); color: #fff; border-color: transparent; }
.empty { text-align: center; padding: 60px 20px; color: var(--text-mute); }
.empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty p { margin-bottom: 18px; }
.btn-primary {
  display: inline-block; padding: 10px 26px; border-radius: 24px;
  background: var(--grad); color: #fff; font-weight: 600; font-size: .9rem; transition: .25s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ============ 关于 / 页脚 ============ */
.about { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 46px 0; }
.about-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; }
.about-text h2 { font-size: 1.25rem; margin-bottom: 12px; }
.about-text p { color: var(--text-soft); font-size: .92rem; }
.about-stats { display: flex; gap: 22px; margin-top: 16px; flex-wrap: wrap; font-size: .86rem; color: var(--text-mute); }
.about-stats b { color: var(--primary); font-size: 1.05rem; }
.friend-links h3 { font-size: 1rem; margin-bottom: 12px; }
.link-list { display: flex; flex-wrap: wrap; gap: 10px; }
.link-list a {
  font-size: .86rem; color: var(--text-soft); padding: 5px 14px;
  border: 1px solid var(--border); border-radius: 18px; background: var(--bg); transition: .25s;
}
.link-list a:hover { background: var(--grad); color: #fff; border-color: transparent; }

.footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 26px 0; text-align: center; }
.footer p { color: var(--text-mute); font-size: .86rem; }
.footer .small { margin-top: 6px; font-size: .78rem; }

/* 回到顶部 */
.backtop {
  position: fixed; right: 24px; bottom: 30px; z-index: 70;
  width: 44px; height: 44px; border-radius: 50%;
  border: none; cursor: pointer; font-size: 1.1rem; color: #fff;
  background: var(--grad); box-shadow: 0 10px 26px rgba(79, 70, 229, .35);
  opacity: 0; pointer-events: none; transition: .3s;
}
.backtop.show { opacity: 1; pointer-events: auto; }
.backtop:hover { transform: translateY(-3px); }

/* ============ 入场动画 ============ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============ 投稿页面 ============ */
.nav-submit {
  color: var(--primary); font-weight: 600;
  padding: 5px 12px; border-radius: 20px; background: rgba(79, 70, 229, .1);
}
.nav-submit:hover { background: var(--grad); color: #fff; }
.mainnav .nav-submit.active {
  background: var(--grad); color: #fff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .32);
}
.mainnav .nav-submit.active::after { display: none; }

.submit-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 28px;
}
.submit-head h2 { font-size: 1.25rem; margin-bottom: 6px; }
.submit-head p { color: var(--text-mute); font-size: .9rem; margin-bottom: 20px; }

.flash-msg { padding: 12px 16px; border-radius: 12px; font-size: .89rem; margin-bottom: 18px; line-height: 1.7; }
.flash-msg.ok { background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .3); color: #16a34a; }
.flash-msg.err { background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .3); color: #dc2626; }
.flash-msg ul { margin: 6px 0 0 18px; }

.sf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.sf-field { display: flex; flex-direction: column; gap: 7px; }
.sf-field.full { grid-column: 1 / -1; }
.sf-field > span { font-size: .85rem; color: var(--text-soft); }
.sf-field > span b { color: #ef4444; }
.sf-field input, .sf-field select, .sf-field textarea {
  width: 100%; padding: 11px 13px; border-radius: 11px; font-size: .9rem; font-family: inherit;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--text);
  outline: none; transition: .25s;
}
.sf-field input:focus, .sf-field select:focus, .sf-field textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}
.sf-field textarea { resize: vertical; min-height: 78px; line-height: 1.6; }
.captcha-q { font-style: normal; color: var(--primary); font-weight: 700; letter-spacing: .5px; }

.sf-actions { display: flex; align-items: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.sf-btn {
  padding: 11px 30px; border-radius: 12px; border: none; cursor: pointer;
  background: var(--grad); color: #fff; font-size: .93rem; font-weight: 600;
  font-family: inherit; transition: .25s;
}
.sf-btn:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(79, 70, 229, .3); }

.submit-list, .submit-steps {
  margin: 0; padding-left: 18px; color: var(--text-soft); font-size: .87rem; line-height: 1.9;
}
.about-submit { margin-top: 10px; }
.about-submit a { color: var(--primary); font-weight: 600; }
.about-submit a:hover { text-decoration: underline; }
.submit-list li::marker { color: var(--primary); }
.submit-steps li::marker { color: var(--primary); font-weight: 700; }

/* ============ 响应式 ============ */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .side-card { flex: 1 1 280px; }
}
@media (max-width: 720px) {
  .mainnav { gap: 8px; font-size: .86rem; }
  .mainnav a:not(.nav-admin):not(.nav-submit) { display: none; }
  /* 当前页面所在的导航项在小屏也保留，避免看不到选中状态 */
  .mainnav a:not(.nav-admin):not(.nav-submit).active { display: inline-block; }
  .stats { gap: 24px; }
  .stat b { font-size: 1.35rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .card { padding: 13px; }
  .card-desc { -webkit-line-clamp: 3; font-size: .8rem; }
  .about-inner { grid-template-columns: 1fr; gap: 26px; }
  .hero { padding: 38px 0 32px; }
  .search-input-wrap { padding-left: 14px; }
  .search-btn { padding: 10px 18px; }
  .sidebar { flex-direction: column; }
}
@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .card-title { font-size: .9rem; }
}
