/* ============================================================
   UtilityGet - Global Stylesheet
   Brand color: Sky Blue (#0ea5e9)
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --bg:            #ffffff;
  --bg-secondary:  #f8fafc;
  --bg-tertiary:   #f1f5f9;
  --text:          #0f172a;
  --text-secondary:#475569;
  --text-muted:    #94a3b8;
  --border:        #e2e8f0;
  --border-hover:  #cbd5e1;
  --accent:        #0ea5e9;
  --accent-hover:  #0284c7;
  --accent-light:  #e0f2fe;
  --accent-dark:   #0369a1;
  --accent-soft:   rgba(14, 165, 233, 0.10);
  --accent-glow:   rgba(14, 165, 233, 0.28);
  --success:       #22c55e;
  --warning:       #f59e0b;
  --danger:        #ef4444;
  --shadow-sm:     0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md:     0 4px 12px rgba(15,23,42,0.06), 0 2px 4px rgba(15,23,42,0.04);
  --shadow-lg:     0 12px 28px rgba(15,23,42,0.08), 0 4px 8px rgba(15,23,42,0.04);
  --shadow-hover:  0 24px 40px rgba(15,23,42,0.10), 0 8px 16px rgba(15,23,42,0.05);
  --shadow-accent: 0 10px 28px -8px rgba(14,165,233,0.35);
  --gradient-accent: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --radius-xl:     24px;
  --font:          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:     ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  --max-w:         1600px;
  --max-w-hub:     1400px;
  --max-w-prose:   780px;
  --header-h:      64px;
  --transition:    0.2s ease;
}

[data-theme="dark"] {
  --bg:            #0b1220;
  --bg-secondary:  #111a2e;
  --bg-tertiary:   #1c2742;
  --text:          #f1f5f9;
  --text-secondary:#cbd5e1;
  --text-muted:    #94a3b8;
  --border:        #243049;
  --border-hover:  #334761;
  --accent:        #38bdf8;
  --accent-hover:  #7dd3fc;
  --accent-light:  rgba(56, 189, 248, 0.14);
  --accent-dark:   #bae6fd;
  --accent-soft:   rgba(56, 189, 248, 0.12);
  --accent-glow:   rgba(56, 189, 248, 0.35);
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.35);
  --shadow-md:     0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg:     0 12px 28px rgba(0,0,0,0.45);
  --shadow-hover:  0 24px 40px rgba(0,0,0,0.55);
  --shadow-accent: 0 10px 28px -8px rgba(56,189,248,0.45);
  --gradient-accent: linear-gradient(135deg, var(--accent) 0%, #0ea5e9 100%);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
  color-scheme: light dark;
}

[data-theme="light"] { color-scheme: light; }
[data-theme="dark"]  { color-scheme: dark; }

:target,
[id] { scroll-margin-top: calc(var(--header-h) + 1.25rem); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background var(--transition), color var(--transition);
}

img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: var(--font); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.btn:focus-visible,
.tool-card:focus-visible,
.hub-card:focus-visible,
.card:focus-visible {
  outline-offset: 3px;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  color: var(--text);
  font-weight: 700;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.875rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }

p { color: var(--text-secondary); }

main { flex: 1; }

/* ---------- Layout Utilities ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) { .container { padding: 0 2rem; } }
@media (min-width: 1024px) { .container { padding: 0 2.5rem; } }
@media (min-width: 1280px) { .container { padding: 0 3rem; } }
@media (min-width: 1600px) { .container { padding: 0 3.5rem; } }

/* Width modifiers for content that shouldn't span the full 1440px */
.container-prose { max-width: var(--max-w-prose); }
.container-hub   { max-width: var(--max-w-hub); }

.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;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  border-bottom-color: transparent;
  box-shadow: var(--shadow-sm);
}

@supports not (background: color-mix(in srgb, white, black)) {
  .site-header { background: var(--bg); }
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.logo:hover { color: var(--text); }

.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--gradient-accent);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 4px 12px -4px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.2);
}

.logo-text span { color: var(--accent); }

/* Nav */
.site-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}

@media (min-width: 768px) { .site-nav { display: flex; } }

.nav-link {
  position: relative;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0.875rem;
  right: 0.875rem;
  bottom: 0.35rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition);
}

.nav-link:hover { color: var(--text); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-link.active {
  color: var(--text);
}
.nav-link.active::after { transform: scaleX(1); }

/* Header actions */
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Theme toggle */
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.theme-toggle:hover {
  background: var(--bg-secondary);
  color: var(--text);
  border-color: var(--border-hover);
}

/* Hamburger */
.hamburger {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 768px) { .hamburger { display: none; } }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  z-index: 99;
  box-shadow: var(--shadow-lg);
}

.mobile-nav.open { display: block; }

.mobile-nav a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  transition: background var(--transition);
  min-height: 44px;
  line-height: 1;
  display: flex;
  align-items: center;
}

.mobile-nav a:hover { background: var(--bg-secondary); color: var(--text); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

@media (min-width: 1024px) {
  .site-footer { padding: 4rem 0 2.5rem; }
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-inner {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    grid-template-areas:
      "brand navs"
      "copy  copy";
    column-gap: 3rem;
    row-gap: 1.75rem;
    align-items: start;
    text-align: left;
  }
  .footer-inner > .footer-brand     { grid-area: brand; }
  .footer-inner > .footer-nav-group { grid-area: navs; }
  .footer-inner > .footer-copy      { grid-area: copy; }
}

@media (min-width: 1024px) {
  .footer-inner {
    grid-template-columns: minmax(260px, 1.2fr) 2fr;
    column-gap: 4rem;
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 320px;
}

@media (min-width: 768px) {
  .footer-brand { align-items: flex-start; max-width: 420px; }
}

.footer-brand .logo { font-size: 1.1rem; }
.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0.3rem 0;
  transition: color var(--transition), transform var(--transition);
}

.footer-links a:hover { color: var(--accent); }

@media (min-width: 1024px) {
  .footer-links a:hover { transform: translateX(2px); }
}

.footer-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  align-items: center;
}

