/* =============================================================
   DailyTools.in — Vibrant Playful Design System
   Neo-brutalist: 2px black borders, offset shadows, color blocks
   Fonts: Space Grotesk (display) + DM Sans (body)
   Compatible with Bootstrap 5 (keeps utilities, overrides visuals)
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ── Design Tokens ─────────────────────────────────────── */
:root {
  --ink:          #0a0a0a;
  --paper:        #fafafa;
  --paper-2:      #ffffff;
  --muted:        #525252;
  --muted-2:      #737373;
  --line:         #0a0a0a;
  --line-soft:    #e4e4e4;
  --accent:       #2f6fed;
  --accent-dark:  #1d5be0;
  --yellow:       #fde047;
  --yellow-soft:  #fef3c7;
  --green:        #86efac;
  --green-soft:   #dcfce7;
  --pink:         #f9a8d4;
  --pink-soft:    #fce7f3;
  --blue-soft:    #dbeafe;
  --purple-soft:  #ede9fe;
  --rose-soft:    #ffe4e6;
  --cyan-soft:    #cffafe;
  --stone-soft:   #f5f5f4;
  --shadow:       3px 3px 0 var(--line);
  --shadow-sm:    2px 2px 0 var(--line);
  --shadow-lg:    4px 4px 0 var(--line);
  --radius:       14px;
  --radius-sm:    8px;

  /* Keep some old vars for Bootstrap compat */
  --color-primary: #2f6fed;
  --color-primary-dark: #1d5be0;
  --color-text: #0a0a0a;
  --color-text-muted: #525252;
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: .75rem;
}

p { color: var(--muted); margin-bottom: 1rem; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
button { font-family: inherit; cursor: pointer; }
input, button, select, textarea { font: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}


/* =============================================================
   NAVIGATION
   ============================================================= */
.nav-main {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 16px;
  background: var(--paper-2);
  border-bottom: 2px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Space Grotesk'; font-size: 16px; font-weight: 700;
  color: var(--ink); text-decoration: none; flex-shrink: 0;
}
.nav-mark {
  width: 28px; height: 28px; background: var(--accent); color: #fff;
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; transform: rotate(-4deg); flex-shrink: 0;
}
.nav-mark-tld { color: var(--accent); }

.nav-links {
  display: none; gap: 24px; font-size: 14px; color: var(--muted);
  flex: 1; margin-left: 12px; margin-bottom: 0; padding: 0; list-style: none;
  font-weight: 500;
}
.nav-links a { color: var(--muted); text-decoration: none; transition: color 0.15s; }
.nav-links a:hover { color: var(--ink); }

.nav-right { display: flex; gap: 8px; align-items: center; margin-left: auto; }

.nav-search-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 12px; border: 2px solid var(--line); border-radius: 22px;
  font-size: 13px; background: var(--paper-2); box-shadow: var(--shadow-sm);
  color: var(--ink); text-decoration: none; cursor: pointer;
  transition: box-shadow 0.15s;
}
.nav-search-pill:hover { box-shadow: var(--shadow); color: var(--ink); }
.nav-search-pill .label { display: none; }

.kbd {
  font-family: 'Space Grotesk', monospace;
  font-size: 10px; padding: 1px 5px;
  background: #f5f5f5; border: 1px solid #d4d4d4; border-radius: 3px; color: var(--muted);
}

.nav-mobile-toggle {
  padding: 6px 10px; border: 2px solid var(--line); border-radius: 8px;
  background: #fff; box-shadow: var(--shadow-sm); cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}

/* Mobile menu dropdown */
.nav-mobile-menu {
  display: none;
  background: var(--paper-2);
  border-bottom: 2px solid var(--line);
  padding: 0 16px 8px;
  position: sticky; top: 57px; z-index: 99;
}
.nav-mobile-menu.open { display: block; }
.nav-mobile-menu a {
  display: block; padding: 12px 0; font-size: 15px; font-weight: 500;
  border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none;
}
.nav-mobile-menu a:last-child { border-bottom: none; }
.nav-mobile-menu a:hover { color: var(--accent); }

@media (min-width: 768px) {
  .nav-main { padding: 16px 40px; gap: 24px; }
  .nav-logo { font-size: 18px; }
  .nav-mark { width: 32px; height: 32px; font-size: 13px; border-radius: 8px; }
  .nav-links { display: flex; }
  .nav-search-pill .label { display: inline; }
  .nav-mobile-toggle { display: none; }
  .nav-mobile-menu { display: none !important; }
}


/* =============================================================
   HERO SECTION
   ============================================================= */
.hero {
  position: relative; padding: 44px 20px 40px;
  background: var(--paper-2); border-bottom: 2px solid var(--line); overflow: hidden;
}
.hero-blob {
  position: absolute; border-radius: 50%; filter: blur(48px);
  opacity: .65; pointer-events: none;
}
.hero-blob.b1 { background: var(--yellow); width: 220px; height: 220px; top: -50px; left: -50px; }
.hero-blob.b2 { background: var(--green); width: 280px; height: 280px; bottom: -70px; right: -60px; }
.hero-blob.b3 { background: var(--pink); width: 120px; height: 120px; top: 70px; right: 18%; }
.hero-inner {
  position: relative; max-width: 900px; margin: 0 auto; text-align: center;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; background: var(--line); color: #fff;
  border-radius: 20px; font-size: 11px; letter-spacing: .12em; font-weight: 600;
  margin-bottom: 22px; font-family: 'DM Sans';
}
.hero-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }
.hero-h {
  font-family: 'Space Grotesk'; font-weight: 700;
  font-size: 42px; letter-spacing: -1.5px; line-height: 1.05;
  margin: 0 0 14px; color: var(--ink);
}
.hero-h em { font-style: italic; color: var(--accent); }
.hero-sub { font-size: 15px; color: var(--muted); margin: 0 0 28px; }

