/* notoolhunt — design system
   Brand DNA from aryanutkarsh.com / tools.aryanutkarsh.com:
   warm charcoal, paper cream, caramel accent, dot-grid paper, tape, bento cards. */

@import url("https://api.fontshare.com/v2/css?f[]=chubbo@400,500,700&f[]=supreme@400,500,700,800&f[]=sentient@400,400i,500i&display=swap");

:root {
  --f-display: "Chubbo", "Supreme", system-ui, sans-serif;
  --f-ui: "Supreme", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-serif: "Sentient", Georgia, serif;
  --f-mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;

  /* motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --spring: linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);
  --spring-soft: linear(0, 0.012, 0.05, 0.111 4.6%, 0.36 9.7%, 0.6 15%, 0.776 20.4%, 0.89 25.9%, 0.958 31.6%, 0.995 38%, 1.011 45.4%, 1.012 55.6%, 1.003 72.6%, 1);
  --t-press: 140ms;
  --t-fast: 180ms;
  --t-med: 280ms;
  --t-slow: 480ms;

  /* radius & spacing */
  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 22px; --r-xl: 30px;
  --gap: 14px;
  --side: 268px;

  /* category hues (oklch) */
  --c-images: oklch(0.74 0.12 35);
  --c-pdf: oklch(0.7 0.14 22);
  --c-data: oklch(0.75 0.11 150);
  --c-developer: oklch(0.72 0.11 280);
  --c-text: oklch(0.82 0.11 92);
  --c-design: oklch(0.75 0.12 340);
  --c-files: oklch(0.76 0.08 225);
  --c-utilities: oklch(0.77 0.09 190);
  --c-business: oklch(0.79 0.11 70);
  --c-social: oklch(0.73 0.11 255);
  --c-security: oklch(0.76 0.11 125);
  --c-media: oklch(0.72 0.12 305);
}

/* dark (default, warm charcoal) */
:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg: #141210;
  --bg-2: #191715;
  --surface: #1e1c1a;
  --surface-2: #262320;
  --surface-3: #2f2b27;
  --line: #34302b;
  --line-2: #45403a;
  --text: #ede9e3;
  --text-2: #c9c3bb;
  --muted: #8f8880;
  --accent: #d4a574;
  --accent-2: #e8c39b;
  --accent-ink: #1e1c1a;
  --accent-soft: rgba(212, 165, 116, 0.14);
  --ok: #7cc47f;
  --ok-soft: rgba(124, 196, 127, 0.14);
  --bad: #ef7a6b;
  --bad-soft: rgba(239, 122, 107, 0.14);
  --dot: rgba(237, 233, 227, 0.07);
  --sh-1: 0 1px 0 rgba(255,255,255,.04) inset, 0 1px 2px rgba(0,0,0,.4);
  --sh-2: 0 1px 0 rgba(255,255,255,.05) inset, 0 10px 30px -12px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.3);
  --sh-3: 0 30px 80px -20px rgba(0,0,0,.75), 0 8px 24px rgba(0,0,0,.4);
  --checker: #262320;
  --checker-2: #1e1c1a;
  --tape: rgba(232, 214, 190, 0.55);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #ebe6de;
  --bg-2: #e4ded4;
  --surface: #f8f5f0;
  --surface-2: #f0ebe3;
  --surface-3: #e7e0d5;
  --line: #dcd4c8;
  --line-2: #cbc1b2;
  --text: #1e1c1a;
  --text-2: #3d3833;
  --muted: #7a7168;
  --accent: #b47a42;
  --accent-2: #9a6431;
  --accent-ink: #fffaf3;
  --accent-soft: rgba(180, 122, 66, 0.13);
  --ok: #2d7a32;
  --ok-soft: rgba(45, 122, 50, 0.12);
  --bad: #c2412f;
  --bad-soft: rgba(194, 65, 47, 0.1);
  --dot: rgba(30, 28, 26, 0.09);
  --sh-1: 0 1px 0 rgba(255,255,255,.7) inset, 0 1px 2px rgba(60,40,20,.08);
  --sh-2: 0 1px 0 rgba(255,255,255,.8) inset, 0 12px 30px -14px rgba(60,40,20,.28), 0 2px 6px rgba(60,40,20,.06);
  --sh-3: 0 30px 80px -20px rgba(60,40,20,.35), 0 8px 24px rgba(60,40,20,.12);
  --checker: #e7e0d5;
  --checker-2: #f8f5f0;
  --tape: rgba(214, 190, 150, 0.6);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 450 14.5px/1.5 var(--f-ui);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden; height: 100dvh;
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img, svg, canvas, video { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.mono { font-family: var(--f-mono); font-size: .92em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
svg.i.s { width: 15px; height: 15px; }
svg.i.l { width: 22px; height: 22px; }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }

/* ───────── layout ───────── */
.app { display: grid; grid-template-columns: var(--side) 1fr; height: 100dvh; transition: grid-template-columns var(--t-med) var(--ease-drawer); }
.app.collapsed { --side: 72px; }
.side {
  display: flex; flex-direction: column; gap: 6px; min-height: 0;
  background: var(--bg-2); border-right: 1px solid var(--line);
  padding: 14px 12px 12px; overflow: hidden;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 10px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: var(--sh-1); flex: none; transition: transform var(--t-med) var(--spring); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.brand-mark svg { width: 18px; height: 18px; }
.brand-name { font: 700 18px/1 var(--f-display); letter-spacing: .01em; white-space: nowrap; }
.brand-name b { color: var(--accent); font-weight: 700; }
.side-toggle { margin-left: auto; color: var(--muted); }
.collapsed .brand-name, .collapsed .side-label, .collapsed .nav-text, .collapsed .nav-count, .collapsed .nav-chev, .collapsed .side-foot .nav-text, .collapsed .kbd-hint, .collapsed .sub { display: none !important; }
.collapsed .side-toggle { margin: 0; }
.collapsed .brand { flex-direction: column; gap: 10px; }

.search-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 10px 0 12px;
  border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  box-shadow: var(--sh-1); transition: border-color var(--t-fast), transform var(--t-press) var(--ease-out);
}
.search-btn:hover { border-color: var(--line-2); color: var(--text-2); }
.search-btn:active { transform: scale(.98); }
.kbd-hint { margin-left: auto; display: flex; gap: 3px; }
kbd { font: 600 10.5px/1 var(--f-ui); min-width: 20px; height: 20px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 2px; color: var(--muted); }

.side-scroll { overflow-y: auto; overflow-x: hidden; margin: 0 -12px; padding: 4px 12px; flex: 1; min-height: 0; }
.side-label { font: 600 11px/1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 16px 10px 8px; }
.nav { list-style: none; margin: 0; padding: 0; position: relative; }
.nav-item { position: relative; }
.nav-a {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 8px 0 10px;
  border-radius: 10px; color: var(--text-2); font-weight: 500; white-space: nowrap;
  transition: color var(--t-fast), background var(--t-fast), transform var(--t-press) var(--ease-out);
}
.nav-a:hover { color: var(--text); background: var(--surface); }
.nav-a:active { transform: scale(.98); }
.nav-a.on { color: var(--text); background: var(--surface-2); box-shadow: var(--sh-1); }
.nav-a.on::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.chip-ic { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--cat, var(--surface-3)); color: #1a1714; flex: none; }
.chip-ic svg.i { width: 14px; height: 14px; stroke-width: 2.2; }
.nav-count { margin-left: auto; font: 600 11px/1 var(--f-ui); color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-chev { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: var(--muted); transition: transform var(--t-med) var(--ease-out), background var(--t-fast); }
.nav-chev:hover { background: var(--surface-3); color: var(--text); }
.nav-item.open .nav-chev { transform: rotate(90deg); }
.sub { list-style: none; margin: 2px 0 6px 22px; padding: 0 0 0 12px; border-left: 1px solid var(--line); display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-med) var(--ease-out); }
.nav-item.open .sub { grid-template-rows: 1fr; }
.sub > div { overflow: hidden; }
.sub a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color var(--t-fast), background var(--t-fast); }
.sub a:hover, .sub a.on { color: var(--text); background: var(--surface); }
.sub a.all { color: var(--accent); }
.side-foot { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 2px; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.topbar {
  height: 60px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 18px 0 22px;
  border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2); position: relative; z-index: 5;
}
.crumbs { display: flex; align-items: center; gap: 12px; min-width: 0; }
.crumbs .chip-ic { width: 34px; height: 34px; border-radius: 10px; }
.crumbs .chip-ic svg.i { width: 18px; height: 18px; }
.crumb-cat { font-size: 12px; color: var(--muted); line-height: 1.1; }
.crumb-cat a:hover { color: var(--text); }
.crumb-title { font: 600 17px/1.15 var(--f-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.005em; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.view { flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; scroll-behavior: smooth; }
.view-inner { padding: 26px 28px 80px; max-width: 1360px; margin: 0 auto; }
.statusbar { height: 32px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); background: var(--bg-2); }
.statusbar .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.statusbar .right { margin-left: auto; }
.statusbar.busy .dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: pulse 1s var(--ease-io) infinite; }
@keyframes pulse { 50% { transform: scale(.6); opacity: .6; } }

