/* =============================================================================
   Toolsvoid – app.css
   Single stylesheet, no framework. Sections:
   1 tokens  2 fonts/reset  3 primitives (buttons, fields, badges)
   4 header/nav  5 hero/search/home  6 tool page  7 results  8 footer/cta
   9 utilities/responsive
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --container: 1140px;
  --narrow: 880px;
  --radius-s: 8px;
  --radius: 12px;
  --radius-l: 18px;
  --header-h: 64px;

  --ease: cubic-bezier(.2,.8,.2,1);
  --t-fast: 120ms;
  --t: 200ms;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220;
  --bg-2: #0e1628;
  --surface: #121b2f;
  --surface-2: #182340;
  --surface-3: #1f2c4d;
  --border: #22304d;
  --border-2: #2d3d61;
  --text: #e7ecf5;
  --text-2: #a3afc4;
  --text-3: #6f7d97;
  --accent: #19c6f2;
  --accent-2: #5dd7f6;
  --accent-ink: #061a23;
  --accent-soft: rgba(25,198,242,.12);
  --accent-glow: rgba(25,198,242,.28);
  --promo: #a78bfa;
  --promo-soft: rgba(139,92,246,.16);
  --ok: #34d399;  --ok-soft: rgba(52,211,153,.14);
  --warn: #fbbf24; --warn-soft: rgba(251,191,36,.14);
  --bad: #f87171;  --bad-soft: rgba(248,113,113,.14);
  --shadow: 0 10px 30px -12px rgba(0,0,0,.6);
  --brand-bg: var(--accent);
  --brand-fg: #0b1220;
  --kbd-bg: #1a2540;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f8fc;
  --bg-2: #eef2f8;
  --surface: #ffffff;
  --surface-2: #f1f4fa;
  --surface-3: #e6ebf5;
  --border: #dde3ee;
  --border-2: #c9d2e3;
  --text: #0f172a;
  --text-2: #4b5876;
  --text-3: #7a879f;
  --accent: #0891b2;
  --accent-2: #0e7490;
  --accent-ink: #ffffff;
  --accent-soft: rgba(8,145,178,.1);
  --accent-glow: rgba(8,145,178,.22);
  --promo: #6d4ddb;
  --promo-soft: rgba(109,77,219,.1);
  --ok: #059669;  --ok-soft: rgba(5,150,105,.12);
  --warn: #b45309; --warn-soft: rgba(217,119,6,.14);
  --bad: #dc2626;  --bad-soft: rgba(220,38,38,.1);
  --shadow: 0 10px 30px -14px rgba(15,23,42,.25);
  --brand-bg: #0b1220;
  --brand-fg: #19c6f2;
  --kbd-bg: #e6ebf5;
}

/* 2. Fonts & reset --------------------------------------------------------- */
@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-variable.woff2") format("woff2-variations"),
       url("/assets/fonts/manrope-variable.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-variable.woff2") format("woff2-variations"),
       url("/assets/fonts/jetbrains-mono-variable.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 700; letter-spacing: -0.015em; color: var(--text); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
code, kbd, pre, .is-mono { font-family: var(--font-mono); font-size: .92em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-glow); }

.icon { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.visually-hidden { 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: 1rem; top: -4rem; z-index: 100; padding: .6rem 1rem; background: var(--accent); color: var(--accent-ink); border-radius: var(--radius-s); font-weight: 700; }
.skip-link:focus { top: 1rem; }

.section-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }

