/* ============================================================
   FREETOOLVAULT — MASTER STYLESHEET v6
   Fresh design: slate + emerald accent, clean typography
   ============================================================ */

/* ── RESET & TOKENS ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

:root {
  /* Palette */
  --c-bg:        #f0f4f8;
  --c-surface:   #ffffff;
  --c-surface2:  #f8fafc;
  --c-border:    #e2e8f0;
  --c-text:      #0f172a;
  --c-text2:     #475569;
  --c-text3:     #94a3b8;

  /* Accent — emerald */
  --c-accent:    #059669;
  --c-accent-lt: #ecfdf5;
  --c-accent-dk: #047857;

  /* Primary — slate blue */
  --c-primary:   #1e3a5f;
  --c-primary-lt:#e8f0fe;
  --c-primary-dk:#162d4a;

  /* Functional */
  --c-success:   #10b981;
  --c-warn:      #f59e0b;
  --c-danger:    #ef4444;

  /* Typography */
  --font-body:   'Inter', 'DM Sans', system-ui, sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Mono', monospace;

  /* Spacing */
  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   16px;
  --radius-xl:   24px;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:      0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg:   0 10px 40px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.06);
}

.dark {
  --c-bg:        #0a0f1e;
  --c-surface:   #111827;
  --c-surface2:  #1a2234;
  --c-border:    #1e293b;
  --c-text:      #f1f5f9;
  --c-text2:     #94a3b8;
  --c-text3:     #64748b;
  --c-primary-lt:#1e3a5f;
  --c-accent-lt: #064e3b;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.3);
  --shadow:      0 4px 16px rgba(0,0,0,.3);
  --shadow-lg:   0 10px 40px rgba(0,0,0,.4);
}

/* ── BASE ───────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  transition: background .2s, color .2s;
  min-height: 100vh;
}

a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── HEADER ─────────────────────────────────────────────── */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--c-text);
  flex-shrink: 0;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--c-text);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  color: var(--c-text2);
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius);
  transition: all .15s;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--c-primary-lt);
  color: var(--c-primary);
}

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

.icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--c-text2);
  transition: all .15s;
}

.icon-btn:hover {
  background: var(--c-surface2);
  border-color: var(--c-accent);
}

.mobile-menu-btn { display: none; }

.mobile-nav {
  display: none;
  padding: 12px 20px;
  border-top: 1px solid var(--c-border);
  background: var(--c-surface);
}

.mobile-nav.open { display: flex; flex-direction: column; gap: 4px; }

.mobile-nav a {
  color: var(--c-text2);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background .15s;
}

.mobile-nav a:hover { background: var(--c-surface2); }

/* ── AD SLOTS ───────────────────────────────────────────── */
.ad-bar {
  background: var(--c-surface2);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0;
  min-height: 106px;
  overflow: hidden;
}

.ad-inline {
  display: flex;
  justify-content: center;
  margin: 28px 0;
}

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--c-primary), #1e5fa0);
  color: #fff;
  box-shadow: 0 2px 8px rgba(30,58,95,.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(30,58,95,.35);
  text-decoration: none;
  color: #fff;
}

.btn-accent {
  background: linear-gradient(135deg, var(--c-accent), #10b981);
  color: #fff;
  box-shadow: 0 2px 8px rgba(5,150,105,.25);
}
.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(5,150,105,.35);
  text-decoration: none;
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--c-primary);
  border: 2px solid var(--c-primary);
}
.btn-outline:hover {
  background: var(--c-primary-lt);
  text-decoration: none;
}

.btn-ghost {
  background: var(--c-surface2);
  color: var(--c-text2);
  border: 1px solid var(--c-border);
}
.btn-ghost:hover {
  background: var(--c-surface);
  border-color: var(--c-accent);
  color: var(--c-accent);
  text-decoration: none;
}

.btn-lg { padding: 14px 28px; font-size: 15px; border-radius: var(--radius-lg); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-full { width: 100%; }

/* ── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-pad { padding: 28px; }
.card-pad-sm { padding: 20px; }

/* ── FORM ELEMENTS ───────────────────────────────────────── */
input, select, textarea {
  background: var(--c-surface2);
  border: 1.5px solid var(--c-border);
  color: var(--c-text);
  border-radius: var(--radius);
  padding: 10px 13px;
  width: 100%;
  outline: none;
  font-family: var(--font-body);
  font-size: 14px;
  transition: border .15s, box-shadow .15s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(5,150,105,.15);
  background: var(--c-surface);
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text2);
  margin-bottom: 5px;
}

/* ── TOOL GRID ───────────────────────────────────────────── */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.tool-card {
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: all .18s;
  text-decoration: none;
  display: block;
  color: var(--c-text);
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--c-accent);
  background: var(--c-accent-lt);
  text-decoration: none;
  color: var(--c-text);
}