/* ───────── buttons ───────── */
.btn {
  --b-bg: var(--surface-2); --b-fg: var(--text); --b-bd: var(--line);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 15px; border-radius: 11px; white-space: nowrap; user-select: none;
  background: var(--b-bg); color: var(--b-fg); border: 1px solid var(--b-bd);
  font-weight: 600; font-size: 13.5px; letter-spacing: .005em;
  box-shadow: var(--sh-1);
  transition: transform var(--t-press) var(--ease-out), background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), color var(--t-fast), opacity var(--t-fast);
  overflow: hidden; isolation: isolate;
}
.btn:hover { border-color: var(--line-2); background: var(--surface-3); }
.btn:active, .btn.pressed { transform: scale(.96); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.primary { --b-bg: var(--accent); --b-fg: var(--accent-ink); --b-bd: transparent; box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 -2px 0 rgba(0,0,0,.14) inset, 0 6px 18px -8px var(--accent); }
.btn.primary:hover { background: var(--accent-2); }
.btn.ghost { --b-bg: transparent; --b-bd: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger:hover { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; gap: 6px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 14px; }
.btn.icon { width: 38px; padding: 0; }
.btn.sm.icon { width: 32px; }
.btn .lbl, .btn .alt { display: inline-flex; align-items: center; gap: 8px; transition: opacity var(--t-fast) var(--ease-out), transform var(--t-med) var(--spring), filter var(--t-fast); }
.btn .alt { position: absolute; inset: 0; justify-content: center; opacity: 0; transform: scale(.7); filter: blur(3px); }
.btn.done .lbl { opacity: 0; transform: scale(.7); filter: blur(3px); }
.btn.done .alt { opacity: 1; transform: none; filter: none; }
.btn .ripple { position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: .18; transform: scale(0); animation: ripple 600ms var(--ease-out) forwards; z-index: -1; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
.btn .progress-fill { position: absolute; inset: 0; background: rgba(255,255,255,.22); transform-origin: left; transform: scaleX(0); z-index: -1; transition: transform var(--t-med) var(--ease-out); }

/* check draw */
.check-draw path { stroke-dasharray: 24; stroke-dashoffset: 24; }
.done .check-draw path { animation: draw 380ms 80ms var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* local badge */
.local-pill { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 99px; background: var(--ok-soft); color: var(--ok); font-weight: 600; font-size: 12.5px; border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.local-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: beacon 2.4s ease-out infinite; }
@keyframes beacon { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 70%,100% { box-shadow: 0 0 0 7px transparent; } }

/* star */
.star { color: var(--muted); }
.star.on { color: var(--accent); }
.star.on svg { fill: var(--accent); }
.star.popping svg { animation: starpop 520ms var(--spring); }
@keyframes starpop { 0% { transform: scale(.6) rotate(-30deg); } 100% { transform: none; } }
.burst { position: fixed; pointer-events: none; z-index: 1000; width: 6px; height: 6px; border-radius: 50%; }

/* ───────── form controls ───────── */
.field { display: grid; gap: 7px; min-width: 0; }
.field > label, .lbl-row { font-size: 12.5px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.lbl-row .val { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.hint { font-size: 12px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-width: 0; height: 40px; padding: 0 12px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.12);
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-2); }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: .8; }
.textarea { height: auto; min-height: 140px; padding: 12px 14px; resize: vertical; line-height: 1.55; font-family: var(--f-mono); font-size: 13px; tab-size: 2; }
.textarea.prose { font-family: var(--f-ui); font-size: 14.5px; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238f8880' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 11px 0 0 11px; }
.input-group .addon { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line); border-left: 0; border-radius: 0 11px 11px 0; background: var(--surface-2); color: var(--muted); font-size: 13px; }
input[type="color"].swatch { -webkit-appearance: none; appearance: none; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); padding: 3px; background: var(--surface); cursor: pointer; }
input[type="color"].swatch::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"].swatch::-webkit-color-swatch { border: 0; border-radius: 8px; }
input[type="color"].swatch::-moz-color-swatch { border: 0; border-radius: 8px; }

/* segmented */
.seg { position: relative; display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: inset 0 1px 2px rgba(0,0,0,.12); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg.full { display: flex; }
.seg.full > button { flex: 1; }
.seg > button { position: relative; z-index: 1; height: 32px; padding: 0 13px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--muted); white-space: nowrap; transition: color var(--t-fast), transform var(--t-press) var(--ease-out); }
.seg > button:hover { color: var(--text-2); }
.seg > button:active { transform: scale(.95); }
.seg > button.on { color: var(--text); }
.seg > button[disabled] { opacity: .4; pointer-events: none; }
.seg .pill { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0; border-radius: 9px; background: var(--surface-3); box-shadow: var(--sh-2); transition: transform var(--t-med) var(--ease-io), width var(--t-med) var(--ease-io); }

/* toggle */
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 500; font-size: 13.5px; }
.toggle .track { position: relative; width: 42px; height: 25px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background var(--t-fast) var(--ease-out), border-color var(--t-fast); flex: none; }
.toggle .thumb { position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 99px; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.35); transition: transform 260ms var(--spring), width var(--t-fast) var(--ease-out); }
.toggle:active .thumb { width: 23px; }
.toggle.on .track { background: var(--accent); border-color: transparent; }
.toggle.on .thumb { transform: translateX(17px); }
.toggle.on:active .thumb { transform: translateX(13px); }

/* slider */
.range { position: relative; height: 24px; display: flex; align-items: center; touch-action: none; cursor: pointer; --p: 50%; }
.range .rail { position: absolute; left: 0; right: 0; height: 6px; border-radius: 99px; background: var(--surface-3); box-shadow: inset 0 1px 2px rgba(0,0,0,.25); overflow: hidden; }
.range .fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--p); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, transparent), var(--accent)); border-radius: 99px; }
.range .knob { position: absolute; left: var(--p); width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px var(--accent-soft), 0 2px 8px rgba(0,0,0,.35); transition: transform var(--t-med) var(--spring), box-shadow var(--t-fast); }
.range:hover .knob { box-shadow: 0 0 0 6px var(--accent-soft), 0 2px 8px rgba(0,0,0,.35); }
.range.drag .knob { transform: scale(1.18); }
.range .tip { position: absolute; left: var(--p); bottom: 26px; transform: translateX(-50%) translateY(4px) scale(.9); opacity: 0; pointer-events: none; padding: 3px 8px; border-radius: 7px; background: var(--text); color: var(--bg); font: 700 11.5px/1.3 var(--f-ui); font-variant-numeric: tabular-nums; transition: opacity var(--t-fast), transform var(--t-fast) var(--ease-out); white-space: nowrap; }
.range.drag .tip { opacity: 1; transform: translateX(-50%); }

/* checkbox */
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; font-weight: 500; user-select: none; }
.check .box { width: 19px; height: 19px; border-radius: 6px; border: 1.5px solid var(--line-2); background: var(--surface); display: grid; place-items: center; transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-press) var(--ease-out); flex: none; }
.check .box svg { width: 13px; height: 13px; stroke: var(--accent-ink); stroke-width: 3; fill: none; stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset var(--t-med) var(--ease-out); }
.check:active .box { transform: scale(.88); }
.check.on .box { background: var(--accent); border-color: var(--accent); }
.check.on .box svg { stroke-dashoffset: 0; }

