/* ---- tokens.css ---- */
/* Vootkit design tokens — the single source of truth.
 * Direction locked in docs/DESIGN_RESEARCH.md:
 * light default + first-class dark, ONE accent, 8px rhythm, variable fonts. */

:root {
  color-scheme: light;

  /* ---- neutrals (do ~95% of the work) ---- */
  --n-0:  #ffffff;
  --n-25: #fbfcfe;   /* soft canvas — calm, not clinical pure white */
  --n-50: #f5f7fa;
  --n-100:#eef1f6;
  --n-200:#e2e7ef;
  --n-300:#cbd3df;
  --n-400:#9aa5b5;
  --n-500:#6b7688;
  --n-600:#4d5768;
  --n-700:#354052;
  --n-800:#1f2937;
  --n-900:#0d1420;

  /* ---- brand accent: premium rose-pink (per-category overrides in skin.css) ---- */
  --accent:        #d61f69;
  --accent-hover:  #be185d;
  --accent-active: #a3134f;
  --accent-weak:   #fdeef5;   /* soft pink tinted surface */
  --accent-border: #f6c2d9;
  --accent-on:     #ffffff;   /* text on accent */

  /* ---- semantic only. never decorative. ---- */
  --ok:#0f7a4a;  --ok-weak:#e7f6ee;  --ok-border:#a9dcc2;
  --warn:#a45c06; --warn-weak:#fdf3e3; --warn-border:#f0cf95;
  --err:#b4232a;  --err-weak:#fdeceb;  --err-border:#f2b8b5;

  /* ---- surfaces & text ---- */
  --canvas:      var(--n-25);
  --surface:     var(--n-0);
  --surface-sunk:var(--n-50);
  --line:        var(--n-200);
  --line-strong: var(--n-300);
  --ink:         var(--n-900);
  --ink-soft:    var(--n-600);
  --ink-mute:    var(--n-500);

  /* ---- type: system stack, no render-blocking font download ---- */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: var(--font-sans);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* fluid type scale */
  --t-xs:   0.75rem;    /* 12 */
  --t-sm:   0.8125rem;  /* 13 */
  --t-base: 0.9375rem;  /* 15 */
  --t-md:   1rem;       /* 16 */
  --t-lg:   1.125rem;   /* 18 */
  --t-xl:   clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --t-2xl:  clamp(1.5rem, 1.25rem + 1.1vw, 2rem);
  --t-3xl:  clamp(1.875rem, 1.4rem + 2vw, 2.75rem);
  --t-4xl:  clamp(2.25rem, 1.5rem + 3.4vw, 3.75rem);
  --leading-tight: 1.12;
  --leading-body: 1.65;

  /* ---- 8px rhythm ---- */
  --s-1: 4px;   --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 24px;  --s-6: 32px;  --s-7: 48px;  --s-8: 64px;  --s-9: 96px;

  /* ---- radii ---- */
  --r-sm: 8px;  --r-md: 12px;  --r-lg: 16px;  --r-xl: 20px;  --r-pill: 999px;

  /* ---- elevation: subtle, layered ---- */
  --shadow-sm: 0 1px 2px rgb(13 20 32 / .04), 0 2px 8px rgb(13 20 32 / .04);
  --shadow-md: 0 2px 6px rgb(13 20 32 / .05), 0 10px 24px rgb(13 20 32 / .07);
  --shadow-lg: 0 8px 20px rgb(13 20 32 / .07), 0 24px 56px rgb(13 20 32 / .10);
  --ring: 0 0 0 4px rgb(214 31 105 / .16);   /* micro-glow focus */

  /* ---- motion ---- */
  --ease: cubic-bezier(.22,.8,.3,1);
  --dur-fast: .14s;  --dur: .2s;  --dur-slow: .32s;

  /* ---- layout ---- */
  --page: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --tap: 44px;   /* minimum touch target */
}

/* ---------- dark: a designed palette, not an inversion ---------- */
[data-theme="dark"] {
  color-scheme: dark;
  --canvas:      #0b1220;
  --surface:     #121b2b;
  --surface-sunk:#0e1727;
  --line:        #24314a;
  --line-strong: #33425e;
  --ink:         #eaf0f9;
  --ink-soft:    #a9b8cc;
  --ink-mute:    #8494ab;

  --accent:        #f472b6;
  --accent-hover:  #f9a8d4;
  --accent-active: #fbcfe8;
  --accent-weak:   #2a1420;
  --accent-border: #7d2d52;
  --accent-on:     #2a0a17;

  --ok:#5ed49b;  --ok-weak:#0f2b1f;  --ok-border:#1f5c40;
  --warn:#f0b352; --warn-weak:#2c2010; --warn-border:#6b4d17;
  --err:#ff8b90;  --err-weak:#2e1517;  --err-border:#6d2a2d;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / .3);
  --shadow-md: 0 2px 6px rgb(0 0 0 / .34), 0 10px 24px rgb(0 0 0 / .3);
  --shadow-lg: 0 8px 20px rgb(0 0 0 / .4), 0 24px 56px rgb(0 0 0 / .36);
  --ring: 0 0 0 4px rgb(244 114 182 / .24);
}

/* respect OS preference when the user hasn't chosen */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --canvas:#0b1220; --surface:#121b2b; --surface-sunk:#0e1727;
    --line:#24314a; --line-strong:#33425e;
    --ink:#eaf0f9; --ink-soft:#a9b8cc; --ink-mute:#8494ab;
    --accent:#f472b6; --accent-hover:#f9a8d4; --accent-active:#fbcfe8;
    --accent-weak:#2a1420; --accent-border:#7d2d52; --accent-on:#2a0a17;
    --ok:#5ed49b; --ok-weak:#0f2b1f; --ok-border:#1f5c40;
    --warn:#f0b352; --warn-weak:#2c2010; --warn-border:#6b4d17;
    --err:#ff8b90; --err-weak:#2e1517; --err-border:#6d2a2d;
    --shadow-sm:0 1px 2px rgb(0 0 0 / .3);
    --shadow-md:0 2px 6px rgb(0 0 0 / .34), 0 10px 24px rgb(0 0 0 / .3);
    --shadow-lg:0 8px 20px rgb(0 0 0 / .4), 0 24px 56px rgb(0 0 0 / .36);
    --ring:0 0 0 4px rgb(244 114 182 / .24);
  }
}

