/* ==========================================================================
   PropertyTools India — Global Stylesheet
   Site: https://manieshsrivastva.in
   Author: PropertyTools India
   Stack: Pure HTML5 + CSS3 + Vanilla JS (no frameworks, no build step)

   TABLE OF CONTENTS
   01. Design Tokens (colors, spacing, type, shadows)
   02. Dark Mode Tokens
   03. Reset & Base
   04. Typography
   05. Layout Helpers (container, section, grid)
   06. Buttons
   07. Scroll Progress Bar
   08. Navigation (desktop + mobile)
   09. Hero
   10. Stats Strip
   11. Cards (tool cards, category cards, feature cards)
   12. Sections (steps, FAQ, newsletter, CTA banner)
   13. Footer
   14. Tool Page Layout (form, results, dashboard)
   15. Forms & Validation
   16. Tables & Content Pages
   17. Utilities (search, breadcrumbs, back-to-top, float btn, toast)
   18. Animations & Keyframes
   19. Responsive Breakpoints
   20. Print & Reduced-Motion
   ========================================================================== */

/* ==========================================================================
   01. DESIGN TOKENS
   Edit these variables to re-theme the entire website.
   ========================================================================== */
:root {
  /* Brand palette */
  --primary: #0F766E;
  --primary-dark: #0B5A54;
  --primary-light: #CCFBF1;
  --secondary: #14B8A6;
  --accent: #22C55E;

  /* Neutrals */
  --dark: #0F172A;
  --bg: #F8FAFC;
  --bg-alt: #FFFFFF;
  --card: #FFFFFF;
  --border: #E5E7EB;

  /* Semantic */
  --success: #16A34A;
  --warning: #F59E0B;
  --danger: #DC2626;

  /* Text */
  --text: #0F172A;
  --text-muted: #475569;
  --text-soft: #64748B;

  /* Surfaces */
  --glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.55);
  --nav-solid: rgba(255, 255, 255, 0.92);
  --overlay: rgba(15, 23, 42, 0.45);

  /* Typography */
  --font-head: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --fs-hero: clamp(2.25rem, 6vw, 4rem);
  --fs-h1: clamp(1.95rem, 4.4vw, 3rem);
  --fs-h2: clamp(1.6rem, 3.4vw, 2.4rem);
  --fs-h3: clamp(1.2rem, 2.2vw, 1.5rem);
  --fs-body: 1rem;
  --fs-sm: 0.9rem;
  --fs-xs: 0.8rem;

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-full: 999px;

  /* Shadows */
  --sh-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --sh-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --sh-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --sh-lg: 0 18px 44px rgba(15, 23, 42, 0.12);
  --sh-glow: 0 12px 34px rgba(15, 118, 110, 0.28);

  /* Motion */
  --t-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --t: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --container: 1180px;
  --nav-h: 72px;
}

/* ==========================================================================
   02. DARK MODE TOKENS
   Toggled by adding [data-theme="dark"] to <html>. Saved in localStorage.
   ========================================================================== */
[data-theme="dark"] {
  --primary: #2DD4BF;
  --primary-dark: #14B8A6;
  --primary-light: #134E4A;
  --secondary: #5EEAD4;
  --accent: #4ADE80;

  --dark: #F1F5F9;
  --bg: #0B1120;
  --bg-alt: #0F172A;
  --card: #111C31;
  --border: #1E2A44;

  --text: #E2E8F0;
  --text-muted: #A8B5C8;
  --text-soft: #8496AE;

  --glass: rgba(17, 28, 49, 0.72);
  --glass-border: rgba(148, 163, 184, 0.16);
  --nav-solid: rgba(11, 17, 32, 0.92);
  --overlay: rgba(2, 6, 23, 0.66);

  --sh-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --sh-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --sh-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --sh-lg: 0 18px 44px rgba(0, 0, 0, 0.55);
  --sh-glow: 0 12px 34px rgba(45, 212, 191, 0.22);
}

/* ==========================================================================
   03. RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--t), color var(--t);
}

body.nav-open { overflow: hidden; }

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--secondary); }
ul, ol { padding-left: 1.25rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-6) 0; }

/* Visible focus ring for keyboard users (accessibility) */
:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Screen-reader-only text */
.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;
}

