@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ==========================================================================
   ATLAS DESIGN SYSTEM: GLOSSY GLASSMORPHISM & DUAL THEMES (LIGHT / DARK)
   ========================================================================== */

:root, [data-theme="light"] {
  --theme-mode: light;
  color-scheme: light;

  /* Colors: Light Scheme */
  --background: #f8fafc;
  --background-alt: #f1f5f9;
  --background-mesh: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
                     radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.10) 0px, transparent 50%),
                     radial-gradient(at 50% 100%, rgba(16, 185, 129, 0.08) 0px, transparent 50%);

  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --surface-soft: rgba(241, 245, 249, 0.85);
  --surface-warm: rgba(254, 250, 242, 0.85);
  --surface-glass: rgba(255, 255, 255, 0.65);
  --surface-glass-active: rgba(255, 255, 255, 0.95);

  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-border-subtle: rgba(226, 232, 240, 0.8);
  --glass-specular: inset 0 1px 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 1px 0 rgba(0, 0, 0, 0.03);
  --glass-blur: blur(16px);
  --glass-blur-lg: blur(28px);

  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: rgba(226, 232, 240, 0.85);
  --line-glow: rgba(99, 102, 241, 0.28);

  /* Primary Brand & Accents */
  --primary: #4f46e5;
  --primary-rgb: 79, 70, 229;
  --primary-dark: #4338ca;
  --primary-light: #6366f1;
  --primary-soft: rgba(79, 70, 229, 0.08);
  --primary-glow: rgba(79, 70, 229, 0.35);

  --accent: #06b6d4;
  --accent-soft: rgba(6, 182, 212, 0.12);
  --accent-glow: rgba(6, 182, 212, 0.3);

  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.1);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.1);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow: 0 12px 32px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 60px -8px rgba(15, 23, 42, 0.12), 0 8px 24px -4px rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 0 35px -5px rgba(79, 70, 229, 0.25);

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --container: 1240px;
}

/* ==========================================================================
   DARK THEME (GLOSSY OBSIDIAN & NEON ACCENTS)
   ========================================================================== */

[data-theme="dark"] {
  --theme-mode: dark;
  color-scheme: dark;

  --background: #090d16;
  --background-alt: #0d1322;
  --background-mesh: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.22) 0px, transparent 55%),
                     radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.18) 0px, transparent 55%),
                     radial-gradient(at 50% 100%, rgba(139, 92, 246, 0.16) 0px, transparent 55%);

  --surface: rgba(15, 23, 42, 0.72);
  --surface-solid: #0f172a;
  --surface-soft: rgba(30, 41, 59, 0.65);
  --surface-warm: rgba(24, 32, 47, 0.75);
  --surface-glass: rgba(15, 23, 42, 0.55);
  --surface-glass-active: rgba(30, 41, 59, 0.85);

  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-subtle: rgba(255, 255, 255, 0.06);
  --glass-specular: inset 0 1px 1px 0 rgba(255, 255, 255, 0.18), inset 0 -1px 1px 0 rgba(0, 0, 0, 0.5);

  --ink: #f8fafc;
  --ink-soft: #cbd5e1;
  --muted: #94a3b8;
  --line: rgba(255, 255, 255, 0.09);
  --line-glow: rgba(129, 140, 248, 0.45);

  --primary: #6366f1;
  --primary-rgb: 99, 102, 241;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --primary-soft: rgba(99, 102, 241, 0.16);
  --primary-glow: rgba(99, 102, 241, 0.5);

  --accent: #22d3ee;
  --accent-soft: rgba(34, 211, 238, 0.16);
  --accent-glow: rgba(34, 211, 238, 0.4);

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
  --shadow: 0 16px 40px -4px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  --shadow-lg: 0 28px 70px -8px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --shadow-glow: 0 0 45px -5px rgba(99, 102, 241, 0.4);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: light dark;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--background);
  background-image: var(--background-mesh);
  background-attachment: fixed;
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Ambient glow orb in background */
body::before {
  content: "";
  position: fixed;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, 100vw);
  height: 550px;
  background: radial-gradient(ellipse at center, var(--primary-glow) 0%, rgba(6, 182, 212, 0.12) 40%, transparent 70%);
  filter: blur(70px);
  pointer-events: none;
  z-index: -1;
  opacity: 0.6;
  transition: opacity 0.4s ease;
}

