/* ==========================================================================
   ToolNova Design System v6 — Black & Light Green
   Pure-black canvas, light-green accent, motion everywhere (CSS only).
   ========================================================================== */

@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

:root {
  color-scheme: dark;
  --bg: #000000;
  --bg-soft: #030503;
  --surface: #070B07;
  --surface-2: #0D140D;
  --text: #EAF6EA;
  --muted: #8CA48C;
  --border: #1B261B;
  --border-light: #111A11;

  --accent: #7CFF6B;
  --accent-hover: #B6FFA8;
  --accent-2: #4ADE80;
  --accent-contrast: #000000;
  --accent-soft: rgba(124, 255, 107, 0.10);
  --accent-ring: rgba(124, 255, 107, 0.35);

  --ok: #7CFF6B;
  --ok-soft: rgba(124, 255, 107, 0.12);
  --err: #FF6B6B;
  --err-soft: rgba(255, 107, 107, 0.12);

  --radius: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.6);
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(124, 255, 107, 0.04);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.95), 0 0 44px -10px rgba(124, 255, 107, 0.28);

  --display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --header-h: 68px;
  --gradient-premium: linear-gradient(135deg, #B6FFA8 0%, #7CFF6B 50%, #34D399 100%);
  --tint: var(--accent);
}

/* Single theme: black + light green. (The toggle is hidden below.) */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: #000; }
body {
  margin: 0; position: relative; overflow-x: hidden;
  font-family: var(--sans); font-size: 16px; line-height: 1.65;
  color: var(--text); background: #000;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Ambient glow, drifting orb and slow-moving grid */
.site-glow {
  position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(900px 480px at 50% -140px, rgba(124, 255, 107, 0.14), transparent 70%),
    radial-gradient(520px 320px at 96% 6%, rgba(74, 222, 128, 0.07), transparent 70%);
}
.site-glow::before {
  content: ""; position: absolute; width: 620px; height: 620px; left: -180px; top: -140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 255, 107, 0.17), transparent 65%);
  filter: blur(12px); animation: tn-drift 18s ease-in-out infinite alternate;
}
.site-glow::after {
  content: ""; position: absolute; inset: 0; opacity: .9;
  background-image:
    linear-gradient(rgba(124, 255, 107, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 255, 107, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 50% at 50% 0%, #000 0%, transparent 80%);
  mask-image: radial-gradient(ellipse 75% 50% at 50% 0%, #000 0%, transparent 80%);
  animation: tn-grid 28s linear infinite;
}

h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; color: var(--text); letter-spacing: -0.025em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -0.04em; }
h2 { font-size: 1.75rem; margin-top: 2.5rem; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }

a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-hover); }
ul, ol { padding-left: 1.4rem; }
code, pre, .mono { font-family: var(--mono); font-size: .9em; }
code { background: var(--surface-2); border: 1px solid var(--border); padding: .15em .45em; border-radius: 6px; color: var(--accent); }
img, svg { vertical-align: middle; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: var(--text); }
::selection { background: var(--accent); color: #000; }
.muted { color: var(--muted); }
.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; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
main.container { padding-top: 32px; padding-bottom: 88px; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--accent); color: #000; padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0; font-size: .85rem; font-weight: 700; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Scroll progress bar (supported browsers only) */
@supports (animation-timeline: scroll()) {
  body::before {
    content: ""; position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 100;
    background: var(--gradient-premium); transform-origin: 0 50%; transform: scaleX(0);
    box-shadow: 0 0 12px rgba(124, 255, 107, .7);
    animation: tn-progress linear both; animation-timeline: scroll(root);
  }
}

/* ---------- Header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(0, 0, 0, 0.72); -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--border); }
.nav-inner { min-height: var(--header-h); display: flex; align-items: center; gap: 28px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.03em; }
.brand:hover { color: var(--accent); text-decoration: none; }
.logo-img { border-radius: 9px; object-fit: cover; box-shadow: 0 0 0 1px var(--accent-ring), 0 0 18px -2px rgba(124, 255, 107, .45); transition: transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.brand:hover .logo-img { transform: rotate(-8deg) scale(1.1); }
.brand-name { letter-spacing: -0.03em; }
.main-nav { display: flex; gap: 2px; flex-wrap: wrap; }
.main-nav a { position: relative; color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .92rem; transition: color .15s ease; }
.main-nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 8px var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.main-nav a:hover { color: var(--text); text-decoration: none; }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }
.main-nav a.active { color: var(--accent); font-weight: 600; }

.nav-search { margin-left: auto; display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); min-width: 190px; max-width: 300px; flex: 1 1 190px; transition: border-color .2s ease, box-shadow .2s ease; }
.nav-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 0 18px -4px rgba(124, 255, 107, .5); }
.nav-search input { border: 0; background: transparent; padding: 8px 12px; width: 100%; font-size: .9rem; }
.nav-search input:focus { outline: none; }
.nav-search input::placeholder { color: var(--muted); }
.nav-search button { border: 0; background: transparent; color: var(--muted); padding: 0 12px; display: grid; place-items: center; }
.nav-search button:hover { color: var(--accent); }
.theme-toggle { display: none !important; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 92px 0 56px; position: relative; max-width: 980px; margin-inline: auto; }
.hero-eyebrow, .eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 600 .72rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hero-eyebrow { padding: 9px 18px; margin-bottom: 26px; background: rgba(124, 255, 107, 0.06); border: 1px solid var(--accent-ring); border-radius: 999px; animation: tn-rise .7s .05s cubic-bezier(.16, 1, .3, 1) both; }
.hero-eyebrow span:first-child { color: var(--accent); }
.hero-eyebrow span:first-child::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: var(--accent); animation: tn-ping 1.8s ease-out infinite; }
.hero h1 { font-size: clamp(2.5rem, 6.2vw, 4.7rem); max-width: 900px; margin: 0 auto 22px; line-height: 1.04; letter-spacing: -0.045em; font-weight: 800; animation: tn-rise .8s .15s cubic-bezier(.16, 1, .3, 1) both; }
.hero-grad { background: linear-gradient(100deg, #7CFF6B 0%, #D9FFD0 25%, #7CFF6B 50%, #D9FFD0 75%, #7CFF6B 100%); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: tn-shine 5s linear infinite; }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 640px; margin: 0 auto 36px; line-height: 1.6; animation: tn-rise .8s .3s cubic-bezier(.16, 1, .3, 1) both; }

.hero-search { position: relative; max-width: 660px; margin: 0 auto; display: flex; gap: 8px; padding: 8px; background: #050805; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); transition: box-shadow .25s ease; animation: tn-rise .8s .45s cubic-bezier(.16, 1, .3, 1) both; }
.hero-search::before { content: ""; position: absolute; inset: -1px; border-radius: 19px; padding: 1px; pointer-events: none; background: conic-gradient(from var(--ang), transparent 0 60%, rgba(124, 255, 107, .95) 82%, transparent 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: tn-spin 5s linear infinite; }
.hero-search:focus-within { box-shadow: var(--shadow), 0 0 50px -8px rgba(124, 255, 107, .45); }
.hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 12px 14px; font-size: 1.02rem; }
.hero-search input:focus { outline: none; }
.hero-search input::placeholder { color: var(--muted); }
.hero-search .btn-primary { border-radius: 12px; min-height: 48px; padding-inline: 24px; }

.hero-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 0; margin-top: 36px; animation: tn-rise .8s .6s cubic-bezier(.16, 1, .3, 1) both; }
.stat-chip { padding: 0 24px; font-size: .9rem; color: var(--muted); font-weight: 500; }
.stat-chip + .stat-chip { border-left: 1px solid var(--border); }
.stat-chip strong { color: var(--accent); font-weight: 800; font-size: 1.1rem; margin-right: 4px; font-variant-numeric: tabular-nums; text-shadow: 0 0 18px rgba(124, 255, 107, .5); }

/* ---------- Trust strip ---------- */
.trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 8px auto 24px; max-width: 1040px; }
.trust-strip > div { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: center; padding: 22px; background: linear-gradient(180deg, var(--surface), #040704); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s ease, border-color .3s ease; animation: tn-rise .8s cubic-bezier(.16, 1, .3, 1) both; }
.trust-strip > div:nth-child(1) { animation-delay: .7s; }
.trust-strip > div:nth-child(2) { animation-delay: .8s; }
.trust-strip > div:nth-child(3) { animation-delay: .9s; }
.trust-strip > div:hover { transform: translateY(-4px); border-color: var(--accent-ring); box-shadow: var(--shadow-lg); }
.trust-strip .trust-icon { grid-row: 1 / span 2; width: 46px; height: 46px; display: grid; place-items: center; font-size: 1.3rem; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent-ring); animation: tn-float 4s ease-in-out infinite; }
.trust-strip > div:nth-child(2) .trust-icon { animation-delay: -1.3s; }
.trust-strip > div:nth-child(3) .trust-icon { animation-delay: -2.6s; }
.trust-strip strong { font-size: 1rem; font-weight: 650; line-height: 1.3; }
.trust-strip div span:last-child { color: var(--muted); font-size: .86rem; }

/* ---------- Chips, badges, breadcrumbs ---------- */
.chip { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); letter-spacing: .01em; }
.chip-free { background: var(--ok-soft); color: var(--accent); border-color: var(--accent-ring); }