/* ───────── cards & panels ───────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 18px; min-width: 0; }
.panel-h { display: flex; align-items: center; gap: 10px; margin: -2px 0 14px; }
.panel-h h3 { margin: 0; font: 700 12px/1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.panel-h .act { margin-left: auto; display: flex; gap: 6px; }
.stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.divider { height: 1px; background: var(--line); margin: 4px 0; }

/* workspace layout used by tools */
.ws { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.ws.wide-side { grid-template-columns: minmax(0, 1fr) 380px; }
.ws.split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ws.single { grid-template-columns: minmax(0, 1fr); max-width: 880px; margin: 0 auto; }
.ws .side-panel { position: sticky; top: 0; }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.stat .k { font: 700 10.5px/1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat .v { font: 700 22px/1.2 var(--f-ui); margin-top: 7px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; overflow-wrap: anywhere; }
.stat .v.good { color: var(--ok); }
.stat .v.bad { color: var(--bad); }
.stat .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat.big .v { font-size: 34px; font-family: var(--f-display); letter-spacing: 0; }
.stat.accent { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }

/* result row with copy */
.kv { display: grid; gap: 6px; }
.kv-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 13px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; transition: border-color var(--t-fast); }
.kv-row:hover { border-color: var(--line-2); }
.kv-row .k { font-size: 12px; color: var(--muted); width: 130px; flex: none; }
.kv-row .v { flex: 1; min-width: 0; font-family: var(--f-mono); font-size: 13px; overflow-wrap: anywhere; }

/* output box */
.out { position: relative; }
.out pre, pre.code { margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); font: 13px/1.6 var(--f-mono); white-space: pre-wrap; word-break: break-word; overflow: auto; max-height: 560px; color: var(--text-2); }
.out .copy-fab { position: absolute; top: 8px; right: 8px; }

/* ───────── dropzone ───────── */
.drop {
  position: relative; display: grid; place-items: center; text-align: center; gap: 6px;
  min-height: 320px; padding: 40px 24px; border-radius: var(--r-xl);
  background-color: var(--surface);
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px);
  background-size: 18px 18px;
  border: 1.5px dashed var(--line-2);
  transition: border-color var(--t-fast), background-color var(--t-fast), transform var(--t-med) var(--spring), box-shadow var(--t-med);
  cursor: pointer; isolation: isolate; overflow: hidden;
}
.drop:hover { border-color: var(--muted); }
.drop.over { border-style: solid; border-color: var(--accent); background-color: color-mix(in srgb, var(--accent) 6%, var(--surface)); transform: scale(1.012); box-shadow: 0 0 0 6px var(--accent-soft); }
.drop.over .drop-ic { transform: translateY(-8px) rotate(-6deg) scale(1.08); }
.drop.squish { animation: squish 520ms var(--spring); }
@keyframes squish { 0% { transform: scale(.97); } 100% { transform: none; } }
.drop-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text); box-shadow: var(--sh-2); transition: transform var(--t-med) var(--spring); margin-bottom: 10px; position: relative; }
.drop-ic::after { content: ""; position: absolute; left: 50%; top: -10px; width: 38px; height: 14px; transform: translateX(-50%) rotate(-4deg); background: var(--tape); border-radius: 2px; opacity: .9; }
.drop-ic svg.i { width: 26px; height: 26px; }
.drop h2 { margin: 0; font: 700 24px/1.15 var(--f-display); letter-spacing: .005em; }
.drop p { margin: 0; color: var(--muted); font-size: 13.5px; }
.drop .row { justify-content: center; margin-top: 14px; }
.drop .safe { margin-top: 12px; display: inline-flex; gap: 7px; align-items: center; font-size: 12px; color: var(--muted); }
.drop .safe i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.drop.compact { min-height: 150px; padding: 22px; border-radius: var(--r-lg); }
.drop.compact .drop-ic { width: 46px; height: 46px; border-radius: 14px; margin-bottom: 4px; }
.drop.compact .drop-ic::after { display: none; }
.drop.compact h2 { font-size: 17px; font-family: var(--f-ui); }
.drop input[type=file] { display: none; }

/* file chips */
.files { display: grid; gap: 8px; }
.fchip { display: flex; align-items: center; gap: 12px; padding: 9px 10px 9px 9px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); animation: rise 420ms var(--ease-out) both; position: relative; overflow: hidden; }
.fchip .thumb { width: 42px; height: 42px; border-radius: 10px; background: var(--surface-3) center/cover; flex: none; display: grid; place-items: center; color: var(--muted); font: 700 10px/1 var(--f-ui); text-transform: uppercase; }
.fchip .meta { min-width: 0; flex: 1; }
.fchip .name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fchip .sub2 { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fchip .bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--pr, 0)); transition: transform var(--t-med) var(--ease-out); }
.fchip.leaving { animation: leave 260ms var(--ease-out) forwards; }
.fchip.dragging { opacity: .5; }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes leave { to { opacity: 0; transform: translateX(14px) scale(.96); height: 0; padding: 0; margin: 0; } }
.stagger > * { animation: rise 460ms var(--ease-out) both; }
.stagger > *:nth-child(1) { animation-delay: 0ms; } .stagger > *:nth-child(2) { animation-delay: 35ms; } .stagger > *:nth-child(3) { animation-delay: 70ms; } .stagger > *:nth-child(4) { animation-delay: 105ms; } .stagger > *:nth-child(5) { animation-delay: 140ms; } .stagger > *:nth-child(6) { animation-delay: 175ms; } .stagger > *:nth-child(7) { animation-delay: 210ms; } .stagger > *:nth-child(8) { animation-delay: 245ms; } .stagger > *:nth-child(n+9) { animation-delay: 280ms; }

/* progress */
.prog { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; position: relative; }
.prog > i { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(var(--v, 0)); transition: transform var(--t-med) var(--ease-out); border-radius: 99px; }
.prog.indet > i { transform: none; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: indet 1.1s var(--ease-io) infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.shimmer { position: relative; overflow: hidden; }
.shimmer::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.08) 50%, transparent 70%); animation: shim 1.3s linear infinite; }
@keyframes shim { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* busy overlay */
.busy { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(4px); border-radius: inherit; z-index: 4; animation: fade 200ms var(--ease-out); }
.busy-card { display: grid; gap: 10px; justify-items: center; font-size: 13px; color: var(--text-2); min-width: 220px; }
.pixgrid { display: grid; grid-template-columns: repeat(4, 8px); gap: 4px; }
.pixgrid i { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); animation: pix 1.1s var(--ease-io) infinite; }
@keyframes pix { 0%, 100% { opacity: .15; transform: scale(.7); } 40% { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }

/* checker / stage */
.stage { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background-color: var(--checker-2); background-image: linear-gradient(45deg, var(--checker) 25%, transparent 25%, transparent 75%, var(--checker) 75%), linear-gradient(45deg, var(--checker) 25%, transparent 25%, transparent 75%, var(--checker) 75%); background-size: 20px 20px; background-position: 0 0, 10px 10px; min-height: 300px; display: grid; place-items: center; }
.stage > img, .stage > canvas, .stage > video { max-height: 68vh; object-fit: contain; }
.stage-tag { position: absolute; top: 12px; padding: 4px 9px; border-radius: 8px; background: rgba(20,18,16,.75); color: #f0ebe4; font: 600 11.5px/1.3 var(--f-ui); backdrop-filter: blur(6px); z-index: 2; }

/* before / after compare */
.compare { position: relative; overflow: hidden; user-select: none; touch-action: none; cursor: ew-resize; --x: 50%; }
.compare img, .compare canvas { display: block; width: 100%; height: auto; max-height: 68vh; object-fit: contain; }
.compare .after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--x)); }
.compare .after img, .compare .after canvas { width: 100%; height: 100%; }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 12px rgba(0,0,0,.4); z-index: 3; }
.compare .handle::after { content: "⇆"; position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(20,18,16,.8); backdrop-filter: blur(6px); color: #fff; display: grid; place-items: center; font-size: 15px; border: 2px solid #fff; transition: transform var(--t-med) var(--spring); }
.compare.drag .handle::after { transform: translate(-50%, -50%) scale(1.15); }

/* tables */
.tbl-wrap { overflow: auto; border-radius: 14px; border: 1px solid var(--line); max-height: 560px; background: var(--surface); }
table.tbl { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.tbl th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-weight: 700; font-size: 12px; color: var(--text-2); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
.tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; max-width: 340px; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background var(--t-fast); }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl td.n { color: var(--muted); width: 1%; }

/* tags/badges */
.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 7px; background: var(--surface-3); color: var(--text-2); font: 600 11.5px/1 var(--f-ui); white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.acc { background: var(--accent-soft); color: var(--accent); }
mark.hl { background: color-mix(in srgb, var(--accent) 35%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
mark.hl.alt { background: color-mix(in srgb, var(--c-developer) 40%, transparent); }

/* tabs (underline variant) */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); position: relative; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs button { height: 38px; padding: 0 12px; color: var(--muted); font-weight: 600; font-size: 13.5px; white-space: nowrap; transition: color var(--t-fast); }
.tabs button:hover, .tabs button.on { color: var(--text); }
.tabs .bar { position: absolute; bottom: -1px; height: 2px; left: 0; background: var(--accent); border-radius: 2px; transition: transform var(--t-med) var(--ease-io), width var(--t-med) var(--ease-io); }

/* empty state */
.empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 36px 20px; border-radius: var(--r-lg); border: 1.5px dashed var(--line); color: var(--muted); background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px); background-size: 18px 18px; }
.empty b { color: var(--text-2); font-size: 15px; }

