/* AI Creator Hub — Global Design System */
/* =========================================================
   Design tokens
   ========================================================= */
:root {
  --navy: #0a0e27;
  --navy-2: #141a3f;
  --purple: #7c3aed;
  --purple-2: #a855f7;
  --purple-3: #c084fc;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e6e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-glass: rgba(255, 255, 255, 0.65);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.10), 0 8px 24px rgba(124, 58, 237, 0.08);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --grad: linear-gradient(135deg, #7c3aed 0%, #4f46e5 50%, #3b82f6 100%);
  --grad-soft: linear-gradient(135deg, rgba(124,58,237,0.10), rgba(59,130,246,0.10));
  --maxw: 1200px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Section spacing */
.section { padding: 88px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head .eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
  background: var(--grad-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.section-head h2 { font-size: clamp(28px, 4vw, 42px); margin: 0 0 16px; letter-spacing: -0.02em; }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }

/* =========================================================
   Navbar
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.brand .logo {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--grad);
  display: grid; place-items: center;
  color: #fff; font-weight: 800;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.35);
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { font-size: 15px; font-weight: 500; color: var(--ink); opacity: 0.8; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; color: var(--purple); }
.nav-cta { display: flex; gap: 12px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 15px; padding: 11px 20px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 24px rgba(124, 58, 237, 0.30); }
.btn-primary:hover { box-shadow: 0 14px 32px rgba(124, 58, 237, 0.40); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--purple); color: var(--purple); }
.btn-lg { padding: 14px 26px; font-size: 16px; }

.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: .2s; }

@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .menu-toggle { display: block; }
  .nav-open .nav-links {
    display: flex; flex-direction: column;
    position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; padding: 20px 24px; gap: 16px;
    border-bottom: 1px solid var(--line);
  }
  .nav-open .nav-cta { display: flex; margin-left: 0; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 100px;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(124, 58, 237, 0.18), transparent 60%),
    radial-gradient(900px 500px at 0% 10%, rgba(59, 130, 246, 0.15), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
#hf-bg-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; text-align: center; max-width: 880px; margin: 0 auto; }
.hero .pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-glass);
  border: 1px solid rgba(124, 58, 237, 0.2);
  color: var(--purple);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  backdrop-filter: blur(8px);
  margin-bottom: 24px;
}
.hero .pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--purple); box-shadow: 0 0 0 4px rgba(124,58,237,0.2); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.6;transform:scale(.85)} }
.hero h1 {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 22px;
  font-weight: 800;
}
.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p { font-size: 19px; color: var(--muted); margin: 0 auto 36px; max-width: 640px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 48px; justify-content: center; margin-top: 64px; flex-wrap: wrap; }
.hero-stats .stat .n { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.hero-stats .stat .n.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-stats .stat .l { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* =========================================================
   Cards (glass)
   ========================================================= */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  position: relative;
  background: var(--bg-glass);
  border: 1px solid rgba(230, 232, 240, 0.7);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(124,58,237,0.35); }
.card .icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center;
  font-size: 26px;
  background: var(--grad-soft);
  color: var(--purple);
  margin-bottom: 18px;
}
.card h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .more { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-weight: 600; font-size: 14px; color: var(--purple); }
.card .more svg { width: 16px; height: 16px; }

