/* ==========================================================================
   ToolVerse — design system
   Dark, glassy, gradient-accented. Mobile-first where it matters, with
   container queries kept out in favour of predictable breakpoints.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('/assets/fonts/sora-latin.woff2') format('woff2');
}

:root {
  --bg: #05070f;
  --bg-2: #070b16;
  --bg-3: #0a1020;
  --panel: rgba(15, 23, 44, 0.62);
  --panel-solid: #0a1224;
  --panel-2: rgba(255, 255, 255, 0.035);
  --line: rgba(150, 168, 214, 0.13);
  --line-2: rgba(150, 168, 214, 0.22);
  --text: #eef2fb;
  --muted: #9aa7c4;
  --dim: #7583a3;
  --violet: #8b5cf6;
  --blue: #4f7cff;
  --cyan: #22d3ee;
  --pink: #c084fc;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #fb7185;
  --grad: linear-gradient(112deg, #8b5cf6 0%, #4f7cff 52%, #22d3ee 100%);
  --grad-soft: linear-gradient(112deg, rgba(139, 92, 246, 0.18), rgba(79, 124, 255, 0.12), rgba(34, 211, 238, 0.1));
  --radius-lg: 24px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-lg: 0 40px 90px -40px rgba(0, 0, 0, 0.85);
  --shadow-glow: 0 24px 70px -28px rgba(88, 101, 242, 0.55);
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'Sora', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  --container: 1180px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img,
svg,
canvas {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(139, 92, 246, 0.45);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  display: inline-block;
  vertical-align: middle;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--panel-solid);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------------------------------
   Ambient background
   -------------------------------------------------------------------------- */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 45% at 50% -10%, rgba(84, 66, 210, 0.22), transparent 65%),
    radial-gradient(ellipse 50% 40% at 100% 20%, rgba(34, 211, 238, 0.07), transparent 60%),
    linear-gradient(180deg, #060913 0%, #05070f 55%, #04060c 100%);
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 195, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 195, 0.055) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 78%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.orb-a {
  width: 640px;
  height: 640px;
  left: -180px;
  top: -220px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.5), transparent 65%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.orb-b {
  width: 560px;
  height: 560px;
  right: -200px;
  top: 80px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.38), transparent 65%);
  animation: drift-b 32s ease-in-out infinite alternate;
}
.orb-c {
  width: 480px;
  height: 480px;
  left: 40%;
  top: 55%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.16), transparent 65%);
  animation: drift-c 38s ease-in-out infinite alternate;
}

@keyframes drift-a {
  to {
    transform: translate3d(80px, 60px, 0) scale(1.08);
  }
}
@keyframes drift-b {
  to {
    transform: translate3d(-70px, 90px, 0) scale(1.05);
  }
}
@keyframes drift-c {
  to {
    transform: translate3d(-40px, -70px, 0) scale(1.12);
  }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform 0.2s var(--ease),
    background 0.2s,
    border-color 0.2s,
    box-shadow 0.2s,
    filter 0.2s;
}
.btn .icon {
  width: 17px;
  height: 17px;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  filter: none;
  box-shadow: none;
}
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 14px 34px -16px rgba(79, 124, 255, 0.9);
}
.btn-primary:hover {
  filter: brightness(1.09);
  box-shadow: 0 18px 40px -16px rgba(79, 124, 255, 0.95);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--line-2);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(150, 168, 214, 0.34);
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.btn-danger {
  background: rgba(251, 113, 133, 0.1);
  border-color: rgba(251, 113, 133, 0.28);
  color: #fda4af;
}
.btn-danger:hover {
  background: rgba(251, 113, 133, 0.16);
}
.btn-sm {
  height: 36px;
  padding: 0 13px;
  font-size: 13px;
  border-radius: 10px;
}
.btn-lg {
  height: 52px;
  padding: 0 24px;
  font-size: 15px;
  border-radius: 14px;
}
.btn-block {
  width: 100%;
}
.btn.is-busy {
  pointer-events: none;
  color: transparent !important;
}
.btn.is-busy::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
.btn-secondary.is-busy::after,
.btn-ghost.is-busy::after {
  border-color: rgba(255, 255, 255, 0.2);
  border-top-color: var(--cyan);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition:
    background 0.18s,
    color 0.18s,
    border-color 0.18s;
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: var(--line-2);
}
.icon-btn .icon {
  width: 16px;
  height: 16px;
}
.icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Header and navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  background: linear-gradient(180deg, rgba(5, 8, 16, 0.92), rgba(5, 8, 16, 0.62));
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  transition:
    border-color 0.25s,
    background 0.25s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(5, 8, 16, 0.9);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 100%;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  filter: drop-shadow(0 6px 16px rgba(99, 102, 241, 0.45));
}
.brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.035em;
}
.brand-name span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.primary-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
}
.primary-nav a {
  padding: 8px 11px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  transition:
    color 0.18s,
    background 0.18s;
}
.primary-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.primary-nav a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--dim);
  font-size: 13px;
  transition:
    border-color 0.18s,
    background 0.18s,
    color 0.18s;
}
.search-trigger:hover {
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}
.search-trigger .icon {
  width: 16px;
  height: 16px;
}
.search-trigger kbd {
  font-family: var(--font-sans);
  font-size: 10px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.03);
}
.header-cta {
  height: 38px;
  border-radius: 10px;
}
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}
.nav-toggle .icon {
  width: 20px;
  height: 20px;
}
.nav-toggle-close {
  display: none;
}
body.nav-open .nav-toggle-open {
  display: none;
}
body.nav-open .nav-toggle-close {
  display: block;
}