/* ───────── toasts ───────── */
.toasts { position: fixed; right: 20px; bottom: 44px; z-index: 900; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 11px; min-width: 240px; max-width: 380px; padding: 11px 14px 11px 12px; border-radius: 14px; background: var(--text); color: var(--bg); box-shadow: var(--sh-3); font-weight: 600; font-size: 13.5px; animation: toastIn 420ms var(--spring) both; touch-action: pan-y; }
.toast .ti { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; flex: none; background: rgba(127,127,127,.2); }
.toast.ok .ti { background: var(--ok); color: #fff; }
.toast.bad .ti { background: var(--bad); color: #fff; }
.toast .ti svg { width: 14px; height: 14px; stroke-width: 2.6; }
.toast small { display: block; font-weight: 500; opacity: .7; font-size: 12px; }
.toast.out { animation: toastOut 260ms var(--ease-out) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.92); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px) scale(.96); } }

/* ───────── palette (⌘K) ───────── */
.scrim { position: fixed; inset: 0; z-index: 800; background: rgba(10, 9, 8, .5); backdrop-filter: blur(6px); animation: fade 200ms var(--ease-out); display: grid; justify-items: center; align-items: start; padding-top: 11vh; }
.scrim.closing { animation: fade 180ms var(--ease-out) reverse forwards; }
.pal { width: min(680px, calc(100vw - 32px)); border-radius: 22px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--sh-3); overflow: hidden; animation: palIn 260ms var(--ease-drawer); transform-origin: 50% 0; }
.scrim.closing .pal { animation: palIn 180ms var(--ease-out) reverse forwards; }
@keyframes palIn { from { opacity: 0; transform: scale(.96) translateY(-6px); } }
.pal-in { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 60px; border-bottom: 1px solid var(--line); }
.pal-in input { flex: 1; height: 100%; border: 0; background: transparent; outline: 0; font-size: 17px; font-weight: 500; }
.pal-list { max-height: min(56vh, 520px); overflow-y: auto; padding: 8px; position: relative; }
.pal-group { font: 700 11px/1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 10px 8px; }
.pal-item { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; cursor: pointer; }
.pal-item .t { font-weight: 600; white-space: nowrap; }
.pal-item .d { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pal-item .enter { margin-left: auto; opacity: 0; transition: opacity var(--t-fast); }
.pal-item.on .enter { opacity: 1; }
.pal-hl { position: absolute; left: 8px; right: 8px; top: 0; height: 0; border-radius: 12px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); transition: transform var(--t-fast) var(--ease-out), height var(--t-fast) var(--ease-out); z-index: 0; pointer-events: none; }
.pal-foot { display: flex; gap: 16px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.pal-foot span { display: inline-flex; gap: 6px; align-items: center; }
.pal-foot .right { margin-left: auto; }
.pal-empty { padding: 40px; text-align: center; color: var(--muted); }

/* popover */
.nth-pop { position: fixed; z-index: 850; min-width: 220px; max-width: 320px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--sh-3); animation: popIn 200ms var(--ease-out); font-size: 13px; }
@keyframes popIn { from { opacity: 0; transform: scale(.95) translateY(-4px); } }
.nth-pop h4 { margin: 0 0 6px; font-size: 14px; }
.nth-pop p { margin: 0 0 8px; color: var(--text-2); }
.menu { display: grid; gap: 2px; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; text-align: left; font-weight: 500; }
.menu a:hover, .menu button:hover { background: var(--surface-2); }

/* ───────── home ───────── */
.hero { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; margin-bottom: 16px; }
.hero-card { position: relative; padding: 38px 36px 34px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); overflow: hidden; background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px); background-size: 18px 18px; box-shadow: var(--sh-1); }
.hero-card .corner { position: absolute; width: 22px; height: 22px; border-color: var(--line-2); border-style: solid; }
.hero-card .corner.tl { top: 16px; left: 16px; border-width: 1.5px 0 0 1.5px; }
.hero-card .corner.tr { top: 16px; right: 16px; border-width: 1.5px 1.5px 0 0; }
.hero-card .corner.bl { bottom: 16px; left: 16px; border-width: 0 0 1.5px 1.5px; }
.hero-card .corner.br { bottom: 16px; right: 16px; border-width: 0 1.5px 1.5px 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 12px/1 var(--f-mono); letter-spacing: .04em; color: var(--text-2); text-transform: uppercase; }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.hero h1 { margin: 18px 0 14px; font: 700 clamp(44px, 6vw, 82px)/0.92 var(--f-display); letter-spacing: -.005em; }
.hero h1 .ser { font-family: var(--f-serif); font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: -.02em; }
.hero h1 .strike { position: relative; color: var(--muted); }
.hero h1 .strike::after { content: ""; position: absolute; left: -2%; right: -2%; top: 52%; height: .09em; background: var(--accent); border-radius: 4px; transform-origin: left; animation: strike 700ms 500ms var(--ease-out) both; }
@keyframes strike { from { transform: scaleX(0); } }
.hero .lead { max-width: 520px; color: var(--text-2); font-size: 16px; margin: 0 0 22px; }
.tape { position: absolute; width: 110px; height: 30px; background: var(--tape); box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.tape::before, .tape::after { content: ""; position: absolute; top: 0; bottom: 0; width: 6px; background: repeating-linear-gradient(0deg, transparent 0 3px, var(--bg) 3px 5px); opacity: .5; }
.tape::before { left: -3px; } .tape::after { right: -3px; }
.hero-counter { display: flex; gap: 26px; margin-top: 26px; }
.hero-counter div b { display: block; font: 700 28px/1 var(--f-display); }
.hero-counter div span { font-size: 12px; color: var(--muted); }

.udrop { position: relative; border-radius: var(--r-xl); min-height: 100%; }
.udrop .drop { min-height: 100%; height: 100%; }

.sect-h { display: flex; align-items: baseline; gap: 12px; margin: 36px 4px 14px; }
.sect-h h2 { margin: 0; font: 700 26px/1.1 var(--f-display); }
.sect-h .n { font: 600 12px/1 var(--f-mono); color: var(--muted); }
.sect-h p { margin: 0; color: var(--muted); font-size: 13.5px; }
.sect-h a.more { margin-left: auto; color: var(--accent); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.sect-h a.more svg { transition: transform var(--t-fast) var(--ease-out); }
.sect-h a.more:hover svg { transform: translateX(3px); }

.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.qchip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 13px 0 7px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 13.5px; box-shadow: var(--sh-1); transition: transform var(--t-press) var(--ease-out), border-color var(--t-fast), background var(--t-fast); }
.qchip:hover { border-color: var(--line-2); background: var(--surface-2); }
.qchip:active { transform: scale(.96); }

.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.tcard {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 12px; min-height: 66px; min-width: 0;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1);
  transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.tcard .chip-ic { width: 38px; height: 38px; border-radius: 11px; transition: transform var(--t-med) var(--spring); }
.tcard .chip-ic svg.i { width: 18px; height: 18px; }
.tcard .tt { min-width: 0; flex: 1; }
.tcard .tn { font-weight: 650; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard .td { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard .go { opacity: 0; color: var(--muted); transform: translate(-4px, 4px); transition: opacity var(--t-fast), transform var(--t-fast) var(--ease-out); }
@media (hover: hover) {
  .tcard:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--sh-2); }
  .tcard:hover .chip-ic { transform: rotate(-6deg) scale(1.06); }
  .tcard:hover .go { opacity: 1; transform: none; }
}
.tcard:active { transform: scale(.98); }
.tcard .fav-dot { position: absolute; top: 8px; right: 8px; color: var(--accent); }

.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.bcard { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 200px; padding: 20px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--sh-1); transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med), border-color var(--t-fast); isolation: isolate; }
.bcard::before { content: ""; position: absolute; width: 260px; height: 260px; right: -90px; bottom: -110px; border-radius: 50%; background: var(--cat); opacity: .13; filter: blur(4px); z-index: -1; transition: transform var(--t-slow) var(--ease-out), opacity var(--t-med); }
.bcard:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-2); }
.bcard:hover::before { transform: scale(1.25); opacity: .22; }
.bcard .chip-ic { width: 44px; height: 44px; border-radius: 13px; }
.bcard .chip-ic svg.i { width: 21px; height: 21px; }
.bcard h3 { margin: 14px 0 4px; font: 700 22px/1.05 var(--f-display); }
.bcard p { margin: 0; color: var(--muted); font-size: 13px; }
.bcard .cnt { position: absolute; top: 20px; right: 20px; font: 700 13px/1 var(--f-mono); color: var(--muted); }
.bcard.wide { grid-column: span 2; }