.tool-card .tc-icon { font-size: 30px; margin-bottom: 8px; }
.tool-card .tc-name { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.tool-card .tc-desc { font-size: 11px; color: var(--c-text3); line-height: 1.4; }

/* ── SECTION HEADERS ─────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--c-text);
}

.section-header a {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-accent);
}

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--c-primary) 0%, #1a5276 40%, var(--c-accent-dk) 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -40px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.hero p {
  font-size: 1.05rem;
  opacity: .88;
  max-width: 540px;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.hero-badge {
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.2);
}

.hero-search {
  max-width: 520px;
  position: relative;
  z-index: 1;
}

.hero-search input {
  background: rgba(255,255,255,.95);
  border: none;
  color: #0f172a;
  font-size: 15px;
  padding: 14px 50px 14px 18px;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}

.hero-search input:focus {
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  border-color: transparent;
}

.hero-search .search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

/* ── STATS BAR ───────────────────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.stat-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-card .stat-num {
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text3);
}

/* ── FAQ ─────────────────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 8px; }

details.faq-item {
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .15s;
}

details.faq-item[open] { border-color: var(--c-accent); }

details.faq-item summary {
  padding: 16px 20px;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--c-text);
  transition: background .15s;
}

details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary:hover { background: var(--c-surface2); }

details.faq-item summary::after {
  content: '+';
  font-size: 20px;
  font-weight: 300;
  color: var(--c-accent);
  flex-shrink: 0;
  transition: transform .2s;
}

details.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-answer {
  padding: 0 20px 18px;
  font-size: .92rem;
  line-height: 1.8;
  color: var(--c-text2);
}

/* ── ARTICLE CONTENT BOX ─────────────────────────────────── */
.article-box {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-top: 24px;
}

.article-box h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--c-text);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--c-accent-lt);
}

.article-box h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-text);
  margin: 18px 0 8px;
}

.article-box p {
  font-size: .93rem;
  line-height: 1.8;
  color: var(--c-text2);
  margin-bottom: 10px;
}

.article-box ul, .article-box ol {
  margin: 8px 0 12px 22px;
}

.article-box li {
  font-size: .93rem;
  line-height: 1.75;
  color: var(--c-text2);
  margin-bottom: 5px;
}

/* ── TOOL PANEL (SPA) ────────────────────────────────────── */
.tool-panel { display: none; }
.tool-panel.active {
  display: block;
  animation: fadeIn .2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

#static-home { display: block; }

/* ── DROP ZONE ───────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--c-border);
  border-radius: var(--radius-lg);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .18s;
  background: var(--c-surface2);
}

.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--c-accent);
  background: var(--c-accent-lt);
}

.drop-zone .dz-icon { font-size: 44px; margin-bottom: 12px; }
.drop-zone .dz-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.drop-zone .dz-sub { font-size: 13px; color: var(--c-text3); }

/* ── PROGRESS ────────────────────────────────────────────── */
.progress-wrap { margin: 12px 0; }
.progress-bar {
  height: 8px;
  background: var(--c-border);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
  border-radius: 4px;
  transition: width .3s;
}
.progress-label {
  font-size: 12px;
  color: var(--c-text3);
  margin-top: 4px;
}

/* ── RESULT BOX ──────────────────────────────────────────── */
.result-box {
  background: var(--c-accent-lt);
  border: 1.5px solid rgba(5,150,105,.25);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  margin-top: 16px;
}

.result-box .result-num {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--c-accent);
  margin-bottom: 4px;
}

.result-box .result-sub {
  font-size: 13px;
  color: var(--c-text2);
  margin-bottom: 14px;
}

/* ── SEL BUTTONS ─────────────────────────────────────────── */
.sel-btn {
  background: var(--c-surface2);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--c-text2);
  transition: all .15s;
}

.sel-btn.active, .sel-btn:hover {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}

/* ── TOAST ───────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-item {
  background: var(--c-primary);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s ease;
}

.toast-item.success { background: var(--c-accent); }
.toast-item.error   { background: var(--c-danger); }

@keyframes toastIn {
  from { transform: translateX(120px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ── SPINNER ─────────────────────────────────────────────── */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── STRENGTH BARS ───────────────────────────────────────── */
.strength-bars { display: flex; gap: 4px; }
.strength-bar {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: var(--c-border);
  transition: background .3s;
}

/* ── COLOR SWATCHES ──────────────────────────────────────── */
.color-swatch {
  width: 34px; height: 34px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 3px solid transparent;
  transition: all .15s;
  flex-shrink: 0;
}
.color-swatch:hover, .color-swatch.active {
  border-color: var(--c-primary);
  transform: scale(1.12);
}

/* ── PAGE LAYOUT ─────────────────────────────────────────── */
.page-wrap {
  display: flex;
  gap: 28px;
  padding: 28px 0 60px;
}

.main-content { flex: 1; min-width: 0; }

.sidebar {
  width: 280px;
  flex-shrink: 0;
}