/* the single sanctioned gradient — max ONE element per page */
.grad-text {
  background: linear-gradient(100deg, var(--accent), #d946a6 55%, #e11d64);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0s; --dur: 0s; --dur-slow: 0s; }
}

/* ---- base.css ---- */
/* Vootkit base + components. Depends on tokens.css.
 * ~10 components, 8px rhythm, one accent, WCAG 2.2 AA. */

/* ---------- reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-sans);
  font-size: var(--t-md);
  line-height: var(--leading-body);
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
img,svg,video,canvas { display: block; max-width: 100%; }
input,button,textarea,select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { font-family: var(--font-display); line-height: var(--leading-tight); letter-spacing: -.02em; text-wrap: balance; }
p { text-wrap: pretty; }

/* ---------- a11y ---------- */
:where(a,button,input,select,textarea,[tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
.skip {
  position: absolute; left: var(--s-3); top: calc(var(--s-3) * -6); z-index: 200;
  background: var(--ink); color: var(--canvas); padding: var(--s-3) var(--s-4);
  border-radius: var(--r-sm); font-weight: 600; transition: top var(--dur) var(--ease);
}
.skip:focus { top: var(--s-3); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- layout ---------- */
.wrap { width: min(var(--page), 100% - var(--gutter) * 2); margin-inline: auto; }
.section { padding-block: clamp(var(--s-7), 6vw, var(--s-9)); }
.stack > * + * { margin-top: var(--s-4); }

/* ---------- header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.hdr-in { display: flex; align-items: center; gap: var(--s-4); height: 60px; }
.brand { display: flex; align-items: center; gap: var(--s-2); font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -.03em; margin-right: auto; }
.brand svg { width: 26px; height: 26px; }
.nav { display: flex; gap: var(--s-1); }
.nav a { padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); font-size: var(--t-base); font-weight: 500; color: var(--ink-soft); transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); }
.nav a:hover { color: var(--ink); background: var(--surface-sunk); }
.nav a[aria-current="page"] { color: var(--accent); }
.hdr-act { display: flex; align-items: center; gap: var(--s-2); }
@media (max-width: 720px) { .nav { display: none; } .nav.open { display: flex; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; padding: var(--s-3) var(--gutter) var(--s-4); background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); } .nav.open a { min-height: var(--tap); display: flex; align-items: center; font-size: var(--t-lg); } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--tap); padding: var(--s-3) var(--s-5);
  border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink);
  font-size: var(--t-base); font-weight: 600; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.btn:hover { background: var(--surface-sunk); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); border-color: transparent; color: var(--accent-on); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-md); }
.btn-primary:active { background: var(--accent-active); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-sunk); }
.btn-sm { min-height: 36px; padding: var(--s-2) var(--s-4); font-size: var(--t-sm); }
.icon-btn { display: grid; place-items: center; width: var(--tap); height: var(--tap); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink-soft); cursor: pointer; transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.icon-btn:hover { background: var(--surface-sunk); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- card ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-5); box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
a.card, button.card { display: block; text-align: left; width: 100%; cursor: pointer; }
a.card:hover, button.card:hover { transform: translateY(-3px); border-color: var(--accent-border); box-shadow: var(--shadow-md); }

/* tool card — built for variable content length */
.tool-card { display: flex; flex-direction: column; gap: var(--s-2); min-height: 148px; }
.tool-card .ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-md); background: var(--accent-weak); color: var(--accent); flex: none; }
.tool-card .ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tool-card h3 { font-size: var(--t-md); font-weight: 700; }
.tool-card p { font-size: var(--t-sm); color: var(--ink-soft); line-height: 1.5; flex: 1; }
.grid { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px var(--s-2); border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: 600; }
.badge-local { background: var(--ok-weak); color: var(--ok); border: 1px solid var(--ok-border); }
.badge-net { background: var(--warn-weak); color: var(--warn); border: 1px solid var(--warn-border); }
.eyebrow { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--t-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

/* ---------- form controls ---------- */
.field { width: 100%; min-height: var(--tap); padding: var(--s-3) var(--s-4); border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); color: var(--ink); outline: 0; transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
.field:focus { border-color: var(--accent); box-shadow: var(--ring); }
.field::placeholder { color: var(--ink-mute); }
label { display: block; font-size: var(--t-sm); font-weight: 600; color: var(--ink-soft); margin-bottom: var(--s-1); }

/* ---------- dropzone (researched rules: obvious target, live feedback, click alternative) ---------- */
.drop {
  width: 100%; min-height: 168px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-2);
  padding: var(--s-6); border: 2px dashed var(--line-strong); border-radius: var(--r-lg);
  background: var(--surface-sunk); color: var(--ink-soft); cursor: pointer; text-align: center;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.drop:hover { border-color: var(--accent); background: var(--accent-weak); }
.drop.is-over { border-color: var(--accent); background: var(--accent-weak); transform: scale(1.01); box-shadow: var(--ring); }
.drop strong { color: var(--ink); font-size: var(--t-md); }
.drop small { font-size: var(--t-sm); }

/* ---------- progress ---------- */
.bar { height: 8px; border-radius: var(--r-pill); background: var(--surface-sunk); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: var(--r-pill); background: var(--accent); transition: width var(--dur) var(--ease); }

/* ---------- notice ---------- */
.note { font-size: var(--t-base); color: var(--ink-soft); min-height: 22px; }
.note.ok { color: var(--ok); }
.note.err { color: var(--err); }

/* ---------- footer ---------- */
.ftr { border-top: 1px solid var(--line); padding-block: var(--s-6) var(--s-7); color: var(--ink-soft); font-size: var(--t-base); }
.ftr-grid { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.ftr h4 { font-size: var(--t-sm); font-weight: 700; color: var(--ink); margin-bottom: var(--s-2); }
.ftr a { display: block; padding: 5px 0; color: var(--ink-soft); }
.ftr a:hover { color: var(--accent); }

/* ============ Component library (ui.js) ============ */
/* Toasts */
.vk-toasts { position: fixed; bottom: var(--s-5); right: var(--s-5); z-index: 60; display: flex; flex-direction: column; gap: var(--s-2); max-width: min(92vw, 380px); }
.vk-toast { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-md); box-shadow: var(--shadow-lg); animation: vk-toast-in var(--dur) var(--ease); }
.vk-toast--ok { border-left-color: var(--ok); } .vk-toast--err { border-left-color: var(--err); } .vk-toast--warn { border-left-color: var(--warn); }
.vk-toast.is-out { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
.vk-toast-msg { flex: 1; font-size: var(--t-sm); color: var(--ink); }
.vk-toast-x { border: 0; background: none; color: var(--ink-mute); cursor: pointer; font-size: 13px; padding: 4px; }
@keyframes vk-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Backdrop + modal */
.vk-backdrop { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: var(--gutter); background: rgb(13 20 32 / .5); backdrop-filter: blur(2px); animation: vk-fade var(--dur-fast) var(--ease); }
.vk-backdrop.is-out { opacity: 0; transition: opacity .18s; }
.vk-modal { width: min(560px, 100%); max-height: 85vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); animation: vk-pop var(--dur) var(--ease); }
.vk-modal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); }
.vk-modal-title { font-size: var(--t-lg); margin: 0; }
.vk-modal-body { padding: var(--s-5); }
@keyframes vk-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes vk-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* Command palette */
.vk-cmd-back { align-items: flex-start; padding-top: min(16vh, 120px); opacity: 0; pointer-events: none; }
.vk-cmd-back.is-open { opacity: 1; pointer-events: auto; }
.vk-cmd { width: min(600px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; animation: vk-pop var(--dur) var(--ease); }
.vk-cmd-top { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); }
.vk-cmd-ic { width: 20px; height: 20px; color: var(--ink-mute); flex: none; }
.vk-cmd-input { flex: 1; border: 0; background: none; font: inherit; font-size: var(--t-lg); color: var(--ink); outline: 0; }
.vk-cmd-esc { border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; font-size: var(--t-xs); color: var(--ink-mute); }
.vk-cmd-list { max-height: 52vh; overflow: auto; padding: var(--s-2); }
.vk-cmd-item { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); text-decoration: none; }
.vk-cmd-item:hover, .vk-cmd-item.is-active { background: var(--accent-weak); }
.vk-cmd-name { font-size: var(--t-md); font-weight: 500; color: var(--ink); }
.vk-cmd-cat { font-size: var(--t-xs); color: var(--ink-mute); }
.vk-cmd-hint, .vk-cmd-empty { padding: var(--s-4); font-size: var(--t-sm); color: var(--ink-soft); }
.vk-cmd-hint a, .vk-cmd-empty a { color: var(--accent); font-weight: 600; }