.list-rank { counter-reset: r; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.list-rank .tcard::before { counter-increment: r; content: counter(r, decimal-leading-zero); font: 700 12px/1 var(--f-mono); color: var(--muted); width: 20px; flex: none; }

/* category page */
.cat-hero { display: flex; align-items: flex-end; gap: 22px; padding: 30px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); margin-bottom: 18px; background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px); background-size: 18px 18px; position: relative; overflow: hidden; }
.cat-hero .chip-ic { width: 72px; height: 72px; border-radius: 20px; }
.cat-hero .chip-ic svg.i { width: 32px; height: 32px; }
.cat-hero h1 { margin: 0; font: 700 46px/1 var(--f-display); }
.cat-hero p { margin: 6px 0 0; color: var(--text-2); }
.cat-hero .filter { margin-left: auto; width: 280px; }

/* settings */
.set-row { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.set-row h4 { margin: 0 0 4px; font-size: 14.5px; }
.set-row p { margin: 0; color: var(--muted); font-size: 13px; max-width: 560px; }

/* footer note */
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.note.warn { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.note svg.i { margin-top: 2px; color: var(--accent); }

/* page transitions */
.view-inner.enter { animation: pageIn 420ms var(--ease-out) backwards; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); filter: blur(2px); } }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 260ms; animation-timing-function: var(--ease-out); }

/* tool-page loading skeleton */
.skel { height: 340px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); }

/* color swatches used by design/image tools */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.sw { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast); }
.sw:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.sw:active { transform: scale(.96); }
.sw .c { height: 72px; }
.sw .l { padding: 7px 9px; font: 600 12px/1.2 var(--f-mono); }

/* responsive */
@media (max-width: 1100px) {
  .ws, .ws.wide-side { grid-template-columns: 1fr; }
  .ws .side-panel { position: static; }
  .hero { grid-template-columns: 1fr; }
  .bento { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  body { overflow: auto; height: auto; }
  .app { grid-template-columns: 1fr; height: auto; min-height: 100dvh; }
  .side { position: fixed; inset: 0 auto 0 0; width: 290px; z-index: 700; transform: translateX(-105%); transition: transform var(--t-med) var(--ease-drawer); box-shadow: var(--sh-3); }
  .app.mnav .side { transform: none; }
  .app.collapsed { --side: 290px; }
  .main { min-height: 100dvh; }
  .view { overflow: visible; }
  .topbar { position: sticky; top: 0; padding: 0 12px; }
  .view-inner { padding: 18px 14px 70px; }
  .grid3, .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws.split, .grid2 { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .bcard.wide { grid-column: auto; }
  .cat-hero { flex-direction: column; align-items: flex-start; }
  .cat-hero .filter { margin: 0; width: 100%; }
  .hide-m { display: none !important; }
  .statusbar { display: none; }
}
.mob-only { display: none; }
@media (max-width: 760px) { .mob-only { display: inline-flex; } }

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

/* ───────── iOS haptic overlay (trusted switch toggle) ───────── */
.hap { position: absolute; inset: 0; z-index: 6; opacity: .001; cursor: pointer; -webkit-tap-highlight-color: transparent; border-radius: inherit; }
.hap input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }

/* ───────── Aceternity-style spotlight on cards (desktop) ───────── */
@media (hover: hover) and (pointer: fine) {
  .spot { --mx: 50%; --my: 50%; }
  .spot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; z-index: 0;
    background: radial-gradient(320px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%);
    transition: opacity 300ms var(--ease-out); }
  .spot:hover::after { opacity: 1; }
  .spot > * { position: relative; z-index: 1; }
}

/* ───────── Ripplix rolling-text button ───────── */
.roll .lbl .rt { display: inline-block; overflow: hidden; height: 1.25em; line-height: 1.25em; vertical-align: top; }
.roll .lbl .rt > span { display: block; text-shadow: 0 1.25em currentColor; transition: transform 380ms cubic-bezier(.65,0,.35,1); }
@media (hover: hover) { .roll:hover .lbl .rt > span { transform: translateY(-1.25em); } }

/* ───────── moving border (ambient, works on touch) ───────── */
.mborder { position: relative; isolation: isolate; }
.mborder::before { content: ""; position: absolute; inset: -1.5px; border-radius: inherit; z-index: -2; padding: 1.5px;
  background: conic-gradient(from var(--ang, 0deg), transparent 0 70%, var(--accent-2) 82%, #fff 88%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: mb 3s linear infinite; }
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes mb { to { --ang: 360deg; } }

/* ───────── sliding digits (animate-ui) ───────── */
.slnum { display: inline-flex; overflow: hidden; height: 1.15em; line-height: 1.15em; vertical-align: bottom; }
.slnum .col { display: flex; flex-direction: column; transition: transform 560ms var(--spring-soft); }
.slnum .col span { height: 1.15em; }
.slnum .ch { display: inline-block; }

/* ───────── text generate (blur-in words) ───────── */
.gen-w { display: inline-block; opacity: 0; filter: blur(10px); animation: genw 700ms var(--ease-out) forwards; }
@keyframes genw { to { opacity: 1; filter: none; } }

/* ───────── gliding hover highlight (sidebar + lists) ───────── */
.glide-hl { position: absolute; left: 0; right: 0; top: 0; height: 38px; border-radius: 10px; background: var(--surface); pointer-events: none; opacity: 0; z-index: 0;
  transition: transform 260ms var(--spring-soft), opacity 160ms var(--ease-out), height 200ms var(--ease-out); }
.nav:hover > .glide-hl { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .nav .nav-a:hover { background: transparent; } }

/* ───────── theme reveal (view transition circle) ───────── */
::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; }
html.theme-vt::view-transition-old(root) { animation: none; z-index: 1; }
html.theme-vt::view-transition-new(root) { animation: none; z-index: 2; }

/* ───────── vanish search placeholder ───────── */
.ph-cycle { position: absolute; left: 44px; top: 50%; translate: 0 -50%; pointer-events: none; color: var(--muted); font-size: 17px; white-space: nowrap; }
.ph-cycle.in { animation: phin 300ms var(--ease-out) both; }
.ph-cycle.out { animation: phout 300ms var(--ease-out) forwards; }
@keyframes phin { from { opacity: 0; transform: translateY(6px); } }
@keyframes phout { to { opacity: 0; transform: translateY(-14px); } }

/* ───────── mobile: palette & modals become bottom sheets, 44px targets ───────── */
@media (max-width: 760px) {
  .scrim { align-items: end; padding-top: 0; }
  .pal { width: 100vw; border-radius: 26px 26px 0 0; border-bottom: 0; animation: sheetIn 420ms var(--ease-drawer); max-height: 88dvh; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); touch-action: pan-y; }
  .pal::before { content: ""; display: block; width: 42px; height: 5px; border-radius: 5px; background: var(--line-2); margin: 8px auto 0; flex: none; }
  .scrim.closing .pal { animation: sheetIn 260ms var(--ease-out) reverse forwards; }
  .pal-list { max-height: none; flex: 1; overscroll-behavior: contain; }
  .pal-foot { display: none; }
  .btn { min-height: 44px; }
  .btn.sm { min-height: 40px; }
  .btn.icon { min-width: 44px; }
  .seg > button { height: 38px; }
  .nav-a { height: 44px; }
  .toasts { left: 12px; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom)); justify-items: stretch; }
  .toast { max-width: none; }
  .tcard { min-height: 64px; }
  .drop { min-height: 240px; padding: 28px 16px; }
  .drop h2 { font-size: 20px; }
  .hero-card { padding: 28px 22px; }
  .tabbar { display: flex; }
}
@keyframes sheetIn { from { transform: translateY(100%); } }
.tcard, .qchip, .btn, .nav-a, .seg > button, .sw { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }

