/* ============================================
   DataVista Tools — Design System
   Dark navy / indigo — Vercel-inspired
   ============================================ */

:root {
  --brand:       #6366f1;
  --brand-dark:  #4f46e5;
  --brand-light: #818cf8;
  --bg:          #09090f;
  --bg-card:     #0f0f1a;
  --bg-input:    #0d0d18;
  --border:      rgba(255,255,255,0.07);
  --border-h:    rgba(255,255,255,0.13);
  --text:        #eaeaf8;
  --text-muted:  #6b6b9a;
  --text-dim:    #363654;
  --radius:      14px;
  --radius-lg:   20px;
  --header-h:    62px;
  --font:        'DM Sans', system-ui, sans-serif;
  --mono:        'JetBrains Mono', 'Fira Code', 'DM Mono', monospace;
  --ease:        cubic-bezier(0.4,0,0.2,1);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.25);
}

/* Light mode */
.light {
  --bg:         #f5f5fb;
  --bg-card:    #ffffff;
  --bg-input:   #f8f8fd;
  --border:     rgba(0,0,0,0.08);
  --border-h:   rgba(0,0,0,0.14);
  --text:       #12121f;
  --text-muted: #60607a;
  --text-dim:   #b0b0cc;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background .25s var(--ease), color .25s var(--ease);
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: var(--font); }
button { cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1e1e3a; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #2a2a4a; }
::selection { background: rgba(99,102,241,.28); color: #fff; }

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== HEADER ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  transition: background .3s var(--ease), border-color .3s;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  height: 100%; display: flex; align-items: center; gap: 6px;
}

/* Logo */
.logo {
  display: flex; align-items: center; gap: 9px;
  font-size: 1rem; font-weight: 700; letter-spacing: -.025em;
  flex-shrink: 0; color: var(--text);
}
.logo-mark {
  position: relative; width: 30px; height: 30px; flex-shrink: 0;
}
.logo-mark::before {
  content: '';
  position: absolute; inset: 0; border-radius: 8px;
  background: var(--brand-dark);
  transform: rotate(7deg);
  transition: transform .25s var(--ease);
}
.logo:hover .logo-mark::before { transform: rotate(14deg); }
.logo-mark-inner {
  position: absolute; inset: 0; border-radius: 8px;
  background: var(--brand);
  display: flex; align-items: center; justify-content: center;
  color: white; z-index: 1;
}
.logo-text b { color: var(--brand-light); }

/* Nav — see overrides below */

/* Theme toggle */
.theme-btn {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); margin-left: 4px;
  transition: all .2s;
}
.theme-btn:hover { background: rgba(255,255,255,.06); color: var(--text); }
.light .theme-btn:hover { background: rgba(0,0,0,.06); }
.icon-moon { display: none; }
.light .icon-sun  { display: none; }
.light .icon-moon { display: block; }

/* Mobile menu */
.mobile-btn {
  display: none; width: 34px; height: 34px; border-radius: 10px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  margin-left: auto;
}
.mobile-btn span {
  display: block; width: 18px; height: 1.5px;
  background: var(--text-muted); border-radius: 2px;
  transition: all .25s;
}
.mobile-btn:hover { background: rgba(255,255,255,.05); }
.mobile-nav {
  display: none; flex-direction: column; gap: 1px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px 14px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 11px 14px; border-radius: 10px;
  font-size: .875rem; font-weight: 500;
  color: var(--text-muted);
  transition: all .2s;
}
.mobile-nav a:hover, .mobile-nav a.active {
  color: var(--text); background: rgba(255,255,255,.05);
}

/* ===== HERO ===== */
.hero {
  position: relative; overflow: hidden;
  padding-top: calc(var(--header-h) + 88px);
  padding-bottom: 88px;
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
}
.hero-glow {
  position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 550px;
  background: radial-gradient(ellipse, rgba(99,102,241,.11) 0%, transparent 68%);
}
.hero-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(99,102,241,.055) 1px, transparent 0);
  background-size: 38px 38px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}