/* Skip link */
.skip-link {
  position: absolute; top: -60px; left: 12px; z-index: 2000;
  background: var(--primary); color: #fff; padding: 10px 18px;
  border-radius: var(--r-sm); font-weight: 600;
  transition: top var(--t);
}
.skip-link:focus { top: 12px; color: #fff; }

/* ==========================================================================
   04. TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--dark);
  line-height: 1.22;
  margin: 0 0 var(--sp-4);
  letter-spacing: -0.02em;
  font-weight: 700;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: 1.1rem; }
p { margin: 0 0 var(--sp-4); color: var(--text-muted); }

.lead { font-size: 1.1rem; color: var(--text-muted); max-width: 68ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-size: var(--fs-xs);
  font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--primary); background: var(--primary-light);
  padding: 6px 14px; border-radius: var(--r-full); margin-bottom: var(--sp-4);
}
.gradient-text {
  background: linear-gradient(100deg, var(--primary), var(--secondary) 45%, var(--accent));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.section-head { text-align: center; max-width: 720px; margin: 0 auto var(--sp-7); }
.section-head p { font-size: 1.05rem; }

/* ==========================================================================
   05. LAYOUT HELPERS
   ========================================================================== */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--sp-5); }
.section { padding: var(--sp-9) 0; position: relative; }
.section--tight { padding: var(--sp-8) 0; }
.section--alt { background: var(--bg-alt); }

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--sp-5); } .mb-4 { margin-bottom: var(--sp-5); }

/* ==========================================================================
   06. BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-head); font-weight: 600; font-size: 0.95rem;
  padding: 13px 26px; border-radius: var(--r-full);
  border: 1px solid transparent; cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t), background var(--t), color var(--t), border-color var(--t);
  text-align: center; line-height: 1.2; white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  color: #fff; box-shadow: var(--sh-glow);
}
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 18px 40px rgba(15, 118, 110, 0.36); }

.btn-secondary {
  background: var(--card); color: var(--primary); border-color: var(--border);
  box-shadow: var(--sh-sm);
}
.btn-secondary:hover { border-color: var(--secondary); color: var(--primary); transform: translateY(-2px); box-shadow: var(--sh-md); }

.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }

.btn-danger { background: transparent; color: var(--danger); border-color: rgba(220, 38, 38, 0.35); }
.btn-danger:hover { background: rgba(220, 38, 38, 0.08); color: var(--danger); }

.btn-sm { padding: 9px 18px; font-size: 0.85rem; }
.btn-lg { padding: 16px 34px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-group { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* ==========================================================================
   07. SCROLL PROGRESS BAR
   ========================================================================== */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  z-index: 1200; transition: width 0.1s linear; border-radius: 0 3px 3px 0;
}

/* ==========================================================================
   08. NAVIGATION
   ========================================================================== */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 1100;
  display: flex; align-items: center;
  background: transparent; border-bottom: 1px solid transparent;
  transition: background var(--t), box-shadow var(--t), border-color var(--t), backdrop-filter var(--t);
}
.nav.scrolled, .nav.forced-solid {
  background: var(--nav-solid);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--border);
  box-shadow: var(--sh-sm);
}
.nav__inner {
  width: 100%; max-width: var(--container); margin-inline: auto;
  padding-inline: var(--sp-5); display: flex; align-items: center;
  justify-content: space-between; gap: var(--sp-4);
}

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.12rem; color: var(--dark); letter-spacing: -0.02em; }
.brand:hover { color: var(--primary); }
.brand__mark {
  width: 36px; height: 36px; border-radius: 10px; flex: 0 0 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: grid; place-items: center; color: #fff; font-size: 1rem;
  box-shadow: var(--sh-glow);
}
.brand__mark svg { width: 20px; height: 20px; }
.brand span small { display: block; font-size: 0.62rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-soft); }

/* Menu */
.nav__menu { display: flex; align-items: center; gap: var(--sp-2); list-style: none; margin: 0; padding: 0; }
.nav__link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 15px; border-radius: var(--r-full);
  font-weight: 500; font-size: 0.94rem; color: var(--text);
  transition: background var(--t-fast), color var(--t-fast);
}
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--primary); background: var(--primary-light); }
.nav__link .chev { width: 14px; height: 14px; transition: transform var(--t-fast); }

/* Tools dropdown */
.nav__item { position: relative; }
.nav__dropdown {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translate(-50%, 10px);
  width: min(680px, 88vw); background: var(--card);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--sh-lg); padding: var(--sp-5);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--t), transform var(--t), visibility var(--t);
}
.nav__item:hover > .nav__dropdown,
.nav__item:focus-within > .nav__dropdown,
.nav__dropdown.open { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); }
.nav__item:hover > .nav__link .chev { transform: rotate(180deg); }

.dd-group__title {
  font-family: var(--font-head); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-soft);
  margin: 0 0 8px; padding-left: 10px;
}
.dd-list { list-style: none; margin: 0; padding: 0; }
.dd-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--r-sm);
  font-size: 0.9rem; color: var(--text); font-weight: 500;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.dd-link:hover { background: var(--primary-light); color: var(--primary); transform: translateX(3px); }
.dd-link .ico { font-size: 1rem; width: 20px; text-align: center; }

/* Nav right side */
.nav__actions { display: flex; align-items: center; gap: var(--sp-2); }