.mobile-nav {
  position: fixed;
  top: calc(var(--header-h) + 8px);
  left: 16px;
  right: 16px;
  z-index: 70;
  max-height: calc(100dvh - var(--header-h) - 24px);
  overflow: auto;
  padding: 16px;
  background: #0a1224;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  animation: pop 0.18s var(--ease);
}
.mobile-nav-inner {
  display: grid;
  gap: 4px;
}
.mobile-nav-title {
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 10px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}
.mobile-nav-link .icon {
  width: 15px;
  height: 15px;
  color: var(--dim);
}
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}
.mobile-nav-sep {
  height: 1px;
  background: var(--line);
  margin: 8px 10px;
}
.mobile-nav-categories {
  display: grid;
  gap: 2px;
}
.mobile-nav-categories a {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--muted);
}
.mobile-nav-categories a span {
  color: var(--dim);
  font-size: 11px;
}
.mobile-nav-categories a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(2, 4, 10, 0.6);
  backdrop-filter: blur(4px);
}
body.nav-open,
body.search-open {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Home hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 80px);
}
.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}
.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(2.4rem, 6.4vw, 4.4rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
}
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 620px;
  margin: 0 auto;
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.65;
  color: var(--muted);
}

.hero-search {
  position: relative;
  z-index: 5;
  max-width: 640px;
  margin: 34px auto 0;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 18px;
  border: 1px solid rgba(150, 168, 214, 0.26);
  border-radius: 16px;
  background: rgba(10, 16, 31, 0.78);
  box-shadow:
    0 22px 60px -30px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.search-box:focus-within {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow:
    0 24px 70px -30px rgba(76, 88, 230, 0.55),
    0 0 0 4px rgba(139, 92, 246, 0.1);
}
.search-box > .icon {
  width: 20px;
  height: 20px;
  color: var(--dim);
}
.search-box input {
  flex: 1;
  min-width: 0;
  height: 46px;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
}
.search-box input::placeholder {
  color: var(--dim);
}
.search-box .btn {
  flex: none;
  height: 44px;
  border-radius: 11px;
}
.hero-search-hint {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--dim);
  text-align: center;
}
.hero-search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  padding: 8px;
  max-height: 360px;
  overflow: auto;
  background: #0a1224;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  text-align: left;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.hero-trust {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 34px;
  font-size: 12.5px;
  color: var(--dim);
}
.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.hero-trust .icon {
  width: 15px;
  height: 15px;
  color: var(--cyan);
}

.float-card {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(12, 19, 36, 0.65);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(14px);
  font-size: 12.5px;
  color: var(--muted);
  animation: float 9s ease-in-out infinite;
  pointer-events: none;
}
.float-card strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}
.float-card .float-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--grad-soft);
  color: #cdd7ff;
}
.float-card .float-icon .icon {
  width: 17px;
  height: 17px;
}
.float-card small {
  font-size: 11px;
  color: var(--dim);
}
.float-a {
  left: 1.5%;
  top: 26%;
  transform: rotate(-4deg);
}
.float-b {
  right: 1.5%;
  top: 32%;
  transform: rotate(3deg);
  animation-delay: -3s;
}
.float-c {
  left: 5%;
  top: 64%;
  transform: rotate(2deg);
  animation-delay: -6s;
}
.float-d {
  right: 4%;
  top: 68%;
  transform: rotate(-3deg);
  animation-delay: -1.5s;
}
@keyframes float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -12px;
  }
}

/* --------------------------------------------------------------------------
   Sections and cards
   -------------------------------------------------------------------------- */
.section {
  position: relative;
  padding: clamp(48px, 7vw, 88px) 0;
}
.section-tight {
  padding-top: 24px;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.section-head h2 {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  letter-spacing: -0.04em;
}
.section-head p {
  margin-top: 8px;
  max-width: 560px;
  color: var(--muted);
  font-size: 14.5px;
}
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 7px 2px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.18s;
}
.section-link .icon {
  width: 15px;
  height: 15px;
  transition: transform 0.2s var(--ease);
}
.section-link:hover {
  color: var(--text);
}
.section-link:hover .icon {
  transform: translateX(3px);
}
.eyebrow-line {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow-line::before {
  content: '';
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 216px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.016) 60%),
    rgba(10, 16, 31, 0.55);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s,
    background 0.25s,
    box-shadow 0.25s;
  overflow: hidden;
}
.tool-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(139, 92, 246, 0.14), transparent 45%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.tool-card:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 92, 246, 0.38);
  box-shadow:
    0 30px 60px -34px rgba(30, 30, 90, 0.9),
    0 0 0 1px rgba(139, 92, 246, 0.08);
}
.tool-card:hover::after {
  opacity: 1;
}
.tool-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.tool-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid color-mix(in srgb, var(--accent, #8b5cf6) 34%, transparent);
  border-radius: 13px;
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent, #8b5cf6) 26%, transparent), transparent 75%),
    rgba(255, 255, 255, 0.02);
  color: color-mix(in srgb, var(--accent, #8b5cf6) 72%, #fff);
  box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--accent, #8b5cf6) 70%, transparent);
}
.tool-icon .icon {
  width: 23px;
  height: 23px;
}
.tool-card h3 {
  margin-bottom: 7px;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.tool-card p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}
.tool-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dim);
}
.tool-card-arrow {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.2s var(--ease);
}
.tool-card-arrow .icon {
  width: 14px;
  height: 14px;
}
.tool-card:hover .tool-card-arrow {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  transform: translateX(2px);
}
.tool-card--compact {
  min-height: 0;
  padding: 18px;
}
.tool-card--compact .tool-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}
.tool-card--compact .tool-icon .icon {
  width: 19px;
  height: 19px;
}
.tool-card--compact .tool-card-top {
  margin-bottom: 12px;
}
.tool-card--compact h3 {
  font-size: 15px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}
