/* ════════════════════════════════════════════════════════════
   SF Tools — design system
   Fonts: Bricolage Grotesque (display) · Inter (UI) · JetBrains Mono (code)
   ════════════════════════════════════════════════════════════ */

@font-face { font-family: 'Bricolage'; src: url('../fonts/bricolage.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/jetbrains-mono.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #f6f6f3;
  --bg-2: #efefea;
  --surface: #ffffff;
  --surface-2: #f4f4f0;
  --surface-3: #ebebe5;
  --border: #e3e3dc;
  --border-2: #d2d2c9;
  --text: #141413;
  --text-2: #4a4a46;
  --muted: #7a7a73;
  --accent: #3550f0;
  --accent-2: #2a40c8;
  --accent-soft: rgba(53, 80, 240, .09);
  --accent-ring: rgba(53, 80, 240, .28);
  --on-accent: #fff;
  --lime: #c8f03c;
  --ok: #0f8a5f; --ok-soft: rgba(15, 138, 95, .1);
  --warn: #b26a00; --warn-soft: rgba(178, 106, 0, .1);
  --bad: #d23048; --bad-soft: rgba(210, 48, 72, .1);
  --c-shop: #2f9a4c; --c-image: #f0602c; --c-text: #7a52f4; --c-dev: #0c9b93; --c-seo: #d99a00; --c-file: #e0457a;
  --shadow-sm: 0 1px 2px rgba(20, 20, 19, .05);
  --shadow: 0 1px 2px rgba(20, 20, 19, .04), 0 6px 24px -8px rgba(20, 20, 19, .12);
  --shadow-lg: 0 24px 64px -16px rgba(20, 20, 19, .28);
  --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-xl: 26px;
  --container: 1240px;
  --header-h: 64px;
  --f-display: 'Bricolage', 'Inter', system-ui, sans-serif;
  --f-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --checker: repeating-conic-gradient(#e7e7e1 0 25%, #fff 0 50%) 50% / 16px 16px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0b0c0f;
  --bg-2: #101115;
  --surface: #15171c;
  --surface-2: #1a1d23;
  --surface-3: #22252d;
  --border: #252830;
  --border-2: #333742;
  --text: #ededf0;
  --text-2: #b8bac2;
  --muted: #858996;
  --accent: #7d8fff;
  --accent-2: #9aa8ff;
  --accent-soft: rgba(125, 143, 255, .12);
  --accent-ring: rgba(125, 143, 255, .35);
  --on-accent: #0b0c0f;
  --ok: #3ccf91; --ok-soft: rgba(60, 207, 145, .12);
  --warn: #f0b443; --warn-soft: rgba(240, 180, 67, .12);
  --bad: #ff6b81; --bad-soft: rgba(255, 107, 129, .12);
  --c-shop: #5fd383; --c-image: #ff7d4f; --c-text: #a084ff; --c-dev: #2fd0c6; --c-seo: #f5c037; --c-file: #ff6d9c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px -10px rgba(0, 0, 0, .6);
  --shadow-lg: 0 24px 70px -12px rgba(0, 0, 0, .75);
  --checker: repeating-conic-gradient(#20232a 0 25%, #16181d 0 50%) 50% / 16px 16px;
  color-scheme: dark;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body { font-family: var(--f-ui); font-size: 15px; line-height: 1.6; color: var(--text); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, canvas, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.12; letter-spacing: -.02em; font-weight: 700; text-wrap: balance; }
p { text-wrap: pretty; }
code, kbd, pre, .mono, .output, .input.mono, .textarea.mono { font-family: var(--f-mono); font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: var(--r-sm); font-weight: 600; }
.skip-link:focus { top: 12px; }
svg.i { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 2; }
.i-sm { width: 15px !important; height: 15px !important; }
.i-lg { width: 22px !important; height: 22px !important; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
main { flex: 1; }

/* ── 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(--border); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 22px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 700; font-size: 18px; letter-spacing: -.02em; flex-shrink: 0; }
.logo-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--text); color: var(--bg); display: grid; place-items: center; font-size: 13px; font-weight: 800; letter-spacing: -.04em; position: relative; }
.logo-mark::after { content: ''; position: absolute; right: -3px; bottom: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--lime); border: 2px solid var(--bg); }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a, .nav-drop > button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--text-2); transition: background .15s, color .15s; }
.nav a:hover, .nav-drop > button:hover, .nav a.active { color: var(--text); background: var(--surface-3); }
.nav-drop { position: relative; }
.nav-drop > button svg { width: 14px; height: 14px; transition: transform .2s; }
.nav-drop.open > button svg { transform: rotate(180deg); }
.mega { position: absolute; top: calc(100% + 10px); left: -120px; width: 720px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .18s; }
.nav-drop.open .mega { opacity: 1; visibility: visible; transform: none; }
.mega a { display: flex; gap: 12px; padding: 12px; border-radius: var(--r); align-items: flex-start; background: none !important; }
.mega a:hover { background: var(--surface-2) !important; }
.mega strong { display: block; font-size: 14px; color: var(--text); font-weight: 600; }
.mega span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.45; font-weight: 400; }
.mega .mega-all { grid-column: 1 / -1; justify-content: center; align-items: center; font-size: 13px; border-top: 1px solid var(--border); border-radius: 0 0 var(--r) var(--r); margin-top: 4px; color: var(--accent); font-weight: 600; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search-btn { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 8px 0 12px; min-width: 230px; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; color: var(--muted); font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.search-btn:hover { border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.search-btn kbd { margin-left: auto; }
kbd { font-size: 11px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-weight: 500; line-height: 1.4; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 999px; color: var(--text-2); border: 1px solid transparent; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.theme-btn .t-sun, .theme-btn .t-moon, .theme-btn .t-sys { display: none; }
[data-theme-pref="light"] .theme-btn .t-sun, [data-theme-pref="dark"] .theme-btn .t-moon, [data-theme-pref="system"] .theme-btn .t-sys { display: block; }
.menu-btn { display: none; }
.mobile-nav { display: none; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; font-size: 14px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s, transform .1s, box-shadow .15s; user-select: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 4px 14px -4px var(--accent-ring); }
.btn-primary:hover:not(:disabled) { background: var(--accent-2); }
.btn-dark { background: var(--text); color: var(--bg); }
.btn-dark:hover:not(:disabled) { opacity: .88; }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover:not(:disabled) { border-color: var(--border-2); background: var(--surface-2); }
.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn-soft:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.btn-danger { background: var(--bad-soft); color: var(--bad); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn-sm svg.i { width: 15px; height: 15px; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 15px; border-radius: 12px; }
.btn-icon { width: 32px; padding: 0; }
.btn-block { width: 100%; }
.btn.is-done { color: var(--ok); }

/* ── Badges / chips ── */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; letter-spacing: .01em; line-height: 1.6; }
.badge-new { background: var(--lime); color: #1a2400; }
.badge-hot { background: var(--text); color: var(--bg); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-muted { background: var(--surface-3); color: var(--text-2); }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13.5px; font-weight: 500; color: var(--text-2); transition: .15s; }
.chip:hover { border-color: var(--border-2); color: var(--text); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .count { font-size: 11.5px; opacity: .6; }

/* ── Category colour tokens ── */
.cat-shop { --cat: var(--c-shop); } .cat-image { --cat: var(--c-image); } .cat-text { --cat: var(--c-text); } .cat-dev { --cat: var(--c-dev); } .cat-seo { --cat: var(--c-seo); } .cat-file { --cat: var(--c-file); }
.t-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; color: var(--cat, var(--accent)); background: color-mix(in srgb, var(--cat, var(--accent)) 12%, transparent); }
.t-ico svg { width: 20px; height: 20px; }
.t-ico.lg { width: 56px; height: 56px; border-radius: 15px; }
.t-ico.lg svg { width: 28px; height: 28px; }

/* ── Tool cards ── */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.tool-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); transition: border-color .18s, box-shadow .18s, transform .18s; isolation: isolate; }
.tool-card:hover { border-color: color-mix(in srgb, var(--cat) 45%, var(--border)); box-shadow: var(--shadow); transform: translateY(-2px); }
.tool-card-top { display: flex; align-items: flex-start; gap: 12px; }
.tool-card h3 { font-family: var(--f-ui); font-size: 15px; font-weight: 600; letter-spacing: -.01em; margin-top: 1px; }
.tool-card .cat-label { font-size: 12px; color: var(--muted); }
.tool-card p { font-size: 13.5px; color: var(--text-2); line-height: 1.55; }
.tool-card .cat-label .badge { margin-left: 6px; font-size: 10.5px; padding: 0 7px; vertical-align: 1px; }
.tool-card h3 { padding-right: 22px; }
.fav-btn { position: absolute; top: 12px; right: 12px; z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); opacity: 0; transition: opacity .15s, color .15s, background .15s; }
.tool-card:hover .fav-btn, .fav-btn.on, .fav-btn:focus-visible { opacity: 1; }
.fav-btn:hover { background: var(--surface-3); color: var(--text); }
.fav-btn.on { color: #f5a400; }
.fav-btn.on svg { fill: currentColor; }
.fav-btn svg { width: 16px; height: 16px; }
.tool-card .stretched::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.tool-grid.compact { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.tool-grid.compact .tool-card { padding: 14px; flex-direction: row; align-items: center; }
.tool-grid.compact .tool-card p { display: none; }

/* ── Hero ── */
.hero { padding: 72px 0 40px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -40% -10% auto; height: 620px; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%); pointer-events: none; z-index: -1; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; font-size: 13px; color: var(--text-2); margin-bottom: 26px; }
.hero-eyebrow .badge { font-size: 11px; }
.hero h1 { font-size: clamp(40px, 6.6vw, 82px); font-weight: 700; letter-spacing: -.045em; line-height: 1; max-width: 13ch; }
.hero h1 .mark { position: relative; white-space: nowrap; }
.hero h1 .mark::after { content: ''; position: absolute; left: -2%; right: -2%; bottom: .06em; height: .3em; background: var(--lime); z-index: -1; border-radius: 4px; transform: skew(-8deg); }
[data-theme="dark"] .hero h1 .mark::after { opacity: .4; }
[data-theme="dark"] .hero h1 .mark { color: #fff; }
.hero-sub { font-size: clamp(16px, 1.6vw, 19px); color: var(--text-2); max-width: 600px; margin: 22px 0 32px; }
.hero-search { position: relative; max-width: 620px; }
.hero-search input { width: 100%; height: 60px; padding: 0 120px 0 54px; border-radius: 16px; border: 1px solid var(--border-2); background: var(--surface); font-size: 16.5px; box-shadow: var(--shadow); outline: none; transition: border-color .15s, box-shadow .15s; }
.hero-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring), var(--shadow); }
.hero-search > svg { position: absolute; left: 19px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 20px; height: 20px; }
.hero-search kbd { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 30px; font-size: 13.5px; color: var(--text-2); }
.hero-stats span { display: inline-flex; align-items: center; gap: 7px; }
.hero-stats svg { color: var(--ok); width: 16px; height: 16px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero-art { position: relative; height: 420px; }
.hero-art .float { position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 14px; display: flex; gap: 12px; align-items: center; font-size: 13.5px; font-weight: 600; animation: bob 7s ease-in-out infinite; }
.hero-art .float small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.hero-art .f1 { top: 6%; left: 8%; }
.hero-art .f2 { top: 30%; right: 0; animation-delay: -2s; }
.hero-art .f3 { top: 56%; left: 0; animation-delay: -4s; }
.hero-art .f4 { bottom: 2%; right: 12%; animation-delay: -1s; }
.hero-art .orb { position: absolute; inset: 14% 16%; border-radius: 50%; border: 1px dashed var(--border-2); }
.hero-art .orb::before { content: ''; position: absolute; inset: 18%; border-radius: 50%; border: 1px solid var(--border); background: radial-gradient(circle at 30% 30%, var(--surface), transparent 70%); }
.hero-art .core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 96px; height: 96px; border-radius: 28px; background: var(--text); color: var(--bg); display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 32px; letter-spacing: -.05em; box-shadow: var(--shadow-lg); }
.hero-art .core::after { content: ''; position: absolute; right: -6px; bottom: -6px; width: 26px; height: 26px; border-radius: 50%; background: var(--lime); border: 4px solid var(--bg); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }

/* ── Sections ── */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(26px, 3vw, 36px); }
.section-head p { color: var(--text-2); margin-top: 8px; max-width: 560px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; display: block; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.cat-block { margin-bottom: 40px; }
.cat-block-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cat-block-head h3 { font-size: 20px; }
.cat-block-head a { margin-left: auto; font-size: 13.5px; color: var(--text-2); display: inline-flex; gap: 4px; align-items: center; }
.cat-block-head a:hover { color: var(--accent); }
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); border: 1px dashed var(--border-2); border-radius: var(--r-lg); }
.empty-state svg { margin: 0 auto 12px; width: 32px; height: 32px; }