@media (min-width: 768px) {
  .footer-nav-group {
    align-items: flex-end;
    gap: 0.75rem;
  }
  .footer-nav-group .footer-links {
    justify-content: flex-end;
    gap: 0.25rem 1.25rem;
  }
}

.footer-hubs a {
  color: var(--text);
  font-weight: 600;
}

.footer-hubs a:hover { color: var(--accent); }

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .footer-copy {
    width: 100%;
    text-align: center;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform 0.15s, box-shadow var(--transition), border-color var(--transition);
  min-height: 44px;
  white-space: nowrap;
  text-decoration: none;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(14,165,233,0.2), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent), inset 0 1px 0 rgba(255,255,255,0.2);
  filter: brightness(1.05);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-hover);
  color: var(--text);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-light);
  color: var(--accent-hover);
}

.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; min-height: 52px; border-radius: var(--radius-md); }
.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.875rem; min-height: 36px; }

/* ---------- Cards ---------- */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

/* ---------- Tool Card ---------- */
.tool-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.375rem 1.375rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .tool-card { padding: 1.5rem 1.5rem 1.375rem; gap: 0.875rem; }
}

.tool-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
  color: var(--text);
}

.tool-card:hover::after { transform: scaleX(1); }

.tool-card-icon {
  font-size: 1.75rem;
  line-height: 1;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

@media (min-width: 1024px) {
  .tool-card-icon { width: 52px; height: 52px; font-size: 1.875rem; }
}

.tool-card:hover .tool-card-icon {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent-dark);
  transform: rotate(-6deg) scale(1.05);
}

.tool-card-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.005em;
}

@media (min-width: 1024px) {
  .tool-card-name { font-size: 1rem; }
}

.tool-card-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

@media (min-width: 1024px) {
  .tool-card-desc { font-size: 0.875rem; line-height: 1.55; }
}

.tool-card-arrow {
  font-size: 0.8125rem;
  color: var(--accent);
  font-weight: 700;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap var(--transition);
}

.tool-card:hover .tool-card-arrow { gap: 0.5rem; }

/* ---------- Forms ---------- */
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }

label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.5;
  min-height: 44px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14,165,233,0.15);
}

textarea { min-height: 140px; resize: vertical; font-family: var(--font-mono); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-privacy {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

[data-theme="dark"] .badge-privacy {
  background: #14532d;
  color: #86efac;
  border-color: #166534;
}

.badge-new {
  background: var(--accent-light);
  color: var(--accent-dark);
  border: 1px solid var(--accent);
}

.tool-card-badge-new {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-dark);
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.125rem 0.5rem;
  line-height: 1.4;
  z-index: 1;
  pointer-events: none;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 1.25rem 0 0.5rem;
}

.breadcrumb a {
  color: var(--text-secondary);
  padding: 0.125rem 0;
  transition: color var(--transition);
}

.breadcrumb a:hover { color: var(--accent); }

.breadcrumb-sep { color: var(--text-muted); font-size: 0.8125rem; }
.breadcrumb-current { color: var(--text); font-weight: 600; }

/* ---------- Ad Slots ---------- */
/* Hidden until AdSense approval. Remove the `display: none` below and insert
   real <ins class="adsbygoogle"> units inside each .ad-slot to enable ads. */
.ad-slot {
  display: none;
}

.ad-slot-leaderboard { min-height: 90px; width: 100%; margin: 1.5rem 0; }
.ad-slot-sidebar { min-height: 250px; width: 100%; }
.ad-slot-in-content { min-height: 250px; width: 100%; margin: 2rem 0; }
.ad-slot-below-results { min-height: 90px; width: 100%; margin: 1.5rem 0; }

/* ---------- Hero (Homepage) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 0 3rem;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, var(--accent-soft), transparent 60%),
    linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg) 80%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle, var(--border) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 0%, transparent 70%);
  pointer-events: none;
}

@media (min-width: 1024px) {
  .hero { padding: 5.5rem 0 4.5rem; }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg);
  color: var(--accent-dark);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.375rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 14px -6px var(--accent-glow);
}

[data-theme="dark"] .hero-eyebrow {
  background: var(--bg-secondary);
  color: var(--accent-dark);
}

.hero h1 {
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
}

@media (min-width: 1280px) {
  .hero h1 { font-size: clamp(2.75rem, 4.5vw, 4rem); }
}

.hero h1 .hero-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

[data-theme="dark"] .hero h1 .hero-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Stats strip in hero */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 0;
  margin: 2.5rem auto 0;
  max-width: 640px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.875rem 1rem;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 560px) {
  .hero-stats { grid-template-columns: repeat(4, 1fr); gap: 0; }
}

.hero-stat {
  padding: 0.25rem 0.5rem;
  text-align: center;
  position: relative;
}

/* Vertical dividers only apply in the 4-column layout where adjacency
   is guaranteed to be on the same row */
@media (min-width: 560px) {
  .hero-stat + .hero-stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 15%;
    bottom: 15%;
    width: 1px;
    background: var(--border);
  }
}

.hero-stat-value {
  display: block;
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

@media (min-width: 1024px) {
  .hero-stat-value { font-size: 1.625rem; }
}

.hero-stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
  font-weight: 600;
}

.hero-sub {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 2.25rem;
  line-height: 1.65;
}

@media (min-width: 1024px) {
  .hero-sub { font-size: 1.125rem; max-width: 680px; }
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  justify-content: center;
  margin-top: 2.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.hero-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.875rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), transform var(--transition);
}

