/* ==========================================================================
   Design Tokens
   ========================================================================== */
:root {
  /* Brand gradient */
  --accent-1: #c41818;
  --accent-2: #18181b;
  --accent-gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));

  /* Light theme (default) */
  --bg: #fafafa;
  --bg-alt: #f2f1f7;
  --surface: #ffffff;
  --surface-hover: #f7f6fc;
  --border: #e7e5f0;
  --text: #18181f;
  --text-muted: #63636f;
  --text-faint: #9494a1;

  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;

  --shadow-sm: 0 1px 2px rgba(24, 24, 31, 0.05);
  --shadow-md: 0 4px 16px rgba(24, 24, 31, 0.06);
  --shadow-lg: 0 12px 32px rgba(24, 24, 31, 0.1);
  --shadow-accent: 0 8px 24px rgba(196, 24, 24, 0.2);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;

  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --header-h: 68px;
  --max-w: 1200px;
}

[data-theme="dark"] {
  --bg: #0d0d12;
  --bg-alt: #131318;
  --surface: #17171e;
  --surface-hover: #1d1d26;
  --border: #26262f;
  --text: #f2f2f5;
  --text-muted: #a3a3af;
  --text-faint: #6b6b76;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-accent: 0 8px 28px rgba(196, 24, 24, 0.38);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0d12;
    --bg-alt: #131318;
    --surface: #17171e;
    --surface-hover: #1d1d26;
    --border: #26262f;
    --text: #f2f2f5;
    --text-muted: #a3a3af;
    --text-faint: #6b6b76;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
    --shadow-accent: 0 8px 28px rgba(196, 24, 24, 0.38);
  }
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }

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

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: var(--shadow-accent);
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.nav-links a:hover { background: var(--surface-hover); color: var(--text); }

.header-search {
  flex: 1;
  max-width: 380px;
  margin-left: auto;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.header-search input:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 18%, transparent);
}

.header-search svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-faint);
  pointer-events: none;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: 1px solid var(--border);
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.icon-btn:hover { background: var(--surface-hover); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .icon-moon { display: none; }
[data-theme="dark"] .icon-btn .icon-sun { display: none; }
[data-theme="dark"] .icon-btn .icon-moon { display: block; }

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

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: 64px 24px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--accent-1) 16%, transparent), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1;
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.hero h1 {
  margin-top: 20px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}

.hero h1 .gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 16px auto 0;
  max-width: 560px;
  color: var(--text-muted);
  font-size: 1.05rem;
  position: relative;
  z-index: 1;
}

.hero-search {
  max-width: 560px;
  margin: 32px auto 0;
  position: relative;
  z-index: 1;
}

.hero-search input {
  width: 100%;
  padding: 16px 20px 16px 50px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 1rem;
  outline: none;
  box-shadow: var(--shadow-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hero-search input:focus {
  border-color: var(--accent-2);
  box-shadow: var(--shadow-lg), 0 0 0 4px color-mix(in srgb, var(--accent-2) 15%, transparent);
}

.hero-search svg {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-faint);
}

.hero-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 360px;
  overflow-y: auto;
  text-align: left;
  display: none;
  z-index: 20;
}

.hero-search-results.active { display: block; }

.hero-search-results a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.hero-search-results a:last-child { border-bottom: none; }
.hero-search-results a:hover { background: var(--surface-hover); }

.hero-search-results .tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.hero-search-empty {
  padding: 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.hero-stats .stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-stats .stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==========================================================================
   Section headings
   ========================================================================== */
.section {
  padding: 40px 24px;
}

.section-head {
  max-width: var(--max-w);
  margin: 0 auto 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.section-head h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-head .view-all {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-1);
  flex-shrink: 0;
}

/* ==========================================================================
   Category cards (homepage)
   ========================================================================== */
.category-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
  overflow: hidden;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--accent-2) 40%, var(--border));
}

