/*
Theme Name: YKYH
Theme URI: https://ykyh.net
Author: gaocheng
Author URI: https://ykyh.net
Description: YKYH is an English-language directory theme for macOS apps and command-line tools built on the public Homebrew catalogue. It ships app details, categories, open-source picks, alternatives, comparisons, collections and client-side search, plus member registration, article and app submissions with manual review.
Version: 1.9.23
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, english, accessibility-ready
*/

:root {
  --bg: #fbfbfd;
  --fg: #16161a;
  --muted: #63636b;
  --nav-fg: #46464f;
  --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;
    --nav-fg: #c2c2cc;
    --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;
  /* Frosted glass: a translucent surface that blurs whatever scrolls underneath. */
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(0, 0, 0, .07);
}
/* Browsers without backdrop-filter get the old opaque bar instead of a muddy wash. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .topbar { background: var(--bg); }
}
@media (prefers-color-scheme: dark) {
  .topbar {
    background: rgba(22, 22, 26, .72);
    border-bottom-color: rgba(255, 255, 255, .09);
  }
}
/* The English nav has more and longer items than the original Chinese one. Instead of
   widening the bar past the 1080px page grid, the bar keeps the page width and the nav
   stays on one row through shorter labels, a smaller type size and tight gaps. */
.topbar-inner { display: flex; align-items: center; gap: 8px; min-height: 60px; 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: 32px; width: auto; }
@media (prefers-color-scheme: dark) {
  .brand-logo { filter: brightness(0) invert(1); }
}
.topnav {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px 8px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  margin-left: 2px;
  white-space: nowrap;
  /* The nav box takes all the room between the logo and the search box and spreads
     its links across it, so no empty gap is left before the search field. */
  flex: 1 1 auto;
  justify-content: space-between;
  /* Keep every item on a single row; if a narrow desktop cannot fit them all the
     strip scrolls sideways instead of wrapping or overlapping the search box. */
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.topnav::-webkit-scrollbar { display: none; }
.topnav a {
  color: var(--nav-fg);
  font-weight: 400;
  transition: color .15s ease;
}
.topnav a:hover { color: var(--fg); text-decoration: none; }
/* Spacing separates the items; the old "|" dividers are dropped because the English
   labels need every pixel to stay on a single row. */
.topnav > a + a::before { content: none; }
/* --- Single-row top bar: narrower search box, nav does not wrap --- */
@media (min-width: 861px) {
  .topnav { flex-wrap: nowrap; }
  .topnav a { white-space: nowrap; }
}
@media (min-width: 861px) and (max-width: 1080px) {
  .topnav { gap: 6px 6px; font-size: 11px; margin-left: 2px; }
  .searchbox { width: 150px; }
  .searchbox input { font-size: 12px; padding-left: 26px; padding-right: 6px; }
  .brand-logo { height: 24px; }
  .search-submit { padding: 0 9px; font-size: 12px; }
}

.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(240px, 22vw); flex: 0 0 auto; display: flex; align-items: center; gap: 6px; /* SP-NARROW */ }
.searchbox input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  padding: 5px 12px 5px 32px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  font-size: 13px;
  height: 34px;
  outline: none;
}
/* Clicking the search box must not change its appearance (no blue border or glow);
   keyboard focus still falls back to the global input:focus-visible outline for accessibility */
.searchbox input:focus { border-color: var(--line); box-shadow: none; }
/* Text inputs match :focus-visible on any focus method; disable it here too so the box keeps its look */
.searchbox input:focus-visible { outline: none; }
.search-submit {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  white-space: nowrap;
}
.search-submit:hover { filter: brightness(1.08); }
.search-submit:active { filter: brightness(.95); }
.searchbox::before {
  content: "⌕";
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 16px;
  pointer-events: none;
}
.search-progress {
  height: 4px;
  margin: 14px 0 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.search-progress[hidden] { display: none; }
.search-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width .18s linear;
}

