/* =============================================
   ToolsHub — Design System v2
   ============================================= */

/* ── Reset & Base ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand */
  --c-primary:       #7c3aed;
  --c-primary-d:     #6d28d9;
  --c-primary-l:     #ede9fe;
  --c-accent:        #f59e0b;
  --c-accent-l:      #fef3c7;
  --c-danger:        #ef4444;
  --c-success:       #10b981;

  /* Neutral */
  --c-bg:            #f4f4f8;
  --c-surface:       #ffffff;
  --c-border:        #e4e4e7;
  --c-text:          #18181b;
  --c-muted:         #71717a;
  --c-subtle:        #a1a1aa;

  /* Gradients */
  --grad-hero: linear-gradient(135deg, #7c3aed 0%, #4f46e5 40%, #0ea5e9 100%);
  --grad-card: linear-gradient(135deg, #7c3aed, #f59e0b);

  /* Shadows */
  --shadow-xs:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm:  0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
  --shadow-md:  0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);
  --shadow-lg:  0 20px 25px -5px rgba(0,0,0,.10), 0 10px 10px -5px rgba(0,0,0,.04);
  --shadow-glow: 0 0 0 4px rgba(124,58,237,.18);

  /* Shape */
  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  28px;
  --r-full: 9999px;

  /* Typography */
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Layout */
  --max-w: 1240px;
  --header-h: 68px;

  /* Motion */
  --ease: cubic-bezier(.4,0,.2,1);
  --t-fast: 150ms;
  --t-base: 220ms;
  --t-slow: 350ms;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: var(--font); }

/* ── Layout ───────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ── Google Fonts ─────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* =============================================
   HEADER
   ============================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--c-border);
  transition: box-shadow var(--t-base) var(--ease);
}

.header.scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 8px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-right: 8px;
}

.logo-mark {
  width: 36px; height: 36px;
  background: var(--grad-hero);
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(124,58,237,.35);
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  background: var(--grad-card);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -.3px;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav a {
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-size: .875rem;
  font-weight: 500;
  color: var(--c-muted);
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.nav a:hover { background: var(--c-primary-l); color: var(--c-primary); }
.nav a.active { background: var(--c-primary); color: white; }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--r-full);
  background: var(--c-primary-l);
  color: var(--c-primary);
  border: 1.5px solid transparent;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  letter-spacing: .3px;
}
.lang-btn:hover { background: var(--c-primary); color: white; }

.nav-toggle {
  display: none;
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--c-border);
  background: white;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: all var(--t-base) var(--ease);
}

/* =============================================
   HERO
   ============================================= */
.hero {
  background: var(--grad-hero);
  padding: 80px 0 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Decorative blobs */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .25;
  pointer-events: none;
}
.hero::before {
  width: 500px; height: 500px;
  background: #f59e0b;
  top: -120px; right: -80px;
}
.hero::after {
  width: 400px; height: 400px;
  background: #0ea5e9;
  bottom: -100px; left: -60px;
}

.hero-inner { position: relative; z-index: 1; }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  color: white;
  border: 1px solid rgba(255,255,255,.25);
  padding: 6px 16px;
  border-radius: var(--r-full);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 900;
  color: white;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title span {
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,.82);
  margin-bottom: 40px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* Stats row */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
  color: white;
}

.hero-stat-num {
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
}

.hero-stat-label {
  font-size: .75rem;
  font-weight: 500;
  color: rgba(255,255,255,.7);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 2px;
}

.hero-stat-sep {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,.2);
}

/* Search */
.search-wrap {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.search-wrap input {
  width: 100%;
  padding: 18px 56px 18px 24px;
  border-radius: var(--r-full);
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: var(--font);
  background: white;
  color: var(--c-text);
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  transition: box-shadow var(--t-base) var(--ease);
}

.search-wrap input:focus {
  box-shadow: 0 8px 32px rgba(0,0,0,.18), var(--shadow-glow);
}

.search-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  pointer-events: none;
}

/* =============================================
   ADS
   ============================================= */
.ad-strip {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  padding: 10px 0;
}

.ad-box {
  min-height: 90px;
  border: 1.5px dashed var(--c-border);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-bg);
}

.ad-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-subtle);
}

/* =============================================
   MAIN
   ============================================= */
.main { padding: 52px 0 72px; }

/* ── Category filter pills ─────────────────── */
.category-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--c-border);
  background: var(--c-surface);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--c-muted);
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
}

.cat-pill:hover { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-l); }
.cat-pill.active { background: var(--c-primary); border-color: var(--c-primary); color: white; box-shadow: 0 4px 14px rgba(124,58,237,.3); }

/* ── Section ───────────────────────────────── */
.tool-section { margin-bottom: 56px; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--c-border);
  margin-left: 16px;
}

/* ── Tools Grid ────────────────────────────── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}

/* ── Tool Card ─────────────────────────────── */
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 24px 22px 20px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition:
    transform var(--t-base) var(--ease),
    box-shadow var(--t-base) var(--ease),
    border-color var(--t-base) var(--ease);
  box-shadow: var(--shadow-xs);
}

