/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --text: #1e293b;
  --text-secondary: #64748b;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --border: #e2e8f0;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
  --max-width: 1140px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }

/* ===== LAYOUT ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ===== HEADER ===== */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: visible;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo svg { width: 28px; height: 28px; }
.logo span { color: var(--primary); }

.nav-links { display: flex; gap: 24px; list-style: none; }
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.mobile-toggle svg { width: 24px; height: 24px; color: var(--text); }

/* Mobile nav */
@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 16px 20px;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
}

/* ===== HERO (homepage) ===== */
.hero {
  padding: 48px 0 32px;
  text-align: center;
}
.hero h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}
.hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto 28px;
}
@media (max-width: 600px) {
  .hero { padding: 32px 0 20px; }
  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: 0.95rem; }
}

/* ===== SEARCH BAR ===== */
/* ===== SEARCH BAR ===== */
.search-box {
  max-width: 480px;
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: 50px;
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 16px;
  flex-shrink: 0;
  width: 44px;
}
.search-icon svg {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}
.search-box input {
  flex: 1;
  padding: 13px 16px 13px 4px;
  border: none;
  font-size: 0.95rem;
  font-family: var(--font);
  outline: none;
  background: transparent;
  color: var(--text);
  min-width: 0;
}
.search-box input::placeholder {
  color: var(--text-secondary);
}

/* ===== TOOL GRID ===== */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}
.tool-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
}
.tool-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.tool-card-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-light);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.25rem;
  flex-shrink: 0;
  overflow: hidden;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.5px;
}
/* Scale down text icons (YAML, HTML, ASCII etc) */
.tool-card-icon:not(:empty) {
  font-size: clamp(0.6rem, 1.5vw, 1.25rem);
}
.tool-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.tool-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.tool-card .badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 50px;
  background: var(--bg-alt);
  color: var(--text-secondary);
  width: fit-content;
}
.tool-card .badge.new { background: #dcfce7; color: #16a34a; }

/* ===== TOOL PAGE LAYOUT ===== */
.tool-page { padding: 32px 0 48px; }
.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 6px;
}
.breadcrumb a {
  color: var(--text-secondary);
  transition: color 0.2s;
}
.breadcrumb a:hover {
  color: var(--primary);
}
.breadcrumb li:last-child span {
  color: var(--text);
}

.tool-header {
  margin-bottom: 24px;
}
.tool-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.tool-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Tool widget area */
.tool-widget {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

/* Form elements inside tools */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 500px) { .form-row { grid-template-columns: 1fr; } }

input[type="text"],
input[type="number"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s;
  background: var(--bg);
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
textarea { resize: vertical; min-height: 100px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover { background: var(--primary-dark); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }

/* Result display */
.result-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-top: 16px;
}
.result-box .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 4px;
}
.result-box .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}
.result-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.result-row:last-child { border-bottom: none; }
.result-row .rlabel { color: var(--text-secondary); }
.result-row .rvalue { font-weight: 600; }

/* Copy button */
.copy-wrap {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.copy-wrap input {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
}
.copy-msg {
  font-size: 0.8rem;
  color: #16a34a;
  font-weight: 500;
  margin-top: 6px;
  display: none;
}

/* Checkbox / toggle row */
.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}
.toggle-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
}
.toggle-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

/* Range slider */
.range-group { margin-bottom: 16px; }
.range-group .range-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.range-group .range-header label { margin-bottom: 0; }
.range-group .range-val {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 10px;
  border-radius: 50px;
}
input[type="range"] {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  background: var(--border);
  border-radius: 3px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
}

/* ===== SEO CONTENT SECTION ===== */
.seo-content {
  max-width: 760px;
  margin: 0 auto;
  padding-top: 16px;
}
.seo-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--text);
}
.seo-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 24px 0 8px;
}
.seo-content p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-size: 0.92rem;
  line-height: 1.7;
}
.seo-content ul, .seo-content ol {
  margin: 0 0 14px 20px;
  color: var(--text-secondary);
  font-size: 0.92rem;
}
.seo-content li { margin-bottom: 6px; }
.seo-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.88rem;
}
.seo-content th, .seo-content td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}
.seo-content th {
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--text);
}
.seo-content td { color: var(--text-secondary); }

/* FAQ accordion */
/* ===== FAQ Accordion ===== */
/* ===== FAQ ACCORDION ===== */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  background: var(--bg);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: .92rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text);
  gap: 12px;
  line-height: 1.4;
}
.faq-q::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: transform .2s;
}
.faq-q:hover { background: var(--bg-alt); }
.faq-item.fopen > .faq-q {
  background: var(--primary-light);
  color: var(--primary);
}
.faq-item.fopen > .faq-q::after { content: '−'; color: var(--primary); }
.faq-a {
  display: none;
  padding: 0 18px 16px;
  font-size: .88rem;
  line-height: 1.75;
  color: var(--text-secondary);
}
.faq-item.fopen > .faq-a { display: block; }

