/* ================================================================
   WP TOOLS — COMPLETE DESIGN SYSTEM
   tools.naqeebulrehman.com
   ================================================================ */

:root {
  --bg:            #F8FAFC;
  --surface:       #FFFFFF;
  --surface-2:     #F1F5F9;
  --dark:          #0F172A;
  --dark-2:        #1E293B;
  --dark-3:        #334155;
  --accent:        #059669;
  --accent-light:  rgba(5,150,105,0.09);
  --accent-mid:    rgba(5,150,105,0.2);
  --text:          #0F172A;
  --text-muted:    #475569;
  --text-dim:      #94A3B8;
  --border:        #E2E8F0;
  --border-soft:   #F1F5F9;
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.06);
  --shadow:        0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:     0 8px 32px rgba(0,0,0,0.12);
  --radius:        10px;
  --radius-lg:     14px;
  --radius-sm:     6px;
  --ff-sans:       'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ff-mono:       'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  --ff-display:    'Syne', 'Inter', sans-serif;
  /* type badges */
  --action:        #2563EB;
  --action-bg:     rgba(37,99,235,0.08);
  --filter-c:      #7C3AED;
  --filter-bg:     rgba(124,58,237,0.08);
  --woo:           #96588A;
  --woo-bg:        rgba(150,88,138,0.08);
  /* syntax highlight */
  --syn-kw:        #569CD6;
  --syn-fn:        #DCDCAA;
  --syn-str:       #CE9178;
  --syn-cmt:       #6A9955;
  --syn-var:       #9CDCFE;
  --syn-hook:      #4EC9B0;
  --syn-num:       #B5CEA8;
  --syn-punct:     #D4D4D4;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ff-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button { font-family: var(--ff-sans); cursor: pointer; }
input, select, textarea { font-family: var(--ff-sans); }
img { max-width: 100%; display: block; }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
code, pre, .mono { font-family: var(--ff-mono); }

/* ── LAYOUT ── */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-sm {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── HEADER / NAV ── */
#nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--dark);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  height: 62px;
  display: flex;
  align-items: center;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
}
.nav-logo {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.nav-logo .dot { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0 1.5rem;
}
.nav-links a {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  padding: 0.38rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.07); }
.nav-links a.active { color: var(--accent); background: rgba(5,150,105,0.1); }
.nav-portfolio-link {
  font-size: 0.76rem;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.8rem;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.nav-portfolio-link:hover { color: #fff; border-color: rgba(255,255,255,0.3); }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: rgba(255,255,255,0.65);
  border-radius: 2px;
  transition: 0.22s;
}
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--dark-2);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0.75rem 1.5rem 1rem;
  gap: 0.1rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a.active { color: var(--accent); }

/* ── HERO (HOMEPAGE) ── */
.tools-hero {
  background: linear-gradient(145deg, var(--dark) 0%, #0d1f3c 100%);
  padding: 5rem 0 4.5rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
}
.tools-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 50% -10%, rgba(5,150,105,0.14) 0%, transparent 65%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.4rem;
  background: rgba(5,150,105,0.1);
  border: 1px solid rgba(5,150,105,0.22);
  border-radius: 999px;
  padding: 0.3rem 1.1rem;
}
.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.tools-hero h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  color: #F8FAFC;
  margin-bottom: 1.1rem;
}
.tools-hero h1 .hl { color: var(--accent); }
.tools-hero > .container > p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.5);
  max-width: 560px;
  margin: 0 auto 2.75rem;
  line-height: 1.75;
}
.hero-stats-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.hero-stat-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
}
.hero-stat-chip strong { color: rgba(255,255,255,0.8); font-weight: 600; }

/* ── SECTION HEADER ── */
.section-eyebrow {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-eyebrow::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: var(--text);
  margin-bottom: 0.6rem;
}
.section-desc {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.72;
}

/* ── TOOL CARDS (HOMEPAGE) ── */
.tools-grid-section {
  padding: 4.5rem 0 5rem;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}
.tool-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(5,150,105,0.03) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.tool-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(5,150,105,0.12), var(--shadow);
  transform: translateY(-3px);
}
.tool-card:hover::after { opacity: 1; }
.tool-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  background: var(--accent-light);
  border: 1px solid var(--accent-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}