.badge--popular {
  color: #d6c7ff;
  border-color: rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.12);
}
.badge--trending {
  color: #a5f3fc;
  border-color: rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.08);
}
.badge--new {
  color: #bbf7d0;
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.08);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.category-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.025);
  transition:
    transform 0.22s var(--ease),
    background 0.22s,
    border-color 0.22s;
}
.category-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent, #8b5cf6) 40%, transparent);
  background: rgba(255, 255, 255, 0.05);
}
.category-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent, #8b5cf6) 25%, transparent);
  background: color-mix(in srgb, var(--accent, #8b5cf6) 12%, transparent);
  color: color-mix(in srgb, var(--accent, #8b5cf6) 70%, #fff);
}
.category-icon .icon {
  width: 21px;
  height: 21px;
}
.category-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.category-info strong {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.category-info span {
  font-size: 11.5px;
  color: var(--dim);
}
.category-arrow {
  margin-left: auto;
  color: var(--dim);
  transition: transform 0.2s var(--ease), color 0.2s;
}
.category-arrow .icon {
  width: 15px;
  height: 15px;
}
.category-card:hover .category-arrow {
  color: var(--text);
  transform: translate(1px, -1px);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.feature-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
}
.feature-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  border-radius: 11px;
  border: 1px solid rgba(139, 92, 246, 0.28);
  background: rgba(139, 92, 246, 0.1);
  color: #cbb9ff;
}
.feature-icon .icon {
  width: 19px;
  height: 19px;
}
.feature-card h3 {
  margin-bottom: 6px;
  font-size: 15px;
}
.feature-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.cta-band {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 5vw, 56px);
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 26px;
  background:
    radial-gradient(600px circle at 15% 0%, rgba(139, 92, 246, 0.2), transparent 55%),
    radial-gradient(500px circle at 90% 100%, rgba(34, 211, 238, 0.12), transparent 55%),
    rgba(12, 18, 35, 0.7);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta-band h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  margin-bottom: 10px;
}
.cta-band p {
  max-width: 540px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 14.5px;
}
.cta-band .hero-ctas {
  margin-top: 24px;
}

/* --------------------------------------------------------------------------
   Page hero, breadcrumbs, prose
   -------------------------------------------------------------------------- */
.breadcrumbs {
  padding-top: 26px;
  font-size: 12.5px;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.breadcrumbs a {
  color: var(--dim);
  transition: color 0.18s;
}
.breadcrumbs a:hover {
  color: var(--text);
}
.breadcrumbs li[aria-current] {
  color: var(--muted);
  max-width: 46ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crumb-sep {
  color: rgba(150, 168, 214, 0.35);
}

.page-hero {
  padding-top: clamp(26px, 4vw, 46px);
  padding-bottom: clamp(28px, 4vw, 44px);
  max-width: 900px;
}
.page-hero h1 {
  font-size: clamp(2.05rem, 4.9vw, 3.35rem);
  letter-spacing: -0.045em;
}
.page-hero-lead {
  margin-top: 16px;
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(15px, 1.7vw, 17px);
  line-height: 1.7;
}
.meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.meta-badges li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
}
.meta-badges .icon {
  width: 13px;
  height: 13px;
  color: var(--cyan);
}
.meta-badges .chip-type {
  color: #cbb9ff;
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.08);
}

.tool-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: start;
  padding-top: clamp(20px, 3vw, 34px);
  padding-bottom: 30px;
}
.tool-hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.15rem);
  letter-spacing: -0.045em;
}
.tool-hero-lead {
  margin-top: 14px;
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(14.5px, 1.6vw, 16.5px);
  line-height: 1.7;
}
.privacy-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 230px;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 13px;
  background: rgba(52, 211, 153, 0.05);
  font-size: 12px;
  line-height: 1.5;
  color: #a7f3d0;
}
.privacy-badge .icon {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--green);
}

.prose {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}
.prose p + p {
  margin-top: 14px;
}
.prose h2 {
  margin: 34px 0 12px;
  color: var(--text);
  font-size: 1.35rem;
}
.prose h3 {
  margin: 24px 0 8px;
  color: var(--text);
  font-size: 1.08rem;
}
.prose ul {
  margin: 12px 0;
  display: grid;
  gap: 8px;
  padding-left: 0;
}
.prose ul li {
  position: relative;
  padding-left: 20px;
}
.prose ul li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.66em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--violet);
}
.prose a {
  color: #c4b5fd;
  text-decoration: underline;
  text-decoration-color: rgba(196, 181, 253, 0.4);
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Workspace
   -------------------------------------------------------------------------- */
.tool-workspace {
  position: relative;
  margin-bottom: 8px;
  padding: clamp(16px, 2.4vw, 26px);
  border: 1px solid var(--line-2);
  border-radius: 26px;
  background:
    radial-gradient(700px circle at 10% 0%, rgba(139, 92, 246, 0.09), transparent 55%),
    linear-gradient(180deg, rgba(20, 29, 52, 0.72), rgba(8, 13, 26, 0.84));
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.workspace-head h2 {
  font-size: 17px;
  letter-spacing: -0.02em;
}
.workspace-head p {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--dim);
}
.workspace-body {
  display: grid;
  gap: 16px;
}

/* Dropzone */
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 176px;
  padding: 28px 20px;
  border: 1.5px dashed rgba(150, 168, 214, 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.015);
  text-align: center;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.2s;
}
.dropzone:hover,
.dropzone.is-drag {
  border-color: rgba(139, 92, 246, 0.65);
  background: rgba(139, 92, 246, 0.055);
}
.dropzone.is-drag {
  transform: scale(1.005);
}
.dropzone-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 15px;
  background: rgba(139, 92, 246, 0.12);
  color: #cbb9ff;
  transition: transform 0.2s var(--ease);
}
.dropzone:hover .dropzone-icon {
  transform: translateY(-2px);
}
.dropzone-icon .icon {
  width: 24px;
  height: 24px;
}
.dropzone-title {
  font-size: 14.5px;
  font-weight: 600;
}
.dropzone-sub {
  font-size: 12.5px;
  color: var(--dim);
}
.dropzone-sub strong {
  color: #c4b5fd;
  font-weight: 500;
}
.dropzone input[type='file'] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.dropzone-hint {
  font-size: 11px;
  color: var(--dim);
}