.cat-cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.cat-card { padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; transition: .18s; }
.cat-card:hover { border-color: color-mix(in srgb, var(--cat) 50%, var(--border)); transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-card strong { font-size: 15px; display: block; }
.cat-card span { font-size: 13px; color: var(--muted); }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feature { padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.feature .t-ico { margin-bottom: 16px; }
.feature h3 { font-family: var(--f-ui); font-size: 15.5px; font-weight: 600; margin-bottom: 6px; letter-spacing: -.01em; }
.feature p { font-size: 14px; color: var(--text-2); }
.band { background: var(--text); color: var(--bg); border-radius: var(--r-xl); padding: 48px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; position: relative; overflow: hidden; }
.band h2 { font-size: clamp(28px, 3.4vw, 42px); }
.band p { opacity: .72; margin-top: 12px; }
.band .btn-ghost { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 30%, transparent); }
.band .btn-ghost:hover { background: color-mix(in srgb, var(--bg) 10%, transparent); }
.band-list { display: grid; gap: 10px; }
.band-list div { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r); background: color-mix(in srgb, var(--bg) 7%, transparent); border: 1px solid color-mix(in srgb, var(--bg) 12%, transparent); font-size: 14px; }
.band-list svg { color: var(--lime); }

/* ── FAQ ── */
.faq-list { display: grid; gap: 10px; }
.faq-list details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 0 18px; transition: border-color .15s; }
.faq-list details[open] { border-color: var(--border-2); }
.faq-list summary { list-style: none; cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 15px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; font-size: 20px; font-weight: 400; color: var(--muted); transition: transform .2s; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding: 0 0 16px; color: var(--text-2); font-size: 14.5px; }

