/* ============================================================
   viptools.site — Design System
   Dark-first, minimal, browser-tool aesthetic.
   Tokens follow the reference design language:
   near-black canvas, hairline borders, white type, dot grid.
   ============================================================ */

/* Geist & Geist Mono - SIL Open Font License 1.1, (c) Vercel / vercel.com.
   Subset files obtained from Google Fonts and self-hosted so the whole
   site (including all tools) works fully offline. */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/geist-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/geist-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/geist-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/geist-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --surface: rgba(255, 255, 255, .025);
  --surface-hov: rgba(255, 255, 255, .05);
  --border: rgba(255, 255, 255, .07);
  --border-hov: rgba(255, 255, 255, .14);
  --text: #fff;
  --text-soft: rgba(255, 255, 255, .62);
  --text-mute: rgba(255, 255, 255, .48);
  --text-faint: rgba(255, 255, 255, .36);
  --accent: #fff;
  --accent-text: #111;
  --accent-glow: rgba(255, 255, 255, .14);
  --danger: #ffb4b4;
  --ok: #b8ffcf;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --nav-bg: rgba(20, 20, 20, .74);
  --shadow-card: 0 16px 40px rgba(0, 0, 0, .35);
}

html.light-mode {
  color-scheme: light;
  --bg: #fafafa;
  --surface: rgba(0, 0, 0, .022);
  --surface-hov: rgba(0, 0, 0, .045);
  --border: rgba(0, 0, 0, .08);
  --border-hov: rgba(0, 0, 0, .18);
  --text: #0a0a0a;
  --text-soft: rgba(0, 0, 0, .66);
  --text-mute: rgba(0, 0, 0, .5);
  --text-faint: rgba(0, 0, 0, .38);
  --accent: #0a0a0a;
  --accent-text: #fff;
  --accent-glow: rgba(0, 0, 0, .07);
  --nav-bg: rgba(255, 255, 255, .78);
  --shadow-card: 0 16px 40px rgba(0, 0, 0, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 24px 24px;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}

html.light-mode body { background-image: radial-gradient(rgba(0, 0, 0, .04) 1px, transparent 1px); }

a { color: inherit; }
button { font-family: inherit; }
::selection { background: rgba(255, 255, 255, .18); }
html.light-mode ::selection { background: rgba(0, 0, 0, .14); }

.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.wide { width: min(1580px, calc(100% - 32px)); margin: 0 auto; }

/* ============ Top navigation (full-width bar) ============ */
.tn-brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 800; font-size: 16px;
  letter-spacing: -.02em; color: var(--text);
}
.tn-brand .tn-logo {
  width: 30px; height: 30px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--text); color: var(--bg); font-size: 15px; font-weight: 900;
}
.tn-icon-btn {
  width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: transparent; color: var(--text-mute); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px; transition: all .2s var(--ease);
}
.tn-icon-btn:hover { color: var(--text); background: var(--surface-hov); }