/* Search */
.search-wrap { max-width: 640px; margin: 0 auto; position: relative; }
.search-box {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 2.5px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--shadow-lg);
}
.search-input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 15px; font-family: 'DM Sans'; min-width: 0; color: var(--ink);
}
.search-input::placeholder { color: var(--muted-2); }
.search-go {
  background: var(--accent); color: #fff; border: 2px solid var(--line);
  border-radius: var(--radius-sm); padding: 8px 16px; font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-sm); white-space: nowrap; cursor: pointer;
  transition: background 0.15s;
}
.search-go:hover { background: var(--accent-dark); }

.popular { display: flex; gap: 6px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.pop-chip {
  padding: 5px 11px; border-radius: 20px; background: #fff;
  border: 1.5px solid var(--line); font-size: 12px; font-weight: 500;
  color: var(--ink); text-decoration: none; transition: background 0.15s;
}
.pop-chip:hover { background: var(--yellow); color: var(--ink); }

/* Hero stats */
.hero-stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0;
  margin-top: 36px; align-items: center;
}
.hero-stat { padding: 6px 16px; min-width: 80px; }
.hs-n { font-family: 'Space Grotesk'; font-size: 22px; font-weight: 700; letter-spacing: -1px; }
.hs-l { font-size: 10px; color: var(--muted-2); letter-spacing: .1em; text-transform: uppercase; margin-top: 2px; }
.hs-sep { width: 1px; height: 28px; background: var(--line-soft); }

@media (min-width: 768px) {
  .hero { padding: 80px 40px 64px; }
  .hero-h { font-size: 76px; letter-spacing: -3px; line-height: .95; }
  .hero-sub { font-size: 17px; margin-bottom: 32px; }
  .search-box { padding: 14px 16px; }
  .search-input { font-size: 17px; }
  .search-go { padding: 10px 20px; font-size: 14px; }
  .hs-n { font-size: 26px; }
  .hero-stats { margin-top: 44px; }
  .hero-stat { padding: 0 28px; }
}


/* =============================================================
   SEARCH SUGGESTIONS (AJAX dropdown)
   ============================================================= */
.search-suggestions {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); max-height: 340px; overflow-y: auto;
  z-index: 200;
}
.search-suggestions[hidden] { display: none; }
.suggestion-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--line-soft);
  cursor: pointer; color: var(--ink); text-decoration: none; font-size: 14px;
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover, .suggestion-item.active { background: var(--yellow-soft); }
.suggestion-icon { font-size: 20px; width: 28px; flex-shrink: 0; text-align: center; }
.suggestion-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.suggestion-name { font-weight: 600; font-size: 14px; color: var(--ink); display: block; }
.suggestion-category {
  font-size: 11px; color: var(--muted-2); letter-spacing: .08em;
  text-transform: uppercase; display: block; margin-top: 1px;
}
.suggestion-arrow { color: var(--muted-2); font-size: 11px; flex-shrink: 0; }


/* =============================================================
   SECTIONS
   ============================================================= */
.dt-section { padding: 28px 16px; }
.dt-section-alt {
  padding: 28px 16px;
  background: var(--paper-2);
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
}
.sec-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 18px; gap: 12px; flex-wrap: wrap;
}
.sec-h {
  font-family: 'Space Grotesk'; font-size: 28px; font-weight: 700;
  margin: 0; letter-spacing: -1px; line-height: 1; color: var(--ink);
}
.sec-sub { font-size: 13px; color: var(--muted-2); margin-top: 4px; }
.all-btn {
  padding: 8px 14px; border: 2px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-sm);
  text-decoration: none; color: var(--ink); flex-shrink: 0;
  transition: background 0.15s;
}
.all-btn:hover { background: var(--yellow); color: var(--ink); }

@media (min-width: 768px) {
  .dt-section, .dt-section-alt { padding: 36px 40px; }
  .sec-h { font-size: 36px; letter-spacing: -1.5px; }
}


/* =============================================================
   DASHBOARD CARDS
   ============================================================= */
