:root {
  --bg: #0b0e14;
  --bg-2: #0f131b;
  --panel: #111827;
  --panel-2: #0d1320;
  --border: #1f2937;
  --border-soft: #172033;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --muted-2: #6b7280;
  --accent: #10b981;
  --accent-2: #34d399;
  --accent-dim: #064e3b;
  --danger: #f87171;
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; color: #f3f4f6; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Header + nav */
header.site {
  border-bottom: 1px solid var(--border);
  background: #07090d;
  position: sticky; top: 0; z-index: 50;
}
.navbar { display: flex; justify-content: space-between; align-items: center; height: 60px; }
.brand { font-weight: 900; letter-spacing: 1px; font-size: 20px; color: var(--accent-2); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand span { color: #fff; font-weight: 300; }
.brand svg { width: 22px; height: 22px; flex: none; }
.nav-links { display: flex; flex-wrap: wrap; }
.nav-links a { color: var(--muted); font-size: 14px; margin-left: 20px; }
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-links a.active { color: var(--accent-2); }
@media (max-width: 600px) { .nav-links a { margin-left: 12px; font-size: 13px; } .brand { font-size: 16px; } }

/* Ad slots */
.ad {
  border: 1px dashed var(--border); background: rgba(13,19,32,0.4);
  border-radius: 12px; text-align: center; color: var(--muted-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin: 24px 0;
}
.ad .label { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: #4b5563; margin-bottom: 4px; }
.ad .body { font-size: 12px; font-style: italic; }
.ad-leaderboard { min-height: 90px; }
.ad-inline { min-height: 120px; }
.ad-sidebar { min-height: 600px; position: sticky; top: 80px; margin: 0; }

/* Hero */
.hero { padding: 48px 0 8px; text-align: center; }
.hero h1 { font-size: 40px; margin: 0 0 12px; letter-spacing: -0.5px; }
.hero h1 .accent { color: var(--accent-2); }
.hero p.sub { font-size: 18px; color: var(--muted); max-width: 640px; margin: 0 auto; }
@media (max-width: 560px) { .hero h1 { font-size: 30px; } .hero p.sub { font-size: 16px; } }

/* Layout grid (tool pages: content + sidebar) */
.layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; padding: 24px 0 48px; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } .ad-sidebar { position: static; min-height: 250px; } }

/* Breadcrumb */
.breadcrumb { font-size: 13px; color: var(--muted-2); padding: 18px 0 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: #fff; text-decoration: none; }
.breadcrumb span { color: var(--muted-2); margin: 0 6px; }

/* ===== Hub home: category + tool grids ===== */
.section-head { margin: 40px 0 18px; }
.section-head h2 { font-size: 24px; margin: 0 0 4px; }
.section-head p { color: var(--muted); margin: 0; font-size: 15px; }

.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 820px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cat-grid { grid-template-columns: 1fr; } }
.cat-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 14px; padding: 20px; transition: border-color .15s, transform .15s; }
.cat-card:hover { border-color: rgba(16,185,129,0.4); transform: translateY(-2px); text-decoration: none; }
.cat-card .ico { font-size: 24px; margin-bottom: 10px; display: block; }
.cat-card h3 { margin: 0 0 6px; font-size: 17px; color: var(--accent-2); }
.cat-card p { margin: 0; font-size: 13px; color: var(--muted); }
.cat-card .count { font-size: 12px; color: var(--muted-2); margin-top: 10px; display: block; }

.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 820px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tool-grid { grid-template-columns: 1fr; } }
.tool-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; transition: border-color .15s, transform .15s; display: block; }
.tool-card:hover { border-color: rgba(16,185,129,0.4); transform: translateY(-2px); text-decoration: none; }
.tool-card h3 { margin: 0 0 4px; font-size: 15px; color: #f3f4f6; }
.tool-card p { margin: 0; font-size: 13px; color: var(--muted); }
.tool-card .cat-tag { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--accent-2); }

/* ===== Tool page: the interactive card ===== */
.tool { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-top: 8px; }
.tool h1 { font-size: 28px; margin: 0 0 8px; letter-spacing: -0.4px; }
.tool h1 .accent { color: var(--accent-2); }
.tool > p.lead { color: var(--muted); margin: 0 0 20px; font-size: 15px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%; background: #0a0f18; border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 12px; color: #fff; font-size: 15px; font-family: var(--font);
}
.field textarea { min-height: 180px; resize: vertical; line-height: 1.6; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(16,185,129,0.25); }
.tool-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 18px; }
.btn { background: var(--accent-dim); border: 1px solid rgba(16,185,129,0.4); color: var(--accent-2); font-weight: 600; font-size: 13px; padding: 9px 16px; border-radius: 10px; cursor: pointer; font-family: var(--font); }
.btn:hover { background: rgba(16,185,129,0.18); }
.btn.ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.btn.ghost:hover { color: #fff; border-color: var(--muted-2); }
.out-mono { width: 100%; background: #090d15; border: 1px solid var(--border); border-radius: 12px; padding: 12px; color: #d1fae5; font-family: var(--mono); font-size: 14px; min-height: 60px; white-space: pre-wrap; word-break: break-word; }

/* Result stat cards (shared with tools that report numbers) */
.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 4px 0 8px; }
@media (max-width: 520px) { .results { grid-template-columns: repeat(2, 1fr); } }
.stat { background: #090d15; border: 1px solid var(--border); border-radius: 14px; padding: 16px; text-align: center; }
.stat.primary { border-color: rgba(16,185,129,0.35); box-shadow: inset 0 0 0 1px rgba(16,185,129,0.08); }
.stat .k { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.stat.primary .k { color: var(--accent-2); font-weight: 600; }
.stat .v { font-size: 26px; font-weight: 900; color: #fff; margin: 4px 0 2px; }
.stat.primary .v { color: var(--accent-2); }
.stat .s { font-size: 10px; color: var(--muted-2); }

/* Article content */
article.content { max-width: 760px; }
article.content section { margin: 40px 0; }
article.content h2 { font-size: 26px; margin: 0 0 14px; }
article.content h3 { font-size: 18px; margin: 24px 0 8px; }
article.content p { color: #cbd5e1; margin: 0 0 14px; }
article.content ul, article.content ol { color: #cbd5e1; padding-left: 20px; }
article.content li { margin-bottom: 8px; }
.callout { background: var(--panel-2); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 12px; padding: 16px 18px; margin: 20px 0; }
.callout strong { color: var(--accent-2); }

/* FAQ */
details.faq { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; padding: 4px 16px; }
details.faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: #e5e7eb; list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; float: right; color: var(--accent-2); font-size: 20px; line-height: 1; }
details.faq[open] summary::after { content: "\2212"; }
details.faq p { color: var(--muted); padding-bottom: 12px; margin: 0; }

/* Disclaimer + footer */
.disclaimer { font-size: 12px; color: var(--muted-2); border-top: 1px solid var(--border); padding-top: 20px; margin-top: 40px; }
footer.site { border-top: 1px solid var(--border); background: #07090d; padding: 28px 0; margin-top: 40px; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--muted); }
.foot a { color: var(--muted); margin-right: 16px; }
.foot .cols { display: flex; flex-wrap: wrap; gap: 8px 0; }