/* Skeleton, empty state, upload */
.vk-skeleton { position: relative; overflow: hidden; background: var(--surface-sunk); border-radius: var(--r-sm); min-height: 1em; }
.vk-skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgb(255 255 255 / .35), transparent); animation: vk-shimmer 1.3s infinite; }
[data-theme="dark"] .vk-skeleton::after { background: linear-gradient(90deg, transparent, rgb(255 255 255 / .06), transparent); }
@keyframes vk-shimmer { to { transform: translateX(100%); } }
.vk-empty { text-align: center; padding: var(--s-8) var(--s-5); color: var(--ink-soft); }
.vk-empty svg { width: 44px; height: 44px; color: var(--ink-mute); margin-bottom: var(--s-3); }
.vk-empty h3 { font-size: var(--t-lg); color: var(--ink); margin: 0 0 var(--s-2); }
.vk-upload { display: grid; place-items: center; gap: var(--s-2); padding: var(--s-7) var(--s-5); border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--surface-sunk); text-align: center; cursor: pointer; transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); }
.vk-upload:hover, .vk-upload.is-over { border-color: var(--accent); background: var(--accent-weak); }
@media (prefers-reduced-motion: reduce) { .vk-toast, .vk-modal, .vk-cmd, .vk-skeleton::after { animation: none; } }

/* ============ Auth + account ============ */
.btn-sm { padding: 7px 14px; min-height: 36px; font-size: var(--t-sm); }
.vk-auth-slot { display: inline-flex; align-items: center; }
.vk-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-on); font-weight: 700; font-size: var(--t-sm); text-decoration: none; }
.vk-fav { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-soft); border-radius: var(--r-pill); padding: 6px 14px; font: inherit; font-size: var(--t-sm); font-weight: 600; cursor: pointer; min-height: 36px; }
.vk-fav:hover { border-color: var(--accent-border); color: var(--accent); }
.vk-fav.is-on { background: var(--accent-weak); border-color: var(--accent-border); color: var(--accent); }

.auth-wrap { max-width: 440px; margin: clamp(var(--s-6), 6vw, var(--s-9)) auto; padding-inline: var(--gutter); }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-md); padding: var(--s-6); }
.auth-brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 800; color: var(--ink); text-decoration: none; margin-bottom: var(--s-5); }
.auth-brand svg { width: 30px; height: 30px; }
.auth-card h1 { font-size: var(--t-2xl); margin: 0 0 var(--s-5); }
.auth-card form { display: grid; gap: var(--s-4); }
.auth-card .wfield { gap: 6px; }
.auth-row { display: flex; justify-content: flex-end; margin-top: -8px; }
.auth-row a, .auth-alt a, .auth-foot a { color: var(--accent); font-weight: 600; }
.auth-alt { margin-top: var(--s-5); font-size: var(--t-sm); color: var(--ink-soft); text-align: center; }
.auth-foot { text-align: center; margin-top: var(--s-4); }
.auth-msg { margin-top: var(--s-4); }
.auth-oauth { display: grid; gap: var(--s-2); margin-bottom: var(--s-4); }
.auth-oauth .btn { gap: 8px; }
.auth-or { display: flex; align-items: center; gap: var(--s-3); color: var(--ink-mute); font-size: var(--t-sm); margin-bottom: var(--s-4); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.acct { max-width: 780px; margin-inline: auto; }
.acct-head { display: flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-6); flex-wrap: wrap; }
.acct-head .page-h1 { margin: 0; }
.acct-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--accent-on); display: grid; place-items: center; font-size: var(--t-xl); font-weight: 800; flex: none; }
.acct-head > button { margin-left: auto; }

/* ============ Animated brand mark ============ */
.brand svg { overflow: visible; }
.brand svg circle[stroke-dasharray] { transform-origin: 22px 22px; }
.brand svg circle[fill="#06b6d4"] { transform-origin: 33.5px 10.5px; }
.brand svg path { stroke-dasharray: 34; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
  .brand svg circle[stroke-dasharray] { animation: vk-ring 14s linear infinite; }
  .brand svg circle[fill="#06b6d4"] { animation: vk-dot 2.6s var(--ease) infinite; }
  .brand:hover svg circle[stroke-dasharray] { animation-duration: 2.6s; }
  .brand:hover svg path { animation: vk-check .6s var(--ease); }
}
@keyframes vk-ring { to { transform: rotate(360deg); } }
@keyframes vk-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(1.3); } }
@keyframes vk-check { from { stroke-dashoffset: 34; } to { stroke-dashoffset: 0; } }

/* ---- pages.css ---- */
/* pages.css — generated page layouts (tools index, category, tool). */

.crumb { font-size: var(--t-sm); color: var(--ink-mute); margin-bottom: var(--s-4); }
.crumb a { color: var(--accent); font-weight: 500; }
.crumb span[aria-current] { color: var(--ink-soft); }

.page-h1 { font-size: var(--t-3xl); margin-bottom: var(--s-3); }
.page-lede { font-size: var(--t-lg); color: var(--ink-soft); max-width: 62ch; margin-bottom: var(--s-4); }
.h-sm { font-size: var(--t-xl); margin-bottom: var(--s-4); }

/* tool card additions */
.tool-card .card-foot { margin-top: auto; padding-top: var(--s-2); }
.tool-card.is-soon { opacity: .72; }
.tool-card .soon { font-size: var(--t-xs); font-weight: 600; color: var(--ink-mute); background: var(--surface-sunk); border-radius: var(--r-pill); padding: 2px 8px; vertical-align: middle; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip { display: inline-flex; align-items: center; min-height: 38px; padding: var(--s-2) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); font-size: var(--t-sm); font-weight: 500; color: var(--ink-soft); transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.chip:hover { border-color: var(--accent-border); color: var(--accent); }

/* all-tools grouping */
.cat-block { margin-top: var(--s-7); }
.cat-block:first-child { margin-top: var(--s-5); }
.cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); }
.cat-head h2 { font-size: var(--t-xl); }
.cat-head a { color: inherit; }
.cat-head a:hover { color: var(--accent); }