/* 3. Primitives ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.15rem; border-radius: var(--radius-s);
  font-weight: 700; font-size: .95rem; line-height: 1.2; white-space: nowrap;
  border: 1px solid transparent; transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-2); color: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--lg { padding: .95rem 1.5rem; font-size: 1.05rem; border-radius: var(--radius); }
.btn--sm { padding: .4rem .7rem; font-size: .82rem; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .65; cursor: progress; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; color: var(--text-2);
  border: 1px solid transparent; transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.icon-btn .icon { width: 20px; height: 20px; }

.link-btn { color: var(--text-3); font-size: .8rem; font-weight: 600; padding: .1rem .35rem; border-radius: 4px; }
.link-btn:hover { color: var(--accent); background: var(--accent-soft); }

.badge {
  display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem;
  border-radius: 999px; font-size: .78rem; font-weight: 700; line-height: 1.5;
  background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border);
}
.badge--ok   { background: var(--ok-soft);   color: var(--ok);   border-color: transparent; }
.badge--warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge--bad  { background: var(--bad-soft);  color: var(--bad);  border-color: transparent; }
.badge--muted{ color: var(--text-3); }

/* Fields */
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.field__label { font-size: .85rem; font-weight: 700; color: var(--text-2); }
.field__tools { display: inline-flex; gap: .25rem; }
.field__hint { font-size: .8rem; color: var(--text-3); }
.field__input {
  width: 100%; padding: .7rem .9rem; border-radius: var(--radius-s);
  background: var(--bg); color: var(--text); border: 1px solid var(--border-2);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field__input::placeholder { color: var(--text-3); }
.field__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field__textarea { min-height: 7rem; resize: vertical; line-height: 1.5; font-family: var(--font-mono); font-size: .9rem; white-space: pre; overflow: auto; }
.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 2.4rem; cursor: pointer; }
.select__chev { position: absolute; right: .8rem; top: 50%; translate: 0 -50%; pointer-events: none; color: var(--text-3); width: 1rem; height: 1rem; }

.check { display: inline-flex; align-items: flex-start; gap: .6rem; cursor: pointer; user-select: none; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box { width: 20px; height: 20px; flex: none; margin-top: .15rem; border-radius: 6px; border: 1.5px solid var(--border-2); background: var(--bg); display: grid; place-items: center; color: transparent; transition: all var(--t-fast); }
.check__box .icon { width: 13px; height: 13px; stroke-width: 3; }
.check input:checked + .check__box { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.check input:focus-visible + .check__box { outline: 2px solid var(--accent); outline-offset: 2px; }
.check__text { font-size: .92rem; color: var(--text); display: flex; flex-direction: column; }
.check__text small { color: var(--text-3); font-size: .8rem; }

.segment { border: 0; padding: 0; margin: 0; }
.segment__opts { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--border-2); border-radius: var(--radius-s); }
.segment__opts input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segment__opts label { padding: .4rem .8rem; border-radius: 6px; font-size: .88rem; font-weight: 600; color: var(--text-2); cursor: pointer; transition: all var(--t-fast); }
.segment__opts input:checked + label { background: var(--accent); color: var(--accent-ink); }
.segment__opts input:focus-visible + label { outline: 2px solid var(--accent); }

kbd.search__kbd { font-family: var(--font-sans); }

/* 4. Header & navigation --------------------------------------------------- */
.promo-bar { background: linear-gradient(90deg, var(--promo-soft), transparent 60%), var(--bg-2); border-bottom: 1px solid var(--border); font-size: .88rem; }
.promo-bar__inner { display: flex; align-items: center; gap: 1rem; min-height: 40px; padding-block: .35rem; }
.promo-bar__text { display: flex; align-items: center; gap: .55rem; color: var(--text-2); flex: 1; min-width: 0; }
.promo-bar__text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.promo-bar__icon { color: var(--promo); }
.promo-bar__cta { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; color: var(--promo); white-space: nowrap; }
.promo-bar__cta:hover { color: var(--promo); }
.promo-bar__close { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; color: var(--text-3); }
.promo-bar__close:hover { background: var(--surface-2); color: var(--text); }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { position: relative; display: flex; align-items: center; gap: 1.25rem; height: var(--header-h); }
.site-header__actions { display: flex; align-items: center; gap: .25rem; margin-left: auto; }

.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 800; letter-spacing: -0.02em; font-size: 1.3rem; }
.brand:hover { text-decoration: none; color: var(--text); }
.brand__mark { width: 34px; height: 34px; }
.brand__word span { color: var(--accent); }