.hero-trust-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.hero-trust-item span:first-child { font-size: 1rem; }

/* ---------- Search ---------- */
.search-wrap {
  max-width: 620px;
  margin: 0 auto;
  position: relative;
  border-radius: 999px;
  box-shadow: 0 16px 40px -18px var(--accent-glow), 0 4px 10px rgba(15,23,42,0.06);
  transition: box-shadow var(--transition), transform var(--transition);
}

.search-wrap:focus-within {
  box-shadow: 0 20px 48px -18px var(--accent-glow), 0 6px 14px rgba(15,23,42,0.08);
  transform: translateY(-1px);
}

.search-input {
  padding-left: 3rem !important;
  padding-right: 1.25rem !important;
  background: var(--bg) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 999px !important;
  font-size: 1rem !important;
  height: 56px;
}

@media (min-width: 1024px) {
  .search-input { height: 60px; font-size: 1.0625rem !important; }
}

.search-input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 4px var(--accent-soft) !important;
}

.search-icon {
  position: absolute;
  left: 1.125rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
  z-index: 1;
}

/* ---------- Tools Grid ---------- */
.tools-section { padding: 3rem 0 1rem; }

@media (min-width: 1024px) {
  .tools-section { padding: 4rem 0 2rem; }
}

.category-block {
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}

@media (min-width: 768px) {
  .category-block { padding: 1.75rem; }
}

@media (min-width: 1024px) {
  .category-block {
    margin-bottom: 2.5rem;
    padding: 2rem 2.25rem;
  }
}

@media (min-width: 1280px) {
  .category-block { padding: 2.25rem 2.5rem; }
}

.category-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 1024px) {
  .category-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }
}

.category-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  color: var(--accent-dark);
  border-radius: var(--radius-md);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.category-title {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

@media (min-width: 1024px) {
  .category-title { font-size: 1.3125rem; }
}

.category-count {
  margin-left: auto;
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

@media (min-width: 768px) {
  .tools-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.125rem; }
}

@media (min-width: 1280px) {
  .tools-grid { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 1.25rem; }
}

@media (min-width: 1600px) {
  .tools-grid { grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 1.375rem; }
}

/* ---------- Tool Page Layout ---------- */
.tool-page-header { padding: 1.5rem 0 0; }

.tool-page-header h1 {
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.tool-page-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2rem 0;
}

@media (min-width: 1024px) {
  .tool-page-main { grid-template-columns: minmax(0, 1fr) 300px; gap: 2rem; }
}

@media (min-width: 1280px) {
  .tool-page-main { grid-template-columns: minmax(0, 1fr) 340px; gap: 2.5rem; }
}

@media (min-width: 1600px) {
  .tool-page-main { grid-template-columns: minmax(0, 1fr) 360px; gap: 3rem; }
}

.tool-area { min-width: 0; }

.tool-sidebar { display: flex; flex-direction: column; gap: 1.5rem; }

@media (max-width: 1023px) {
  .tool-sidebar { display: none; }
}

/* ---------- Tool Container ---------- */
.tool-container {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  min-height: 300px;
}

@media (min-width: 1280px) {
  .tool-container { padding: 2.5rem; }
}

/* ---------- Content Sections (How to Use, FAQ, etc.) ---------- */
.content-sections { margin-top: 3rem; display: flex; flex-direction: column; gap: 2.5rem; }

.content-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

@media (min-width: 1280px) {
  .content-section { padding: 2.25rem 2.5rem; }
  .content-section p,
  .content-section li { max-width: 72ch; }
}

.content-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.content-section p, .content-section li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.content-section ol, .content-section ul {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.content-section ol { list-style: decimal; }
.content-section ul { list-style: disc; }

.content-section h3 {
  font-size: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-weight: 600;
}

.content-section h3:first-child { margin-top: 0; }

/* ---------- Hub 2-column section grid ---------- */
/* Pairs two adjacent .content-section blocks side-by-side on wider
   viewports so hub pages don't leave big empty columns to the right. */
.hub-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.hub-grid-2 > .content-section {
  margin-bottom: 0 !important;
  height: 100%;
}

@media (min-width: 960px) {
  .hub-grid-2 { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1280px) {
  .hub-grid-2 { gap: 2rem; }
  .hub-grid-2 .content-section p,
  .hub-grid-2 .content-section li { max-width: none; }
}

/* ---------- Related tools 2-column list ---------- */
/* A bullet list that flows into two columns on wider viewports so the
   "Related tools" cards don't leave a big empty gap on the right. */
.content-section ul.related-tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

@media (min-width: 900px) {
  .content-section ul.related-tools-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 2rem;
  }
}

@media (min-width: 1280px) {
  .content-section ul.related-tools-grid li { max-width: none; }
}

/* ---------- Numbered step list (How-to-use) ---------- */
.step-list {
  list-style: none !important;
  padding-left: 0 !important;
  counter-reset: step;
  display: grid !important;
  gap: 0.875rem !important;
  margin: 0;
}

.step-list > li {
  counter-increment: step;
  position: relative;
  padding: 1.125rem 1.25rem 1.125rem 3.875rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  max-width: none;
  list-style: none;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.step-list > li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.step-list > li::before {
  content: counter(step);
  position: absolute;
  left: 1.125rem;
  top: 1.125rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: var(--shadow-accent);
}

.step-list > li strong {
  display: block;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.step-list > li span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ---------- Feature/benefit grid ---------- */
.feature-grid {
  list-style: none !important;
  padding-left: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.875rem !important;
  margin: 0;
}

.feature-grid > li {
  position: relative;
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  grid-auto-rows: min-content;
  column-gap: 0.875rem;
  row-gap: 0.2rem;
  align-items: start;
  padding: 1.125rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  max-width: none;
  list-style: none;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.feature-grid > li::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.feature-grid > li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.feature-grid > li:hover::after { transform: scaleX(1); }

.feature-grid > li::before {
  content: "";
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: var(--accent-light) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%230ea5e9' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='4 10.5 8.5 15 16 6'/></svg>") center/1.125rem no-repeat;
  border: 1px solid var(--accent-soft);
  align-self: start;
}

[data-theme="dark"] .feature-grid > li::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2338bdf8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='4 10.5 8.5 15 16 6'/></svg>");
}

.feature-grid > li strong {
  grid-column: 2;
  grid-row: 1;
  display: block;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.005em;
  min-width: 0;
}

.feature-grid > li span {
  grid-column: 2;
  grid-row: 2;
  display: block;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  min-width: 0;
}

.feature-grid > li a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent-soft);
  text-underline-offset: 2px;
}

.feature-grid > li a:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent);
}