/* ============ Pill navigation (floating, homepage) ============ */
#pillnav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 60; display: flex; align-items: center; gap: 4px;
  padding: 6px; min-height: 54px; border-radius: 999px;
  background: var(--nav-bg);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
  transition: transform .4s var(--ease), opacity .3s var(--ease);
}
#pillnav.hidden { transform: translateX(-50%) translateY(-90px); opacity: 0; pointer-events: none; }
#pillnav .pn-logo {
  width: 42px; height: 42px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); text-decoration: none; font-weight: 900; font-size: 15px;
  transition: transform .35s var(--ease), opacity .25s var(--ease);
}
#pillnav .pn-logo:hover { transform: scale(.92); opacity: .85; }
#pillnav .pn-logo .pn-mark {
  width: 26px; height: 26px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--text); color: var(--bg); font-size: 13px; font-weight: 900;
}
.pn-cats { position: relative; display: flex; align-items: center; gap: 2px; }
.pn-cat {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; min-width: 42px; height: 42px; padding: 0 11px;
  border: 0; background: transparent; border-radius: 999px;
  color: var(--text-mute); font-size: 12.5px; font-weight: 650;
  cursor: pointer; transition: color .2s var(--ease), transform .2s var(--ease);
  text-decoration: none;
}
.pn-cat i { font-size: 17px; line-height: 1; }
.pn-cat:hover { color: var(--text); transform: translateY(-1px); }
.pn-cat.active { color: var(--text); }
.pn-indicator {
  position: absolute; top: 0; height: 42px;
  background: var(--surface-hov); border: 1px solid var(--border);
  border-radius: 999px; transition: left .42s var(--ease), width .42s var(--ease), opacity .25s var(--ease);
  z-index: 1; pointer-events: none; opacity: 0;
}
.pn-indicator.show { opacity: 1; }
.pn-divider { width: 1px; height: 24px; background: var(--border); margin: 0 3px; }
.pn-icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: 0; background: transparent; border-radius: 999px;
  color: var(--text-soft); cursor: pointer; transition: all .25s var(--ease);
  font-size: 12.5px; font-weight: 650; text-decoration: none;
}
.pn-icon-btn:hover { background: var(--surface-hov); color: var(--text); transform: translateY(-1px); }
.pn-icon-btn i { font-size: 17px; }
.pn-icon-btn.text-btn { padding: 0 12px; width: auto; min-width: 44px; }
.pn-mobile-toggle { display: none !important; }

/* tooltips */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 12px);
  transform: translateX(-50%) translateY(-4px) scale(.96);
  padding: 7px 10px; background: rgba(18, 18, 18, .92);
  border: 1px solid var(--border); border-radius: 10px;
  color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: all .25s var(--ease); z-index: 70;
}
html.light-mode [data-tip]::after { background: rgba(255, 255, 255, .96); color: #111; }
[data-tip]:hover::after { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }

/* ============ Mobile menu sheet ============ */
#mobile-menu {
  position: fixed; inset: 0; z-index: 80; background: var(--bg);
  padding: 20px; overflow-y: auto; display: none;
}
#mobile-menu.open { display: block; animation: mmIn .3s var(--ease); }
@keyframes mmIn { from { opacity: 0; transform: translateY(12px); } }
.mm-head { display: flex; align-items: center; justify-content: space-between; height: 54px; margin-bottom: 18px; }
.mm-label {
  font-size: 11px; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--text-faint); margin: 0 0 14px;
}
.ms-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ms-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px;
  transition: all .25s var(--ease);
}
.ms-item:hover { background: var(--surface-hov); border-color: var(--border-hov); }
.ms-item:active { transform: scale(.96); }
.ms-item i { font-size: 20px; color: var(--text-soft); }

/* ============ Hero ============ */
main { display: block; }
#tools-section { padding-top: 120px; }
#tools-head {
  max-width: 1580px; margin: 0 auto; padding: 26px 40px 30px;
  display: flex; flex-direction: column; gap: 26px;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-soft); font-size: 12px; font-weight: 600;
  letter-spacing: .04em; width: fit-content;
}
.hero-kicker i { font-size: 14px; }
#hero-heading {
  font-size: clamp(2.2rem, 5.4vw, 4rem); font-weight: 800;
  letter-spacing: -.045em; line-height: 1.02; color: var(--text);
}
.hero-desc { max-width: 680px; color: var(--text-soft); font-size: 16px; font-weight: 450; line-height: 1.65; }
.hero-positioning { color: var(--text-mute); font-size: 14px; margin-top: 10px; }
#hero-cats { display: flex; flex-wrap: wrap; gap: 18px; }
.hc {
  display: inline-flex; align-items: center; gap: 6px; padding: 0;
  border: 0; background: transparent; color: var(--text-mute);
  font-family: inherit; font-size: 12px; font-weight: 650;
  cursor: pointer; transition: color .2s var(--ease); text-decoration: none;
}
.hc i { font-size: 14px; color: var(--text-faint); transition: color .2s var(--ease); }
.hc b { font-weight: 700; color: var(--text-faint); font-size: 11px; transition: color .2s var(--ease); }
.hc:hover, .hc:hover i, .hc:hover b { color: var(--text); }
.hc.active { color: var(--text); }
.hc.active i, .hc.active b { color: var(--text); }