.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: .25rem; }
.nav__item { position: static; }
.nav__link { display: inline-flex; align-items: center; gap: .3rem; padding: .55rem .85rem; border-radius: 10px; font-weight: 600; color: var(--text-2); font-size: .95rem; transition: background var(--t-fast), color var(--t-fast); }
.nav__link:hover, .nav__link[aria-expanded="true"] { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav__chev { width: .95em; height: .95em; transition: transform var(--t); }
.nav__link[aria-expanded="true"] .nav__chev { transform: rotate(180deg); }
.nav__promo { display: inline-flex; align-items: center; gap: .4rem; margin-left: .5rem; padding: .5rem .9rem; border-radius: 999px; font-weight: 700; font-size: .9rem; color: var(--promo); background: var(--promo-soft); border: 1px solid transparent; }
.nav__promo:hover { border-color: var(--promo); text-decoration: none; }

.menu {
  position: absolute; left: 50%; top: calc(100% + 6px); translate: -50% 0;
  width: min(1060px, calc(100vw - 2rem)); padding: 1.25rem 1.25rem 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l);
  box-shadow: var(--shadow);
}
.menu__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.25rem 1.25rem; }
.menu__col:nth-child(-n+2) { grid-column: span 2; }
.menu__title { font-size: .8rem; text-transform: none; letter-spacing: 0; color: var(--text-3); font-weight: 700; margin-bottom: .6rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
.menu__title a { color: inherit; }
.menu__links { display: grid; gap: .1rem .75rem; }
.menu__links a { display: flex; align-items: center; gap: .45rem; min-width: 0; padding: .3rem .45rem; margin-left: -.45rem; border-radius: 8px; color: var(--text-2); font-size: .8rem; }
.menu__links a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu__links a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.menu__links .icon { color: var(--accent); width: 1rem; height: 1rem; }
.menu__col:nth-child(-n+2) .menu__links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.menu__foot { margin: 1.25rem -1.25rem 0; padding: .8rem 1.25rem; border-top: 1px solid var(--border); background: var(--bg-2); border-radius: 0 0 var(--radius-l) var(--radius-l); font-size: .9rem; }
.menu__foot a { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; }

.nav-search { position: relative; display: none; align-items: center; margin-right: .5rem; }
.nav-search__icon { position: absolute; left: .7rem; width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.nav-search__input { width: 190px; height: 38px; padding: 0 .75rem 0 2.1rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: .88rem; transition: width var(--t) var(--ease), border-color var(--t-fast), box-shadow var(--t-fast); }
.nav-search__input::placeholder { color: var(--text-3); }
.nav-search__input:focus { outline: none; width: 260px; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.nav-search__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.nav-search__results { position: absolute; right: 0; top: calc(100% + 8px); width: 320px; padding: .4rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); z-index: 60; }
.nav-search__results a { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 8px; color: var(--text); font-size: .9rem; }
.nav-search__results a .icon { color: var(--accent); width: 1rem; height: 1rem; flex: none; }
.nav-search__results a small { margin-left: auto; color: var(--text-3); font-size: .72rem; }
.nav-search__results a:hover, .nav-search__results li.is-active a { background: var(--surface-2); text-decoration: none; }
.nav-search__results .nav-search__empty { padding: .5rem .6rem; color: var(--text-3); font-size: .85rem; }
.theme-icon { width: 20px; height: 20px; }
html[data-theme="dark"] .theme-icon--moon { display: none; }
html[data-theme="light"] .theme-icon--sun { display: none; }

.mobile-nav { border-top: 1px solid var(--border); background: var(--bg); max-height: calc(100vh - var(--header-h)); overflow: auto; padding-block: .75rem 1.25rem; }
.mobile-nav__group { border-bottom: 1px solid var(--border); }
.mobile-nav__group summary { display: flex; justify-content: space-between; align-items: center; padding: .8rem 0; font-weight: 700; cursor: pointer; list-style: none; }
.mobile-nav__group summary::-webkit-details-marker { display: none; }
.mobile-nav__group[open] summary .icon { transform: rotate(180deg); }
.mobile-nav__group ul { padding-bottom: .75rem; display: grid; grid-template-columns: 1fr 1fr; gap: .15rem .75rem; }
.mobile-nav__group a { display: block; padding: .4rem 0; color: var(--text-2); font-size: .93rem; }
.mobile-nav__links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; padding-top: 1rem; font-weight: 700; }

/* 5. Hero, search, homepage ------------------------------------------------ */
.hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(70% 90% at 50% 100%, transparent 40%, var(--bg-2) 100%); }
.hero__inner { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem); }
.hero__title { font-size: clamp(2.1rem, 4.8vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; max-width: 19ch; }
.hero__lead { margin-top: 1.25rem; font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--text-2); max-width: 62ch; }