/* ---------- Quick-stats / reference grid ---------- */
.stats-grid {
  list-style: none !important;
  padding-left: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem !important;
  margin: 1.25rem 0;
}

.stats-grid > li {
  position: relative;
  padding: 1rem 1.125rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  max-width: none;
  list-style: none;
  transition: transform var(--transition), box-shadow var(--transition);
}

.stats-grid > li:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.stats-grid > li strong {
  display: block;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}

.stats-grid > li span {
  display: block;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.45;
}

.stats-grid > li span code {
  font-size: 0.875rem;
  background: var(--bg-secondary);
  padding: 0.1rem 0.375rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* ---------- Inline formula box ---------- */
.formula-box {
  position: relative;
  margin: 1.25rem 0;
  padding: 1.125rem 1.375rem;
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 1rem;
  color: var(--text);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .formula-box {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, var(--bg-secondary) 100%);
}

.formula-box .formula-label {
  display: block;
  font-family: var(--font);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.formula-box sup { font-size: 0.7em; }
.formula-box code {
  background: transparent;
  padding: 0;
  border: 0;
  font-size: inherit;
}

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 1rem; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.125rem 1.25rem;
  background: var(--bg);
  border: none;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 44px;
  transition: background var(--transition), color var(--transition);
}

.faq-question:hover { background: var(--bg-secondary); color: var(--accent); }
.faq-item.open .faq-question { background: var(--bg-secondary); }

.faq-question .faq-icon {
  font-size: 1.2rem;
  color: var(--accent);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.faq-item.open .faq-question .faq-icon { transform: rotate(45deg); }

.faq-answer {
  display: none;
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  border-top: 1px solid var(--border);
}

.faq-item.open .faq-answer { display: block; }

/* ---------- Related Tools ---------- */
.related-tools { margin-top: 3rem; }
.related-tools h2 { margin-bottom: 1.25rem; }
.related-tools .tools-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

/* ---------- Hub backlink (on tool pages) ---------- */
.hub-backlink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.375rem;
  margin-top: 3rem;
  font-size: 0.9375rem;
}

.hub-backlink-text { color: var(--text-secondary); margin: 0; }

.hub-backlink a {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.hub-backlink a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ---------- Homepage "Browse by Category" ---------- */
.hub-cards-section {
  padding: 3rem 0 2rem;
  background:
    linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

@media (min-width: 1024px) {
  .hub-cards-section { padding: 4rem 0 3rem; margin-bottom: 3rem; }
}

.hub-cards-header {
  margin-bottom: 2rem;
  text-align: center;
}

@media (min-width: 1024px) {
  .hub-cards-header { margin-bottom: 2.75rem; }
}

.hub-cards-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.hub-cards-header h2 {
  font-size: 1.875rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

@media (min-width: 640px) {
  .hub-cards-header h2 { font-size: 2.25rem; }
}

.hub-cards-header p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.55;
}

.hub-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

@media (min-width: 1280px) {
  .hub-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
  }
}

@media (min-width: 1600px) {
  .hub-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.75rem;
  }
}

.hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background:
    linear-gradient(160deg, var(--accent-light) 0%, var(--bg) 55%);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition),
              border-color var(--transition);
}

.hub-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
}

.hub-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -16px var(--accent-glow), var(--shadow-hover);
  border-color: var(--accent);
  color: var(--text);
}

.hub-card-top {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-top: 0.25rem;
}

.hub-card-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.hub-card-name {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.005em;
}

.hub-card-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
  margin: 0;
}

.hub-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.25rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  gap: 0.5rem;
}

.hub-card-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--bg);
  border: 1px solid var(--accent-light);
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
}

.hub-card-cta {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap var(--transition);
}

.hub-card:hover .hub-card-cta { gap: 0.5rem; }

[data-theme="dark"] .hub-card {
  background:
    linear-gradient(160deg, rgba(14, 165, 233, 0.12) 0%, var(--bg) 60%);
}

[data-theme="dark"] .hub-card-icon {
  background: var(--bg-secondary);
}

[data-theme="dark"] .hub-card-count {
  background: var(--bg-secondary);
  color: var(--accent);
}

/* ---------- Clickable category headings on homepage ---------- */
.category-title-link {
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition);
}

.category-title-link:hover { color: var(--accent); }

.category-count-link {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-left: auto;
  text-decoration: none;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}

.category-count-link:hover { background: var(--accent-light); color: var(--accent-dark); }

/* ---------- Hub page hero ---------- */
.hub-hero {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg) 70%);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0 2rem;
}

@media (min-width: 1024px) {
  .hub-hero { padding: 3.5rem 0 2.5rem; }
}

.hub-hero h1 { margin-bottom: 0.75rem; }

.hub-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-light);
  color: var(--accent-dark);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.3rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hub-hero-lead {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 720px;
}

.hub-section { padding: 2.5rem 0; }

.hub-tool-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 1024px) {
  .hub-tool-list { gap: 1.25rem; }
}