/* File list */
.file-list {
  display: grid;
  gap: 9px;
}
.file-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--dim);
}
.file-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.028);
}
.file-item.is-dragging {
  opacity: 0.5;
}
.file-thumb {
  width: 46px;
  height: 46px;
  border-radius: 9px;
  object-fit: cover;
  background: #0c1426;
  border: 1px solid var(--line);
}
.file-type-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 9px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  background: rgba(139, 92, 246, 0.08);
  color: #c4b5fd;
}
.file-type-icon .icon {
  width: 21px;
  height: 21px;
}
.file-info {
  min-width: 0;
}
.file-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-meta {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--dim);
}
.file-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.file-actions .icon-btn {
  width: 29px;
  height: 29px;
}
.file-actions .icon-btn .icon {
  width: 14px;
  height: 14px;
}
.drag-handle {
  display: grid;
  place-items: center;
  width: 22px;
  height: 34px;
  color: var(--dim);
  cursor: grab;
}
.drag-handle .icon {
  width: 16px;
  height: 16px;
}
.file-item[data-file-item] {
  grid-template-columns: auto auto minmax(0, 1fr) auto;
}

/* Panels and form controls */
.panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.022);
}
.panel-title {
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--dim);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.field > label,
.field-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}
.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.field-row-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.input,
.select,
.textarea {
  width: 100%;
  height: 43px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(3, 7, 16, 0.6);
  color: var(--text);
  font-size: 14px;
  transition:
    border-color 0.18s,
    box-shadow 0.18s,
    background 0.18s;
}
.input:hover,
.select:hover,
.textarea:hover {
  border-color: rgba(150, 168, 214, 0.3);
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.65);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.14);
  background: rgba(3, 7, 16, 0.85);
}
.input::placeholder,
.textarea::placeholder {
  color: #5f6d8c;
}
.textarea {
  height: auto;
  min-height: 150px;
  padding: 12px;
  line-height: 1.65;
  resize: vertical;
}
.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%),
    linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 19px,
    calc(100% - 12px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
.select option {
  background: #0a1224;
  color: var(--text);
}
.input-group {
  display: flex;
  align-items: stretch;
}
.input-group .input {
  border-radius: 10px 0 0 10px;
}
.input-group .input-suffix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 10px 10px 0;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  color: var(--dim);
  white-space: nowrap;
}
.hint {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--dim);
}
.error-text {
  font-size: 12px;
  color: #fda4af;
}
.input.is-invalid {
  border-color: rgba(251, 113, 133, 0.6);
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--violet);
  cursor: pointer;
}
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
}
.switch-row + .switch-row {
  border-top: 1px solid var(--line);
}
.switch-row .hint {
  margin-top: 2px;
}
.switch {
  position: relative;
  flex: none;
  width: 40px;
  height: 23px;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.switch-track {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  transition: background 0.2s;
  pointer-events: none;
}
.switch-track::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #c7d2ea;
  transition: transform 0.2s var(--ease);
}
.switch input:checked + .switch-track {
  background: linear-gradient(110deg, var(--violet), var(--blue));
  border-color: transparent;
}
.switch input:checked + .switch-track::after {
  transform: translateX(17px);
  background: #fff;
}
.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(3, 7, 16, 0.5);
}
.segmented button {
  height: 33px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  transition:
    color 0.18s,
    background 0.18s,
    box-shadow 0.18s;
}
.segmented button:hover {
  color: var(--text);
}
.segmented button.is-active {
  color: #fff;
  background: linear-gradient(120deg, rgba(139, 92, 246, 0.9), rgba(79, 124, 255, 0.9));
  box-shadow: 0 6px 18px -8px rgba(79, 124, 255, 0.8);
}
.segmented--wide {
  display: flex;
  width: 100%;
}
.segmented--wide button {
  flex: 1;
  padding: 0 8px;
}

.range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  align-items: center;
  gap: 12px;
}
input[type='range'] {
  width: 100%;
  height: 20px;
  margin: 0;
  accent-color: var(--violet);
  cursor: pointer;
}
output {
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  color: var(--muted);
  text-align: right;
}

/* Results */
.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.result-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stat {
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.028);
  min-width: 0;
}
.stat-label {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-value {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  overflow-wrap: anywhere;
}
.stat-value small {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--dim);
  letter-spacing: 0;
}
.stat--accent {
  border-color: rgba(139, 92, 246, 0.32);
  background:
    radial-gradient(240px circle at 20% 0%, rgba(139, 92, 246, 0.22), transparent 70%),
    rgba(139, 92, 246, 0.06);
}
.stat--accent .stat-value {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat--hero {
  padding: 20px;
}
.stat--hero .stat-value {
  font-size: clamp(28px, 4vw, 38px);
}
.result-note {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--dim);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.result-actions .btn {
  flex: 1;
  min-width: 140px;
}
.output-box {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.output-box .input,
.output-box .textarea {
  font-family: var(--mono);
  font-size: 13px;
}
.output-box .btn {
  flex: none;
  height: auto;
  min-height: 43px;
}
.output-textarea {
  min-height: 110px;
}

.notice {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}
.notice .icon {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 1px;
}
.notice strong {
  color: var(--text);
  font-weight: 600;
}
.notice-info {
  border-color: rgba(79, 124, 255, 0.22);
  background: rgba(79, 124, 255, 0.07);
  color: #c4d3ff;
}
.notice-info .icon {
  color: #93b4ff;
}
.notice-warn {
  border-color: rgba(251, 191, 36, 0.22);
  background: rgba(251, 191, 36, 0.06);
  color: #fde9b8;
}
.notice-warn .icon {
  color: var(--amber);
}
.notice-error {
  border-color: rgba(251, 113, 133, 0.28);
  background: rgba(251, 113, 133, 0.08);
  color: #fecdd3;
}
.notice-error .icon {
  color: var(--red);
}
.notice-success {
  border-color: rgba(52, 211, 153, 0.24);
  background: rgba(52, 211, 153, 0.06);
  color: #bbf7d0;
}
.notice-success .icon {
  color: var(--green);
}
.notice.is-compact {
  padding: 9px 11px;
  font-size: 12px;
}

.progress {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}
.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--grad);
  transition: width 0.2s;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px 18px;
  border: 1px dashed var(--line-2);
  border-radius: 13px;
  text-align: center;
  color: var(--dim);
}
.empty-state .icon {
  width: 22px;
  height: 22px;
  margin-bottom: 2px;
  color: var(--dim);
}
.empty-state strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.empty-state p {
  font-size: 12px;
  max-width: 320px;
}