/* mobile bottom tab bar */
.tabbar { display: none; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 600; height: 62px; border-radius: 22px; padding: 6px;
  background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(18px) saturate(1.3); border: 1px solid var(--line-2); box-shadow: var(--sh-3); gap: 4px; }
.tabbar a, .tabbar button { flex: 1; display: grid; place-items: center; gap: 2px; border-radius: 16px; font-size: 10.5px; font-weight: 600; color: var(--muted); transition: color var(--t-fast), background var(--t-fast), transform var(--t-press) var(--ease-out); align-content: center; }
.tabbar a:active, .tabbar button:active { transform: scale(.92); }
.tabbar .on { color: var(--text); background: var(--surface-3); }
.tabbar .on svg { color: var(--accent); }
@media (max-width: 760px) { .view-inner { padding-bottom: 110px; } }
@media (pointer: coarse) { .drop .row > .muted { display: none; } .kbd-hint { display: none; } }
@media (max-width: 760px) { .tabbar { display: flex; } }

/* ═════════ v2: finder, answers, art, layout fixes ═════════ */

/* inputs with a unit never collapse below a usable width */
.input-group { min-width: 0; }
.input-group .input { min-width: 4.5em; flex: 1; }
.input-group .addon { white-space: nowrap; padding: 0 10px; flex: none; }

/* hero "ask" bar */
.ask { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 520px; height: 54px; padding: 0 10px 0 16px; border-radius: 16px;
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--muted); text-align: left; box-shadow: inset 0 1px 2px rgba(0,0,0,.15);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-press) var(--ease-out); position: relative; }
.ask:hover { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ask:active { transform: scale(.985); }
.ask svg.i { color: var(--accent); }
.ask-ph { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.ask kbd { height: 26px; padding: 0 8px; font-size: 12px; }
.hero-card > *:not(.hero-art):not(.corner):not(.tape) { position: relative; z-index: 1; }
.hero-art { position: absolute; right: -18px; top: 18px; width: min(300px, 38%); height: auto; z-index: 0; pointer-events: none; filter: drop-shadow(0 24px 30px rgba(0,0,0,.35)); animation: bob 6s var(--ease-io) infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-1.5deg); } }

/* art images */
img.art { display: block; user-select: none; -webkit-user-drag: none; }
.bento-art { position: absolute; right: -6px; top: -4px; width: 46%; max-width: 150px; height: auto; z-index: 0; pointer-events: none; filter: drop-shadow(0 14px 18px rgba(0,0,0,.28)); transition: transform var(--t-slow) var(--spring); transform: rotate(4deg); }
.bcard:hover .bento-art { transform: rotate(-4deg) translateY(-6px) scale(1.06); }
.bcard .cnt { z-index: 2; background: color-mix(in srgb, var(--surface) 80%, transparent); padding: 4px 6px; border-radius: 7px; }
.bcard.wide .bento-art { max-width: 180px; width: 34%; }
.cat-hero { padding-right: 200px; }
.cat-art { position: absolute; right: 18px; bottom: -18px; width: 190px; height: auto; pointer-events: none; filter: drop-shadow(0 18px 24px rgba(0,0,0,.3)); animation: bob 7s var(--ease-io) infinite; }
.cat-hero .filter { position: relative; z-index: 1; }
.art-empty { padding: 26px 20px 32px; }
.empty-art { width: 150px; height: auto; margin: -6px 0 4px; filter: drop-shadow(0 14px 18px rgba(0,0,0,.25)); animation: bob 6s var(--ease-io) infinite; }
.art-empty .btn { margin-top: 10px; }

/* finder chips */
.finder { display: grid; gap: 10px; }
.finder-row { display: grid; grid-template-columns: 78px minmax(0, 1fr); align-items: start; gap: 10px; }
.finder-k { font: 700 11px/32px var(--f-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.finder-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.finder-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-weight: 600; font-size: 13px; white-space: nowrap; position: relative;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-press) var(--ease-out); }
.finder-chip em { font-style: normal; font: 700 10.5px/1 var(--f-ui); color: var(--muted); background: var(--surface-3); padding: 3px 6px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.finder-chip:hover { border-color: var(--line-2); color: var(--text); }
.finder-chip:active { transform: scale(.94); }
.finder-chip.on { background: var(--accent); border-color: transparent; color: var(--accent-ink); animation: i-pop 380ms var(--spring); }
.finder-chip.on em { background: rgba(0,0,0,.14); color: inherit; }
.finder-chip[disabled] { opacity: .35; pointer-events: none; }
.finder-reset { justify-self: start; display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 4px 8px; border-radius: 8px; }
.finder-reset:hover { color: var(--text); background: var(--surface-2); }
.finder-panel { display: grid; gap: 16px; }
.finder-panel .tgrid:empty { display: none; }
.pal .finder { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.pal .finder.compact .finder-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -14px; padding-right: 14px; mask-image: linear-gradient(90deg, #000 85%, transparent); }
.pal .finder.compact .finder-chips::-webkit-scrollbar { display: none; }
.pal .finder-row { grid-template-columns: 64px minmax(0, 1fr); }

/* palette answer + rows */
.pal-answer { display: flex; align-items: center; gap: 12px; margin: 4px 2px 6px; padding: 12px 14px; border-radius: 14px; font-size: 13px; animation: rise 300ms var(--ease-out) both; }
.pal-answer > div { display: grid; gap: 2px; min-width: 0; }
.pal-answer b { font-size: 14px; color: var(--text); }
.pal-answer span { color: var(--text-2); }
.pal-answer.yes { background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent); }
.pal-answer.no { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.ans-ic { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: var(--ok); color: #fff; flex: none; }
.ans-art { width: 64px; height: auto; flex: none; }
.req-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--accent); font-weight: 700; font-size: 13px; }
.pal-item .tx { display: grid; min-width: 0; flex: 1; }
.pal-item .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-item .cat-tag { font: 600 11px/1 var(--f-ui); color: var(--muted); white-space: nowrap; }
.pal-item .enter { margin-left: 4px; flex: none; }
.pal-x { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--muted); flex: none; }
.pal-in input { min-width: 0; }

/* tool header in the page body */
.tool-head { margin: -4px 0 18px; }
.tool-head p { margin: 0; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.tool-h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.local-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ok); }
.local-note i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* top bar never overflows: title truncates, actions never shrink */
.topbar { min-width: 0; }
.crumbs { flex: 1 1 auto; }
.top-actions { flex: none; gap: 4px; }
.crumbs > div { min-width: 0; }

/* tablet: sidebar collapses to icons so tools get the width */
@media (min-width: 761px) and (max-width: 1180px) {
  .app:not(.pinned) { --side: 72px; }
  .app:not(.pinned) :is(.brand-name, .side-label, .nav-text, .nav-count, .nav-chev, .kbd-hint, .sub) { display: none !important; }
  .app:not(.pinned) .brand { flex-direction: column; gap: 10px; }
  .app:not(.pinned) .side-toggle { margin: 0; }
  .app:not(.pinned) .nav-a { justify-content: center; padding: 0; }
  .app:not(.pinned) .search-btn { justify-content: center; padding: 0; }
  .hide-t { display: none !important; }
  .view-inner { padding: 22px 22px 80px; }
}
.collapsed .nav-a { justify-content: center; padding: 0; }
.collapsed .search-btn { justify-content: center; padding: 0; }