/* ===== CATEGORY TABS ===== */
.category-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
  padding: 0 20px;
}
.cat-tab {
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  background: var(--bg);
  color: var(--text-secondary);
  transition: all 0.2s;
  white-space: nowrap;
}
.cat-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.cat-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
@media (max-width: 600px) {
  .category-tabs {
    gap: 8px;
    padding: 0 12px;
  }
  .cat-tab {
    padding: 8px 14px;
    font-size: 0.82rem;
  }
}
@media (max-width: 768px) {
  .faq-section {
    margin: 60px auto;
  }
  .faq-section h2 {
    font-size: 1.25rem;
    margin-bottom: 40px;
  }
  
  
}

/* ===== RELATED TOOLS ===== */
.related-tools {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.related-tools h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.related-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.2s;
  color: var(--text);
}
.related-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.related-card .rc-icon {
  width: 32px;
  height: 32px;
  background: var(--primary-light);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.related-card .rc-name {
  font-size: 0.85rem;
  font-weight: 600;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 32px 20px;
  margin-top: 48px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}
.footer-brand p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.5;
}
.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  color: var(--text);
}
.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 3px 0;
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  max-width: var(--max-width);
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ===== UTILITIES ===== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }

/* ===== PRINT ===== */
@media print {
  .site-header, .site-footer, .
  /* ===== CATEGORY TABS ===== */
.category-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
  padding: 0 20px;
}
.cat-tab {
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  background: var(--bg);
  color: var(--text-secondary);
  transition: all 0.2s;
  white-space: nowrap;
}
.cat-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.cat-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
@media (max-width: 600px) {
  .category-tabs {
    gap: 8px;
    padding: 0 12px;
  }
  .cat-tab {
    padding: 8px 14px;
    font-size: 0.82rem;
  }
}
@media print {
  .site-header, .site-footer, .category-tabs, .search-box { display: none; }
}