/* ---------- Privacy Badge ---------- */
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin: 1rem 0 1.75rem;
  box-shadow: 0 2px 8px -4px rgba(22,101,52,0.2);
}

[data-theme="dark"] .privacy-badge {
  background: linear-gradient(135deg, rgba(34,197,94,0.15) 0%, rgba(22,101,52,0.25) 100%);
  color: #86efac;
  border-color: rgba(22,101,52,0.5);
}

/* ---------- Copy Button ---------- */
.copy-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  min-height: 36px;
}

.copy-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text);
  border-color: var(--border-hover);
}

.copy-btn.copied {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

[data-theme="dark"] .copy-btn.copied {
  background: #14532d;
  color: #86efac;
  border-color: #166534;
}

/* ---------- Back to Top ---------- */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #fff;
  border: none;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-accent);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -8px var(--accent-glow);
}

@media (min-width: 1024px) {
  .back-to-top { width: 48px; height: 48px; bottom: 2rem; right: 2rem; }
}

/* ---------- No-results / Empty State ---------- */
.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  display: none;
}

.no-results.visible { display: block; }
.no-results-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

/* ---------- Search-active mode ----------
   When the user is searching from the hero, collapse decorative sections
   between the search input and the tool grid so results are visible.
*/
body.is-searching .hero-eyebrow,
body.is-searching .hero-sub,
body.is-searching .hero-stats,
body.is-searching .hero-trust,
body.is-searching .hub-cards-section,
body.is-searching .ad-slot-leaderboard {
  display: none !important;
}

body.is-searching .hero { padding: 1.75rem 0 1.25rem; }
body.is-searching .hero h1 {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  margin-bottom: 1rem;
  font-weight: 700;
}
body.is-searching .hero h1 br,
body.is-searching .hero h1 .hero-accent { display: none; }
body.is-searching .tools-section { padding-top: 1.5rem; }

/* ---------- Utility Classes ---------- */
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.8125rem; }
.font-mono { font-family: var(--font-mono); }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.gap-2 { gap: 0.5rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }

/* ---------- Skeleton Loaders ---------- */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}

/* ---------- Responsive Tweaks ---------- */
@media (max-width: 480px) {
  .hero { padding: 2.5rem 0 2rem; }
  .tool-container { padding: 1.25rem; }
  .content-section { padding: 1.25rem; }
}


/* ---------- Features Section (Homepage) ---------- */
.features-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0;
}

@media (min-width: 1024px) {
  .features-section { padding: 4.5rem 0; }
}

.features-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2rem;
}

.features-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.875rem;
}

.features-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.01em;
  margin-bottom: 0;
}

@media (min-width: 1024px) {
  .features-header { margin-bottom: 2.75rem; }
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .features-grid { gap: 1.5rem; }
}

.feature-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  color: var(--accent-dark);
  border-radius: var(--radius-md);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.375rem;
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ---------- Intro Text Section (Homepage) ---------- */
.intro-section {
  padding: 3rem 0;
}

.intro-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 3rem;
  align-items: start;
}

@media (min-width: 1280px) {
  .intro-inner {
    grid-template-columns: 1fr 2.2fr;
    gap: 3.5rem;
    padding: 3rem 3.5rem;
  }
}

.intro-header {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}

.intro-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 0.875rem;
  letter-spacing: -0.01em;
}

@media (min-width: 1280px) {
  .intro-header h2 { font-size: 1.75rem; }
}

.intro-lead {
  font-size: 0.9375rem;
  color: var(--accent);
  font-weight: 600;
  line-height: 1.55;
}

.intro-body p {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.intro-body p:last-child {
  margin-bottom: 0;
}

.intro-contact {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem !important;
  color: var(--text-muted) !important;
}

.intro-contact a {
  color: var(--accent);
  text-decoration: none;
}

.intro-contact a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .intro-inner {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 2rem;
  }

  .intro-header {
    position: static;
  }

  .intro-header h2 {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .intro-section {
    padding: 2rem 0;
  }

  .intro-inner {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
  }

  .intro-body p {
    font-size: 0.875rem;
  }
}

/* ---------- Cookie Consent Banner ---------- */
#ug-consent-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 9999;
  max-width: 760px;
  margin: 0 auto;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.ug-consent-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
}
.ug-consent-text {
  flex: 1 1 280px;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
}
.ug-consent-text a {
  color: var(--accent);
  text-decoration: underline;
}
.ug-consent-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.ug-consent-btn {
  font: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.ug-consent-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-hover);
}
.ug-consent-btn-accept {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}
.ug-consent-btn-accept:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #ffffff;
}
@media (max-width: 520px) {
  #ug-consent-banner {
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
  }
  .ug-consent-inner {
    padding: 0.875rem 1rem;
  }
  .ug-consent-actions {
    width: 100%;
  }
  .ug-consent-btn {
    flex: 1;
  }
}

/* ============================================================
   Blog Post (Article) Styles
   ============================================================ */