/* Resource cards (blog style) */
.res-card { padding: 0; overflow: hidden; }
.res-card .thumb {
  height: 180px;
  background: linear-gradient(135deg, #c084fc, #3b82f6);
  position: relative;
}
.res-card .thumb.alt1 { background: linear-gradient(135deg, #a855f7, #06b6d4); }
.res-card .thumb.alt2 { background: linear-gradient(135deg, #6366f1, #ec4899); }
.res-card .thumb.alt3 { background: linear-gradient(135deg, #3b82f6, #14b8a6); }
.res-card .thumb.alt4 { background: linear-gradient(135deg, #f472b6, #8b5cf6); }
.res-card .body { padding: 22px 24px 26px; }
.res-card .tag { font-size: 12px; font-weight: 600; color: var(--purple); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.res-card h3 { font-size: 18px; margin: 0 0 8px; line-height: 1.35; }
.res-card p { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.res-card .meta { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }

/* =========================================================
   AI Pro section
   ========================================================= */
.pro {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #0a0e27 0%, #141a3f 55%, #1e1b4b 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 64px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.pro::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 90% 10%, rgba(168, 85, 247, 0.35), transparent 60%),
    radial-gradient(500px 260px at 0% 100%, rgba(59, 130, 246, 0.30), transparent 60%);
  pointer-events: none;
}
.pro > * { position: relative; z-index: 1; }
.pro h2 { font-size: clamp(28px, 3.2vw, 38px); margin: 0 0 14px; letter-spacing: -0.02em; }
.pro p { color: rgba(255,255,255,0.72); font-size: 17px; margin: 0 0 28px; }
.pro ul { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 14px; }
.pro ul li { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,0.88); font-size: 16px; }
.pro ul li .check { width: 24px; height: 24px; border-radius: 50%; background: rgba(124,58,237,0.25); display: grid; place-items: center; color: var(--purple-3); flex: 0 0 24px; }
.pro-price { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius); padding: 32px; backdrop-filter: blur(8px); }
.pro-price .plan { color: var(--purple-3); font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.pro-price .amt { font-size: 48px; font-weight: 800; letter-spacing: -0.03em; margin: 8px 0 4px; }
.pro-price .amt small { font-size: 17px; font-weight: 500; color: rgba(255,255,255,0.6); }
.pro-price .desc { color: rgba(255,255,255,0.65); font-size: 14px; margin: 0 0 24px; }
.pro-price .btn { width: 100%; }
.pro-price .cta-note { text-align: center; font-size: 12px; color: rgba(255,255,255,0.5); margin: 12px 0 0; }
@media (max-width: 900px) { .pro { grid-template-columns: 1fr; padding: 40px 28px; } }

/* =========================================================
   Newsletter
   ========================================================= */
.news {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
}
.news h3 { font-size: 28px; margin: 0 0 10px; letter-spacing: -0.02em; }
.news p { color: var(--muted); margin: 0 auto 28px; max-width: 520px; }
.news form { display: flex; gap: 12px; max-width: 480px; margin: 0 auto; flex-wrap: wrap; }
.news input[type="email"] {
  flex: 1; min-width: 220px;
  padding: 14px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  font-size: 15px; color: var(--ink); outline: none;
  transition: border-color .2s;
}
.news input[type="email"]:focus { border-color: var(--purple); }
.news .small { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* =========================================================
   Footer
   ========================================================= */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 72px 0 32px;
}
.footer .f-top { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 40px; }
.footer .brand { color: #fff; margin-bottom: 16px; }
.footer .f-about { font-size: 14px; max-width: 280px; }
.footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 18px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer ul a { font-size: 14px; color: rgba(255,255,255,0.65); transition: color .2s; }
.footer ul a:hover { color: var(--purple-3); }
.footer .f-bottom {
  margin-top: 56px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-size: 13px; color: rgba(255,255,255,0.5);
}
.footer .social { display: flex; gap: 14px; }
.footer .social a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.06); display: grid; place-items: center; }
.footer .social a:hover { background: rgba(124,58,237,0.3); color: #fff; }
@media (max-width: 900px) { .footer .f-top { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .footer .f-top { grid-template-columns: 1fr; } }

/* =========================================================
   Page header (interior pages)
   ========================================================= */
.page-head {
  padding: 72px 0 48px;
  background:
    radial-gradient(900px 400px at 80% -20%, rgba(124, 58, 237, 0.18), transparent 60%),
    radial-gradient(700px 360px at 0% 0%, rgba(59, 130, 246, 0.14), transparent 60%),
    var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.page-head .crumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.page-head .crumb a:hover { color: var(--purple); }
.page-head h1 { font-size: clamp(32px, 4.5vw, 48px); margin: 0 0 14px; letter-spacing: -0.03em; }
.page-head p { color: var(--muted); font-size: 18px; max-width: 680px; margin: 0; }

/* Category chips */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 32px 0; }
.chip {
  font-size: 14px; font-weight: 500;
  padding: 8px 16px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  color: var(--ink); cursor: pointer; transition: all .2s;
}
.chip:hover, .chip.active { background: var(--grad); color: #fff; border-color: transparent; }

/* =========================================================
   Article layout
   ========================================================= */
.article-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: start; }
@media (max-width: 980px) { .article-wrap { grid-template-columns: 1fr; } }
.article { font-size: 17px; line-height: 1.75; }
.article h2 { font-size: 30px; margin: 48px 0 16px; letter-spacing: -0.02em; }
.article h3 { font-size: 22px; margin: 32px 0 12px; }
.article p { margin: 0 0 20px; }
.article ul { margin: 0 0 24px; padding-left: 22px; }
.article li { margin-bottom: 8px; }
.article .lead { font-size: 20px; color: var(--ink); margin-bottom: 28px; }
.aside { position: sticky; top: 88px; display: grid; gap: 24px; }

/* Ad slot */
.ad-slot {
  background: var(--bg-soft);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 20px; text-align: center;
  color: var(--muted); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.ad-slot.in-article { margin: 32px 0; }
.ad-slot strong { display: block; color: var(--ink); font-size: 13px; margin-bottom: 4px; }

/* TOC */
.toc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.toc h4 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.toc ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.toc ul a { font-size: 14px; color: var(--ink); }
.toc ul a:hover { color: var(--purple); }

/* Tool review block */
.tool-review { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; margin: 32px 0; }
.tool-review h3 { margin-top: 0; }
.tool-review .row { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.tool-review .tag-sm { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 6px; background: var(--grad-soft); color: var(--purple); }

/* CTA banner */
.cta-banner {
  background: var(--grad);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  margin: 64px 0;
}
.cta-banner h3 { font-size: 26px; margin: 0 0 8px; }
.cta-banner p { margin: 0 0 20px; opacity: 0.9; }

/* FAQ */
.faq { display: grid; gap: 12px; margin: 24px 0; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details[open] summary { color: var(--purple); }
.faq p { margin: 12px 0 0; color: var(--muted); font-size: 15px; }

/* =========================================================
   Animations on scroll
   ========================================================= */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* LANG toggle */
.lang-toggle {
  width: 38px !important;
  height: 38px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}
@media (max-width: 900px) {
  .nav-cta .lang-toggle { display: none !important; }
}

/* Toast is fixed; article body save button styling */
.article .save-span {
  margin-top: 32px;
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
}
html[data-theme="dark"] .aff-disclosure { border-left-color: var(--purple-3); }

/* =========================================================
   Detail / prompt-page blocks
   ========================================================= */
.prompt-box {
  position: relative;
  background: var(--navy);
  color: #e2e8f0;
  border-radius: var(--radius);
  padding: 24px 28px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-x: auto;
  margin: 20px 0 28px;
  border: 1px solid rgba(255,255,255,0.06);
}
.prompt-box .copy-btn {
  position: absolute; top: 14px; right: 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
}
.prompt-box .copy-btn:hover { background: rgba(124,58,237,0.35); }
.meta-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 24px 0; }
.meta-grid .item { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.meta-grid .item .k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.meta-grid .item .v { font-weight: 700; margin-top: 4px; }
@media (max-width: 700px) { .meta-grid { grid-template-columns: repeat(2, 1fr); } }
.related-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.related-tags .tag { font-size: 12px; padding: 5px 11px; background: var(--grad-soft); color: var(--purple); border-radius: 6px; font-weight: 600; }

/* =========================================================
   Dark mode
   ========================================================= */
html[data-theme="dark"] {
  --ink: #e6e8f0;
  --muted: #9aa3b7;
  --line: #252a44;
  --bg: #0a0e27;
  --bg-soft: #0f1430;
  --bg-glass: rgba(20, 26, 63, 0.6);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,.35);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.55), 0 8px 24px rgba(124,58,237,0.25);
}
html[data-theme="dark"] .nav {
  background: rgba(10, 14, 39, 0.78);
  border-bottom-color: var(--line);
}
html[data-theme="dark"] .hero {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(124, 58, 237, 0.30), transparent 60%),
    radial-gradient(900px 500px at 0% 10%, rgba(59, 130, 246, 0.22), transparent 60%),
    linear-gradient(180deg, #0a0e27 0%, #141a3f 100%);
}
html[data-theme="dark"] .section-soft,
html[data-theme="dark"] .page-head {
  background:
    radial-gradient(900px 400px at 80% -20%, rgba(124, 58, 237, 0.18), transparent 60%),
    radial-gradient(700px 360px at 0% 0%, rgba(59, 130, 246, 0.14), transparent 60%),
    var(--bg-soft);
  color: var(--ink);
}
html[data-theme="dark"] .page-head .crumb a { color: var(--muted); }
html[data-theme="dark"] .news { background: var(--bg-soft); border-color: var(--line); }
html[data-theme="dark"] .news input[type="email"] { background: #1a1f3f; color: #fff; }
html[data-theme="dark"] .faq details { background: var(--bg-soft); border-color: var(--line); }
html[data-theme="dark"] .toc { background: var(--bg-soft); border-color: var(--line); }
html[data-theme="dark"] .tool-review { border-color: var(--line); }
html[data-theme="dark"] .meta-grid .item { background: var(--bg-soft); border-color: var(--line); }
html[data-theme="dark"] .ad-slot { background: var(--bg-soft); border-color: var(--line); color: var(--muted); }
html[data-theme="dark"] .ad-slot strong { color: var(--ink); }
html[data-theme="dark"] .chip { background: var(--bg-soft); border-color: var(--line); color: var(--ink); }

/* =========================================================
   Nav search + theme toggle
   ========================================================= */
.nav-search {
  position: relative;
  margin-left: 8px;
}
.nav-search input {
  width: 200px;
  padding: 9px 14px 9px 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 14px;
  outline: none;
  transition: border-color .2s, width .2s;
}
.nav-search input:focus { border-color: var(--purple); width: 240px; }
.nav-search .ic {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--muted); pointer-events: none;
}
.nav-search input::placeholder { color: var(--muted); }
.search-results {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 380px; max-width: 90vw;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  z-index: 60;
  max-height: 60vh; overflow-y: auto;
}
.search-results.open { display: block; }
.search-results .item { display: block; padding: 10px 14px; border-radius: 10px; }
.search-results .item:hover { background: var(--bg-soft); }
.search-results .item .t { font-weight: 600; font-size: 14px; }
.search-results .item .d { font-size: 12px; color: var(--muted); margin-top: 2px; }
.search-results .empty { padding: 16px; text-align: center; color: var(--muted); font-size: 14px; }

.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  display: grid; place-items: center;
  transition: all .2s;
}
.theme-toggle:hover { border-color: var(--purple); color: var(--purple); }

@media (max-width: 900px) {
  .nav-search, .nav .theme-toggle { display: none; }
}

/* =========================================================
   Scroll progress + back-to-top
   ========================================================= */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: var(--grad);
  z-index: 100;
  transition: width .1s linear;
}
.to-top {
  position: fixed; bottom: 24px; right: 24px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  border: 0; cursor: pointer;
  font-size: 20px;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
  opacity: 0; transform: translateY(20px) scale(.8);
  pointer-events: none;
  transition: all .25s;
  z-index: 90;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* =========================================================
   Scrollspy — active TOC link
   ========================================================= */
.toc ul a { padding: 4px 8px; border-radius: 6px; transition: color .15s, background .15s; display: inline-block; }
.toc ul a.active { color: var(--purple); background: var(--grad-soft); font-weight: 600; }

/* =========================================================
   Quick Tools
   ========================================================= */
.tool-card { padding: 24px; }
.tool-card h3 { margin: 0 0 4px; font-size: 19px; }
.tool-card .desc { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.tool-card textarea,
.tool-card input[type="text"],
.tool-card input[type="number"] {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: border-color .2s;
}
.tool-card textarea { min-height: 120px; font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; }
.tool-card textarea:focus, .tool-card input:focus { border-color: var(--purple); }
.tool-card label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.tool-card .row-field { margin-bottom: 12px; }
.tool-card .out {
  background: var(--navy);
  color: #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  margin-top: 14px;
  min-height: 64px;
  position: relative;
  overflow: auto;
}
.tool-card .out.empty { color: rgba(255,255,255,0.4); font-style: italic; }
.tool-card .actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.tool-card .actions .btn { padding: 9px 16px; font-size: 14px; }
.tool-card .badge-free { position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(34,197,94,0.85); padding: 4px 10px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.copy-out { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.copy-out:hover { background: rgba(124,58,237,0.4); }

/* Prompt filter result reveal */
.chips + .grid .card[data-cat] { transition: opacity .2s, transform .2s; }
.chips + .grid .card[data-cat].hide { display: none; }

/* =========================================================
   Cookie consent banner
   ========================================================= */
.consent {
  position: fixed;
  left: 24px; bottom: 24px;
  z-index: 95;
  max-width: 380px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  font-size: 13px;
  transform: translateY(20px); opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}
.consent.show { opacity: 1; transform: none; pointer-events: auto; }
.consent h4 { margin: 0 0 6px; font-size: 15px; }
.consent p { color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
.consent p a { color: var(--purple); text-decoration: underline; }
.consent .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.consent .btn { padding: 8px 16px; font-size: 13px; }
@media (max-width: 600px) {
  .consent { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

/* =========================================================
   Auth modal (memberstack / supabase)
   ========================================================= */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 14, 39, 0.55);
  backdrop-filter: blur(4px);
  z-index: 80;
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
  padding: 36px;
  position: relative;
  animation: modalIn .25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal .close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  background: var(--bg-soft); border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  color: var(--muted);
  display: grid; place-items: center;
}
.modal .close:hover { color: var(--ink); background: var(--line); }
.modal h3 { font-size: 24px; margin: 0 0 6px; letter-spacing: -0.02em; }
.modal p.sub { color: var(--muted); margin: 0 0 24px; font-size: 14px; }
.modal .field { margin-bottom: 14px; }
.modal label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.modal input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
  background: var(--bg-soft);
  color: var(--ink);
  outline: none;
  transition: border-color .2s;
}
.modal input:focus { border-color: var(--purple); }
.modal .btn { width: 100%; margin-top: 8px; }
.modal .alt { text-align: center; margin-top: 14px; font-size: 13px; color: var(--muted); }
.modal .alt a { color: var(--purple); font-weight: 600; cursor: pointer; }
.modal .note { text-align: center; font-size: 11px; color: var(--muted); margin-top: 12px; }

/* =========================================================
   Member gate (paywall block)
   ========================================================= */
.gate {
  margin: 32px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  background:
    radial-gradient(400px 200px at 50% 0%, rgba(124,58,237,0.10), transparent 60%),
    var(--bg-soft);
}
.gate .lock {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--grad);
  color: #fff;
  display: grid; place-items: center;
  margin: 0 auto 16px;
  font-size: 24px;
  box-shadow: 0 10px 30px rgba(124,58,237,0.35);
}
.gate h3 { font-size: 22px; margin: 0 0 8px; }
.gate p { color: var(--muted); margin: 0 0 22px; max-width: 480px; margin-left: auto; margin-right: auto; }
.gate .perks { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 24px; font-size: 13px; color: var(--muted); }
.gate .perks span { display: inline-flex; align-items: center; gap: 6px; }
.gate .perks .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--purple); }

/* =========================================================
   Affiliate components
   ========================================================= */
.aff-disclosure {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg-soft);
  border-left: 3px solid var(--purple);
  border-radius: 6px;
  padding: 10px 14px;
  margin: 16px 0 32px;
  line-height: 1.55;
}
.aff-disclosure strong { color: var(--ink); }

.aff-card {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  background: var(--bg);
  margin: 18px 0;
  transition: border-color .2s, box-shadow .2s;
}
.aff-card:hover { border-color: rgba(124,58,237,0.35); box-shadow: var(--shadow-md); }
.aff-card .body { line-height: 1.55; }
.aff-card .logo { font-weight: 700; font-size: 16px; color: var(--purple); margin-bottom: 4px; }
.aff-card h4 { margin: 0 0 4px; font-size: 17px; }
.aff-card .why { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.aff-card .side { text-align: center; min-width: 160px; }
.aff-card .side .price { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.aff-card .side .price small { font-size: 13px; font-weight: 500; color: var(--muted); }
.aff-card .side .stars { color: #f59e0b; font-size: 14px; letter-spacing: 2px; margin: 4px 0 8px; }
.aff-card .side .btn { width: 100%; }
@media (max-width: 600px) { .aff-card { grid-template-columns: 1fr; } .aff-card .side { text-align: left; } }

.aff-cta {
  background: linear-gradient(135deg, rgba(124,58,237,0.06), rgba(59,130,246,0.06));
  border: 1px solid rgba(124,58,237,0.18);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin: 32px 0;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.aff-cta .copy { flex: 1; min-width: 240px; }
.aff-cta h4 { margin: 0 0 6px; font-size: 19px; }
.aff-cta p { margin: 0; color: var(--muted); font-size: 15px; }
.aff-cta .btn { white-space: nowrap; }

.pricing-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
  font-size: 14px;
}
.pricing-table th, .pricing-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.pricing-table th { background: var(--bg-soft); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.pricing-table tr:last-child td { border-bottom: 0; }
.pricing-table .tool { font-weight: 700; color: var(--ink); }
.pricing-table .best { color: #16a34a; font-weight: 600; }
.pricing-table .ok  { color: #d97706; font-weight: 600; }
.pricing-table .no  { color: #dc2626; font-weight: 600; }
.pricing-table .cta-link { color: var(--purple); font-weight: 600; text-decoration: underline; }

.ribbon-af { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: rgba(34,197,94,0.85); padding: 4px 10px; border-radius: 6px; letter-spacing: 0.06em; text-transform: uppercase; vertical-align: middle; margin-left: 8px; }
