/* =========================================================
   AI Vault List — design system
   ========================================================= */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f6fb;
  --bg-tint: #f0edff;
  --surface: #ffffff;
  --surface-2: #fafaff;
  --text: #0d0e1a;
  --text-2: #4b4f66;
  --text-3: #767b94;
  --border: #e7e7f2;
  --border-strong: #d5d5e6;
  --brand: #5c3bff;
  --brand-2: #8b5cf6;
  --brand-soft: #efeaff;
  --brand-ink: #ffffff;
  --good: #0f9c7b;
  --warn: #b45309;
  --shadow-sm: 0 1px 2px rgba(16, 16, 40, .05);
  --shadow-md: 0 8px 24px -12px rgba(16, 16, 40, .18);
  --shadow-lg: 0 24px 60px -32px rgba(16, 16, 40, .35);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --max: 1440px;
  --header-h: 68px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #0a0a12;
  --bg-soft: #10101b;
  --bg-tint: #171331;
  --surface: #11111d;
  --surface-2: #151522;
  --text: #f2f2f8;
  --text-2: #a8abc2;
  --text-3: #7f849c;
  --border: #22222f;
  --border-strong: #2e2e40;
  --brand: #8b78ff;
  --brand-2: #a78bfa;
  --brand-soft: #1b1636;
  --brand-ink: #0b0b14;
  --good: #34d399;
  --warn: #fbbf24;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 8px 24px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 24px 60px -30px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.4vw, 3.15rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.95rem); letter-spacing: -.028em; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1.05em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin-bottom: .4em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.4rem 0; }
code { font-family: var(--mono); font-size: .88em; background: var(--bg-soft); padding: .12em .38em; border-radius: 5px; border: 1px solid var(--border); }
::selection { background: var(--brand); color: #fff; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 780px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 14px;
  max-width: var(--max); margin: 0 auto; padding: 0 24px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 750; font-size: 1.04rem; letter-spacing: -.03em; color: var(--text); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; display: block; flex-shrink: 0; }
.brand-text small { display: block; font-size: .64rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); margin-top: -3px; }

.nav { display: flex; align-items: center; gap: 2px; margin-left: 10px; }
.nav a {
  color: var(--text-2); font-size: .9rem; font-weight: 550;
  padding: 7px 11px; border-radius: 9px; white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }

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

.search-box { position: relative; width: 230px; }
.search-box input {
  width: 100%; height: 36px; padding: 0 12px 0 33px;
  border: 1px solid var(--border); background: var(--bg-soft);
  border-radius: var(--radius-pill); font-size: .87rem; font-family: inherit;
  color: var(--text); transition: .16s;
}
.search-box input::placeholder { color: var(--text-3); }
.search-box input:focus {
  outline: none; border-color: var(--brand);
  background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent);
}
.search-box .search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; display: flex; }

.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 6px; max-height: 400px; overflow-y: auto; display: none; z-index: 80;
  min-width: 320px;
}
.search-results.open { display: block; }
.search-results a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 9px; color: var(--text); }
.search-results a:hover, .search-results a.active { background: var(--bg-soft); text-decoration: none; }
.sr-logo { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; display: grid; place-items: center; color: #fff; font-size: .66rem; font-weight: 700; letter-spacing: -.02em; }
.sr-meta { min-width: 0; }
.sr-name { font-size: .87rem; font-weight: 600; line-height: 1.3; }
.sr-cat { font-size: .74rem; color: var(--text-3); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-empty { padding: 14px 12px; font-size: .84rem; color: var(--text-3); }
.sr-all { border-top: 1px solid var(--border); margin-top: 4px; }
.sr-all a { color: var(--brand); font-size: .82rem; font-weight: 600; }

.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  border-radius: 10px; cursor: pointer; transition: .15s; flex-shrink: 0; padding: 0;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-soft); }