/* Reading progress bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--accent);
  z-index: 200;
  transition: width 0.1s linear;
}

/* Post container & typography */
.post-article {
  max-width: 740px;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.post-header { margin-bottom: 2.5rem; }

.post-category-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.post-title {
  font-size: clamp(1.875rem, 4.5vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.post-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.post-meta .meta-sep { color: var(--border-hover); }
.post-meta a { color: var(--text-secondary); font-weight: 600; }
.post-meta a:hover { color: var(--accent); }

/* Post body */
.post-body { font-size: 1.0625rem; line-height: 1.75; color: var(--text-secondary); }
.post-body > p { margin-bottom: 1.25rem; }
.post-body > p.lead {
  font-size: 1.1875rem;
  line-height: 1.65;
  color: var(--text);
  font-weight: 400;
  margin-bottom: 1.5rem;
}
.post-body strong { color: var(--text); font-weight: 600; }
.post-body em { color: var(--text); font-style: italic; }
.post-body a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent-light); text-underline-offset: 3px; transition: text-decoration-color var(--transition); }
.post-body a:hover { text-decoration-color: var(--accent); }

.post-body h2 {
  font-size: clamp(1.5rem, 2.75vw, 1.875rem);
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-top: 1rem;
  scroll-margin-top: calc(var(--header-h) + 1rem);
  position: relative;
}

.post-body h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.post-body h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.post-body ul:not(.plain), .post-body ol:not(.plain) {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.post-body ol:not(.plain) { list-style: decimal; }
.post-body li { padding-left: 0.25rem; }
.post-body li::marker { color: var(--accent); }

.post-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  color: var(--text);
}

/* Table of contents */
.post-toc {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0 3rem;
}

.post-toc-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.post-body .post-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-body .post-toc li {
  counter-increment: toc;
  padding-left: 2rem;
  position: relative;
  font-size: 0.9375rem;
  line-height: 1.4;
  list-style: none;
}

.post-body .post-toc li::marker { content: ""; }

.post-toc li::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.125rem 0.375rem;
  min-width: 1.5rem;
  text-align: center;
}

.post-toc a { color: var(--text-secondary); text-decoration: none; }
.post-toc a:hover { color: var(--accent); }

/* Formula block */
.formula-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1rem 0 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.formula-block .formula-label {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-right: 0.5rem;
}

.formula-block code {
  display: inline-block;
  background: var(--bg);
  padding: 0.25rem 0.5rem;
  margin: 0.125rem 0;
}

.formula-block .formula-result {
  color: var(--text);
  font-weight: 700;
}

/* Example card (Example 1, 2, ...) */
.example-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.example-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.example-card > h3 {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0 0 1rem;
  font-size: 1.1875rem;
  line-height: 1.3;
  padding-top: 0;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.example-number {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.875rem;
  height: 1.875rem;
  background: var(--accent);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 50%;
}

[data-theme="dark"] .example-number { color: var(--bg); }

.example-card ul {
  background: var(--bg-secondary);
  list-style: none !important;
  padding: 0.875rem 1.125rem !important;
  border-radius: var(--radius-md);
  margin: 0.75rem 0 1rem !important;
}

.example-card ul li {
  padding-left: 1.125rem !important;
  position: relative;
  font-variant-numeric: tabular-nums;
}

.example-card ul li::marker { content: none; }

.example-card ul li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.example-card > p:last-child { margin-bottom: 0; }

/* Callout (tip/warning/note) */
.callout {
  display: flex;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin: 1.25rem 0 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  border: 1px solid;
}

.callout-icon {
  flex-shrink: 0;
  font-size: 1.25rem;
  line-height: 1.4;
}

.callout-body { flex: 1; }
.callout-body p { margin: 0; color: var(--text-secondary); }
.callout-body strong { color: var(--text); }

.callout-tip {
  background: var(--accent-light);
  border-color: var(--accent);
}

[data-theme="dark"] .callout-tip {
  background: rgba(14, 165, 233, 0.12);
}

.callout-warn {
  background: rgba(245, 158, 11, 0.08);
  border-color: var(--warning);
}

[data-theme="dark"] .callout-warn {
  background: rgba(245, 158, 11, 0.1);
}

/* CTA card */
.post-cta {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 3rem 0 2rem;
  text-align: center;
}

[data-theme="dark"] .post-cta {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, var(--bg-secondary) 100%);
}

.post-cta h2 {
  margin: 0 0 0.75rem !important;
  padding-top: 0 !important;
  font-size: 1.5rem !important;
}

.post-cta h2::before { display: none !important; }

.post-cta p { margin: 0 auto 1.25rem; max-width: 540px; color: var(--text-secondary); }

.post-cta .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none !important;
  transition: background var(--transition), transform var(--transition);
}

.post-cta .btn:hover {
  background: var(--accent-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Related tools grid (post-scoped) */
.post-related-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0 3rem;
  list-style: none !important;
  padding: 0 !important;
}

.post-related-tools a {
  display: block;
  padding: 1.125rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none !important;
  background: var(--bg);
  transition: all var(--transition);
}

.post-related-tools a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.post-related-tools strong {
  display: block;
  color: var(--text) !important;
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
}

.post-related-tools p {
  margin: 0 !important;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Related reading list */
.post-related-reading {
  list-style: none !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0 2rem;
}

.post-related-reading a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  text-decoration: none !important;
  color: var(--text) !important;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all var(--transition);
}

.post-related-reading a:hover {
  border-color: var(--accent);
  background: var(--bg-secondary);
}

.post-related-reading a::before {
  content: "→";
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* Anchor heading link (invisible until hover) */
.post-body h2, .post-body h3 { scroll-margin-top: calc(var(--header-h) + 1rem); }

/* Responsive */
@media (max-width: 640px) {
  .post-article { padding: 1rem 0 3rem; }
  .post-body { font-size: 1rem; }
  .post-body > p.lead { font-size: 1.0625rem; }
  .example-card { padding: 1.25rem; }
  .post-cta { padding: 1.5rem; }
  .post-toc { padding: 1rem 1.25rem; }
}

/* ============================================================
   GRAPHICS & ANIMATIONS
   Decorative motion layer. All animations are automatically
   disabled for users who set `prefers-reduced-motion`.
   ============================================================ */

/* ---------- Keyframes ---------- */
@keyframes ug-drift {
  0%   { transform: translate3d(-8%, -4%, 0) scale(1);    }
  33%  { transform: translate3d(6%, 6%, 0)   scale(1.1);  }
  66%  { transform: translate3d(-4%, 10%, 0) scale(0.95); }
  100% { transform: translate3d(-8%, -4%, 0) scale(1);    }
}
@keyframes ug-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
@keyframes ug-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-6px) scale(1.04); }
}
@keyframes ug-gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes ug-sparkle {
  0%, 100% { opacity: 0.2;  transform: scale(0.85) rotate(0deg);    }
  50%      { opacity: 0.85; transform: scale(1.15) rotate(180deg);  }
}
@keyframes ug-fade-in-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none;             }
}
@keyframes ug-wiggle {
  0%, 100% { transform: rotate(0deg); }
  20%      { transform: rotate(-10deg); }
  60%      { transform: rotate(10deg);  }
  80%      { transform: rotate(-4deg);  }
}
@keyframes ug-shimmer-sweep {
  0%   { transform: translateX(-160%) skewX(-20deg); }
  100% { transform: translateX(240%)  skewX(-20deg); }
}
@keyframes ug-ripple {
  to { transform: scale(4); opacity: 0; }
}
@keyframes ug-pulse-ring {
  0%   { box-shadow: 0 0 0 0 var(--accent-glow);           }
  70%  { box-shadow: 0 0 0 14px rgba(14,165,233,0);        }
  100% { box-shadow: 0 0 0 0 rgba(14,165,233,0);           }
}