@media (max-width: 760px) {
  .topbar { height: 56px; gap: 6px; padding: 0 8px 0 6px; }
  .crumbs { gap: 8px; }
  .crumbs .chip-ic { width: 30px; height: 30px; border-radius: 9px; }
  .crumb-cat { font-size: 11px; }
  .crumb-title { font-size: 15px; }
  .top-actions .btn.icon { width: 40px; min-width: 40px; }
  /* tool pages: the big title lives in the page, the bar shows the category */
  .tool-h1 { position: static; width: auto; height: auto; clip: auto; white-space: normal; overflow: visible; margin: 0 0 6px; font: 700 28px/1.08 var(--f-display); letter-spacing: .005em; overflow-wrap: anywhere; }
  .hero-art { width: 150px; right: -14px; top: -6px; opacity: .95; }
  .hero h1 { font-size: clamp(38px, 11vw, 52px); margin-top: 14px; }
  .hero-card .eyebrow { max-width: 62%; }
  .ask { height: 50px; }
  .ask-ph { font-size: 14px; }
  .cat-hero { padding: 24px 20px; padding-right: 20px; }
  .cat-art { width: 120px; right: 6px; top: 6px; bottom: auto; }
  .cat-hero h1 { font-size: 36px; }
  .bento-art { width: 120px; max-width: 120px; }
  .bcard { min-height: 160px; }
  .finder-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .finder-k { line-height: 1; }
  .finder-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 2px 18px; }
  .finder-chips::-webkit-scrollbar { display: none; }
  .finder-chip { height: 38px; padding: 0 13px; }
  .pal .finder-row { grid-template-columns: minmax(0, 1fr); }
  .pal .finder.compact .finder-chips { margin: 0 -14px; padding: 2px 14px; }
  .pal-in { padding: 0 6px 0 16px; }
  .pal-item { padding: 11px 10px; }
  .set-row { grid-template-columns: 1fr; gap: 12px; }
  .set-row > :last-child { justify-self: start; max-width: 100%; }
  .sect-h { flex-wrap: wrap; row-gap: 4px; }
  .sect-h h2 { font-size: 23px; }
  .hero-counter { gap: 18px; }
}
@media (max-width: 760px) { body:has(.tool-h1) .crumb-title { display: none; } }
@media (max-width: 760px) { body:has(.tool-h1) .crumb-cat { font: 600 15px/1.2 var(--f-ui); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }
.app.pinned { box-shadow: none; }
@media (max-width: 760px) {
  .hero-card .tape { display: none; }
  .hero-art { width: 122px; top: 10px; right: -6px; }
  .hero-card .eyebrow { max-width: calc(100% - 120px); line-height: 1.4; }
}

/* ── v3: Solar duotone tool icons (Iconify) on tinted squircles ── */
.chip-ic { position: relative; background: color-mix(in oklab, var(--cat, var(--surface-3)) 17%, var(--surface)); color: var(--cat, var(--text)); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--cat, var(--line)) 22%, transparent); }
[data-theme=light] .chip-ic { color: color-mix(in oklab, var(--cat) 62%, #000); background: color-mix(in oklab, var(--cat) 26%, #fff); }
.chip-ic svg.si { width: 64%; height: 64%; display: block; }
.chip-fmt { position: absolute; right: -5px; bottom: -4px; padding: 1px 3px 0; border-radius: 4px; background: var(--text); color: var(--bg); font: 700 7px/1.25 var(--f-mono, ui-monospace, monospace); letter-spacing: .02em; box-shadow: 0 0 0 1.5px var(--bg); }
.tcard .chip-fmt, .bcard .chip-fmt, .crumbs .chip-fmt { font-size: 8px; right: -6px; bottom: -5px; padding: 1px 4px 0; }
:is(.btn,.nav-a,.tcard,.qchip,.bcard,.search-btn,.pal-item,.more,.menu a,.tabbar a,.tabbar button):hover .chip-ic svg.si { animation: i-bounce 520ms var(--spring); }

/* ═════════ v4: two-tap finder, navbar, compact browse ═════════ */
.qf { position: relative; display: grid; gap: 22px; padding: 22px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); overflow: hidden; }
.qf::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 160px; background: radial-gradient(60% 100% at 0% 0%, var(--accent-soft), transparent 70%); pointer-events: none; }
.qf > * { position: relative; }
.qf-sentence { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font: 600 clamp(19px, 2.4vw, 26px)/1.25 var(--f-display); letter-spacing: -.01em; color: var(--text-2); }
.qf-pill { display: inline-flex; align-items: center; gap: 7px; height: 1.6em; padding: 0 .55em; border-radius: 12px; border: 1.5px dashed var(--line-2); color: var(--muted); font: inherit; transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-press) var(--ease-out); }
.qf-pill:hover { border-color: var(--accent); color: var(--text); }
.qf-pill:active { transform: scale(.96); }
.qf-pill.set { border: 1.5px solid transparent; background: var(--accent); color: var(--accent-ink); }
.qf-pill.set svg.si { width: .85em; height: .85em; }
.qf-pill svg.i { width: .62em; height: .62em; opacity: .7; }
.qf-pill.pop { animation: i-pop 420ms var(--spring); }
.qf-steps { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; }
.qf-step { display: grid; gap: 12px; align-content: start; }
.qf-k { display: flex; align-items: center; gap: 8px; font: 700 12px/1 var(--f-ui); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.qf-k i { font-style: normal; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 7px; background: var(--surface-3); color: var(--text); font: 700 11px/1 var(--f-mono); letter-spacing: 0; }
.qf-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.qf-tile { position: relative; display: grid; justify-items: center; gap: 7px; padding: 12px 4px 10px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-weight: 600; font-size: 12.5px; text-align: center;
  transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-press) var(--ease-out), opacity var(--t-fast); }
.qf-tile:hover { border-color: var(--line-2); color: var(--text); background: color-mix(in oklab, var(--cat) 7%, var(--surface-2)); }
.qf-tile:active { transform: scale(.95); }
.qf-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in oklab, var(--cat) 17%, var(--surface)); color: var(--cat); transition: transform var(--t-med) var(--spring); }
.qf-ic svg.si { width: 24px; height: 24px; }
.qf-tile:hover .qf-ic { transform: translateY(-2px) rotate(-4deg); }
.qf-tl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.qf-tile em, .qf-verb em { font-style: normal; font: 700 10.5px/1 var(--f-ui); color: var(--muted); font-variant-numeric: tabular-nums; }
.qf-tile em { position: absolute; top: 7px; right: 8px; }
.qf-tile.on { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 12%, var(--surface-2)); color: var(--text); box-shadow: 0 0 0 3px var(--accent-soft); }
.qf-tile.on .qf-ic { transform: scale(1.06); }
.qf-tile.on em { color: var(--accent); }
.qf-tile[disabled] { opacity: .32; pointer-events: none; }
.qf-verbs { display: flex; flex-wrap: wrap; gap: 7px; align-content: start; }
.qf-verb { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px 0 14px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-weight: 600; font-size: 13.5px; white-space: nowrap;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-press) var(--ease-out); }
.qf-verb:hover { border-color: var(--line-2); color: var(--text); }
.qf-verb:active { transform: scale(.95); }
.qf-verb.on { background: var(--text); color: var(--bg); border-color: transparent; }
.qf-verb.on em { color: inherit; opacity: .6; }
.qf-out { border-top: 1px dashed var(--line-2); padding-top: 18px; display: grid; gap: 12px; }
.qf-out-h { display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); }
.qf-out-h b { color: var(--text); font-size: 15px; }
.qf-out-h .btn { margin-left: auto; }
.qf-hint { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; }
.qf-hint svg { color: var(--accent); }
@media (max-width: 1100px) { .qf-steps { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .qf { padding: 16px 14px; gap: 18px; border-radius: 22px; }
  .qf-sentence { font-size: 19px; }
  .qf-tiles { gap: 6px; }
  .qf-tile { padding: 10px 2px 8px; font-size: 11.5px; border-radius: 14px; gap: 6px; }
  .qf-ic { width: 36px; height: 36px; border-radius: 12px; }
  .qf-ic svg.si { width: 21px; height: 21px; }
  .qf-tile em { top: 5px; right: 6px; font-size: 9.5px; }
  .qf-verb { height: 38px; font-size: 13.5px; }
}

/* top bar */
.top-brand { display: none; align-items: center; gap: 9px; }
.top-brand .brand-mark { width: 30px; height: 30px; }
.top-brand .brand-name { font-size: 18px; }
.top-actions { gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.top-actions .btn.icon { border-radius: 10px; border-color: transparent; background: transparent; }
.top-actions .btn.icon:hover { background: var(--surface-3); }
@media (max-width: 760px) {
  .topbar { height: 58px; background: color-mix(in srgb, var(--bg) 78%, transparent); }
  .menu-btn { border-color: transparent; background: transparent; }
}

/* bottom tab bar: sliding indicator + raised search */
.tabbar { height: 66px; padding: 7px; gap: 2px; border-radius: 26px; align-items: center; background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.18), inset 0 1px 0 color-mix(in srgb, #fff 8%, transparent); }
.tabbar .tb-it { position: relative; z-index: 1; height: 100%; display: grid; place-items: center; align-content: center; gap: 3px; border-radius: 19px; font-size: 10.5px; font-weight: 600; color: var(--muted); background: none; }
.tabbar .tb-it svg { width: 21px; height: 21px; transition: transform var(--t-med) var(--spring), color var(--t-fast); }
.tabbar .tb-it.on { color: var(--text); background: none; }
.tabbar .tb-it.on svg { color: var(--accent); transform: translateY(-1px) scale(1.08); }
.tb-ind { position: absolute; left: 0; top: 7px; bottom: 7px; width: 0; border-radius: 19px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line); transition: transform 420ms var(--spring), width 300ms var(--ease-out), opacity var(--t-fast); pointer-events: none; }
.tabbar .tb-search { flex: 0 0 64px; height: 100%; display: grid; place-items: center; background: none; }
.tb-search > span { width: 50px; height: 50px; border-radius: 18px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 18px -6px color-mix(in srgb, var(--accent) 70%, transparent), inset 0 1px 0 rgba(255,255,255,.25); transition: transform var(--t-press) var(--ease-out); }
.tb-search svg { width: 22px; height: 22px; }
.tabbar .tb-search:active { transform: none; }
.tb-search:active > span { transform: scale(.9); }

/* browse: compact two-column cards on phones (it now sits near the top) */
.bc-n { display: none; }
@media (max-width: 760px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .bcard, .bcard.wide { grid-column: auto; min-height: 0; aspect-ratio: 1.25; padding: 13px 14px; border-radius: 20px; justify-content: space-between; }
  .bcard::before { width: 160px; height: 160px; right: -60px; bottom: -70px; }
  .bcard h3 { font-size: 17px; margin: 0; }
  .bcard p, .bcard .row, .bcard .cnt { display: none; }
  .bc-n { display: block; margin-top: 3px; font: 600 11.5px/1 var(--f-ui); color: var(--muted); }
  .bcard .chip-ic { width: 36px; height: 36px; border-radius: 11px; }
  .bento-art, .bcard.wide .bento-art { width: 68px; max-width: 68px; right: 6px; top: 6px; transform: rotate(6deg); }
  .bcard > div { position: relative; z-index: 1; }
  .top-actions { padding: 3px; border-radius: 13px; }
  .top-actions .btn.icon { width: 34px; height: 34px; min-height: 0; }
}
.qf-verb.more { border-style: dashed; color: var(--muted); background: transparent; }
@media (max-width: 760px) { .top-brand.mob-only { display: inline-flex; } }

/* ═════════ v5: logo, creator credit, feedback ═════════ */
.brand-mark { background: none; box-shadow: none; border-radius: 9px; overflow: visible; }
.brand-mark img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,.28)); }
.brand-name b { position: relative; }
.brand-name b::after { content: ""; position: absolute; left: -1px; right: -2px; top: 54%; height: 2px; border-radius: 2px; background: currentColor; opacity: .55; transform: scaleX(0); transform-origin: left; transition: transform var(--t-med) var(--ease-out); }
.brand:hover .brand-name b::after, .top-brand:hover .brand-name b::after { transform: scaleX(1); }