.theme-toggle {
  width: 40px; height: 40px; border-radius: var(--r-full);
  border: 1px solid var(--border); background: var(--card);
  display: grid; place-items: center; cursor: pointer; color: var(--text);
  transition: background var(--t-fast), transform var(--t-fast), border-color var(--t-fast);
}
.theme-toggle:hover { transform: rotate(18deg) scale(1.06); border-color: var(--primary); color: var(--primary); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* Hamburger */
.hamburger {
  display: none; width: 42px; height: 42px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--card);
  cursor: pointer; padding: 0; position: relative;
}
.hamburger span {
  position: absolute; left: 11px; width: 18px; height: 2px; border-radius: 2px;
  background: var(--text); transition: transform var(--t), opacity var(--t-fast), width var(--t);
}
.hamburger span:nth-child(1) { top: 14px; }
.hamburger span:nth-child(2) { top: 20px; width: 13px; }
.hamburger span:nth-child(3) { top: 26px; }
.hamburger.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile panel */
.mobile-nav {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 1090;
  background: var(--bg-alt); border-bottom: 1px solid var(--border);
  box-shadow: var(--sh-lg);
  max-height: 0; overflow: hidden;
  transition: max-height var(--t-slow), opacity var(--t);
  opacity: 0;
}
.mobile-nav.open { max-height: calc(100vh - var(--nav-h)); overflow-y: auto; opacity: 1; }
.mobile-nav__inner { padding: var(--sp-5); display: grid; gap: var(--sp-2); }
.mobile-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--r-md);
  color: var(--text); font-weight: 500; border: 1px solid transparent;
}
.mobile-nav a:hover, .mobile-nav a[aria-current="page"] { background: var(--primary-light); color: var(--primary); }
.mobile-nav .m-title {
  font-family: var(--font-head); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-soft);
  margin-top: var(--sp-4); padding-left: 14px;
}
.mobile-nav .btn { margin-top: var(--sp-4); }

/* ==========================================================================
   09. HERO
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  padding: calc(var(--nav-h) + var(--sp-9)) 0 var(--sp-9);
  background:
    radial-gradient(1100px 520px at 12% -10%, rgba(20, 184, 166, 0.20), transparent 62%),
    radial-gradient(900px 480px at 92% 8%, rgba(34, 197, 94, 0.16), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(120deg, rgba(15,118,110,0.10), rgba(20,184,166,0.06), rgba(34,197,94,0.10), rgba(15,118,110,0.10));
  background-size: 300% 300%;
  animation: gradientShift 18s ease infinite;
}
.hero__inner { position: relative; z-index: 2; text-align: center; max-width: 880px; margin-inline: auto; }
.hero h1 { font-size: var(--fs-hero); margin-bottom: var(--sp-5); }
.hero__sub { font-size: clamp(1rem, 1.6vw, 1.18rem); color: var(--text-muted); max-width: 640px; margin: 0 auto var(--sp-6); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; }
.hero__note { margin-top: var(--sp-5); font-size: var(--fs-sm); color: var(--text-soft); }

/* Typing effect */
.typed-wrap { display: inline-block; position: relative; }
.typed { color: var(--primary); }
.typed-cursor {
  display: inline-block; width: 3px; height: 1em; margin-left: 3px;
  background: var(--secondary); vertical-align: -0.12em; border-radius: 2px;
  animation: blink 1s step-end infinite;
}

/* Floating shapes */
.shapes { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.shape {
  position: absolute; border-radius: 30%;
  background: linear-gradient(135deg, rgba(20,184,166,0.28), rgba(34,197,94,0.16));
  filter: blur(0.5px); opacity: 0.65;
  animation: float 14s ease-in-out infinite;
}
.shape.s1 { width: 92px; height: 92px; top: 16%; left: 6%; animation-delay: 0s; border-radius: 26px; }
.shape.s2 { width: 56px; height: 56px; top: 62%; left: 12%; animation-delay: 2.5s; border-radius: 50%; }
.shape.s3 { width: 128px; height: 128px; top: 12%; right: 7%; animation-delay: 1.2s; border-radius: 38px; }
.shape.s4 { width: 44px; height: 44px; top: 70%; right: 14%; animation-delay: 3.6s; border-radius: 50%; }
.shape.s5 { width: 70px; height: 70px; top: 40%; right: 3%; animation-delay: 5s; border-radius: 20px; }
.shape.s6 { width: 38px; height: 38px; top: 34%; left: 20%; animation-delay: 4.2s; border-radius: 50%; }

/* ==========================================================================
   10. STATS STRIP
   ========================================================================== */
.stats {
  position: relative; z-index: 3;
  margin-top: var(--sp-7);
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border); border-radius: var(--r-xl);
  box-shadow: var(--sh-md);
  display: grid; grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
}
.stat { padding: var(--sp-6) var(--sp-4); text-align: center; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat__num { font-family: var(--font-head); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; color: var(--primary); line-height: 1.1; }
.stat__label { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 4px; }

/* ==========================================================================
   11. CARDS
   ========================================================================== */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-5);
  box-shadow: var(--sh-sm); transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}