/* ---------- Hero: animated background decoration ---------- */
.hero-decor {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.hero-blob {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
}
.hero-blob-a {
  top: -12%;
  left: -8%;
  background: radial-gradient(circle at 35% 35%, var(--accent) 0%, transparent 65%);
  animation: ug-drift 22s ease-in-out infinite;
}
.hero-blob-b {
  top: 8%;
  right: -12%;
  background: radial-gradient(circle at 60% 40%, #8b5cf6 0%, transparent 65%);
  opacity: 0.35;
  animation: ug-drift 28s ease-in-out -6s infinite reverse;
}
.hero-blob-c {
  bottom: -22%;
  left: 28%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at 50% 50%, #22d3ee 0%, transparent 65%);
  opacity: 0.25;
  animation: ug-drift 34s ease-in-out -12s infinite;
}
[data-theme="dark"] .hero-blob   { opacity: 0.5;  }
[data-theme="dark"] .hero-blob-b { opacity: 0.28; }
[data-theme="dark"] .hero-blob-c { opacity: 0.22; }
@media (max-width: 640px) {
  .hero-blob   { width: 260px; height: 260px; filter: blur(50px); }
  .hero-blob-c { width: 300px; height: 300px; }
}

.hero-sparkle {
  position: absolute;
  font-size: 1.125rem;
  color: var(--accent);
  opacity: 0.5;
  animation: ug-sparkle 4.5s ease-in-out infinite;
  filter: drop-shadow(0 0 6px var(--accent-glow));
  user-select: none;
}
.hero-sparkle.s1 { top: 14%; left:  8%; animation-delay: -0.2s; }
.hero-sparkle.s2 { top: 22%; right: 10%; animation-delay: -1.6s; font-size: 0.875rem; }
.hero-sparkle.s3 { top: 60%; left: 12%; animation-delay: -2.8s; font-size: 0.875rem; }
.hero-sparkle.s4 { top: 72%; right: 14%; animation-delay: -3.4s; font-size: 1rem; }
.hero-sparkle.s5 { top: 42%; right: 34%; animation-delay: -0.8s; font-size: 0.75rem; }
.hero-sparkle.s6 { top: 38%; left: 30%; animation-delay: -2.2s; font-size: 0.75rem; }

/* ---------- Hero: animated gradient headline accent ---------- */
.hero h1 .hero-accent {
  background: linear-gradient(120deg, var(--accent) 0%, #8b5cf6 40%, var(--accent-dark) 75%, var(--accent) 100%);
  background-size: 240% 240%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: ug-gradient-shift 9s ease-in-out infinite;
}

/* ---------- Hero: content entrance on load ---------- */
.hero-eyebrow,
.hero h1,
.hero-sub,
.hero .search-wrap,
.hero-stats,
.hero-trust {
  animation: ug-fade-in-up 0.7s ease both;
}
.hero h1           { animation-delay: 0.05s; }
.hero-sub          { animation-delay: 0.15s; }
.hero .search-wrap { animation-delay: 0.22s; }
.hero-stats        { animation-delay: 0.30s; }
.hero-trust        { animation-delay: 0.38s; }

/* ---------- Logo icon: hover wiggle only ---------- */
.logo:hover .logo-icon { animation: ug-wiggle 0.6s ease; }

/* ---------- Hub card icons: soft lift on hover only ---------- */
.hub-card-icon { transition: transform 0.35s cubic-bezier(.2,.8,.2,1); }
.hub-card:hover .hub-card-icon { transform: translateY(-4px) scale(1.05); }

/* ---------- Tool card: hover shine sweep ---------- */
.tool-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 45%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0.55) 50%, transparent 100%);
  transform: translateX(-160%) skewX(-20deg);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}
[data-theme="dark"] .tool-card::before {
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0.10) 50%, transparent 100%);
}
.tool-card:hover::before { animation: ug-shimmer-sweep 0.9s ease forwards; opacity: 1; }
.tool-card > .tool-card-icon,
.tool-card > .tool-card-name,
.tool-card > .tool-card-desc,
.tool-card > .tool-card-arrow { position: relative; z-index: 1; }

/* ---------- Feature cards: slow icon tilt on hover ---------- */
.feature-icon { transition: transform 0.5s cubic-bezier(.2,.8,.2,1); }
.feature-card:hover .feature-icon { transform: rotate(18deg) scale(1.15); }

/* ---------- Scroll reveal (opt-in via data-reveal) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
  transition-delay: calc(var(--ug-i, 0) * 70ms);
}
[data-reveal-stagger].is-visible > * {
  opacity: 1;
  transform: none;
}

/* ---------- Click ripple ---------- */
.ug-ripple {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.22;
  transform: scale(0);
  pointer-events: none;
  animation: ug-ripple 0.65s ease-out forwards;
  z-index: 2;
}

