/* PanDev Tools — design system
   Fog / Paper / Navy ink / Ultramarine. One family (Mona Sans), width axis for display. */
:root {
  --bg: #edeff3;
  --bg-2: #e3e7ed;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --ink: #121a2e;
  --ink-2: #3f4859;
  --muted: #6b7385;
  --line: #d9dde5;
  --line-2: #c3c9d4;
  --accent: #2438f0;
  --accent-hover: #1a2bd1;
  --accent-ink: #ffffff;
  --accent-soft: #e3e6fe;
  --ok: #0f7b52;
  --warn: #a8670c;
  --err: #cc2b3b;
  --c-pdf: #d93f3f;
  --c-youtube: #f2601d;
  --c-audio: #8b5cf6;
  --c-image: #0e9f8e;
  --c-video: #2f80ed;
  --c-text: #c9a227;
  --c-dev: #3f8f3f;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(18, 26, 46, .06), 0 12px 32px -18px rgba(18, 26, 46, .22);
  --shadow-pop: 0 2px 6px rgba(18, 26, 46, .08), 0 30px 80px -24px rgba(18, 26, 46, .45);
  --font: "Mona Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Mona Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0f1e; --bg-2: #121a31; --surface: #10172a; --surface-2: #0c1224;
    --ink: #e9edf7; --ink-2: #b9c1d4; --muted: #8a93a8; --line: #1f2840; --line-2: #2d3854;
    --accent: #8593ff; --accent-hover: #a3aeff; --accent-ink: #0a0f1e; --accent-soft: #1a2150;
    --ok: #3ccf91; --warn: #f0b04a; --err: #ff6b78;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -20px rgba(0, 0, 0, .8);
    --shadow-pop: 0 2px 8px rgba(0, 0, 0, .5), 0 40px 90px -20px rgba(0, 0, 0, .9);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0f1e; --bg-2: #121a31; --surface: #10172a; --surface-2: #0c1224;
  --ink: #e9edf7; --ink-2: #b9c1d4; --muted: #8a93a8; --line: #1f2840; --line-2: #2d3854;
  --accent: #8593ff; --accent-hover: #a3aeff; --accent-ink: #0a0f1e; --accent-soft: #1a2150;
  --ok: #3ccf91; --warn: #f0b04a; --err: #ff6b78;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -20px rgba(0, 0, 0, .8);
  --shadow-pop: 0 2px 8px rgba(0, 0, 0, .5), 0 40px 90px -20px rgba(0, 0, 0, .9);
  color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.55 var(--font); font-stretch: 100%;
  font-feature-settings: "ss01", "cv11"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: inherit; }
img, canvas, video { max-width: 100%; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand-mark { width: 28px; height: 28px; display: block; }
.brand-word { font-family: var(--font-display); font-weight: 800; font-stretch: 125%; font-size: 17px; letter-spacing: -.01em; }
.brand-word span { font-weight: 500; color: var(--muted); }
.search-trigger {
  margin-left: auto; width: min(380px, 100%); height: 40px; display: flex; align-items: center; gap: 10px;
  padding: 0 8px 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); cursor: pointer; font-size: 14.5px; text-align: left; transition: border-color .15s, box-shadow .15s;
}
.search-trigger:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.search-trigger .st-label { flex: 1; }
.icon-btn {
  width: 40px; height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); display: grid; place-items: center; cursor: pointer; flex: none; font-size: 18px; transition: border-color .15s, transform .08s;
}
.icon-btn:hover { border-color: var(--line-2); }
.icon-btn:active { transform: scale(.96); }
kbd {
  font: 500 12px/1 var(--font); color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 4px 6px; white-space: nowrap;
}

/* ---------- Home: hero ---------- */
.hero { padding-top: 72px; padding-bottom: 40px; }
.hero h1 {
  font-family: var(--font-display); font-weight: 800; font-stretch: 122%;
  font-size: clamp(42px, 7.4vw, 100px); line-height: .9; letter-spacing: -.045em;
  margin: 0 0 28px; max-width: 11.5ch; text-wrap: balance;
}
.hero .lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: var(--ink-2); max-width: 54ch; margin: 0 0 36px; text-wrap: pretty; }
@media (prefers-reduced-motion: no-preference) {
  .hero.intro h1 { animation: widen 1.1s var(--ease) both; }
  .hero.intro .lead, .hero.intro .drop-hero { animation: settle .8s .35s var(--ease) both; }
}
@keyframes widen { from { font-stretch: 75%; letter-spacing: -.02em; opacity: 0; } 30% { opacity: 1; } to { font-stretch: 122%; } }
@keyframes settle { from { opacity: 0; transform: translateY(10px); } }