.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: 300px;
  padding: 40px 0;
  text-align: center;
  background-color: var(--bg);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--bg);
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  animation: heroSlide 21s infinite;
  will-change: opacity;
}
.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 7s; }
.hero-slide:nth-child(3) { animation-delay: 14s; }
/* color overlay to keep text readable, same 40% as before */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .42);
}
@media (prefers-color-scheme: dark) {
  .hero-bg::after { background: rgba(0, 0, 0, .50); }
}
@keyframes heroSlide {
  0%   { opacity: 0; }
  4%   { opacity: 1; }
  29%  { opacity: 1; }
  33%  { opacity: 0; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide { animation: none; }
  .hero-slide:nth-child(1) { opacity: 1; }
}
.hero > .wrap { position: relative; z-index: 1; width: 100%; }
.hero h1 {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.15;
  letter-spacing: -.03em;
  margin: 0 0 8px;
  white-space: nowrap;
  font-weight: 750;
  color: #555;
}
@media (prefers-color-scheme: dark) {
  .hero h1 { color: #a0a0a8; }
}
.hero-subtitle {
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.25;
  letter-spacing: -.02em;
  margin: 0 0 14px;
  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: 15px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 18px;
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
  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(22px, 2.8vw, 30px); letter-spacing: -.03em; margin: 6px 0 10px; line-height: 1.2; }
.app-head .sub { color: var(--muted); font-size: 17px; margin: 0; max-width: 700px; }

/* GitHub repo avatar next to the title, used as the app icon */
.app-title {
  display: flex;
  align-items: center;
  gap: 14px;
}
.app-title h1 {
  flex: 1;
  min-width: 0;
}
/* Letter badge shown when an app has no icon: colour is derived per app name. */
.app-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  color: #fff;
  user-select: none;
}
/* .app-icon / .card-icon / .star-card-icon set an opaque background further down the
   sheet and are equally specific, so the badge needs the compound selectors to win. */
.app-icon.app-initial,
.card-icon.app-initial,
.star-card-icon.app-initial,
.demo-icon.app-initial {
  background: hsl(var(--ini-h, 214) 68% 52%);
  background-image: linear-gradient(135deg,
    hsl(var(--ini-h, 214) 68% 58%),
    hsl(calc(var(--ini-h, 214) + 32) 70% 44%));
  border-color: rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 1px 2px rgba(0, 0, 0, .10);
  color: #fff;
}

.app-icon {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 20px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}
@media (max-width: 720px) {
  .app-title { gap: 10px; }
  .app-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
  }
}

.cmd {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  white-space: normal;
  text-align: left;
  background: #f5f6f8;
  color: #16161a;
  font: 13.5px/1.4 ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace;
  padding: 11px 14px;
  border-radius: 9px;
  border: 1px solid #16161a;
  cursor: pointer;
}
.cmd .dollar { flex: none; color: #6f6f7a; }
.cmd .copy { flex: none; color: #6b6b75; font-size: 11.5px; letter-spacing: .02em; }
.cmd > span:nth-of-type(2) {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.install-steps .cmd {
  display: flex;
  width: 100%;
  margin-top: 8px;
}

.cmd:hover { background: #eef1f6; }
.cmd:hover .copy { color: #0a5cff; }
.cmd.copied .copy { color: #0a7f4f; }

.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;
}

/* Tighter sidebar: reduced panel padding and fact-table/ranking row heights to give the body more room */
.app-layout aside .panel {
  padding: 11px 13px;
}
.app-layout aside .panel + .panel {
  margin-top: 9px;
}
.app-layout aside .panel h2 {
  font-size: 13px;
  margin: 0 0 5px;
}
.app-layout aside table.facts {
  font-size: 12.5px;
}
.app-layout aside table.facts th,
.app-layout aside table.facts td {
  padding: 4.5px 0;
}
/* Website/repo URLs in the overview: small, single line; scroll horizontally when long, full URL in title */
.app-layout aside .facts .fact-row-url th {
  width: 32%;
}
.app-layout aside .fact-url {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-width: 100%;
  max-height: 3em;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-all;
  font-size: 11px;
  line-height: 1.5;
}
.app-layout aside .fact-url a {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-all;
}
.app-layout aside .panel-sub {
  font-size: 12.5px;
  margin: 8px 0 5px;
  padding-top: 7px;
}
.app-layout aside .panel-sub::before {
  height: 12px;
}
.app-layout aside .panel .cmd {
  font-size: 11.5px;
  padding: 7px 9px;
}
.app-layout aside .rank-list li {
  gap: 8px;
  padding: 4.5px 0;
  font-size: 12.5px;
}
@media (max-width: 820px) {
  .cols { grid-template-columns: 1fr; }
  .app-layout aside {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
  /* Spacing when app.js moves the overview below "Supported systems" */
  .app-layout aside.is-inline {
    margin: 16px 0 26px;
  }
  .app-layout aside.is-inline .panel:first-child {
    margin-top: 0;
  }
}

/* When JS temporarily moves the sidebar, this placeholder remembers its desktop position; it does not participate in layout. */
.app-aside-slot { display: none; }

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: 1px solid var(--line);
  border-left: 4px solid var(--line);
  background: transparent;
  padding: 12px 15px;
  border-radius: 0 10px 10px 0;
  font-size: 12px;
  line-height: 1.65;
  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(24px, 3.3vw, 34px); line-height: 1.3; letter-spacing: -.02em; margin: 0 0 10px; }
.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: 260px;
    padding: 30px 0 28px;
    background-position: 58% center;
  }
  .hero h1 {
    font-size: clamp(18px, 4.2vw, 24px);
    white-space: normal;
  }
  .hero-subtitle { font-size: clamp(17px, 4.6vw, 20px); }
  .hero p { font-size: 14.5px; }
  .hero-btn { height: 36px; padding: 0 14px; }
  .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(--line);
  border-radius: 0 10px 10px 0;
  background: transparent;
  font-size: 15.5px;
  line-height: 1.55;
}
.quick-answer code { white-space: normal; overflow-wrap: anywhere; }

/* App detail page "quick facts" block scaled down overall */
.app-head .quick-answer {
  font-size: 12px;
  line-height: 1.65;
  padding: 12px 15px;
}
@media (max-width: 720px) {
  .app-head .quick-answer {
    font-size: 12px;
    padding: 10px 12px;
  }
}

.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;
  font-weight: 600;
}
.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(210px, 38vw); }
}