/* ── Page head / breadcrumb ── */
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); padding-top: 24px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--text); }
.crumbs svg { width: 13px; height: 13px; }
.page-head { padding: 18px 0 26px; display: flex; gap: 18px; align-items: flex-start; }
.page-head h1 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -.035em; }
.page-head p { color: var(--text-2); margin-top: 8px; max-width: 720px; font-size: 16px; }
.page-head-actions { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }
.privacy-note { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 12.5px; color: var(--ok); background: var(--ok-soft); padding: 4px 10px 4px 8px; border-radius: 999px; font-weight: 500; }
.privacy-note svg { width: 14px; height: 14px; }

/* ── Tool workspace ── */
.tool-app { margin-bottom: 56px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.workspace.wide-side { grid-template-columns: minmax(0, 1fr) 380px; }
.workspace.even { grid-template-columns: 1fr 1fr; }
.workspace.single { grid-template-columns: 1fr; }
.workspace.side-left { grid-template-columns: 340px minmax(0, 1fr); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); min-width: 0; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--border); min-height: 54px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { font-family: var(--f-ui); font-size: 14px; font-weight: 600; letter-spacing: -.005em; }
.panel-head .sub { font-size: 12.5px; color: var(--muted); }
.panel-head .actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.panel-body { padding: 18px; }
.panel-body.flush { padding: 0; }
.panel-foot { padding: 14px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.side { display: grid; gap: 16px; position: sticky; top: calc(var(--header-h) + 16px); }
.stack { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 10px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.divider { height: 1px; background: var(--border); margin: 4px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.text-ok { color: var(--ok); } .text-bad { color: var(--bad); } .text-warn { color: var(--warn); }
.mt-0 { margin-top: 0 !important; }

/* ── Form controls ── */
.field { display: grid; gap: 7px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.label .val, .field > label .val { font-weight: 500; color: var(--muted); font-family: var(--f-mono); font-size: 12px; }
.hint { font-size: 12px; color: var(--muted); line-height: 1.5; }
.input, .select, .textarea { width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; height: 40px; font-size: 14px; color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-2); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); background: var(--surface); }
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: .8; }
.input.mono, .textarea.mono { font-family: var(--f-mono); font-size: 13px; }
.input.invalid, .textarea.invalid { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; cursor: pointer; }
.textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.6; }
.textarea.editor { border: 0; border-radius: 0; background: transparent; box-shadow: none !important; min-height: 320px; padding: 18px; font-size: 14.5px; }
.textarea.editor.mono { font-size: 13px; line-height: 1.65; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 10px 0 0 10px; }
.input-group > .btn, .input-group > .addon { border-radius: 0 10px 10px 0; height: 40px; border: 1px solid var(--border); border-left: 0; }
.addon { display: flex; align-items: center; padding: 0 12px; background: var(--surface-3); font-size: 13px; color: var(--muted); }
input[type="color"].swatch-input { -webkit-appearance: none; appearance: none; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 10px; padding: 3px; background: var(--surface-2); cursor: pointer; flex-shrink: 0; }
input[type="color"].swatch-input::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"].swatch-input::-webkit-color-swatch { border: 0; border-radius: 7px; }
input[type="color"].swatch-input::-moz-color-swatch { border: 0; border-radius: 7px; }