.category-card .cat-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: var(--cat-bg, color-mix(in srgb, var(--accent-1) 12%, transparent));
  color: var(--cat-color, var(--accent-1));
}

.category-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.category-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex: 1;
}

.category-card .cat-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 6px;
}

.category-card .cat-count::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-gradient);
}

/* Category color variants */
.category-card.c-text   { --cat-color: #7c3aed; --cat-bg: rgba(124,58,237,0.12); }
.category-card.c-seo    { --cat-color: #059669; --cat-bg: rgba(5,150,105,0.12); }
.category-card.c-css    { --cat-color: #db2777; --cat-bg: rgba(219,39,119,0.12); }
.category-card.c-code   { --cat-color: #2563eb; --cat-bg: rgba(37,99,235,0.12); }
.category-card.c-social { --cat-color: #f59e0b; --cat-bg: rgba(245,158,11,0.12); }

/* ==========================================================================
   Tool cards (category / search grid)
   ========================================================================== */
.tool-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent-2) 35%, var(--border));
}

.tool-card .tool-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.tool-card h4 {
  font-size: 0.94rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.tool-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.tool-card .badge-new {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #fff;
  background: var(--accent-gradient);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Category hub header (category index pages)
   ========================================================================== */
.category-hero {
  padding: 44px 24px 32px;
  text-align: center;
}

.category-hero .cat-icon-lg {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: var(--cat-bg, color-mix(in srgb, var(--accent-1) 12%, transparent));
  color: var(--cat-color, var(--accent-1));
}

.category-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.category-hero p {
  margin: 10px auto 0;
  max-width: 520px;
  color: var(--text-muted);
}

.breadcrumb {
  max-width: var(--max-w);
  margin: 16px auto 0;
  padding: 0 24px;
  font-size: 0.82rem;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb a { color: var(--text-muted); font-weight: 600; }
.breadcrumb a:hover { color: var(--accent-1); }
.breadcrumb .current { color: var(--text); font-weight: 600; }

/* ==========================================================================
   Tool page
   ========================================================================== */
.tool-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 24px 64px;
  flex: 1;
  width: 100%;
}

.tool-page-head {
  margin-bottom: 24px;
}

.tool-page-head .tool-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--cat-color, var(--accent-1));
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.tool-page-head h1 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tool-page-head p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.98rem;
  max-width: 620px;
}

.tool-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.field-group {
  margin-bottom: 18px;
}

.field-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.field-group .hint {
  font-size: 0.78rem;
  color: var(--text-faint);
  font-weight: 500;
  margin-left: 6px;
}

.field-group input[type="text"],
.field-group input[type="number"],
.field-group input[type="url"],
.field-group input[type="password"],
.field-group select,
.field-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: var(--font-sans);
}

.field-group textarea {
  min-height: 140px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.5;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 15%, transparent);
}

.field-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.field-row .field-group { flex: 1; min-width: 140px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover { transform: translateY(-1px); opacity: 0.95; }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--surface-hover); }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

.result-box {
  margin-top: 20px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-break: break-word;
  display: none;
}

.result-box.active { display: block; }
.result-box.result-success { border-color: color-mix(in srgb, var(--success) 40%, var(--border)); }
.result-box.result-error { border-color: color-mix(in srgb, var(--error) 40%, var(--border)); color: var(--error); }

.stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.stat-chip {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  min-width: 90px;
  text-align: center;
}