/* Tool card with animated gradient border */
.tool-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-5);
  box-shadow: var(--sh-sm); overflow: hidden;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.tool-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity var(--t); pointer-events: none;
}
.tool-card:hover { transform: translateY(-7px); box-shadow: var(--sh-lg); }
.tool-card:hover::before { opacity: 1; }

.tool-card__icon {
  width: 52px; height: 52px; border-radius: 14px; flex: 0 0 52px;
  display: grid; place-items: center; font-size: 1.5rem;
  background: linear-gradient(135deg, var(--primary-light), rgba(20,184,166,0.18));
  color: var(--primary); margin-bottom: var(--sp-4);
  transition: transform var(--t);
}
.tool-card:hover .tool-card__icon { transform: scale(1.08) rotate(-6deg); }
.tool-card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.tool-card p { font-size: var(--fs-sm); flex: 1 1 auto; margin-bottom: var(--sp-4); }
.tool-card .btn { align-self: flex-start; }

.tag {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--r-full);
  background: var(--primary-light); color: var(--primary);
  margin-bottom: var(--sp-3);
}

/* Favourite star */
.fav-btn {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 32px; height: 32px; border-radius: var(--r-full);
  border: 1px solid var(--border); background: var(--card);
  display: grid; place-items: center; cursor: pointer;
  color: var(--text-soft); font-size: 0.9rem; line-height: 1;
  transition: color var(--t-fast), transform var(--t-fast), border-color var(--t-fast);
}
.fav-btn:hover { transform: scale(1.12); color: var(--warning); border-color: var(--warning); }
.fav-btn.active { color: var(--warning); border-color: var(--warning); background: rgba(245,158,11,0.10); }

/* Category card */
.cat-card {
  display: block; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-5); text-align: center;
  box-shadow: var(--sh-sm); color: var(--text);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.cat-card:hover { transform: translateY(-6px); border-color: var(--secondary); box-shadow: var(--sh-lg); color: var(--text); }
.cat-card__icon { font-size: 2rem; margin-bottom: var(--sp-3); display: block; }
.cat-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.cat-card p { font-size: var(--fs-sm); margin: 0; }
.cat-card .count { display: inline-block; margin-top: var(--sp-3); font-size: var(--fs-xs); font-weight: 700; color: var(--primary); }

/* Feature card */
.feature { display: flex; gap: var(--sp-4); align-items: flex-start; padding: var(--sp-5); border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--border); box-shadow: var(--sh-xs); transition: transform var(--t), box-shadow var(--t); }
.feature:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.feature__icon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; background: var(--primary-light); color: var(--primary); }
.feature h3 { font-size: 1.02rem; margin-bottom: 6px; }
.feature p { font-size: var(--fs-sm); margin: 0; }

/* ==========================================================================
   12. SECTIONS: steps, FAQ, newsletter, CTA
   ========================================================================== */
.steps { counter-reset: step; display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step { position: relative; padding: var(--sp-6) var(--sp-5) var(--sp-5); background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-xs); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: -18px; left: var(--sp-5);
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem;
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; box-shadow: var(--sh-glow);
}
.step h3 { font-size: 1.05rem; margin-top: var(--sp-3); margin-bottom: 6px; }
.step p { font-size: var(--fs-sm); margin: 0; }

/* FAQ accordion */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: var(--sp-3); }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; transition: border-color var(--t), box-shadow var(--t); }
.faq-item:hover { border-color: var(--secondary); }
.faq-item.open { box-shadow: var(--sh-md); border-color: var(--secondary); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5); background: none; border: 0; cursor: pointer;
  font-family: var(--font-head); font-weight: 600; font-size: 0.98rem; color: var(--dark);
  text-align: left;
}
.faq-q .plus { flex: 0 0 22px; width: 22px; height: 22px; position: relative; }
.faq-q .plus::before, .faq-q .plus::after {
  content: ""; position: absolute; background: var(--primary); border-radius: 2px;
  transition: transform var(--t);
}
.faq-q .plus::before { top: 10px; left: 2px; width: 18px; height: 2px; }
.faq-q .plus::after { top: 2px; left: 10px; width: 2px; height: 18px; }
.faq-item.open .plus::after { transform: rotate(90deg); opacity: 0; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height var(--t-slow); }
.faq-a > div { padding: 0 var(--sp-5) var(--sp-5); font-size: 0.94rem; color: var(--text-muted); }