.search { position: relative; display: flex; align-items: center; margin-top: 2rem; max-width: 640px; }
.search__icon { position: absolute; left: 1rem; width: 20px; height: 20px; color: var(--text-3); pointer-events: none; }
.search__input {
  width: 100%; height: 56px; padding: 0 3.25rem 0 3rem; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border-2); color: var(--text); font-size: 1.05rem;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, var(--shadow);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.search__input::placeholder { color: var(--text-3); }
.search__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search__kbd { position: absolute; right: .9rem; padding: .1rem .5rem; border-radius: 6px; background: var(--kbd-bg); border: 1px solid var(--border); color: var(--text-3); font-size: .78rem; font-weight: 700; }
.search--compact { margin-top: 1.25rem; max-width: 520px; }
.search--compact .search__input { height: 48px; font-size: 1rem; }

.hero__chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .9rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: .88rem; font-weight: 600; transition: all var(--t-fast); }
.chip:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip--link { color: var(--accent); }

.home-grid { padding-block: clamp(2.5rem, 5vw, 4rem) 1rem; }
.home-grid__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.home-grid__status { color: var(--text-3); font-size: .9rem; min-height: 1.4em; margin-top: 0.5rem; }
.home-grid__more { margin-top: 1.75rem; text-align: center; }

.tool-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.tool-card {
  position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: .25rem 1rem; align-items: start;
  padding: 1.1rem 1.15rem 1rem; border-radius: var(--radius); color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.tool-card:hover { text-decoration: none; color: var(--text); border-color: var(--accent); background: var(--surface-2); }
.tool-card:hover .tool-card__title { color: var(--accent); }
.tool-card__icon { grid-row: 1 / span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); }
.tool-card__icon .icon { width: 22px; height: 22px; }
.tool-card__body { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.tool-card__title { font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; transition: color var(--t-fast); }
.tool-card__desc { color: var(--text-2); font-size: .9rem; line-height: 1.5; }
.tool-card__cat { grid-column: 2; justify-self: start; margin-top: .6rem; font-size: .72rem; font-weight: 700; color: var(--text-3); padding: .1rem .5rem; border-radius: 999px; border: 1px solid var(--border); }
.tool-card--compact { grid-template-rows: auto; padding: .85rem 1rem; }
.tool-card--compact .tool-card__icon { grid-row: 1; width: 36px; height: 36px; border-radius: 9px; }
.tool-card--compact .tool-card__icon .icon { width: 18px; height: 18px; }
.tool-card--compact { align-items: center; }
.tool-card--compact .tool-card__body { justify-content: center; }
.tool-card--compact .tool-card__title { font-size: .95rem; }
.tool-card--compact .tool-card__cat { display: none; }
.tool-card.is-hidden { display: none; }
.tool-grid__empty { grid-column: 1 / -1; padding: 2rem; text-align: center; color: var(--text-3); border: 1px dashed var(--border-2); border-radius: var(--radius); }

.why { padding-block: clamp(2rem, 5vw, 4rem); }
.why__grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.25rem; }
.why__item { padding: 1.4rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.why__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); margin-bottom: .9rem; }
.why__item h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.why__item p { color: var(--text-2); font-size: .93rem; }

.cats { padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.cats__grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.25rem; }
.cat-card { display: flex; flex-direction: column; gap: .35rem; padding: 1.25rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); transition: border-color var(--t-fast), background var(--t-fast); }
.cat-card:hover { text-decoration: none; color: var(--text); border-color: var(--accent); background: var(--surface-2); }
.cat-card__count { font-size: .78rem; font-weight: 700; color: var(--accent); }
.cat-card__name { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.01em; }
.cat-card__desc { color: var(--text-2); font-size: .9rem; flex: 1; }
.cat-card__go { display: inline-flex; align-items: center; gap: .3rem; margin-top: .75rem; font-weight: 700; font-size: .9rem; color: var(--accent); }

/* Generic page hero (tools list, contact, 404) */
.page-hero { padding-block: clamp(2rem, 5vw, 3.5rem) 1.5rem; }
.page-hero__title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.025em; }
.page-hero__lead { margin-top: .75rem; color: var(--text-2); max-width: 64ch; font-size: 1.05rem; }
.page-hero__code { font-family: var(--font-mono); color: var(--accent); font-weight: 700; font-size: 1rem; margin-bottom: .5rem; }
.cat-section { padding-block: 1.5rem 2.5rem; border-top: 1px solid var(--border); }
.cat-section__head { margin-bottom: 1.25rem; }
.cat-section__head p { color: var(--text-2); margin-top: .25rem; }
.cat-section.is-hidden { display: none; }