/* Drop-anything surface */
.drop-hero {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px;
  padding: 26px 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); cursor: pointer; transition: border-color .2s, box-shadow .2s, background .2s;
}
.drop-hero::after {
  content: ""; position: absolute; inset: 8px; border-radius: 12px; border: 1.5px dashed transparent; pointer-events: none; transition: border-color .2s;
}
.drop-hero:hover { border-color: var(--line-2); }
.drop-hero.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface)); }
.drop-hero.over::after { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.drop-hero .dh-glyphs { display: flex; }
.drop-hero .dh-glyphs span {
  width: 46px; height: 56px; border-radius: 8px 14px 8px 8px; display: grid; place-items: end start; padding: 6px 7px;
  font: 700 10px/1 var(--font); font-stretch: 110%; color: #fff; margin-left: -9px; box-shadow: 0 0 0 3px var(--surface);
  transform: rotate(var(--r, 0deg)); transition: transform .3s var(--ease);
}
.drop-hero .dh-glyphs span:first-child { margin-left: 0; }
.drop-hero:hover .dh-glyphs span, .drop-hero.over .dh-glyphs span { transform: rotate(calc(var(--r, 0deg) * 1.8)) translateY(-3px); }
.drop-hero .dh-title { display: block; margin: 0 0 3px; font-size: 19px; font-weight: 650; letter-spacing: -.01em; }
.drop-hero .dh-sub { display: block; margin: 0; color: var(--muted); font-size: 14.5px; }
.drop-hero input { display: none; }

.drop-result { margin-top: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.drop-result header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drop-result header b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-result header .muted { white-space: nowrap; }
.drop-result header .btn { margin-left: auto; }
.drop-result .dr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.drop-result .dr-list a {
  display: flex; gap: 12px; align-items: center; padding: 14px 20px; text-decoration: none;
  border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); transition: background .15s;
}
.drop-result .dr-list a:hover, .drop-result .dr-list a:focus-visible { background: var(--surface-2); outline: none; }
.drop-result .dr-list a b { font-weight: 600; font-size: 15px; display: block; }
.drop-result .dr-list a small { color: var(--muted); font-size: 13px; display: block; line-height: 1.35; }
.drop-result .dr-list .ri { color: var(--c); font-size: 18px; display: grid; flex: none; }

.quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; }
.quick > span { font-size: 13.5px; color: var(--muted); margin-right: 4px; }
.quick a {
  text-decoration: none; font-size: 14px; font-weight: 500; padding: 6px 12px 6px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 7px; transition: border-color .15s;
}
.quick a:hover { border-color: var(--line-2); }
.dot { width: 8px; height: 8px; border-radius: 3px; background: var(--c, var(--ink)); flex: none; display: inline-block; }