/* Newsletter */
.newsletter {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--r-xl); padding: var(--sp-8) var(--sp-6); text-align: center;
  color: #fff; box-shadow: var(--sh-lg); position: relative; overflow: hidden;
}
.newsletter::after {
  content: ""; position: absolute; inset: -50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.20), transparent 55%);
  animation: float 16s ease-in-out infinite; pointer-events: none;
}
.newsletter h2, .newsletter p { color: #fff; position: relative; z-index: 1; }
.newsletter p { opacity: 0.92; max-width: 520px; margin-inline: auto; }
.newsletter form { position: relative; z-index: 1; display: flex; gap: var(--sp-3); max-width: 520px; margin: var(--sp-5) auto 0; flex-wrap: wrap; }
.newsletter input {
  flex: 1 1 240px; padding: 14px 18px; border-radius: var(--r-full);
  border: 1px solid rgba(255,255,255,0.4); background: rgba(255,255,255,0.16);
  color: #fff; font-family: var(--font-body); font-size: 0.95rem;
}
.newsletter input::placeholder { color: rgba(255,255,255,0.75); }
.newsletter input:focus { outline: 3px solid rgba(255,255,255,0.55); outline-offset: 2px; }
.newsletter .btn { background: #fff; color: var(--primary); box-shadow: none; }
.newsletter .btn:hover { background: #fff; color: var(--primary-dark); }
.newsletter .form-msg { color: #fff; font-weight: 600; }

/* CTA banner */
.cta-banner {
  background: var(--dark); border-radius: var(--r-xl); padding: var(--sp-8) var(--sp-6);
  text-align: center; position: relative; overflow: hidden;
}
[data-theme="dark"] .cta-banner { background: var(--card); border: 1px solid var(--border); }
.cta-banner::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(700px 320px at 20% 0%, rgba(20,184,166,0.32), transparent 60%),
              radial-gradient(600px 300px at 85% 100%, rgba(34,197,94,0.26), transparent 60%);
}
.cta-banner > * { position: relative; z-index: 1; }
.cta-banner h2 { color: #fff; }
[data-theme="dark"] .cta-banner h2 { color: var(--dark); }
.cta-banner p { color: rgba(255,255,255,0.82); max-width: 560px; margin-inline: auto; }
[data-theme="dark"] .cta-banner p { color: var(--text-muted); }

/* ==========================================================================
   13. FOOTER
   ========================================================================== */
.footer { background: var(--dark); color: #CBD5E1; padding: var(--sp-8) 0 var(--sp-5); margin-top: var(--sp-8); }
[data-theme="dark"] .footer { background: #060B16; border-top: 1px solid var(--border); }
.footer a { color: #CBD5E1; }
.footer a:hover { color: var(--secondary); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--sp-6); }
.footer__brand .brand { color: #fff; }
.footer__brand .brand span small { color: #94A3B8; }
.footer__brand p { color: #94A3B8; font-size: var(--fs-sm); max-width: 320px; margin-top: var(--sp-4); }
.footer h3 { color: #fff; font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: var(--sp-4); font-family: var(--font-head); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer li a { font-size: var(--fs-sm); transition: padding-left var(--t-fast); display: inline-block; }
.footer li a:hover { padding-left: 5px; }

.social { display: flex; gap: 10px; margin-top: var(--sp-5); }
.social a {
  width: 38px; height: 38px; border-radius: var(--r-full);
  border: 1px solid rgba(203,213,225,0.24); display: grid; place-items: center;
  transition: background var(--t-fast), transform var(--t-fast), border-color var(--t-fast);
}
.social a:hover { background: var(--primary); border-color: var(--primary); transform: translateY(-3px); color: #fff; }
.social svg { width: 17px; height: 17px; }

.footer__bottom {
  margin-top: var(--sp-7); padding-top: var(--sp-5);
  border-top: 1px solid rgba(203,213,225,0.16);
  display: flex; flex-wrap: wrap; gap: var(--sp-4);
  align-items: center; justify-content: space-between;
  font-size: var(--fs-sm); color: #94A3B8;
}
.footer__bottom .top-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }

/* ==========================================================================
   14. TOOL PAGE LAYOUT
   ========================================================================== */
.page-head {
  padding: calc(var(--nav-h) + var(--sp-7)) 0 var(--sp-6);
  background:
    radial-gradient(800px 380px at 10% -20%, rgba(20,184,166,0.18), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  border-bottom: 1px solid var(--border);
}
.page-head h1 { margin-bottom: var(--sp-3); }
.page-head .lead { margin-bottom: 0; }

.tool-layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); align-items: start; }

.panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--sh-md); overflow: hidden;
}
.panel__head {
  padding: var(--sp-5); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: var(--sp-3);
}
.panel__head h2 { font-size: 1.1rem; margin: 0; }
.panel__head .ico {
  width: 38px; height: 38px; border-radius: 11px; flex: 0 0 38px;
  display: grid; place-items: center; font-size: 1.1rem;
  background: var(--primary-light); color: var(--primary);
}
.panel__body { padding: var(--sp-5); }

/* Result dashboard */
.result-hero {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--r-md); padding: var(--sp-6) var(--sp-5);
  text-align: center; color: #fff; box-shadow: var(--sh-glow);
  margin-bottom: var(--sp-5);
}
.result-hero .label { font-size: var(--fs-sm); opacity: 0.9; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }
.result-hero .value { font-family: var(--font-head); font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 700; line-height: 1.15; margin-top: 6px; word-break: break-word; }
.result-hero .sub { font-size: var(--fs-sm); opacity: 0.9; margin-top: 6px; }

.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-5); }
.result-box {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--sp-4); text-align: center;
}
.result-box .label { font-size: var(--fs-xs); color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.result-box .value { font-family: var(--font-head); font-weight: 700; font-size: 1.12rem; color: var(--dark); margin-top: 5px; word-break: break-word; }
.result-box.is-success .value { color: var(--success); }
.result-box.is-warning .value { color: var(--warning); }
.result-box.is-danger .value { color: var(--danger); }

/* CSS-only donut / bar visuals (no chart libraries) */
.donut-wrap { display: flex; align-items: center; gap: var(--sp-5); flex-wrap: wrap; justify-content: center; margin-bottom: var(--sp-5); }
.donut {
  --pct: 50;
  width: 148px; height: 148px; border-radius: 50%; flex: 0 0 148px;
  background: conic-gradient(var(--primary) calc(var(--pct) * 1%), var(--border) 0);
  display: grid; place-items: center; position: relative;
  transition: background var(--t-slow);
}
.donut::after {
  content: ""; position: absolute; inset: 18px; border-radius: 50%;
  background: var(--card); box-shadow: inset 0 2px 10px rgba(15,23,42,0.06);
}
.donut__label { position: relative; z-index: 1; text-align: center; }
.donut__label b { display: block; font-family: var(--font-head); font-size: 1.25rem; color: var(--dark); }
.donut__label span { font-size: var(--fs-xs); color: var(--text-soft); }
.legend { display: grid; gap: 10px; font-size: var(--fs-sm); }
.legend div { display: flex; align-items: center; gap: 9px; color: var(--text-muted); }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; flex: 0 0 12px; }

.bar-chart { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.bar-row { display: grid; grid-template-columns: 118px 1fr auto; align-items: center; gap: var(--sp-3); font-size: var(--fs-sm); }
.bar-row .name { color: var(--text-muted); }
.bar-track { height: 10px; background: var(--border); border-radius: var(--r-full); overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: var(--r-full); background: linear-gradient(90deg, var(--primary), var(--secondary)); transition: width 0.9s cubic-bezier(0.16,1,0.3,1); }
.bar-row .amt { font-weight: 700; color: var(--dark); font-family: var(--font-head); font-size: var(--fs-sm); }

/* Tips / notes */
.note {
  display: flex; gap: 12px; align-items: flex-start;
  border-radius: var(--r-md); padding: var(--sp-4);
  font-size: var(--fs-sm); line-height: 1.6; margin-top: var(--sp-4);
}
.note .ico { flex: 0 0 20px; font-size: 1rem; line-height: 1.4; }
.note p:last-child { margin-bottom: 0; }
.note-info { background: rgba(20,184,166,0.10); border: 1px solid rgba(20,184,166,0.3); color: var(--text-muted); }
.note-warn { background: rgba(245,158,11,0.10); border: 1px solid rgba(245,158,11,0.32); color: var(--text-muted); }
.note-danger { background: rgba(220,38,38,0.08); border: 1px solid rgba(220,38,38,0.28); color: var(--text-muted); }

.empty-state { text-align: center; padding: var(--sp-7) var(--sp-4); color: var(--text-soft); }
.empty-state .big { font-size: 2.4rem; margin-bottom: var(--sp-3); display: block; opacity: 0.5; }

/* Related tools strip */
.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--sp-4); }
.related-card {
  display: flex; gap: 12px; align-items: center; padding: var(--sp-4);
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md);
  color: var(--text); transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}
.related-card:hover { transform: translateY(-4px); border-color: var(--secondary); box-shadow: var(--sh-md); color: var(--text); }
.related-card .ico { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-light); color: var(--primary); font-size: 1.05rem; }
.related-card b { display: block; font-family: var(--font-head); font-size: 0.94rem; }
.related-card small { color: var(--text-soft); font-size: var(--fs-xs); }