.tool-card-label {
  font-family: var(--ff-mono);
  font-size: 0.62rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.tool-card-title {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.tool-card-desc {
  font-size: 0.855rem;
  color: var(--text-muted);
  line-height: 1.72;
  flex: 1;
}
.tool-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.tool-tag {
  font-family: var(--ff-mono);
  font-size: 0.61rem;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.13rem 0.5rem;
}
.tool-card-cta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.25rem;
  transition: gap 0.15s;
}
.tool-card:hover .tool-card-cta { gap: 0.55rem; }

/* ── TOOL PAGE HERO ── */
.tool-page-hero {
  background: var(--dark);
  padding: 2.25rem 0 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.tool-page-hero .eyebrow {
  font-family: var(--ff-mono);
  font-size: 0.63rem;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tool-page-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  color: #F8FAFC;
  margin-bottom: 0.6rem;
}
.tool-page-hero p {
  font-size: 0.93rem;
  color: rgba(255,255,255,0.48);
  max-width: 580px;
  line-height: 1.7;
}

/* ── TWO-COLUMN TOOL LAYOUT ── */
.tool-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1.75rem;
  padding: 2rem 0 4.5rem;
  align-items: start;
}
.tool-layout-full { padding: 2rem 0 4.5rem; }

/* ── FORM PANEL ── */
.form-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: sticky;
  top: 78px;
  box-shadow: var(--shadow-sm);
}
.form-panel-header {
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.form-panel-title {
  font-family: var(--ff-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.form-panel-icon { font-size: 1rem; }

/* Accordion */
.accordion { border-bottom: 1px solid var(--border); }
.accordion:last-child { border-bottom: none; }
.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.4rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.accordion-header:hover { background: var(--surface-2); }
.accordion-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.accordion-icon { font-size: 0.9rem; }
.accordion-chevron {
  font-size: 0.65rem;
  color: var(--text-dim);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.accordion.open .accordion-chevron { transform: rotate(180deg); }
.accordion-body { display: none; padding: 0.5rem 1.4rem 1.2rem; }
.accordion.open .accordion-body { display: block; }

/* Form elements */
.form-group { margin-bottom: 0.9rem; }
.form-group:last-child { margin-bottom: 0; }
.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.32rem;
}
.form-label .hint {
  font-weight: 400;
  color: var(--text-dim);
  font-size: 0.7rem;
  margin-left: 0.3rem;
}
.form-input, .form-select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.8rem;
  font-size: 0.82rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(5,150,105,0.1);
}
.form-input.mono { font-family: var(--ff-mono); font-size: 0.78rem; }
.form-select-wrap { position: relative; }
.form-select-wrap::after {
  content: '▾';
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
  font-size: 0.7rem;
}

/* Toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0;
  gap: 1rem;
}
.toggle-info { flex: 1; }
.toggle-label {
  font-size: 0.79rem;
  font-weight: 500;
  color: var(--text);
  font-family: var(--ff-mono);
  display: block;
}
.toggle-desc {
  font-size: 0.71rem;
  color: var(--text-dim);
  margin-top: 0.1rem;
  line-height: 1.5;
}
.toggle {
  position: relative;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-track::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.toggle input:checked + .toggle-track { background: var(--accent); }
.toggle input:checked + .toggle-track::after { transform: translateX(16px); }

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: 0.7rem 1rem;
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); background: var(--surface); }
.tab-btn:hover:not(.active) { color: var(--text-muted); }
.tab-content { display: none; padding: 1.2rem 1.4rem; }
.tab-content.active { display: block; }

/* Check items */
.check-group { display: flex; flex-direction: column; gap: 0.45rem; }
.check-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-muted);
  user-select: none;
}
.check-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}