[data-theme="dark"] body::before {
  opacity: 0.85;
}

main {
  flex: 1 0 auto;
}

button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4, p {
  margin-top: 0;
}

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

h1 { font-size: clamp(2.6rem, 5vw, 4.8rem); }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.9rem); }
h3 { font-size: 1.25rem; font-weight: 700; }
p  { color: var(--ink-soft); }

:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 3px;
}

.screen-reader-text, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  z-index: 1000;
  left: 16px;
  top: 16px;
  background: var(--surface-solid);
  color: var(--ink);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

.narrow {
  max-width: 820px;
}

/* ==========================================================================
   UI COMPONENTS & GLOSSY BADGES
   ========================================================================== */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 800;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.4;
}

.eyebrow--pill {
  padding: 8px 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  background: var(--surface-glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-specular), 0 2px 8px var(--primary-soft);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.2;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  text-align: center;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0);
}

/* Glossy Primary Button */
.button--primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 18px -2px var(--primary-glow), var(--glass-specular);
}

.button--primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-25deg);
  transition: left 0.7s ease;
  pointer-events: none;
}

.button--primary:hover::before {
  left: 150%;
}

.button--primary:hover {
  color: #ffffff;
  box-shadow: 0 8px 26px -2px var(--primary-glow);
}

/* Soft Glass Button */
.button--soft {
  background: var(--surface-soft);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  color: var(--primary);
  box-shadow: var(--glass-specular);
}

.button--soft:hover {
  background: var(--primary-soft);
  border-color: var(--primary-light);
  color: var(--primary-dark);
  box-shadow: 0 0 16px var(--primary-soft);
}

[data-theme="dark"] .button--soft:hover {
  color: #ffffff;
}

.button--ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.button--ghost:hover {
  border-color: var(--glass-border);
  color: var(--ink);
  background: var(--surface-soft);
}

.button--sm {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.92rem;
  transition: color 0.2s, transform 0.2s;
}

.text-link:hover {
  color: var(--primary-light);
  transform: translateX(3px);
}

/* ==========================================================================
   SITE HEADER & GLOSSY NAVIGATION
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--glass-border-subtle);
  background: var(--surface);
  backdrop-filter: var(--glass-blur-lg);
  -webkit-backdrop-filter: var(--glass-blur-lg);
  box-shadow: var(--shadow-sm), var(--glass-specular);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.site-header__inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.brand__mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #ffffff;
  font-size: 1.4rem;
  box-shadow: 0 4px 14px var(--primary-glow);
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 28px);
}

.site-nav > a {
  position: relative;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-soft);
  padding: 6px 2px;
  transition: color 0.2s;
}

.site-nav > a:hover {
  color: var(--primary);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* CTA in Nav */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #ffffff !important;
  font-size: 0.86rem;
  font-weight: 700;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

[data-theme="dark"] .nav-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.nav-cta:hover {
  transform: translateY(-2px);
  background: var(--primary);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.nav-cta__arrow {
  transition: transform 0.2s ease;
}

.nav-cta:hover .nav-cta__arrow {
  transform: translate(2px, -2px);
}

/* ==========================================================================
   GLOSSY THEME TOGGLE BUTTON (DARK / LIGHT SWITCH)
   ========================================================================== */

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 64px;
  height: 34px;
  padding: 3px;
  border-radius: var(--radius-full);
  background: var(--surface-soft);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-specular), inset 0 2px 4px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.theme-toggle:hover {
  border-color: var(--primary-light);
  box-shadow: 0 0 18px var(--primary-glow);
}