/* Previews */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.preview-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #080d1a;
}
.preview-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.035) 75%) 0 0 / 16px 16px,
    linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.035) 75%) 8px 8px / 16px 16px,
    #080d1a;
  cursor: zoom-in;
}
.preview-card figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 9px;
  font-size: 10.5px;
  color: var(--dim);
}
.preview-card figcaption span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-card figcaption a {
  color: var(--muted);
  flex: none;
}
.preview-card figcaption a:hover {
  color: var(--text);
}
.preview-card figcaption .icon {
  width: 14px;
  height: 14px;
}

.image-stage {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.025) 75%) 0 0 / 20px 20px,
    linear-gradient(45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.025) 75%) 10px 10px / 20px 20px,
    rgba(4, 8, 17, 0.6);
}
.image-stage img {
  max-height: 340px;
  width: auto;
  border-radius: 8px;
  box-shadow: 0 14px 40px -18px rgba(0, 0, 0, 0.9);
}

.crop-stage {
  position: relative;
  display: inline-block;
  line-height: 0;
  touch-action: none;
  user-select: none;
  border-radius: 10px;
  overflow: hidden;
  background: #04070f;
}
.crop-stage canvas {
  display: block;
  max-width: 100%;
  height: auto;
}
.crop-box {
  position: absolute;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 9999px rgba(2, 5, 12, 0.62);
  cursor: move;
  touch-action: none;
}
.crop-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, transparent calc(33.33% - 0.5px), rgba(255, 255, 255, 0.35) 33.33%, transparent calc(33.33% + 0.5px)),
    linear-gradient(to right, transparent calc(66.66% - 0.5px), rgba(255, 255, 255, 0.35) 66.66%, transparent calc(66.66% + 0.5px)),
    linear-gradient(to bottom, transparent calc(33.33% - 0.5px), rgba(255, 255, 255, 0.35) 33.33%, transparent calc(33.33% + 0.5px)),
    linear-gradient(to bottom, transparent calc(66.66% - 0.5px), rgba(255, 255, 255, 0.35) 66.66%, transparent calc(66.66% + 0.5px));
}
.crop-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  margin: -6px;
  border: 2px solid var(--violet);
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.crop-handle[data-handle='nw'] { left: 0; top: 0; cursor: nwse-resize; }
.crop-handle[data-handle='ne'] { left: 100%; top: 0; cursor: nesw-resize; }
.crop-handle[data-handle='sw'] { left: 0; top: 100%; cursor: nesw-resize; }
.crop-handle[data-handle='se'] { left: 100%; top: 100%; cursor: nwse-resize; }
.crop-handle[data-handle='n'] { left: 50%; top: 0; cursor: ns-resize; }
.crop-handle[data-handle='s'] { left: 50%; top: 100%; cursor: ns-resize; }
.crop-handle[data-handle='w'] { left: 0; top: 50%; cursor: ew-resize; }
.crop-handle[data-handle='e'] { left: 100%; top: 50%; cursor: ew-resize; }
.crop-readout {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 7px;
  border-radius: 5px;
  background: rgba(3, 6, 14, 0.75);
  font-size: 10px;
  color: #dbe3f7;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(4px);
}