/* ── CODE OUTPUT PANEL ── */
.output-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  gap: 0.75rem;
  flex-wrap: wrap;
}
.output-title {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.lang-badge {
  background: var(--dark);
  color: rgba(255,255,255,0.55);
  border-radius: 4px;
  padding: 0.1rem 0.5rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.output-actions { display: flex; align-items: center; gap: 0.5rem; }
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.75rem;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn.copied { color: var(--accent); background: var(--accent-light); border-color: var(--accent); }
.code-block {
  background: #1E1E1E;
  padding: 1.4rem 1.5rem;
  overflow-x: auto;
  max-height: 650px;
  overflow-y: auto;
}
.code-block::-webkit-scrollbar { width: 6px; height: 6px; }
.code-block::-webkit-scrollbar-track { background: #1E1E1E; }
.code-block::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }
.code-block pre {
  font-family: var(--ff-mono);
  font-size: 0.82rem;
  line-height: 1.72;
  color: var(--syn-punct);
  white-space: pre;
  margin: 0;
  tab-size: 4;
}
/* Syntax tokens */
.s-kw   { color: #569CD6; }
.s-fn   { color: #DCDCAA; }
.s-str  { color: #CE9178; }
.s-cmt  { color: #6A9955; font-style: italic; }
.s-var  { color: #9CDCFE; }
.s-hook { color: #4EC9B0; font-weight: 600; }
.s-num  { color: #B5CEA8; }
.s-bool { color: #569CD6; }
.s-arr  { color: #D4D4D4; }

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.62rem;
  font-weight: 700;
  font-family: var(--ff-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 0.16rem 0.58rem;
  white-space: nowrap;
}
.badge-action  { color: var(--action); background: var(--action-bg); border: 1px solid rgba(37,99,235,0.2); }
.badge-filter  { color: var(--filter-c); background: var(--filter-bg); border: 1px solid rgba(124,58,237,0.2); }
.badge-core    { color: #0369A1; background: rgba(3,105,161,0.08); border: 1px solid rgba(3,105,161,0.15); }
.badge-woocommerce { color: var(--woo); background: var(--woo-bg); border: 1px solid rgba(150,88,138,0.2); }
.badge-admin   { color: #D97706; background: rgba(217,119,6,0.08); border: 1px solid rgba(217,119,6,0.15); }
.badge-ajax    { color: #DC2626; background: rgba(220,38,38,0.08); border: 1px solid rgba(220,38,38,0.15); }
.badge-rest    { color: #0891B2; background: rgba(8,145,178,0.08); border: 1px solid rgba(8,145,178,0.15); }
.badge-cron    { color: #7C3AED; background: rgba(124,58,237,0.08); border: 1px solid rgba(124,58,237,0.15); }

/* ── SEARCH BAR (HOOK FINDER) ── */
.search-section {
  background: var(--dark);
  padding: 2rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.search-wrap {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}
.search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.28);
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
}
.search-input {
  width: 100%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 0.95rem 1rem 0.95rem 3rem;
  font-size: 0.98rem;
  color: #fff;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.search-input::placeholder { color: rgba(255,255,255,0.28); }
.search-input:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 0 3px rgba(5,150,105,0.2);
}
.search-clear {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  font-size: 1.1rem;
  cursor: pointer;
  display: none;
  line-height: 1;
  padding: 0;
  transition: color 0.15s;
}
.search-clear:hover { color: rgba(255,255,255,0.7); }
.search-clear.visible { display: block; }

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding: 1.25rem 0 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.filter-divider {
  width: 1px;
  height: 18px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 0.15rem;
}
.filter-label {
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--ff-mono);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.filter-pill {
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.filter-pill:hover { border-color: var(--accent); color: var(--accent); }
.filter-pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Results meta */
.results-meta {
  font-size: 0.79rem;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}
.results-meta strong { color: var(--text-muted); font-weight: 600; }

/* ── HOOK CARDS ── */
.hook-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 0.85rem;
}
.hook-card:hover {
  border-color: rgba(5,150,105,0.35);
  box-shadow: 0 3px 14px rgba(0,0,0,0.07);
}
.hook-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.7rem;
}
.hook-name {
  font-family: var(--ff-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  word-break: break-all;
  line-height: 1.4;
}
.hook-badges { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; flex-wrap: wrap; }
.hook-since {
  font-size: 0.66rem;
  color: var(--text-dim);
  font-family: var(--ff-mono);
  margin-left: 0.25rem;
}
.hook-desc {
  font-size: 0.845rem;
  color: var(--text);
  margin-bottom: 0.55rem;
  line-height: 1.65;
}
.hook-use-case {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.8rem;
  background: var(--surface-2);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.6;
}
.hook-use-case-label {
  font-size: 0.66rem;
  font-weight: 700;
  font-family: var(--ff-mono);
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 0.18rem;
}
.hook-params { margin-bottom: 0.75rem; }
.hook-params-label {
  font-size: 0.66rem;
  font-weight: 700;
  font-family: var(--ff-mono);
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
  display: block;
}
.hook-param {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-family: var(--ff-mono);
  font-size: 0.73rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.13rem 0.5rem;
  margin: 0 0.18rem 0.18rem 0;
}
.hook-param .param-type { color: var(--filter-c); font-size: 0.67rem; }
.hook-expand-btn {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: opacity 0.15s;
}
.hook-expand-btn:hover { opacity: 0.7; }
.hook-expand-btn .chevron { transition: transform 0.2s; display: inline-block; }
.hook-expand-btn.open .chevron { transform: rotate(180deg); }
.hook-example { display: none; margin-top: 1rem; }
.hook-example.open { display: block; }
.hook-example .code-block {
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  max-height: 380px;
}
.hook-example .output-header {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 0.55rem 1rem;
}

/* ── ESTIMATOR ── */
.estimator-layout {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 1.75rem;
  padding: 2rem 0 4.5rem;
  align-items: start;
}
.category-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.category-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.category-icon { font-size: 1.05rem; }
.category-title {
  font-family: var(--ff-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}
.category-count {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}
.feature-list { padding: 0.4rem 0; }
.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.62rem 1.25rem;
  cursor: pointer;
  transition: background 0.12s;
  user-select: none;
}
.feature-item:hover { background: var(--surface-2); }
.feature-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}
.feature-info { flex: 1; }
.feature-name { font-size: 0.84rem; font-weight: 500; color: var(--text); line-height: 1.35; }
.feature-detail { font-size: 0.73rem; color: var(--text-dim); margin-top: 0.1rem; }
.feature-hours {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
}

/* Estimator sidebar */
.estimate-sidebar { position: sticky; top: 78px; }
.estimate-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.estimate-card-header {
  padding: 1rem 1.25rem;
  background: var(--dark);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.estimate-header-title {
  font-family: var(--ff-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}
.estimate-body { padding: 1.2rem; }
.rate-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}
.rate-input-wrap { position: relative; flex: 1; }
.rate-prefix {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
}
.rate-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem 0.5rem 1.7rem;
  font-family: var(--ff-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  outline: none;
}
.rate-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(5,150,105,0.1); }
.rate-label { font-size: 0.73rem; color: var(--text-dim); white-space: nowrap; }
.estimate-stat { margin-bottom: 0.85rem; }
.estimate-stat-label {
  font-size: 0.69rem;
  color: var(--text-dim);
  font-family: var(--ff-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
  display: block;
}
.estimate-stat-value {
  font-family: var(--ff-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.estimate-stat-value .unit {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  font-family: var(--ff-sans);
  letter-spacing: 0;
}
.empty-state {
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: center;
  padding: 1.5rem 0;
  line-height: 1.6;
}
.estimate-breakdown { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.estimate-breakdown-title {
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--ff-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
}
.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 0.77rem;
  color: var(--text-muted);
  padding: 0.3rem 0;
  border-bottom: 1px dashed var(--border);
  gap: 0.5rem;
}
.breakdown-item:last-child { border-bottom: none; }
.breakdown-name { flex: 1; line-height: 1.4; }
.breakdown-hrs {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}
.btn-green {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.68rem 1rem;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.btn-green:hover { opacity: 0.87; }
.btn-ghost-sm {
  width: 100%;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 1rem;
  font-size: 0.79rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.btn-ghost-sm:hover { background: var(--border); color: var(--text); }

/* ── PRINT STYLES (Estimator) ── */
@media print {
  #nav, .mobile-menu, .tool-page-hero, .estimate-sidebar .btn-green,
  .estimate-sidebar .btn-ghost-sm, .tools-footer, .category-header { print-color-adjust: exact; }
  .estimate-sidebar { position: static; }
  .estimator-layout { grid-template-columns: 1fr; }
}

/* ── FOOTER ── */
.tools-footer {
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 1.75rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo {
  font-family: var(--ff-display);
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
}
.footer-logo .dot { color: var(--accent); }
.footer-links { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.footer-links a {
  font-size: 0.77rem;
  color: rgba(255,255,255,0.38);
  transition: color 0.15s;
}
.footer-links a:hover { color: rgba(255,255,255,0.7); }
.footer-copy { font-size: 0.75rem; color: rgba(255,255,255,0.25); }

/* ── UTILITIES ── */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-dim);
}
.no-results .icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.no-results p { font-size: 0.9rem; line-height: 1.65; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .tool-layout { grid-template-columns: 1fr; }
  .form-panel { position: static; }
  .estimator-layout { grid-template-columns: 1fr; }
  .estimate-sidebar { position: static; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .tools-hero { padding: 3.5rem 0 3rem; }
  .tools-grid { grid-template-columns: 1fr; }
  .estimator-layout { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .tools-hero h1 { font-size: 1.9rem; }
  .filter-bar { gap: 0.35rem; }
  .hook-card-top { flex-direction: column; gap: 0.5rem; }
  .hook-badges { flex-direction: row; }
}