.contact { display: grid; gap: 1rem; grid-template-columns: 1fr; padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.contact__card { padding: 1.5rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); display: grid; gap: .75rem; }
.contact__card h2 { font-size: 1.15rem; }
.contact__card p { color: var(--text-2); }
.contact__email img { width: 100%; max-width: 360px; height: auto; border-radius: 8px; background: var(--bg); padding: .6rem 1rem; border: 1px solid var(--border); }

/* 6. Tool page -------------------------------------------------------------- */
.tool-page { max-width: var(--narrow); padding-block: 1.5rem clamp(2.5rem, 6vw, 5rem); }
.crumbs { font-size: .85rem; color: var(--text-3); margin-bottom: 1.25rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .4rem; }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--border-2); }
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--text-2); }

.tool-head { margin-bottom: 1.5rem; }
.tool-head__title { font-size: clamp(1.6rem, 3.5vw, 2.25rem); font-weight: 800; letter-spacing: -0.025em; }
.tool-head__intro { margin-top: .5rem; color: var(--text-2); font-size: 1.02rem; max-width: 66ch; }
.tool-head__badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.tool-head__badges li { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 700; color: var(--text-3); padding: .2rem .6rem; border-radius: 999px; border: 1px solid var(--border); }
.tool-head__badges .icon { width: .95rem; height: .95rem; color: var(--accent); }

.tool-panel { padding: 1.25rem; border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.tool-form { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.tool-form__row { display: flex; flex-wrap: wrap; gap: 1rem; }
.tool-form__row > .field { flex: 1 1 180px; }
.tool-form__row > .field--grow { flex: 3 1 260px; }
.tool-form__row > .segment { flex: 0 1 auto; }
.tool-form__opts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; }
.tool-form__actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding-top: .25rem; }
.tool-form__hint { font-size: .8rem; color: var(--text-3); }
.btn--run .icon { width: 1rem; height: 1rem; }
.captcha { grid-column: 1 / -1; }

.tool-static { display: grid; gap: 1rem; }
.tool-static + .tool-form { margin-top: 1rem; }