.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-pill); overflow: hidden; background: var(--surface); }
.lang-switch a, .lang-switch span {
  padding: 5px 9px; font-size: .76rem; font-weight: 650; color: var(--text-3); line-height: 1.5;
}
.lang-switch a:hover { background: var(--bg-soft); text-decoration: none; color: var(--text); }
.lang-switch .on { background: var(--brand); color: #fff; }
[data-theme="dark"] .lang-switch .on { color: var(--brand-ink); }
.lang-switch a + a, .lang-switch span + a, .lang-switch a + span { border-left: 1px solid var(--border); }

.mobile-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 17px; border-radius: 10px; border: 1px solid transparent;
  font-family: inherit; font-size: .88rem; font-weight: 620; cursor: pointer;
  transition: .16s; text-decoration: none !important; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--brand) 80%, transparent); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--border-strong); background: var(--bg-soft); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-soft:hover { background: color-mix(in srgb, var(--brand) 16%, transparent); }
.btn-sm { height: 33px; padding: 0 12px; font-size: .8rem; border-radius: 8px; }
.btn-lg { height: 47px; padding: 0 24px; font-size: .95rem; border-radius: 12px; }
.btn-block { width: 100%; }

/* ---------- Chips / pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .72rem; font-weight: 620; letter-spacing: .01em;
  padding: 3px 9px; border-radius: var(--radius-pill);
  background: var(--bg-soft); color: var(--text-2); border: 1px solid var(--border);
  white-space: nowrap; line-height: 1.6;
}
.pill-free { background: #e8f8f2; color: #0b6b55; border-color: #c6ece0; }
.pill-freemium { background: #eef2ff; color: #3b45a8; border-color: #d8dfff; }
.pill-paid { background: #fff4e8; color: #94470f; border-color: #ffe0c2; }
.pill-trial { background: #f4efff; color: #5b2ba8; border-color: #e4d9ff; }
[data-theme="dark"] .pill-free { background: #06342a; color: #6ee7c3; border-color: #0d5142; }
[data-theme="dark"] .pill-freemium { background: #141a3a; color: #a9b4ff; border-color: #232c5e; }
[data-theme="dark"] .pill-paid { background: #331d0b; color: #fbbf7a; border-color: #4d2c12; }
[data-theme="dark"] .pill-trial { background: #241436; color: #cbaaff; border-color: #372052; }

.badge-editors { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border: 0; }
.badge-trending { background: #fff1f2; color: #b91c45; border-color: #ffdbe2; }
.badge-new { background: #ecfeff; color: #0e7490; border-color: #c8f3fa; }
[data-theme="dark"] .badge-trending { background: #36101c; color: #fda4b4; border-color: #4d1626; }
[data-theme="dark"] .badge-new { background: #06262e; color: #67e8f9; border-color: #0a3a46; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 74px 0 56px; border-bottom: 1px solid var(--border); }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto -10%; height: 640px;
  background:
    radial-gradient(46% 52% at 18% 12%, color-mix(in srgb, var(--brand) 17%, transparent), transparent 70%),
    radial-gradient(40% 46% at 82% 4%, color-mix(in srgb, #22d3ee 15%, transparent), transparent 70%),
    radial-gradient(36% 40% at 55% 40%, color-mix(in srgb, #f472b6 10%, transparent), transparent 72%);
  filter: blur(6px); pointer-events: none;
}
.hero-inner { position: relative; text-align: center; max-width: 860px; margin: 0 auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .76rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand); background: var(--surface); border: 1px solid var(--border);
  padding: 5px 12px; border-radius: var(--radius-pill); margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.hero h1 { margin-bottom: 18px; }
.hero-sub { font-size: clamp(1rem, 1.4vw, 1.13rem); color: var(--text-2); max-width: 700px; margin: 0 auto 30px; }
.hero-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  max-width: 760px; margin: 0 auto; padding-top: 6px;
}
.hero-stat { text-align: center; }
.hero-stat b { display: block; font-size: 1.42rem; font-weight: 750; letter-spacing: -.03em; }
.hero-stat span { font-size: .76rem; color: var(--text-3); letter-spacing: .01em; }

/* ---------- Sections ---------- */
.section { padding: 62px 0; }
.section-tight { padding: 40px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-head p { color: var(--text-2); margin: 0; max-width: 620px; font-size: .95rem; }
.section-head h2 { margin-bottom: 6px; }
.section-link { font-size: .86rem; font-weight: 620; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.bg-soft { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Tool cards ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tool-card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; transition: .18s ease; height: 100%;
}
.tool-card:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tool-card-top { display: flex; align-items: flex-start; gap: 11px; }
.tool-logo {
  width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font-weight: 750; font-size: .82rem;
  letter-spacing: -.02em; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .12);
}
.tool-logo.lg { width: 60px; height: 60px; border-radius: 16px; font-size: 1.05rem; }
.tool-title { min-width: 0; flex: 1; }
.tool-title h3 { font-size: 1rem; margin: 0 0 2px; letter-spacing: -.02em; }
.tool-title h3 a { color: var(--text); }
.tool-title h3 a::after { content: ""; position: absolute; inset: 0; }
.tool-title .cat { font-size: .74rem; color: var(--text-3); }
.save-btn {
  position: relative; z-index: 2; width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-3); cursor: pointer; flex-shrink: 0; padding: 0;
  transition: .14s;
}
.save-btn:hover { color: var(--brand); border-color: var(--brand); }
.save-btn[aria-pressed="true"] { color: var(--brand); background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.tool-tagline { font-size: .855rem; color: var(--text-2); line-height: 1.55; margin: 0; flex: 1; }
.tool-card-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--border); }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 650; color: var(--text); }
.rating svg { color: #f5a524; }
.tool-card-foot .spacer { margin-left: auto; }
.tool-card .badge-editors { position: absolute; top: -8px; right: 14px; font-size: .66rem; padding: 2px 8px; }

.tool-list-row { display: flex; gap: 14px; align-items: center; padding: 13px; }

/* ---------- Category cards ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.cat-card {
  display: flex; gap: 13px; align-items: flex-start; padding: 17px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: .17s; color: var(--text);
}
.cat-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); text-decoration: none; transform: translateY(-2px); }
.cat-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; color: #fff; }
.cat-card h3 { font-size: .94rem; margin: 0 0 3px; }
.cat-card p { font-size: .78rem; color: var(--text-3); margin: 0; line-height: 1.5; }
.cat-card .count { font-size: .72rem; color: var(--brand); font-weight: 650; margin-top: 6px; display: block; }

/* ---------- Article cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.post-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: .18s; display: flex; flex-direction: column;
}
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-strong); }
.post-thumb { height: 6px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
.post-body { padding: 20px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.post-body .meta { font-size: .73rem; color: var(--text-3); display: flex; gap: 8px; align-items: center; }
.post-body h3 { font-size: 1.05rem; margin: 0; letter-spacing: -.02em; }
.post-body h3 a { color: var(--text); }
.post-body p { font-size: .86rem; color: var(--text-2); margin: 0; flex: 1; }
.read-more { font-size: .8rem; font-weight: 650; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Value props ---------- */
.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.value-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.value-card .num { font-size: .72rem; font-weight: 750; color: var(--brand); letter-spacing: .06em; }
.value-card h3 { font-size: .98rem; margin: 8px 0 6px; }
.value-card p { font-size: .84rem; color: var(--text-2); margin: 0; }

/* ---------- Newsletter ---------- */
.newsletter {
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 10%, var(--surface)), var(--surface) 60%);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 34px;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 30px; align-items: center;
}
.newsletter h2 { font-size: 1.42rem; margin-bottom: 8px; }
.newsletter p { color: var(--text-2); font-size: .9rem; margin: 0; }
.nl-form { display: flex; gap: 8px; flex-wrap: wrap; }
.nl-form input {
  flex: 1; min-width: 180px; height: 44px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-family: inherit; font-size: .88rem;
}
.nl-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.nl-note { font-size: .74rem; color: var(--text-3); margin-top: 9px; }
.nl-done { font-size: .88rem; color: var(--good); font-weight: 600; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .78rem; color: var(--text-3); padding: 18px 0 0; }
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span.sep { opacity: .5; }