.local-search { position: relative; max-width: 480px; margin-bottom: var(--s-2); }
.local-search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--ink-mute); pointer-events: none; }
.local-search .field { padding-left: 44px; }

/* ---------- tool page ---------- */
.tool-page { max-width: 860px; }
.tool-head { margin-bottom: var(--s-5); }
.trust { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.trust .badge { background: var(--surface-sunk); color: var(--ink-soft); border: 1px solid var(--line); }
.trust .badge-local { background: var(--ok-weak); color: var(--ok); border-color: var(--ok-border); }
.trust .badge-net { background: var(--warn-weak); color: var(--warn); border-color: var(--warn-border); }

.ws { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); padding: var(--s-6); min-height: 220px; display: grid; place-items: center; }
.ws-soon { text-align: center; gap: var(--s-3); }
.ws-soon strong { font-family: var(--font-display); font-size: var(--t-xl); display: block; margin-bottom: var(--s-2); }
.ws-soon .note { max-width: 46ch; margin-inline: auto; margin-bottom: var(--s-4); }

/* prose blocks */
.prose { margin-top: var(--s-7); max-width: 68ch; }
.prose h2 { font-size: var(--t-xl); margin: var(--s-6) 0 var(--s-3); }
.prose h2:first-child { margin-top: 0; }
.prose p { margin-bottom: var(--s-3); color: var(--ink-soft); }
.prose ul, .prose ol { margin: 0 0 var(--s-4) var(--s-5); color: var(--ink-soft); }
.prose li { margin-bottom: var(--s-2); }
.prose li strong { color: var(--ink); }

.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: var(--s-4) 0; font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); min-height: var(--tap); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 20px; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq p { padding-bottom: var(--s-4); margin: 0; }

.trust-note { margin-top: var(--s-6); padding: var(--s-4); border-left: 3px solid var(--accent); background: var(--accent-weak); border-radius: 0; }
.trust-note .note { color: var(--ink-soft); margin: 0; }

/* ---------- calculator ---------- */
.ws:has(.calc), .calc { display: block; }
.calc { width: 100%; }
.calc-form { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: var(--s-5); }
.calc-field.is-wide { grid-column: 1 / -1; }
.calc-hint { display: block; margin-top: var(--s-1); font-size: var(--t-xs); color: var(--ink-mute); }

.calc-out { border-top: 1px solid var(--line); padding-top: var(--s-5); }
.calc-headline { display: flex; flex-direction: column; gap: 2px; margin-bottom: var(--s-4); }
.calc-label { font-size: var(--t-sm); font-weight: 600; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .06em; }
.calc-value { font-family: var(--font-display); font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); line-height: 1.05; letter-spacing: -.03em; color: var(--accent); }
.calc-sub { font-size: var(--t-base); color: var(--ink-soft); }

.calc-stats { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.calc-stat { background: var(--surface-sunk); border-radius: var(--r-md); padding: var(--s-3) var(--s-4); }
.calc-stat span { display: block; font-size: var(--t-xs); color: var(--ink-mute); margin-bottom: 2px; }
.calc-stat b { font-family: var(--font-display); font-size: var(--t-lg); color: var(--ink); }

.calc-extra { margin-top: var(--s-4); }
.calc-table { margin-top: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); }
.calc-table summary { cursor: pointer; padding: var(--s-3) var(--s-4); font-weight: 600; font-size: var(--t-base); min-height: var(--tap); display: flex; align-items: center; }
.calc-scroll { max-height: 340px; overflow: auto; border-top: 1px solid var(--line); }
.calc-table table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.calc-table th { position: sticky; top: 0; background: var(--surface-sunk); text-align: left; padding: var(--s-2) var(--s-4); font-weight: 600; color: var(--ink-soft); }
.calc-table td { padding: var(--s-2) var(--s-4); border-top: 1px solid var(--line); white-space: nowrap; }

@media (max-width: 640px) {
  .cat-head { flex-direction: column; align-items: flex-start; gap: var(--s-1); }
  .ws { padding: var(--s-4); }
  .calc-form { grid-template-columns: 1fr; gap: var(--s-3); }
}

/* ---------- file tools ---------- */
.ftool { width: 100%; }
.ft-controls { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-top: var(--s-5); }
.ft-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--s-3); }
.ft-out { display: inline-block; margin-top: var(--s-1); font-size: var(--t-sm); font-weight: 600; color: var(--accent); }
.range { width: 100%; accent-color: var(--accent); min-height: var(--tap); }
.ft-result { margin-top: var(--s-5); }
.ft-result .calc-stats { margin-bottom: var(--s-4); }
.ft-preview { max-width: 100%; max-height: 340px; border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: var(--s-4);
  background-image: linear-gradient(45deg, var(--surface-sunk) 25%, transparent 25%), linear-gradient(-45deg, var(--surface-sunk) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--surface-sunk) 75%), linear-gradient(-45deg, transparent 75%, var(--surface-sunk) 75%);
  background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.ft-code { background: var(--n-900); color: #cfe4ff; border-radius: var(--r-md); padding: var(--s-3) var(--s-4); font: 12.5px/1.6 var(--font-mono); overflow-x: auto; margin-top: var(--s-2); white-space: pre; }
[data-theme="dark"] .ft-code { background: #060c16; }

/* ---------- widget tools (text / developer) ---------- */
.widget { display: flex; flex-direction: column; gap: var(--s-4); }
.wtext { width: 100%; font: inherit; line-height: 1.5; resize: vertical; padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); color: var(--ink); }
.wtext:focus { outline: 0; border-color: var(--accent); box-shadow: var(--ring); }
.wmono, .wtext.wmono, textarea.wmono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: var(--t-sm); }
.wbtns { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.wbtns .field { max-width: 8rem; }
.btn.is-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.wgrid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
@media (max-width: 640px) { .wgrid2 { grid-template-columns: 1fr; } }
.wfield { display: flex; flex-direction: column; gap: var(--s-2); }
.wlab { font-size: var(--t-sm); font-weight: 600; color: var(--ink-soft); }
.wdiff { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface-sunk); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: var(--t-sm); }
.wdl { padding: 2px var(--s-3); white-space: pre-wrap; word-break: break-word; border-left: 3px solid transparent; }
.wdl-add { background: color-mix(in srgb, var(--ok) 12%, transparent); border-left-color: var(--ok); }
.wdl-del { background: color-mix(in srgb, var(--err) 12%, transparent); border-left-color: var(--err); }
.wdl-same { color: var(--ink-soft); }
.wmd { min-height: 260px; overflow: auto; padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.wcheck { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--t-sm); color: var(--ink-soft); }
.calc-stat.wmono b { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: var(--t-xs); word-break: break-all; }