/* Calculator specifics */
.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 18px;
  align-items: start;
}
.calc-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.022);
}
.calc-panel .field + .field,
.calc-panel .field-row + .field,
.calc-panel .field + .field-row,
.calc-panel .field-row + .field-row {
  margin-top: 12px;
}
.calc-result {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 16px;
  background:
    radial-gradient(320px circle at 15% 0%, rgba(139, 92, 246, 0.22), transparent 65%),
    radial-gradient(280px circle at 95% 100%, rgba(34, 211, 238, 0.1), transparent 60%),
    rgba(10, 16, 31, 0.7);
}
.calc-result .stat-label {
  color: #b8c4e0;
}
.calc-result-value {
  margin: 4px 0 2px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  overflow-wrap: anywhere;
}
.calc-result-caption {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}
.calc-substats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(150, 168, 214, 0.14);
}
.calc-substats > div {
  min-width: 0;
}
.calc-substats span {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}
.calc-substats strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.formula {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(3, 7, 16, 0.45);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.formula strong {
  color: #c4b5fd;
  font-weight: 600;
}
.split-bar {
  display: flex;
  height: 9px;
  margin-top: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}
.split-bar span {
  height: 100%;
}
.split-bar .principal {
  background: linear-gradient(90deg, #8b5cf6, #6d7cff);
}
.split-bar .interest {
  background: linear-gradient(90deg, #22d3ee, #34d399);
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 9px;
  font-size: 11px;
  color: var(--dim);
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.bmi-scale {
  display: grid;
  grid-template-columns: 18.5fr 6.4fr 5fr 15fr;
  height: 7px;
  margin-top: 16px;
  border-radius: 999px;
  overflow: hidden;
  gap: 2px;
}
.bmi-scale span {
  height: 100%;
}
.bmi-scale .u { background: #60a5fa; }
.bmi-scale .n { background: #34d399; }
.bmi-scale .o { background: #fbbf24; }
.bmi-scale .ob { background: #fb7185; }
.bmi-marker {
  position: relative;
  height: 32px;
  margin-top: 2px;
}
.bmi-marker i {
  position: absolute;
  top: 0;
  width: 2px;
  height: 12px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
  transform: translateX(-1px);
  transition: left 0.25s var(--ease);
}
.bmi-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.02em;
}

.toggle-unit {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

/* Tool page content */
.tool-content {
  padding-top: clamp(40px, 6vw, 64px);
}
.content-section {
  padding: clamp(30px, 4vw, 44px) 0;
  border-top: 1px solid var(--line);
}
.content-section:first-child {
  border-top: 0;
  padding-top: 0;
}
.content-title {
  margin-bottom: 8px;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  letter-spacing: -0.035em;
}
.content-lead {
  max-width: 720px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 4vw, 48px);
}
.steps {
  display: grid;
  gap: 16px;
  counter-reset: step;
}
.step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.step-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(139, 92, 246, 0.32);
  border-radius: 9px;
  background: rgba(139, 92, 246, 0.1);
  color: #cbb9ff;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
}
.step h3 {
  margin-bottom: 4px;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.step p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.benefit-list {
  display: grid;
  gap: 12px;
}
.benefit-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.benefit-item .icon {
  width: 17px;
  height: 17px;
  margin-top: 3px;
  color: var(--cyan);
}
.benefit-item h3 {
  font-size: 13.5px;
  margin-bottom: 2px;
}
.benefit-item p {
  color: var(--muted);
  font-size: 12.8px;
  line-height: 1.65;
}
.use-case-list {
  display: grid;
  gap: 8px;
}
.use-case-list li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.use-case-list .icon {
  width: 15px;
  height: 15px;
  margin-top: 3px;
  color: var(--violet);
}
.limit-list {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid rgba(251, 191, 36, 0.15);
  border-radius: 13px;
  background: rgba(251, 191, 36, 0.035);
}
.limit-list li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.6;
  color: #d9d3bd;
}
.limit-list .icon {
  width: 15px;
  height: 15px;
  margin-top: 3px;
  color: var(--amber);
  flex: none;
}

.faq-list {
  display: grid;
  gap: 9px;
}
.faq {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  transition:
    border-color 0.2s,
    background 0.2s;
}
.faq[open] {
  border-color: rgba(139, 92, 246, 0.28);
  background: rgba(139, 92, 246, 0.035);
}
.faq summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 17px;
  font-size: 13.8px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  margin-right: 3px;
  border-right: 1.5px solid var(--dim);
  border-bottom: 1.5px solid var(--dim);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
}
.faq[open] summary::after {
  transform: rotate(225deg);
  border-color: var(--cyan);
}
.faq-answer {
  padding: 0 17px 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

/* Category page */
.category-hero {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding-top: clamp(24px, 4vw, 40px);
  padding-bottom: 34px;
}
.category-hero-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: none;
  margin-top: 4px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  border-radius: 17px;
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  color: color-mix(in srgb, var(--accent) 72%, #fff);
}
.category-hero-icon .icon {
  width: 28px;
  height: 28px;
}
.category-hero h1 {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  letter-spacing: -0.045em;
}
.coming-soon-panel {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 26px;
  border: 1px dashed var(--line-2);
  border-radius: 18px;
  background:
    radial-gradient(400px circle at 0% 0%, rgba(139, 92, 246, 0.1), transparent 65%),
    rgba(255, 255, 255, 0.018);
}
.coming-soon-panel .icon-wrap {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.1);
  color: #cbb9ff;
}
.coming-soon-panel h2 {
  margin-bottom: 6px;
  font-size: 17px;
}
.coming-soon-panel p {
  max-width: 620px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.category-highlights {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}
.category-highlights li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--muted);
}
.category-highlights .icon {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  color: var(--green);
  flex: none;
}
.category-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

/* All tools filter */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0 26px;
}
.filter-chip {
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  transition:
    background 0.18s,
    color 0.18s,
    border-color 0.18s;
}
.filter-chip:hover {
  color: var(--text);
  border-color: var(--line-2);
}
.filter-chip.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(120deg, rgba(139, 92, 246, 0.9), rgba(79, 124, 255, 0.85));
}
.filter-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--dim);
  white-space: nowrap;
}
.filter-chip-count {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  margin-left: 6px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 10px;
  color: var(--dim);
}
.filter-chip.is-active .filter-chip-count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.tools-filter {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.tools-filter .filter-bar {
  margin: 0;
  flex: 1;
}
.tools-filter-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tools-search {
  width: 230px;
  height: 38px;
  font-size: 13px;
}
@media (max-width: 760px) {
  .tools-filter-right {
    width: 100%;
  }
  .tools-search {
    flex: 1;
    width: auto;
  }
  .tools-filter-right .filter-count {
    margin-left: 0;
  }
}
.tools-group {
  margin-bottom: 40px;
}
.tools-group h2 {
  margin-bottom: 16px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.tools-group h2 span {
  margin-left: 8px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--dim);
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   FAQ / about / contact / legal
   -------------------------------------------------------------------------- */
.static-hero {
  padding-top: clamp(30px, 5vw, 56px);
  padding-bottom: 30px;
  max-width: 820px;
}
.static-hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  letter-spacing: -0.045em;
}
.static-hero p {
  margin-top: 16px;
  color: var(--muted);
  font-size: clamp(15px, 1.7vw, 17px);
  line-height: 1.7;
}
.legal-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 48px;
  padding-bottom: 70px;
}
.legal-content {
  max-width: 760px;
}
.legal-content h2 {
  margin: 34px 0 10px;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}