/* ==========================================================================
   15. FORMS & VALIDATION
   ========================================================================== */
.field { margin-bottom: var(--sp-4); }
.field label { display: block; font-weight: 600; font-size: 0.9rem; color: var(--dark); margin-bottom: 7px; font-family: var(--font-head); }
.field .hint { display: block; font-weight: 400; font-size: var(--fs-xs); color: var(--text-soft); margin-top: 4px; }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .prefix, .input-wrap .suffix {
  position: absolute; font-size: 0.9rem; color: var(--text-soft); font-weight: 600; pointer-events: none;
}
.input-wrap .prefix { left: 15px; }
.input-wrap .suffix { right: 15px; }
.input-wrap.has-prefix input { padding-left: 34px; }
.input-wrap.has-suffix input { padding-right: 52px; }

input[type="text"], input[type="number"], input[type="email"], input[type="date"], input[type="tel"], select, textarea {
  width: 100%; padding: 12px 15px; font-family: var(--font-body); font-size: 0.96rem;
  color: var(--text); background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-md); transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  -webkit-appearance: none; appearance: none;
}
textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 17px;
  padding-right: 40px; cursor: pointer;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--secondary); background: var(--card);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.16);
}
input::placeholder, textarea::placeholder { color: var(--text-soft); opacity: 0.75; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inline-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

.field.invalid input, .field.invalid select, .field.invalid textarea {
  border-color: var(--danger); box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}
.error-msg { display: none; color: var(--danger); font-size: var(--fs-xs); font-weight: 600; margin-top: 6px; }
.field.invalid .error-msg { display: block; animation: shake 0.36s ease; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }

/* Range slider paired with number input */
input[type="range"] {
  width: 100%; height: 6px; margin-top: 12px; padding: 0;
  -webkit-appearance: none; appearance: none;
  background: var(--border); border-radius: var(--r-full); cursor: pointer; border: 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px;
  border-radius: 50%; background: var(--primary); border: 3px solid #fff;
  box-shadow: var(--sh-sm); cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: var(--primary);
  border: 3px solid #fff; box-shadow: var(--sh-sm); cursor: pointer;
}

.radio-group { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.radio-pill { position: relative; }
.radio-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-pill span {
  display: inline-block; padding: 10px 18px; border-radius: var(--r-full);
  border: 1px solid var(--border); background: var(--bg);
  font-size: 0.9rem; font-weight: 500; cursor: pointer;
  transition: all var(--t-fast);
}
.radio-pill input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--sh-glow); }
.radio-pill input:focus-visible + span { outline: 3px solid var(--secondary); outline-offset: 3px; }