/* search bar */
.tools-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 0 16px; max-width: 560px;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.tools-search:focus-within { border-color: var(--border-hov); background: var(--surface-hov); }
.tools-search > i { font-size: 17px; color: var(--text-faint); }
#search-input {
  flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  padding: 15px 0; font-family: inherit; font-size: 15px; font-weight: 500;
  color: var(--text); letter-spacing: -.005em;
}
#search-input::placeholder { color: var(--text-faint); }
#search-clear {
  width: 30px; height: 30px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-faint); cursor: pointer;
  display: none; align-items: center; justify-content: center; font-size: 14px;
  transition: all .2s var(--ease);
}
#search-clear:hover { color: var(--text); background: var(--surface-hov); }
#search-clear.show { display: inline-flex; }
.search-scope { font-size: 12px; color: var(--text-faint); white-space: nowrap; }

/* filter tabs */
#tools-catalog { max-width: 1580px; margin: 0 auto; padding: 0 40px; }
.ft-row {
  position: sticky; top: 76px; z-index: 40;
  display: flex; gap: 6px; padding: 10px 0 18px;
  overflow-x: auto; scrollbar-width: none;
  mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
}
.ft-row::-webkit-scrollbar { display: none; }
.ft {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  padding: 0 16px; height: 42px; background: transparent;
  border: 1px solid transparent; border-radius: 999px;
  font-size: 13px; font-weight: 650; letter-spacing: -.005em;
  color: var(--text-mute); cursor: pointer; white-space: nowrap;
  transition: all .25s var(--ease); flex: 0 0 auto;
}
.ft i { font-size: 16px; }
.ft:hover { color: var(--text); background: var(--surface-hov); }
.ft.active { color: var(--text); background: var(--surface); border-color: var(--border); }
.ft b { font-weight: 700; font-size: 11px; color: var(--text-faint); }

/* ============ Tool grid ============ */
#tools-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  padding-bottom: 40px;
}
@media (min-width: 1720px) {
  #tools-grid { grid-template-columns: repeat(4, 1fr); }
}
.tc {
  position: relative; display: flex; align-items: center; gap: 18px;
  padding: 22px 24px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 20px;
  text-decoration: none; color: var(--text); overflow: hidden;
  transition: transform .42s var(--ease), background .35s var(--ease),
    border-color .35s var(--ease), box-shadow .35s var(--ease);
  animation: tcIn .55s var(--ease) both;
}
@keyframes tcIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.tc::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle 240px at var(--mx, 50%) var(--my, 50%), var(--accent-glow) 0%, transparent 60%);
  opacity: 0; transition: opacity .35s var(--ease); pointer-events: none;
}
.tc:hover::before { opacity: 1; }
.tc:hover {
  transform: translateY(-4px); background: var(--surface-hov);
  border-color: var(--border-hov); box-shadow: var(--shadow-card);
}
.tc-i {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 15px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-soft); font-size: 22px;
  transition: all .35s var(--ease);
}
.tc-i i { transition: transform .35s var(--ease); }
.tc:hover .tc-i {
  color: var(--text); border-color: var(--border-hov);
  background: var(--surface-hov); box-shadow: 0 0 24px var(--accent-glow);
}
.tc:hover .tc-i i { transform: rotate(-8deg) scale(1.12); }
.tc-body { min-width: 0; flex: 1; }
.tc-body h3 { font-size: 15px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 3px; }
.tc-body p {
  font-size: 13px; color: var(--text-mute); line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tc:hover .tc-body p { color: var(--text-soft); }
.tc-arrow {
  flex-shrink: 0; color: var(--text-faint); font-size: 16px;
  opacity: 0; transform: translateX(-6px); transition: all .3s var(--ease);
}
.tc:hover .tc-arrow { opacity: 1; transform: translateX(0); }
.tc.tc-hide { display: none !important; }
.tc-local { position: absolute; top: 10px; right: 12px; font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--text-faint); text-transform: uppercase; }