.category-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.category-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; font-weight: 550; font-size: .9rem; background: var(--surface); border: 1px solid var(--border); color: var(--text); transition: all .25s cubic-bezier(.16, 1, .3, 1); animation: tn-rise .6s cubic-bezier(.16, 1, .3, 1) both; }
.category-chips > :nth-child(2) { animation-delay: .04s; } .category-chips > :nth-child(3) { animation-delay: .08s; } .category-chips > :nth-child(4) { animation-delay: .12s; } .category-chips > :nth-child(5) { animation-delay: .16s; } .category-chips > :nth-child(n+6) { animation-delay: .2s; }
.category-chip:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); text-decoration: none; transform: translateY(-3px); box-shadow: 0 10px 24px -10px rgba(124, 255, 107, .5); }
.cc-count { font-size: .76rem; font-weight: 700; color: #000; background: var(--accent); border-radius: 999px; padding: 1px 8px; }

.breadcrumbs { margin-bottom: 24px; font-size: .86rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.breadcrumbs li { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.breadcrumbs li + li::before { content: '/'; color: var(--border); font-weight: 600; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); text-decoration: none; }
.breadcrumbs [aria-current] { color: var(--accent); font-weight: 600; }

/* ---------- Tool cards ---------- */
.tool-grid { display: grid; gap: 20px; margin-top: 24px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.tool-card { position: relative; animation: tn-rise .6s cubic-bezier(.16, 1, .3, 1) both; }
.tool-grid > :nth-child(2) { animation-delay: .04s; } .tool-grid > :nth-child(3) { animation-delay: .08s; } .tool-grid > :nth-child(4) { animation-delay: .12s; } .tool-grid > :nth-child(n+5) { animation-delay: .16s; }
.tool-card-link { position: relative; overflow: hidden; display: flex; gap: 16px; height: 100%; background: linear-gradient(180deg, var(--surface), #040704); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; color: var(--text); box-shadow: var(--shadow-sm); transition: transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s ease, border-color .3s ease; }
.tool-card-link::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(124, 255, 107, .12) 50%, transparent 65%); transform: translateX(-120%); transition: transform .8s ease; }
.tool-card-link::after { content: "\2192"; position: absolute; top: 20px; right: 22px; color: var(--accent); font-weight: 700; opacity: 0; transform: translateX(-8px); transition: opacity .25s ease, transform .25s cubic-bezier(.16, 1, .3, 1); }
.tool-card-link:hover { text-decoration: none; color: var(--text); transform: translateY(-5px); border-color: rgba(124, 255, 107, .6); box-shadow: var(--shadow-lg); }
.tool-card-link:hover::before { transform: translateX(120%); }
.tool-card-link:hover::after { opacity: 1; transform: none; }
.tool-card-link:hover h3 { color: var(--accent-hover); }
.tool-card-emoji { flex: none; width: 48px; height: 48px; display: grid; place-items: center; font-size: 1.5rem; line-height: 1; border-radius: 13px; background: var(--accent-soft); border: 1px solid var(--accent-ring); transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s ease; }
.tool-card-link:hover .tool-card-emoji { transform: rotate(-8deg) scale(1.12); box-shadow: 0 0 22px -2px rgba(124, 255, 107, .6); }
.tool-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tool-card h3 { margin: 0 24px 6px 0; font-size: 1.05rem; font-weight: 650; letter-spacing: -0.02em; transition: color .2s ease; }
.tool-card p { margin: 0 0 16px; font-size: .9rem; line-height: 1.55; color: var(--muted); flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tool-card-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

/* ---------- Buttons ---------- */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; border: 1px solid var(--border); padding: 10px 18px; font-weight: 600; font-size: .92rem; background: var(--surface-2); color: var(--text); transition: all .2s ease; }
.btn:hover { background: #121b12; border-color: var(--accent-ring); text-decoration: none; color: var(--accent); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary { background: var(--gradient-premium); color: #000; border: 0; font-weight: 700; box-shadow: 0 10px 28px -8px rgba(124, 255, 107, .6), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-primary::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .6) 50%, transparent 70%); transform: translateX(-120%); animation: tn-sweep 3.6s ease-in-out infinite; }
.btn-primary:hover { background: var(--gradient-premium); color: #000; transform: translateY(-2px); box-shadow: 0 16px 36px -8px rgba(124, 255, 107, .75), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-small { padding: 6px 12px; font-size: .8rem; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Tool page ---------- */
.tool-header { margin-bottom: 32px; animation: tn-rise .7s cubic-bezier(.16, 1, .3, 1) both; }
.tool-header h1 { margin-bottom: 12px; font-size: clamp(2rem, 4.2vw, 2.9rem); }
.tool-header .lead { color: var(--muted); font-size: 1.15rem; max-width: 780px; margin-bottom: 16px; }
.tool-header .meta-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.tool-app { background: linear-gradient(180deg, var(--surface), #040704); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; margin-bottom: 24px; animation: tn-rise .8s .1s cubic-bezier(.16, 1, .3, 1) both; }
.tool-io { display: grid; gap: 32px; grid-template-columns: 1fr; }
.tool-pane { display: flex; flex-direction: column; gap: 20px; }
.pane-header { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--accent); border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 4px; }

.field { margin-bottom: 6px; display: flex; flex-direction: column; }
.field > label, .field-label, .output-wrap > label { display: block; font-weight: 600; font-size: .86rem; color: var(--text); margin-bottom: 8px; }
.field .help { display: block; font-size: .8rem; color: var(--muted); margin-top: 6px; }
.field input[type="text"], .field input[type="number"], .field input[type="date"], .field input[type="url"], .field input[type="email"], .field textarea, .field select {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: #040704; color: var(--text); transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 0 22px -6px rgba(124, 255, 107, .5); }
.field textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.field textarea.mono, .field input.mono { font-family: var(--mono); font-size: .88rem; }

.field-check { display: flex; flex-direction: row; align-items: center; gap: 10px; margin-bottom: 6px; }
.field-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.field-check span { font-size: .92rem; font-weight: 500; color: var(--text); }
.field-range { display: flex; align-items: center; gap: 16px; }
.field-range input[type="range"] { flex: 1; accent-color: var(--accent); cursor: pointer; }
.range-val { min-width: 52px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-ring); border-radius: 8px; padding: 4px 10px; font-size: .86rem; }
.inline-fields { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

.output-wrap { position: relative; margin-bottom: 6px; }
.output-wrap textarea, .output-wrap input[type="text"], .output-wrap pre { width: 100%; padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); font-family: var(--mono); font-size: .88rem; margin: 0; color: var(--text); line-height: 1.6; }
.output-wrap textarea { resize: vertical; min-height: 120px; }
.output-wrap pre { white-space: pre-wrap; word-break: break-word; min-height: 52px; }
.output-wrap .copy-btn { position: absolute; top: 36px; right: 10px; background: var(--surface); border: 1px solid var(--border); }
.output-wrap .copy-btn:hover { color: var(--accent); border-color: var(--accent-ring); background: var(--accent-soft); }
.output-lg textarea { min-height: 220px; }

.status { min-height: 1.5em; font-size: .88rem; font-weight: 600; margin: 8px 0 0; }
.status.ok { color: var(--accent); }
.status.error { color: var(--err); }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 0; }
.stats .stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; transition: border-color .2s ease, transform .2s ease; }
.stats .stat:hover { border-color: var(--accent-ring); transform: translateY(-2px); }
.stats .stat dt { font-size: .74rem; color: var(--muted); font-weight: 600; margin: 0 0 4px; }
.stats .stat dd { margin: 0; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; color: var(--accent); text-shadow: 0 0 20px rgba(124, 255, 107, .35); }
.result-xl { font-family: var(--mono); font-size: 1.4rem; font-weight: 700; word-break: break-all; text-align: center; padding: 24px; background: var(--accent-soft); border: 1px solid var(--accent-ring); border-radius: var(--radius-md); color: var(--accent); }
.privacy-note { display: flex; gap: 12px; align-items: flex-start; background: var(--ok-soft); border-radius: var(--radius-sm); padding: 14px 18px; font-size: .9rem; color: var(--text); margin-top: 20px; border-left: 3px solid var(--accent); }
.privacy-note span:first-child { font-size: 1.1rem; line-height: 1.3; }

/* ---------- Prose & FAQ ---------- */
.prose { max-width: 780px; line-height: 1.75; }
.prose h2 { padding-top: 12px; margin-top: 44px; font-size: 1.5rem; }
.tool-page .prose h2:first-of-type { margin-top: 36px; }
.prose ol, .prose ul { margin: 0 0 1.2em; }
.prose li { margin-bottom: 8px; }

.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0 22px; margin-bottom: 12px; transition: border-color .2s ease, box-shadow .2s ease; }
.faq details:hover { border-color: var(--accent-ring); }
.faq details[open] { border-color: var(--accent-ring); box-shadow: 0 0 30px -12px rgba(124, 255, 107, .45); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-weight: 600; font-size: 1.02rem; padding: 18px 0; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-weight: 500; font-size: 1.1rem; transition: transform .3s ease, background .2s ease; }
.faq details[open] summary::after { content: "\2212"; background: var(--accent); color: #000; transform: rotate(180deg); }
.faq summary:hover { color: var(--accent); }
.faq details p { margin: 0 0 18px; color: var(--muted); font-size: .95rem; animation: tn-rise .4s ease both; }

/* ---------- Sections & directory ---------- */
.section { margin-top: 72px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.section-head h2 { position: relative; margin: 0; padding-left: 18px; font-size: 1.75rem; }
.section-head h2::before { content: ""; position: absolute; left: 0; top: .18em; bottom: .18em; width: 4px; border-radius: 4px; background: var(--gradient-premium); box-shadow: 0 0 14px rgba(124, 255, 107, .7); }
.section-head a { font-size: .9rem; font-weight: 600; transition: transform .2s ease; }
.section-head a:hover { transform: translateX(4px); }

.directory-section { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.directory-section .section-head { grid-column: 1 / -1; margin-bottom: 4px; }
.directory-group { margin: 0; background: linear-gradient(180deg, var(--surface), #040704); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-sm); transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease; animation: tn-rise .6s cubic-bezier(.16, 1, .3, 1) both; }
.directory-group:hover { border-color: var(--accent-ring); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.directory-group h3 { display: flex; align-items: center; gap: 10px; font-size: 1rem; margin-bottom: 14px; }
.directory-links { display: flex; flex-direction: column; gap: 8px; }
.directory-links a { font-size: .92rem; font-weight: 500; color: var(--muted); transition: color .2s ease, transform .2s ease; }
.directory-links a:hover { color: var(--accent); text-decoration: none; transform: translateX(5px); }

.editorial-note { position: relative; overflow: hidden; margin-top: 80px; padding: 52px; border-radius: 28px; color: #fff; background: radial-gradient(700px 320px at 100% 0%, rgba(124, 255, 107, .16), transparent 70%), linear-gradient(135deg, #020402, #07100A); display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; box-shadow: var(--shadow-lg); }
.editorial-note::before { content: ""; position: absolute; width: 480px; height: 480px; right: -140px; top: -220px; border-radius: 50%; background: radial-gradient(circle, rgba(124, 255, 107, .3), transparent 70%); pointer-events: none; animation: tn-drift 12s ease-in-out infinite alternate; }
.editorial-note::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; background: conic-gradient(from var(--ang), transparent 0 65%, rgba(124, 255, 107, .9) 85%, transparent 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: tn-spin 7s linear infinite; }
.editorial-note > * { position: relative; z-index: 1; }
.editorial-note .eyebrow { color: var(--accent); }
.editorial-note h2 { margin: 12px 0 0; color: #fff; font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.15; }
.editorial-note p { margin: 0; color: #B7CDB7; font-size: 1.05rem; }

/* ---------- Category grid ---------- */
.cat-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 24px; }
.cat-card { display: block; background: linear-gradient(180deg, var(--surface), #040704); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; color: var(--text); box-shadow: var(--shadow-sm); transition: transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s ease, border-color .3s ease; animation: tn-rise .6s cubic-bezier(.16, 1, .3, 1) both; }
.cat-card:hover { transform: translateY(-5px); border-color: rgba(124, 255, 107, .6); box-shadow: var(--shadow-lg); text-decoration: none; color: var(--text); }
.cat-card .cat-emoji { font-size: 1.7rem; display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); border: 1px solid var(--accent-ring); transition: transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.cat-card:hover .cat-emoji { transform: rotate(-8deg) scale(1.12); }
.cat-card h3 { margin: 18px 0 6px; font-size: 1.1rem; }
.cat-card p { margin: 0 0 12px; font-size: .9rem; color: var(--muted); line-height: 1.55; }
.cat-card .count { font-weight: 700; color: var(--accent); font-size: .86rem; }

/* ---------- Search page ---------- */
.search-hero { margin: 16px 0 32px; }
.search-hero form { display: flex; gap: 8px; max-width: 700px; }
.search-hero input { flex: 1; padding: 14px 20px; font-size: 1rem; border: 1px solid var(--border); border-radius: 14px; background: #050805; box-shadow: var(--shadow); }
.search-hero input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 0 30px -6px rgba(124, 255, 107, .5); }
.search-results-meta { color: var(--muted); font-size: .88rem; margin: 24px 0 12px; }

/* ---------- Footer ---------- */
.site-footer { position: relative; margin-top: 88px; border-top: 1px solid var(--border); background: #000; }
.site-footer::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); background-size: 200% 100%; animation: tn-line 6s linear infinite; }
.footer-grid { display: grid; gap: 40px; padding-top: 56px; padding-bottom: 40px; grid-template-columns: 1.5fr 1fr 1fr 1fr; }
.footer-brand { display: inline-block; margin-bottom: 14px; color: var(--text); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.03em; }
.footer-brand:hover { color: var(--accent); text-decoration: none; }
.footer-count { opacity: .6; }
.footer-col strong { display: block; margin-bottom: 16px; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--accent); }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; font-size: .9rem; }
.footer-col p { font-size: .9rem; margin-bottom: 12px; line-height: 1.65; color: var(--muted); }
.footer-col a { display: inline-block; color: var(--muted); transition: color .2s ease, transform .2s ease; }
.footer-col a:hover { color: var(--accent); text-decoration: none; transform: translateX(4px); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 22px; padding-bottom: 36px; font-size: .84rem; color: var(--muted); }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--accent); }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding: 88px 0 48px; }
.not-found .code { font-size: 6rem; font-weight: 800; letter-spacing: -0.05em; margin: 0; }
.hero-grad-404 { background: linear-gradient(100deg, #7CFF6B, #D9FFD0, #7CFF6B); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: tn-shine 4s linear infinite; }

/* ---------- Keyframes ---------- */
@keyframes tn-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes tn-reveal { from { opacity: 0; transform: translateY(46px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes tn-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes tn-ping { 0% { box-shadow: 0 0 0 0 rgba(124, 255, 107, .7); } 70%, 100% { box-shadow: 0 0 0 10px rgba(124, 255, 107, 0); } }
@keyframes tn-shine { to { background-position: 200% center; } }
@keyframes tn-sweep { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes tn-spin { to { --ang: 360deg; } }
@keyframes tn-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(120px, 60px) scale(1.15); } }
@keyframes tn-grid { to { background-position: 56px 56px, 56px 56px; } }
@keyframes tn-line { to { background-position: 200% 0; } }
@keyframes tn-progress { to { transform: scaleX(1); } }

/* Scroll-driven reveal where supported (replaces the load-in rise) */
@supports (animation-timeline: view()) {
  .tool-card, .directory-group, .cat-card, .section-head, .editorial-note, .category-chip {
    animation: tn-reveal linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; animation-delay: 0s;
  }
}

/* ---------- Responsive ---------- */
@media (min-width: 860px) {
  .tool-io { grid-template-columns: 1fr 1fr; }
  .tool-io.tool-io-single { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .directory-section { grid-template-columns: repeat(2, 1fr); }
  .editorial-note { padding: 40px 32px; }
}
@media (max-width: 720px) {
  .nav-inner { gap: 12px; }
  .nav-search { order: 4; flex-basis: 100%; max-width: none; margin-left: 0; }
  .hero { padding: 56px 0 36px; }
  .trust-strip { grid-template-columns: 1fr; }
  .editorial-note { grid-template-columns: 1fr; gap: 20px; }
  .directory-section { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-col:first-child { grid-column: 1 / -1; }
  .tool-app { padding: 22px; }
  .stat-chip { padding: 0 14px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-search { flex-direction: column; }
  .hero-search .btn-primary { width: 100%; }
  .stat-chip + .stat-chip { border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .actions, .breadcrumbs, .copy-btn, .site-glow { display: none !important; }
  body { background: #fff; color: #000; }
}