.form-msg { display: none; margin-top: var(--sp-4); padding: 13px 16px; border-radius: var(--r-md); font-size: 0.92rem; font-weight: 600; }
.form-msg.show { display: block; animation: fadeUp 0.4s ease; }
.form-msg.ok { background: rgba(22,163,74,0.12); color: var(--success); border: 1px solid rgba(22,163,74,0.3); }
.form-msg.err { background: rgba(220,38,38,0.10); color: var(--danger); border: 1px solid rgba(220,38,38,0.3); }

/* ==========================================================================
   16. TABLES & CONTENT PAGES
   ========================================================================== */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 460px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg); font-family: var(--font-head); font-weight: 600; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-soft); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--bg); }

.prose { max-width: 800px; }
.prose h2 { margin-top: var(--sp-7); font-size: 1.5rem; }
.prose h3 { margin-top: var(--sp-6); font-size: 1.15rem; }
.prose li { color: var(--text-muted); margin-bottom: 8px; }
.prose .updated { font-size: var(--fs-sm); color: var(--text-soft); font-style: italic; }

.toc { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-5); margin-bottom: var(--sp-6); }
.toc h2 { margin: 0 0 var(--sp-3); font-size: 1rem; }
.toc ul { margin: 0; display: grid; gap: 6px; }
.toc a { font-size: var(--fs-sm); }

/* ==========================================================================
   17. UTILITIES
   ========================================================================== */
/* Live search */
.search-box { position: relative; max-width: 560px; margin: 0 auto var(--sp-6); }
.search-box input {
  padding: 15px 48px 15px 48px; border-radius: var(--r-full);
  background: var(--card); box-shadow: var(--sh-sm); font-size: 1rem;
}
.search-box .s-ico { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-soft); pointer-events: none; }
.search-box .s-ico svg { width: 19px; height: 19px; }
.search-clear {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--bg);
  color: var(--text-soft); cursor: pointer; display: none; place-items: center; font-size: 1rem; line-height: 1;
}
.search-clear.show { display: grid; }
.search-clear:hover { background: var(--border); color: var(--text); }
.search-status { text-align: center; color: var(--text-soft); font-size: var(--fs-sm); margin-bottom: var(--sp-5); }
.no-results { display: none; text-align: center; padding: var(--sp-8) var(--sp-4); color: var(--text-soft); }
.no-results.show { display: block; }