.soc { display: flex; flex-wrap: wrap; gap: 6px; }
.soc-a { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-weight: 600; font-size: 13px; transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-press) var(--ease-out); }
.soc-a:hover { color: var(--text); border-color: var(--line-2); background: var(--surface-3); }
.soc-a:active { transform: scale(.95); }
.soc-ic { display: grid; place-items: center; width: 16px; height: 16px; }
.soc-ic svg { width: 100%; height: 100%; }
.soc.sm { gap: 2px; }
.soc.sm .soc-a { width: 28px; height: 28px; padding: 0; justify-content: center; background: none; border-color: transparent; color: var(--muted); }
.soc.sm .soc-a:hover { color: var(--text); background: var(--surface-2); }
.soc.sm .soc-ic { width: 14px; height: 14px; }

.made-by { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; padding: 8px 4px 2px 10px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); }
.made-by a { color: var(--text-2); font-weight: 600; }
.made-by > span a:hover { color: var(--accent); }
.collapsed .made-by { display: none; }
@media (min-width: 761px) and (max-width: 1180px) { .app:not(.pinned) .made-by { display: none; } }
.side-foot .nav-a { width: 100%; text-align: left; }

.creator { margin-top: 44px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; padding: 24px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; }
.creator::before { content: ""; position: absolute; width: 320px; height: 320px; left: -120px; bottom: -200px; border-radius: 50%; background: var(--accent); opacity: .08; filter: blur(10px); pointer-events: none; }
.creator-who { display: flex; gap: 16px; align-items: flex-start; position: relative; }
.creator-av { flex: none; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font: 700 20px/1 var(--f-display); color: var(--accent-ink); background: linear-gradient(145deg, #efc797, #c0844c); box-shadow: inset 0 0 0 1px rgba(255,255,255,.3), var(--sh-1); }
.creator-k { font: 700 11px/1 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.creator-n { font: 700 26px/1.1 var(--f-display); margin: 6px 0 8px; letter-spacing: -.01em; }
.creator-who p { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; max-width: 52ch; }
.creator-act { display: grid; gap: 8px; align-content: start; padding-left: 18px; border-left: 1px dashed var(--line-2); position: relative; }
.creator-act .creator-k { margin-bottom: 4px; }
.creator-act .btn { justify-content: flex-start; }
.creator-repo { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.creator-repo:hover { color: var(--text); }
.creator-repo .soc-ic { width: 15px; height: 15px; }
@media (max-width: 760px) {
  .creator { grid-template-columns: 1fr; padding: 18px 16px; margin-top: 32px; }
  .creator-act { padding: 16px 0 0; border-left: 0; border-top: 1px dashed var(--line-2); }
  .creator-act .btn { justify-content: center; }
  .creator-n { font-size: 22px; }
  .creator-av { width: 48px; height: 48px; border-radius: 15px; font-size: 17px; }
}

.tool-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 28px; padding-top: 14px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 13px; }
.tool-foot > span { margin-right: auto; }
@media (max-width: 760px) { .tool-foot > span { flex-basis: 100%; } }

.fb { gap: 14px; }
.fb-lead { margin: -4px 0 0; font-size: 13.5px; }
.fb-env { list-style: none; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 5px; font-size: 12.5px; color: var(--text-2); }
.fb-env li { display: flex; gap: 10px; min-width: 0; }
.fb-env b { flex: 0 0 64px; color: var(--muted); font-weight: 600; }
.fb-send { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding-top: 4px; }
.fb-send .hint { margin: 0; }
@media (max-width: 760px) { .fb-send { flex-direction: column-reverse; align-items: stretch; } .fb-send .btn { justify-content: center; } }
.req-link { background: none; border: 0; padding: 0; cursor: pointer; }
.creator-av.img { object-fit: cover; object-position: 50% 8%; padding: 4px 4px 0; display: block; }
a.creator-n { display: inline-block; }
a.creator-n:hover { color: var(--accent); }
.brand-mark img { border-radius: 9px; }
.top-brand .brand-mark img { border-radius: 9px; }
/* mascot: the hound naps in the hero, breathing slowly */
.hero-art.mascot { top: auto; bottom: 8px; right: 6px; width: min(190px, 30%); transform-origin: 50% 90%; animation: nap-breathe 4.2s var(--ease-io) infinite; }
/* the hound naps beside the stats, so the headline never runs under it */
.hero-card:has(.mascot) .ask { max-width: calc(100% - min(150px, 24%)); }
.hero-card:has(.mascot) .tape { display: none; }
@keyframes nap-breathe { 50% { transform: scale(1.025, 1.04); } }
@media (max-width: 760px) { .hero-art.mascot { width: 88px; top: auto; bottom: 12px; right: 12px; } .hero-card:has(.mascot) .ask { max-width: none; } }
@media (prefers-reduced-motion: reduce) { .hero-art.mascot { animation: none; } }
.made-by { flex-direction: column; align-items: flex-start; gap: 4px; padding-left: 10px; }
.made-by .soc.sm { margin-left: -6px; flex-wrap: nowrap; }
/* creator avatar: the full hooded figure in a circle on dark, thin tan ring (as on tools.aryanutkarsh.com) */
.creator-av.img { border-radius: 50%; padding: 0; object-fit: cover; object-position: 50% 50%; background: #1e1c1a; border: 1px solid color-mix(in srgb, #d4a574 50%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, #d4a574 10%, transparent), var(--sh-1); width: 64px; height: 64px; }
@media (max-width: 760px) { .creator-av.img { width: 56px; height: 56px; } }
.creator-n .vbadge { display: inline-block; width: .62em; height: .62em; margin-left: .25em; vertical-align: .05em; color: #3b9bf5; }