/* ---------- Tool detail ---------- */
.tool-hero { padding: 22px 0 30px; border-bottom: 1px solid var(--border); }
.tool-hero-top { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.tool-hero-info { flex: 1; min-width: 240px; }
.tool-hero-info .kicker { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.tool-hero-info h1 { font-size: clamp(1.7rem, 3vw, 2.35rem); margin-bottom: 8px; }
.tool-hero-info .tagline { color: var(--text-2); font-size: 1rem; max-width: 620px; margin: 0; }
.tool-hero-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-top: 16px; }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 40px; align-items: start; padding: 34px 0 64px; }
.detail-main { min-width: 0; }
.detail-aside { position: sticky; top: calc(var(--header-h) + 18px); display: flex; flex-direction: column; gap: 14px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card h3 { font-size: .86rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); font-weight: 650; margin: 0 0 14px; }
.fact-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: .84rem; border-bottom: 1px dashed var(--border); }
.fact-row:last-child { border-bottom: 0; }
.fact-row dt { color: var(--text-3); margin: 0; }
.fact-row dd { margin: 0; font-weight: 600; text-align: right; }

.score-big { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.score-big b { font-size: 2.3rem; letter-spacing: -.04em; line-height: 1; }
.score-big span { font-size: .78rem; color: var(--text-3); }
.score-bar { height: 6px; border-radius: 3px; background: var(--bg-soft); overflow: hidden; margin: 7px 0 12px; }
.score-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.score-row { font-size: .8rem; display: flex; justify-content: space-between; color: var(--text-2); }

.feature-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0 0 6px; }
.feature-list li { display: flex; gap: 9px; font-size: .87rem; color: var(--text-2); margin: 0; padding: 11px 13px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; line-height: 1.5; }
.feature-list svg { flex-shrink: 0; color: var(--brand); margin-top: 2px; }