/* ---------- Back-to-top: soft pulse on hover ---------- */
.back-to-top:hover { animation: ug-pulse-ring 1.4s ease-in-out infinite; }

/* ---------- Respect reduced motion for our decorative layer ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-decor { display: none !important; }
  [data-reveal],
  [data-reveal-stagger] > * { opacity: 1 !important; transform: none !important; }
}

/* ---------- PWA Install Banner ---------- */
.pwa-install-banner {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  width: min(calc(100% - 1.5rem), 560px);
  padding: 0.875rem 0.875rem 0.875rem 0.875rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover), 0 0 0 1px var(--accent-soft);
  transform: translate(-50%, 140%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.55s cubic-bezier(.2,.8,.2,1), opacity 0.4s ease;
  overflow: hidden;
}
.pwa-install-banner.visible {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}
.pwa-install-banner::before {
  content: '';
  position: absolute;
  inset: -40% -20% auto auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle at center, var(--accent-glow), transparent 65%);
  opacity: 0.55;
  pointer-events: none;
}

.pwa-install-icon {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--gradient-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px -6px var(--accent-glow);
}
.pwa-install-icon svg { width: 26px; height: 26px; }
.pwa-install-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid var(--accent);
  opacity: 0.5;
  animation: pwa-pulse 2.1s ease-out infinite;
}
@keyframes pwa-pulse {
  0%   { transform: scale(1);    opacity: 0.5; }
  80%  { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

.pwa-install-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3125rem;
}
.pwa-install-title {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.pwa-install-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  align-self: flex-start;
  padding: 0.1875rem 0.5625rem 0.1875rem 0.4375rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: linear-gradient(
    90deg,
    var(--accent-soft) 0%,
    rgba(34,197,94,0.18) 50%,
    var(--accent-soft) 100%
  );
  background-size: 220% 100%;
  animation: pwa-shimmer 3.6s linear infinite;
}
@keyframes pwa-shimmer {
  0%   { background-position: 220% 0; }
  100% { background-position: -220% 0; }
}
.pwa-install-badge .pwa-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  flex: 0 0 auto;
}
.pwa-install-badge .pwa-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--success);
  opacity: 0.6;
  animation: pwa-live 1.7s ease-out infinite;
}
@keyframes pwa-live {
  0%   { transform: scale(0.6); opacity: 0.6; }
  80%  { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}
.pwa-install-badge .pwa-wifi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dark);
  transform-origin: 50% 80%;
  animation: pwa-wobble 2.6s ease-in-out infinite;
}
.pwa-install-badge .pwa-wifi svg { width: 14px; height: 14px; display: block; }
.pwa-install-badge .pwa-wifi .arc-1 {
  animation: pwa-arc 1.8s ease-in-out infinite;
  transform-origin: 12px 16px;
}
.pwa-install-badge .pwa-wifi .arc-2 {
  animation: pwa-arc 1.8s ease-in-out infinite;
  animation-delay: 0.25s;
  transform-origin: 12px 16px;
}
.pwa-install-badge .pwa-wifi .arc-3 {
  animation: pwa-arc 1.8s ease-in-out infinite;
  animation-delay: 0.5s;
  transform-origin: 12px 16px;
}
@keyframes pwa-arc {
  0%, 60%, 100% { opacity: 0.25; }
  30%           { opacity: 1; }
}
@keyframes pwa-wobble {
  0%, 100% { transform: translateY(0) rotate(0); }
  50%      { transform: translateY(-1.5px) rotate(-6deg); }
}

.pwa-install-actions {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.pwa-install-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  padding: 0.5rem 1rem;
  background: var(--gradient-accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 999px;
  box-shadow: var(--shadow-accent);
  transition: transform var(--transition), box-shadow var(--transition);
}
.pwa-install-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -8px var(--accent-glow); }
.pwa-install-btn:active { transform: translateY(0); }
.pwa-install-close {
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 1.25rem;
  line-height: 1;
  transition: background var(--transition), color var(--transition);
}
.pwa-install-close:hover { background: var(--bg-tertiary); color: var(--text); }

/* Shift back-to-top up so it doesn't overlap the banner */
body.has-pwa-banner .back-to-top { bottom: calc(1.5rem + 82px); }
@media (min-width: 1024px) {
  body.has-pwa-banner .back-to-top { bottom: calc(2rem + 92px); }
}

@media (max-width: 560px) {
  .pwa-install-banner {
    bottom: 0.625rem;
    gap: 0.625rem;
    padding: 0.6875rem 0.6875rem 0.6875rem 0.75rem;
  }
  .pwa-install-icon { width: 42px; height: 42px; border-radius: 12px; }
  .pwa-install-icon svg { width: 22px; height: 22px; }
  .pwa-install-title { font-size: 0.875rem; }
  .pwa-install-badge { font-size: 0.6875rem; padding: 0.125rem 0.5rem 0.125rem 0.375rem; }
  .pwa-install-btn { padding: 0.4375rem 0.75rem; font-size: 0.8125rem; }
  .pwa-install-close { width: 26px; height: 26px; font-size: 1.125rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pwa-install-banner { transition: opacity 0.2s ease; }
  .pwa-install-banner,
  .pwa-install-banner.visible { transform: translate(-50%, 0); }
  .pwa-install-icon::after,
  .pwa-install-badge,
  .pwa-install-badge .pwa-dot::after,
  .pwa-install-badge .pwa-wifi,
  .pwa-install-badge .pwa-wifi .arc-1,
  .pwa-install-badge .pwa-wifi .arc-2,
  .pwa-install-badge .pwa-wifi .arc-3 { animation: none !important; }
}