/* ---------- everyday / privacy / design widgets ---------- */
.wmeter { height: 8px; border-radius: 99px; background: var(--surface-sunk); overflow: hidden; }
.wmeter i { display: block; height: 100%; width: 0; transition: width var(--dur-fast) var(--ease); background: var(--ink-mute); }
.meter-weak { background: var(--err) !important; } .meter-ok { background: var(--warn) !important; } .meter-strong { background: var(--ok) !important; }
.wcolor { width: 48px; height: 40px; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: none; cursor: pointer; }
.wswatch { height: 72px; border-radius: var(--r-md); border: 1px solid var(--line); }
.wcontrast { padding: var(--s-5); border-radius: var(--r-md); border: 1px solid var(--line); font-size: var(--t-lg); }
.wgradient { height: 120px; border-radius: var(--r-md); border: 1px solid var(--line); }
.wpalette { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: var(--s-2); }
.wpal { height: 88px; border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; }
.wpal span { background: rgba(255,255,255,.85); color: #111; font-size: var(--t-xs); font-family: ui-monospace, monospace; padding: 2px 6px; border-radius: 4px; }
.wshadowbox { display: grid; place-items: center; height: 200px; border-radius: var(--r-md); background: var(--surface-sunk); }
.wshadowtarget { width: 120px; height: 120px; border-radius: var(--r-md); background: var(--surface); }

/* ---------- SEO tool previews ---------- */
.wserp { padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); max-width: 640px; }
.wserp-url { font-size: var(--t-sm); color: var(--ink-soft); }
.wserp-title { color: #1a0dab; font-size: 20px; line-height: 1.3; margin: 2px 0; }
.wserp-desc { font-size: var(--t-sm); color: var(--ink-soft); line-height: 1.5; }
[data-theme="dark"] .wserp-title { color: #8ab4f8; }
.wog { max-width: 500px; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.wog-img { aspect-ratio: 1.91/1; background: var(--surface-sunk) center/cover no-repeat; display: grid; place-items: center; color: var(--ink-mute); font-size: var(--t-sm); }
.wog-body { padding: var(--s-3) var(--s-4); background: var(--surface-sunk); }
.wog-dom { font-size: var(--t-xs); color: var(--ink-mute); text-transform: uppercase; }
.wog-title { font-weight: 600; margin: 2px 0; }
.wog-desc { font-size: var(--t-sm); color: var(--ink-soft); }

/* ---------- data + imaging widgets ---------- */
.wtablewrap { max-height: 460px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.wtable { border-collapse: collapse; width: 100%; font-size: var(--t-sm); }
.wtable th, .wtable td { padding: 6px var(--s-3); border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.wtable thead th { position: sticky; top: 0; background: var(--surface-sunk); cursor: pointer; user-select: none; font-weight: 600; }
.wtable tbody tr:hover { background: var(--accent-weak); }
.wmeme { max-width: 100%; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-sunk); }

/* ---------- QR / barcode ---------- */
.wcode { max-width: 100%; display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-3); }
canvas.wcode, svg.wcode { max-height: 360px; }
video.wcode { padding: 0; }

/* ---------- csv chart + pdf pages ---------- */
.wchart { max-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-3); }
.wpages { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--s-3); }
.wpage { display: flex; flex-direction: column; gap: var(--s-2); }
.wpage-thumb { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; }

/* ---------- privacy2 + misc ---------- */
.wredact { max-width: 100%; border: 1px solid var(--line); border-radius: var(--r-md); cursor: crosshair; touch-action: none; background: var(--surface-sunk); }
.wtype-target { font-family: ui-monospace, Menlo, Consolas, monospace; line-height: 1.9; padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-sunk); font-size: var(--t-md); }
.wtype-target .ok { color: var(--ok); } .wtype-target .bad { color: #fff; background: var(--err); border-radius: 2px; } .wtype-target .cur { border-bottom: 2px solid var(--accent); }
.wbrb { width: 100%; aspect-ratio: 16/9; border: 1px solid var(--line); border-radius: var(--r-md); background: #000; }

/* ---------- business docs ---------- */
.witems { display: flex; flex-direction: column; gap: var(--s-2); }
.witem { display: grid; grid-template-columns: 1fr 80px 100px 40px; gap: var(--s-2); align-items: center; }
.wdocframe { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
@media (max-width: 640px) { .witem { grid-template-columns: 1fr 60px 80px 36px; } }

/* ---------- pricing ---------- */
.bill-toggle { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-sunk); border: 1px solid var(--line); border-radius: var(--r-pill); margin: var(--s-5) auto var(--s-6); }
.bill-toggle { display: flex; width: fit-content; }
.bt-opt { border: 0; background: none; color: var(--ink-soft); font: inherit; font-weight: 600; padding: 8px 18px; border-radius: var(--r-pill); cursor: pointer; min-height: 40px; }
.bt-opt.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.bt-save { font-size: var(--t-xs); color: var(--ok); font-weight: 700; margin-left: 4px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-4); align-items: start; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-6) var(--s-5); box-shadow: var(--shadow-sm); }
.plan--featured { border: 2px solid var(--accent); box-shadow: var(--shadow-md); }
.plan-flag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--accent-on); font-size: var(--t-xs); font-weight: 700; padding: 4px 12px; border-radius: var(--r-pill); }
.plan h2 { font-size: var(--t-xl); margin: 0 0 var(--s-3); }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin: 0 0 var(--s-2); }
.plan-amt { font-family: var(--font-display); font-size: var(--t-3xl); font-weight: 800; }
.plan-per { color: var(--ink-mute); font-size: var(--t-sm); }
.plan-tag { color: var(--ink-soft); font-size: var(--t-sm); margin: 0 0 var(--s-4); min-height: 2.6em; }
.btn-block { display: flex; width: 100%; justify-content: center; }
.plan-feats { list-style: none; padding: 0; margin: var(--s-5) 0 0; display: grid; gap: var(--s-3); }
.plan-feats li { display: flex; align-items: flex-start; gap: var(--s-2); font-size: var(--t-sm); color: var(--ink); }
.plan-feats svg { width: 18px; height: 18px; flex: none; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.plan-feats .yes svg { stroke: var(--ok); }
.plan-feats .no { color: var(--ink-mute); } .plan-feats .no svg { stroke: var(--ink-mute); }

/* ---------- free-tier usage gate ---------- */
.usage-gate { text-align: center; padding: var(--s-8) var(--s-5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-sunk); }
.usage-gate svg { width: 44px; height: 44px; color: var(--accent); margin-bottom: var(--s-3); }
.usage-gate h2 { font-size: var(--t-xl); margin: 0 0 var(--s-2); }
.usage-gate .note { max-width: 46ch; margin: 0 auto var(--s-5); }
.usage-gate-actions { display: flex; gap: var(--s-3); justify-content: center; flex-wrap: wrap; }

/* ---- account prompt on the tool result screen (assets/js/convert.js) ----
   Sits below the download button, inside the workspace. Deliberately quieter
   than the download CTA: the download is what the user came for and must stay
   the most prominent thing on the screen. */
.cta-account {
  grid-column: 1 / -1;
  margin-top: var(--s-5);
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-3, 12px);
  background: var(--surface-2, var(--surface));
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  align-items: center;
  justify-content: space-between;
}
.cta-account-body { flex: 1 1 260px; min-width: 0; }
.cta-account-title { margin: 0 0 var(--s-1); font-weight: 600; }
.cta-account .note { margin: 0; }
.cta-account-privacy { margin-top: var(--s-2) !important; font-size: var(--t-xs); color: var(--ink-mute); }
.cta-account-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.btn-quiet { background: transparent; border-color: transparent; color: var(--ink-soft); }
.btn-quiet:hover { color: var(--ink); border-color: var(--line); }
@media (max-width: 560px) {
  .cta-account { flex-direction: column; align-items: stretch; }
  .cta-account-actions .btn { flex: 1 1 auto; text-align: center; }
}