/* no results */
#no-results { display: none; text-align: center; padding: 70px 20px 90px; }
#no-results.show { display: block; }
.nr-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.nr-hint { color: var(--text-mute); font-size: 14px; }

/* reveal more */
#tools-reveal { display: flex; justify-content: center; padding: 6px 0 60px; }
#tools-reveal-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-soft); font-size: 13.5px; font-weight: 650; cursor: pointer;
  transition: all .25s var(--ease);
}
#tools-reveal-btn:hover { color: var(--text); border-color: var(--border-hov); background: var(--surface-hov); }
#tools-reveal.hidden { display: none; }

/* ============ Sections (browser-first, CTA) ============ */
.section { padding: 90px 0; border-top: 1px solid var(--border); }
.section-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.section-kicker {
  font-size: 11px; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 16px;
}
.section h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.8rem); font-weight: 800;
  letter-spacing: -.04em; line-height: 1.08; margin-bottom: 18px;
}
.section h2 .dim { color: var(--text-faint); }
.section .lede { color: var(--text-mute); font-size: 15px; line-height: 1.75; max-width: 460px; }
.feat-list { display: flex; flex-direction: column; gap: 26px; }
.feat { display: flex; gap: 16px; align-items: flex-start; }
.feat-icon {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-soft); font-size: 18px;
}
.feat h3 { font-size: 14px; font-weight: 700; color: var(--text-soft); margin-bottom: 5px; }
.feat p { font-size: 12.5px; color: var(--text-mute); line-height: 1.65; }

/* CTA */
#cta-section { text-align: center; }
#cta-section h2 { max-width: 640px; margin: 0 auto 16px; }
#cta-section .lede { margin: 0 auto; max-width: 520px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 14px; font-size: 14px; font-weight: 700;
  text-decoration: none; cursor: pointer; border: 0;
  transition: transform .2s var(--ease), opacity .2s var(--ease), background .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { opacity: .88; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-hov); border-color: var(--border-hov); }

/* stats strip */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  max-width: 1580px; margin: 0 auto; padding: 0 40px 10px;
}
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 20px 22px;
}
.stat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); margin-top: 6px; }

/* ============ Footer ============ */
footer { border-top: 1px solid var(--border); padding: 64px 0 40px; margin-top: 20px; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px;
  max-width: 1580px; margin: 0 auto; padding: 0 40px;
}
.footer-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; text-decoration: none; margin-bottom: 14px; }
.footer-brand .tn-logo { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--text); color: var(--bg); font-size: 15px; font-weight: 900; }
.footer-desc { color: var(--text-mute); font-size: 13px; line-height: 1.7; max-width: 300px; }
.footer-col h4 { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--text-mute); text-decoration: none; font-size: 13.5px; font-weight: 550; transition: color .2s var(--ease); }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  max-width: 1580px; margin: 48px auto 0; padding: 24px 40px 0;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-faint);
}
.footer-bottom a { color: var(--text-mute); text-decoration: none; }
.footer-bottom a:hover { color: var(--text); }
.footer-legal { display: flex; gap: 18px; flex-wrap: wrap; }

/* ============ Page header (sub pages) ============ */
.page-hero { padding: 150px 0 50px; }
.page-hero .container { max-width: 860px; }
.page-hero .hero-kicker { margin-bottom: 18px; }
.page-hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.2rem); font-weight: 800;
  letter-spacing: -.045em; line-height: 1.05; margin-bottom: 16px;
}
.page-hero p { color: var(--text-mute); font-size: 15.5px; line-height: 1.75; max-width: 640px; }
.page-hero-stats { display: flex; gap: 28px; margin-top: 26px; flex-wrap: wrap; }
.page-hero-stats .stat { background: transparent; border: 0; padding: 0; }
.page-hero-stats .stat b { font-size: 22px; }
.page-hero-stats .stat span { margin-top: 4px; }