.theme-toggle__icon {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s, color 0.25s;
}

.theme-toggle__sun {
  color: #f59e0b;
  opacity: 1;
}

.theme-toggle__moon {
  color: var(--muted);
  opacity: 0.6;
}

[data-theme="dark"] .theme-toggle__sun {
  color: var(--muted);
  opacity: 0.5;
  transform: scale(0.85);
}

[data-theme="dark"] .theme-toggle__moon {
  color: #818cf8;
  opacity: 1;
  transform: scale(1.1);
}

.theme-toggle__pill {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-solid);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), var(--glass-specular);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s;
  z-index: 1;
}

[data-theme="dark"] .theme-toggle__pill {
  transform: translateX(30px);
  background: #1e293b;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.menu-toggle {
  display: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px solid var(--glass-border);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
  transition: transform 0.2s;
}

/* ==========================================================================
   HERO SECTION & VISUAL ORBIT
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding-bottom: 40px;
}

.hero__inner {
  min-height: 480px;
  padding-top: 70px;
  padding-bottom: 50px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
}

.hero__copy {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.hero h1 {
  margin: 22px 0;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__copy > p {
  font-size: 1.12rem;
  line-height: 1.8;
  max-width: 560px;
  color: var(--ink-soft);
}

.hero__actions {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* Hero Visual Animation */
.hero__visual {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  margin: auto;
}

.visual-glow {
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  filter: blur(40px);
  z-index: 0;
}

.visual-orbit {
  position: absolute;
  border: 1px dashed var(--line-glow);
  border-radius: 50%;
  inset: 10%;
  animation: orbitRotate 45s linear infinite;
}

.visual-orbit--two {
  inset: 24%;
  border-style: solid;
  border-color: var(--glass-border-subtle);
  animation: orbitRotate 30s linear infinite reverse;
}

@keyframes orbitRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.visual-center {
  position: absolute;
  inset: 37%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 30%;
  font-size: 4rem;
  color: #ffffff;
  box-shadow: 0 20px 60px var(--primary-glow), var(--glass-specular);
  z-index: 2;
}

.visual-chip {
  position: absolute;
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow), var(--glass-specular);
  font-size: 1.9rem;
  color: var(--primary);
  font-weight: 800;
  z-index: 3;
  transition: transform 0.3s ease;
}

.visual-chip:hover {
  transform: scale(1.1) rotate(5deg);
}

.visual-chip--top { top: 2%; left: 40%; }
.visual-chip--left { top: 40%; left: 0%; }
.visual-chip--right { top: 26%; right: 0%; }
.visual-chip--bottom { bottom: 2%; right: 24%; }

/* ==========================================================================
   GLOSSY SEARCH BAR & AUTOCOMPLETE
   ========================================================================== */

.hero__search {
  position: relative;
  z-index: 10;
  margin-top: 15px;
  background: var(--surface);
  backdrop-filter: var(--glass-blur-lg);
  -webkit-backdrop-filter: var(--glass-blur-lg);
  padding: 24px 28px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--glass-specular);
}

.hero__search-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.hero__search-head span:first-child {
  color: var(--primary);
}

.tool-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 6px 8px 6px 18px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tool-search:focus-within {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-soft), 0 0 20px var(--primary-glow);
}

.tool-search__icon {
  font-size: 1.6rem;
  color: var(--primary);
  line-height: 1;
}

.tool-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: none;
  background: none;
  padding: 12px 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
}

.tool-search input::placeholder {
  color: var(--muted);
}

.tool-search button {
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  font-weight: 700;
  padding: 12px 26px;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.tool-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 320px;
  overflow: auto;
  background: var(--surface-solid);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
}

.search-suggestions a {
  display: block;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  transition: background 0.15s;
}