/* ---- skin.css ---- */
/* skin.css — the Vootkit visual language: 70% refined-premium, 20% brutalist
 * character, 10% OMEGA atmosphere. Loaded site-wide AFTER tokens/base/pages so
 * it layers on top. Reuses the token system (no renames) — every tool still works.
 * Performance-first: no particles, no heavy blur loops; one cheap fixed gradient,
 * transform-only motion, all of it gated behind prefers-reduced-motion.
 *
 * The big idea: each category re-themes --accent, so the whole UI (buttons,
 * links, icon tiles, focus rings) takes on that category's identity. */

/* ---- derive weak/border tints from --accent so per-category theming cascades ---- */
:root, [data-cat] {
  --accent-weak: color-mix(in srgb, var(--accent) 12%, var(--surface));
  --accent-border: color-mix(in srgb, var(--accent) 38%, var(--surface));
}

/* ---------- premium white+pink atmosphere (cheap, GPU-friendly) ---------- */
body { position: relative; }
body::before {
  content: ""; position: fixed; inset: -10%; z-index: -1; pointer-events: none;
  will-change: transform;
  background:
    radial-gradient(58vw 48vh at 8% -6%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    radial-gradient(52vw 44vh at 102% 4%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 55%),
    radial-gradient(46vw 40vh at 50% 108%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 60%);
}
[data-theme="dark"] body::before {
  background:
    radial-gradient(58vw 48vh at 8% -6%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 60%),
    radial-gradient(52vw 44vh at 102% 4%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 55%),
    radial-gradient(46vw 40vh at 50% 108%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%);
}
/* slow, barely-there drift — a living gradient, transform-only, motion-safe */
@media (prefers-reduced-motion: no-preference) {
  body::before { animation: vk-drift 26s ease-in-out infinite alternate; }
  @keyframes vk-drift {
    from { transform: translate3d(-1.4%, -1%, 0) scale(1.02); }
    to   { transform: translate3d(1.6%, 1.2%, 0) scale(1.06); }
  }
}

/* glassy sticky header — one tasteful use of blur */
.hdr {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}

/* ---------- 20% brutalist character: mono labels + tactile shadow ---------- */
.eyebrow, .badge, .nav a, .res-cat, .catcard-n, .plan-flag, .bt-opt, .vk-cmd-cat, .card-foot .badge {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em;
}
.eyebrow { display: inline-block; border: 1px solid var(--accent-border); background: var(--accent-weak); color: var(--accent); padding: 5px 12px; border-radius: var(--r-sm); font-size: var(--t-xs); font-weight: 600; }
.page-h1, .hero h1, .sec-head h2, .plan h2 { letter-spacing: -.015em; }

/* buttons: premium base + a hint of brutalist tactility (accent offset on press) */
.btn { font-weight: 600; letter-spacing: .01em; transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); }
.btn-primary { box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 60%, #000), var(--shadow-sm); }
@media (prefers-reduced-motion: no-preference) {
  .btn:hover { transform: translateY(-1px); }
  .btn:active { transform: translateY(1px); }
}

/* ---------- 70% premium: refined cards with living hover ---------- */
.tool-card, .catcard, .poptool, .card {
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
@media (prefers-reduced-motion: no-preference) {
  .tool-card:hover, .catcard:hover, .poptool:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--accent-border);
    border-color: var(--accent-border);
  }
}
.tool-card:hover h3, .catcard:hover h3 { color: var(--accent); }
/* icon tiles glow to the category accent */
.catcard-ic, .poptool-ic, .res-ic { transition: transform var(--dur) var(--ease), background var(--dur) var(--ease); }
@media (prefers-reduced-motion: no-preference) {
  .catcard:hover .catcard-ic, .poptool:hover .poptool-ic { transform: scale(1.08) rotate(-3deg); }
}

/* refined search box */
#q, .vk-cmd { box-shadow: var(--shadow-md), 0 0 0 1px var(--line) inset; }