/* Top color stripe */
.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-card);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
  z-index: 0;
  border-radius: var(--r-lg);
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--c-primary);
}

.tool-card:hover::before { opacity: .04; }

.tool-card > * { position: relative; z-index: 1; }

/* Icon bubble */
.tool-icon-wrap {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  background: var(--c-primary-l);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  margin-bottom: 14px;
  transition: transform var(--t-base) var(--ease), background var(--t-base) var(--ease);
}

.tool-card:hover .tool-icon-wrap {
  background: var(--c-primary);
  transform: scale(1.08) rotate(-3deg);
}

.tool-card h3 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}

.tool-card p {
  font-size: .825rem;
  color: var(--c-muted);
  line-height: 1.55;
  flex: 1;
}

/* Arrow */
.card-arrow {
  position: absolute;
  bottom: 18px;
  right: 18px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--c-bg);
  border: 1.5px solid var(--c-border);
  display: grid;
  place-items: center;
  font-size: .85rem;
  transition: all var(--t-fast) var(--ease);
}

.tool-card:hover .card-arrow {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: white;
  transform: translate(2px, -2px);
}

/* Badge */
.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 10px;
  border-radius: var(--r-full);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
  width: fit-content;
}

.badge-popular { background: #fef3c7; color: #92400e; }
.badge-new     { background: #d1fae5; color: #065f46; }
.badge-hot     { background: #fee2e2; color: #991b1b; }

/* Hidden during search */
.tool-card.hidden { display: none !important; }

/* No results */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--c-muted);
  display: none;
  grid-column: 1/-1;
}
.no-results.show { display: block; }
.no-results .nr-icon { font-size: 3.5rem; margin-bottom: 16px; opacity: .5; }
.no-results h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; color: var(--c-text); }

/* =============================================
   FEATURED STRIP (below hero)
   ============================================= */
.featured-strip {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  padding: 0;
}

.featured-strip-inner {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0;
}
.featured-strip-inner::-webkit-scrollbar { display: none; }

.featured-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-right: 1px solid var(--c-border);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--t-fast) var(--ease);
  text-decoration: none;
  color: inherit;
}

.featured-item:hover { background: var(--c-primary-l); }

.featured-item-icon {
  width: 34px; height: 34px;
  background: var(--c-primary-l);
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.featured-item-label {
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--c-text);
}

.featured-item-sub {
  font-size: .7rem;
  color: var(--c-muted);
  white-space: nowrap;
}

/* =============================================
   TRUST BAR
   ============================================= */
.trust-bar {
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  padding: 24px 0;
}

.trust-items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--c-primary-d);
}

.trust-item .trust-icon {
  font-size: 1.3rem;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: #0f0f13;
  color: #a1a1aa;
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand .logo { margin-bottom: 14px; }
.footer-brand .logo .logo-text { -webkit-text-fill-color: white; }
.footer-brand p {
  font-size: .875rem;
  line-height: 1.7;
  color: #71717a;
  max-width: 260px;
}

.footer-links h4 {
  color: white;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 16px;
}

.footer-links a {
  display: block;
  color: #71717a;
  font-size: .875rem;
  margin-bottom: 10px;
  transition: color var(--t-fast) var(--ease);
}

.footer-links a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid #27272a;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p { font-size: .8rem; color: #52525b; }

/* =============================================
   TOOL PAGE LAYOUT
   ============================================= */
.page-hero {
  background: var(--grad-hero);
  padding: 40px 0 48px;
}

.page-hero .breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: rgba(255,255,255,.65);
  margin-bottom: 16px;
}
.page-hero .breadcrumb a { color: rgba(255,255,255,.8); }
.page-hero .breadcrumb a:hover { color: white; }
.page-hero .breadcrumb span { color: rgba(255,255,255,.4); }

.page-hero h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  font-weight: 900;
  color: white;
  letter-spacing: -1px;
  margin-bottom: 10px;
}

.page-hero p {
  color: rgba(255,255,255,.78);
  font-size: 1rem;
  max-width: 600px;
  line-height: 1.7;
}

.tool-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
  padding: 36px 0 60px;
}

