/*
Theme Name: 创新品
Theme URI: https://ykyh.net
Author: 创新品
Author URI: https://ykyh.net
Description: 创新品：基于 Homebrew 公开目录的中文 Mac 应用与命令行工具目录主题。提供应用详情、分类、开源精选、替代品、对比、合集与客户端搜索。
Version: 1.0.85
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ykyh-picks
Tags: custom-post-types, custom-taxonomy, directory, chinese, accessibility-ready
*/

:root {
  --bg: #fbfbfd;
  --fg: #16161a;
  --muted: #63636b;
  --line: #e3e3e9;
  --card: #ffffff;
  --accent: #0a5cff;
  --accent-soft: #eef3ff;
  --ok: #0a7f4f;
  --warn: #9a5b00;
  --code-bg: #16161a;
  --code-fg: #e9e9ef;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 16, 24, .05), 0 8px 24px -12px rgba(16, 16, 24, .18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e11;
    --fg: #f2f2f5;
    --muted: #9c9ca6;
    --line: #26262c;
    --card: #16161a;
    --accent: #7aa2ff;
    --accent-soft: #1a2033;
    --ok: #4ec98b;
    --warn: #e0a94a;
    --code-bg: #000000;
    --code-fg: #e9e9ef;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 30px -16px rgba(0, 0, 0, .8);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 18px; min-height: 58px; height: auto; }
.brand { font-weight: 700; font-size: 17px; letter-spacing: -.02em; color: var(--fg); }
.brand span { color: var(--accent); }
.brand-logo { display: block; height: 28px; width: auto; }
@media (prefers-color-scheme: dark) {
  .brand-logo { filter: brightness(0) invert(1); }
}
.topnav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; margin-left: 6px; }
.topnav a { color: var(--muted); }
.topnav a:hover { color: var(--fg); text-decoration: none; }
.nav-dropdown { position: relative; }
.nav-dropdown summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::after { content: "▾"; font-size: 10px; line-height: 1; }
.nav-dropdown[open] summary { color: var(--fg); }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 60;
  min-width: 190px;
  display: grid;
  gap: 2px;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.nav-dropdown-menu a {
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--fg);
  font-size: 14px;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.searchbox { position: relative; margin-left: auto; width: min(340px, 42vw); }