.search-suggestions a:hover, .search-suggestions a:focus {
  background: var(--primary-soft);
  color: var(--primary);
  outline: none;
}

.hero__hint {
  margin: 14px 4px 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.hero__hint a {
  color: var(--primary);
  font-weight: 700;
}

.hero__hint a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   SECTIONS & GLOSSY GRIDS
   ========================================================================== */

.section {
  padding: 90px 0;
}

.section--tint {
  background: var(--surface-soft);
}

.section--cream {
  background: var(--surface-warm);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 38px;
}

.section-head h2 {
  margin: 10px 0 0;
}

.section-head p {
  margin: 6px 0 0;
  font-size: 1.05rem;
}

/* Tool Grid */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

/* Glossy Tool Card */
.tool-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 250px;
  padding: 24px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow), var(--glass-specular);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.tool-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-glow);
  box-shadow: var(--shadow-lg), var(--shadow-glow), var(--glass-specular);
}

.tool-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.tool-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  font-size: 1.55rem;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-specular);
  transition: transform 0.2s ease, background 0.2s ease;
}

.tool-card:hover .tool-icon {
  transform: scale(1.08);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.save-tool {
  border: 0;
  background: none;
  font-size: 1.5rem;
  color: var(--muted);
  line-height: 1;
  padding: 6px;
  border-radius: 50%;
  transition: color 0.2s, transform 0.2s;
}

.save-tool:hover {
  color: var(--primary);
  transform: scale(1.15);
}

.save-tool[aria-pressed="true"] {
  color: #ef4444;
}

.tool-card h3 {
  font-size: 1.16rem;
  margin-bottom: 8px;
  letter-spacing: -0.035em;
}

.tool-card h3 a:hover {
  color: var(--primary);
}

.tool-card > p {
  font-size: 0.86rem;
  line-height: 1.6;
  margin-bottom: 22px;
  color: var(--ink-soft);
}

.tool-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.tool-card__category {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tool-card__link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  transition: color 0.2s, transform 0.2s;
}

.tool-card__link:hover {
  color: var(--primary);
  transform: translateX(2px);
}

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  position: relative;
  min-height: 180px;
  padding: 26px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow), var(--glass-specular);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-glow);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.category-card__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.4rem;
  border: 1px solid var(--glass-border);
}

.category-card h3 {
  font-size: 1.15rem;
  margin: 18px 0 4px;
}

.category-card p {
  font-size: 0.82rem;
  margin: 0;
  color: var(--muted);
}

.category-card__arrow {
  position: absolute;
  right: 24px;
  top: 24px;
  color: var(--primary);
  font-weight: 800;
  transition: transform 0.2s;
}

.category-card:hover .category-card__arrow {
  transform: translate(3px, -3px);
}

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.step {
  border-top: 2px solid var(--line);
  padding-top: 24px;
  transition: border-color 0.2s;
}

.step:hover {
  border-color: var(--primary);
}

.step__num {
  font-family: 'JetBrains Mono', monospace;
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 800;
}

.step h3 {
  margin: 16px 0 8px;
}

.step p {
  font-size: 0.9rem;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-grid > div {
  padding: 34px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow), var(--glass-specular);
}

.feature-icon {
  font-size: 2.2rem;
  display: inline-block;
  margin-bottom: 12px;
}

.feature-grid h3 {
  margin: 12px 0 8px;
}

.feature-grid p {
  font-size: 0.92rem;
  margin: 0;
}

/* FAQ Accordion */
.faq-list {
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: '+';
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 400;
  transition: transform 0.2s ease;
}

.faq-list details[open] summary::after {
  content: '−';
}

.faq-list p {
  margin: 14px 0 0;
  font-size: 0.96rem;
  line-height: 1.7;
}

/* Final CTA */
.final-cta {
  padding: 90px 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.final-cta .eyebrow {
  color: var(--accent);
}

.final-cta h2 {
  color: #ffffff;
  margin: 12px 0;
}

.final-cta p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
}