/* ============ Changelog ============ */
.cl-list { max-width: 860px; margin: 0 auto; padding: 20px 0 90px; }
.cl-entry {
  position: relative; padding: 34px 0 34px 44px;
  border-left: 1px solid var(--border);
}
.cl-entry:last-child { border-left-color: transparent; }
.cl-entry::before {
  content: ''; position: absolute; left: -5px; top: 42px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--text-faint); border: 2px solid var(--bg);
}
.cl-entry:hover::before { background: var(--text); }
.cl-date {
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}
.cl-entry h2 { font-size: 21px; font-weight: 750; letter-spacing: -.02em; line-height: 1.3; margin-bottom: 14px; }
.cl-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cl-tag {
  font-size: 10px; font-weight: 700; letter-spacing: .1em;
  padding: 4px 9px; border-radius: 6px; text-transform: uppercase;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-mute);
}
.cl-tag.tag-new { color: var(--ok); border-color: rgba(184, 255, 207, .22); }
.cl-tag.tag-fix { color: var(--danger); border-color: rgba(255, 180, 180, .22); }
.cl-tag.tag-launch, .cl-tag.tag-milestone { color: var(--text); border-color: var(--border-hov); }
.cl-body { color: var(--text-mute); font-size: 14px; line-height: 1.75; }
.cl-body p { margin-bottom: 10px; }
.cl-body ul { margin: 0 0 10px 18px; }
.cl-body li { margin-bottom: 7px; }
.cl-body a { color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px; }
.cl-body a:hover { color: var(--text); }
.cl-body strong { color: var(--text-soft); font-weight: 650; }
.cl-body code {
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: 12.5px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 2px 6px; border-radius: 6px; color: var(--text-soft);
}

/* ============ Cards / grids (blog, oss) ============ */
.card-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  max-width: 1580px; margin: 0 auto; padding: 10px 40px 90px;
}
.card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 24px; text-decoration: none; color: var(--text);
  transition: transform .35s var(--ease), background .3s var(--ease), border-color .3s var(--ease);
}
.card:hover { transform: translateY(-4px); background: var(--surface-hov); border-color: var(--border-hov); box-shadow: var(--shadow-card); }
.card-icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-soft); font-size: 20px; margin-bottom: 4px;
}
.card h3 { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.card p { font-size: 13px; color: var(--text-mute); line-height: 1.6; }
.card .card-meta { font-size: 11.5px; color: var(--text-faint); font-weight: 600; letter-spacing: .04em; margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 6px; }

/* blog category filter */
.blog-filters { display: flex; flex-wrap: wrap; gap: 8px; max-width: 1580px; margin: 0 auto; padding: 0 40px 26px; }
.blog-filters .ft { border: 1px solid var(--border); }

/* ============ Prose (legal, about) ============ */
.prose { max-width: 760px; margin: 0 auto; padding: 10px 0 90px; }
.prose h2 { font-size: 22px; font-weight: 750; letter-spacing: -.02em; margin: 40px 0 14px; }
.prose h3 { font-size: 16px; font-weight: 700; margin: 26px 0 10px; }
.prose p { color: var(--text-mute); font-size: 14.5px; line-height: 1.8; margin-bottom: 14px; }
.prose ul, .prose ol { margin: 0 0 14px 20px; color: var(--text-mute); font-size: 14.5px; line-height: 1.8; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--text); }
.prose strong { color: var(--text-soft); }
.prose code { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 12.5px; padding: 1.5px 5px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--text-soft); }

/* ============ Status page ============ */
.status-list { max-width: 760px; margin: 0 auto; padding: 10px 0 90px; }
.status-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; margin-bottom: 10px;
}
.status-row .sr-name { font-weight: 650; font-size: 14.5px; display: flex; align-items: center; gap: 12px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px rgba(184, 255, 207, .5); }
.status-badge { font-size: 12px; font-weight: 700; color: var(--ok); letter-spacing: .04em; }