.searchbox input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  font-size: 14px;
  outline: none;
}
.searchbox input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.searchbox::before {
  content: "⌕";
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 16px;
  pointer-events: none;
}
.searchbox .search-results {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: none;
}
.searchbox .search-results.open { display: block; }
.searchbox .search-results a { display: block; padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--fg); font-size: 14px; }
.searchbox .search-results a:last-child { border-bottom: 0; }
.searchbox .search-results a:hover { background: var(--accent-soft); text-decoration: none; }
.searchbox .search-results small { color: var(--muted); display: block; font-size: 12px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 440px;
  padding: 72px 0;
  text-align: center;
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg,
      color-mix(in srgb, var(--bg) 86%, transparent) 0%,
      color-mix(in srgb, var(--bg) 62%, transparent) 55%,
      color-mix(in srgb, var(--bg) 86%, transparent) 100%),
    url("img/apple.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  overflow: hidden;
}
.hero > .wrap { width: 100%; }
.hero h1 {
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.06;
  letter-spacing: -.035em;
  margin: 0 0 10px;
  font-weight: 750;
}
.hero-subtitle {
  font-size: clamp(20px, 3.2vw, 32px);
  line-height: 1.25;
  letter-spacing: -.02em;
  margin: 0 0 26px;
  font-weight: 750;
  background: linear-gradient(100deg, var(--accent) 0%, #8b5cf6 55%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-accent {
  background: linear-gradient(100deg, var(--accent) 0%, #8b5cf6 55%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 28px;
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.hero-btn:hover { text-decoration: none; transform: translateY(-1px); }
.hero-btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--accent) 75%, transparent);
}
.hero-btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.hero-btn-ghost {
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
}
.hero-btn-ghost:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  color: var(--accent);
}
@media (prefers-color-scheme: dark) {
  .hero-btn-primary { color: #0e0e11; }
  .hero-btn-primary:hover { background: color-mix(in srgb, var(--accent) 85%, #fff); }
}
.hero .cmd { margin-top: 22px; }

/* ---------- sections ---------- */
section { padding: 30px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head h2 { font-size: 21px; letter-spacing: -.02em; margin: 0; }
.section-head a { font-size: 14px; }
.lede { color: var(--muted); margin: 0 0 22px; max-width: 720px; }

/* ---------- cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 12px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 15px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--fg);
  transition: border-color .12s ease, transform .12s ease;
}
.card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.card .name { font-weight: 620; font-size: 15px; letter-spacing: -.01em; }
.card .desc {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }

.badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.badge.accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--accent-soft); }
.badge.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.badge.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }

/* ---------- breadcrumbs ---------- */
.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  margin: 18px 0 12px;
  padding: 8px 14px;
  background: transparent;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}
.crumbs a {
  padding: 1px 2px;
  border-radius: 6px;
  color: var(--muted);
  transition: color .15s ease, background .15s ease;
}
.crumbs a:hover {
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}
.crumbs a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.crumbs span {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  opacity: .45;
  font-size: 12px;
}
.crumbs strong {
  color: var(--fg);
  font-weight: 600;
}
@media (max-width: 640px) {
  .crumbs {
    gap: 6px;
    width: 100%;
    margin: 14px 0 10px;
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 12.5px;
  }
}

/* ---------- app page ---------- */
.app-head { padding: 14px 0 26px; }
.app-head h1 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.03em; margin: 6px 0 10px; line-height: 1.15; }
.app-head .sub { color: var(--muted); font-size: 17px; margin: 0; max-width: 700px; }

.cmd {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  white-space: normal;
  text-align: left;
  background: var(--code-bg);
  color: var(--code-fg);
  font: 13.5px/1.4 ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace;
  padding: 11px 14px;
  border-radius: 9px;
  border: 0;
  cursor: pointer;
}
.cmd .dollar { flex: none; color: #6f6f7a; }
.cmd .copy { flex: none; color: #9a9aa6; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; }
.cmd > span:nth-of-type(2) {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.cmd:hover .copy { color: #fff; }
.cmd.copied .copy { color: #4ec98b; }

.cols { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 34px; align-items: start; }
 .app-main {
  min-width: 0;
  padding: 24px 30px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.app-layout .app-head { padding-top: 0; }
.app-layout > aside {
  position: sticky;
  top: 78px;
  align-self: start;
  height: auto;
  max-height: none;
  overflow: visible;
}
.admin-bar .app-layout > aside {
  top: 110px;
}
@media (max-width: 820px) {
  .cols { grid-template-columns: 1fr; }
  .app-layout > aside {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

table.facts { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.facts th, table.facts td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.facts th { color: var(--muted); font-weight: 500; width: 42%; }
table.facts td { font-weight: 500; overflow-wrap: anywhere; }
table.facts tr:last-child th, table.facts tr:last-child td { border-bottom: 0; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.panel h2 { font-size: 15px; margin: 0 0 12px; letter-spacing: -.01em; }
.panel + .panel { margin-top: 14px; }
.collection-links a { display: inline-block; margin: 0 10px 6px 0; font-size: 14px; }
.data-note { margin: 20px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.prose h2 { font-size: 19px; letter-spacing: -.02em; margin: 34px 0 10px; }
.prose h3 { font-size: 16px; margin: 24px 0 8px; }
.prose p { margin: 0 0 14px; }
.prose ul { padding-left: 20px; margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }

.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  font-size: 14.5px;
  margin: 18px 0;
}

.rank-list { list-style: none; padding: 0; margin: 0; }
.rank-list li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.rank-list li:last-child { border-bottom: 0; }
.rank-list .num { color: var(--muted); font-variant-numeric: tabular-nums; width: 26px; flex: none; font-size: 13px; }
.rank-list .count { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }

/* ---------- filter chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.chip {
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--card);
}
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.chip.active { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ---------- comparison ---------- */
.vs-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center; padding: 18px 0 8px; }
.vs-head .side { text-align: center; }
.vs-head .side .name { font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.vs-head .side .desc { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.vs-head .vs { font-size: 13px; color: var(--muted); font-weight: 700; letter-spacing: .08em; }

table.compare { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.compare th, table.compare td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; }
table.compare thead th { font-size: 13px; color: var(--muted); font-weight: 600; }
table.compare tbody th { color: var(--muted); font-weight: 500; width: 30%; }
table.compare tr:last-child th, table.compare tr:last-child td { border-bottom: 0; }
table.compare td.win { color: var(--ok); font-weight: 600; }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 56px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  border-top: 1px solid var(--line);
  padding: 28px 0 44px;
  color: var(--muted);
  font-size: 13.5px;
}
.site-footer > .wrap { width: 100%; }
.site-footer .cols2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}
@media (max-width: 700px) {
  .site-footer .cols2 { gap: 18px; }
}
.site-footer h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg); margin: 0 0 10px; }
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer li { margin-bottom: 0; }
.site-footer a { color: var(--muted); }
.copyright {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12.5px;
}
.copyright p { margin: 0 0 6px; }
.copyright p:last-child { margin-bottom: 0; }
.copyright .beian { color: var(--muted); }
.copyright .beian:hover { color: var(--accent); }
.copyright .beian i { font-style: normal; color: var(--ok); }
.copyright .beian i::before { content: "✓"; font-weight: 700; margin-right: 4px; }
.copyright_statement { color: var(--muted); }

/* ---------- blog ---------- */
.sticky-posts { margin-bottom: 30px; }
.sticky-posts > h2 { font-size: 20px; letter-spacing: -.02em; margin: 0 0 14px; }
.sticky-list { display: grid; gap: 16px; }
.sticky-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.sticky-card.no-thumb { grid-template-columns: 1fr; }
.sticky-thumb { display: block; overflow: hidden; background: var(--accent-soft); min-height: 240px; }
.sticky-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sticky-body { display: flex; flex-direction: column; justify-content: center; padding: 26px 28px; }
.sticky-body h3 { font-size: clamp(20px, 2.4vw, 28px); line-height: 1.25; letter-spacing: -.02em; margin: 10px 0; }
.sticky-body h3 a { color: var(--fg); }
.sticky-body h3 a:hover { color: var(--accent); text-decoration: none; }
.sticky-body p { color: var(--muted); font-size: 14.5px; line-height: 1.7; margin: 0 0 16px; }
.sticky-body .post-more { margin-top: 0; }

.archive-head { padding: 46px 0 26px; }
.archive-head h1 { font-size: clamp(30px, 4.4vw, 44px); line-height: 1.15; letter-spacing: -.03em; margin: 0 0 10px; }
.archive-head .lede { margin: 0; }

.post-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.post-thumb { display: block; overflow: hidden; aspect-ratio: 16 / 10; background: var(--accent-soft); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.post-card:hover .post-thumb img { transform: scale(1.03); }
.post-card-body { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 18px 20px 20px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; color: var(--muted); font-size: 13px; }
.post-cat { color: var(--accent); font-weight: 600; }
.post-title { font-size: 18px; line-height: 1.35; letter-spacing: -.02em; margin: 8px 0; }
.post-title a { color: var(--fg); }
.post-title a:hover { color: var(--accent); text-decoration: none; }
.post-excerpt { color: var(--muted); font-size: 14px; line-height: 1.65; margin: 0 0 14px; }
.post-more { margin-top: auto; font-size: 14px; font-weight: 600; }
.post-more:hover { text-decoration: none; }

.post-single { max-width: 820px; margin: 0 auto; padding: 36px 0 0; }
.post-head { margin-bottom: 24px; text-align: center; }
.post-head h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.15; letter-spacing: -.03em; margin: 0 0 12px; }
.post-deck { color: var(--muted); font-size: 17px; line-height: 1.7; max-width: 680px; margin: 0 auto 16px; }
.post-meta-bottom { justify-content: flex-start; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.post-hero { margin: 0 0 28px; }
.post-hero img { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.post-content { font-size: 16.5px; line-height: 1.8; }
.post-content h2 { font-size: 24px; letter-spacing: -.02em; margin: 36px 0 12px; }
.post-content h3 { font-size: 19px; margin: 28px 0 10px; }
.post-content p { margin: 0 0 18px; }
.post-content ul, .post-content ol { padding-left: 22px; margin: 0 0 18px; }
.post-content li { margin-bottom: 6px; }
.post-content img { max-width: 100%; height: auto; border-radius: 10px; }
.post-content blockquote { margin: 22px 0; padding: 14px 18px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; }
.post-content code { background: var(--accent-soft); padding: 2px 5px; border-radius: 5px; font-size: 14px; }
.post-content pre { background: var(--code-bg); color: var(--code-fg); padding: 16px 18px; border-radius: 10px; overflow: auto; }
.post-content pre code { background: none; padding: 0; color: inherit; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; }
.post-tags a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--muted); }
.post-tags a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.post-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 34px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.post-nav-link { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.post-nav-link span { color: var(--muted); font-size: 12.5px; }
.post-nav-link strong { font-size: 14.5px; line-height: 1.45; }
.post-nav-link:hover { border-color: var(--accent); text-decoration: none; }
.post-nav-next { text-align: right; }
.post-related { margin-top: 44px; }
.post-related h2 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 16px; }
.post-related .post-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.post-related .post-card { display: flex; flex-direction: column; gap: 0; padding: 0; }
.post-related .post-thumb { aspect-ratio: 16 / 10; border-radius: 0; }
.post-related .post-card-body { padding: 14px 16px 16px; }
.post-related .post-title { font-size: 16px; }
.post-related .post-excerpt { font-size: 13px; line-height: 1.6; margin: 0 0 10px; }
.post-related .post-more { font-size: 13px; }
.post-single .comments-wrap { max-width: none; margin-top: 34px; }

@media (max-width: 980px) {
  .post-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .archive-head { padding: 30px 0 20px; }
  .sticky-card { grid-template-columns: 1fr; }
  .sticky-thumb { min-height: 0; aspect-ratio: 16 / 9; }
  .sticky-body { padding: 18px 20px 20px; }
  .post-list { grid-template-columns: 1fr; }
  .post-related .post-list { grid-template-columns: 1fr; }
  .post-thumb { aspect-ratio: 16 / 9; }
  .post-content { font-size: 16px; }
}

/* ---------- site map ---------- */
.sitemap-cats a { display: inline-block; margin: 0 10px 6px 0; }
.sitemap-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  columns: 3 220px;
  column-gap: 24px;
  font-size: 14px;
}
.sitemap-list li { margin: 0 0 6px; break-inside: avoid; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 28px; font-size: 14px; }
.pagination a, .pagination span {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pagination .current { background: var(--fg); color: var(--bg); border-color: var(--fg); }

@media (max-width: 720px) {
  .topnav { display: none; }
  .searchbox { width: auto; flex: 1; }
  .hero {
    min-height: 360px;
    padding: 48px 0 44px;
    background-position: 58% center;
  }
  .hero h1 { font-size: clamp(32px, 9vw, 44px); }
  .hero-subtitle { font-size: clamp(18px, 5vw, 24px); }
  .hero p { font-size: 15.5px; }
  .hero-btn { height: 42px; padding: 0 16px; }
  .grid { grid-template-columns: 1fr; }
}


/* ---------- SEO/GEO additions ---------- */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 14px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

.quick-answer {
  margin: 18px 0 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--accent-soft);
  font-size: 15.5px;
  line-height: 1.55;
}
.quick-answer code { white-space: normal; overflow-wrap: anywhere; }

.updated {
  color: var(--muted);
  font-size: 12.5px;
  margin: 12px 0 0;
}

.mobile-menu { display: none; position: relative; }
.mobile-menu summary {
  cursor: pointer;
  list-style: none;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13.5px;
  white-space: nowrap;
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu nav {
  position: absolute;
  right: 0;
  top: 42px;
  min-width: 190px;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 50;
}
.mobile-menu nav a {
  padding: 9px 10px;
  border-radius: 7px;
  color: var(--fg);
  font-size: 14px;
}
.mobile-menu-heading {
  display: block;
  padding: 8px 10px 2px;
  color: var(--muted);
  font-size: 12px;
}
.mobile-menu nav a:hover { background: var(--accent-soft); text-decoration: none; }

a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 860px) {
  .topnav { display: none; }
  .mobile-menu { display: block; }
  .searchbox { width: min(300px, 46vw); }
}

@media (max-width: 720px) {
  .topbar-inner { gap: 10px; }
  .brand { font-size: 16px; }
  .brand-logo { height: 24px; }
  .searchbox { width: auto; flex: 1; margin-left: 0; }
  .quick-answer { font-size: 14.5px; padding: 12px 14px; }
  table.compare { font-size: 13px; }
  table.compare th, table.compare td { padding: 9px 8px; }
}

/* WordPress admin bar offset */
.admin-bar .topbar { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .topbar { top: 46px; }
}

/* Comments */
.comments-wrap {
  height: auto;
  min-height: 0;
  margin-top: 28px;
  max-width: calc((100% - 34px) * 0.62264);
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.prose .comments-wrap { max-width: none; }
.comments { height: auto; min-height: 0; max-width: none; }
.comments > h2 { font-size: 19px; margin: 0 0 10px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 16px; }
.comment-list .comment { border-bottom: 1px solid var(--line); padding: 8px 0; }
.comment-list .comment:last-child { border-bottom: 0; }
.comment-list .children { list-style: none; padding-left: 16px; margin: 0; }
.comment-list .comment-body { margin: 0; }
.comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  margin: 0 0 6px;
  line-height: 1.4;
  color: var(--muted);
  font-size: 12.5px;
}
.comment-author {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: var(--fg);
  font-size: 14px;
  font-weight: 600;
}
.comment-author .fn { font-style: normal; }
.comment-author .says { display: none; }
.comment-metadata { font-size: 12px; font-variant-numeric: tabular-nums; }
.comment-metadata a { color: var(--muted); text-decoration: none; }
.comment-metadata a:hover { color: var(--accent); text-decoration: underline; }
.comment-content {
  font-size: 14.5px;
  line-height: 1.6;
  margin-top: 0;
  color: var(--fg);
  overflow-wrap: anywhere;
}
.comment-content p { margin: 0 0 8px; }
.comment-content p:last-child { margin-bottom: 0; }
.comment-content ul,
.comment-content ol { margin: 0 0 6px; padding-left: 18px; }
.comment-content li { margin-bottom: 3px; }
.comment-content blockquote {
  margin: 4px 0;
  padding: 6px 10px;
  border-left: 3px solid var(--line);
  color: var(--muted);
}
.comment-content code { font-size: 13px; }
.comment-list .reply { margin-top: 4px; }
.comment-list .reply a { font-size: 12.5px; }
.comment-respond { margin-top: 20px; }
.comment-respond h3 { font-size: 17px; margin: 0 0 10px; }
.comment-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.comment-form-comment,
.comment-form .comment-notes,
.comment-form .logged-in-as,
.comment-form-cookies-consent,
.comment-form .form-submit,
.comment-form .comment-form-html5-validation-note { grid-column: 1 / -1; }
.comment-form p { margin: 0; }
.comment-form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  color: var(--fg);
  font: inherit;
}
.comment-form textarea { min-height: 64px; resize: vertical; }
.comment-form .comment-notes,
.comment-form .logged-in-as,
.comment-form .comment-form-html5-validation-note { order: 0; }
.comment-form-author,
.comment-form-email,
.comment-form-url { order: 1; }
.comment-form-comment { order: 2; }
.comment-form-cookies-consent { order: 3; }
.comment-form .form-submit { order: 4; margin: 0; }
.comment-form input[type="submit"],
.comment-form button[type="submit"] {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 9px;
  padding: 8px 16px;
  cursor: pointer;
  font: inherit;
}
.comment-form .comment-notes,
.comment-form .logged-in-as { color: var(--muted); font-size: 13px; }
.comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  grid-column: 1 / -1;
  padding: 8px 10px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 10px;
}
.comment-form-cookies-consent input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 2px solid var(--accent);
  border-radius: 6px;
  background-color: var(--card);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 15px 15px;
  cursor: pointer;
}
.comment-form-cookies-consent input[type="checkbox"]:checked {
  background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.comment-form-cookies-consent input[type="checkbox"]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}
.comment-form-cookies-consent label {
  margin: 0;
  color: var(--fg);
  font-size: 13.5px;
  line-height: 1.5;
  cursor: pointer;
}
@media (max-width: 820px) {
  .comments-wrap { max-width: none; }
}
@media (max-width: 640px) {
  .comments-wrap { padding: 14px 14px; }
}
@media (max-width: 640px) {
  .app-main { padding: 18px 16px; }
  .comment-list .children { padding-left: 10px; }
  .comment-form { grid-template-columns: 1fr; }
}
