/* ===== 基础变量 ===== */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #fbfcfd;
  --border: #e6e8ec;
  --border-strong: #d6dae1;
  --text: #1f2328;
  --text-2: #4b5563;
  --muted: #8a919b;
  --accent: #2563eb;
  --accent-soft: #eff4ff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-hover: 0 6px 16px rgba(16, 24, 40, .1);
  --header-h: 60px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

html:lang(zh) {
  --font: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.container { width: min(1800px, calc(100% - 48px)); margin-inline: auto; }
.container.narrow { width: min(840px, calc(100% - 48px)); }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff;
  padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ===== 头部 ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.header-search-wrap { position: relative; margin-left: 30px; }
.header-search-trigger { display: inline-flex; align-items: center; gap: 9px; padding: 8px 10px;
  border: 0; border-radius: 7px; background: transparent; color: #344a70;
  font: inherit; font-size: 13px; cursor: pointer; }
.header-search-trigger svg { width: 19px; height: 19px; }
.header-search-trigger:hover, .header-search-trigger[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent); }
.header-search-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.header-search-panel { position: absolute; top: calc(100% + 10px); left: 0; z-index: 60;
  width: min(560px, calc(100vw - 270px)); padding: 14px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  box-shadow: 0 16px 42px rgba(18, 28, 48, .18); }
.header-search-panel[hidden] { display: none; }
.header-search-form { display: flex; align-items: center; gap: 9px; }
.header-search-form .search-box { flex: 1; min-width: 0; max-width: none; margin: 0; }
.header-search-form .search-box input { height: 44px; font-size: 15px; box-shadow: none; }
.header-search-submit { flex: none; height: 44px; padding: 0 16px; border: 0;
  border-radius: 22px; background: var(--accent); color: #fff; font: inherit;
  font-size: 14px; font-weight: 600; cursor: pointer; }
.header-search-submit:hover { filter: brightness(1.08); }
.header-search-submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 16px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; overflow: hidden;
  display: grid; place-items: center;
}
.brand-mark svg { display: block; width: 28px; height: 28px; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.nav-link {
  padding: 7px 12px; border-radius: var(--radius-sm); color: var(--text-2);
  font-size: 14px; transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--accent-soft); color: var(--accent); }
.nav-link.is-active { color: var(--accent); font-weight: 600; }