.final-cta .tool-search {
  max-width: 680px;
  margin: 32px auto 0;
  background: rgba(255, 255, 255, 0.95);
}

.final-cta .tool-search input {
  color: #0f172a;
}

/* ==========================================================================
   TOOL WORKSPACE STYLES (SINGLE TOOL PAGE)
   ========================================================================== */

.page-main {
  min-height: 65vh;
  padding: 60px 0 100px;
}

.tool-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 34px;
}

.tool-heading > div {
  max-width: 780px;
}

.tool-heading h1 {
  margin: 10px 0 8px;
}

.tool-heading p {
  font-size: 1.1rem;
  margin: 0;
}

.tool-workspace {
  padding: 38px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  backdrop-filter: var(--glass-blur-lg);
  -webkit-backdrop-filter: var(--glass-blur-lg);
  box-shadow: var(--shadow-lg), var(--glass-specular);
}

.tool-workspace__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.tool-workspace__head h2 {
  font-size: 1.6rem;
  margin: 4px 0 0;
}

.tool-workspace__head p {
  font-size: 0.88rem;
  max-width: 440px;
  margin: 0;
  color: var(--muted);
}

.tool-form {
  padding: 32px;
  background: var(--surface-glass);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.tool-form label {
  display: block;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.tool-form input:not([type=checkbox]):not([type=radio]),
.tool-form textarea,
.tool-form select {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  color: var(--ink);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tool-form textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.55;
  font-family: inherit;
}

.tool-form input:focus,
.tool-form textarea:focus,
.tool-form select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft), 0 0 16px var(--primary-glow);
  outline: none;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.simple-field--wide {
  grid-column: 1 / -1;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* Dropzone (Drag and drop files) */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 38px 24px;
  border: 2px dashed var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  backdrop-filter: var(--glass-blur);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
  text-align: center;
}

.dropzone input[type=file] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dropzone__icon {
  font-size: 2.2rem;
  color: var(--primary);
  line-height: 1;
}

.dropzone__text {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.dropzone__text strong {
  color: var(--primary);
}

.dropzone__files {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--success);
  margin-top: 4px;
}

.dropzone:hover, .dropzone.is-dragging {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 24px var(--primary-glow);
}

/* Color Field */
.color-field {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.color-field input[type=color] {
  width: 52px;
  height: 44px;
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  cursor: pointer;
}

.color-field code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92rem;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  background: var(--surface-soft);
  color: var(--primary);
}

/* Simple Result / Workspace Output */
.simple-result, .tool-result {
  margin-top: 26px;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--surface-solid);
  border: 1px solid var(--line-glow);
  box-shadow: var(--shadow), var(--glass-specular);
}

.simple-result__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.simple-result output {
  display: block;
  margin: 10px 0 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.6;
}

.simple-result output.is-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 16px;
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
  max-height: 380px;
  overflow: auto;
}

.simple-error, .field-error {
  margin: 16px 0 0;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.simple-error[hidden], .field-error[hidden], .simple-result[hidden], .tool-result[hidden] {
  display: none !important;
}

.tool-privacy {
  margin: 18px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Tool Content & Sidebar */
.tool-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  margin: 60px 0;
}

.tool-section-card {
  padding: 34px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

.tool-section-card h2 {
  margin: 10px 0 16px;
  font-size: 1.6rem;
}

.aside-card {
  padding: 30px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm);
}

.aside-card h3 {
  margin: 10px 0 8px;
}

.aside-card p {
  font-size: 0.88rem;
}

/* ==========================================================================
   DIRECTORY & FILTER TOOLBAR
   ========================================================================== */

.directory-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 30px 0 24px;
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pills button,
.filter-pills a,
.filter-pills .filter-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding: 8px 18px;
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.filter-pills button:hover,
.filter-pills button.is-active,
.filter-pills a:hover,
.filter-pills a.is-active,
.filter-pills .filter-link:hover,
.filter-pills .filter-link.is-active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px var(--primary-glow) !important;
}