/* 7. Results ---------------------------------------------------------------- */
.tool-results:empty { display: none; }
.tool-results { display: grid; gap: 1rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.tool-results[aria-busy="true"] { opacity: .7; }

.result { border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); overflow: hidden; }
.result__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem .6rem .55rem .9rem; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.result__label { font-size: .85rem; font-weight: 700; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result__tools { display: inline-flex; gap: .25rem; flex: none; }
.result__btn { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .55rem; border-radius: 6px; font-size: .78rem; font-weight: 700; color: var(--text-3); }
.result__btn:hover { background: var(--surface-3); color: var(--text); }
.result__btn .icon { width: .95rem; height: .95rem; }
.result__btn.is-done { color: var(--ok); }
.result__body { padding: 0; }
.result__pre { margin: 0; padding: .9rem 1rem; font-size: .86rem; line-height: 1.55; white-space: pre; overflow: auto; max-height: 420px; color: var(--text); tab-size: 4; }
.result__pre.is-wrap { white-space: pre-wrap; word-break: break-word; }
.result--large .result__pre { max-height: 640px; }
.result__empty { padding: .9rem 1rem; color: var(--text-3); font-size: .9rem; }

.kv { width: 100%; border-collapse: collapse; font-size: .9rem; }
.kv th, .kv td { padding: .6rem .9rem; border-top: 1px solid var(--border); vertical-align: top; text-align: left; }
.kv tr:first-child th, .kv tr:first-child td { border-top: 0; }
.kv th { width: 34%; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.kv td { color: var(--text); word-break: break-word; white-space: pre-line; }
.kv td.is-strong { font-weight: 700; font-family: var(--font-mono); font-size: .9rem; }
.kv__copy { margin-left: .5rem; vertical-align: middle; }
.flag { display: inline-block; width: 24px; height: 18px; margin-right: .5rem; vertical-align: -3px; border-radius: 2px; box-shadow: 0 0 0 1px var(--border); }

.table-wrap { overflow: auto; }
.data { width: 100%; border-collapse: collapse; font-size: .86rem; }
.data th, .data td { padding: .55rem .8rem; border-top: 1px solid var(--border); text-align: left; vertical-align: top; }
.data thead th { border-top: 0; background: var(--surface-2); color: var(--text-2); font-weight: 700; font-size: .78rem; white-space: nowrap; }
.data td { word-break: break-word; white-space: pre-line; max-width: 420px; }
/* Variant whose first column lines up with the label column of a .kv table above it */
.data--kv-aligned th, .data--kv-aligned td { padding: .6rem .9rem; }
.data--kv-aligned th:first-child, .data--kv-aligned td:first-child { width: 34%; }
.data--kv-aligned td:first-child { color: var(--text-2); font-weight: 600; }

.note { display: flex; gap: .65rem; align-items: flex-start; padding: .8rem 1rem; border-radius: var(--radius-s); font-size: .9rem; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); }
.note .icon { flex: none; margin-top: .15rem; }
.note--info .icon { color: var(--accent); }
.note--warn { border-color: transparent; background: var(--warn-soft); color: var(--text); }
.note--warn .icon { color: var(--warn); }
.note--bad { border-color: transparent; background: var(--bad-soft); color: var(--text); }
.note--bad .icon { color: var(--bad); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75rem; }
.stat { padding: .8rem 1rem; border-radius: var(--radius-s); background: var(--bg); border: 1px solid var(--border); }
.stat__v { display: block; font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; font-family: var(--font-mono); }
.stat__l { font-size: .78rem; color: var(--text-3); font-weight: 600; }

.hash-list { display: grid; gap: .5rem; }
.hash-row { display: grid; grid-template-columns: 90px 1fr auto; gap: .75rem; align-items: center; padding: .6rem .9rem; border-radius: var(--radius-s); background: var(--bg); border: 1px solid var(--border); }
.hash-row__name { font-weight: 700; font-size: .85rem; color: var(--text-2); }
.hash-row__val { font-family: var(--font-mono); font-size: .85rem; word-break: break-all; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.result--loading { display: flex; align-items: center; gap: .75rem; padding: 1rem; color: var(--text-2); font-size: .92rem; border-style: dashed; }

/* Sections under the tool */
.about, .steps, .features, .faqs, .related { margin-top: clamp(2.5rem, 6vw, 4rem); }
.prose { margin-top: 1rem; color: var(--text-2); display: grid; gap: .9rem; max-width: 70ch; }
.prose p { line-height: 1.7; }
.prose a { font-weight: 600; }
.prose strong { color: var(--text); }
.steps__list { margin-top: 1rem; display: grid; gap: .6rem; counter-reset: step; }
.steps__list li { counter-increment: step; display: grid; grid-template-columns: 32px 1fr; gap: .25rem .9rem; padding: .9rem 1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.steps__list li::before { content: counter(step); grid-row: 1 / span 2; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .9rem; }
.steps__list strong { font-weight: 700; }
.steps__list span { color: var(--text-2); font-size: .93rem; grid-column: 2; }

.features__grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1rem; }
.feature { padding: 1.25rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.feature__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); margin-bottom: .75rem; }
.feature__title { font-size: 1rem; margin-bottom: .35rem; }
.feature__text { color: var(--text-2); font-size: .9rem; }

.faqs__list { margin-top: 1rem; display: grid; gap: .5rem; }
.faq { border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.faq__q { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .95rem 1.1rem; font-weight: 700; cursor: pointer; list-style: none; }
.faq__q::-webkit-details-marker { display: none; }
.faq__chev { color: var(--text-3); transition: transform var(--t); }
.faq[open] .faq__chev { transform: rotate(180deg); }
.faq__a { padding: 0 1.1rem 1rem; color: var(--text-2); font-size: .95rem; line-height: 1.65; max-width: 70ch; }

.related .tool-grid { margin-top: 1rem; }

/* Share bar */
.share-bar { display: none; }
.share-bar.is-off { opacity: 0; pointer-events: none; transition: opacity var(--t); }

/* 8. CTA & footer ----------------------------------------------------------- */
.cta { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: linear-gradient(135deg, var(--promo-soft), transparent 55%), var(--bg-2); }
.cta__inner { display: grid; gap: 1.5rem; padding-block: clamp(2.5rem, 6vw, 4.5rem); grid-template-columns: 1fr; align-items: center; }
.cta__kicker { display: inline-flex; align-items: center; gap: .4rem; color: var(--promo); font-weight: 700; font-size: .85rem; margin-bottom: .6rem; }
.cta__title { font-size: clamp(1.5rem, 3.4vw, 2.2rem); font-weight: 800; letter-spacing: -0.025em; max-width: 22ch; }
.cta__text { margin-top: .75rem; color: var(--text-2); max-width: 60ch; }
.cta__action { display: flex; flex-direction: column; gap: .75rem; align-items: flex-start; }
.cta__docs { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; font-size: .9rem; color: var(--text-2); }
.cta .btn--primary { background: var(--promo); color: #fff; }
.cta .btn--primary:hover { filter: brightness(1.08); color: #fff; }

.site-footer { background: var(--bg); padding-top: clamp(2.5rem, 5vw, 4rem); }
.site-footer__grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
.site-footer__brand .brand { margin-bottom: 1rem; }
.site-footer__line { color: var(--text-2); font-size: .9rem; max-width: 36ch; }
.site-footer__line + .site-footer__line { margin-top: .35rem; }
.site-footer__title { font-size: .85rem; font-weight: 800; color: var(--text); margin-bottom: .75rem; }
.site-footer__title--share { margin-top: 1.5rem; margin-bottom: .6rem; }
.site-footer__share { display: flex; gap: .5rem; }
.share-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); transition: all var(--t-fast); }
.share-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.share-btn .icon { width: 17px; height: 17px; }
.site-footer__col ul { display: grid; gap: .35rem; }
.site-footer__col a { color: var(--text-2); font-size: .9rem; }
.site-footer__col a:hover { color: var(--accent); }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; margin-top: 2.5rem; padding-block: 1.25rem; border-top: 1px solid var(--border); font-size: .82rem; color: var(--text-3); }
.site-footer__bottom a { color: var(--text-2); }

.toast { position: fixed; left: 50%; bottom: 1.5rem; translate: -50% 0; z-index: 90; padding: .6rem 1rem; border-radius: 10px; background: var(--text); color: var(--bg); font-weight: 700; font-size: .9rem; box-shadow: var(--shadow); }

/* 9. Responsive & motion ------------------------------------------------------ */
@media (min-width: 600px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .features__grid, .why__grid { grid-template-columns: repeat(3, 1fr); }
  .cats__grid { grid-template-columns: repeat(2, 1fr); }
  .contact { grid-template-columns: 1fr 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
  .cats__grid { grid-template-columns: repeat(4, 1fr); }
  .cta__inner { grid-template-columns: 1.4fr 1fr; }
  .cta__action { align-items: flex-end; }
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
@media (min-width: 1024px) {
  .nav { display: block; }
  .nav-search { display: flex; }
  .nav-burger { display: none; }
  .mobile-nav { display: none !important; }
}
@media (min-width: 1300px) {
  .share-bar {
    display: flex; flex-direction: column; gap: .4rem;
    position: fixed; left: max(1rem, calc((100vw - var(--narrow)) / 2 - 120px)); top: 50%; translate: 0 -50%; z-index: 40;
    padding: .4rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .share-bar__btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--text-3); transition: all var(--t-fast); }
  .share-bar__btn:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
  .share-bar__btn .icon { width: 18px; height: 18px; }
}
@media (max-width: 599px) {
  .promo-bar__text { display: none; }
  .promo-bar__inner { justify-content: center; }
  .promo-bar__cta::before { content: "APIVoid: "; color: var(--text-2); font-weight: 600; margin-right: .25rem; }
  .tool-panel { padding: 1rem; }
  .kv th { width: auto; white-space: normal; }
  .kv th, .kv td { display: block; padding: .5rem .9rem; }
  .kv th { border-top: 1px solid var(--border); padding-bottom: 0; }
  .kv td { border-top: 0; }
  .hash-row { grid-template-columns: 1fr auto; }
  .hash-row__name { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .hero__canvas { display: none; }
}
@media print {
  .site-header, .promo-bar, .cta, .site-footer, .share-bar, .tool-form__actions, .result__tools { display: none !important; }
  body { background: #fff; color: #000; }
}