.legal-content h2:first-child {
  margin-top: 0;
}
.legal-content h3 {
  margin: 22px 0 8px;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.legal-content p,
.legal-content li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.78;
}
.legal-content p + p {
  margin-top: 12px;
}
.legal-content ul,
.legal-content ol {
  display: grid;
  gap: 7px;
  margin: 12px 0;
  padding-left: 20px;
  list-style: disc;
}
.legal-content ol {
  list-style: decimal;
}
.legal-content a {
  color: #c4b5fd;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-aside {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.022);
}
.legal-aside h2 {
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.legal-aside a {
  display: block;
  padding: 6px 0;
  font-size: 13px;
  color: var(--muted);
}
.legal-aside a:hover {
  color: var(--text);
}
.legal-updated {
  margin-bottom: 24px;
  font-size: 12px;
  color: var(--dim);
}

.about-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 30px 0 8px;
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 22px;
  padding-bottom: 70px;
}
.contact-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}
.contact-card h2 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}
.contact-card p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}
.contact-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.contact-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--muted);
}
.contact-list .icon {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  color: var(--cyan);
  flex: none;
}
.contact-form .field + .field {
  margin-top: 12px;
}
.contact-email {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 12px;
  background: rgba(52, 211, 153, 0.05);
}
.contact-email > .icon {
  width: 20px;
  height: 20px;
  color: var(--green);
  flex: none;
}
.contact-email span {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.contact-email a {
  font-size: 14px;
  font-weight: 600;
  color: #a7f3d0;
  overflow-wrap: anywhere;
}
.contact-email a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Search palette
   -------------------------------------------------------------------------- */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 9vh 16px 16px;
}
.search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 10, 0.72);
  backdrop-filter: blur(7px);
}
.search-panel {
  position: relative;
  width: min(660px, 100%);
  max-height: 76vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: #0a1121;
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.95);
  overflow: hidden;
  animation: pop 0.18s var(--ease);
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.985);
  }
}
.search-panel-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}
.search-panel-head > .icon {
  width: 19px;
  height: 19px;
  color: var(--dim);
  flex: none;
}
.search-panel-head input {
  flex: 1;
  min-width: 0;
  height: 32px;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 15.5px;
}
.search-panel-head input::placeholder {
  color: var(--dim);
}
.search-panel-head kbd {
  font-family: var(--font-sans);
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--dim);
}
.search-close {
  display: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}
.search-close .icon {
  width: 16px;
  height: 16px;
}
.search-panel-body {
  overflow: auto;
  padding: 8px;
  overscroll-behavior: contain;
}
.search-group-label {
  padding: 9px 10px 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.search-result {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.search-result:hover,
.search-result.is-selected {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.18);
}
.search-result-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: #c4b5fd;
}
.search-result-icon .icon {
  width: 17px;
  height: 17px;
}
.search-result-main {
  min-width: 0;
  flex: 1;
}
.search-result-main strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-main span {
  display: block;
  font-size: 11.5px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-type {
  flex: none;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dim);
}
.search-result mark {
  background: rgba(34, 211, 238, 0.18);
  color: #a5f3fc;
  border-radius: 2px;
}
.search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 38px 20px;
  text-align: center;
}
.search-empty .icon {
  width: 26px;
  height: 26px;
  color: var(--dim);
}
.search-empty strong {
  font-size: 14px;
}
.search-empty p {
  max-width: 360px;
  font-size: 12.5px;
  color: var(--dim);
  line-height: 1.6;
}
.search-empty-suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.search-empty-suggestions a {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--muted);
}
.search-empty-suggestions a:hover {
  color: var(--text);
  border-color: var(--line-2);
}
.search-empty a {
  color: #c4b5fd;
}
.search-all-link {
  display: block;
  margin-top: 4px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.search-all-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.search-panel-foot {
  display: flex;
  gap: 18px;
  padding: 9px 15px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--dim);
}
.search-panel-foot kbd {
  display: inline-block;
  min-width: 17px;
  margin: 0 1px;
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 9.5px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Footer, toasts, 404
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: clamp(40px, 6vw, 70px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(7, 11, 22, 0.4), rgba(4, 6, 12, 0.85));
  padding: clamp(44px, 6vw, 64px) 0 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
}
.footer-brand p {
  max-width: 310px;
  margin-top: 14px;
  color: var(--dim);
  font-size: 12.5px;
  line-height: 1.7;
}
.footer-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  max-width: 300px;
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(52, 211, 153, 0.16);
  border-radius: 10px;
  background: rgba(52, 211, 153, 0.035);
  font-size: 11px !important;
  color: #a7f3d0 !important;
  line-height: 1.55;
}
.footer-note .icon {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 1px;
}
.footer-social {
  display: flex;
  gap: 14px;
  margin-top: 14px;
}
.footer-social a {
  font-size: 12px;
  color: var(--muted);
}
.footer-col h2 {
  margin-bottom: 13px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.footer-col a {
  display: block;
  padding: 4px 0;
  font-size: 12.5px;
  color: var(--muted);
  transition: color 0.18s;
}
.footer-col a:hover {
  color: var(--text);
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--dim);
}
.footer-made {
  color: #5c6a89;
}

.toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 14px;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  background: #0e1729;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text);
  animation: toast-in 0.22s var(--ease);
  pointer-events: auto;
}
.toast .icon {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
  color: var(--cyan);
}
.toast--success .icon {
  color: var(--green);
}
.toast--error .icon {
  color: var(--red);
}
.toast--warn .icon {
  color: var(--amber);
}
.toast.is-leaving {
  animation: toast-out 0.2s forwards;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 62vh;
  padding: 60px 24px;
  text-align: center;
}
.error-code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 16vw, 9rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.06em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.9;
}
.error-page h1 {
  margin-top: 8px;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}
.error-page p {
  max-width: 440px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}