.hero .container {
  position: relative; z-index: 1;
  text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 13px; border-radius: 100px;
  border: 1px solid rgba(99,102,241,.3);
  background: rgba(99,102,241,.07);
  color: var(--brand-light);
  font-size: .72rem; font-weight: 600; letter-spacing: .01em;
  margin-bottom: 26px;
  animation: fadeDown .55s ease both;
}
.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  font-weight: 700; letter-spacing: -.035em; line-height: 1.06;
  margin-bottom: 18px;
  animation: fadeUp .6s ease both .05s;
}
.hero-title .gr {
  background: linear-gradient(135deg, #a5b4fc 0%, #818cf8 40%, #6366f1 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.05rem; color: var(--text-muted); line-height: 1.75;
  max-width: 520px; margin: 0 auto 38px;
  animation: fadeUp .6s ease both .1s;
}

/* Search */
.search-wrap {
  position: relative; max-width: 580px; margin: 0 auto 36px;
  animation: fadeUp .6s ease both .15s;
}
.search-box {
  display: flex; align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color .2s, box-shadow .2s;
}
.search-box:focus-within {
  border-color: rgba(99,102,241,.55);
  box-shadow: 0 0 0 4px rgba(99,102,241,.09);
}
.search-ic {
  flex-shrink: 0; padding: 0 0 0 16px; color: var(--text-muted);
  pointer-events: none;
}
.search-box input {
  flex: 1; height: 50px; padding: 0 12px;
  background: transparent; border: none; outline: none;
  color: var(--text); font-size: .9rem;
}
.search-box input::placeholder { color: var(--text-muted); }
.search-clear {
  width: 32px; height: 32px; margin-right: 10px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); flex-shrink: 0;
  transition: all .2s;
}
.search-clear:hover { background: rgba(255,255,255,.07); color: var(--text); }
.search-drop {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,.4);
  z-index: 60; display: none;
}
.search-drop.open { display: block; }
.search-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 15px; cursor: pointer;
  transition: background .15s;
}
.search-item:hover { background: rgba(255,255,255,.04); }
.search-item-icon {
  width: 32px; height: 32px; border-radius: 9px;
  background: rgba(255,255,255,.05);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.search-item-name { font-size: .84rem; font-weight: 500; }
.search-item-cat  { font-size: .73rem; color: var(--text-muted); }
.search-item-arr  { margin-left: auto; color: var(--text-dim); font-size: .8rem; }

/* Stats */
.hero-stats {
  display: flex; align-items: center; justify-content: center; gap: 28px;
  animation: fadeUp .6s ease both .2s;
}
.stat strong { display: block; font-size: 1.4rem; font-weight: 700; }
.stat small   { display: block; font-size: .72rem; color: var(--text-muted); margin-top: 1px; }
.stat-div { width: 1px; height: 28px; background: var(--border); }

/* ===== SECTION ===== */
.section { padding: 80px 0; }
.section + .section { border-top: 1px solid var(--border); }
.sec-head { text-align: center; margin-bottom: 44px; }
.sec-head h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700; letter-spacing: -.03em; margin-bottom: 9px;
}
.sec-head p { color: var(--text-muted); font-size: 1rem; }
.sec-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 28px;
}
.sec-row h2 {
  font-size: clamp(1.5rem, 2.5vw, 1.9rem);
  font-weight: 700; letter-spacing: -.03em; margin-bottom: 5px;
}
.sec-row p { color: var(--text-muted); font-size: .9rem; }
.see-all {
  font-size: .82rem; color: var(--brand-light); font-weight: 500;
  display: flex; align-items: center; gap: 4px; white-space: nowrap;
  transition: color .2s;
}
.see-all:hover { color: var(--brand); }