/* ============ Notice ============ */
.notice {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 18px 20px; margin: 26px 0;
  font-size: 13.5px; color: var(--text-mute); line-height: 1.7;
}
.notice i { font-size: 18px; color: var(--text-soft); flex-shrink: 0; margin-top: 2px; }
.notice strong { color: var(--text-soft); }

/* ============ 404 ============ */
.nf-wrap { min-height: 72vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; }
.nf-code { font-size: clamp(5rem, 18vw, 10rem); font-weight: 900; letter-spacing: -.06em; line-height: 1; color: var(--text-faint); }

/* ============ Search overlay ============ */
#search-overlay {
  position: fixed; inset: 0; z-index: 999; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .4s ease;
}
#search-overlay.active { opacity: 1; pointer-events: auto; }
.so-inner { text-align: center; }
.so-spinner {
  width: 36px; height: 36px; border: 3px solid var(--border);
  border-top-color: var(--text); border-radius: 50%;
  animation: soSpin .7s linear infinite; margin: 0 auto 16px;
}
@keyframes soSpin { to { transform: rotate(360deg); } }
.so-text { font-size: 14px; font-weight: 600; color: var(--text-mute); }

/* ============ Responsive ============ */
@media (max-width: 1180px) {
  #tools-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .section-inner { grid-template-columns: 1fr; gap: 40px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  #pillnav .pn-cats { display: none; }
  #pillnav .pn-divider { display: none; }
  #pillnav .pn-mobile-toggle { display: inline-flex !important; }
  #tools-head, #tools-catalog, .card-grid, .footer-grid, .footer-bottom, .stats-row { padding-left: 18px; padding-right: 18px; }
  #tools-section { padding-top: 96px; }
  .ft-row { top: 70px; }
}
@media (max-width: 640px) {
  #tools-grid { grid-template-columns: 1fr; gap: 12px; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .tc { padding: 18px 20px; gap: 14px; border-radius: 18px; }
  .tc-i { width: 46px; height: 46px; font-size: 20px; border-radius: 14px; }
  .tc-arrow { display: none; }
  .section { padding: 64px 0; }
  .ms-grid { grid-template-columns: 1fr; }
  .cl-entry { padding-left: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============================================================
   Local tool pages — shared UI kit (assets/js/tool-engine.js)
   ============================================================ */
.tool-hero { padding-top: 150px; }
.tool-crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; opacity: .65; margin-bottom: 14px; flex-wrap: wrap; }
.tool-crumb a { color: inherit; text-decoration: none; }
.tool-crumb a:hover { color: var(--accent); text-decoration: underline; }
.tool-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.tool-root { max-width: 860px; margin: 0 auto; padding: 8px 24px 80px; }

/* dropzone */
.tk-drop {
  border: 1.5px dashed var(--border-hov);
  border-radius: 18px; padding: 44px 24px; text-align: center; cursor: pointer;
  transition: border-color .18s, background .18s; margin-bottom: 18px;
}
.tk-drop:hover, .tk-drop.over { border-color: var(--accent); background: rgba(255,255,255,.03); }
.tk-drop i { font-size: 34px; display: block; margin-bottom: 12px; opacity: .8; }
.tk-drop-t { font-weight: 600; font-size: 15px; }
.tk-drop-h { font-size: 13px; opacity: .55; margin-top: 4px; }

/* typography */
.tk-h2 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .55; margin: 26px 0 12px; }
.tk-p { font-size: 14px; line-height: 1.65; opacity: .75; margin: 0 0 14px; }
.tk-note {
  display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.6;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; margin: 14px 0; opacity: .85;
}
.tk-note i { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.tk-badge {
  display: inline-flex; align-items: center; font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border-hov);
  opacity: .9;
}
.tk-badge.local { color: #4ade80; border-color: rgba(74,222,128,.4); }

/* layout helpers */
.tk-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.tk-col { display: flex; flex-direction: column; gap: 0; margin-bottom: 14px; }
.tk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 14px; }
.tk-grid.c3 { grid-template-columns: repeat(3, 1fr); }
.tk-grid.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 640px) { .tk-grid, .tk-grid.c3, .tk-grid.c4 { grid-template-columns: 1fr 1fr; } }