/* ===== DARK MODE ===== */
.dark {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #1e3a5f;
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --border: #334155;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
}
.dark body { background: #0f172a; color: #f1f5f9; }
.dark .site-header { background: #0f172a; border-color: #334155; }
.dark .tool-widget { background: #1e293b; border-color: #334155; }
.dark input, .dark textarea, .dark select { background: #0f172a; color: #f1f5f9; border-color: #334155; }
.dark input::placeholder, .dark textarea::placeholder { color: #475569; }
.dark .faq-item { background: #1e293b; border-color: #334155; }
.dark .faq-q { color: #f1f5f9; }
.dark .faq-q:hover { background: #334155; }
.dark .faq-item.fopen > .faq-q { background: #1e3a5f; color: #3b82f6; }
.dark .faq-a { color: #94a3b8; }
.dark .site-footer { background: #020617; border-color: #1e293b; }
.dark .footer-bottom { border-color: #1e293b; color: #475569; }
.dark .seo-content h2 { color: #f1f5f9; }
.dark .seo-content p, .dark .seo-content li { color: #94a3b8; }
.dark .tool-card { background: #1e293b; border-color: #334155; }
.dark .tool-card:hover { border-color: #3b82f6; background: #1e3a5f; }
.dark .tool-card h3 { color: #f1f5f9; }
.dark .tool-card p { color: #94a3b8; }
.dark .related-card { background: #1e293b; border-color: #334155; }
.dark .related-card:hover { border-color: #3b82f6; background: #1e3a5f; }
.dark .rc-name { color: #f1f5f9; }
.dark .breadcrumb { color: #64748b; }
.dark .breadcrumb a { color: #64748b; }
.dark .hero { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); }
.dark .hero h1, .dark .hero p { color: #f1f5f9; }
.dark .stat-pill { background: #1e293b; border-color: #334155; color: #94a3b8; }
.dark .badge { background: #1e3a5f; color: #60a5fa; }
.dark .badge.new { background: #14532d; color: #4ade80; }
.dark code { background: #334155; color: #93c5fd; }
.dark details summary { color: #60a5fa; }

/* Dark mode toggle button */
.dm-toggle {
  width: 42px; height: 42px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--bg-alt);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem;
  transition: all .2s;
  flex-shrink: 0;
  position: relative;
}
.dm-toggle:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: scale(1.05);
}
/* Tooltip */
.dm-toggle::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #f1f5f9;
  font-size: .68rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
  z-index: 9999;
}
.dm-toggle:hover::after { opacity: 1; }


/* ===== STYLED DATE PICKER ===== */
.date-field {
  display: grid;
  grid-template-columns: 2fr 1fr 1.3fr;
  gap: 12px;
  align-items: end;
}
/* Individual field wrappers — label + select stacked */
.date-field .df-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.date-field .df-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-secondary);
  margin-bottom: 5px;
  padding-left: 2px;
  opacity: .75;
}
/* Select and year input base style */
.date-field select,
.date-field input[type=number] {
  width: 100%;
  padding: 13px 40px 13px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  outline: none;
  font-weight: 600;
  transition: border-color .2s, box-shadow .2s, background .2s;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  /* Custom chevron via SVG background */
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.date-field input[type=number] {
  padding: 13px 16px;
  background-image: none; /* no chevron on number input */
  text-align: left;
}
/* Remove number input spinners */
.date-field input[type=number]::-webkit-inner-spin-button,
.date-field input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
.date-field input[type=number] { -moz-appearance: textfield; }

.date-field select:hover,
.date-field input[type=number]:hover {
  border-color: #94a3b8;
}
.date-field select:focus,
.date-field input[type=number]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37,99,235,.1);
  background-color: var(--bg);
}
/* Dark mode chevron — lighter colour */
.dark .date-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
.date-lbl {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  letter-spacing: 0
}
.date-display {
  margin-top: 10px;
  font-size: .85rem;
  color: var(--primary);
  font-weight: 700;
  min-height: 20px;
  padding: 4px 2px;
  letter-spacing: .1px;
}

@media (max-width: 520px) {
  .date-field {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .date-field .df-wrap:first-child {
    grid-column: 1 / -1; /* Month spans full width on mobile */
  }
}

/* ===== FEATURED SPOTLIGHT SECTION ===== */
.spotlight-section {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  border-radius: 16px;
  padding: 28px 32px;
  margin: 0 0 36px;
  position: relative;
  overflow: hidden;
}
.spotlight-section::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(96,165,250,.18) 0%, transparent 70%);
  pointer-events: none;
}
.spotlight-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(96,165,250,.15);
  border: 1px solid rgba(96,165,250,.3);
  border-radius: 50px;
  padding: 4px 12px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #60a5fa;
  margin-bottom: 10px;
}
.spotlight-section h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #f1f5f9;
  margin-bottom: 6px;
  line-height: 1.3;
}
.spotlight-section p {
  font-size: .88rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 18px;
  max-width: 560px;
}
.spotlight-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.spotlight-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.spotlight-chip:hover {
  background: rgba(96,165,250,.2);
  border-color: rgba(96,165,250,.4);
  color: #bfdbfe;
  transform: translateY(-1px);
}
.spotlight-chip .sc-icon { font-size: .9rem; }
.spotlight-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 9px 20px;
  background: #2563eb;
  color: #fff;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s;
}
.spotlight-cta:hover { background: #1d4ed8; }

/* Section dividers with labels */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 32px 0 18px;
}
.section-divider .sd-label {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.section-divider .sd-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-divider .sd-count {
  font-size: .68rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* Wide tool-card variant for featured items */
.tool-card.wide {
  grid-column: span 2;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
}
@media (max-width: 600px) { .tool-card.wide { grid-column: span 1; flex-direction: column; } }
.tool-card.wide .tool-card-icon {
  width: 52px; height: 52px;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.tool-card.wide h3 { font-size: 1rem; }
.tool-card.wide p { font-size: .84rem; }

/* ===== TIME CATEGORY BANNER ===== */
.time-category-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  border-radius: 18px;
  padding: 32px 36px;
  margin: 0 0 32px;
  border: 1px solid rgba(96,165,250,.2);
  position: relative;
  overflow: hidden;
}
.time-category-banner::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(96,165,250,.12) 0%, transparent 70%);
  pointer-events: none;
}
.tcb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(96,165,250,.15);
  border: 1px solid rgba(96,165,250,.3);
  border-radius: 50px;
  padding: 4px 14px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #60a5fa;
  margin-bottom: 12px;
}
.tcb-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: #f1f5f9;
  margin-bottom: 10px;
  line-height: 1.2;
}
.tcb-desc {
  font-size: .88rem;
  color: #94a3b8;
  line-height: 1.65;
  margin-bottom: 20px;
  max-width: 440px;
}
.tcb-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  background: #2563eb;
  color: #fff !important;
  border-radius: 9px;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s, transform .15s;
  border: none;
}
.tcb-cta:hover { background: #1d4ed8; transform: translateY(-1px); }
.tcb-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tcb-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  text-decoration: none;
  transition: all .15s;
}
.tcb-chip:hover {
  background: rgba(96,165,250,.15);
  border-color: rgba(96,165,250,.35);
  transform: translateY(-2px);
}
.tcb-chip-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}
.tcb-chip-name {
  font-size: .82rem;
  font-weight: 700;
  color: #e2e8f0;
  line-height: 1.2;
}
.tcb-chip-desc {
  font-size: .68rem;
  color: #64748b;
  margin-top: 2px;
}

@media (max-width: 768px) {
  .time-category-banner {
    grid-template-columns: 1fr;
    padding: 24px 20px;
    gap: 20px;
  }
  .tcb-chips { grid-template-columns: 1fr 1fr; }
  .tcb-title { font-size: 1.35rem; }
}
@media (max-width: 480px) {
  .tcb-chips { grid-template-columns: 1fr; }
}


.tool-grid .section-divider {
  grid-column: 1 / -1;
  margin: 24px 0 4px;
}

/* ===== TOOL CARD HEADER ROW ===== */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.tool-cat-badge {
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid;
  white-space: nowrap;
  align-self: flex-start;
}