.stat-chip .num {
  font-size: 1.2rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-chip .label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

.tool-info {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.tool-info h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.tool-info h3 {
  font-size: 0.98rem;
  font-weight: 800;
  margin: 20px 0 8px;
}

.tool-info p, .tool-info li {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.tool-info p + p { margin-top: 10px; }

.tool-info ul { padding-left: 20px; margin-top: 8px; }

.tool-info .faq-list { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.tool-info .faq-list-heading { font-size: 1.15rem; font-weight: 800; margin-bottom: 14px; }

.related-tools {
  margin-top: 28px;
}

.related-tools h2 { font-size: 1.05rem; font-weight: 800; margin-bottom: 12px; }

.related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.related-list a {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.84rem;
  font-weight: 600;
}

.related-list a:hover { border-color: var(--accent-2); color: var(--accent-1); }

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-list {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 4px 20px;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 0;
  font-weight: 700;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.faq-item[open] summary::after { content: "\2212"; transform: rotate(180deg); }

.faq-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  padding-bottom: 18px;
  margin-top: -6px;
}

.tool-info .faq-list { margin-top: 8px; }
.tool-info .faq-item summary { font-size: 0.92rem; }

/* copy button micro-state */
.copy-btn.copied { background: var(--success); color: #fff; }

/* ==========================================================================
   SEO / long-form content blocks (homepage + category hubs)
   ========================================================================== */
.seo-content {
  max-width: 760px;
  margin: 0 auto;
}

.seo-content h2 {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.seo-content h3 {
  font-size: 1.02rem;
  font-weight: 800;
  margin: 22px 0 8px;
}

.seo-content p, .seo-content li {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.seo-content p + p { margin-top: 12px; }

.seo-content ul {
  padding-left: 20px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ==========================================================================
   Static content pages (about / contact / privacy / terms)
   ========================================================================== */
.static-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 24px 72px;
  flex: 1;
  width: 100%;
}

.static-page h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.static-page .static-updated {
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-bottom: 28px;
}

.static-page section {
  margin-top: 28px;
}

.static-page h2 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.static-page p, .static-page li {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.static-page p + p { margin-top: 12px; }

.static-page ul { padding-left: 20px; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }

.static-page a { color: var(--accent-1); font-weight: 600; }

.static-page .contact-card {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 14px;
}

.static-page .contact-card .contact-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent-1) 12%, transparent);
  color: var(--accent-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.static-page .contact-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
}

.static-page .contact-card p {
  font-size: 0.88rem;
  margin-top: 2px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 40px 24px 24px;
}

.footer-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 24px;
}

.footer-col h5 {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  font-size: 0.86rem;
  color: var(--text-muted);
  padding: 5px 0;
  font-weight: 600;
}

.footer-col a:hover { color: var(--accent-1); }

.footer-bottom {
  max-width: var(--max-w);
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 24px 16px;
    gap: 4px;
    box-shadow: var(--shadow-md);
    z-index: 99;
  }
  .nav-links.active {
    display: flex;
  }
  .nav-links a {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
  }
  .header-search { max-width: none; }
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
  }
  .hero { padding: 44px 20px 36px; }
  .hero-stats { gap: 24px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-widget { padding: 20px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .category-grid, .tool-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ==========================================================================
   Cookie Consent Banner
   ========================================================================== */
.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 18px 24px;
}
.consent-banner[hidden] { display: none; }
.consent-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.consent-banner-text strong { display: block; font-size: 0.95rem; margin-bottom: 4px; }
.consent-banner-text p { font-size: 0.85rem; color: var(--text-muted); margin: 0; max-width: 640px; }
.consent-banner-text a { color: var(--accent-1); text-decoration: underline; }
.consent-banner-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.consent-panel {
  max-width: 1200px;
  margin: 16px auto 0;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.consent-panel[hidden] { display: none; }
.consent-panel-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.consent-panel-row:last-of-type { border-bottom: none; }
.consent-panel-row strong { font-size: 0.88rem; }
.consent-panel-row p { font-size: 0.8rem; color: var(--text-muted); margin: 2px 0 0; }
.consent-panel-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--accent-1);
  flex-shrink: 0;
}
.consent-panel-actions { margin-top: 12px; display: flex; justify-content: flex-end; }
.footer-cookie-settings {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-muted);
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .consent-banner-inner { flex-direction: column; align-items: flex-start; }
  .consent-banner-actions { width: 100%; }
  .consent-banner-actions .btn { flex: 1; }
}