.results-count {
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 16px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  margin-top: auto;
  background: var(--surface-solid);
  border-top: 1px solid var(--glass-border);
  color: var(--ink-soft);
  padding: 70px 0 24px;
  transition: background-color 0.3s ease;
}

[data-theme="dark"] .site-footer {
  background: #0b0f19;
}

.footer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.footer-head p {
  margin: 8px 0 0;
  font-size: 0.92rem;
  max-width: 520px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 34px;
  padding: 48px 0;
}

.footer-grid h2 {
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 18px;
  color: var(--ink);
}

.footer-grid a {
  display: block;
  margin: 10px 0;
  font-size: 0.88rem;
  color: var(--muted);
  transition: color 0.2s, transform 0.2s;
}

.footer-grid a:hover {
  color: var(--primary);
  transform: translateX(2px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================================================== */

@media (max-width: 1080px) {
  .tool-grid, .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero__inner {
    grid-template-columns: 1fr 0.8fr;
  }
}

@media (max-width: 820px) {
  .container {
    width: min(calc(100% - 32px), var(--container));
  }
  .menu-toggle {
    display: block;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    padding: 20px;
    background: var(--surface-solid);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .site-nav.is-open {
    display: flex;
  }
  .site-nav > a {
    padding: 12px 14px;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
  }
  .site-nav > a:hover {
    background: var(--primary-soft);
  }
  .hero__inner {
    grid-template-columns: 1fr;
    padding-top: 40px;
  }
  .hero__visual {
    display: none;
  }
  .tool-grid, .category-grid, .steps-grid, .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tool-content {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .tool-grid, .category-grid, .steps-grid, .feature-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .field-grid {
    grid-template-columns: 1fr;
  }
  .footer-head, .footer-bottom, .tool-heading, .tool-workspace__head {
    flex-direction: column;
    align-items: flex-start;
  }
  .tool-workspace {
    padding: 20px;
    border-radius: var(--radius-lg);
  }
  .tool-form {
    padding: 20px;
  }
}


/* ==========================================================================
   BLOG / ARTICLE GRID (WORDPRESS STYLE, COMPACT FEATURED IMAGES, 3 COLUMNS)
   ========================================================================== */

.article-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 28px !important;
  width: 100% !important;
  margin-top: 24px !important;
  margin-bottom: 32px !important;
}

@media (max-width: 960px) {
  .article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
  }
}

@media (max-width: 600px) {
  .article-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
}

.article-card {
  display: flex !important;
  flex-direction: column !important;
  background: var(--surface) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--radius-lg, 16px) !important;
  overflow: hidden !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  box-shadow: var(--shadow), var(--glass-specular) !important;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease, border-color 0.28s ease !important;
  height: 100% !important;
}

.article-card:hover {
  transform: translateY(-5px) !important;
  border-color: var(--line-glow) !important;
  box-shadow: var(--shadow-lg), var(--shadow-glow) !important;
}

.article-card__image-link {
  display: block !important;
  overflow: hidden !important;
  background: var(--surface-soft) !important;
}

.article-card__image {
  position: relative !important;
  width: 100% !important;
  height: 180px !important;
  max-height: 180px !important;
  overflow: hidden !important;
  background: var(--surface-soft) !important;
  border-bottom: 1px solid var(--glass-border-subtle) !important;
}

.article-card__image img {
  width: 100% !important;
  height: 100% !important;
  max-height: 180px !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.article-card:hover .article-card__image img {
  transform: scale(1.05) !important;
}

.article-card__placeholder {
  width: 100% !important;
  height: 180px !important;
  min-height: 180px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: linear-gradient(135deg, var(--surface-soft) 0%, var(--surface) 100%) !important;
  border-bottom: 1px solid var(--line) !important;
}

.article-card__placeholder .placeholder-icon {
  font-size: 2rem !important;
  color: var(--primary) !important;
  opacity: 0.8 !important;
}

.article-card__placeholder .placeholder-tag {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: var(--muted) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
}

.article-card__body {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  padding: 20px !important;
}

.article-card__meta {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 10px !important;
}

.article-card__tag {
  display: inline-block !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: var(--primary) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  background: var(--primary-soft) !important;
  padding: 3px 10px !important;
  border-radius: var(--radius-xs, 6px) !important;
  border: 1px solid var(--glass-border-subtle) !important;
}

.article-card__date {
  font-size: 0.78rem !important;
  color: var(--muted) !important;
  font-weight: 600 !important;
}

.article-card__title {
  font-size: 1.12rem !important;
  font-weight: 750 !important;
  line-height: 1.38 !important;
  margin: 0 0 10px 0 !important;
  letter-spacing: -0.025em !important;
}

.article-card__title a {
  color: var(--ink) !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
}

.article-card__title a:hover {
  color: var(--primary) !important;
}

.article-card__excerpt {
  font-size: 0.88rem !important;
  line-height: 1.6 !important;
  color: var(--ink-soft) !important;
  margin: 0 0 16px 0 !important;
  flex: 1 !important;
}

.article-card__read-more {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 0.84rem !important;
  font-weight: 700 !important;
  color: var(--primary) !important;
  margin-top: auto !important;
  text-decoration: none !important;
  transition: gap 0.2s ease, color 0.2s ease !important;
}

.article-card__read-more:hover {
  color: var(--primary-dark) !important;
  gap: 10px !important;
}

/* ==========================================================================
   HIGH-CONTRAST DUAL THEME COLORING FIX (LIGHT & DARK HOMEPAGE TEXT & HERO)
   ========================================================================== */

/* Light Theme Strict Contrast Overrides */
:root, [data-theme="light"], html[data-theme="light"] {
  --ast-global-color-0: #4f46e5;
  --ast-global-color-1: #4338ca;
  --ast-global-color-2: #0f172a;
  --ast-global-color-3: #334155;
  --ast-global-color-4: #f8fafc;
  --ast-global-color-5: #ffffff;
}

/* Dark Theme Strict Contrast Overrides */
[data-theme="dark"], html[data-theme="dark"] {
  --ast-global-color-0: #818cf8;
  --ast-global-color-1: #6366f1;
  --ast-global-color-2: #f8fafc;
  --ast-global-color-3: #cbd5e1;
  --ast-global-color-4: #090d16;
  --ast-global-color-5: #0f172a;
}

/* Ensure Astra parent theme or WordPress core containers inherit the active theme colors */
html[data-theme="dark"],
html[data-theme="dark"] body,
html[data-theme="dark"] #page,
html[data-theme="dark"] .site,
html[data-theme="dark"] #content,
html[data-theme="dark"] .site-content,
html[data-theme="dark"] .ast-container,
html[data-theme="dark"] .ast-separate-container,
html[data-theme="dark"] .ast-page-builder-template,
html[data-theme="dark"] .entry-content,
html[data-theme="dark"] main,
html[data-theme="dark"] #main-content {
  color: var(--ink, #f8fafc) !important;
  background-color: var(--background, #090d16) !important;
  background-image: var(--background-mesh) !important;
}

html[data-theme="light"],
html[data-theme="light"] body,
html[data-theme="light"] #page,
html[data-theme="light"] .site,
html[data-theme="light"] #content,
html[data-theme="light"] .site-content,
html[data-theme="light"] .ast-container,
html[data-theme="light"] .ast-separate-container,
html[data-theme="light"] .ast-page-builder-template,
html[data-theme="light"] .entry-content,
html[data-theme="light"] main,
html[data-theme="light"] #main-content {
  color: var(--ink, #0f172a) !important;
  background-color: var(--background, #f8fafc) !important;
  background-image: var(--background-mesh) !important;
}

/* Hero Section Specific Contrast Overrides */
html[data-theme="dark"] .hero {
  background-color: #090d16 !important;
  background-image: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.24) 0px, transparent 55%),
                    radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.20) 0px, transparent 55%),
                    radial-gradient(at 50% 100%, rgba(139, 92, 246, 0.18) 0px, transparent 55%) !important;
}