/* Filter chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: var(--sp-6); }
.chip {
  padding: 9px 18px; border-radius: var(--r-full); border: 1px solid var(--border);
  background: var(--card); color: var(--text-muted); font-size: 0.88rem; font-weight: 600;
  cursor: pointer; font-family: var(--font-head); transition: all var(--t-fast);
}
.chip:hover { border-color: var(--secondary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--sh-glow); }

/* Breadcrumbs */
.crumbs { font-size: var(--fs-sm); color: var(--text-soft); margin-bottom: var(--sp-4); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; align-items: center; }
.crumbs li::after { content: "/"; margin-left: 8px; color: var(--border); }
.crumbs li:last-child::after { content: ""; }
.crumbs [aria-current="page"] { color: var(--text-muted); font-weight: 600; }

/* Back to top */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 900;
  width: 46px; height: 46px; border-radius: var(--r-full);
  border: 1px solid var(--border); background: var(--card); color: var(--primary);
  display: grid; place-items: center; cursor: pointer; box-shadow: var(--sh-md);
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: all var(--t);
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-3px); }
.to-top svg { width: 19px; height: 19px; }

/* Floating contact button */
.float-contact {
  position: fixed; right: 22px; bottom: 80px; z-index: 900;
  width: 46px; height: 46px; border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; display: grid; place-items: center; box-shadow: var(--sh-glow);
  transition: transform var(--t);
}
.float-contact:hover { transform: scale(1.1); color: #fff; }
.float-contact svg { width: 20px; height: 20px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 24px);
  z-index: 1500; background: var(--dark); color: #fff;
  padding: 12px 22px; border-radius: var(--r-full); font-size: 0.9rem; font-weight: 600;
  box-shadow: var(--sh-lg); opacity: 0; visibility: hidden; transition: all var(--t);
  max-width: 90vw; text-align: center;
}
[data-theme="dark"] .toast { background: var(--card); border: 1px solid var(--border); }
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* Recently used */
.recent-strip { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.recent-strip a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--r-full);
  background: var(--card); border: 1px solid var(--border);
  font-size: 0.86rem; color: var(--text); font-weight: 500;
  transition: all var(--t-fast);
}
.recent-strip a:hover { border-color: var(--secondary); color: var(--primary); transform: translateY(-2px); }

/* 404 */
.err-page { min-height: 78vh; display: grid; place-items: center; text-align: center; padding: calc(var(--nav-h) + var(--sp-7)) var(--sp-5) var(--sp-8); }
.err-code {
  font-family: var(--font-head); font-weight: 700; font-size: clamp(5rem, 20vw, 11rem); line-height: 1;
  background: linear-gradient(120deg, var(--primary), var(--secondary), var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: gradientShift 8s ease infinite; background-size: 220% 220%;
}

/* ==========================================================================
   18. ANIMATIONS
   ========================================================================== */
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(14px, -22px) rotate(8deg); }
  66% { transform: translate(-12px, 14px) rotate(-6deg); }
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.45); }
  70% { box-shadow: 0 0 0 14px rgba(20, 184, 166, 0); }
}
.pulse { animation: pulseGlow 2.4s infinite; }

/* Scroll reveal — applied by main.js via IntersectionObserver */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); will-change: opacity, transform; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }

/* ==========================================================================
   19. RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .nav__menu, .nav__actions .btn { display: none; }
  .hamburger { display: block; }
  .tool-layout { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}

@media (max-width: 640px) {
  :root { --sp-9: 3.5rem; --sp-8: 2.75rem; --nav-h: 64px; }
  .container { padding-inline: var(--sp-4); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .footer__bottom { flex-direction: column; text-align: center; gap: var(--sp-3); }
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; }
  .btn-group .btn { flex: 1 1 auto; }
  .bar-row { grid-template-columns: 92px 1fr auto; font-size: var(--fs-xs); }
  .newsletter, .cta-banner { padding: var(--sp-6) var(--sp-4); }
  .to-top { right: 14px; bottom: 14px; }
  .float-contact { right: 14px; bottom: 70px; }
  .donut { width: 124px; height: 124px; flex: 0 0 124px; }
}

@media (max-width: 400px) {
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--border); }
  .stat:last-child { border-bottom: 0; }
  .brand span small { display: none; }
}

/* ==========================================================================
   20. PRINT & REDUCED MOTION
   ========================================================================== */
@media print {
  .nav, .mobile-nav, .footer, .to-top, .float-contact, .scroll-progress,
  .btn, .search-box, .chips, .skip-link, .newsletter, .cta-banner, .shapes { display: none !important; }
  body { background: #fff; color: #000; }
  .panel, .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .result-hero { background: #eee !important; color: #000 !important; }
  .page-head { padding-top: var(--sp-4); }
  a[href]::after { content: ""; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