@media (max-width: 720px) {
  .topbar-inner { gap: 10px; }
  .brand { font-size: 16px; }
  .brand-logo { height: 28px; }
  .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; }
/* Explicit grid areas: WordPress emits the comment textarea before the author /
   email / url fields, and auto-placement then pushes Name and Email one column to
   the right. Named areas pin every field to its slot regardless of DOM order. */
.comment-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    "notes notes notes"
    "author email url"
    "comment comment comment"
    "consent consent consent"
    "submit submit submit";
  gap: 10px;
  align-items: start;
}
.comment-form .comment-notes,
.comment-form .logged-in-as { grid-area: notes; }
.comment-form-author { grid-area: author; }
.comment-form-email { grid-area: email; }
.comment-form-url { grid-area: url; }
.comment-form-comment { grid-area: comment; }
.comment-form-cookies-consent { grid-area: consent; }
.comment-form .form-submit { grid-area: submit; }
.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; }
}

/* App body, featured image and media */
.app-cover {
  margin: 0 0 1.5rem;
}

.app-cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.app-content {
  margin: 0 0 1.5rem;
}

.app-media {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}
.app-media img,
.app-media video,
.app-media iframe {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.app-content-more {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--muted);
}
.app-content > :first-child {
  margin-top: 0;
}