.error-page .hero-ctas {
  margin-top: 26px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1120px) {
  .primary-nav {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .float-card {
    display: none;
  }
  .header-inner {
    gap: 16px;
  }
  .category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .legal-wrap {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .legal-aside {
    position: static;
    order: -1;
    display: none;
  }
  .calc-grid {
    grid-template-columns: 1fr;
  }
  .tool-hero {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .privacy-badge {
    max-width: none;
    margin-top: 0;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .about-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .result-grid--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 64px;
  }
  .container {
    padding: 0 18px;
  }
  .header-cta {
    display: none;
  }
  .search-trigger-label,
  .search-trigger kbd {
    display: none;
  }
  .search-trigger {
    width: 40px;
    justify-content: center;
    padding: 0;
  }
  .brand-mark {
    width: 30px;
    height: 30px;
  }
  .brand-name {
    font-size: 16.5px;
  }
  .hero {
    padding-top: 42px;
  }
  .hero h1 {
    margin-top: 18px;
  }
  .hero-ctas .btn {
    flex: 1;
    min-width: 150px;
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 22px;
  }
  .section-head .section-link {
    margin-top: 0;
  }
  .tool-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .tool-card {
    min-height: 0;
    padding: 18px;
  }
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .category-card {
    padding: 13px;
    gap: 10px;
  }
  .category-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
  .category-icon .icon {
    width: 18px;
    height: 18px;
  }
  .category-info strong {
    font-size: 12.5px;
  }
  .category-arrow {
    display: none;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .two-col {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .workspace-head {
    align-items: flex-start;
  }
  .tool-workspace {
    border-radius: 20px;
  }
  .file-item {
    padding: 9px 10px;
  }
  .file-item[data-file-item] {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .file-item[data-file-item] .file-type-icon,
  .file-item[data-file-item] .file-thumb {
    display: none;
  }
  .result-grid,
  .result-grid--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .field-row,
  .field-row-3 {
    grid-template-columns: 1fr;
  }
  .search-modal {
    padding: 0;
    align-items: stretch;
  }
  .search-panel {
    width: 100%;
    max-height: none;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .search-close {
    display: grid;
  }
  .search-panel-head {
    padding-top: max(13px, env(safe-area-inset-top));
  }
  .search-panel-body {
    flex: 1;
    max-height: none;
  }
  .search-panel-foot {
    display: none;
  }
  .page-hero h1,
  .static-hero h1 {
    font-size: clamp(1.85rem, 7vw, 2.4rem);
  }
  .category-hero {
    gap: 14px;
  }
  .category-hero-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
  }
  .category-hero-icon .icon {
    width: 23px;
    height: 23px;
  }
  .coming-soon-panel {
    flex-direction: column;
    padding: 20px;
  }
  .result-actions .btn {
    min-width: 120px;
  }
  .about-values {
    grid-template-columns: 1fr;
  }
  .filter-bar {
    gap: 6px;
  }
  .filter-chip {
    height: 31px;
    padding: 0 11px;
    font-size: 12px;
  }
  .filter-count {
    width: 100%;
    margin-left: 0;
  }
  .bmi-labels {
    font-size: 9px;
  }
  .segmented button {
    padding: 0 10px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  .hero-sub {
    font-size: 14.5px;
  }
  .hero-trust {
    gap: 6px 14px;
    font-size: 11.5px;
  }
  .search-box {
    padding-left: 14px;
    gap: 8px;
  }
  .search-box input {
    font-size: 15px;
  }
  .search-box .btn {
    padding: 0 12px;
  }
  .category-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-brand {
    grid-column: auto;
  }
  .result-grid,
  .result-grid--four {
    grid-template-columns: 1fr;
  }
  .calc-substats {
    grid-template-columns: 1fr 1fr;
  }
  .workspace-body {
    gap: 12px;
  }
  .dropzone {
    min-height: 150px;
    padding: 22px 14px;
  }
  .tool-hero h1 {
    font-size: 1.9rem;
  }
  .result-actions .btn {
    flex-basis: 100%;
  }
  .stat-value {
    font-size: 20px;
  }
  .legal-content h2 {
    font-size: 1.15rem;
  }
}

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

/* --------------------------------------------------------------------------
   Tool refinements
   -------------------------------------------------------------------------- */
.file-thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
}
.file-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* With a locked ratio only the corner handles are shown, because edge handles
   cannot preserve the ratio without also moving the opposite edge. */
.crop-box.is-locked .crop-handle[data-handle='n'],
.crop-box.is-locked .crop-handle[data-handle='s'],
.crop-box.is-locked .crop-handle[data-handle='e'],
.crop-box.is-locked .crop-handle[data-handle='w'] {
  display: none;
}

.input-group .segmented {
  flex: none;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: 0;
  background: rgba(3, 7, 16, 0.6);
}
.input-group .segmented button {
  height: 33px;
  padding: 0 11px;
}

/* --------------------------------------------------------------------------
   PDF editor workspace
   -------------------------------------------------------------------------- */
.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
}
.editor-add {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.editor-file {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-left: auto;
}
.editor-file-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.editor-file-meta {
  font-size: 11px;
  color: var(--dim);
  white-space: nowrap;
}
.editor-inspector {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
}
.editor-inspector-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  justify-content: space-between;
}
.editor-text-field {
  flex: 1 1 260px;
  min-width: 0;
}
.editor-text-field .textarea {
  min-height: 64px;
  resize: vertical;
}
.editor-inspector-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.field-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.field-inline input[type='range'] {
  width: 130px;
  accent-color: #8b5cf6;
}
.field-inline-value {
  font-size: 11.5px;
  color: var(--text);
  min-width: 36px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.editor-swatches {
  display: flex;
  gap: 6px;
}
.editor-swatch {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  padding: 0;
}
.editor-swatch.is-active {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.editor-hint {
  margin-top: 2px;
}
.editor-pages {
  display: grid;
  gap: 20px;
  margin-top: 14px;
}
.editor-page {
  display: grid;
  gap: 6px;
}
.editor-page-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.editor-sheet {
  position: relative;
  width: min(100%, 780px);
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 24px 60px -30px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}
.editor-canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.editor-overlay {
  position: absolute;
  inset: 0;
}
.edit-item {
  position: absolute;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.edit-item:active {
  cursor: grabbing;
}
.edit-item.is-selected {
  outline: 1.5px dashed #0891b2;
  outline-offset: 2px;
}
.edit-item--text {
  white-space: pre-wrap;
  font-family: Helvetica, Arial, sans-serif;
  line-height: 1.25;
}
.edit-item--image img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}
.edit-item--box {
  background: #fff;
}

@media (max-width: 760px) {
  .editor-file {
    margin-left: 0;
    width: 100%;
  }
  .editor-file-name {
    max-width: 60vw;
  }
  .field-inline input[type='range'] {
    width: 104px;
  }
  .editor-inspector-row {
    align-items: stretch;
  }
  .editor-page-label {
    margin-top: 4px;
  }
}