/* fields */
.tk-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; margin-bottom: 12px; }
.tk-field-l { font-weight: 600; opacity: .7; }
.tk-inp, .tk-sel, .tk-ta {
  background: var(--surface-hov); color: inherit;
  border: 1px solid var(--border-hov); border-radius: 10px;
  padding: 9px 12px; font-size: 14px; font-family: inherit; width: 100%;
}
.tk-ta { min-height: 110px; resize: vertical; line-height: 1.55; }
.tk-inp:focus, .tk-sel:focus, .tk-ta:focus { outline: none; border-color: var(--accent); }
.tk-chk { width: 18px; height: 18px; accent-color: var(--accent); }
.tk-range { display: flex; align-items: center; gap: 10px; }
.tk-range input[type="range"] { flex: 1; accent-color: var(--accent); }
.tk-range b { min-width: 44px; text-align: right; font-size: 13px; opacity: .8; }

/* buttons */
.tk-btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background: var(--surface-hov); color: inherit;
  border: 1px solid var(--border-hov); border-radius: 10px;
  padding: 10px 18px; font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: background .15s, border-color .15s, transform .1s;
}
.tk-btn:hover { background: rgba(255,255,255,.1); }
.tk-btn:active { transform: scale(.98); }
.tk-btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.tk-btn.primary:hover { opacity: .88; }
.tk-btn.sm { padding: 7px 12px; font-size: 13px; }
.tk-btn.ghost { background: transparent; }
.tk-btn.busy { opacity: .65; pointer-events: none; }
.tk-btn i { font-size: 16px; }
.tk-btn.primary i.ph-spinner { animation: tk-spin 1s linear infinite; }
@keyframes tk-spin { to { transform: rotate(360deg); } }

/* progress */
.tk-prog { margin: 16px 0; }
.tk-prog-track { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.tk-prog-bar { height: 100%; width: 0; background: var(--accent); transition: width .2s; border-radius: 999px; }
.tk-prog-l { font-size: 12px; opacity: .6; margin-top: 6px; }

/* results */
.tk-results { margin-top: 18px; }
.tk-res {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--border-hov); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 8px; background: rgba(255,255,255,.02);
}
.tk-res > i.ph-file { font-size: 20px; opacity: .7; }
.tk-res-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tk-res-m b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-res-m span { font-size: 12px; opacity: .55; }
.tk-res-actions { display: flex; gap: 8px; margin-top: 10px; }

/* misc */
.tk-pre {
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; font-family: 'Geist Mono', monospace; font-size: 13px;
  overflow: auto; white-space: pre-wrap; word-break: break-all; margin: 0 0 14px; max-height: 420px;
}
.tk-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 7px 2px; border-bottom: 1px solid var(--border); }
.tk-kv span { opacity: .6; }
.tk-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: #1a1a1a; color: #fff; border: 1px solid rgba(255,255,255,.18);
  padding: 10px 18px; border-radius: 12px; font-size: 13px; z-index: 9999;
  opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none; max-width: 80vw;
}
.tk-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.tk-canvas-wrap { border: 1px solid var(--border-hov); border-radius: 14px; overflow: hidden; margin-bottom: 14px; background: rgba(255,255,255,.02); }
.tk-canvas-wrap canvas { display: block; max-width: 100%; height: auto; }
.tk-empty { font-size: 13px; opacity: .5; padding: 18px; text-align: center; border: 1px dashed var(--border-hov); border-radius: 12px; }

/* light-mode adjustments */
.light-mode .tk-drop { background: rgba(0,0,0,.015); }
.light-mode .tk-toast { background: #fff; color: #0a0a0a; border-color: rgba(0,0,0,.15); }