html[data-theme="dark"] .hero h1,
html[data-theme="dark"] .hero__copy h1 {
  color: #f8fafc !important;
  text-shadow: 0 2px 25px rgba(0, 0, 0, 0.8) !important;
}

html[data-theme="dark"] .hero__copy > p {
  color: #cbd5e1 !important;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.7) !important;
}

html[data-theme="dark"] .hero h1 em {
  background: linear-gradient(135deg, #818cf8 0%, #22d3ee 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

html[data-theme="dark"] .eyebrow {
  color: #a5b4fc !important;
  background: rgba(99, 102, 241, 0.20) !important;
  border-color: rgba(99, 102, 241, 0.35) !important;
}

html[data-theme="light"] .hero {
  background-color: #f8fafc !important;
  background-image: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
                    radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.06) 0px, transparent 50%),
                    radial-gradient(at 50% 100%, rgba(16, 185, 129, 0.05) 0px, transparent 50%) !important;
}

html[data-theme="light"] .hero h1,
html[data-theme="light"] .hero__copy h1 {
  color: #0f172a !important;
  text-shadow: none !important;
}

html[data-theme="light"] .hero__copy > p {
  color: #334155 !important;
  text-shadow: none !important;
}

html[data-theme="light"] .hero h1 em {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

html[data-theme="light"] .eyebrow {
  color: #4f46e5 !important;
  background: rgba(79, 70, 229, 0.08) !important;
  border-color: rgba(79, 70, 229, 0.18) !important;
}

/* Headings contrast across all modes */
h1, h2, h3, h4, h5, h6,
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4,
.section-head h2, .feature-grid h3, .step h3,
.category-card h3, .faq-list summary {
  color: var(--ink) !important;
}

/* Paragraphs and descriptive text contrast */
p,
.entry-content p,
.section-head p,
.feature-grid p,
.step p,
.category-card p,
.faq-list p {
  color: var(--ink-soft) !important;
}

/* Tool card specific contrast */
.tool-card h3 a {
  color: var(--ink) !important;
}

.tool-card h3 a:hover {
  color: var(--primary) !important;
}

.tool-card > p {
  color: var(--ink-soft) !important;
}

.tool-card__category {
  color: var(--primary) !important;
}

.tool-card__link {
  color: var(--ink) !important;
}

.tool-card__link:hover {
  color: var(--primary) !important;
}

/* Hero search and search hints */
.hero__search-head span:first-child {
  color: var(--primary) !important;
}

.hero__search-head span:last-child {
  color: var(--muted) !important;
}

.hero__hint {
  color: var(--muted) !important;
}

.hero__hint a {
  color: var(--primary) !important;
}

/* Tool search inputs in all sections */
.tool-search input {
  color: var(--ink) !important;
}

.tool-search input::placeholder {
  color: var(--muted) !important;
}

/* Final CTA on Homepage */
.final-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
  color: #ffffff !important;
}

.final-cta h2 {
  color: #ffffff !important;
}

.final-cta p {
  color: rgba(255, 255, 255, 0.9) !important;
}

.final-cta .eyebrow {
  color: var(--accent) !important;
}

.final-cta .tool-search {
  background: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

.final-cta .tool-search input {
  color: #0f172a !important;
}

.final-cta .tool-search input::placeholder {
  color: #64748b !important;
}

.final-cta .tool-search .tool-search__icon {
  color: var(--primary) !important;
}