.dash-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.dt-card {
  border-radius: var(--radius); padding: 18px;
  border: 2px solid var(--line); box-shadow: var(--shadow);
}
.dt-card.yellow { background: var(--yellow-soft); }
.dt-card.blue   { background: var(--blue-soft); }
.dt-card.green  { background: var(--green-soft); }
.dt-card.pink   { background: var(--pink-soft); }
.dt-card.purple { background: var(--purple-soft); }
.dt-card.rose   { background: var(--rose-soft); }
.dt-card.cyan   { background: var(--cyan-soft); }
.dt-card.stone  { background: var(--stone-soft); }
.c-lbl {
  font-size: 10px; letter-spacing: .14em; font-weight: 700;
  margin-bottom: 8px; opacity: .7; text-transform: uppercase;
}
.today-h { font-family: 'Space Grotesk'; font-size: 22px; font-weight: 700; margin: 4px 0 14px; }
.streak-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.s-cell {
  aspect-ratio: 1; border-radius: 6px; display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 700; border: 1.5px solid var(--line);
  font-family: 'Space Grotesk';
}
.s-cell.done { background: var(--line); color: var(--yellow); }
.s-cell.now  { background: #fff; border-style: dashed; }
.result-row {
  display: flex; justify-content: space-between; padding: 8px 0;
  border-bottom: 1px dashed rgba(0,0,0,.15); font-size: 13px;
}
.result-row:last-child { border-bottom: none; }

@media (min-width: 768px) {
  .dash-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .dt-card { padding: 20px; }
}


/* =============================================================
   CATEGORY GRID (tool town)
   ============================================================= */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cat-card {
  padding: 16px; border-radius: var(--radius); border: 2px solid var(--line);
  box-shadow: var(--shadow); min-height: 120px;
  text-decoration: none; display: block; cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s; color: inherit;
}
.cat-card:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow-lg); }
.cat-icon { font-size: 28px; margin-bottom: 6px; line-height: 1; }
.cat-name {
  font-family: 'Space Grotesk'; font-size: 17px; font-weight: 700; letter-spacing: -.5px;
}
.cat-count {
  font-size: 11px; opacity: .6; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 600; margin-top: 2px;
}
.cat-prev { font-size: 12px; margin-top: 8px; opacity: .7; line-height: 1.3; }