/* Tool card surface */
.tool-surface {
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

/* Sidebar */
.sidebar { position: sticky; top: calc(var(--header-h) + 16px); }
.sidebar-ad .ad-box { min-height: 600px; border-radius: var(--r-lg); }

/* ── Upload zone ───────────────────────────── */
.upload-zone {
  border: 2px dashed var(--c-primary);
  border-radius: var(--r-lg);
  padding: 52px 24px;
  text-align: center;
  cursor: pointer;
  background: var(--c-primary-l);
  transition: all var(--t-base) var(--ease);
  margin-bottom: 28px;
}

.upload-zone:hover,
.upload-zone.over {
  background: #ddd8ff;
  border-color: var(--c-primary-d);
  transform: scale(1.005);
}

.upload-zone .uz-icon { font-size: 3rem; margin-bottom: 14px; opacity: .8; }
.upload-zone h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.upload-zone p { font-size: .85rem; color: var(--c-muted); }
input[type="file"] { display: none; }

/* ── Buttons ───────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--r-full);
  font-size: .925rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: all var(--t-fast) var(--ease);
  letter-spacing: .1px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-d));
  color: white;
  box-shadow: 0 4px 14px rgba(124,58,237,.3);
}
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(124,58,237,.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--c-bg);
  color: var(--c-text);
  border: 1.5px solid var(--c-border);
}
.btn-secondary:hover { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-l); }

.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  box-shadow: 0 4px 14px rgba(16,185,129,.25);
}
.btn-success:hover { transform: translateY(-1px); }

.btn-sm { padding: 8px 18px; font-size: .8rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }
.btn:disabled { opacity: .45; pointer-events: none; }

/* ── Forms ─────────────────────────────────── */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 7px;
  letter-spacing: .1px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  font-size: .9rem;
  font-family: var(--font);
  color: var(--c-text);
  background: white;
  outline: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-textarea { resize: vertical; }

/* Range */
input[type="range"] { width: 100%; accent-color: var(--c-primary); cursor: pointer; }

/* Checkbox / Radio */
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: .875rem;
  font-weight: 500;
}
.check-row input[type="checkbox"] {
  width: 17px; height: 17px;
  accent-color: var(--c-primary);
  cursor: pointer;
}

/* ── Presets ────────────────────────────────── */
.presets { display: flex; flex-wrap: wrap; gap: 8px; }

.preset-btn {
  padding: 5px 14px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--c-border);
  background: white;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--c-text);
  transition: all var(--t-fast) var(--ease);
}
.preset-btn:hover { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-l); }
.preset-btn.active { background: var(--c-primary); border-color: var(--c-primary); color: white; }

/* ── Preview area ───────────────────────────── */
.preview-area {
  background: var(--c-bg);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 20px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}
.preview-area img { max-width: 100%; max-height: 320px; border-radius: var(--r-sm); object-fit: contain; }

/* ── Result / info boxes ────────────────────── */
.result-box {
  border-radius: var(--r-md);
  padding: 16px 20px;
  margin-top: 20px;
  font-size: .9rem;
  font-weight: 600;
}
.result-box.success { background: #d1fae5; border: 1.5px solid #6ee7b7; color: #065f46; }
.result-box.error   { background: #fee2e2; border: 1.5px solid #fca5a5; color: #991b1b; }

/* ── Tabs ───────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--c-bg);
  border-radius: var(--r-md);
  padding: 4px;
  margin-bottom: 24px;
}

.tab-btn {
  flex: 1;
  padding: 8px 16px;
  border: none;
  background: transparent;
  border-radius: var(--r-sm);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--c-muted);
  transition: all var(--t-fast) var(--ease);
}
.tab-btn.active { background: white; color: var(--c-primary); box-shadow: var(--shadow-xs); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Progress ───────────────────────────────── */
.progress-bar { width: 100%; height: 7px; background: var(--c-border); border-radius: var(--r-full); overflow: hidden; }
.progress-fill { height: 100%; border-radius: var(--r-full); transition: width .3s var(--ease); }

/* ── Info cards below tool ──────────────────── */
.info-section { margin-top: 40px; }
.info-section > h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: 16px; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }

.info-card {
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 18px;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.info-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.info-card h3 { font-size: .9rem; font-weight: 700; margin-bottom: 6px; }
.info-card p  { font-size: .82rem; color: var(--c-muted); line-height: 1.6; }

/* ── FAQ ────────────────────────────────────── */
.faq { margin-top: 32px; }
.faq h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: 14px; }

details {
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  margin-bottom: 10px;
  padding: 16px 20px;
  transition: box-shadow var(--t-fast) var(--ease);
}
details[open] { box-shadow: var(--shadow-sm); border-color: var(--c-primary); }
details summary {
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
details summary::after { content: '+'; font-size: 1.2rem; color: var(--c-primary); transition: transform var(--t-fast) var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
details p { margin-top: 12px; font-size: .875rem; color: var(--c-muted); line-height: 1.7; }

/* ── Utility classes ────────────────────────── */
.hidden   { display: none !important; }
.text-center { text-align: center; }
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }
.mt-8  { margin-top: 32px; }
.flex  { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.fw-7  { font-weight: 700; }
.fs-sm { font-size: .875rem; }
.c-muted { color: var(--c-muted); }

/* Copy animation */
.copied { animation: flash .4s ease; }
@keyframes flash { 0%,100%{opacity:1} 50%{opacity:.4} }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .tool-layout  { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }

  .nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: white;
    padding: 16px;
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-md);
    z-index: 190;
    gap: 4px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 16px; border-radius: var(--r-sm); }
  .nav-toggle { display: flex; }

  .hero { padding: 52px 0 48px; }
  .hero-stats { gap: 20px; }
  .hero-stat-sep { display: none; }

  .tools-grid { grid-template-columns: 1fr 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .tool-surface { padding: 20px; }

  .category-nav { gap: 6px; }
  .cat-pill { padding: 6px 14px; font-size: .8rem; }
}

@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr; }
  .hero-stats { display: none; }
  .container { padding: 0 16px; }
}