/* ---------- per-category identity: re-theme --accent ---------- */
/* light-mode accents (all contrast-safe: white-on-accent AND accent-on-white ≥ AA) */
[data-cat="pdf"]          { --accent:#4f46e5; --accent-hover:#4338ca; }
[data-cat="images"]       { --accent:#9333ea; --accent-hover:#7e22ce; }
[data-cat="video"]        { --accent:#c81e1e; --accent-hover:#a91616; }
[data-cat="finance"]      { --accent:#047857; --accent-hover:#036249; }
[data-cat="insurance"]    { --accent:#0f766e; --accent-hover:#0c5f59; }
[data-cat="realestate"]   { --accent:#0369a1; --accent-hover:#075985; }
[data-cat="tax"]          { --accent:#a21caf; --accent-hover:#86198f; }
[data-cat="business"]     { --accent:#1d4ed8; --accent-hover:#1e40af; }
[data-cat="seo"]          { --accent:#4d7c0f; --accent-hover:#3f6212; }
[data-cat="accessibility"]{ --accent:#c2410c; --accent-hover:#9a3412; }
[data-cat="privacy"]      { --accent:#0e7490; --accent-hover:#155e75; }
[data-cat="text"]         { --accent:#be123c; --accent-hover:#9f1239; }
[data-cat="design"]       { --accent:#db2777; --accent-hover:#be185d; }
[data-cat="developer"]    { --accent:#6d28d9; --accent-hover:#5b21b6; }
[data-cat="everyday"]     { --accent:#b45309; --accent-hover:#92400e; }
[data-cat="data"]         { --accent:#116e8a; --accent-hover:#0e5c73; }
[data-cat="ai"]           { --accent:#7c3aed; --accent-hover:#6d28d9; }
[data-cat="health"]       { --accent:#15803d; --accent-hover:#166534; }
[data-cat="travel"]       { --accent:#0369a1; --accent-hover:#075985; }
[data-cat="audio"]        { --accent:#7e22ce; --accent-hover:#6b21a8; }
[data-cat="education"]    { --accent:#0d9488; --accent-hover:#0f766e; }

/* dark-mode accents (lightened so white/dark text + surfaces stay legible) */
[data-theme="dark"] [data-cat="pdf"]          { --accent:#818cf8; }
[data-theme="dark"] [data-cat="images"]       { --accent:#c084fc; }
[data-theme="dark"] [data-cat="video"]        { --accent:#f87171; }
[data-theme="dark"] [data-cat="finance"]      { --accent:#34d399; }
[data-theme="dark"] [data-cat="insurance"]    { --accent:#2dd4bf; }
[data-theme="dark"] [data-cat="realestate"]   { --accent:#38bdf8; }
[data-theme="dark"] [data-cat="tax"]          { --accent:#e879f9; }
[data-theme="dark"] [data-cat="business"]     { --accent:#60a5fa; }
[data-theme="dark"] [data-cat="seo"]          { --accent:#a3e635; }
[data-theme="dark"] [data-cat="accessibility"]{ --accent:#fb923c; }
[data-theme="dark"] [data-cat="privacy"]      { --accent:#22d3ee; }
[data-theme="dark"] [data-cat="text"]         { --accent:#fb7185; }
[data-theme="dark"] [data-cat="design"]       { --accent:#f472b6; }
[data-theme="dark"] [data-cat="developer"]    { --accent:#a78bfa; }
[data-theme="dark"] [data-cat="everyday"]     { --accent:#fbbf24; }
[data-theme="dark"] [data-cat="data"]         { --accent:#22d3ee; }
[data-theme="dark"] [data-cat="ai"]           { --accent:#a78bfa; }
[data-theme="dark"] [data-cat="health"]       { --accent:#4ade80; }
[data-theme="dark"] [data-cat="travel"]       { --accent:#38bdf8; }
[data-theme="dark"] [data-cat="audio"]        { --accent:#d8b4fe; }
[data-theme="dark"] [data-cat="education"]    { --accent:#5eead4; }
/* in dark mode the accent is light, so text on it must be dark */
[data-theme="dark"] [data-cat] { --accent-on:#0b1220; }

/* ---------- SaaS nav: prominent "Get Pro" CTA ---------- */
.hdr-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .05em;
  font-size: var(--t-xs); font-weight: 700;
  padding: 9px 16px; border-radius: var(--r-pill);
  color: #fff; text-decoration: none; white-space: nowrap;
  background: linear-gradient(120deg, var(--accent), #c62a92 55%, #c0186a);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 40%, transparent), inset 0 1px 0 rgb(255 255 255 / .25);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease);
}
.hdr-cta:hover { filter: saturate(1.08) brightness(1.03); box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 52%, transparent), inset 0 1px 0 rgb(255 255 255 / .3); }
@media (prefers-reduced-motion: no-preference) { .hdr-cta:hover { transform: translateY(-1px); } .hdr-cta:active { transform: translateY(1px); } }
.nav a[aria-current="page"] { color: var(--accent); }
/* keep the CTA visible on small screens even when the text nav collapses */
@media (max-width: 720px) { .hdr-cta { padding: 8px 13px; } }

/* ---------- glassmorphism: reserved for hero/pricing focal points (fast) ---------- */
.plan--featured, #q, .vk-cmd, .hero-search, .cta-band {
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  -webkit-backdrop-filter: saturate(1.3) blur(10px); backdrop-filter: saturate(1.3) blur(10px);
}
.plan--featured {
  border: 1px solid var(--accent-border);
  box-shadow: var(--shadow-lg), 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent), 0 24px 60px color-mix(in srgb, var(--accent) 16%, transparent);
}

/* ---------- premium pricing polish ---------- */
.bill-toggle { background: var(--surface-sunk); border: 1px solid var(--line); border-radius: var(--r-pill); }
.bt-opt.is-on { background: var(--accent); color: var(--accent-on); box-shadow: var(--shadow-sm); }
.plan-flag { background: linear-gradient(120deg, var(--accent), #c0186a); color: #fff; }
.plan-feats .yes svg { color: var(--accent); }

/* comparison table used on the pricing page */
.cmp-table { width: 100%; border-collapse: collapse; margin-top: var(--s-6); font-size: var(--t-base); }
.cmp-table th, .cmp-table td { padding: 14px 16px; text-align: center; border-bottom: 1px solid var(--line); }
.cmp-table thead th { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .05em; font-size: var(--t-xs); color: var(--ink-soft); }
.cmp-table tbody th { text-align: left; font-weight: 600; color: var(--ink); }
.cmp-table th.cmp-hi, .cmp-table td.cmp-hi { background: var(--accent-weak); }
.cmp-table td.cmp-hi { color: var(--accent); }
.cmp-yes { color: var(--accent); font-weight: 700; }
.cmp-no { color: var(--ink-mute); }
.cmp-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }

/* ---------- tool cards as mini-products (per-category identity via data-cat) ---------- */
.tool-card { position: relative; overflow: hidden; }
/* a faint category-tinted wash in the corner — gives each card its own personality */
.tool-card::after {
  content: ""; position: absolute; top: -40%; right: -30%; width: 160px; height: 160px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 14%, transparent), transparent 68%);
  pointer-events: none; opacity: .8; transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.tc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-2); margin-bottom: var(--s-1); }
.tool-card .ic { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent); }
.tc-tags { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.pill {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .05em;
  font-size: 10px; font-weight: 700; line-height: 1; padding: 4px 8px; border-radius: var(--r-pill); white-space: nowrap;
}
.pill-pop { background: var(--accent); color: var(--accent-on); }
.pill-new { background: var(--accent-weak); color: var(--accent); border: 1px solid var(--accent-border); }
.tool-card .card-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.tc-cat { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .05em; font-size: 10px; font-weight: 600; color: var(--ink-mute); }
@media (prefers-reduced-motion: no-preference) {
  .tool-card:hover .ic { transform: scale(1.08) rotate(-4deg); }
  .tool-card:hover::after { opacity: 1; transform: scale(1.15); }
}
.tool-card .ic { transition: transform var(--dur) var(--ease); }

/* ---------- account dashboard ---------- */
.acct-overview {
  display: grid; gap: var(--s-3); margin: var(--s-5) 0;
  grid-template-columns: repeat(4, 1fr);
}
.acct-stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-4); display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow-sm);
}
.acct-stat--wide { grid-column: span 2; }
.acct-stat-l { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .05em; font-size: 10px; font-weight: 600; color: var(--ink-mute); }
.acct-stat-v { font-family: var(--font-display); font-size: var(--t-2xl); font-weight: 800; line-height: 1.05; color: var(--ink); }
.acct-stat-s { font-size: var(--t-xs); color: var(--ink-mute); }
.acct-bar { height: 8px; border-radius: var(--r-pill); background: var(--surface-sunk); overflow: hidden; margin: 6px 0 2px; }
.acct-bar i { display: block; height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--accent), #d946a6); transition: width var(--dur-slow) var(--ease); }
@media (max-width: 720px) { .acct-overview { grid-template-columns: repeat(2, 1fr); } .acct-stat--wide { grid-column: span 2; } }

.acct-upgrade {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap;
  margin-bottom: var(--s-6); padding: var(--s-5); border-radius: var(--r-lg);
  background: linear-gradient(120deg, var(--accent), #c62a92 55%, #c0186a); color: #fff;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 30%, transparent);
}
.acct-upgrade-tx h3 { margin: 0 0 4px; font-size: var(--t-lg); color: #fff; }
.acct-upgrade-tx p { margin: 0; font-size: var(--t-sm); color: rgb(255 255 255 / .9); max-width: 52ch; }
.acct-upgrade-cta {
  flex: none; background: #fff; color: var(--accent); font-weight: 700; text-decoration: none;
  padding: 10px 22px; border-radius: var(--r-pill); white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
@media (prefers-reduced-motion: no-preference) { .acct-upgrade-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgb(0 0 0 / .18); } }

/* ---------- contact / support form ---------- */
.contact-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s-6); align-items: start; margin-top: var(--s-2); }
.contact-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-6); box-shadow: var(--shadow-md);
}
.contact-form { display: flex; flex-direction: column; gap: var(--s-4); }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.cf-field { display: flex; flex-direction: column; gap: 6px; }
.cf-lab { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .05em; font-size: 10px; font-weight: 600; color: var(--ink-soft); }
.contact-form textarea.field { min-height: 140px; resize: vertical; line-height: 1.5; }
.cf-actions { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.cf-status { font-size: var(--t-sm); font-weight: 500; }
.cf-status.is-ok { color: var(--ok); }
.cf-status.is-err { color: var(--err); }
.contact-aside h2 { font-size: var(--t-lg); margin-bottom: var(--s-2); }
.contact-email { font-family: var(--font-mono); font-weight: 600; color: var(--accent); font-size: var(--t-md); margin: 2px 0 var(--s-3); word-break: break-all; }
@media (max-width: 780px) {
  .contact-layout { grid-template-columns: 1fr; }
  .cf-row { grid-template-columns: 1fr; }
}

/* ---------- blog ---------- */
.blog-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.blog-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.blog-card-img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; display: block; background: var(--accent-weak); }
.blog-card-b { padding: var(--s-4); display: flex; flex-direction: column; gap: 6px; }
.blog-card-b h3 { font-size: var(--t-md); font-weight: 700; }
.blog-card-b p { font-size: var(--t-sm); color: var(--ink-soft); line-height: 1.5; }
.blog-post article { max-width: 760px; margin-inline: auto; }
.blog-head { margin-bottom: var(--s-5); }
.blog-meta { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .05em; font-size: var(--t-xs); color: var(--ink-mute); margin-top: var(--s-2); }
.blog-hero { width: 100%; max-width: 760px; margin: 0 auto var(--s-6); border-radius: var(--r-lg); border: 1px solid var(--line); display: block; }
.blog-body { max-width: 760px; margin-inline: auto; font-size: var(--t-lg); line-height: var(--leading-body); }
.blog-body h2 { margin-top: var(--s-6); }
.blog-body img { max-width: 100%; height: auto; border-radius: var(--r-md); }

/* ---------- link tools (URL shortener) ---------- */
.lk-form { display: flex; flex-direction: column; gap: var(--s-4); max-width: 560px; }
.lk-alias { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--r-md); overflow: hidden; }
.lk-alias .lk-prefix { display: flex; align-items: center; padding: 0 10px; background: var(--surface-sunk); color: var(--ink-mute); font-family: var(--font-mono); font-size: var(--t-sm); white-space: nowrap; border-right: 1px solid var(--line); }
.lk-alias .field { border: 0; border-radius: 0; }
.lk-out { margin-top: var(--s-5); background: var(--accent-weak); border: 1px solid var(--accent-border); border-radius: var(--r-md); padding: var(--s-4); }
.lk-row { display: flex; align-items: center; gap: var(--s-3); margin-top: 6px; flex-wrap: wrap; }
.lk-short { font-family: var(--font-mono); font-weight: 600; font-size: var(--t-md); color: var(--accent); word-break: break-all; text-decoration: none; }
.btn-sm { padding: 6px 14px; font-size: var(--t-sm); }

/* ---------- admin Command Center ---------- */
.adm-gate { max-width: 460px; margin: var(--s-8) auto; text-align: center; }
.adm-gate .btn { margin-top: var(--s-4); }
.adm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-5); }
.adm-head .page-h1 { margin: 0; }
.adm-user { display: flex; align-items: center; gap: var(--s-3); font-size: var(--t-sm); color: var(--ink-soft); }
.adm-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3); margin-bottom: var(--s-5); }
.adm-kpis.adm-mini { grid-template-columns: repeat(3, 1fr); margin: var(--s-3) 0; }
.adm-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-4); display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow-sm); }
.adm-kpi span { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .05em; font-size: 10px; font-weight: 600; color: var(--ink-mute); }
.adm-kpi b { font-family: var(--font-display); font-size: var(--t-2xl); font-weight: 800; line-height: 1.05; color: var(--ink); }
.adm-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--s-3); margin-bottom: var(--s-3); }
.adm-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5); box-shadow: var(--shadow-sm); margin-bottom: var(--s-3); }
.adm-card h2 { font-size: var(--t-lg); margin-bottom: var(--s-4); }
.adm-chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.adm-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.adm-bar i { display: block; width: 100%; max-width: 26px; min-height: 3px; background: linear-gradient(180deg, var(--accent), #c62a92); border-radius: 4px 4px 0 0; }
.adm-bar span { font-size: 9px; color: var(--ink-mute); white-space: nowrap; }
.adm-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); text-align: center; }
.adm-plans b { display: block; font-family: var(--font-display); font-size: var(--t-xl); font-weight: 800; }
.adm-plans span { font-size: var(--t-xs); color: var(--ink-mute); }
.adm-scroll { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.adm-table th { text-align: left; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .05em; font-size: 10px; color: var(--ink-mute); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.adm-table td { padding: 10px; border-bottom: 1px solid var(--line); }
.adm-plan { font-family: var(--font-mono); text-transform: uppercase; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); background: var(--accent-weak); color: var(--accent); }
.adm-links { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-3); }
.adm-foot { text-align: center; margin-top: var(--s-4); }
@media (max-width: 820px) { .adm-kpis { grid-template-columns: repeat(2, 1fr); } .adm-cols { grid-template-columns: 1fr; } }

/* ---------- language switcher (i18n) ---------- */
.lang-switch { position: relative; }
.lang-switch > summary { list-style: none; cursor: pointer; font-size: var(--t-xs); font-weight: 600; color: var(--ink-soft); padding: 8px 10px; border-radius: var(--r-sm); white-space: nowrap; }
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch > summary:hover { background: var(--surface-sunk); color: var(--ink); }
.lang-menu { position: absolute; right: 0; top: 100%; margin-top: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); min-width: 170px; padding: 6px; z-index: 50; display: flex; flex-direction: column; }
.lang-menu a { padding: 8px 12px; border-radius: var(--r-sm); font-size: var(--t-sm); color: var(--ink); text-decoration: none; }
.lang-menu a:hover { background: var(--accent-weak); color: var(--accent); }
.lang-menu a[aria-current="true"] { color: var(--accent); font-weight: 600; }
[dir="rtl"] .lang-menu { right: auto; left: 0; }
[dir="rtl"] body { text-align: right; }

/* ---------- micro-interactions ---------- */
.brand svg { transition: transform var(--dur) var(--ease); }
@media (prefers-reduced-motion: no-preference) { .brand:hover svg { transform: rotate(-6deg) scale(1.06); } }
a, .btn, .icon-btn, summary { transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); }