.app-content img,
.app-content video {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.app-content figure {
  margin: 1.5rem 0;
}

.app-content figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.app-content iframe,
.app-content embed {
  max-width: 100%;
}

.app-content .wp-block-embed__wrapper {
  position: relative;
}

.app-content .wp-block-embed iframe {
  width: 100%;
}

.app-content .wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.app-content .wp-block-gallery figure {
  margin: 0;
}

.app-content .wp-block-audio audio {
  width: 100%;
}

.app-content .wp-block-image {
  margin: 1.5rem 0;
}

.app-content .page-links {
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* Homebrew install command right after step 2 */
.prose ol > li > .cmd {
  margin-top: 0.6rem;
}

/* homepage conclusion summary */
.hero-summary {
  max-width: 720px;
  margin: 8px auto 16px;
  color: #555;
  font-size: .95rem;
  line-height: 1.6;
}
.update-date {
  margin-top: 6px;
  font-size: 0.8125rem;
  color: #888;
}

/* card title reset (h3 keeps semantics without browser margins) */
.card h3.name { margin: 0; }

/* data source line on app pages */
.data-source {
  margin: 32px 0 8px;
  padding-top: 16px;
  border-top: 1px solid #e5e5e5;
  font-size: 0.75rem;
  line-height: 1.65;
  color: #666;
}
.data-source a { color: inherit; text-decoration: underline; }

/* app use case paragraph */
.app-use-case {
  margin: 10px 0 18px;
  color: #444;
  line-height: 1.75;
}

/* hero slideshow segmented progress bar */
.hero-progress {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.hero-progress-seg {
  width: 36px;
  height: 3px;
  background: rgba(255, 255, 255, .28);
  border-radius: 2px;
  overflow: hidden;
}
.hero-progress-seg i {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
  animation: heroSegProgress 21s linear infinite;
}
.hero-progress-seg:nth-child(1) i { animation-delay: 0s; }
.hero-progress-seg:nth-child(2) i { animation-delay: -14s; }
.hero-progress-seg:nth-child(3) i { animation-delay: -7s; }
@keyframes heroSegProgress {
  0%     { transform: scaleX(0); }
  33.3%  { transform: scaleX(1); }
  33.31% { transform: scaleX(0); }
  100%   { transform: scaleX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-progress-seg i { animation: none; transform: scaleX(0); }
  .hero-progress-seg:nth-child(1) i { transform: scaleX(1); }
}

/* ---------- download CTA (the headline promises a download, so the page must deliver one) ---------- */
.download-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}
.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--accent) 75%, transparent);
  transition: transform .15s ease, background .15s ease;
}
.btn-download:hover {
  text-decoration: none;
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--accent) 88%, #000);
}
.download-note { color: var(--muted); font-size: 13px; }
@media (prefers-color-scheme: dark) {
  .btn-download { color: #0e0e11; }
  .btn-download:hover { background: color-mix(in srgb, var(--accent) 85%, #fff); }
}

/* ---------- GitHub Releases ---------- */
.release-download {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.release-download .btn-download { height: 42px; }
.release-link { font-size: 14px; }
.release-meta,
.release-note { color: var(--muted); font-size: 13px; }
.release-list { margin-top: 12px; overflow-x: auto; }
.release-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.release-table th,
.release-table td {
  padding: 6px 6px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.release-table th {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}
.release-table tbody tr:last-child td { border-bottom: 0; }
.release-tag { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.release-empty { color: var(--muted); font-size: 14.5px; }
.release-source { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
@media (max-width: 720px) {
  .release-download {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .release-table th:nth-child(2),
  .release-table td:nth-child(2),
  .release-table th:nth-child(4),
  .release-table td:nth-child(4) { display: none; }
}

/* ---------- internal link blocks ---------- */
.cat-links { color: var(--muted); font-size: 14px; margin: 18px 0 0; }
.compare-links { margin: 12px 0 0; padding: 0; list-style: none; }
.compare-links li { margin-bottom: 6px; font-size: 14.5px; }
.compare-links li a::before { content: "⇄ "; color: var(--muted); }
.rank-neighbors {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}
.rank-neighbors a { max-width: 48%; }
.rank-neighbors a.next { margin-left: auto; text-align: right; }

/* Download entry inside the right "Overview" panel: stack vertically in narrow columns, full-width button */
.panel .download-cta {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.panel .btn-download {
  width: 100%;
  height: 34px;
  font-size: 13.5px;
}
.panel .download-note {
  text-align: center;
  font-size: 11.5px;
  line-height: 1.5;
}

/* Sidebar download block: full-width button, real URL wraps and supports one-click copy */
.panel .release-download {
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.panel .release-download .btn-download {
  width: 100%;
  height: auto;
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13.5px;
  line-height: 1.35;
  text-align: center;
}
.panel .release-link {
  text-align: center;
  font-size: 12px;
}
.panel .release-meta,
.panel .release-note {
  text-align: center;
  font-size: 11.5px;
  line-height: 1.5;
}
.release-url {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 2px;
}
.release-url code {
  width: 100%;
  padding: 5px 7px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--muted);
  font: 11px/1.45 ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
  word-break: break-all;
}
.release-copy {
  width: 100%;
  padding: 6px 9px;
  text-align: center;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  line-height: 1.45;
  cursor: pointer;
}
.release-copy:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.release-copy.copied {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 35%, var(--line));
}

/* Homebrew install command inside the overview panel */
.panel .panel-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -.01em;
  margin: 16px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.panel .panel-sub::before {
  content: "";
  flex: none;
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: var(--accent);
}
.panel .cmd {
  display: flex;
  width: 100%;
  font-size: 12.5px;
  padding: 10px 12px;
  background: var(--code-bg);
  color: var(--code-fg);
  border: 0;
}
.panel .cmd:hover {
  background: var(--code-bg);
}
.panel .cmd .dollar {
  color: #6f6f7a;
}
.panel .cmd .copy {
  color: #9a9aa6;
  font-size: 11.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.panel .cmd:hover .copy {
  color: #fff;
}
.panel .cmd.copied .copy {
  color: #4ec98b;
}

/* ---------- SEO / GEO content modules ---------- */
.section-note { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.core-features ul { margin: 0 0 0 18px; padding: 0; }
.core-features li { margin: 6px 0; }
.key-facts { margin: 24px 0; }
.key-facts dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 24px; margin: 0; }
.key-facts dl > div { padding: 8px 0; border-bottom: 1px solid var(--line); }
.key-facts dt { color: var(--muted); font-size: 12.5px; }
.key-facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.peer-compare { margin: 24px 0; }
.peer-compare table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13.5px;
}
.peer-compare th,
.peer-compare td {
  padding: 8px 8px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.peer-compare th { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.peer-compare th:nth-child(1),
.peer-compare td:nth-child(1) { width: 28%; }
.peer-compare th:nth-child(2),
.peer-compare td:nth-child(2) { width: 20%; }
.peer-compare th:nth-child(3),
.peer-compare td:nth-child(3) { width: 24%; }
.peer-compare th:nth-child(4),
.peer-compare td:nth-child(4) { width: 16%; }
.peer-compare th:nth-child(5),
.peer-compare td:nth-child(5) { width: 12%; }
@media (max-width: 720px) {
  .peer-compare table { font-size: 12.5px; }
  .peer-compare th,
  .peer-compare td { padding: 7px 6px; }
}
.related-links ul { margin: 0 0 16px 18px; padding: 0; }
.related-links li { margin: 5px 0; }
.related-links h3 { font-size: 15px; margin: 14px 0 6px; }
.faq-item { margin: 0 0 18px; }
.faq-item h3 { font-size: 16px; margin: 0 0 6px; }
.faq-item p { margin: 0; font-size: 14px; line-height: 1.7; }
.release-summary { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Download source and security notes ---------- */
.source-safety {
  margin: 24px 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--ok);
  border-radius: 0 10px 10px 0;
  background: transparent;
}
.source-safety h2 { margin-top: 0; }
.source-safety dl { margin: 12px 0 0; }
.source-safety dl > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.source-safety dt { color: var(--muted); font-size: 12.5px; }
.source-safety dd { margin: 0; font-size: 13.5px; overflow-wrap: anywhere; }
.source-safety-note { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }
@media (max-width: 720px) {
  .source-safety dl > div { grid-template-columns: 1fr; gap: 2px; }
}

/* Version history source note */
.release-source-note {
  color: var(--muted);
  font-size: 12.5px;
  margin: 0 0 12px;
}
.release-source-note span {
  color: var(--ok);
  font-weight: 700;
}

/* Comments join the left column so the right sticky can follow to the bottom of the page */
.app-main > .comments-wrap {
  max-width: none;
  margin-top: 30px;
  padding: 22px 0 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

/* Home page SEO / GEO content */
.home-intro p { max-width: 860px; }
.home-guide ul { margin: 0 0 12px 18px; padding: 0; }
.home-guide li { margin: 6px 0; }
.home-faq .faq-item { margin: 0 0 18px; }
.home-faq .faq-item h3 { font-size: 16px; margin: 0 0 6px; }
.home-faq .faq-item p { margin: 0; font-size: 14px; line-height: 1.7; }

/* Home page "How to choose a Mac app" card */
.home-guide-lede {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 14px;
  max-width: 760px;
}
.home-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}
.home-guide-card {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}
.home-guide-card strong {
  display: block;
  font-size: 13.5px;
  margin-bottom: 4px;
}
.home-guide-card span {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}
.home-guide-links {
  font-size: 12.5px;
  margin: 8px 0 0;
}
@media (max-width: 720px) {
  .home-guide-grid {
    grid-template-columns: 1fr;
  }
}

/* Home page GitHub stars card */
.star-card .star-badge {
  color: #b45309;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.star-card .version-badge {
  font-variant-numeric: tabular-nums;
  /* Long version strings (e.g. nightly-7d3f4c70fecd…) must not break the card; truncate with an ellipsis */
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Home page app card icon */
.card-head,
.star-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}
.card-icon,
.star-card-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg);
}
.card-head .name,
.star-card-head .name {
  margin: 0;
}
@media (max-width: 720px) {
  .card-icon,
  .star-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }
}

/* Allow long version numbers to wrap */
.app-layout aside .facts .fact-row-version th,
.app-layout aside .facts .fact-row-version td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.release-table td:first-child {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}
.release-table td:first-child .release-tag {
  white-space: nowrap;
}

/* ---------- Enriched data blocks (GitHub / dependencies / platforms / installs) ---------- */
.gh-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  margin: 16px 0 18px;
}
.gh-stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
}
.gh-stat strong {
  display: block;
  font-size: 20px;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.gh-stat span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.enrich-facts th { width: 120px; }
.rdeps { list-style: none; padding: 0; margin: 12px 0; }
.rdeps li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.rdeps li:last-child { border-bottom: 0; }
.rdeps .count {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.platforms {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.platforms li {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 13px;
}
.caveats {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--fg);
  background: transparent;
}
.callout.warn {
  border-left-color: var(--warn);
  background: color-mix(in srgb, var(--warn) 10%, transparent);
}
.note { color: var(--muted); font-size: 13px; margin-top: 10px; }

/* Sidebar GitHub overview (compact) */
.gh-stats-compact {
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 0 0 14px;
}
.gh-stats-compact .gh-stat { padding: 10px 8px; }
.gh-stats-compact .gh-stat strong { font-size: 16px; }
.gh-stats-compact .gh-stat span { font-size: 11px; }
.panel .gh-stats { margin-top: 0; }
.panel-note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

/* Overview table group headings (e.g. official Homebrew installs) */
.facts .facts-group th {
  padding: 14px 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .02em;
  border-top: 1px solid var(--line);
  background: transparent;
}

/* Data-driven lead-in for "How to choose vs. similar apps" */
.choose-context {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
  margin: 0 0 14px;
}
.choose-context strong { color: var(--fg); font-weight: 600; }

/* "Who it is for" use-case list */
.who-intro { margin: 0 0 10px; }
.who-list { padding-left: 20px; margin: 0 0 16px; }
.who-list li { margin-bottom: 8px; line-height: 1.7; }

/* "More from this developer" app list (with blurbs) */
.related-app-list { list-style: none; padding: 0; margin: 10px 0 0; }
.related-app-list li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.related-app-list li:last-child { border-bottom: 0; }
.related-app-list a { font-weight: 600; }
.related-desc {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

/* Home page "Popular apps at a glance" text-link cloud */
.quick-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.quick-links li { font-size: 14px; }
.quick-links a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted var(--line);
  padding-bottom: 1px;
}
.quick-links a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Home page "Latest software": fixed 4 per row on desktop ---------- */
.section-latest .grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 980px) {
  .section-latest .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .section-latest .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .section-latest .grid { grid-template-columns: 1fr; }
}

/* GitHub stars on regular cards (only in blocks that explicitly enable them, e.g. "Latest software") */
.card .star-badge {
  color: #b45309;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Version badge on regular cards (only in blocks that explicitly enable it, e.g. "Latest software") */
.card .version-badge {
  font-variant-numeric: tabular-nums;
  /* Long version strings (e.g. nightly-7d3f4c70fecd…) must not break the card; truncate with an ellipsis */
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- App detail page "Full description" block ---------- */
.app-detail {
  margin: 34px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
/* Unify all h2s in the detail page body: blue left bar + 20px */
.app-main h2 {
  position: relative;
  padding-left: 14px;
  margin: 1.8em 0 .8em;
  font-size: 20px;
  letter-spacing: -.01em;
  line-height: 1.4;
}
.app-main h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  bottom: .2em;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}
/* No extra top margin on the first heading in the content area */
.app-main .prose > h2:first-child {
  margin-top: .2em;
}
/* "Full description" heading sits tight against the divider */
.app-detail > h2 {
  margin-top: 0;
}
.app-detail .app-content {
  padding-left: 16px;
}
.app-detail .app-content p {
  margin: 0 0 1em;
  line-height: 1.8;
}
@media (max-width: 720px) {
  .app-detail .app-content {
    padding-left: 12px;
  }
}
/* An h1 inside the body must not outshine "Full description"; render it as an h2 */
.app-detail .app-content h1 {
  font-size: 24px;
  line-height: 1.35;
  letter-spacing: -.01em;
  margin: .2em 0 .6em;
}
.app-detail .app-content h2 {
  font-size: 19px;
  line-height: 1.4;
  margin: 1.5em 0 .6em;
}
.app-detail .app-content h3 {
  font-size: 16.5px;
  margin: 1.3em 0 .5em;
}

/* ---------- FAQ block (detail page + home page) ---------- */
.app-faq {
  margin: 30px 0 10px;
}
.app-faq > h2 {
  font-size: 20px;
  margin: 0 0 14px;
  letter-spacing: -.01em;
}
.home-faq {
  padding: 30px 0;
}
.home-faq > h2 {
  font-size: 21px;
  letter-spacing: -.02em;
  margin: 0 0 16px;
}
.app-faq .faq-list,
.home-faq .faq-list {
  margin: 0;
  border-top: 1px solid var(--line);
}
.app-faq .faq-list dt,
.home-faq .faq-list dt {
  font-weight: 600;
  font-size: 15.5px;
  margin: 16px 0 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.app-faq .faq-list dt:first-of-type,
.home-faq .faq-list dt:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.app-faq .faq-list dd,
.home-faq .faq-list dd {
  margin: 0 0 8px;
  color: #444;
  line-height: 1.75;
  font-size: 14.5px;
}

/* When an image is the whole heading (WordPress content occasionally has <h2><img></h2>),
   drop the blue left bar so it does not look like a blue line beside the image */
.app-main h2:has(> img:only-child)::before,
.app-main h2.h2-image-only::before {
  display: none;
}
.app-main h2:has(> img:only-child),
.app-main h2.h2-image-only {
  padding-left: 0;
  margin: 1.2em 0;
}
.app-main h2 > img:only-child {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Home page: FAQ merged into "How to choose a Mac app", shown with the same card style */
.home-faq-subtitle {
  font-size: 15px;
  margin: 14px 0 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  letter-spacing: -.01em;
}
.faq-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 8px;
  margin: 0 0 8px;
}
.faq-card {
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}
.faq-card strong {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 3px;
}
.faq-card .faq-answer {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
  /* Long commands / URLs must be able to wrap, otherwise they break the card */
  overflow-wrap: anywhere;
  word-break: break-word;
}
.faq-card .faq-answer p {
  margin: 0 0 6px;
}
.faq-card .faq-answer p:last-child {
  margin-bottom: 0;
}
.faq-card .faq-answer code {
  font-size: 11.5px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .05);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.faq-card .faq-answer a {
  color: var(--accent);
}
@media (max-width: 720px) {
  .faq-card-grid {
    grid-template-columns: 1fr;
  }
}

/* Home page: one-sentence definition an AI can quote directly */
.hero-definition {
  max-width: 820px;
  margin: 14px 0 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.65;
  color: var(--ink);
}
@media (max-width: 720px) {
  .hero-definition { font-size: 15.5px; }
}
/* Detail page: structured facts card */
.quick-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px 18px;
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}
.quick-facts > div {
  min-width: 0;
}
.quick-facts dt {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 2px;
}
.quick-facts dd {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.quick-facts code {
  font-size: 12px;
  overflow-wrap: anywhere;
}

/* Detail page: author and data-source credit (E-E-A-T) */
.article-byline {
  margin: 28px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}
.article-byline a {
  color: var(--accent);
}

/* Detail page: structured filler when content is short (render layer, never written to the DB) */
.detail-extra {
  margin: 20px 0 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}
.detail-extra h3 {
  font-size: 15px;
  margin: 0 0 8px;
}
.detail-extra p {
  margin: 0 0 8px;
  line-height: 1.75;
  font-size: 14px;
}
.detail-extra ul {
  margin: 0 0 0 18px;
  padding: 0;
  font-size: 13.5px;
  line-height: 1.7;
}
.detail-extra code {
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

/* Detail page: helpful / not helpful votes */
.app-vote {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  font-size: 13px;
}
.app-vote .vote-label {
  color: var(--muted);
}
.app-vote .vote-btn {
  border: 1px solid var(--line);
  background: var(--bg, #fff);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 13px;
  cursor: pointer;
  line-height: 1.4;
}
.app-vote .vote-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.app-vote .vote-btn em {
  font-style: normal;
  color: var(--muted);
  margin-left: 2px;
}
.app-vote.is-voted .vote-btn {
  opacity: .55;
  cursor: default;
}

/* Sidebar vote card */
.app-vote-panel {
  padding: 14px 16px;
}
.app-vote-panel > h2 {
  font-size: 15px;
  margin: 0 0 10px;
}
.app-vote-panel .app-vote {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  flex-wrap: wrap;
}
.app-vote-panel .vote-btn {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
}

/* ---------- Home redesign: search box / category tags / tabs / trust section ---------- */
.hero-search{display:flex;gap:8px;max-width:560px;margin:20px auto 16px}
.hero-search input[type=search]{flex:1;min-width:0;padding:12px 16px;border:1px solid var(--line);border-radius:10px;background:var(--card);font-size:15px;color:inherit}
.hero-search input[type=search]:focus{outline:2px solid var(--accent);outline-offset:1px}
.hero-search button{padding:12px 22px;border:0;border-radius:10px;background:var(--accent);color:#fff;font-size:15px;cursor:pointer;white-space:nowrap}
.hero-search button:hover{filter:brightness(1.05)}

.hero-cats{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px;padding:0}
.hero-cat{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border:1px solid var(--line);border-radius:999px;background:var(--card);font-size:13px;text-decoration:none;white-space:nowrap}
/* a:hover is more specific than .hero-cat, so the underline has to be turned off here too. */
.hero-cat:hover{border-color:var(--accent);text-decoration:none}
.hero-cat span{color:var(--muted);font-size:11.5px}

.home-tabs .tab-nav{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}
.home-tabs .tab-btn{padding:8px 16px;border:1px solid var(--line);border-radius:999px;background:var(--card);font-size:14px;color:inherit;cursor:pointer;transition:background .15s,border-color .15s}
.home-tabs .tab-btn:hover{border-color:var(--accent)}
.home-tabs .tab-btn.is-active{background:var(--accent);border-color:var(--accent);color:#fff}
.home-tabs .tab-panel[hidden]{display:none}

.home-guide{padding-bottom:10px}

@media (max-width:600px){
  .hero-search{flex-direction:column}
  .hero-search button{width:100%}
  .hero-cats{flex-wrap:nowrap;overflow-x:auto;padding-bottom:6px;-webkit-overflow-scrolling:touch}
  .home-tabs .tab-nav{flex-wrap:nowrap;overflow-x:auto;padding-bottom:6px;-webkit-overflow-scrolling:touch}
}

/* DEMO: README block */
.app-readme{margin:22px 0;padding:0;background:none}
/* Match other h2s on the page: inherit .app-main h2 font size and left bar */
.app-readme h2:first-child{margin-top:.2em}
.readme-note{color:var(--muted);font-size:12.5px;margin:0 0 10px}
.readme-body{
  font-size:15.5px;
  line-height:1.9;
  color:var(--text);
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  letter-spacing:.01em;
  max-width:70ch;
}
@media (max-width:600px){
  .readme-body{font-size:15px;line-height:1.85;}
}
.readme-source{margin:12px 0 0;font-size:12px;color:var(--muted)}

/* Install steps block: slightly smaller type overall for a tighter read */
.prose ol { font-size: 14.5px; line-height: 1.6; }
.prose ol > li { margin-bottom: 9px; }
.prose ol li code { font-size: 12.5px; }
.prose ol .cmd { font-size: 12.5px; padding: 9px 12px; }
.prose ol .cmd .copy { font-size: 10.5px; }

/* Platform download buttons: same size as the primary download button, coloured per platform */
.release-platform-link.btn-download {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  height: 44px;
  margin: 8px 0 2px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: none;
  text-decoration: none;
}
.release-platform-link.btn-download.platform-mac {
  background: #2563eb;
  color: #fff;
}
.release-platform-link.btn-download.platform-win {
  background: #16a34a;
  color: #fff;
}
.release-platform-link.btn-download.platform-linux {
  background: #eab308;
  color: #1a1a1a;
}
.release-platform-link.btn-download.platform-mac:hover { background: #1d4ed8; }
.release-platform-link.btn-download.platform-win:hover { background: #15803d; }
.release-platform-link.btn-download.platform-linux:hover { background: #ca8a04; }
.release-platform-row .release-url code {
  display: block;
  font-size: 11px;
  word-break: break-all;
  color: #667;
  margin-bottom: 6px;
}

/* ---------- Cross-platform hub pages / platform badges ---------- */
.pbadge{display:inline-block;font-size:11px;padding:1px 8px;border-radius:999px;font-weight:600;line-height:1.7}
.pbadge-mac{background:#dbeafe;color:#1d4ed8}
.pbadge-win{background:#dcfce7;color:#15803d}
.pbadge-linux{background:#fef9c3;color:#a16207}
.page-head{margin:28px 0 18px}
.page-head h1{margin:0 0 10px;font-size:26px}
.page-lead{margin:0;color:#555;font-size:14.5px;line-height:1.7;max-width:820px}
.pagination{display:flex;gap:14px;align-items:center;justify-content:center;margin:34px 0 10px;font-size:14px}
.page-link{padding:7px 14px;border:1px solid #e5e7eb;border-radius:8px;text-decoration:none;color:#2563eb;background:#fff}
.page-link:hover{background:#eff6ff}
.page-info{color:#666}

/* Home page "Cross-platform apps" block */
.section-cross-platform { margin: 0 0 32px; }
.section-cross-platform .section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

/* Home page "Latest articles": 4 per row */
.home-posts .post-list{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:1000px){.home-posts .post-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:600px){.home-posts .post-list{grid-template-columns:1fr}}

/* Narrow screens (861-980): compact the search box text so the placeholder is not clipped */
@media (min-width: 861px) and (max-width: 980px) {
  .topbar .searchbox { width: 200px; }
  .topbar .searchbox input { font-size: 12px; padding-left: 27px; padding-right: 8px; }
}