/* ---------- Home: catalog index ---------- */
.catalog { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 56px; padding-top: 48px; padding-bottom: 56px; }
.rail { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; display: flex; flex-direction: column; gap: 2px; }
.rail-title { font-size: 13.5px; color: var(--muted); margin: 0 0 10px 12px; }
.rail a {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 9px; text-decoration: none;
  font-size: 15px; font-weight: 500; color: var(--ink-2); transition: background .15s, color .15s;
}
.rail a:hover { background: var(--surface); color: var(--ink); }
.rail a.active { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.rail a .n { margin-left: auto; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

.group + .group { margin-top: 56px; }
.group-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.group-head h2 { margin: 0; font-family: var(--font-display); font-weight: 750; font-stretch: 118%; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.03em; line-height: 1.05; }
.group-head h2 a { text-decoration: none; }
.group-head h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.group-head p { margin: 0; color: var(--muted); font-size: 15px; }
.rows { border-top: 1px solid var(--line); }
.row-link {
  display: grid; grid-template-columns: 28px minmax(170px, 250px) minmax(0, 1fr) auto; align-items: center; gap: 0 14px;
  padding: 13px 12px; margin: 0 -12px; border-bottom: 1px solid var(--line); text-decoration: none; border-radius: 0;
  transition: background .15s;
}
.row-link:hover, .row-link:focus-visible { background: var(--surface); outline: none; border-radius: 10px; border-bottom-color: transparent; box-shadow: 0 1px 0 var(--line); }
.row-link .ri { color: var(--c, var(--ink)); font-size: 18px; display: grid; place-items: center; }
.row-link .rn { font-weight: 600; font-size: 15.5px; letter-spacing: -.005em; }
.row-link .rd { color: var(--muted); font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-link .rt { font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 999px; }
.empty { padding: 48px 0; color: var(--muted); }
.empty b { color: var(--ink); }

/* Promise strip */
.promise { border-top: 1px solid var(--line); padding-top: 40px; padding-bottom: 64px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.promise h3 { margin: 0 0 8px; font-size: 17px; font-weight: 650; letter-spacing: -.01em; display: flex; gap: 10px; align-items: center; }
.promise h3 i, .promise h3 svg { color: var(--accent); }
.promise p { margin: 0; color: var(--muted); font-size: 15px; max-width: 38ch; }

/* ---------- Tool page ---------- */
.tool-page { padding-top: 36px; padding-bottom: 72px; }
.tool-top { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.crumbs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.crumbs a { text-decoration: none; display: inline-flex; align-items: center; gap: 7px; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { opacity: .5; }
.tool-top .btn { margin-left: auto; }
.pin-btn[aria-pressed="true"] { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--accent-soft); }
.pin-btn[aria-pressed="true"] svg { fill: currentColor; }
.tool-head { margin: 0 0 28px; max-width: 760px; }
.tool-head h1 {
  font-family: var(--font-display); font-weight: 800; font-stretch: 118%;
  font-size: clamp(34px, 5vw, 60px); letter-spacing: -.04em; line-height: .98; margin: 0 0 14px; text-wrap: balance;
}
.tool-head p { margin: 0; color: var(--ink-2); font-size: 17.5px; line-height: 1.5; max-width: 60ch; }
.privacy-note { display: inline-flex; gap: 7px; align-items: center; font-size: 13.5px; color: var(--muted); margin-top: 14px; }
.privacy-note svg, .privacy-note i { color: var(--ok); }
.tool-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.tool-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.tool-nav a { text-decoration: none; display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid transparent; max-width: 48%; transition: border-color .15s, background .15s; }
.tool-nav a:hover { border-color: var(--line); background: var(--surface); }
.tool-nav a small { color: var(--muted); font-size: 13px; }
.tool-nav a b { font-weight: 600; }
.tool-nav a.next { text-align: right; margin-left: auto; }
.related { margin-top: 56px; }
.related h2 { font-family: var(--font-display); font-weight: 750; font-stretch: 118%; font-size: 24px; letter-spacing: -.025em; margin: 0 0 12px; }
.related .rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; border-top: 0; }
.related .row-link { grid-template-columns: 28px minmax(0, 1fr); margin: 0; border-top: 1px solid var(--line); border-bottom: 0; }
.related .row-link .rd { grid-column: 2; font-size: 13.5px; }

/* ---------- Form controls (shared by every tool) ---------- */
input[type="text"], input[type="number"], input[type="url"], input[type="search"], input[type="password"], input[type="email"], input[type="tel"],
input[type="date"], input[type="time"], input[type="datetime-local"], input:not([type]), select, textarea {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 12px; min-height: 40px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s; min-width: 0;
}
input:hover, select:hover, textarea:hover { border-color: var(--line-2); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
textarea { width: 100%; min-height: 170px; resize: vertical; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.6; }
input[type="color"] { padding: 3px; height: 40px; width: 52px; cursor: pointer; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
input[type="range"] { accent-color: var(--accent); width: 100%; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 17px; height: 17px; cursor: pointer; }
select {
  cursor: pointer; appearance: none; -webkit-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='%236b7385' stroke-width='2.4' 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;
}
label { font-size: 13.5px; font-weight: 550; color: var(--ink-2); }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > input, .field > select, .field > textarea { width: 100%; }
.field .hint { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 450; color: var(--ink); cursor: pointer; }
.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.row > .field { flex: 1 1 160px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.spacer { height: 18px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }

.btn {
  font: 600 14.5px/1 var(--font); height: 40px; padding: 0 16px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; text-decoration: none;
  box-shadow: 0 1px 1px rgba(18, 26, 46, .05); transition: background .15s, border-color .15s, box-shadow .15s, transform .08s var(--ease);
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px) scale(.985); box-shadow: none; }
.btn.primary {
  background: var(--accent); border-color: var(--accent-hover); color: var(--accent-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 1px 2px rgba(18, 26, 46, .2), 0 6px 16px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn.primary:hover { background: var(--accent-hover); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13.5px; border-radius: 8px; }
.btn.danger { color: var(--err); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn svg { width: 1.1em; height: 1.1em; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Dropzone (inside tools) */
.dropzone {
  position: relative; border: 1.5px dashed var(--line-2); border-radius: 14px; background: var(--surface-2);
  padding: 40px 20px; text-align: center; cursor: pointer; transition: border-color .2s, background .2s;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.dropzone:hover { border-color: var(--muted); }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.handoff { animation: handoff 1s var(--ease); }
@keyframes handoff { 0% { border-color: var(--accent); background: var(--accent-soft); } }
.dropzone .dz-ic {
  width: 48px; height: 48px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--accent); font-size: 21px; margin-bottom: 6px; box-shadow: var(--shadow);
  transition: transform .25s var(--ease);
}
.dropzone:hover .dz-ic, .dropzone.over .dz-ic { transform: translateY(-3px); }
.dropzone strong { font-size: 16px; font-weight: 600; }
.dropzone span { font-size: 13.5px; color: var(--muted); }
.dropzone input { display: none; }

/* File list */
.file-list { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.file-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.file-item .fi-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 500; }
.file-item .fi-meta { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.file-item.dragging { opacity: .5; }
.file-item .handle { cursor: grab; color: var(--muted); }

/* Output & data */
.output { margin-top: 20px; }
.output:empty { display: none; }
.result { border: 1px solid var(--line); background: var(--surface-2); border-radius: 14px; padding: 16px; }
.result-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.small { font-size: 13.5px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.stat { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface-2); }
.stat b { display: block; font-family: var(--font-display); font-weight: 750; font-stretch: 112%; font-size: 26px; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.thumbs figure { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.thumbs figure img, .thumbs figure canvas { display: block; width: 100%; height: auto; }
.thumbs figcaption { font-size: 12.5px; padding: 7px 9px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 13.5px; font-weight: 500; padding: 5px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, background .15s; }
.chip:hover { border-color: var(--line-2); }
.progress { height: 6px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .2s var(--ease); }
.wave { width: 100%; height: 120px; display: block; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.checker { background-color: #fff; background-image: linear-gradient(45deg, #e8e8e8 25%, transparent 25%), linear-gradient(-45deg, #e8e8e8 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e8e8e8 75%), linear-gradient(-45deg, transparent 75%, #e8e8e8 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.big-readout { font-family: var(--font-display); font-size: clamp(52px, 10vw, 104px); font-weight: 800; font-stretch: 115%; letter-spacing: -.05em; line-height: 1; text-align: center; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pill.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.pill.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.pill.err { background: color-mix(in srgb, var(--err) 14%, transparent); color: var(--err); }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.data th { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ---------- Command palette ---------- */
.palette-backdrop {
  position: fixed; inset: 0; z-index: 90; background: color-mix(in srgb, var(--ink) 30%, transparent);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px;
  animation: fade .16s ease;
}
.palette {
  width: min(640px, 100%); max-height: 70vh; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-pop);
  animation: pop .2s var(--ease);
}
.palette-input { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-input input { flex: 1; border: 0 !important; background: transparent !important; box-shadow: none !important; height: 58px; font-size: 17px; padding: 0; }
.palette-list { overflow-y: auto; padding: 8px; overscroll-behavior: contain; }
.palette-list .pl-group { font-size: 12.5px; color: var(--muted); padding: 10px 12px 6px; }
.palette-list a { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; text-decoration: none; }
.palette-list a .pn { font-weight: 550; }
.palette-list a .pd { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-list a .pc { font-size: 12.5px; color: var(--muted); }
.palette-list a .pi { color: var(--c); font-size: 17px; display: grid; place-items: center; }
.palette-list a[aria-selected="true"] { background: var(--accent-soft); }
.palette-list a[aria-selected="true"] .pn { color: var(--ink); }
.palette-empty { padding: 28px 16px; color: var(--muted); text-align: center; }
.palette-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); background: var(--surface-2); }
.palette-foot span { display: inline-flex; gap: 6px; align-items: center; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.98); } }

/* ---------- Toasts ---------- */
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 12px; font-size: 14.5px; font-weight: 500; box-shadow: var(--shadow-pop); animation: toast-in .28s var(--ease); max-width: 90vw; }
.toast.err { background: var(--err); color: #fff; }
.toast.ok { background: var(--ink); color: var(--bg); }
.toast.ok::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 9px; vertical-align: 1px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }

/* ---------- Footer ---------- */
.site-footer { margin-top: auto; border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-direction: column; gap: 18px; }
.footer-cats { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-cats a { color: var(--ink-2); font-weight: 500; }
.footer-meta { display: flex; gap: 8px 28px; justify-content: space-between; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- View transitions ---------- */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: .14s ease both vt-out; }
  ::view-transition-new(root) { animation: .22s var(--ease) both vt-in; }
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* ---------- Pre-rendered page parts ---------- */
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 200; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; transition: top .15s; }
.skip-link:focus { top: 12px; }
.tool-loading { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 220px; color: var(--muted); font-size: 15px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.seo-article { max-width: 760px; margin-top: 64px; }
.seo-article section + section { margin-top: 48px; }
.seo-article h2 { font-family: var(--font-display); font-weight: 750; font-stretch: 115%; font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -.025em; line-height: 1.15; margin: 0 0 16px; text-wrap: balance; }
.seo-article p { color: var(--ink-2); font-size: 16.5px; line-height: 1.65; margin: 0 0 14px; max-width: 68ch; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 2px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); font-size: 16px; color: var(--ink-2); line-height: 1.55; }
.steps li::before { content: counter(step); font-family: var(--font-display); font-weight: 750; font-stretch: 112%; font-size: 15px; color: var(--accent); width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); display: grid; place-items: center; align-self: start; }
.features dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 0; }
.features dl > div { padding: 14px 0; border-top: 1px solid var(--line); }
.features dt { font-weight: 650; font-size: 15.5px; margin-bottom: 4px; }
.features dd { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 36px 16px 0; font-weight: 600; font-size: 16px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { margin: -4px 0 18px; font-size: 15.5px; }
.cat-page { padding-top: 36px; padding-bottom: 72px; }
.cat-head { margin-top: 22px; }
.cat-rows { border-top: 1px solid var(--line); }
.home-faq { padding-bottom: 72px; }
.home-faq .seo-article { margin-top: 0; }
.notfound .rows { margin-top: 40px; border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .features dl { grid-template-columns: 1fr; }
  .seo-article { margin-top: 48px; }
  .cat-page { padding-top: 22px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .catalog { grid-template-columns: 1fr; gap: 0; padding-top: 24px; }
  .rail {
    position: sticky; top: var(--header-h); z-index: 10; flex-direction: row; overflow-x: auto; scrollbar-width: none;
    background: var(--bg); margin-inline: -24px; padding: 10px 24px; gap: 6px; border-bottom: 1px solid var(--line);
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail-title { display: none; }
  .rail a { flex: none; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); padding: 7px 12px; font-size: 14px; }
  .rail a .n { margin-left: 4px; }
  .group:first-of-type { margin-top: 28px; }
  .promise { grid-template-columns: 1fr; gap: 24px; }
  .related .rows { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --header-h: 58px; }
  .wrap { padding-inline: 16px; }
  .rail { margin-inline: -16px; padding-inline: 16px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .search-trigger .st-label { font-size: 14px; }
  .search-trigger kbd { display: none; }
  .hero { padding-top: 44px; padding-bottom: 24px; }
  .hero h1 { font-stretch: 112%; }
  .drop-hero { grid-template-columns: 1fr; gap: 14px; padding: 22px; }
  .drop-hero .btn { justify-self: start; }
  .row-link { grid-template-columns: 28px minmax(0, 1fr) auto; row-gap: 2px; }
  .row-link .rd { grid-column: 2 / 4; grid-row: 2; white-space: normal; font-size: 13.5px; }
  .row-link .rt { grid-column: 3; grid-row: 1; }
  .tool-body { padding: 18px; border-radius: 16px; }
  .tool-page { padding-top: 22px; }
  .tool-nav a { max-width: none; flex: 1; }
}
@media (max-width: 460px) {
  .brand-word { display: none; }
  .tool-top .btn .lbl { display: none; }
}