/* ===== CATEGORIES ===== */
.cat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.cat-card {
  display: flex; flex-direction: column; padding: 22px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); color: var(--text);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.cat-card:hover {
  border-color: var(--border-h); transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.cat-ico {
  width: 46px; height: 46px; border-radius: 13px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
}
.cat-card h3 { font-size: .9rem; font-weight: 600; margin-bottom: 6px; }
.cat-card p {
  font-size: .78rem; color: var(--text-muted); line-height: 1.6;
  flex: 1; margin-bottom: 16px;
}
.cat-foot {
  display: flex; align-items: center; justify-content: space-between;
}
.cat-count { font-size: .72rem; color: var(--text-dim); }
.cat-arrow {
  font-size: .75rem; font-weight: 500; color: var(--text-dim);
  transition: color .2s;
}
.cat-card:hover .cat-arrow { color: var(--brand-light); }

/* ===== TOOL CARDS ===== */
.tools-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.tool-card {
  display: flex; align-items: flex-start; gap: 13px; padding: 17px 18px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); color: var(--text);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.tool-card:hover {
  border-color: var(--border-h); transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.tool-ico {
  width: 40px; height: 40px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tool-body h3 {
  font-size: .84rem; font-weight: 600; margin-bottom: 3px;
  transition: color .2s;
}
.tool-card:hover h3 { color: var(--brand-light); }
.tool-body p {
  font-size: .76rem; color: var(--text-muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.tool-body .open-lnk {
  font-size: .7rem; color: var(--text-dim); margin-top: 7px;
  display: flex; align-items: center; gap: 3px;
  transition: color .2s;
}
.tool-card:hover .open-lnk { color: var(--brand-light); }
.badge-new {
  display: inline-block; font-size: .62rem; font-weight: 700;
  padding: 2px 6px; border-radius: 5px; margin-left: 5px; vertical-align: middle;
  background: rgba(99,102,241,.15); color: var(--brand-light);
  border: 1px solid rgba(99,102,241,.25); letter-spacing: .03em;
}

/* ===== TRUST ===== */
.trust-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.trust-card {
  display: flex; align-items: flex-start; gap: 14px; padding: 22px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.trust-ico {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.18);
  color: var(--brand-light);
}
.trust-card h3 { font-size: .875rem; font-weight: 600; margin-bottom: 5px; }
.trust-card p  { font-size: .8rem; color: var(--text-muted); line-height: 1.65; }

/* ===== FAQ ===== */
.faq-wrap { max-width: 700px; margin: 0 auto; }
.faq-box {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-card); overflow: hidden;
}
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 17px 22px; text-align: left;
  font-size: .875rem; font-weight: 500; color: var(--text-muted);
  transition: color .2s; cursor: pointer; gap: 12px;
}
.faq-q:hover, .faq-item.open .faq-q { color: var(--text); }
.faq-chev {
  flex-shrink: 0; color: var(--text-dim);
  transition: transform .3s, color .2s;
}
.faq-item.open .faq-chev { transform: rotate(180deg); color: var(--brand-light); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-item.open .faq-a { max-height: 200px; }
.faq-a-in { padding: 0 22px 17px; font-size: .83rem; color: var(--text-muted); line-height: 1.75; }

/* ===== CTA ===== */
.cta-card {
  position: relative; text-align: center; padding: 60px 28px;
  border: 1px solid rgba(99,102,241,.18);
  background: linear-gradient(to bottom, rgba(99,102,241,.06), transparent);
  border-radius: 26px; overflow: hidden;
}
.cta-shine {
  position: absolute; top: 0; left: 50%; transform: translate(-50%,-50%);
  width: 280px; height: 140px;
  background: radial-gradient(ellipse, rgba(99,102,241,.16), transparent 70%);
  pointer-events: none;
}
.cta-top-line {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 60%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,.4), transparent);
}
.cta-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px;
  padding: 4px 12px; border-radius: 100px;
  border: 1px solid rgba(99,102,241,.28);
  background: rgba(99,102,241,.07);
  color: var(--brand-light); font-size: .72rem; font-weight: 600;
}
.cta-card h2 {
  font-size: clamp(1.6rem,3vw,2rem);
  font-weight: 700; letter-spacing: -.03em; margin-bottom: 11px;
}
.cta-card p { color: var(--text-muted); font-size: .95rem; max-width: 420px; margin: 0 auto 28px; }
.cta-btns { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 20px; border-radius: 11px;
  font-size: .855rem; font-weight: 600;
  transition: all .2s; border: none; cursor: pointer;
}
.btn-lg  { height: 44px; padding: 0 24px; font-size: .9rem; }
.btn-sm  { height: 33px; padding: 0 13px; font-size: .78rem; border-radius: 9px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-secondary {
  background: rgba(255,255,255,.06); color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: rgba(255,255,255,.1); border-color: var(--border-h); }
.light .btn-secondary { background: rgba(0,0,0,.04); }
.light .btn-secondary:hover { background: rgba(0,0,0,.08); }
.btn-outline {
  background: transparent; color: var(--brand-light);
  border: 1px solid rgba(99,102,241,.35);
}
.btn-outline:hover { background: rgba(99,102,241,.08); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn svg { flex-shrink: 0; }

/* ===== FOOTER ===== */
.site-footer {
  margin-top: auto; border-top: 1px solid var(--border);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px; margin-bottom: 44px;
}
.f-brand .logo { margin-bottom: 14px; }
.f-brand p {
  font-size: .8rem; color: var(--text-muted);
  line-height: 1.7; max-width: 260px; margin-bottom: 14px;
}
.f-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.f-badge {
  display: flex; align-items: center; gap: 5px;
  font-size: .72rem; color: var(--text-dim);
}
.footer-col h4 {
  font-size: .78rem; font-weight: 600; margin-bottom: 14px;
  color: var(--text);
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col a {
  font-size: .78rem; color: var(--text-muted);
  transition: color .2s;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 20px; border-top: 1px solid var(--border);
  font-size: .74rem; color: var(--text-dim);
}

/* ===== TOOL PAGE ===== */
.tool-page { padding-top: calc(var(--header-h) + 40px); padding-bottom: 80px; }
.tool-inner { max-width: 820px; margin: 0 auto; padding: 0 24px; }
.breadcrumb {
  display: flex; align-items: center; gap: 5px;
  font-size: .78rem; color: var(--text-muted); margin-bottom: 28px;
}
.breadcrumb a { transition: color .2s; }
.breadcrumb a:hover { color: var(--text); }
.bc-sep { color: var(--text-dim); }

.tool-hd { margin-bottom: 28px; }
.tool-hd-top { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 14px; }
.tool-hd-icon {
  width: 52px; height: 52px; border-radius: 15px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.tool-hd-text h1 {
  font-size: 1.7rem; font-weight: 700; letter-spacing: -.03em; margin-bottom: 3px;
}
.tool-hd-text p { font-size: .95rem; color: var(--text-muted); line-height: 1.6; }
.trust-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.trust-pill {
  display: flex; align-items: center; gap: 5px; padding: 4px 11px;
  border-radius: 8px; font-size: .72rem; color: var(--text-muted);
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
}
.trust-pill svg { color: #34d399; }

/* Tool UI box */
.tool-ui {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px; margin-bottom: 36px;
}

/* ===== FORM ELEMENTS ===== */
.field { margin-bottom: 14px; }
.field label, .field-label {
  display: block; font-size: .8rem; font-weight: 500;
  color: var(--text-muted); margin-bottom: 5px;
}
.input {
  width: 100%; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: 11px;
  color: var(--text); font-size: .875rem; outline: none;
  padding: 10px 13px;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus {
  border-color: rgba(99,102,241,.5);
  box-shadow: 0 0 0 3px rgba(99,102,241,.09);
}
.input::placeholder { color: var(--text-muted); }
textarea.input { resize: vertical; min-height: 110px; line-height: 1.65; }
select.input { cursor: pointer; height: 40px; padding-top: 0; padding-bottom: 0; }
.input-h { font-size: .72rem; color: var(--text-dim); margin-top: 4px; }
.char-count { font-size: .72rem; margin-top: 4px; }
.char-ok   { color: var(--text-dim); }
.char-warn { color: #fbbf24; }
.char-over { color: #f87171; }

/* Range */
input[type=range] {
  width: 100%; height: 4px; accent-color: var(--brand);
  background: var(--border); border-radius: 4px;
  cursor: pointer; -webkit-appearance: none; outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 17px; height: 17px;
  background: var(--brand); border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(99,102,241,.18);
}
.range-labels {
  display: flex; justify-content: space-between;
  font-size: .7rem; color: var(--text-dim); margin-top: 5px;
}

/* Toggle */
.tog-row { display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.tog {
  width: 36px; height: 20px; border-radius: 100px;
  background: var(--text-dim); position: relative;
  transition: background .2s;
}
.tog.on { background: var(--brand); }
.tog-dot {
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: transform .2s;
}
.tog.on .tog-dot { transform: translateX(16px); }
.tog-lbl { font-size: .82rem; color: var(--text-muted); }

/* Tabs */
.tabs {
  display: flex; border: 1px solid var(--border);
  border-radius: 11px; overflow: hidden; width: fit-content;
}
.tab {
  padding: 8px 16px; font-size: .82rem; font-weight: 500;
  color: var(--text-muted); transition: all .2s; cursor: pointer;
}
.tab.active { background: var(--brand); color: #fff; }
.tab:not(.active):hover { background: rgba(255,255,255,.05); color: var(--text); }

/* Seg buttons */
.seg-wrap { display: flex; gap: 5px; flex-wrap: wrap; }
.seg {
  padding: 7px 13px; border-radius: 9px; border: 1px solid var(--border);
  font-size: .78rem; font-weight: 500; color: var(--text-muted);
  font-family: var(--mono); transition: all .2s; cursor: pointer;
}
.seg:hover { color: var(--text); border-color: var(--border-h); }
.seg.active {
  background: rgba(99,102,241,.14); border-color: rgba(99,102,241,.35);
  color: var(--brand-light);
}

/* Grid 2-col */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }

/* ===== STAT BOXES ===== */
.stat-boxes { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; margin: 14px 0; }
.stat-box {
  text-align: center; padding: 12px 6px;
  background: rgba(255,255,255,.02); border: 1px solid var(--border);
  border-radius: 11px;
}
.stat-box.hi { background: rgba(99,102,241,.07); border-color: rgba(99,102,241,.18); }
.stat-box strong { display: block; font-size: 1.15rem; font-weight: 700; }
.stat-box.hi strong { color: var(--brand-light); }
.stat-box small { font-size: .65rem; color: var(--text-muted); }

/* ===== CODE BLOCK ===== */
.code-block {
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: rgba(0,0,0,.35);
}
.code-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}
.code-lbl { font-size: .73rem; color: var(--text-muted); font-family: var(--mono); }
.code-copy-btn {
  display: flex; align-items: center; gap: 5px;
  font-size: .73rem; color: var(--text-muted); cursor: pointer;
  transition: color .2s;
}
.code-copy-btn:hover { color: var(--text); }
.code-body {
  padding: 14px; max-height: 300px; overflow: auto;
}
.code-body pre {
  font-family: var(--mono); font-size: .76rem;
  color: #6ee7b7; white-space: pre-wrap; word-break: break-all; line-height: 1.75;
}
pre.err { color: #f87171; }

/* ===== ALERTS ===== */
.alert {
  display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px;
  border-radius: 11px; font-size: .82rem; line-height: 1.6; margin: 10px 0;
}
.alert-err  { background: rgba(239,68,68,.07);  border: 1px solid rgba(239,68,68,.2);  color: #fca5a5; }
.alert-ok   { background: rgba(16,185,129,.07); border: 1px solid rgba(16,185,129,.2); color: #6ee7b7; }
.alert-info { background: rgba(99,102,241,.07); border: 1px solid rgba(99,102,241,.2); color: var(--brand-light); }

/* ===== UPLOAD ZONE ===== */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius-lg);
  padding: 44px 22px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.upload-zone:hover, .upload-zone.drag {
  border-color: rgba(99,102,241,.45);
  background: rgba(99,102,241,.04);
}
.upload-zone-ico {
  width: 48px; height: 48px; border-radius: 14px;
  background: rgba(255,255,255,.05);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; color: var(--text-muted);
  transition: all .2s;
}
.upload-zone:hover .upload-zone-ico, .upload-zone.drag .upload-zone-ico {
  background: rgba(99,102,241,.14); color: var(--brand-light);
}
.upload-zone p { font-size: .875rem; font-weight: 500; margin-bottom: 3px; }
.upload-zone small { font-size: .76rem; color: var(--text-muted); }

/* File items */
.file-list { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.file-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px;
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  border-radius: 11px;
}
.file-ext {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
  background: rgba(255,255,255,.05);
  display: flex; align-items: center; justify-content: center;
  font-size: .62rem; font-weight: 700; color: var(--text-muted);
}
.file-info { flex: 1; min-width: 0; }
.file-name { font-size: .82rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }
.file-rm {
  width: 26px; height: 26px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); opacity: 0; transition: all .2s;
}
.file-item:hover .file-rm { opacity: 1; }
.file-rm:hover { background: rgba(239,68,68,.12); color: #f87171; }

/* Result items */
.result-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px;
  background: rgba(16,185,129,.05); border: 1px solid rgba(16,185,129,.18);
  border-radius: 11px; margin-bottom: 7px;
}
.result-info { flex: 1; min-width: 0; }
.result-name { font-size: .82rem; font-weight: 500; }
.result-meta { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }
.result-meta b { color: #34d399; }

/* ===== ABOUT + FAQ (tool page) ===== */
.tool-about { margin-bottom: 36px; }
.tool-about h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.tool-about p  { font-size: .855rem; color: var(--text-muted); line-height: 1.75; }
.tool-faq  { margin-bottom: 36px; }
.tool-faq h2   { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }

/* ===== RELATED TOOLS ===== */
.related h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 14px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 11px; }

/* ===== COMING SOON ===== */
.coming-soon {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 24px; text-align: center; gap: 12px;
}
.cs-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 13px; border-radius: 100px;
  background: rgba(245,158,11,.09); border: 1px solid rgba(245,158,11,.22);
  color: #fbbf24; font-size: .72rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}
.coming-soon h3 { font-size: 1.05rem; font-weight: 700; }
.coming-soon p  { font-size: .84rem; color: var(--text-muted); max-width: 340px; line-height: 1.65; }

/* ===== CATEGORY PAGE ===== */
.cat-page { padding-top: calc(var(--header-h) + 40px); padding-bottom: 80px; }
.cat-page-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.cat-page-hd {
  display: flex; align-items: center; gap: 17px; margin-bottom: 10px;
}
.cat-page-hd-ico {
  width: 52px; height: 52px; border-radius: 15px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.cat-page-hd h1 { font-size: 2rem; font-weight: 700; letter-spacing: -.03em; }
.cat-page-hd p  { color: var(--text-muted); margin-top: 3px; font-size: .9rem; }
.cat-tools-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 12px; margin-top: 28px; }

/* Category grid — up to 4 cols */
.cat-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:14px; }
@keyframes fadeUp   { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:none; } }
@keyframes fadeDown { from { opacity:0; transform:translateY(-14px); } to { opacity:1; transform:none; } }
@keyframes fadeIn   { from { opacity:0; } to { opacity:1; } }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .cat-grid    { grid-template-columns: repeat(2,1fr); }
  .tools-grid  { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .stat-boxes  { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 768px) {
  .main-nav { display: none; }
  .mobile-btn { display: flex; }
  .theme-btn { margin-left: 0; }
  .hero { padding-top: calc(var(--header-h) + 52px); padding-bottom: 56px; }
  .hero-title { font-size: 1.95rem; }
  .hero-stats { gap: 18px; }
  .section { padding: 56px 0; }
  .trust-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .cat-grid   { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .sec-row { flex-direction: column; gap: 6px; }
  .cta-card { padding: 40px 18px; }
}
@media (max-width: 480px) {
  .cat-grid  { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-btns { flex-direction: column; align-items: center; }
  .stat-boxes { grid-template-columns: repeat(2,1fr); }
}


/* ── HEADER FULL-WIDTH SCROLL NAV FIX ── */
.site-header .container {
  height: 100%; display: flex; align-items: center; gap: 0;
  overflow: visible;
}
.main-nav {
  display: flex; align-items: center; gap: 0;
  margin-left: auto; flex-shrink: 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; max-width: calc(100vw - 220px);
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  padding: 6px 10px; border-radius: 9px;
  font-size: .80rem; font-weight: 500;
  color: var(--text-muted); white-space: nowrap; flex-shrink: 0;
  transition: color .2s, background .2s;
}
.main-nav a.active { color: var(--text); background: rgba(255,255,255,.06); }
.main-nav a:hover  { color: var(--text); background: rgba(255,255,255,.05); }
.main-nav a.nav-ai { color: #a78bfa; }
.main-nav a.nav-ai:hover, .main-nav a.nav-ai.active {
  background: rgba(139,92,246,.12); color: #c4b5fd;
}
.light .main-nav a:hover  { background: rgba(0,0,0,.05); }
.light .main-nav a.active { background: rgba(0,0,0,.06); }
.theme-btn { margin-left: 6px; flex-shrink: 0; }

/* ── FOOTER LOGO ── */
.f-logo-img { height: 30px; width: auto; object-fit: contain; }
.footer-dv-link {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; text-decoration: none;
}
.footer-dv-link span {
  font-size: .9rem; font-weight: 700; color: var(--text); letter-spacing: -.02em;
}
.footer-dv-link span b { color: var(--brand-light); }
.footer-studio-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .74rem; color: var(--brand-light);
  text-decoration: none; margin-bottom: 14px; transition: color .2s;
}
.footer-studio-link:hover { color: #a5b4fc; }

/* ── LIGHT MODE NAV TEXT ── */
.light .main-nav a { color: rgba(0,0,0,.55); }
.light .main-nav a:hover  { color: rgba(0,0,0,.85); background: rgba(0,0,0,.05); }
.light .main-nav a.active { color: rgba(0,0,0,.85); background: rgba(0,0,0,.07); }
.light .main-nav a.nav-ai { color: #7c3aed; }
.light .main-nav a.nav-ai:hover, .light .main-nav a.nav-ai.active { background: rgba(124,58,237,.1); color: #6d28d9; }

/* ── AI PAGE TEXT FIX (dark/light) ── */
.ai-hero h1, .ai-hero p, .ai-hero .ai-sub { color: var(--text); }
.ai-hero h1 .g { background: linear-gradient(135deg,#a78bfa,#818cf8); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.light .ai-hero h1 { color: #12121f; }
.light .ai-hero .ai-sub { color: #404060; }
.light .plat-pill { color: #12121f; border-color: rgba(0,0,0,.12); }
.light .prompt-card { background: #fff; }
.light .pc-prompt { background: rgba(0,0,0,.04); color: #404060; }
.light .pc-prompt code { color: #12121f; }
.light .builder-section { background: #fff; }
.light .prompt-preview { background: rgba(0,0,0,.04); color: #4c1d95; }
.light .guide-card { background: #fff; }
.light .token-box { background: #fff; }
.light .ai-tabs { border-color: rgba(0,0,0,.1); }
.light .ai-tab { color: rgba(0,0,0,.45); }
.light .ai-tab.active { color: #7c3aed; border-bottom-color: #7c3aed; }
.light .ai-hero { background: linear-gradient(135deg,#f0f0fc 0%,#ede9fe 50%,#eff6ff 100%); }

/* ── MOBILE NAV VISIBILITY ── */
@media(max-width:1100px) {
  .main-nav a { padding: 5px 8px; font-size: .76rem; }
}
@media(max-width:960px) {
  .main-nav a { padding: 5px 7px; font-size: .72rem; }
}

/* ── DOCS NAV LINK ── */
.main-nav a.nav-docs { color: var(--text-muted); }
.main-nav a.nav-docs:hover, .main-nav a.nav-docs.active { color: var(--text); background: rgba(255,255,255,.06); }
.light .main-nav a.nav-docs:hover { background: rgba(0,0,0,.05); }

/* ── YOUTUBE NAV LINK ── */
.main-nav a.nav-yt { color: #ff6b6b !important; }
.main-nav a.nav-yt:hover, .main-nav a.nav-yt.active { background: rgba(255,0,0,.1) !important; color: #ff4444 !important; }
.light .main-nav a.nav-yt { color: #cc0000 !important; }

.main-nav a.nav-fs { color:#818cf8; }
.main-nav a.nav-fs.active,.main-nav a.nav-fs:hover { background:rgba(99,102,241,.12); color:#818cf8; }

/* ── FOOTER LOGO HORIZONTAL ── */
.f-logo-img {
  height: 36px; width: auto; max-width: 180px;
  object-fit: contain; display: block;
  filter: brightness(1.05) drop-shadow(0 0 8px rgba(99,102,241,.15));
  transition: filter .2s;
}
.footer-dv-link:hover .f-logo-img {
  filter: brightness(1.15) drop-shadow(0 0 12px rgba(99,102,241,.25));
}
.footer-dv-link { display:flex; align-items:center; gap:10px; margin-bottom:14px; text-decoration:none; }
.footer-dv-link span { font-size:.88rem; font-weight:700; color:var(--text); letter-spacing:-.02em; }
.footer-dv-link span b { color:var(--brand-light); }
.footer-studio-link {
  display:inline-flex; align-items:center; gap:4px; font-size:.74rem;
  color:var(--brand-light); text-decoration:none; margin-bottom:14px; transition:color .2s;
}
.footer-studio-link:hover { color:#c4b5fd; }

/* ══════════════════════════════════════════════
   DESIGN UNIFICATION PATCH — v10.1
   Fixes: header scroll color, YouTube/Sheets
   theme isolation, light mode consistency
   ══════════════════════════════════════════════ */

/* ── 1. HEADER: always has bg color on scroll ──
   The header was transparent until scrolled, which
   caused nav text to be invisible over colored heroes */
.site-header {
  background: transparent;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 88%, transparent) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 20px rgba(0,0,0,.15);
}
/* Light mode scrolled */
.light .site-header.scrolled {
  background: color-mix(in srgb, #f5f5fb 88%, transparent) !important;
  box-shadow: 0 1px 20px rgba(0,0,0,.06);
}

/* ── 2. YOUTUBE PAGE: unified dark/light hero ── */
/* Dark mode is already styled; fix light mode */
.light .yt-hero {
  background: linear-gradient(135deg, #fff5f5 0%, #fff0f0 40%, #fef2f2 100%) !important;
  border-bottom: 1px solid rgba(239,68,68,.15);
}
.light .yt-hero::before {
  background-image: radial-gradient(circle, rgba(239,68,68,.05) 1px, transparent 0) !important;
}
.light .yt-glow {
  background: radial-gradient(ellipse, rgba(239,68,68,.08) 0%, transparent 65%) !important;
}
.light .yt-hero h1 { color: #1a0a0a !important; }
.light .yt-hero h1 .r { color: #dc2626 !important; }
.light .yt-sub { color: #7f1d1d !important; }
.light .yt-badge {
  background: rgba(220,38,38,.08) !important;
  border-color: rgba(220,38,38,.25) !important;
  color: #dc2626 !important;
}
.light .yt-stat strong { color: #dc2626 !important; }
.light .yt-stat small { color: #9f1239 !important; }

/* YouTube tabs in light mode */
.light .yt-tab { color: rgba(0,0,0,.5) !important; }
.light .yt-tab.active { color: #dc2626 !important; border-bottom-color: #dc2626 !important; }
.light .yt-tab:hover:not(.active) { color: rgba(0,0,0,.8) !important; }

/* YouTube input in light */
.light .yt-input {
  background: #fff !important;
  border-color: rgba(0,0,0,.12) !important;
  color: #12121f !important;
}
.light .yt-input:focus { border-color: rgba(220,38,38,.4) !important; box-shadow: 0 0 0 3px rgba(220,38,38,.06) !important; }

/* ── 3. SHEETS PAGE: unified dark/light hero ── */
.light .sheets-hero {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 40%, #ecfdf5 100%) !important;
  border-bottom-color: rgba(22,163,74,.2) !important;
}
.light .sheets-hero::before {
  background-image:
    linear-gradient(rgba(22,163,74,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22,163,74,.05) 1px, transparent 1px) !important;
}
.light .sheets-hero::after {
  background: radial-gradient(ellipse, rgba(22,163,74,.1) 0%, transparent 65%) !important;
}

/* Sheets hero text in light */
.light .sheets-title { color: #14532d !important; }
.light .sheets-title .g { color: #16a34a !important; }
.light .sheets-title .e { color: #15803d !important; }
.light .sheets-sub { color: #166534 !important; }
.light .sheets-badge {
  background: rgba(22,163,74,.1) !important;
  border-color: rgba(22,163,74,.3) !important;
  color: #15803d !important;
}
.light .app-badge-sheets { background: rgba(22,163,74,.1) !important; border-color: rgba(22,163,74,.25) !important; color: #15803d !important; }
.light .app-badge-excel  { background: rgba(16,124,65,.1)  !important; border-color: rgba(16,124,65,.25)  !important; color: #15803d !important; }

/* Sheets cards in light */
.light .sheets-card { background: #fff !important; border-color: rgba(22,163,74,.12) !important; }
.light .sheets-card:hover { border-color: rgba(22,163,74,.3) !important; }
.light .sc-title { color: #12121f !important; }
.light .sc-desc { color: #60607a !important; }

/* Formula cards in light */
.light .formula-card { background: #fff !important; }
.light .fc-syntax { background: rgba(0,0,0,.04) !important; border-color: rgba(0,0,0,.08) !important; }
.light .fc-syntax code { color: #15803d !important; }
.light .fc-copy-btn { background: rgba(22,163,74,.1) !important; color: #16a34a !important; }
.light .fc-copy-btn:hover { background: rgba(22,163,74,.2) !important; }
.light .cat-filter.active { background: rgba(22,163,74,.1) !important; border-color: rgba(22,163,74,.3) !important; color: #16a34a !important; }
.light .formula-search { background: #fff !important; }

/* ── 4. SECTION HERO BACKGROUNDS for all category pages ──
   Adds a consistent hero banner to each category's top area */
.cat-page {
  padding-top: 0 !important;
}
.cat-page-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-h) + 40px) 0 40px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.cat-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(99,102,241,.04) 1px, transparent 0);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
  pointer-events: none;
}
.cat-page-hero .cat-page-inner {
  position: relative;
  z-index: 1;
}
.cat-page-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.cat-page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.cat-page-hd {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.light .cat-page-hero {
  background: #f8f8fd;
  border-bottom-color: rgba(0,0,0,.07);
}
.light .cat-page-hero::before {
  background-image: radial-gradient(circle, rgba(99,102,241,.035) 1px, transparent 0);
}

/* ── 5. NAV: consistent text colors dark/light ── */
/* Make sure nav text is always visible over any page bg */
.site-header:not(.scrolled) .main-nav a {
  color: rgba(234,234,248,.75);
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.site-header:not(.scrolled) .main-nav a:hover,
.site-header:not(.scrolled) .main-nav a.active {
  color: #fff;
  background: rgba(255,255,255,.1);
  text-shadow: none;
}
.site-header:not(.scrolled) .main-nav a.nav-ai { color: #c4b5fd !important; }
.site-header:not(.scrolled) .main-nav a.nav-yt { color: #fca5a5 !important; }
.site-header:not(.scrolled) .main-nav a.nav-fs { color: #a5b4fc !important; }
.site-header:not(.scrolled) .logo { color: #fff; }
.site-header:not(.scrolled) .theme-btn { color: rgba(255,255,255,.75); }
.site-header:not(.scrolled) .mobile-btn span { background: rgba(255,255,255,.75); }

/* Light mode non-scrolled header (on light colored heroes) */
.light .site-header:not(.scrolled) .main-nav a {
  color: rgba(0,0,0,.6);
  text-shadow: none;
}
.light .site-header:not(.scrolled) .main-nav a:hover,
.light .site-header:not(.scrolled) .main-nav a.active {
  color: rgba(0,0,0,.9);
  background: rgba(0,0,0,.06);
}
.light .site-header:not(.scrolled) .main-nav a.nav-ai { color: #7c3aed !important; }
.light .site-header:not(.scrolled) .main-nav a.nav-yt { color: #dc2626 !important; }
.light .site-header:not(.scrolled) .main-nav a.nav-fs { color: #6366f1 !important; }
.light .site-header:not(.scrolled) .logo { color: #12121f; }
.light .site-header:not(.scrolled) .theme-btn { color: rgba(0,0,0,.6); }
.light .site-header:not(.scrolled) .mobile-btn span { background: rgba(0,0,0,.6); }

/* ── 6. INFO BOXES in light mode ── */
.light .info-box { background: rgba(99,102,241,.05) !important; border-color: rgba(99,102,241,.2) !important; color: var(--text) !important; }
.light .info-box strong { color: var(--text) !important; }

/* ── 7. Tool pages stat-bar / result consistency ── */
.light .stats-bar { color: var(--text-muted); }
.light .video-card { background: #fff; }
.light .thumb-item { background: #fff; }
.light .yt-stat-box { background: #fff; }


/* ── cat-page-content wrapper ── */
.cat-page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}

/* ══════════════════════════════════════════════
   TOOL PAGE HERO SECTION
   Adds a styled background to the page header
   area on every individual tool page
   ══════════════════════════════════════════════ */

.tool-page {
  padding-top: 0 !important;
}

/* Hero band at the top of every tool page */
.tool-hd-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-h) + 36px) 0 32px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.tool-hd-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(99,102,241,.035) 1px, transparent 0);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 0%, black, transparent);
  pointer-events: none;
}
.tool-hd-hero::after {
  content: '';
  position: absolute;
  top: -60px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 300px;
  background: radial-gradient(ellipse, rgba(99,102,241,.06) 0%, transparent 65%);
  pointer-events: none;
}
.tool-hd-hero .tool-inner {
  position: relative;
  z-index: 1;
}

.light .tool-hd-hero {
  background: #f8f8fd;
  border-bottom-color: rgba(0,0,0,.07);
}
.light .tool-hd-hero::before {
  background-image: radial-gradient(circle, rgba(99,102,241,.025) 1px, transparent 0);
}
.light .tool-hd-hero::after {
  background: radial-gradient(ellipse, rgba(99,102,241,.04) 0%, transparent 65%);
}

/* Trust pills in light mode */
.light .trust-pill { background: rgba(0,0,0,.05) !important; color: var(--text-muted) !important; border-color: rgba(0,0,0,.08) !important; }


/* ── YouTube page: header over dark red hero ── */
/* Since yt-hero has its own dark background, the global 
   non-scrolled nav styles work fine. But after scrolling
   the scrolled header matches the dark theme */

/* ── Fix for scrolled header nav text in dark/light ── */
.site-header.scrolled .main-nav a { color: var(--text-muted); }
.site-header.scrolled .main-nav a:hover,
.site-header.scrolled .main-nav a.active { color: var(--text); }
.site-header.scrolled .main-nav a.nav-ai { color: #a78bfa; }
.site-header.scrolled .main-nav a.nav-yt { color: #ff6b6b !important; }
.site-header.scrolled .main-nav a.nav-fs { color: #818cf8; }
.light .site-header.scrolled .main-nav a { color: rgba(0,0,0,.55); }
.light .site-header.scrolled .main-nav a:hover,
.light .site-header.scrolled .main-nav a.active { color: rgba(0,0,0,.85); }
.light .site-header.scrolled .main-nav a.nav-ai { color: #7c3aed; }
.light .site-header.scrolled .main-nav a.nav-yt { color: #cc0000 !important; }
.light .site-header.scrolled .main-nav a.nav-fs { color: #6366f1; }
.site-header.scrolled .logo { color: var(--text); }
.site-header.scrolled .theme-btn { color: var(--text-muted); }
.site-header.scrolled .mobile-btn span { background: var(--text-muted); }

/* ── Tool page hero color accents by category ── */
/* PDF tools */
.tool-hd-icon[style*="#ef4444"] ~ .tool-hd-hero::after,
body:has(.tool-hd-icon[style*="#ef4444"]) .tool-hd-hero::after {
  background: radial-gradient(ellipse, rgba(239,68,68,.06) 0%, transparent 65%);
}


/* ── Tool page inner content wrapper ── */
.tool-inner-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* When tool-inner is inside tool-hd-hero, keep narrow max-width for content alignment */
.tool-hd-hero .tool-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