/* ── PROSE (guides/articles) ─────────────────────────────── */
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 900; margin-bottom: 12px; }
.prose h2 { font-size: 1.3rem; font-weight: 800; margin: 32px 0 12px; padding-top: 8px; border-top: 2px solid var(--c-border); }
.prose h3 { font-size: 1.05rem; font-weight: 700; margin: 22px 0 8px; color: var(--c-primary); }
.prose p  { color: var(--c-text2); font-size: .97rem; line-height: 1.85; margin-bottom: 14px; }
.prose ul, .prose ol { margin: 8px 0 16px 22px; }
.prose li { color: var(--c-text2); font-size: .97rem; line-height: 1.8; margin-bottom: 6px; }
.prose strong { color: var(--c-text); font-weight: 700; }
.prose code { background: var(--c-surface2); padding: 2px 7px; border-radius: 4px; font-size: .87rem; font-family: var(--font-mono); color: var(--c-accent); }
.prose a { color: var(--c-accent); }
.prose blockquote { border-left: 3px solid var(--c-accent); padding-left: 16px; margin: 16px 0; color: var(--c-text2); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .92rem; }
.prose th { background: var(--c-primary); color: #fff; padding: 10px 14px; text-align: left; font-weight: 700; }
.prose td { padding: 10px 14px; border-bottom: 1px solid var(--c-border); color: var(--c-text2); }
.prose tr:nth-child(even) td { background: var(--c-surface2); }

/* ── GUIDE CARDS ─────────────────────────────────────────── */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.guide-card {
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all .18s;
  text-decoration: none;
  color: var(--c-text);
  display: block;
}

.guide-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--c-accent);
  text-decoration: none;
  color: var(--c-text);
}

.guide-card .gc-cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-accent);
  margin-bottom: 8px;
}

.guide-card h3 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.35;
}

.guide-card p {
  font-size: 13px;
  color: var(--c-text2);
  line-height: 1.6;
}

.guide-card .gc-meta {
  font-size: 12px;
  color: var(--c-text3);
  margin-top: 12px;
}

/* ── BREADCRUMB ──────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--c-text3);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--c-accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--c-text3); }

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  background: var(--c-primary);
  color: rgba(255,255,255,.7);
  margin-top: 60px;
}

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

.footer-brand .logo { color: #fff; margin-bottom: 14px; }
.footer-brand .logo-text { color: #fff; }
.footer-brand p { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,.65); margin-bottom: 10px; }
.footer-email a { color: rgba(255,255,255,.8); font-size: 13px; }
.footer-email a:hover { color: #fff; }

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  font-size: 13px;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  transition: color .15s;
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  flex-wrap: wrap;
}

.footer-bottom p { font-size: 12px; color: rgba(255,255,255,.5); }

.footer-legal-links {
  display: flex;
  gap: 16px;
}

.footer-legal-links a {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: color .15s;
}

.footer-legal-links a:hover { color: #fff; }

/* ── UTILITY ─────────────────────────────────────────────── */
.text-accent  { color: var(--c-accent); }
.text-primary { color: var(--c-primary); }
.text-muted   { color: var(--c-text2); }
.text-faint   { color: var(--c-text3); }
.font-bold    { font-weight: 700; }
.font-black   { font-weight: 900; }
.text-sm      { font-size: 13px; }
.text-xs      { font-size: 12px; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.flex  { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-4  { gap: 4px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

#hiddenCanvas { display: none; }

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

@media (max-width: 768px) {
  .hero { padding: 36px 24px; }
  .main-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .page-wrap { padding: 20px 0 40px; }
  .guide-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.6rem; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .container { padding: 0 14px; }
}

/* ── NAV DROPDOWN (Tools menu) ───────────────────────────── */
.nav-dropdown { position: relative; }

.nav-dropdown-btn {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text2);
  cursor: pointer;
  padding: 6px 14px;
  border-radius: var(--radius);
  transition: all .15s;
}
.nav-dropdown-btn:hover { background: var(--c-primary-lt); color: var(--c-primary); }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  gap: 24px;
  z-index: 200;
  min-width: 680px;
  grid-template-columns: repeat(4, 1fr);
}
.nav-dropdown-menu.open { display: grid; }

.ndm-col { display: flex; flex-direction: column; gap: 2px; }
.ndm-head {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--c-text3);
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--c-border);
}
.ndm-col a {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text2);
  text-decoration: none;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  transition: all .12s;
}
.ndm-col a:hover { background: var(--c-accent-lt); color: var(--c-accent); text-decoration: none; }

@media (max-width: 1024px) { .nav-dropdown { display: none; } }

/* ── SIDEBAR TOOL BUTTONS ─────────────────────────────────── */
.sidebar-tools {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-tool-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text2);
  font-family: var(--font-body);
  transition: background .14s, color .14s;
  line-height: 1.4;
}

.sidebar-tool-btn:hover {
  background: var(--c-accent-lt);
  color: var(--c-accent);
}

/* ── POPULAR TOOLS SIDEBAR LINKS ──────────────────────────── */
.pop-tool-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text2);
  text-decoration: none;
  transition: background .14s, color .14s;
}

.pop-tool-link:hover {
  background: var(--c-accent-lt);
  color: var(--c-accent);
  text-decoration: none;
}

.pop-tool-link .ptl-icon {
  width: 28px;
  height: 28px;
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: background .14px;
}

.pop-tool-link:hover .ptl-icon {
  background: var(--c-accent-lt);
  border-color: var(--c-accent);
}