/* range */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; --p: 50%; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(to right, var(--accent) var(--p), var(--surface-3) var(--p)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--surface-3); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); box-shadow: var(--shadow-sm); transition: transform .1s; }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }

/* switch */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-size: 14px; user-select: none; min-height: 28px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 38px; height: 22px; border-radius: 999px; background: var(--border-2); position: relative; flex-shrink: 0; transition: background .18s; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch .s-label small { display: block; font-size: 12px; color: var(--muted); }

/* checkbox list */
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; user-select: none; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }

/* segmented */
.seg { display: inline-flex; background: var(--surface-3); border-radius: 10px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg.block { display: flex; }
.seg.block > button { flex: 1; }
.seg > button { height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text-2); white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg > button:hover { color: var(--text); }
.seg > button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); font-weight: 600; }
.seg > button:disabled { opacity: .4; cursor: not-allowed; }
.seg-sm > button { height: 28px; padding: 0 10px; font-size: 12.5px; }

/* tabs (underline) */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 10px; overflow-x: auto; scrollbar-width: none; }
.tabs > button { padding: 14px 10px 12px; font-size: 13.5px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs > button.active { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.tabs > button:hover { color: var(--text); }

/* ── Dropzone ── */
.dropzone { position: relative; border: 1.5px dashed var(--border-2); border-radius: var(--r-lg); padding: 44px 24px; text-align: center; background: var(--surface); transition: border-color .15s, background .15s; cursor: pointer; display: grid; place-items: center; gap: 4px; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.dropzone.over { box-shadow: 0 0 0 4px var(--accent-ring); }
.dropzone .dz-ico { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 12px; }
.dropzone .dz-ico svg { width: 26px; height: 26px; }
.dropzone strong { font-size: 16px; font-weight: 600; }
.dropzone p { font-size: 13.5px; color: var(--muted); }
.dropzone .dz-browse { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone.compact { padding: 18px; grid-template-columns: auto 1fr; text-align: left; gap: 0 14px; justify-items: start; }
.dropzone.compact .dz-ico { width: 42px; height: 42px; margin: 0; grid-row: span 2; }
.dropzone.compact strong { font-size: 14px; }
.dropzone.compact p { font-size: 12.5px; }
.page-drop { position: fixed; inset: 0; z-index: 90; background: color-mix(in srgb, var(--accent) 12%, transparent); backdrop-filter: blur(2px); border: 3px dashed var(--accent); display: none; place-items: center; font-family: var(--f-display); font-size: 28px; font-weight: 700; color: var(--accent); pointer-events: none; }
.page-drop.show { display: grid; }

/* ── File / batch list ── */
.file-list { display: grid; }
.file-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); transition: background .12s; }
.file-row:last-child { border-bottom: 0; }
.file-row.selected { background: var(--accent-soft); }
.file-row.clickable { cursor: pointer; }
.file-row.clickable:hover:not(.selected) { background: var(--surface-2); }
.file-thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--checker); border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.file-thumb svg { width: 22px; height: 22px; }
.file-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; }
.file-actions { display: flex; gap: 4px; align-items: center; }
.file-row .drag-handle { cursor: grab; color: var(--muted); }
.file-row.dragging { opacity: .4; }
.file-row.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.progress { height: 4px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > div { height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .2s; }
.saving.good { color: var(--ok); font-weight: 600; }
.saving.bad { color: var(--bad); font-weight: 600; }
.summary-bar { display: flex; gap: 8px 22px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.summary-bar b { color: var(--text); font-weight: 600; }

/* ── Output / code ── */
.output { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-family: var(--f-mono); font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; overflow: auto; max-height: 520px; color: var(--text); }
.output.plain { font-family: var(--f-ui); font-size: 14.5px; }
.output:empty::before { content: attr(data-placeholder); color: var(--muted); }
pre.code { margin: 0; }
.kv { display: grid; grid-template-columns: auto 1fr auto; gap: 0; font-size: 13.5px; }
.kv > * { padding: 9px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.kv > :nth-last-child(-n+3) { border-bottom: 0; }
.kv dt, .kv .k { color: var(--muted); padding-right: 16px; white-space: nowrap; font-size: 13px; }
.kv dd, .kv .v { font-family: var(--f-mono); font-size: 13px; word-break: break-all; }
.kv .c { padding-left: 8px; }
.copy-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.copy-row:last-child { border-bottom: 0; }
.copy-row .k { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.copy-row .v { font-family: var(--f-mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-row .v.wrap { white-space: normal; word-break: break-all; }
.table-wrap { overflow: auto; max-height: 520px; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
.table td { padding: 9px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .bar { height: 6px; border-radius: 999px; background: var(--accent); opacity: .7; min-width: 2px; }

/* ── Stats ── */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.stat { padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); }
.stat .n { font-family: var(--f-display); font-size: 26px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.stat.accent { background: var(--text); color: var(--bg); border-color: var(--text); }
.stat.accent .l { color: color-mix(in srgb, var(--bg) 65%, transparent); }
.meter { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter > div { height: 100%; border-radius: inherit; transition: width .25s, background .25s; }

/* ── Preview stage (images) ── */
.stage { position: relative; background: var(--checker); border-radius: 0 0 var(--r-lg) var(--r-lg); min-height: 360px; display: grid; place-items: center; overflow: hidden; padding: 20px; }
.stage canvas, .stage img { max-width: 100%; max-height: 62vh; width: auto; height: auto; box-shadow: var(--shadow); }
.stage .stage-info { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.stage .stage-info span { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(6px); padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid var(--border); }
.stage.empty { color: var(--muted); font-size: 14px; }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.preset { display: grid; gap: 6px; font-size: 12px; font-weight: 500; text-align: center; color: var(--text-2); padding: 0; border-radius: 10px; }
.preset canvas, .preset .pv { width: 100%; aspect-ratio: 1; border-radius: 10px; object-fit: cover; border: 2px solid transparent; background: var(--surface-3); }
.preset.active canvas, .preset.active .pv { border-color: var(--accent); }
.preset:hover { color: var(--text); }

/* ── Toast ── */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 120; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; background: var(--text); color: var(--bg); padding: 10px 16px 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: toastIn .25s cubic-bezier(.2, .9, .3, 1.3); pointer-events: auto; max-width: min(92vw, 440px); }
.toast svg { width: 17px; height: 17px; color: var(--lime); }
.toast.bad svg { color: #ff8a9b; }
.toast.out { animation: toastOut .2s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ── Command palette ── */
.cmdk-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(10, 10, 12, .45); backdrop-filter: blur(4px); display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; }
.cmdk-backdrop.open { display: flex; animation: fadeIn .15s; }
@keyframes fadeIn { from { opacity: 0; } }
.cmdk { width: 100%; max-width: 620px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; animation: popIn .18s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes popIn { from { opacity: 0; transform: scale(.97) translateY(-6px); } }
.cmdk-input { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.cmdk-input svg { color: var(--muted); width: 20px; height: 20px; }
.cmdk-input input { flex: 1; height: 58px; border: 0; outline: 0; background: transparent; font-size: 16.5px; }
.cmdk-list { max-height: min(56vh, 460px); overflow-y: auto; padding: 8px; }
.cmdk-group { font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 10px 10px 6px; text-transform: uppercase; letter-spacing: .06em; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.cmdk-item .t-ico { width: 34px; height: 34px; border-radius: 9px; }
.cmdk-item .t-ico svg { width: 17px; height: 17px; }
.cmdk-item strong { font-size: 14px; font-weight: 600; display: block; }
.cmdk-item span { font-size: 12.5px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-item > div { min-width: 0; flex: 1; }
.cmdk-item.active { background: var(--surface-3); }
.cmdk-item .go { color: var(--muted); opacity: 0; }
.cmdk-item.active .go { opacity: 1; }
.cmdk-item mark { background: none; color: var(--accent); font-weight: 700; }
.cmdk-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); background: var(--surface-2); }
.cmdk-foot span { display: inline-flex; gap: 6px; align-items: center; }
.cmdk-empty { padding: 36px; text-align: center; color: var(--muted); font-size: 14px; }

/* ── Tool page extras ── */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 48px 0; border-top: 1px solid var(--border); }
.info-grid h2 { font-size: 24px; margin-bottom: 18px; }
.steps { counter-reset: s; display: grid; gap: 14px; list-style: none; padding: 0; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; font-size: 15px; color: var(--text-2); }
.steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--text); color: var(--bg); display: grid; place-items: center; font-size: 13px; font-weight: 700; flex-shrink: 0; margin-top: -1px; }
.related { padding: 8px 0 64px; }
.related h2 { font-size: 24px; margin-bottom: 18px; }

/* ── Prose (legal pages) ── */
.prose { max-width: 760px; padding: 8px 0 72px; }
.prose h2 { font-size: 22px; margin: 36px 0 12px; }
.prose p, .prose li { color: var(--text-2); font-size: 15.5px; }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 20px; margin: 10px 0; display: grid; gap: 6px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; padding-bottom: 72px; }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); margin-top: 24px; }
.footer-top { display: grid; grid-template-columns: 1.3fr repeat(5, 1fr); gap: 28px; padding: 52px 0 36px; }
.footer-brand p { font-size: 14px; color: var(--text-2); margin: 14px 0 18px; max-width: 300px; }
.footer-col h4 { font-family: var(--f-ui); font-size: 13px; font-weight: 600; margin-bottom: 14px; letter-spacing: 0; }
.footer-col a { display: block; font-size: 14px; color: var(--text-2); padding: 4px 0; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding: 20px 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.footer-bottom a:hover { color: var(--text); }
.footer-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.footer-pills span { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-2); background: var(--surface); }

/* ── Diff ── */
.diff { font-family: var(--f-mono); font-size: 13px; line-height: 1.65; }
.diff-line { display: grid; grid-template-columns: 44px 44px 18px minmax(0, 1fr); white-space: pre-wrap; word-break: break-word; }
.diff-line .ln { color: var(--muted); text-align: right; padding-right: 10px; user-select: none; font-size: 12px; opacity: .8; }
.diff-line .sg { user-select: none; color: var(--muted); }
.diff-line.add { background: var(--ok-soft); } .diff-line.add .sg { color: var(--ok); }
.diff-line.del { background: var(--bad-soft); } .diff-line.del .sg { color: var(--bad); }
.diff-split { display: grid; grid-template-columns: 1fr 1fr; }
.diff-split > div { min-width: 0; border-right: 1px solid var(--border); }
.diff-split > div:last-child { border-right: 0; }
.diff-split .diff-line { grid-template-columns: 44px minmax(0, 1fr); min-height: 1.65em; }
.diff-split .diff-line.empty { background: repeating-linear-gradient(-45deg, transparent 0 6px, var(--surface-3) 6px 7px); }
ins.w { background: color-mix(in srgb, var(--ok) 26%, transparent); text-decoration: none; border-radius: 3px; }
del.w { background: color-mix(in srgb, var(--bad) 26%, transparent); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 60%, transparent); border-radius: 3px; }
.word-diff { padding: 18px; font-size: 14.5px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }

/* regex highlight */
.hl-wrap { position: relative; }
.hl-out { padding: 14px 16px; font-family: var(--f-mono); font-size: 13.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; min-height: 160px; }
.hl-out mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 3px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.hl-out mark:nth-of-type(even) { background: color-mix(in srgb, var(--c-seo) 26%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c-seo) 50%, transparent); }

/* JSON tree */
.json-tree { font-family: var(--f-mono); font-size: 13px; line-height: 1.7; padding: 14px 16px; overflow: auto; max-height: 560px; }
.json-tree details { padding-left: 16px; }
.json-tree summary { cursor: pointer; list-style: none; margin-left: -16px; }
.json-tree summary::before { content: '▸'; display: inline-block; width: 16px; color: var(--muted); transition: transform .12s; }
.json-tree details[open] > summary::before { transform: rotate(90deg); }
.json-tree summary::-webkit-details-marker { display: none; }
.json-tree .leaf { padding-left: 0; }
.jt-k { color: var(--c-text); } .jt-s { color: var(--ok); } .jt-n { color: var(--c-image); } .jt-b { color: var(--accent); } .jt-null { color: var(--muted); } .jt-meta { color: var(--muted); font-size: 12px; }
.code-hl .k { color: var(--c-text); } .code-hl .s { color: var(--ok); } .code-hl .n { color: var(--c-image); } .code-hl .b { color: var(--accent); } .code-hl .t { color: var(--c-file); } .code-hl .a { color: var(--c-seo); }

/* colour */
.swatch-big { height: 180px; border-radius: var(--r-lg) var(--r-lg) 0 0; position: relative; display: flex; align-items: flex-end; padding: 16px; }
.swatch-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-radius: 10px; overflow: hidden; height: 56px; }
.swatch-strip button { position: relative; font-size: 10.5px; font-family: var(--f-mono); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 5px; transition: transform .12s; }
.swatch-strip button:hover { transform: scaleY(1.08); z-index: 1; }
.contrast-card { border-radius: 10px; padding: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--border); }
.contrast-card .sample { font-size: 18px; font-weight: 600; }

/* social previews */
.pv-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); max-width: 520px; }
.pv-img { aspect-ratio: 1.91 / 1; background: var(--surface-3) center / cover no-repeat; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.pv-body { padding: 10px 12px; }
.pv-domain { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.pv-title { font-weight: 600; font-size: 15px; line-height: 1.3; margin: 2px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pv-desc { font-size: 13.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.serp { font-family: Arial, sans-serif; max-width: 600px; }
.serp-site { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); }
.serp-fav { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-size: 11px; font-weight: 700; border: 1px solid var(--border); }
.serp-url { font-size: 12px; color: var(--text-2); }
.serp-title { color: #1a0dab; font-size: 20px; line-height: 1.3; margin: 6px 0 3px; }
[data-theme="dark"] .serp-title { color: #99c3ff; }
.serp-desc { font-size: 14px; color: var(--text-2); line-height: 1.58; }

/* crop */
.crop-wrap { position: relative; display: inline-block; touch-action: none; user-select: none; line-height: 0; }
.crop-wrap img { max-height: 62vh; max-width: 100%; display: block; pointer-events: none; box-shadow: none; }
.crop-box { position: absolute; border: 1.5px solid #fff; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55); cursor: move; }
.crop-box::before, .crop-box::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
.crop-box::before { border-left: 1px solid rgba(255,255,255,.35); border-right: 1px solid rgba(255,255,255,.35); left: 33.33%; right: 33.33%; }
.crop-box::after { border-top: 1px solid rgba(255,255,255,.35); border-bottom: 1px solid rgba(255,255,255,.35); top: 33.33%; bottom: 33.33%; }
.crop-h { position: absolute; width: 14px; height: 14px; background: #fff; border-radius: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.crop-h[data-h="nw"] { left: -7px; top: -7px; cursor: nwse-resize; } .crop-h[data-h="ne"] { right: -7px; top: -7px; cursor: nesw-resize; }
.crop-h[data-h="sw"] { left: -7px; bottom: -7px; cursor: nesw-resize; } .crop-h[data-h="se"] { right: -7px; bottom: -7px; cursor: nwse-resize; }
.crop-h[data-h="n"] { left: calc(50% - 7px); top: -7px; cursor: ns-resize; } .crop-h[data-h="s"] { left: calc(50% - 7px); bottom: -7px; cursor: ns-resize; }
.crop-h[data-h="w"] { top: calc(50% - 7px); left: -7px; cursor: ew-resize; } .crop-h[data-h="e"] { top: calc(50% - 7px); right: -7px; cursor: ew-resize; }

/* pdf thumbs */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; padding: 16px; }
.thumb { position: relative; border-radius: 10px; border: 2px solid var(--border); background: var(--surface-2); padding: 6px; cursor: pointer; transition: border-color .12s; text-align: center; }
.thumb canvas { width: 100%; height: auto; border-radius: 4px; background: #fff; box-shadow: var(--shadow-sm); }
.thumb .pn { font-size: 12px; color: var(--muted); margin-top: 6px; font-weight: 500; }
.thumb.sel { border-color: var(--accent); background: var(--accent-soft); }
.thumb.sel::after { content: '✓'; position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700; display: grid; place-items: center; }

.qr-stage { display: grid; place-items: center; padding: 28px; background: var(--checker); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.qr-stage canvas { width: 260px; height: 260px; image-rendering: pixelated; border-radius: 8px; box-shadow: var(--shadow); }

.pw-display { font-family: var(--f-mono); font-size: clamp(18px, 2.4vw, 24px); font-weight: 500; padding: 22px; word-break: break-all; line-height: 1.45; min-height: 90px; letter-spacing: .01em; }
.pw-display .d { color: var(--c-image); } .pw-display .s { color: var(--c-text); }


/* ── Nav audit link ── */
.nav a, .nav-drop > button { white-space: nowrap; }
@media (max-width: 1200px) {
  .header-inner { gap: 14px; }
  .search-btn { min-width: 0; width: 38px; padding: 0; justify-content: center; border-color: transparent; background: none; }
  .search-btn .label-txt, .search-btn kbd { display: none; }
}
@media (max-width: 1000px) { .nav a.nav-opt { display: none; } }
.nav a.nav-audit { color: var(--accent); font-weight: 600; }
.nav a.nav-audit:hover, .nav a.nav-audit.active { background: var(--accent-soft); color: var(--accent); }

/* ── Keywords ── */
.kw-block { padding: 8px 0 40px; }
.kw-block h2 { font-size: 24px; margin-bottom: 8px; }
.kw-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kw { display: inline-block; font-size: 13px; padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
a.kw:hover { border-color: var(--accent); color: var(--accent); }
.seo-copy { color: var(--text-2); font-size: 15.5px; max-width: 860px; margin-top: 8px; }
.kw-index { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 36px; }
.kw-index h3 { font-family: var(--f-ui); font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; margin-bottom: 10px; letter-spacing: 0; }
.kw-index ul { list-style: none; padding: 0; display: grid; gap: 4px; }
.kw-index a { font-size: 14px; color: var(--text-2); }
.kw-index a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ── Audit ── */
.audit-band { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; padding: 40px; border-radius: var(--r-xl); background: linear-gradient(135deg, var(--accent-soft), transparent 60%), var(--surface); border: 1px solid var(--border); }
.audit-band h2 { font-size: clamp(26px, 3vw, 38px); }
.audit-band p { color: var(--text-2); margin: 10px 0 20px; max-width: 560px; }
.audit-checks { display: grid; gap: 10px; }
.audit-checks div { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); font-size: 14px; font-weight: 500; }
.audit-checks svg { color: var(--accent); }
.audit-form { position: relative; display: flex; gap: 8px; max-width: 620px; align-items: center; background: var(--surface); border: 1px solid var(--border-2); border-radius: 14px; padding: 6px 6px 6px 44px; box-shadow: var(--shadow); }
.audit-form > svg { position: absolute; left: 15px; color: var(--muted); }
.audit-form input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; height: 40px; font-size: 15.5px; }
.audit-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring), var(--shadow); }
.audit-form input.invalid { color: var(--bad); }
.audit-form.big input { height: 48px; font-size: 16.5px; }
.audit-hero { text-align: center; padding: 48px 0 24px; }
.audit-hero h1 { font-size: clamp(36px, 5.6vw, 68px); letter-spacing: -.04em; }
.audit-hero .audit-form { margin: 0 auto; }

/* ── Responsive ── */
@media (max-width: 1080px) {
  .workspace, .workspace.wide-side, .workspace.side-left { grid-template-columns: 1fr; }
  .side { position: static; }
  .cat-cards { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .footer-top { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .mega { width: 600px; grid-template-columns: repeat(2, 1fr); }
  .nav a { padding: 7px 9px; }
  .search-btn { min-width: 170px; }
  .kw-index { grid-template-columns: repeat(2, 1fr); }
  .audit-band { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav, .search-btn kbd { display: none; }
  .search-btn { min-width: 0; width: 38px; padding: 0; justify-content: center; border-color: transparent; background: none; }
  .search-btn .label-txt { display: none; }
  .menu-btn { display: grid; }
  .mobile-nav { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; z-index: 49; background: var(--bg); padding: 16px 24px 40px; overflow-y: auto; display: none; }
  .mobile-nav.open { display: block; }
  .mobile-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 16px; font-weight: 500; }
  .workspace.even, .info-grid, .band, .grid-3 { grid-template-columns: 1fr; }
  .faq-wrap { grid-template-columns: 1fr !important; gap: 24px !important; }
  .feature-grid { grid-template-columns: 1fr 1fr !important; }
  .band { padding: 32px 24px; }
  .page-head { flex-wrap: wrap; }
  .page-head-actions { margin-left: 0; width: 100%; }
  .diff-split { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .container { padding-inline: 16px; }
  body { font-size: 14.5px; }
  .hero { padding: 44px 0 24px; }
  .hero-search input { height: 54px; font-size: 15.5px; padding-right: 20px; }
  .hero-search kbd { display: none; }
  .cat-cards { grid-template-columns: 1fr 1fr; }
  .feature-grid, .grid-2 { grid-template-columns: 1fr !important; }
  .kw-index { grid-template-columns: 1fr; }
  .audit-band { padding: 24px 18px; }
  .audit-form { flex-wrap: wrap; padding: 6px; }
  .audit-form > svg { display: none; }
  .audit-form input { padding-left: 10px; }
  .audit-form .btn { width: 100%; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .tool-grid { grid-template-columns: 1fr; }
  .page-head .t-ico.lg { display: none; }
  .file-row { grid-template-columns: 44px minmax(0, 1fr); }
  .file-row .file-thumb { width: 44px; height: 44px; }
  .file-row .file-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .copy-row { grid-template-columns: 70px minmax(0, 1fr) auto; }
  .stage { min-height: 260px; }
  .panel-body { padding: 14px; }
  .fav-btn { opacity: 1; }
}
@media print { .site-header, .site-footer, .related, .info-grid { display: none; } }