/* Category color classes */
.cat-finance  { background: #fef3c7; color: #92400e; }
.cat-pdf      { background: #dbeafe; color: #1e3a8a; }
.cat-image    { background: #dcfce7; color: #14532d; }
.cat-text     { background: #fce7f3; color: #831843; }
.cat-dev      { background: #ede9fe; color: #4c1d95; }
.cat-health   { background: #ffe4e6; color: #881337; }
.cat-convert  { background: #cffafe; color: #164e63; }
.cat-utility  { background: #f5f5f4; color: #44403c; }
.cat-gov      { background: #fef3c7; color: #713f12; }
.cat-calc     { background: #f5f5f4; color: #292524; }

@media (min-width: 768px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .cat-card { padding: 18px; }
  .cat-icon { font-size: 32px; }
  .cat-name { font-size: 19px; }
}


/* =============================================================
   TOOL CARDS (tile grid — new design)
   ============================================================= */
.tile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.tool-card-new {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  border: 2px solid var(--line); box-shadow: var(--shadow);
  text-decoration: none; display: block; color: var(--ink);
  transition: transform 0.12s, box-shadow 0.12s;
}
.tool-card-new:hover {
  transform: translate(-1px, -1px); box-shadow: var(--shadow-lg); color: var(--ink);
}
.tool-thumb {
  height: 80px; display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk'; font-size: 28px; font-weight: 700;
  border-bottom: 2px solid var(--line); background: var(--stone-soft);
}
.tool-thumb.th-fin     { background: var(--yellow); }
.tool-thumb.th-text    { background: var(--pink); }
.tool-thumb.th-pdf     { background: var(--green); }
.tool-thumb.th-health  { background: #fca5a5; }
.tool-thumb.th-dev     { background: #d8c8f0; }
.tool-thumb.th-image   { background: #b8e6c1; }
.tool-thumb.th-convert { background: #a8d5ff; }
.tool-thumb.th-utility { background: var(--stone-soft); }
.tool-thumb.th-calc    { background: var(--yellow-soft); }
.tool-thumb.th-gov     { background: var(--cyan-soft); }
.tool-body { padding: 12px; }
.tool-lbl {
  font-size: 10px; letter-spacing: .12em; font-weight: 700;
  color: var(--muted-2); text-transform: uppercase;
}
.tool-n { font-family: 'Space Grotesk'; font-size: 15px; font-weight: 600; margin: 4px 0 2px; }
.tool-meta { font-size: 12px; color: var(--muted-2); }

@media (min-width: 768px) {
  .tile-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .tool-thumb { height: 96px; font-size: 36px; }
  .tool-body { padding: 14px; }
  .tool-n { font-size: 16px; }
}

/* Bootstrap-compatible tool card (old pages) */
.tool-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  border: 2px solid var(--line); box-shadow: var(--shadow);
  height: 100%; padding: 0;
  transition: transform 0.12s, box-shadow 0.12s;
}
.tool-card-link { text-decoration: none; display: block; height: 100%; color: var(--ink); }
.tool-card-link:hover .tool-card {
  transform: translate(-1px, -1px); box-shadow: var(--shadow-lg);
}
.tool-card-icon {
  height: 70px; display: flex; align-items: center; justify-content: center;
  font-size: 26px; border-bottom: 2px solid var(--line);
  background: var(--yellow-soft);
}
.tool-card-name {
  font-family: 'Space Grotesk'; font-size: 15px; font-weight: 600;
  margin: 10px 12px 4px; letter-spacing: -.3px; color: var(--ink);
}
.tool-card-desc { font-size: 12px; color: var(--muted-2); margin: 0 12px 10px; }
.tool-card-category {
  display: block; margin: 0 12px 10px;
  font-size: 10px; letter-spacing: .12em; font-weight: 700;
  color: var(--muted-2); text-transform: uppercase;
}
.tool-card-sm .tool-card-name { font-size: 13px; }
.tool-card-sm .tool-card-icon { height: 60px; font-size: 22px; }


/* =============================================================
   CATEGORY PAGE — HERO
   ============================================================= */
.cat-hero {
  position: relative; padding: 32px 16px;
  border-bottom: 2px solid var(--line); overflow: hidden;
  background: var(--yellow-soft);
}
.cat-hero-grid {
  display: grid; grid-template-columns: 1fr; gap: 20px;
  max-width: 1200px; margin: 0 auto;
}
.cat-hero-meta {
  font-size: 11px; letter-spacing: .14em; font-weight: 700; text-transform: uppercase;
}
.cat-hero-h {
  font-family: 'Space Grotesk'; font-size: 34px; font-weight: 700;
  letter-spacing: -1.5px; line-height: 1; margin: 8px 0;
}
.cat-hero-p { font-size: 15px; color: var(--muted); margin: 0 0 16px; max-width: 520px; }
.cat-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-dt {
  padding: 10px 18px; border: 2px solid var(--line); border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-sm);
  cursor: pointer; text-decoration: none; display: inline-block;
  transition: opacity 0.15s;
}
.btn-dt.primary { background: var(--ink); color: var(--paper-2); }
.btn-dt.ghost   { background: #fff; color: var(--ink); }
.btn-dt:hover   { opacity: .85; }

.featured-card {
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.featured-thumb {
  height: 120px; border-radius: var(--radius-sm); border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk'; font-size: 52px; font-weight: 700; margin-bottom: 12px;
  background: var(--yellow);
}

@media (min-width: 768px) {
  .cat-hero { padding: 52px 40px; }
  .cat-hero-grid { grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: center; }
  .cat-hero-h { font-size: 52px; letter-spacing: -2px; }
}


/* =============================================================
   CATEGORY PAGE — BREADCRUMB & SECTIONS
   ============================================================= */
.breadcrumb-dt {
  font-size: 11px; letter-spacing: .12em; color: var(--muted-2);
  padding: 14px 16px; text-transform: uppercase; background: var(--paper);
}
.breadcrumb-dt a { color: var(--muted-2); text-decoration: none; }
.breadcrumb-dt a:hover { color: var(--accent); }
.breadcrumb-dt span { opacity: .5; margin: 0 6px; }

@media (min-width: 768px) {
  .breadcrumb-dt { padding: 18px 40px; }
}

/* Override Bootstrap breadcrumb */
.breadcrumb {
  background: transparent; padding: 0; margin: 0;
  font-size: 12px; letter-spacing: .06em;
}
.breadcrumb-item a { color: var(--muted-2); }
.breadcrumb-item a:hover { color: var(--accent); }
.breadcrumb-item.active { color: var(--muted-2); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--muted-2); }


/* =============================================================
   TOOL DETAIL PAGE — BANNER & LAYOUT
   ============================================================= */
.tool-banner {
  margin: 0 16px 16px; padding: 14px 16px; border: 2px solid var(--line);
  border-radius: 12px; background: var(--yellow-soft);
  display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-sm);
}
.tool-banner-mark {
  width: 44px; height: 44px; border-radius: var(--radius-sm); border: 2px solid var(--line);
  background: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.tool-banner-title {
  font-family: 'Space Grotesk'; font-size: 20px; font-weight: 700; line-height: 1;
  color: var(--ink);
}
.tool-banner-meta { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; margin-top: 2px; }
.tool-banner-actions { margin-left: auto; display: none; gap: 8px; }

.tool-page-wrap { padding: 0 16px 40px; display: block; }

/* Calc / tool content boxes */
.calc-box {
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.faq-box, .blog-box, .related-box {
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.faq-box h3, .blog-box h3, .related-box h3 {
  font-family: 'Space Grotesk'; font-size: 18px; font-weight: 700; margin: 0 0 14px;
}

/* Related tools list */
.related-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none; color: var(--ink);
}
.related-row:last-child { border-bottom: none; }
.related-row:hover { color: var(--accent); }
.r-thumb {
  width: 40px; height: 40px; border: 1.5px solid var(--line); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
  background: var(--yellow-soft);
}
.r-info h4 { margin: 0; font-size: 14px; font-weight: 600; }
.r-info p { margin: 0; font-size: 12px; color: var(--muted-2); }
.r-go { margin-left: auto; font-size: 14px; opacity: .5; }

@media (min-width: 768px) {
  .tool-banner { margin: 0 40px 20px; padding: 18px 22px; }
  .tool-banner-title { font-size: 24px; }
  .tool-banner-actions { display: flex; }
}

@media (min-width: 1024px) {
  .tool-page-wrap { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; padding: 0 40px 40px; }
}


/* =============================================================
   FEATURE CARDS (why section)
   ============================================================= */
.feature-card {
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); height: 100%;
}
.feature-icon-wrap {
  width: 52px; height: 52px; border-radius: 12px; border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin: 0 auto 14px; box-shadow: var(--shadow-sm);
}
.feature-icon-wrap.feature-icon-green  { background: var(--green-soft); }
.feature-icon-wrap.feature-icon-blue   { background: var(--blue-soft); }
.feature-icon-wrap.feature-icon-purple { background: var(--purple-soft); }
.feature-title { font-family: 'Space Grotesk'; font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.feature-desc  { font-size: 14px; color: var(--muted); margin: 0; }


/* =============================================================
   ARTICLE CARDS
   ============================================================= */
.article-card {
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); height: 100%;
  transition: transform 0.12s, box-shadow 0.12s;
  display: flex; flex-direction: column;
}
.article-card-link { text-decoration: none; color: var(--ink); display: block; height: 100%; }
.article-card-link:hover .article-card {
  transform: translate(-1px, -1px); box-shadow: var(--shadow-lg);
}
.article-card-body { flex: 1; }
.article-card-title {
  font-family: 'Space Grotesk'; font-size: 16px; font-weight: 700;
  margin: 0 0 8px; letter-spacing: -.3px; line-height: 1.3; color: var(--ink);
}
.article-card-summary { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.article-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}
.article-card-tag {
  padding: 3px 8px; border-radius: 4px; background: var(--yellow-soft);
  border: 1.5px solid var(--line); font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink); font-size: 10px;
}
.article-card-date { color: var(--muted-2); }


/* =============================================================
   SECTION HEADERS (compatibility)
   ============================================================= */
.section-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px;
}
.section-title {
  font-family: 'Space Grotesk'; font-size: 26px; font-weight: 700;
  margin: 0; letter-spacing: -1px; color: var(--ink);
}
.section-subtitle { font-size: 14px; color: var(--muted); margin: 4px 0 0; }
.section-link { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.section-link:hover { text-decoration: underline; }


/* =============================================================
   FOOTER
   ============================================================= */
.site-footer-new {
  padding: 28px 16px; border-top: 2px solid var(--line);
  background: var(--paper-2); text-align: center;
  font-size: 12px; color: var(--muted-2);
  margin-top: auto;
}
.site-footer-new a { color: var(--accent); }
.site-footer-new a:hover { text-decoration: underline; }
@media (min-width: 768px) { .site-footer-new { padding: 36px 40px; } }


/* =============================================================
   BACK TO TOP
   ============================================================= */
.back-to-top {
  position: fixed; bottom: 24px; right: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--paper-2);
  box-shadow: var(--shadow); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 50; font-size: 14px; color: var(--ink);
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--yellow); }


/* =============================================================
   SEARCH RESULTS PAGE
   ============================================================= */
.search-results-page {
  padding: 28px 16px; max-width: 960px; margin: 0 auto;
}
@media (min-width: 768px) { .search-results-page { padding: 40px; } }

.search-result-item {
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 12px;
  text-decoration: none; display: flex; align-items: center; gap: 14px;
  color: var(--ink); transition: transform 0.1s, box-shadow 0.1s;
}
.search-result-item:hover {
  transform: translate(-1px, -1px); box-shadow: var(--shadow-lg); color: var(--ink);
}
.search-result-icon { font-size: 24px; flex-shrink: 0; width: 36px; text-align: center; }
.search-result-name { font-family: 'Space Grotesk'; font-size: 16px; font-weight: 700; margin: 0 0 2px; }
.search-result-desc { font-size: 13px; color: var(--muted-2); margin: 0; }
.search-result-cat {
  margin-left: auto; flex-shrink: 0;
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted-2);
}


/* =============================================================
   SEO CONTENT
   ============================================================= */
.category-seo-intro {
  font-size: 15px; color: var(--muted); line-height: 1.6; margin-bottom: 24px;
  padding: 16px 18px; background: var(--paper-2); border: 2px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-sm);
}
.category-seo-content { font-size: 15px; line-height: 1.7; color: var(--muted); }
.category-seo-content h2, .category-seo-content h3 {
  font-family: 'Space Grotesk'; color: var(--ink);
}
.content-section { font-size: 15px; line-height: 1.7; }
.content-section h2, .content-section h3 { font-family: 'Space Grotesk'; }


/* =============================================================
   BOOTSTRAP OVERRIDES
   ============================================================= */

/* Forms */
.form-control, .form-select {
  border: 2px solid var(--line-soft); border-radius: var(--radius-sm);
  font-family: 'DM Sans'; font-size: 14px; padding: .5rem .75rem;
  background: #fff; color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,111,237,.15);
  outline: none;
}
.form-label { font-size: 13px; font-weight: 600; color: var(--muted-2); margin-bottom: .4rem; }
.input-group-text {
  border: 2px solid var(--line-soft); border-radius: var(--radius-sm);
  background: var(--stone-soft); font-size: 13px; font-weight: 600;
}

/* Buttons */
.btn {
  font-family: 'DM Sans'; font-weight: 600; border-radius: var(--radius-sm);
  transition: transform 0.1s, box-shadow 0.1s, background 0.1s;
}

/* Primary — accent blue with neo-brutalist border + offset shadow */
.btn-primary {
  background: var(--accent);
  border: 2px solid var(--line) !important;
  color: #fff;
  box-shadow: 2px 2px 0 var(--line);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--accent-dark);
  border-color: var(--line) !important;
  color: #fff;
  transform: translate(1px, 1px);
  box-shadow: none;
}
.btn-primary:active {
  background: var(--accent-dark);
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* Outline variants */
.btn-outline-primary { color: var(--accent); border: 2px solid var(--accent); box-shadow: none; }
.btn-outline-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 2px 2px 0 var(--line); }
.btn-outline-secondary { color: var(--muted); border: 2px solid var(--line-soft); box-shadow: none; }
.btn-outline-secondary:hover { background: var(--stone-soft); color: var(--ink); border-color: var(--line-soft); }
.btn-outline-danger { border-width: 2px; }

/* Size tweaks */
.btn-sm { font-size: 12px; padding: 4px 12px; }
.btn-lg { font-size: 15px; padding: 11px 20px; letter-spacing: .01em; }

/* Cards (Bootstrap) */
.card {
  border: 2px solid var(--line-soft); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-body { font-size: 14px; }

/* Alerts */
.alert { border: 2px solid var(--line-soft); border-radius: var(--radius-sm); font-size: 14px; }

/* Accordion (FAQ) */
.accordion-item {
  border: 2px solid var(--line-soft) !important; border-radius: var(--radius-sm) !important;
  margin-bottom: 8px; box-shadow: var(--shadow-sm); overflow: hidden;
}
.accordion-button {
  font-family: 'DM Sans'; font-weight: 600; font-size: 14px;
  background: var(--paper-2); color: var(--ink);
}
.accordion-button:not(.collapsed) { background: var(--yellow-soft); color: var(--ink); box-shadow: none; }
.accordion-button::after { opacity: .6; }
.accordion-button:focus { box-shadow: none; }
.accordion-body { font-size: 14px; color: var(--muted); }

/* Pagination */
.pagination { gap: 4px; }
.pagination .page-link {
  border: 2px solid var(--line); border-radius: var(--radius-sm) !important;
  color: var(--ink); font-weight: 600; font-size: 13px;
  box-shadow: var(--shadow-sm); background: #fff;
}
.pagination .page-item.active .page-link { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination .page-link:hover { background: var(--yellow-soft); color: var(--ink); }

/* Badges */
.badge { font-family: 'DM Sans'; font-weight: 700; }
.bg-primary { background-color: var(--accent) !important; }

/* Table */
.table { font-size: 14px; }
.table th { font-family: 'Space Grotesk'; font-weight: 600; }

/* Progress */
.progress { border: 1.5px solid var(--line-soft); border-radius: 6px; }
.progress-bar { background: var(--accent); }


/* =============================================================
   UTILITY
   ============================================================= */
.text-accent   { color: var(--accent) !important; }
.text-muted    { color: var(--muted-2) !important; }
.font-display  { font-family: 'Space Grotesk', sans-serif; }
.border-design { border: 2px solid var(--line) !important; }
.shadow-design { box-shadow: var(--shadow) !important; }


/* =============================================================
   TOOL SPLIT LAYOUT (text / dev tools with two-panel UI)
   ============================================================= */
.tool-split {
  display: grid; grid-template-columns: 1fr;
  border: 2px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); background: #fff;
  min-height: 460px;
}
.tool-panel {
  display: flex; flex-direction: column;
  border-bottom: 2px solid var(--line);
}
.tool-panel:last-child { border-bottom: none; }
.tool-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2);
  background: var(--stone-soft); border-bottom: 2px solid var(--line);
  font-family: 'Space Grotesk';
}
@media (min-width: 768px) {
  .tool-split { grid-template-columns: 1fr 1fr; }
  .tool-panel { border-bottom: none; border-right: 2px solid var(--line); }
  .tool-panel:last-child { border-right: none; }
}


/* =============================================================
   BOOTSTRAP UTILITY OVERRIDES (for tool partials)
   ============================================================= */

/* Soft border for borderless Bootstrap cards — keeps definition without harsh lines */
.card.border-0 { border: 1.5px solid var(--line-soft) !important; }

/* bg-light → stone soft */
.bg-light { background-color: var(--stone-soft) !important; }

/* Primary colour tokens */
.text-primary  { color: var(--accent) !important; }
.border-primary { border-color: var(--accent) !important; }
.bg-primary    { background-color: var(--accent) !important; }

/* Status colours */
.text-success  { color: #16a34a !important; }
.text-danger   { color: #dc2626 !important; }
.text-warning  { color: #d97706 !important; }
.text-info     { color: #0891b2 !important; }

/* Accent-coloured action cards (result highlight in dark) */
.card.bg-primary { background-color: var(--accent) !important; border: 2px solid var(--line) !important; }

/* Left-border stat cards: give them yellow-soft bg in new design */
.card.border-start.border-primary.border-4 { background: var(--yellow-soft) !important; }
.card.border-start.border-success.border-4 { background: var(--green-soft) !important; }
.card.border-start.border-danger.border-4  { background: var(--rose-soft)  !important; }
.card.border-start.border-warning.border-4 { background: #fef9c3 !important; }

/* btn-check / btn-group toggles */
.btn-outline-primary:not(:disabled).active,
.btn-outline-primary:checked + .btn-outline-primary {
  background: var(--accent); color: #fff;
}

/* Mobile category chip strip (search page) */
.mobile-category-chips {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.mobile-category-chips::-webkit-scrollbar { display: none; }
.mobile-chip {
  flex-shrink: 0; padding: 6px 14px; border-radius: 20px; background: #fff;
  border: 1.5px solid var(--line); font-size: 13px; font-weight: 500;
  text-decoration: none; color: var(--ink); white-space: nowrap;
  transition: background 0.15s;
}
.mobile-chip.active, .mobile-chip:hover { background: var(--yellow); color: var(--ink); }


/* =============================================================
   SEARCH PAGE
   ============================================================= */
.search-page-wrap { padding: 28px 16px; }
@media (min-width: 768px) { .search-page-wrap { padding: 36px 40px; } }

.search-bar-wrap {
  background: #fff; border: 2.5px solid var(--line); border-radius: var(--radius);
  padding: 12px 16px; box-shadow: var(--shadow-lg); margin-bottom: 24px;
  display: flex; align-items: center; gap: 10px;
}
.search-bar-wrap input {
  flex: 1; border: none; outline: none; font-family: 'DM Sans';
  font-size: 16px; background: transparent; color: var(--ink); min-width: 0;
}
.search-bar-wrap input::placeholder { color: var(--muted-2); }
.search-bar-btn {
  background: var(--accent); color: #fff; border: 2px solid var(--line);
  border-radius: var(--radius-sm); padding: 8px 18px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-sm); cursor: pointer; white-space: nowrap;
}
.search-bar-btn:hover { background: var(--accent-dark); }

.search-layout { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 992px) { .search-layout { grid-template-columns: 220px 1fr; } }

/* Category sidebar */
.search-sidebar {
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; align-self: start;
}
.search-sidebar-title {
  font-family: 'Space Grotesk'; font-size: 13px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2);
  margin-bottom: 10px;
}
.search-cat-link {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
  text-decoration: none; color: var(--muted); transition: background 0.12s;
  margin-bottom: 2px;
}
.search-cat-link:hover { background: var(--stone-soft); color: var(--ink); }
.search-cat-link.active { background: var(--yellow-soft); color: var(--ink); font-weight: 700; border: 1.5px solid var(--line); }

/* Result count */
.search-count {
  font-size: 13px; color: var(--muted-2); margin-bottom: 16px;
  letter-spacing: .04em;
}

/* Search result cards */
.search-result-card {
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 12px;
  text-decoration: none; display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; color: var(--ink);
  transition: transform 0.12s, box-shadow 0.12s;
}
.search-result-card:hover {
  transform: translate(-1px, -1px); box-shadow: var(--shadow-lg); color: var(--ink);
}
.src-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm); border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0; background: var(--yellow-soft);
}
.src-name { font-family: 'Space Grotesk'; font-size: 15px; font-weight: 700; margin: 0 0 2px; }
.src-desc { font-size: 13px; color: var(--muted-2); margin: 0; }
.src-cat {
  margin-left: auto; flex-shrink: 0;
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 4px; background: var(--stone-soft);
  border: 1.5px solid var(--line-soft); color: var(--muted-2);
}

.search-empty {
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 40px 24px; text-align: center;
}
.search-empty-icon { font-size: 52px; margin-bottom: 14px; }


/* =============================================================
   ARTICLES — LIST PAGE
   ============================================================= */
.articles-hero {
  background: var(--blue-soft); border-bottom: 2px solid var(--line);
  padding: 36px 16px 32px;
}
.articles-hero-inner { max-width: 800px; }
.articles-hero h1 { font-family: 'Space Grotesk'; font-size: 36px; font-weight: 700; letter-spacing: -1px; margin: 0 0 8px; }
.articles-hero p { font-size: 15px; color: var(--muted); margin: 0; }
@media (min-width: 768px) {
  .articles-hero { padding: 52px 40px 44px; }
  .articles-hero h1 { font-size: 52px; letter-spacing: -2px; }
}


/* =============================================================
   ARTICLES — DETAIL PAGE
   ============================================================= */
.article-detail-wrap { padding: 0 16px 48px; }
@media (min-width: 768px) { .article-detail-wrap { padding: 0 40px 60px; } }
@media (min-width: 992px) {
  .article-detail-layout {
    display: grid; grid-template-columns: 1fr 300px; gap: 28px;
  }
}

/* Article header banner */
.article-banner {
  padding: 28px 16px 24px; border-bottom: 2px solid var(--line);
  background: var(--paper-2); margin-bottom: 0;
}
.article-banner-inner { max-width: 1200px; margin: 0 auto; }
.article-banner-cat {
  font-size: 11px; letter-spacing: .14em; font-weight: 700; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 10px;
}
.article-banner-cat a { color: var(--muted-2); text-decoration: none; }
.article-banner-cat a:hover { color: var(--accent); }
.article-banner h1 { font-family: 'Space Grotesk'; font-size: 32px; font-weight: 700; letter-spacing: -1px; line-height: 1.1; margin: 0 0 12px; }
.article-banner-summary { font-size: 16px; color: var(--muted); margin: 0 0 16px; line-height: 1.5; }
.article-banner-meta {
  display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--muted-2);
  flex-wrap: wrap;
}
.article-banner-meta a { color: var(--accent); text-decoration: none; }
@media (min-width: 768px) {
  .article-banner { padding: 36px 40px 32px; }
  .article-banner h1 { font-size: 44px; }
}

/* Article prose body */
.article-content {
  font-family: 'DM Sans'; font-size: 16px; line-height: 1.8; color: var(--ink);
}
.article-content h2 {
  font-family: 'Space Grotesk'; font-size: 24px; font-weight: 700;
  letter-spacing: -.5px; margin: 36px 0 14px; color: var(--ink);
}
.article-content h3 {
  font-family: 'Space Grotesk'; font-size: 20px; font-weight: 700;
  margin: 28px 0 12px; color: var(--ink);
}
.article-content h4 { font-family: 'Space Grotesk'; font-size: 17px; font-weight: 700; margin: 24px 0 10px; }
.article-content p { color: var(--muted); margin-bottom: 18px; }
.article-content ul, .article-content ol { color: var(--muted); padding-left: 20px; margin-bottom: 18px; }
.article-content li { margin-bottom: 8px; }
.article-content strong { color: var(--ink); font-weight: 700; }
.article-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.article-content a:hover { color: var(--accent-dark); }
.article-content blockquote {
  border-left: 4px solid var(--yellow); padding: 14px 18px;
  background: var(--yellow-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0; color: var(--muted);
}
.article-content blockquote p { margin: 0; }
.article-content code {
  font-family: 'Space Grotesk', monospace; font-size: 13px;
  background: var(--stone-soft); padding: 2px 6px; border-radius: 4px;
  border: 1px solid var(--line-soft); color: var(--ink);
}
.article-content pre {
  background: var(--ink); color: var(--yellow); padding: 16px 20px;
  border-radius: var(--radius-sm); overflow-x: auto; margin: 20px 0;
  font-size: 13px; border: 2px solid var(--line); box-shadow: var(--shadow);
}
.article-content pre code { background: none; border: none; padding: 0; color: inherit; }
.article-content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.article-content th {
  background: var(--ink); color: var(--paper); padding: 10px 14px;
  font-family: 'Space Grotesk'; font-weight: 700; text-align: left;
}
.article-content td { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); }
.article-content tr:nth-child(even) td { background: var(--stone-soft); }
.article-content img { border: 2px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); max-width: 100%; }
.article-content hr { border: none; border-top: 2px solid var(--line-soft); margin: 32px 0; }

/* Article sidebar boxes */
.article-sidebar-box {
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; margin-bottom: 16px;
}
.article-sidebar-head {
  padding: 12px 16px; background: var(--stone-soft);
  border-bottom: 2px solid var(--line);
  font-family: 'Space Grotesk'; font-size: 13px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2);
}
.article-sidebar-body { padding: 14px 16px; }
.article-sidebar-tool {
  display: flex; align-items: center; gap: 10px; padding: 10px 0;
  text-decoration: none; color: var(--ink);
}
.article-sidebar-tool:hover { color: var(--accent); }
.article-sidebar-tool-icon { font-size: 28px; flex-shrink: 0; }
.article-sidebar-tool-name { font-family: 'Space Grotesk'; font-size: 15px; font-weight: 700; }
.article-sidebar-tool-desc { font-size: 12px; color: var(--muted-2); margin-top: 2px; }
.article-related-link {
  display: block; padding: 10px 0; border-bottom: 1px solid var(--line-soft);
  font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none;
}
.article-related-link:last-child { border-bottom: none; }
.article-related-link:hover { color: var(--accent); }
.article-related-sub { font-size: 12px; color: var(--muted-2); margin-top: 2px; }


/* =============================================================
   PRINT
   ============================================================= */
@media print {
  .nav-main, .nav-mobile-menu, .site-footer-new, .back-to-top { display: none !important; }
  .tool-banner { box-shadow: none; }
}