.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 6px 0 8px; }
.pc-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; background: var(--surface-2); }
.pc-box h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 10px; }
.pc-box.good h4 { color: var(--good); }
.pc-box.bad h4 { color: var(--warn); }
.pc-box ul { list-style: none; padding: 0; margin: 0; }
.pc-box li { font-size: .85rem; color: var(--text-2); padding-left: 18px; position: relative; margin-bottom: 7px; }
.pc-box.good li::before { content: "+"; position: absolute; left: 2px; color: var(--good); font-weight: 700; }
.pc-box.bad li::before { content: "−"; position: absolute; left: 2px; color: var(--warn); font-weight: 700; }

.prose { font-size: .96rem; color: var(--text-2); }
.prose h2 { font-size: 1.32rem; color: var(--text); margin: 2rem 0 .7rem; letter-spacing: -.025em; }
.prose h3 { font-size: 1.05rem; color: var(--text); margin: 1.6rem 0 .5rem; }
.prose p { margin-bottom: 1.05em; }
.prose .lead { font-size: 1.08rem; color: var(--text-2); line-height: 1.7; }
.prose ul li, .prose ol li { margin-bottom: .5em; }
.prose strong { color: var(--text); font-weight: 650; }
.prose .last-updated { font-size: .78rem; color: var(--text-3); margin-bottom: 1.4rem; }
.prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }

.alt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.alt-card { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 11px; color: var(--text); background: var(--surface); }
.alt-card:hover { border-color: var(--border-strong); text-decoration: none; background: var(--bg-soft); }
.alt-card .n { font-size: .86rem; font-weight: 650; line-height: 1.25; }
.alt-card .c { font-size: .72rem; color: var(--text-3); }

/* ---------- Filter bar ---------- */
.filter-bar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 14px 0; border-bottom: 1px solid var(--border); margin-bottom: 24px;
  position: sticky; top: var(--header-h); background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(10px); z-index: 40;
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 31px; padding: 0 12px;
  border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font-size: .8rem; font-weight: 550; cursor: pointer; font-family: inherit;
  transition: .14s; white-space: nowrap;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .n { font-size: .72rem; opacity: .6; }