/* 语言切换 */
.lang-switch { display: inline-flex; margin-left: 12px; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.lang-opt {
  padding: 5px 11px; font-size: 12.5px; color: var(--text-2); line-height: 1.2;
  transition: background .15s, color .15s;
}
.lang-opt + .lang-opt { border-left: 1px solid var(--border); }
.lang-opt:hover { background: var(--accent-soft); color: var(--accent); }
.lang-opt.is-active { background: var(--accent); color: #fff; }
.site-nav .lang-switch { display: none; }
.header-tail { margin-left: auto; display: flex; align-items: center; }
.menu-toggle {
  display: none; margin-left: auto; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-2); padding: 6px 12px; border-radius: var(--radius-sm); font-size: 13px; cursor: pointer;
}

/* ===== 首页 hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 52px 0 44px;
  background:
    radial-gradient(60% 120% at 50% -10%, rgba(37, 99, 235, .14) 0%, rgba(37, 99, 235, 0) 60%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .5;
  pointer-events: none;
  z-index: 0;
}
.hero::before {
  width: 380px; height: 380px; top: -160px; left: -80px;
  background: radial-gradient(circle, rgba(37, 99, 235, .28), transparent 70%);
}
.hero::after {
  width: 420px; height: 420px; top: -200px; right: -120px;
  background: radial-gradient(circle, rgba(139, 92, 246, .22), transparent 70%);
}
.hero > .container { position: relative; z-index: 1; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 20px; padding: 6px 14px;
  border: 1px solid var(--border); border-radius: 999px;
  background: rgba(255, 255, 255, .7); backdrop-filter: blur(6px);
  color: var(--text-2); font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow);
}
.hero-eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .18);
}
.hero-title {
  margin: 0 0 28px;
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.08;
  background: linear-gradient(135deg, #1f2328 0%, #2563eb 55%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-tagline {
  margin: 18px auto 34px; max-width: 620px;
  color: var(--text-2); font-size: clamp(16px, 2vw, 19px); line-height: 1.6;
}
.hero-stats {
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px 10px; margin: 24px 0 0; color: var(--muted); font-size: 13px;
}
.hero-stats strong { color: var(--text); font-size: 15px; }

.search-box { position: relative; max-width: 620px; margin: 0 auto; }
.search-box-sm { margin: 16px 0 0; max-width: 420px; }
.search-box input {
  width: 100%; height: 56px; padding: 0 48px 0 22px; font-size: 16px; font-family: inherit;
  border: 1px solid var(--border-strong); border-radius: 28px; background: var(--surface);
  color: var(--text); box-shadow: 0 4px 20px rgba(16, 24, 40, .08); outline: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.search-box-sm input { height: 40px; border-radius: 20px; font-size: 14px; box-shadow: var(--shadow); }
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14), 0 6px 24px rgba(37, 99, 235, .12); }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent;
  color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; display: none;
}
.search-clear:hover { background: var(--bg); color: var(--text); }
.search-box.has-value .search-clear { display: block; }
.search-suggestions { position: absolute; top: 50%; left: 22px; display: flex; align-items: center;
  gap: 8px; transform: translateY(-50%); color: var(--muted); font-size: 15px;
  pointer-events: none; white-space: nowrap; }
.search-suggestions-window { display: block; height: 24px; overflow: hidden; }
.search-suggestions-track { display: flex; flex-direction: column; animation: search-words 12s infinite; }
.search-suggestions-track > span { display: block; height: 24px; line-height: 24px; color: var(--text-2); }
.global-search-box.has-value .search-suggestions,
.global-search-box input:not(:placeholder-shown) ~ .search-suggestions { visibility: hidden; }
@keyframes search-words {
  0%, 16% { transform: translateY(0); }
  22%, 38% { transform: translateY(-24px); }
  44%, 60% { transform: translateY(-48px); }
  66%, 82% { transform: translateY(-72px); }
  88%, 100% { transform: translateY(-96px); }
}
@media (prefers-reduced-motion: reduce) {
  .search-suggestions-track { animation: none; }
}
.search-status { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.search-helper { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.search-results { margin-bottom: 36px; scroll-margin-top: calc(var(--header-h) + 18px); }
.search-results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.search-results-head h2 { margin: 0; font-size: 21px; }
.search-results-head span { color: var(--muted); font-size: 12px; }
.search-results-grid .card { min-height: 88px; }
.card-search-category { display: block; margin-top: 7px; color: var(--accent); font-size: 11px; }
.search-empty { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-2); }
.card[hidden], .ad[hidden], .search-results[hidden], .search-empty[hidden] { display: none; }

/* ===== 主布局 ===== */
.layout {
  display: grid; grid-template-columns: 226px minmax(0, 1fr); gap: 30px;
  padding: 25px 0 64px; align-items: start;
}
.layout > * { min-width: 0; }
.content { min-width: 0; }
.sidebar { position: sticky; top: calc(var(--header-h) + 24px); }
.sidebar-title {
  margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.sidebar-total {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px;
  padding: 0 6px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); font-size: 11px; font-variant-numeric: tabular-nums; letter-spacing: 0;
}
.cat-nav { display: flex; flex-direction: column; gap: 2px; }
.cat-nav-link {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-2); transition: background .15s, color .15s;
}
.cat-nav-link:hover { background: var(--surface); color: var(--text); }
.cat-nav-link.is-active, .cat-nav-link.is-current {
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
/* 分类筛选后的返回按钮：只在选中某个分类时出现 */
.cat-filter-reset {
  display: block; width: 100%; margin-top: 10px; padding: 8px 12px;
  font: inherit; font-size: 13px; color: var(--accent);
  background: var(--accent-soft); border: 1px solid transparent;
  border-radius: var(--radius-sm); cursor: pointer; text-align: center;
}
.cat-filter-reset:hover { border-color: var(--accent); }
.cat-filter-reset[hidden] { display: none; }

.cat-nav-icon { width: 18px; text-align: center; font-size: 14px; }
.cat-nav-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-nav-count { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ===== 分类与卡片 ===== */
.cat { margin-bottom: 40px; scroll-margin-top: calc(var(--header-h) + 20px); }
.cat-head { display: flex; align-items: baseline; gap: 12px; }
.cat-title { margin: 0; font-size: 19px; display: flex; align-items: center; gap: 8px; letter-spacing: -.01em; }
.cat-icon { font-size: 18px; }
.cat-count {
  font-size: 12px; font-weight: 500; color: var(--muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: 20px; padding: 1px 8px; margin-left: 2px;
}
.cat-more { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.cat-more:hover { color: var(--accent); }
.cat-desc { margin: 6px 0 16px; color: var(--text-2); font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }

.card {
  position: relative; display: flex; gap: 12px; padding: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--border-strong);
}
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card-icon {
  flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  font-size: 16px; font-weight: 700;
  background: hsl(var(--h, 220) 70% 95%); color: hsl(var(--h, 220) 55% 42%);
}
/* 有真实 logo 时：中性底色，让深浅色图标都能看清 */
.card-icon.has-logo {
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.card-icon.has-logo img {
  width: 24px; height: 24px; object-fit: contain; display: block;
}
/* 图标加载失败时隐藏，只留下中性底色，不出现裂图 */
.card-icon.has-logo img:not([src]) { display: none; }
.card-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.card-title {
  font-size: 14.5px; font-weight: 600; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-desc {
  font-size: 12.5px; color: var(--text-2); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-desc-mobile, .cat-desc-mobile { display: none; }
.card.is-sponsored .card-body { flex: 1; }
.card-sponsored {
  flex: none; align-self: center; margin: 0 0 0 auto; padding: 3px 7px;
  border-radius: 5px; background: var(--accent-soft); color: var(--accent);
  font-size: 11px; font-weight: 600; line-height: 1.4; white-space: nowrap;
}
.card-host {
  position: absolute; right: 10px; bottom: 8px; font-size: 11px; color: var(--muted);
  opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s;
  background: linear-gradient(90deg, transparent, var(--surface) 24%); padding-left: 20px;
}
.card:hover .card-host { opacity: 1; transform: translateY(0); }

/* ===== 页头 / 面包屑 / 芯片 ===== */
.breadcrumb { display: flex; gap: 8px; padding: 18px 0 0; font-size: 13px; color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.page-head { margin-bottom: 24px; }
.page-head h1 { margin: 0; font-size: clamp(24px, 3vw, 30px); display: flex; align-items: center; gap: 10px; }
.page-lead { margin: 10px 0 0; color: var(--text-2); font-size: 15px; }
.page-meta { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.related { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); }
.related h2 { margin: 0 0 14px; font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 20px;
  background: var(--surface); font-size: 13px; color: var(--text-2); transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.btn {
  display: inline-block; padding: 9px 18px; border-radius: var(--radius-sm);
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 500;
}
.btn:hover { filter: brightness(1.06); }

/* ===== 文章列表 ===== */
.post-list { display: flex; flex-direction: column; gap: 14px; padding-bottom: 60px; }
.post-card {
  padding: 22px 24px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.post-card:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--border-strong);
}
.post-card-title { margin: 0; font-size: 20px; line-height: 1.4; letter-spacing: -.01em; }
.post-card-title a { transition: color .15s; }
.post-card:hover .post-card-title a { color: var(--accent); }
.post-card-desc { margin: 9px 0 0; color: var(--text-2); font-size: 14.5px; line-height: 1.7; }
.post-card-meta, .post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.post-card-meta span, .post-meta span { position: relative; padding-left: 10px; }
.post-card-meta span::before, .post-meta span::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5;
}

/* ===== 文章详情 ===== */
.post { padding: 36px 0 40px; }
.post-head { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.post-head h1 {
  margin: 0; font-size: clamp(28px, 3.8vw, 40px); line-height: 1.28;
  letter-spacing: -.025em; font-weight: 800;
}
.post-head .post-meta { margin-top: 16px; font-size: 13px; }
.post-head .post-meta time { color: var(--text-2); font-weight: 500; }

/* 阅读进度条 */
.read-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  background: linear-gradient(90deg, var(--accent), #7c3aed);
  transform: scaleX(0); transform-origin: 0 50%; will-change: transform;
}

/* Cookie 同意横幅 */
.consent-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80;
  max-width: 620px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  padding: 16px 20px; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(16, 24, 40, .16);
}
.consent-text { margin: 0; flex: 1 1 280px; font-size: 13.5px; line-height: 1.6; color: var(--text-2); }
.consent-text a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.consent-actions { display: flex; gap: 10px; margin-left: auto; }
.consent-btn {
  padding: 8px 16px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 500;
  cursor: pointer; border: 1px solid var(--border-strong); transition: all .15s;
}
.consent-reject { background: var(--surface); color: var(--text-2); }
.consent-reject:hover { background: var(--bg); }
.consent-accept { background: var(--accent); color: #fff; border-color: var(--accent); }
.consent-accept:hover { filter: brightness(1.06); }

.toc {
  margin: 28px 0; padding: 18px 22px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.toc-title {
  margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.toc summary { cursor: pointer; }
.toc:not([open]) .toc-title { margin-bottom: 0; }
.toc ol { margin: 0; padding-left: 18px; font-size: 14px; }
.toc li { margin: 5px 0; color: var(--text-2); }
.toc li.toc-l3 { margin-left: 14px; font-size: 13px; }
.toc a { transition: color .15s; }
.toc a:hover { color: var(--accent); }

.prose { font-size: 17px; line-height: 1.85; color: #2a2f37; }
.prose > p:first-of-type {
  font-size: 19px; line-height: 1.7; color: var(--text);
}
.prose h2 {
  margin: 44px 0 16px; font-size: 24px; font-weight: 750; padding-bottom: 10px;
  letter-spacing: -.01em; border-bottom: 2px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.prose h3 { margin: 32px 0 12px; font-size: 19px; font-weight: 700; scroll-margin-top: calc(var(--header-h) + 16px); }
.prose p { margin: 18px 0; }
.prose ul, .prose ol { margin: 18px 0; padding-left: 26px; }
.prose li { margin: 8px 0; }
.prose li::marker { color: var(--accent); }
.prose a {
  color: var(--accent); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-thickness: 1px; text-decoration-color: rgba(37, 99, 235, .35);
  transition: text-decoration-color .15s;
}
.prose a:hover { text-decoration-color: var(--accent); }
.prose a.affiliate-cta {
  display: inline-block; padding: 10px 18px; border-radius: var(--radius-sm);
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 700;
  line-height: 1.45; text-decoration: none;
}
.prose a.affiliate-cta:hover { filter: brightness(1.08); }
.prose blockquote {
  margin: 24px 0; padding: 14px 22px; border-left: 4px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-2); font-size: 16px;
}
.prose blockquote p { margin: 6px 0; }
.prose code {
  background: #f1f3f6; border: 1px solid var(--border); border-radius: 5px;
  padding: 1px 5px; font-size: .88em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.prose pre {
  margin: 20px 0; padding: 16px 18px; background: #1f2430; color: #e5e9f0;
  border-radius: var(--radius); overflow-x: auto; font-size: 13.5px; line-height: 1.7;
}
.prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.prose hr { margin: 32px 0; border: 0; border-top: 1px solid var(--border); }
.table-wrap { overflow-x: auto; margin: 20px 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose th, .prose td { padding: 9px 12px; border: 1px solid var(--border); text-align: left; }
.prose th { background: var(--surface-2); font-weight: 600; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 0 60px; }
.post-nav-item {
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 14px; transition: border-color .15s;
}
.post-nav-item:hover { border-color: var(--accent); color: var(--accent); }
.post-nav-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.post-nav-label b { font-weight: 400; }
.post-nav-title { font-size: inherit; font-weight: 500; }
.post-nav-item.is-next { text-align: right; }
.post-nav-item.is-next:only-child { grid-column: 2; }
.empty { color: var(--muted); }

/* ===== 广告位 ===== */
.ad {
  display: block; margin: 24px 0; padding: 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); min-height: 90px;
}
.ad-label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.ad-sidebar { margin-top: 24px; }

/* ===== 页脚 ===== */
.site-footer { border-top: 1px solid #e9e6ef; background: #faf9fc; padding: 42px 0 22px; }
.site-footer > .container { max-width: 1320px; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 48px; align-items: start; }
.footer-identity { min-width: 0; }
.footer-brand { display: inline-flex; align-items: center; gap: 12px; }
.footer-brand img { flex: none; }
.footer-brand strong { display: block; font-size: 18px; font-weight: 700; color: #292532; }
.footer-brand small { display: block; margin-top: 4px; color: #766f80; font-size: 12px; }
.footer-contact { display: flex; align-items: center; gap: 10px; width: fit-content; min-height: 40px;
  margin-top: 12px; color: #655d70; font-size: 13px; overflow-wrap: anywhere; }
.footer-contact span { color: #9385ac; }
.footer-group { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.footer-group h2 { margin: 0 0 10px; font-size: 12px; font-weight: 650; color: #766e81; }
.footer-group a { display: inline-flex; align-items: center; min-height: 36px; max-width: 100%;
  color: #51495f; font-size: 13px; line-height: 1.5; padding: 6px 0; overflow-wrap: anywhere; }
.site-footer a:hover { color: #7250c9; }
.site-footer a:focus-visible { outline: 2px solid #7250c9; outline-offset: 4px; border-radius: 3px; }
.footer-group a[hidden] { display: none; }
.footer-bottom { margin-top: 30px; padding-top: 18px; border-top: 1px solid #e9e6ef; }
.footer-note { margin: 0; color: #756d7f; font-size: 11px; line-height: 1.8; }
.footer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 12px;
  color: #756d7f; font-size: 11px; line-height: 1.6; padding-right: 48px; }
.footer-stats { margin-left: auto; }
@media (max-width: 760px) {
  .site-footer { padding: 28px 0 20px; }
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; }
  .footer-identity { grid-column: 1 / -1; }
  .footer-brand strong { font-size: 16px; }
  .footer-contact { margin-top: 8px; min-height: 32px; font-size: 12px; }
  .footer-group h2 { margin-bottom: 8px; }
  .footer-group a { min-height: 40px; }
  .footer-bottom { margin-top: 22px; padding-top: 15px; }
  .footer-meta { gap: 7px 14px; }
  .footer-stats { margin-left: auto; }
  .footer-updated { flex-basis: 100%; }
}

/* ===== 静态说明页 ===== */
.page-static .post { padding: 32px 0 56px; }
.page-static .post-head { margin-bottom: 30px; padding-bottom: 20px; }
.page-static .post-head h1 { font-size: clamp(30px, 3.5vw, 38px); }
.page-static .prose { font-size: 16px; line-height: 1.8; color: var(--text-2); }
.page-static .prose > p:first-of-type { font-size: 18px; line-height: 1.75; color: var(--text); }
.page-static .prose h2 {
  margin: 38px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
  font-size: 22px;
}
.page-static .prose h3 { margin: 26px 0 10px; font-size: 18px; }
.page-static .prose p { margin: 14px 0; }
.page-static .prose ul, .page-static .prose ol { margin: 14px 0; padding-left: 24px; }
.page-static .prose li { margin: 6px 0; }

/* ===== 回到顶部 ===== */
.to-top {
  position: fixed; right: 24px; bottom: 24px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2);
  font-size: 16px; cursor: pointer; box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 40;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; }
.to-top:hover { color: var(--accent); border-color: var(--accent); }

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .sidebar { position: static; max-width: 100%; overflow: hidden; }
  .sidebar-title, .ad-sidebar { display: none; }
  .cat-nav {
    flex-direction: row; gap: 8px; overflow-x: auto; padding-bottom: 6px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .cat-nav::-webkit-scrollbar { display: none; }
  .cat-nav-link {
    flex: none; border: 1px solid var(--border); background: var(--surface); white-space: nowrap;
  }
  .cat-nav-count { display: none; }
}

@media (max-width: 640px) {
  .container, .container.narrow { width: calc(100% - 32px); }
  .site-nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 8px 16px 12px; box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .menu-toggle { display: block; }
  .hero { padding: 56px 0 40px; }
  .grid { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .to-top { right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ===== 移动端导航优化（2026-09） ===== */

.cat-nav-toggle { display: none; }  /* 桌面端不显示，媒体查询里再打开 */

/* 分类导航：从横向滚动改为网格，默认两行 + 展开按钮。
   横滚在手机上可发现性太差——17 个分类只露出 3 个。 */
@media (max-width: 960px) {
  .cat-nav {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
  }
  .cat-nav-link {
    flex: none;
    border: 1px solid var(--border);
    background: var(--surface);
    white-space: nowrap;
    overflow: hidden;
    justify-content: center;
  }
  .cat-nav-link.is-current { background: var(--accent-soft); border-color: var(--accent); }
  .cat-nav:not(.is-expanded) > .cat-nav-link:nth-child(n + 7) { display: none; }
  /* 选中的分类即使排在第 7 个之后也要露出来 */
  .cat-nav:not(.is-expanded) > .cat-nav-link.is-current { display: flex; }

  .cat-nav-toggle {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 9px 12px;
    font: inherit;
    font-size: 13.5px;
    color: var(--text-2);
    background: transparent;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
  }
  .cat-nav-toggle:hover { border-color: var(--accent); color: var(--accent); }
}

/* 顶栏（移动端）：品牌 ……… [简|繁|EN] [菜单]
   语言胶囊紧贴菜单按钮左侧，两者等高对齐；菜单里只放主导航。 */
@media (max-width: 640px) {
  .header-inner { gap: 10px; }
  .brand { min-width: 0; }
  .brand-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .header-tail { margin-left: auto; flex: none; }
  .header-tail .lang-switch { margin-left: 0; height: 32px; }
  .header-tail .lang-opt {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; padding: 0 9px; font-size: 12.5px;
  }
  .menu-toggle {
    flex: none; margin-left: 0; height: 32px; padding: 0 12px;
    line-height: 1; border-radius: 999px;
  }
  .menu-toggle[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
  .site-nav { padding: 6px 12px 10px; }
  .site-nav .nav-link { padding: 11px 12px; font-size: 15px; }
  .site-nav .nav-link + .nav-link { border-top: 1px solid var(--border); border-radius: 0; }

  /* 首屏：标题和顶栏品牌重复，缩小并收紧留白，让卡片早点出现 */
  .hero { padding: 14px 0 18px; }
  /* 顶栏已经有「外站导航」了，首屏再写一遍只是把搜索框往下推 */
  .hero-title { display: none; }
  .hero-tagline { margin: 6px 0 16px; font-size: 14px; }
  .hero-stats { font-size: 12px; }
  .layout { padding-top: 18px; }
}

/* 分类导读 */
.cat-guide { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--border); }
.cat-guide .prose { max-width: 760px; }
.cat-guide .prose > h2:first-child { margin-top: 0; }
.cat-guide-posts { max-width: 760px; margin-top: 28px; padding: 18px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.cat-guide-posts h2 { margin: 0 0 10px; font-size: 16px; }
.cat-guide-posts ul { margin: 0; padding-left: 20px; }
.cat-guide-posts li { margin: 6px 0; }
.page-category .cat-guide { margin: 0 0 30px; padding-top: 0; border-top: 0; }
@media (min-width: 761px) {
  .page-category .cat-guide .prose,
  .page-category .cat-guide-posts { width: 100%; max-width: none; }
}
.cat-sites-title { margin: 0 0 18px; font-size: 20px; }
.article-guides { margin-top: 4px; }
.article-guides > h2 { margin: 0 0 18px; font-size: 22px; }

@media (max-width: 640px) {
  .cat-desc { margin-bottom: 14px; }
  .cat-desc-full { display: none; }
  .cat-desc-mobile {
    display: block;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    letter-spacing: 0;
    text-transform: none;
  }
  .cat-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .cat-nav::-webkit-scrollbar { display: none; }
  .cat-nav:not(.is-expanded) > .cat-nav-link:nth-child(n + 7) { display: flex; }
  .cat-nav-link { flex: 0 0 auto; min-height: 38px; padding: 6px 10px; }
  .cat-nav-toggle { display: none; }

  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card {
    min-width: 0;
    min-height: 78px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px;
    text-align: left;
  }
  .card.is-sponsored { grid-column: 1 / -1; }
  .card-icon { width: 34px; height: 34px; border-radius: 9px; }
  .card-icon.has-logo img { width: 22px; height: 22px; }
  .card-body { flex: 1; width: auto; align-items: flex-start; gap: 3px; }
  .card-title {
    display: -webkit-box;
    width: 100%;
    overflow: hidden;
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .card-desc-full { display: none; }
  .card-desc-mobile {
    display: -webkit-box;
    font-size: 12px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
  }
  .card-host { display: none; }
  .card-sponsored {
    padding: 2px 6px;
    font-size: 11px;
    line-height: 1.4;
  }
}

@media (max-width: 350px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .card { min-height: 64px; }
}

/* 域名搜索框（联盟推广） */
.domain-search {
  margin: 30px 0 8px; padding: 22px 24px; border: 1px solid var(--border);
  border-radius: 14px; background: var(--surface);
}
.domain-search h2 { margin: 0 0 6px; font-size: 18px; }
.domain-search-lead { margin: 0 0 14px; color: var(--text-2); font-size: 14px; line-height: 1.65; }
.domain-search-form { display: flex; gap: 8px; }
.domain-search-input {
  flex: 1; min-width: 0; height: 42px; padding: 0 14px; font: inherit; font-size: 15px;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg); color: var(--text);
}
.domain-search-input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.domain-search-btn {
  flex: none; height: 42px; padding: 0 18px; font: inherit; font-size: 14.5px; font-weight: 600;
  color: #fff; background: var(--accent); border: 0; border-radius: 10px; cursor: pointer;
}
.domain-search-btn:hover { filter: brightness(1.08); }
.domain-search-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
@media (max-width: 640px) {
  .domain-search { padding: 18px 16px; }
}

/* ===== 文章首页与独立网站导航 ===== */
.editorial-layout {
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr) 220px;
  align-items: start;
  gap: 30px;
  padding-top: 25px;
  padding-bottom: 72px;
}
.editorial-layout > * { min-width: 0; }
.story-sidebar, .story-rail { position: sticky; top: calc(var(--header-h) + 24px); }
.static-layout {
  display: grid; grid-template-columns: 226px minmax(0, 1fr); gap: 30px;
  align-items: start; padding-top: 25px; padding-bottom: 72px;
}
.static-layout > * { min-width: 0; }
.static-main { width: 100%; max-width: 1020px; }
.static-main .post { padding-top: 8px; }
.sidebar-inner {
  max-height: calc(100vh - var(--header-h) - 24px); overflow-y: auto;
  padding: 10px 9px; background: var(--surface); border-right: 1px solid var(--border);
  scrollbar-width: none;
}
.sidebar-inner::-webkit-scrollbar { display: none; }
.primary-side-nav { display: flex; flex-direction: column; gap: 3px; }
.sidebar .cat-nav-link { min-height: 38px; padding: 7px 10px; font-size: 12.5px; }
.sidebar .sidebar-title { margin: 12px 10px 8px; }
.sidebar-collapse-toggle {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center;
  border: 0; border-radius: 7px; background: transparent; color: var(--text-2); cursor: pointer;
}
.sidebar-collapse-toggle:hover { background: var(--accent-soft); color: var(--accent); }
.sidebar-collapse-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sidebar-collapse-toggle svg { width: 20px; height: 20px; }
.mobile-sidebar-trigger, .mobile-sidebar-backdrop, .mobile-sidebar-head { display: none; }
.mobile-sidebar-trigger {
  align-items: center; gap: 11px; width: 100%; min-height: 48px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  color: var(--text); box-shadow: var(--shadow); font: inherit; text-align: left; cursor: pointer;
}
.mobile-sidebar-trigger-icon { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 18px; }
.mobile-sidebar-trigger-copy { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.25; }
.mobile-sidebar-trigger-copy strong { font-size: 14px; }
.mobile-sidebar-trigger-copy small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mobile-sidebar-trigger-action { flex: none; color: var(--accent); font-size: 12px; font-weight: 600; }
.mobile-sidebar-trigger:focus-visible, .mobile-sidebar-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mobile-sidebar-backdrop { position: fixed; inset: 0; z-index: 70; width: 100%; border: 0; background: rgba(18, 28, 48, .44); cursor: pointer; }
.mobile-sidebar-head { position: sticky; top: 0; z-index: 1; align-items: center; justify-content: space-between; min-height: 54px; margin: -12px -12px 10px; padding: 0 12px; border-bottom: 1px solid var(--border); background: var(--surface); font-size: 17px; }
.mobile-sidebar-close { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font: inherit; font-size: 25px; cursor: pointer; }
body.mobile-sidebar-open { overflow: hidden; }
.story-sidebar {
  --accent: #7250c9;
  --accent-soft: #f2edfc;
  --border: #e8e5ee;
  min-height: calc(100vh - var(--header-h) - 24px); max-height: calc(100vh - var(--header-h) - 24px);
  overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; padding: 10px 9px;
  background: #f8f5ff; border-radius: 14px; border-right: 1px solid var(--border);
}
.story-sidebar::-webkit-scrollbar { width: 5px; }
.story-sidebar::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }
.story-sidebar nav { display: flex; flex-direction: column; gap: 3px; }
.story-nav-item, .story-nav-group summary {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 42px; padding: 8px 10px; border-radius: 7px;
  color: #344a70; font-size: 13.5px; cursor: pointer;
}
.story-nav-item:hover, .story-nav-group summary:hover { background: var(--accent-soft); color: var(--accent); }
.story-nav-item.is-active, .story-nav-group.is-active > summary, .story-nav-group[open] > summary { color: var(--accent); font-weight: 650; }
.story-nav-item.is-active, .story-nav-group.is-active > summary { background: #eae1fc; }
.story-nav-item.is-active::after, .story-nav-group.is-active > summary::after {
  content: ""; position: absolute; right: -9px; top: 6px; bottom: 6px; width: 2px; background: var(--accent);
}
.story-nav-group summary { list-style: none; }
.story-nav-group summary::-webkit-details-marker { display: none; }
.story-nav-mobile-link { display: none; }
.story-nav-icon { flex: none; width: 19px; height: 19px; }
.story-nav-label { flex: 1; min-width: 0; }
.story-nav-chevron { flex: none; width: 14px; height: 14px; color: var(--muted); transition: transform .15s; }
.story-nav-group[open] .story-nav-chevron { transform: rotate(180deg); }
.story-nav-directory-head { position: relative; display: flex; align-items: center; min-height: 42px;
  border-radius: 7px; color: #92400e; font-weight: 650; background: #fff4df;
  box-shadow: inset 0 0 0 1px #f2d29b; }
.story-nav-directory-head:hover { background: #ffebc4; color: #78350f; }
.story-nav-directory-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0;
  min-height: 42px; padding: 8px 2px 8px 10px; font-size: 13.5px; }
.story-nav-directory-toggle { display: grid; place-items: center; flex: none; width: 34px; height: 42px;
  padding: 0; border: 0; border-radius: 7px; background: transparent; color: inherit; cursor: pointer; }
.story-nav-directory-toggle:hover { background: rgba(146, 64, 14, .08); color: inherit; }
.story-nav-directory.is-open .story-nav-chevron { transform: rotate(180deg); }
.story-nav-directory.is-active .story-nav-directory-head { color: var(--accent); font-weight: 650; background: #eae1fc; box-shadow: none; }
.story-nav-directory.is-active .story-nav-directory-head::after { content: ""; position: absolute;
  right: -9px; top: 6px; bottom: 6px; width: 2px; background: var(--accent); }
.story-nav-children[hidden] { display: none; }
.story-nav-children {
  display: flex; flex-direction: column; margin: 0 0 9px 19px;
  padding: 2px 0 1px 17px; border-left: 1px solid var(--border);
}
.story-nav-children a {
  position: relative; display: block; padding: 6px 8px; color: var(--text-2);
  font-size: 12.5px; line-height: 1.45; border-radius: 6px;
}
.story-nav-children a::before {
  content: ""; position: absolute; left: -17px; top: 50%; width: 13px; border-top: 1px solid var(--border);
}
.story-nav-children a:hover, .story-nav-children a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.story-nav-children .story-nav-see-all { color: var(--accent); }
.story-nav-directory .story-nav-children { gap: 1px; }
.story-nav-directory .cat-nav-link { display: block; white-space: normal; min-height: 0;
  overflow: visible; border: 0; background: transparent; }
.story-nav-directory .cat-nav-text { display: inline; }
.story-nav-directory .story-nav-children a[aria-current="page"] { font-weight: 650; }
.story-nav-item:focus-visible, .story-nav-group summary:focus-visible,
.story-nav-directory-link:focus-visible, .story-nav-directory-toggle:focus-visible,
.story-nav-children a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.story-nav-divider { margin: 11px 2px; border-top: 1px solid var(--border); }

.eyebrow, .directory-eyebrow {
  color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .08em;
}

.story-section { margin-top: 38px; scroll-margin-top: calc(var(--header-h) + 20px); }
.page-home .editorial-main > .story-section:first-child { margin-top: 0; }
.story-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.story-section-head h1, .story-section-head h2 { margin: 0; font-size: 22px; line-height: 1.35; }
.story-section-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.story-section-head > a, .story-section-links a { flex: none; color: var(--accent); font-size: 13px; font-weight: 600; }
.story-section-links { display: flex; flex: none; flex-wrap: wrap; justify-content: flex-end; gap: 8px 16px; }
.story-section-links a:hover { text-decoration: underline; }
.home-paths-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.home-path { display: flex; flex-direction: column; min-width: 0; min-height: 150px; padding: 18px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.home-path:hover { border-color: var(--accent); transform: translateY(-2px); }
.home-path:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.home-path strong { font-size: 16px; line-height: 1.35; }
.home-path span { margin-top: 8px; color: var(--text-2); font-size: 13px; line-height: 1.55; }
.home-path em { margin-top: auto; padding-top: 12px; color: var(--accent); font-size: 12px; font-style: normal; font-weight: 650; }
.editorial-main .post-list { gap: 10px; padding-bottom: 0; }
.editorial-main .post-card { padding: 18px 20px; }
.editorial-main .post-card-title { font-size: 18px; }
.editorial-main .post-card-desc { margin-top: 7px; font-size: 13.5px; }
.editorial-main .post-card-meta { margin-top: 9px; }
/* Article discovery: goal entries, a lead guide and a browsable archive. */
.page-blog { --accent: #7250c9; --accent-soft: #f2edfc; background: #fff; }
.page-blog .blog-index-layout { grid-template-columns: 226px minmax(0, 1fr); gap: 32px; }
.blog-index-main { width: 100%; max-width: 1240px; justify-self: center; }
.guide-index-head { padding: 12px 0 27px; border-bottom: 1px solid var(--border); }
.guide-index-head .eyebrow { font-size: 10px; letter-spacing: .14em; }
.guide-index-head h1 { margin: 10px 0 9px; font-size: clamp(28px, 3.2vw, 43px); line-height: 1.25; letter-spacing: -.04em; }
.guide-index-head > p { margin: 0; color: var(--text-2); font-size: 14px; }
.guide-goals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 23px; }
.guide-goals a { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 46px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 9px; font-size: 13px; font-weight: 600; transition: border-color .15s, background .15s; }
.guide-goals svg { width: 18px; height: 18px; color: var(--accent); }
.guide-goals a > span:last-child { margin-left: auto; color: var(--muted); }
.guide-goals a:hover { background: var(--accent-soft); border-color: #d4c7ef; }
.guide-featured { margin-top: 27px; }
.guide-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.guide-section-head h2 { margin: 0; font-size: 22px; line-height: 1.4; letter-spacing: -.025em; }
.guide-section-head p { margin: 5px 0 0; color: var(--text-2); font-size: 13px; }
.guide-section-head > a { flex: none; font-size: 12px; color: var(--accent); }
.guide-overline { display: block; margin-bottom: 4px; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.guide-feature-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 26px; }
.guide-feature-side { display: grid; grid-template-rows: repeat(2, 1fr); gap: 20px; }
.guide-card { min-width: 0; }
.guide-card-link { display: grid; grid-template-columns: 90px minmax(0, 1fr); align-items: start; gap: 16px;
  height: 100%; border-radius: 12px; }
.guide-card-cover { overflow: hidden; border-radius: 9px; background: #f3f0f8; }
.guide-card-cover img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .2s; }
.guide-card-link:hover img { transform: scale(1.025); }
.guide-card-link:hover h3 { color: var(--accent); }
.guide-card-copy { display: flex; flex-direction: column; min-width: 0; height: 100%; }
.guide-card-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 9px; color: var(--accent); font-size: 11px; font-weight: 600; }
.guide-card h3 { margin: 7px 0; font-size: 17px; line-height: 1.5; transition: color .15s; }
.guide-card-copy > p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  margin: 0; color: var(--text-2); font-size: 12px; line-height: 1.7; }
.guide-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; justify-content: space-between;
  margin-top: auto; padding-top: 15px; color: #74717c; font-size: 11px; }
.guide-card-read { color: var(--accent); font-weight: 600; white-space: nowrap; }
.guide-card-lead { overflow: hidden; border: 1px solid #e7e0f3; border-radius: 14px; background: #faf8ff; }
.guide-card-lead .guide-card-link { display: flex; flex-direction: column; gap: 0; }
.guide-card-lead .guide-card-cover { width: 100%; padding: 0; border-radius: 0; background: #fff; }
.guide-card-lead .guide-card-cover img { aspect-ratio: auto; height: auto; object-fit: contain; }
.guide-card-lead .guide-card-copy { flex: 1; width: 100%; padding: 22px; }
.guide-card-lead h3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.4; letter-spacing: -.03em; }
.guide-card-lead .guide-card-copy > p { font-size: 13px; }
.guide-card-lead .guide-card-meta { padding-top: 20px; }
.guide-card-lead .guide-card-read { padding: 8px 13px; border-radius: 7px; background: #302344; color: #fff; }
.guide-feature-side .guide-card { display: flex; padding: 20px 0; border-bottom: 1px solid var(--border); }
.guide-feature-side .guide-card:first-child { padding-top: 6px; }
.guide-feature-side .guide-card-link { width: 100%; grid-template-columns: minmax(0, 1fr) 100px; }
.guide-feature-side .guide-card-cover { grid-column: 2; grid-row: 1; }
.guide-feature-side .guide-card-copy { grid-column: 1; grid-row: 1; }
.guide-feature-side h3 { font-size: 20px; line-height: 1.45; }
.guide-feature-side .guide-card-copy > p { -webkit-line-clamp: 3; font-size: 13px; }
.guide-affiliate-note { margin: 16px 0 0; color: #777080; font-size: 11px; line-height: 1.7; }
.guide-affiliate-note a { color: var(--accent); white-space: nowrap; }
.guide-browse-head { margin-top: 39px; padding-top: 26px; border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 20px); }
.guide-browse-head h2 { margin: 0 0 16px; font-size: 26px; letter-spacing: -.03em; }
.guide-topic-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.guide-topic-nav a { padding: 7px 13px; border-radius: 7px; background: #f5f3f8; color: #5e4d78; font-size: 12px; }
.guide-topic-nav a:hover { background: #eae1fc; }
.guide-topic { margin-top: 34px; scroll-margin-top: calc(var(--header-h) + 20px); }
.guide-section-count { flex: none; color: var(--muted); font-size: 12px; }
.guide-topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.guide-topic-grid .guide-card { padding: 21px 0; border-top: 1px solid var(--border); }
.guide-directory-link { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  margin-top: 35px; padding: 20px; border-radius: 11px; background: #f7f4fd; font-size: 13px; }
.guide-directory-link > span:first-child { display: flex; align-items: center; gap: 10px; }
.guide-directory-link > span:last-child { color: var(--accent); }
.guide-goals a:focus-visible, .guide-card-link:focus-visible, .guide-topic-nav a:focus-visible,
.guide-directory-link:focus-visible, .guide-section-head > a:focus-visible, .guide-affiliate-note a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 4px; }
@media (min-width: 761px) {
  html.sidebar-collapsed .page-blog .blog-index-layout { grid-template-columns: 62px minmax(0, 1fr); }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .guide-feature-grid { grid-template-columns: 1fr; }
  .guide-feature-side { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; }
  .guide-feature-side .guide-card-link { grid-template-columns: minmax(0, 1fr) 70px; gap: 10px; }
  .guide-feature-side h3 { font-size: 18px; }
  .guide-topic-grid { grid-template-columns: 1fr; }
  .guide-goals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .page-blog .blog-index-layout { padding-top: 21px; gap: 0; }
  .guide-index-head { padding: 0 0 22px; }
  .guide-index-head h1 { font-size: 29px; margin-top: 9px; }
  .guide-index-head > p { max-width: 32em; font-size: 13px; }
  .guide-goals { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
  .guide-goals a { min-height: 42px; font-size: 12px; padding: 8px 11px; }
  .guide-featured { margin-top: 22px; }
  .guide-section-head { gap: 12px; margin-bottom: 14px; }
  .guide-section-head h2 { font-size: 20px; }
  .guide-section-head > a { font-size: 11px; }
  .guide-feature-grid { grid-template-columns: 1fr; gap: 16px; }
  .guide-card-lead .guide-card-copy { padding: 17px 19px; }
  .guide-card-lead h3 { font-size: 23px; }
  .guide-feature-side { gap: 0; grid-template-rows: auto; }
  .guide-feature-side .guide-card { padding: 17px 0; }
  .guide-feature-side .guide-card-link { grid-template-columns: minmax(0, 1fr) 88px; }
  .guide-feature-side h3 { font-size: 18px; }
  .guide-feature-side .guide-card-copy > p { -webkit-line-clamp: 2; font-size: 12px; }
  .guide-card-meta { padding-top: 12px; }
  .guide-affiliate-note { margin-top: 12px; }
  .guide-browse-head { margin-top: 28px; padding-top: 23px; }
  .guide-browse-head h2 { font-size: 24px; }
  .guide-topic { margin-top: 28px; }
  .guide-topic-grid { grid-template-columns: 1fr; }
  .guide-topic-grid .guide-card-link { grid-template-columns: 70px minmax(0, 1fr); gap: 13px; }
  .guide-card h3 { font-size: 17px; }
  .guide-card-lead h3 { font-size: 23px; }
}

.rail-panel { margin-bottom: 14px; padding: 19px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.rail-panel h2 { margin: 0 0 12px; font-size: 15px; }
.rail-panel ul { margin: 0; padding: 0; list-style: none; }
.rail-panel li + li { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.rail-panel li a { font-size: 13px; line-height: 1.5; }
.rail-panel li a:hover { color: var(--accent); }
.rail-panel p { margin: 0 0 12px; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.rail-directory > a { color: var(--accent); font-size: 13px; font-weight: 650; }
.rail-method > a { color: var(--accent); font-size: 13px; font-weight: 650; }
.story-rail .ad-sidebar { margin-top: 14px; }
.article-layout .editorial-main { width: 100%; max-width: 1020px; justify-self: center; }
.article-layout .post { padding-top: 12px; }
.article-layout .post-head h1 { font-size: clamp(27px, 3vw, 38px); }
.article-layout .post-nav { padding-bottom: 0; }
.page-post { --accent: #7250c9; --accent-soft: #f2edfc; background: #fff; }
.page-post .article-layout .editorial-main { max-width: 820px; }
.page-post .breadcrumb { align-items: center; flex-wrap: wrap; font-size: 11px; }
.page-post .post-head { margin-bottom: 25px; padding-bottom: 18px; }
.post-topic { color: var(--accent); font-size: inherit; font-weight: 650; }
.post-topic:hover { text-decoration: underline; text-underline-offset: 4px; }
.page-post .post-head h1 { font-size: clamp(28px, 3vw, 38px); line-height: 1.4; letter-spacing: -.035em; }
.post-deck { margin: 15px 0 23px; color: #6e6975; font-size: 15px; line-height: 1.8; }
.post-byline { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.post-byline-person { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.post-avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; background: var(--avatar-bg, #ece6fa); color: var(--avatar-text, #6845a8);
  border: 1px solid rgba(0, 0, 0, .035); font-size: 14px; font-weight: 700; line-height: 1; letter-spacing: .015em; }
.post-byline-person > span { display: flex; flex-direction: column; gap: 2px; }
.post-byline-person strong { font-size: 14px; font-weight: 650; }
.post-reading-time { flex: none; color: #827a8b; font-size: 11px; }
.post-published { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 13px; color: #827a8b; font-size: 11px; }
.post-published time { color: #68616f; }
.post-topic:focus-visible, .post-nav-item:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 7px; }
@media (max-width: 760px) {
  .page-post .article-layout { padding-top: 16px; }
  .page-post .article-layout .post { padding-top: 6px; }
  .page-post .post-head h1 { font-size: 28px; }
  .post-deck { margin: 12px 0 20px; font-size: 13px; line-height: 1.85; }
  .post-byline { gap: 10px; }
  .post-reading-time { font-size: 10px; }
  .page-post .post-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .page-post .post-nav-item { min-width: 0; padding: 14px; border-radius: 12px; background: #faf8fd; }
  .page-post .post-nav-label { color: var(--accent); font-size: 11px; margin-bottom: 10px; }
  .page-post .post-nav-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
    overflow: hidden; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
  .page-post .post-nav-item:only-child { grid-column: 1 / -1; }
}
.page-directory .layout { padding-top: 25px; }

@media (max-width: 1080px) {
  .editorial-layout { grid-template-columns: 226px minmax(0, 1fr); }
  .static-layout { grid-template-columns: 226px minmax(0, 1fr); }
  .story-rail { display: none; }
}
@media (max-width: 760px) {
  .header-search-wrap { margin-left: auto; }
  .header-search-trigger span { display: none; }
  .header-search-panel { position: fixed; top: var(--header-h); left: 12px; right: 12px;
    width: auto; border-top-left-radius: 0; border-top-right-radius: 0; }
  .layout { padding-top: 20px; }
  .page-directory .layout { gap: 0; padding-top: 20px; }
  .editorial-layout { display: flex; flex-direction: column; gap: 0; padding-top: 20px; }
  .static-layout { display: flex; flex-direction: column; gap: 0; padding-top: 20px; }
  .story-sidebar {
    position: sticky; top: var(--header-h); z-index: 35; width: 100%; min-height: 0; max-height: none; overflow: visible;
    height: 0; margin: 0; padding: 0; background: transparent; border: 0; border-radius: 0;
  }
  .story-sidebar .mobile-sidebar-trigger {
    display: flex; position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; overflow: hidden;
    border: 0; clip-path: inset(50%); opacity: 0; pointer-events: none;
  }
  .story-sidebar-panel {
    position: fixed; inset: 0 auto 0 0; z-index: 71; width: min(320px, calc(100vw - 42px));
    height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
    padding: 12px; padding-top: max(12px, env(safe-area-inset-top));
    background: var(--surface); box-shadow: 12px 0 36px rgba(18, 28, 48, .18);
    transform: translateX(-105%); visibility: hidden; pointer-events: none;
    transition: transform .22s ease, visibility .22s;
  }
  .story-sidebar.is-mobile-open { z-index: 80; }
  .story-sidebar.is-mobile-open .story-sidebar-panel { transform: none; visibility: visible; pointer-events: auto; }
  .story-sidebar.is-mobile-open .mobile-sidebar-backdrop { display: block; }
  .story-sidebar .mobile-sidebar-head { display: flex; }
  .story-sidebar nav { display: flex; flex-direction: column; gap: 3px; }
  .story-sidebar .story-nav-mobile-link { display: none; }
  .story-sidebar .story-nav-item, .story-sidebar .story-nav-group summary { min-height: 44px; font-size: 14px; }
  .story-sidebar .story-nav-directory-link, .story-sidebar .story-nav-directory-toggle { min-height: 44px; font-size: 14px; }
  .story-sidebar .story-nav-children a { min-height: 40px; padding-block: 9px; font-size: 13.5px; }
  .sidebar-collapse-toggle { display: grid; }
  .static-main { max-width: none; }
  .editorial-main { width: 100%; }
}
@media (max-width: 640px) {
  .story-section { margin-top: 31px; }
  .page-home .story-section-head { align-items: flex-start; }
  .page-home .story-section:first-child .story-section-head { flex-wrap: wrap; }
  .story-section-links { justify-content: flex-start; }
  .story-section-links a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px;
    border: 1px solid var(--border); border-radius: 7px; background: var(--surface); }
  .home-paths-grid { grid-template-columns: 1fr; gap: 9px; }
  .home-path { min-height: 0; padding: 15px 16px; }
  .story-section-head h1, .story-section-head h2 { font-size: 20px; }
  .editorial-main .post-card { padding: 16px; }
  .editorial-main .post-card-title { font-size: 17px; }
  .editorial-main .post-card-desc { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .page-directory .hero { padding: 22px 0 20px; }
  .page-directory .hero-title { display: block; font-size: 26px; }
  .page-directory .hero-tagline { margin-bottom: 18px; font-size: 13px; }
  .page-post .breadcrumb { padding-top: 12px; }
}

@media (min-width: 761px) {
  html.sidebar-collapsed .layout { grid-template-columns: 62px minmax(0, 1fr); }
  html.sidebar-collapsed .static-layout { grid-template-columns: 62px minmax(0, 1fr); }
  html.sidebar-collapsed .sidebar { width: 62px; }
  html.sidebar-collapsed .sidebar-title,
  html.sidebar-collapsed .cat-nav-text,
  html.sidebar-collapsed .cat-nav-count,
  html.sidebar-collapsed .cat-filter-reset,
  html.sidebar-collapsed .sidebar .ad-sidebar { display: none; }
  html.sidebar-collapsed .cat-nav-link { justify-content: center; padding: 9px 4px; }
  html.sidebar-collapsed .sidebar .cat-nav-link { justify-content: center; padding: 9px 4px; }
  html.sidebar-collapsed .cat-nav-icon { width: auto; font-size: 19px; }
  html.sidebar-collapsed .story-sidebar { padding-inline: 7px; }
  html.sidebar-collapsed .story-nav-label,
  html.sidebar-collapsed .story-nav-chevron,
  html.sidebar-collapsed .story-nav-children { display: none; }
  html.sidebar-collapsed .story-nav-directory-toggle { display: none; }
  html.sidebar-collapsed .story-nav-directory-link { justify-content: center; padding: 10px 5px; }
  html.sidebar-collapsed .story-nav-item,
  html.sidebar-collapsed .story-nav-group summary { justify-content: center; padding: 10px 5px; }
  html.sidebar-collapsed .story-nav-item.is-active::after,
  html.sidebar-collapsed .story-nav-group.is-active > summary::after { right: -7px; }
  html.sidebar-collapsed .story-nav-directory.is-active .story-nav-directory-head::after { right: -7px; }
}
@media (min-width: 1081px) {
  html.sidebar-collapsed .editorial-layout { grid-template-columns: 62px minmax(0, 1fr) 220px; }
}
@media (min-width: 761px) and (max-width: 1080px) {
  html.sidebar-collapsed .editorial-layout { grid-template-columns: 62px minmax(0, 1fr); }
}

@media (max-width: 960px) {
  html.sidebar-collapsed .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: sticky; top: var(--header-h); z-index: 35; overflow: visible; background: var(--bg); }
  html.sidebar-collapsed .sidebar { width: auto; }
  .sidebar .mobile-sidebar-trigger { display: flex; }
  .sidebar-inner {
    position: fixed; inset: 0 auto 0 0; z-index: 71; width: min(320px, calc(100vw - 42px));
    height: 100vh; height: 100dvh; max-height: none; overflow-y: auto; overscroll-behavior: contain;
    padding: 12px; padding-top: max(12px, env(safe-area-inset-top));
    background: var(--surface); box-shadow: 12px 0 36px rgba(18, 28, 48, .18);
    transform: translateX(-105%); visibility: hidden; pointer-events: none;
    transition: transform .22s ease, visibility .22s;
  }
  .sidebar.is-mobile-open { z-index: 80; }
  .sidebar.is-mobile-open .sidebar-inner { transform: none; visibility: visible; pointer-events: auto; }
  .sidebar.is-mobile-open .mobile-sidebar-backdrop { display: block; }
  .sidebar .mobile-sidebar-head, .sidebar .sidebar-title,
  html.sidebar-collapsed .sidebar .sidebar-title { display: flex; }
  .sidebar .sidebar-title { margin: 8px 10px; }
  .sidebar .cat-nav { display: flex; flex-direction: column; gap: 3px; overflow: visible; padding: 0; }
  .sidebar .cat-nav-link, .sidebar .cat-nav:not(.is-expanded) > .cat-nav-link:nth-child(n + 7),
  html.sidebar-collapsed .sidebar .cat-nav-link {
    display: flex; justify-content: flex-start; min-height: 44px; padding: 8px 10px;
    border: 0; border-radius: 8px; background: transparent; font-size: 14px;
  }
  .sidebar .cat-nav-link.is-active, .sidebar .cat-nav-link.is-current,
  html.sidebar-collapsed .sidebar .cat-nav-link.is-active,
  html.sidebar-collapsed .sidebar .cat-nav-link.is-current { background: var(--accent-soft); }
  .sidebar .cat-nav-icon, html.sidebar-collapsed .sidebar .cat-nav-icon { width: 23px; font-size: 17px; }
  html.sidebar-collapsed .sidebar .cat-nav-text { display: inline; }
  .sidebar .cat-nav-count, html.sidebar-collapsed .sidebar .cat-nav-count { display: inline; margin-left: auto; }
  .sidebar .cat-nav-toggle { display: none; }
  .sidebar .cat-filter-reset, html.sidebar-collapsed .sidebar .cat-filter-reset { display: block; margin-top: 12px; }
  .sidebar .cat-filter-reset[hidden] { display: none; }
  .sidebar .primary-side-nav .story-nav-item { min-height: 44px; }
  .sidebar-collapse-toggle { display: grid; }
}

@media (max-width: 640px) {
  .page-directory .layout { padding-top: 20px; }
}

@media (min-width: 761px) and (max-width: 960px) {
  .layout { grid-template-columns: 226px minmax(0, 1fr); gap: 30px; }
  html.sidebar-collapsed .layout { grid-template-columns: 62px minmax(0, 1fr); }
}

/* Homepage discovery layout: imagery first, compact tools, clear reading paths. */
.page-home { --accent: #7250c9; --accent-soft: #f2edfc; --bg: #fff; --border: #e8e5ee; background: #fff; }
.page-home .discover-layout { grid-template-columns: 226px minmax(0, 1fr); gap: 30px; padding-top: 25px; }
.discover-main { width: 100%; max-width: 1400px; margin-inline: auto; }
.discover-section + .discover-section { margin-top: 42px; }
.discover-section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.discover-section-head h1, .discover-section-head h2 { margin: 0; color: #252033; font-size: 25px; line-height: 1.35; letter-spacing: -.035em; }
.discover-section-head h1 { font-size: 31px; margin-top: 4px; }
.discover-section-head p { margin: 5px 0 0; color: #6b6677; font-size: 13px; }
.discover-section-head a { flex: none; color: var(--accent); font-size: 13px; font-weight: 600; }
.discover-kicker { display: block; color: #71638c; font-size: 11px; line-height: 1.5; letter-spacing: .04em; font-weight: 600; }
.discover-feature-grid { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr 1fr; gap: 16px; }
.discover-article { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: #fff; transition: border-color .18s, box-shadow .18s; }
.discover-article:hover { border-color: #bba6e6; box-shadow: 0 7px 24px rgba(63, 34, 112, .07); }
.discover-article-link { height: 100%; display: flex; flex-direction: column; }
.discover-cover { overflow: hidden; background: #f0ebfa; }
.discover-cover img { display: block; width: 100%; aspect-ratio: 12 / 7; object-fit: cover; transition: transform .25s; }
.discover-article:hover .discover-cover img { transform: scale(1.025); }
.discover-article-copy { display: flex; flex: 1; flex-direction: column; padding: 19px 22px; min-width: 0; }
.discover-article h2 { margin: 8px 0; font-size: 19px; line-height: 1.45; letter-spacing: -.025em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.discover-article-copy > p { margin: 0 0 12px; color: #6b6677; font-size: 13px; line-height: 1.65; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.discover-meta { display: flex; flex-wrap: wrap; gap: 5px 13px; margin-top: auto; font-size: 11px; color: #77717f; }
.discover-read { display: flex; align-items: center; justify-content: space-between; color: var(--accent); font-weight: 650; font-size: 12px; margin-top: 14px; }
.discover-article-featured { grid-row: span 2; }
.discover-article-featured .discover-cover img { aspect-ratio: 16 / 7; max-height: 260px; }
.discover-article-featured h2 { font-size: clamp(21px, 1.75vw, 28px); }
.discover-feature-grid .discover-article:not(.discover-article-featured) .discover-article-link { display: grid; grid-template-columns: 35% minmax(0, 1fr); }
.discover-feature-grid .discover-article:not(.discover-article-featured) .discover-cover img { height: 100%; aspect-ratio: auto; object-fit: cover; }
.discover-feature-grid .discover-article:not(.discover-article-featured) .discover-article-copy { padding: 19px; }
.discover-feature-grid .discover-article:not(.discover-article-featured) h2 { font-size: 17px; }
.discover-feature-grid .discover-article:not(.discover-article-featured) .discover-article-copy > p { display: none; }
.discover-row-controls { display: flex; align-items: center; gap: 8px; }
.discover-row-controls > a { margin-right: 8px; }
.discover-row-controls button { flex: none; width: 34px; height: 34px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: #fff; color: var(--accent); font: inherit; cursor: pointer; }
.discover-row-controls button:disabled { opacity: .3; cursor: default; }
.discover-tool-row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / 3); gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: #d9cfeb transparent; padding-bottom: 10px; }
.discover-tool { position: relative; min-width: 0; display: flex; flex-direction: column; scroll-snap-align: start; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.discover-tool:hover { border-color: var(--border-strong); box-shadow: var(--shadow-hover); }
.discover-tool-affiliate { background: #faf7ff; }
.discover-tool-head { display: flex; align-items: center; gap: 12px; }
.discover-tool-head > div { min-width: 0; }
.discover-tool-logo { display: grid; place-items: center; flex: none; width: 48px; height: 48px; padding: 7px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.discover-tool-logo img { width: 34px; height: 34px; object-fit: contain; }
.discover-tool h3 { margin: 0 0 3px; font-size: 18px; line-height: 1.25; }
.discover-tool-category { display: inline-block; padding: 2px 5px; background: #f1edf8; color: #6d607f; font-size: 10px; line-height: 1.4; }
.discover-tool > p { margin: 14px 0 0; min-height: 24px; color: #655f70; font-size: 13px; }
.discover-disclosure { margin: 8px 0 0; font-size: 11px; color: #77717f; }
[data-google-privacy-settings][hidden] { display: none; }

/* Gamma: a compact text introduction with direct actions. */
.gamma-spotlight { margin: 14px 0 28px; padding: 20px 24px; border: 1px solid #e7e1ed; border-radius: 18px; background: radial-gradient(ellipse at 100% 0, #ede7fb 0, transparent 65%), #fffcf7; color: #23252e; scroll-margin-top: 90px; }
.gamma-spotlight-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 28px; min-width: 0; }
.gamma-spotlight-brand { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 750; }
.gamma-spotlight-brand img { width: 28px; height: 28px; border-radius: 7px; }
.gamma-affiliate-label { margin-left: 3px; padding: 3px 7px; border: 1px solid #dbd2e9; border-radius: 5px; color: #6d567e; font-size: 10px; font-weight: 500; white-space: nowrap; }
.gamma-spotlight h2 { margin: 10px 0 7px; font-size: clamp(24px, 2.1vw, 28px); line-height: 1.28; letter-spacing: -.035em; text-wrap: balance; }
.gamma-spotlight-lead { grid-column: 1; margin: 0; color: #66616b; font-size: 13px; line-height: 1.7; }
.gamma-spotlight-actions { grid-column: 2; grid-row: 2 / 4; align-self: center; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.gamma-primary { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; padding: 9px 15px; border-radius: 9px; background: #302447; color: #fff; font-size: 13px; font-weight: 650; }
.gamma-primary:hover { background: #51406f; }
.gamma-guide-link { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; color: #4d3b69; font-size: 12px; font-weight: 600; }
.gamma-guide-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.gamma-spotlight a:focus-visible { outline: 2px solid #7250c9; outline-offset: 3px; }
@media (min-width: 761px) and (max-width: 1100px) {
  .gamma-spotlight-actions { flex-direction: column; gap: 4px; }
}
@media (max-width: 760px) {
  .gamma-spotlight { margin: 18px 0 26px; padding: 18px 20px; border-radius: 16px; }
  .gamma-spotlight-copy { display: block; }
  .gamma-spotlight h2 { font-size: 25px; }
  .gamma-spotlight-lead { margin-bottom: 12px; font-size: 12px; }
}
@media (max-width: 380px) {
  .gamma-spotlight { padding: 16px; }
  .gamma-spotlight h2 { font-size: 23px; }
}
.discover-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.discover-path-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.discover-path { position: relative; padding: 18px; border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; gap: 8px; }
.discover-path:hover { background: #faf7ff; border-color: #cfc0eb; }
.discover-path-icon { width: 36px; height: 36px; display: grid; place-items: center; background: #f0eafa; border-radius: 10px; color: var(--accent); }
.discover-path strong { font-size: 15px; }
.discover-path > span:not(.discover-path-icon):not(:last-child) { color: #726b7c; font-size: 12px; }
.discover-path > span:last-child { position: absolute; right: 18px; top: 20px; color: var(--accent); }
.discover-more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.discover-more-grid .post-card { box-shadow: none; border-radius: 12px; }
.discover-more-grid .post-card-desc { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.discover-method { margin-top: 35px; padding: 18px 0; display: flex; justify-content: space-between; gap: 18px; border-top: 1px solid var(--border); font-size: 12px; color: #726b7c; }
.discover-method a { flex: none; color: var(--accent); }
.discover-main a:focus-visible, .discover-main button:focus-visible, .discover-tool-row:focus-visible { outline: 3px solid #9576dc; outline-offset: 3px; }
@media (min-width: 761px) {
  html.sidebar-collapsed .page-home .discover-layout { grid-template-columns: 62px minmax(0, 1fr); }
}
@media (min-width: 1500px) {
  .discover-tool-row { grid-auto-columns: calc((100% - 48px) / 4); }
}
@media (max-width: 1100px) and (min-width: 761px) {
  .discover-feature-grid { grid-template-columns: 1.2fr 1fr; }
  .discover-feature-grid .discover-article:not(.discover-article-featured) .discover-article-link { display: flex; }
  .discover-feature-grid .discover-article:not(.discover-article-featured) .discover-cover { display: none; }
  .discover-tool-row { grid-auto-columns: calc((100% - 16px) / 2); }
  .discover-guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .discover-path-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .page-home .discover-layout { display: flex; padding-top: 20px; gap: 0; }
  .discover-section + .discover-section { margin-top: 30px; }
  .discover-section-head { gap: 10px; margin-bottom: 14px; }
  .discover-section-head h1 { font-size: 25px; }
  .discover-section-head h2 { font-size: 21px; }
  .discover-section-head > a { font-size: 12px; }
  .discover-section-head p { font-size: 12px; }
  .discover-feature-grid { display: flex; flex-direction: column; gap: 12px; }
  .discover-article-featured .discover-cover img { aspect-ratio: 16 / 8; }
  .discover-article-featured h2 { font-size: 21px; }
  .discover-article-copy { padding: 17px; }
  .discover-feature-grid .discover-article:not(.discover-article-featured) .discover-article-link { grid-template-columns: 30% minmax(0, 1fr); }
  .discover-feature-grid .discover-article:not(.discover-article-featured) .discover-article-copy { padding: 14px; }
  .discover-feature-grid .discover-article:not(.discover-article-featured) h2 { font-size: 15px; -webkit-line-clamp: 2; }
  .discover-feature-grid .discover-article:not(.discover-article-featured) .discover-read { display: none; }
  .discover-tool-row { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-columns: auto; gap: 10px; overflow: visible; scroll-snap-type: none; padding-bottom: 0; }
  .discover-tool { display: flex; flex-direction: column; padding: 12px; }
  .discover-tool-head { gap: 8px; }
  .discover-tool-logo { width: 32px; height: 32px; padding: 4px; border-radius: 8px; }
  .discover-tool-logo img { width: 24px; height: 24px; }
  .discover-tool h3 { font-size: 14px; overflow-wrap: anywhere; }
  .discover-tool-category { font-size: 9px; }
  .discover-tool > p { margin: 8px 0 0; min-height: 0; font-size: 11px; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .discover-row-controls button { display: none; }
  .discover-row-controls > a { margin: 0; font-size: 12px; }
  .discover-disclosure { margin-top: 10px; line-height: 1.65; }
  .discover-guide-grid { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .discover-guide-grid .discover-article-link { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: start; }
  .discover-guide-grid .discover-cover { margin: 14px 0 14px 14px; border-radius: 10px; }
  .discover-guide-grid .discover-cover img { aspect-ratio: 1; object-fit: contain; padding: 5px; }
  .discover-guide-grid .discover-article-copy { padding: 14px; }
  .discover-guide-grid .discover-article h2 { margin: 5px 0 9px; font-size: 16px; line-height: 1.5; -webkit-line-clamp: 3; }
  .discover-guide-grid .discover-article-copy > p { display: none; }
  .discover-guide-grid .discover-read { min-height: 32px; margin-top: 8px; }
  .discover-path-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .discover-path { padding: 15px; }
  .discover-path strong { font-size: 14px; }
  .discover-more-grid { grid-template-columns: 1fr; }
  .discover-method { flex-direction: column; gap: 8px; }
}
@media (min-width: 600px) and (max-width: 760px) {
  .discover-tool-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  .discover-tool { padding: 10px; }
  .discover-tool-head { gap: 6px; }
  .discover-tool-logo { width: 28px; height: 28px; padding: 3px; }
  .discover-tool-logo img { width: 22px; height: 22px; }
  .discover-tool h3 { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .discover-article, .discover-cover img { transition: none; }
  .discover-article:hover .discover-cover img { transform: none; }
}

/* Homepage banners: generated artwork with accessible, localised text. */
.discover-main { container-type: inline-size; container-name: home-content; }
.home-carousel { color: #17121f; }
.home-carousel + .discover-section { margin-top: 30px; }
.home-carousel-stage { position: relative; isolation: isolate; overflow: hidden; border-radius: 24px; background: #e7ddfb; }
.home-hero-slide { position: relative; display: flex; align-items: center; min-height: 420px; }
.home-hero-slide[hidden], .home-carousel-arrows[hidden], .home-carousel-controls[hidden] { display: none; }
.home-hero-slide:not([hidden]) { animation: home-banner-enter .35s ease-out; }
@keyframes home-banner-enter { from { opacity: .65; transform: translateX(14px); } to { opacity: 1; transform: translateX(0); } }
.home-hero-art { position: absolute; inset: 0; pointer-events: none; }
.home-hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.home-hero-copy { position: relative; z-index: 1; width: 58%; padding: 38px 0 38px 64px; }
.home-hero-label { display: inline-block; margin-bottom: 15px; color: #514265; font-size: 11px; font-weight: 650; letter-spacing: .07em; line-height: 1.6; }
html:lang(zh) .home-hero-welcome .home-hero-label { font-size: 20px; letter-spacing: .02em; }
.home-hero-sponsored { padding: 3px 8px; border: 1px solid #bba2de; border-radius: 5px; background: #ede4fa; color: #533489; }
.home-hero-copy h2 { margin: 0 0 17px; font-size: clamp(30px, 4.6cqi, 54px); font-weight: 750; line-height: 1.18; letter-spacing: -.04em; text-wrap: balance; }
.home-hero-welcome h2 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(42px, 6.3cqi, 74px); font-weight: 700; line-height: 1.02; letter-spacing: -.055em; }
.home-hero-copy > p { max-width: 365px; margin: 0 0 25px; font-size: clamp(14px, 1.65cqi, 18px); line-height: 1.75; color: #51465f; }
.home-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.home-hero-action { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 46px; font-size: 13px; font-weight: 650; color: #302042; }
.home-hero-action-primary { padding: 10px 22px; border-radius: 999px; background: #17121f; color: #fff; }
.home-hero-action-primary:hover { background: #38274d; }
.home-hero-action:not(.home-hero-action-primary) { padding: 10px 22px; border: 1px solid #6d39cd; border-radius: 999px; background: #7543dd; color: #fff; box-shadow: 0 4px 12px #7543dd33; }
.home-hero-action:not(.home-hero-action-primary):hover { background: #6332c9; text-decoration: none; }
.home-carousel-arrows { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; pointer-events: none; }
.home-carousel-arrows button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0 0 4px; border: 1px solid #e1d7ee; border-radius: 50%; background: #fff; color: #17121f; font: 32px/1 Georgia, serif; cursor: pointer; pointer-events: auto; box-shadow: 0 2px 8px #3f26540a; }
.home-carousel-arrows button:hover { background: #f6f0fc; }
.home-carousel-controls { position: relative; display: flex; justify-content: center; align-items: center; min-height: 44px; }
.home-carousel-dots { display: flex; align-items: center; gap: 0; }
.home-carousel-dots button { display: grid; place-items: center; width: 28px; height: 44px; border: 0; padding: 0; background: transparent; cursor: pointer; }
.home-carousel-dots button::after { content: ''; width: 7px; height: 7px; border-radius: 10px; background: #c8c0d1; }
.home-carousel-dots button[aria-current='true']::after { width: 24px; background: #17121f; }
.home-carousel-play { position: absolute; right: 4px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: #665477; font-size: 14px; cursor: pointer; }
.home-carousel-play:hover { background: #f4eefb; }
.home-carousel:focus-visible { outline: 3px solid #9576dc; outline-offset: 5px; border-radius: 24px; }
@container home-content (max-width: 700px) {
  .home-hero-slide { flex-direction: column; align-items: stretch; min-height: 540px; }
  .home-hero-art { position: relative; height: 200px; flex: none; overflow: hidden; }
  .home-hero-art img { object-position: right center; }
  .home-hero-copy { width: 100%; padding: 23px 28px 30px; }
  .home-hero-copy h2 { font-size: 32px; line-height: 1.2; }
  .home-hero-welcome h2 { font-size: 45px; }
  .home-hero-copy > p { max-width: 100%; font-size: 15px; margin-bottom: 20px; }
  .home-hero-label { margin-bottom: 12px; }
  .home-carousel-arrows { align-items: flex-start; padding-top: 78px; }
  .home-carousel-arrows button { width: 44px; height: 44px; }
}
@container home-content (max-width: 420px) {
  .home-carousel-stage { border-radius: 18px; }
  .home-hero-art { height: 180px; }
  .home-hero-copy { padding: 21px 22px 25px; }
  .home-hero-copy h2 { font-size: 28px; }
  .home-hero-welcome h2 { font-size: 42px; }
  html:lang(zh) .home-hero-welcome .home-hero-label { font-size: 18px; }
  .home-hero-copy > p { font-size: 14px; }
  .home-hero-action { font-size: 12px; }
  .home-hero-action-primary { padding-inline: 18px; }
  .home-hero-actions { gap: 6px 13px; }
  .home-carousel-arrows { padding-top: 68px; }
}
@media (max-width: 760px) {
  .home-carousel-stage { border-radius: 18px; }
  .home-hero-slide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .7fr); align-items: center; gap: 10px 8px; min-height: 0; padding: 18px; }
  .home-hero-art { grid-column: 2; grid-row: 1 / span 2; position: relative; inset: auto; width: 100%; height: auto; aspect-ratio: 1.65; padding: 0; align-self: center; }
  /* Frame the centered subject by removing only the generated art's empty side margins. */
  .home-hero-art img { object-fit: cover; object-position: center; }
  .home-hero-copy { display: contents; }
  .home-hero-label { grid-column: 1; grid-row: 1; justify-self: start; margin: 0; font-size: 10px; }
  html:lang(zh) .home-hero-welcome .home-hero-label { font-size: clamp(14px, 3.7vw, 18px); }
  .home-hero-copy h2 { grid-column: 1; grid-row: 2; margin: 0; font-size: clamp(20px, 5.2vw, 25px); line-height: 1.2; text-wrap: initial; }
  .home-hero-welcome h2 { font-size: clamp(25px, 6.6vw, 32px); }
  .home-hero-copy > p { grid-column: 1 / -1; grid-row: 3; max-width: 100%; font-size: 13px; line-height: 1.65; margin: 0; }
  .home-hero-actions { grid-column: 1 / -1; grid-row: 4; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
  .home-hero-action { min-height: 44px; gap: 6px; font-size: 12px; text-align: center; }
  .home-hero-action-primary { padding: 8px 12px; }
  .home-hero-action:not(.home-hero-action-primary) { padding: 8px 12px; }
  .home-carousel-controls { display: flex; justify-content: center; min-height: 36px; }
  .home-carousel-arrows, .home-carousel-play { display: none; }
  .home-carousel-dots { justify-content: center; }
  .home-carousel-dots button { height: 36px; }
  .home-carousel + .discover-section { margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-hero-slide:not([hidden]) { animation: none; }
}

/* Directory overview: four sites per category and a compact category picker. */
.directory-toolbar { position: sticky; top: calc(var(--header-h) + 8px); z-index: 30; display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 3px 12px #30204208; scroll-margin-top: calc(var(--header-h) + 8px); }
.directory-filter-trigger { display: inline-flex; align-items: center; gap: 8px; min-width: 0; min-height: 40px; padding: 6px 10px; border: 0; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.directory-filter-trigger > svg { flex: none; width: 18px; height: 18px; }
#directory-current-category { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.directory-filter-trigger .directory-filter-chevron { width: 14px; height: 14px; transition: transform .15s; }
.directory-filter-trigger[aria-expanded='true'] .directory-filter-chevron { transform: rotate(180deg); }
.directory-filter-summary { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.directory-filter-reset { flex: none; min-height: 40px; padding: 6px; border: 0; background: transparent; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; }
.directory-category-panel { position: absolute; top: calc(100% + 8px); left: 0; width: min(560px, 100%); max-height: min(65vh, 440px); overflow-y: auto; overscroll-behavior: contain; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px #30204220; }
.directory-category-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.directory-category-option { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid transparent; border-radius: 8px; background: var(--surface-2); color: var(--text-2); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.directory-option-name { min-width: 0; }
.directory-option-count { flex: none; font-size: 10px; color: var(--muted); }
.directory-category-option:hover, .directory-category-option[aria-pressed='true'] { background: var(--accent-soft); border-color: var(--border-strong); color: var(--accent); }
.directory-category-option[aria-pressed='true'] { font-weight: 600; }
.directory-toolbar button:focus-visible, .cat-expand-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.directory-filter-trigger[hidden], .directory-filter-reset[hidden], .directory-category-panel[hidden], .cat-expand-toggle[hidden], .directory-cat[hidden] { display: none; }
.directory-cat { margin-bottom: 28px; scroll-margin-top: calc(var(--header-h) + 88px); }
.page-directory .directory-cat > .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.page-directory .directory-cat > .grid > .card.is-sponsored { grid-column: auto; }
.cat-expand-toggle { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; margin: 8px auto 0; padding: 5px 16px; border: 0; border-radius: 8px; background: transparent; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; }
.cat-expand-toggle:hover { background: var(--accent-soft); }
.cat-expand-toggle svg { width: 18px; height: 18px; transition: transform .15s; }
.cat-expand-toggle[aria-expanded='true'] svg { transform: rotate(180deg); }
@media (min-width: 1500px) {
  .page-directory .directory-cat > .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .directory-toolbar { gap: 6px; padding: 5px 7px; margin-bottom: 18px; }
  .directory-filter-trigger { min-height: 44px; padding: 6px 8px; }
  .directory-filter-summary, .directory-filter-reset { font-size: 11px; }
  .directory-category-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .directory-cat { margin-bottom: 22px; }
}
@media (max-width: 360px) {
  .directory-toolbar { gap: 4px; padding-inline: 5px; }
  .directory-filter-trigger { gap: 5px; padding-inline: 5px; font-size: 12px; }
  .directory-filter-reset { font-size: 10px; padding-inline: 3px; }
  .page-directory .directory-cat > .grid { gap: 8px; }
  .page-directory .directory-cat .card { padding: 8px; gap: 7px; }
  .page-directory .directory-cat .card-icon { width: 28px; height: 28px; }
  .page-directory .directory-cat .card-icon img { width: 20px; height: 20px; }
  .page-directory .directory-cat .card-title { font-size: 12px; }
}

/* Mobile discovery: compact cards, animated filters and a bottom category sheet. */
.directory-sheet-header, .directory-sheet-backdrop { display: none; }
.directory-quick-filters { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.directory-quick-filters > button { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 78px; height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.directory-quick-filters > button > svg { width: 17px; height: 17px; flex: none; }
.directory-quick-filters > button:hover { background: #f7f4fd; border-color: #d8cdec; }
.directory-quick-filters > button[aria-pressed='true'] { background: #f0ebfb; border-color: #d8cdec; color: #6844b5; }
.directory-search-form { flex: 1; min-width: 0; max-width: 620px; margin-inline: auto; }
.directory-search-box { max-width: none; margin: 0; }
.directory-search-box input { height: 44px; padding: 0 40px; border-color: var(--border); border-radius: 12px; box-shadow: none; font-size: 14px; }
.directory-search-icon { position: absolute; top: 13px; left: 13px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.directory-search-box input:focus { box-shadow: 0 0 0 3px var(--accent-soft); }
.directory-search-box .search-suggestions { left: 40px; right: 40px; gap: 6px; overflow: hidden; font-size: 14px; }
.directory-search-box .search-suggestions > span:first-child { flex: none; }
.directory-search-box .search-suggestions-window { min-width: 0; }
.directory-search-box .search-suggestions-track > span { overflow: hidden; text-overflow: ellipsis; }
.directory-search-box input:placeholder-shown:not(:focus)::placeholder { color: transparent; }
.directory-search-box input:focus ~ .search-suggestions { visibility: hidden; }
.page-directory .directory-cat .card { align-items: center; min-height: 64px; padding: 10px 12px; }
.directory-filter-summary { flex: none; }
.directory-toolbar .directory-quick-filters { order: -1; }
.directory-category-option[hidden], .directory-category-empty[hidden], .directory-sheet-backdrop[hidden], .directory-quick-filters[hidden] { display: none; }
.directory-category-empty { padding: 12px; color: var(--muted); font-size: 13px; }
.directory-grid-animating { overflow: hidden; }
@media (max-width: 760px) {
  .page-directory { --accent: #7651cf; --accent-soft: #f0ebfb; background: #fafafa; }
  .page-directory .layout { padding-top: 12px; }
  .directory-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 6px 10px; top: var(--header-h); padding: 8px 0 12px; border: 0; border-radius: 0; margin-bottom: 16px; box-shadow: none; background: #fafafa; }
  .directory-filter-summary { grid-row: 1; grid-column: 1 / -1; margin: 0; font-size: 11px; min-height: 20px; }
  .directory-filter-reset { position: absolute; top: 5px; right: 0; min-height: 28px; font-size: 11px; }
  .directory-filter-trigger { grid-row: 2; grid-column: 2; padding: 0; width: 44px; height: 44px; justify-content: center; background: #fff; border: 1px solid #ededf1; color: #27232f; border-radius: 12px; box-shadow: 0 2px 6px #20202a05; }
  .directory-filter-trigger > svg { width: 20px; height: 20px; }
  .directory-filter-trigger .directory-filter-chevron, #directory-current-category { display: none; }
  .directory-quick-filters { grid-row: 2; grid-column: 1; display: flex; gap: 10px; align-items: center; min-width: 0; overflow: visible; }
  .directory-quick-filters::-webkit-scrollbar { display: none; }
  .directory-quick-filters > button { min-width: 72px; padding-inline: 10px; font-size: 12px; }
  .directory-quick-filters button:active { transform: scale(.95); }
  .directory-cat { margin-bottom: 22px; scroll-margin-top: calc(var(--header-h) + 115px); }
  .directory-cat .cat-head { margin-bottom: 12px; align-items: center; gap: 8px; }
  .directory-cat .cat-title { font-size: 18px; gap: 6px; }
  .directory-cat .cat-count { border: 0; background: #efeff2; padding: 2px 7px; font-size: 11px; }
  .directory-cat .cat-icon { font-size: 16px; }
  .directory-cat .cat-more { font-size: 11px; color: var(--accent); }
  .directory-cat .cat-desc { display: none; }
  .page-directory .directory-cat > .grid { gap: 10px; background: transparent; border: 0; border-radius: 0; overflow: visible; box-shadow: none; }
  .page-directory .directory-cat .card { align-items: center; min-height: 64px; padding: 10px; gap: 9px; border: 1px solid #ededf1; border-radius: 12px; box-shadow: 0 2px 6px #25232c03; background: #fff; transition: background .18s, transform .18s; }
  .page-directory .directory-cat .card:hover { transform: none; box-shadow: none; background: #fcfaff; }
  .page-directory .directory-cat .card:active { background: #f4f0fc; transform: scale(.98); }
  .page-directory .directory-cat .card:focus-visible { outline-offset: -3px; }
  .page-directory .directory-cat .card-icon { width: 32px; height: 32px; border-radius: 9px; }
  .page-directory .directory-cat .card-icon img { width: 24px; height: 24px; }
  .page-directory .directory-cat .card-title { font-size: 13px; }
  .page-directory .directory-cat .card-desc-mobile { font-size: 11px; }
  .page-directory .directory-cat .card-sponsored { font-size: 9px; padding: 1px 4px; }
  .directory-cat .cat-expand-toggle { width: auto; min-height: 36px; margin: 6px auto 0; padding: 6px 14px; color: #635e70; background: transparent; border: 0; border-radius: 10px; font-size: 11px; }
  .directory-cat .cat-expand-toggle:hover { background: #fcfaff; }
  .directory-cat .cat-expand-toggle:active { background: #f4f0fc; }
  .directory-sheet-open { overflow: hidden; }
  .directory-sheet-backdrop { display: block; position: fixed; inset: 0; z-index: 110; border: 0; background: #15121c66; backdrop-filter: blur(2px); cursor: pointer; animation: directory-backdrop-enter .2s ease-out; }
  .directory-category-panel { position: fixed; z-index: 111; top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 82vh; max-height: 82dvh; display: flex; flex-direction: column; overflow: hidden; border: 0; border-radius: 24px 24px 0 0; padding: 0 18px max(16px, env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -12px 40px #17121f16; color: #24212d; --accent: #7651cf; --accent-soft: #f0ebfb; }
  .directory-category-panel[hidden], .directory-sheet-backdrop[hidden] { display: none; }
  .directory-sheet-header { display: block; flex: none; }
  .directory-sheet-handle { position: relative; width: 100%; height: 28px; cursor: grab; touch-action: none; }
  .directory-sheet-handle::after { content: ''; position: absolute; width: 40px; height: 5px; border-radius: 6px; background: #c8c7cd; left: calc(50% - 20px); top: 11px; }
  .directory-sheet-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
  .directory-sheet-heading h2 { margin: 0; font-size: 20px; line-height: 1.4; }
  .directory-sheet-heading > span { color: #87838f; font-size: 11px; }
  #directory-sheet-close { margin-left: auto; display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: #302a3b; font-family: inherit; font-size: 26px; line-height: 1; cursor: pointer; }
  .directory-category-search { display: flex; align-items: center; gap: 9px; padding: 0 12px; min-height: 44px; background: #f5f5f7; border-radius: 12px; margin-bottom: 14px; }
  .directory-category-search svg { width: 18px; height: 18px; flex: none; color: #8b8795; }
  .directory-category-search input { width: 100%; min-width: 0; min-height: 44px; border: 0; outline: none; background: transparent; color: #302a3b; font: inherit; font-size: 16px; }
  .directory-category-search:focus-within { box-shadow: 0 0 0 2px #c6b7ec; }
  .directory-category-options { min-height: 0; overflow-y: auto; overscroll-behavior: contain; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 2px 2px 4px; }
  .directory-category-option { min-height: 46px; padding: 10px; background: #f7f7f9; border: 1px solid transparent; border-radius: 12px; font-size: 12px; }
  .directory-category-option:hover { background: #efecf5; border-color: transparent; }
  .directory-category-option[aria-pressed='true'] { background: #f0ebfb; border-color: transparent; color: #7651cf; }
  .directory-category-option[aria-pressed='true'] .directory-option-count { color: #7651cf; }
  .directory-category-panel button:focus-visible { outline: 2px solid #7651cf; outline-offset: -2px; }
}
@media (max-width: 360px) {
  .directory-quick-filters button { min-width: 66px; padding-inline: 8px; font-size: 11px; gap: 5px; }
  .page-directory .directory-cat .card { padding: 10px 8px; gap: 7px; }
  .page-directory .directory-cat .card-icon { width: 28px; height: 28px; }
  .page-directory .directory-cat .card-icon img { width: 20px; height: 20px; }
  .page-directory .directory-cat .card-title { font-size: 12px; }
}
@keyframes directory-backdrop-enter { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .directory-quick-filters button, .directory-cat .card, .cat-expand-toggle svg { transition: none; }
  .directory-sheet-backdrop { animation: none; }
}