.select {
  height: 33px; padding: 0 30px 0 11px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23767b94' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--text); font-size: .82rem; font-family: inherit; appearance: none; cursor: pointer;
}
.select:focus { outline: none; border-color: var(--brand); }
.result-count { font-size: .8rem; color: var(--text-3); margin-left: auto; }

/* ---------- Page head ---------- */
.page-head { padding: 40px 0 30px; border-bottom: 1px solid var(--border); }
.page-head h1 { margin-bottom: 10px; }
.page-head p { color: var(--text-2); max-width: 680px; margin: 0; font-size: 1rem; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--border); padding: 15px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: .95rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-3); font-weight: 400; font-size: 1.15rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--text-2); font-size: .9rem; margin: 10px 0 0; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg-soft); font-weight: 650; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
tr:last-child td { border-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 52px 0 26px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 34px; }
.footer-brand p { font-size: .83rem; color: var(--text-3); margin: 12px 0 0; max-width: 280px; line-height: 1.6; }
.footer-col h4 { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin: 0 0 12px; font-weight: 650; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: .84rem; color: var(--text-2); }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); font-size: .78rem; color: var(--text-3); }
.footer-bottom p { margin: 0; }
.affiliate-note { font-size: .74rem; color: var(--text-3); margin-top: 10px; }

/* ---------- Misc ---------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-3); font-size: .92rem; }
.empty-state svg { margin-bottom: 14px; opacity: .4; }
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px);
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: var(--radius-pill);
  font-size: .84rem; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0;
  transition: .22s; pointer-events: none; z-index: 200;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.reveal { opacity: 0; }
.no-js-fallback { padding: 20px; border: 1px dashed var(--border); border-radius: 10px; color: var(--text-3); font-size: .88rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .detail-layout { grid-template-columns: 1fr; gap: 28px; }
  .detail-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; row-gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .search-box { width: 180px; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .mobile-toggle { display: inline-grid; }
  .site-header.nav-open .nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; left: 12px; right: 12px; top: calc(var(--header-h) - 4px);
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 8px; box-shadow: var(--shadow-lg); margin: 0;
  }
  .site-header { position: sticky; }
  .header-inner { position: relative; }
  .search-box { display: none; }
  .hero { padding: 48px 0 40px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .newsletter { grid-template-columns: 1fr; gap: 20px; padding: 26px; }
  .newsletter p { margin-bottom: 0; }
  .pros-cons { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 46px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .header-inner { padding: 0 18px; }
  body { font-size: 15.5px; }
  .tool-grid, .post-grid, .cat-grid { grid-template-columns: 1fr; }
  .detail-aside { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .result-count { display: none; }
  .tool-hero-actions .btn-primary { flex: 1; }
  .newsletter { padding: 22px; }
  .filter-bar { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

@media print {
  .site-header, .site-footer, .newsletter, .filter-bar, .tool-hero-actions { display: none; }
  body { color: #000; }
}

/* ---------- Ad slots ---------- */
.ad-slot {
  display: block;
  margin: 22px 0;
  text-align: center;
  overflow: hidden;
}
.ad-slot-label {
  display: block;
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 7px;
  opacity: .8;
}
.ad-slot-body { display: block; min-height: 92px; }
.ad-slot--sidebar { margin: 0; }
.ad-slot--sidebar .ad-slot-body { min-height: 250px; }
.ad-slot--inline { margin: 30px 0; }
.ad-slot--inline .ad-slot-body { min-height: 110px; }

.ad-slot.is-live .ad-slot-body { min-height: 0; }
.ad-slot.is-demo .ad-slot-body {
  display: grid;
  place-items: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(45deg, transparent 0 9px,
      color-mix(in srgb, var(--brand) 5%, transparent) 9px 18px);
  color: var(--text-3);
  font-size: .76rem;
  font-weight: 550;
  letter-spacing: .02em;
  padding: 14px;
}
.ad-slot.is-live ins { width: 100%; }
