/* ==========================================================================
   ToolTesoro — main stylesheet (global layout, header, footer, homepage, themes)
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --bg: #fafafa;
  --bg-2: #f4f4f5;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --surface-3: #e9e9ec;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #18181b;
  --text-2: #3f3f46;
  --muted: #6b6b74;
  --primary: #047857;
  --primary-hover: #065f46;
  --primary-soft: #ecfdf5;
  --primary-text: #047857;
  --on-primary: #ffffff;
  --accent: #0d9488;
  --brand-1: #10b981;
  --brand-2: #047857;
  --hero-1: #064e3b;
  --hero-2: #022c22;
  --success: #15803d;
  --success-soft: #e8f7ee;
  --danger: #b91c1c;
  --danger-soft: #fdecec;
  --warning: #a16207;
  --warning-soft: #fdf6e3;
  --info-soft: #eef4ff;
  --code-bg: #f4f4f5;
  --focus: #10b981;
  --shadow-sm: 0 1px 2px rgba(24, 24, 27, .05);
  --shadow: 0 1px 3px rgba(24, 24, 27, .06), 0 6px 16px -4px rgba(24, 24, 27, .08);
  --shadow-lg: 0 4px 10px rgba(24, 24, 27, .05), 0 24px 48px -12px rgba(24, 24, 27, .16);
  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 64px;
  --container: 1240px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #09090b;
  --bg-2: #0f0f12;
  --surface: #151518;
  --surface-2: #1c1c20;
  --surface-3: #26262b;
  --border: #27272a;
  --border-strong: #3f3f46;
  --text: #fafafa;
  --text-2: #d4d4d8;
  --muted: #a1a1aa;
  --primary: #34d399;
  --primary-hover: #6ee7b7;
  --primary-soft: #062b21;
  --primary-text: #6ee7b7;
  --on-primary: #022c22;
  --accent: #2dd4bf;
  --hero-1: #053b2d;
  --hero-2: #011a14;
  --success: #4ade80;
  --success-soft: #11291b;
  --danger: #f87171;
  --danger-soft: #331517;
  --warning: #fbbf24;
  --warning-soft: #2e2410;
  --info-soft: #172035;
  --code-bg: #1c1c20;
  --focus: #34d399;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 8px 20px -6px rgba(0, 0, 0, .5);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, .45), 0 24px 56px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas, video { max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, h5, h6 { line-height: 1.25; margin: 0 0 .5em; color: var(--text); letter-spacing: -.015em; }
p { margin: 0 0 1em; }
a { color: var(--primary-text); text-underline-offset: 3px; }
a:hover { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:where(ul[class], ol[class]), .main-nav ul, .site-footer ul, .breadcrumb ol { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--primary) 30%, transparent); }
.icon { width: 20px; height: 20px; flex: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 880px; }
@media (max-width: 480px) { .container { padding: 0 16px; } }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; transition: top .2s; }
.skip-link:focus { top: 12px; color: var(--on-primary); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.25rem; letter-spacing: -.03em; flex: none; }
.logo:hover { color: var(--text); }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo-text b { color: var(--primary); font-weight: 800; }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 4px; }
.main-nav a { display: block; padding: 8px 14px; border-radius: 10px; color: var(--text-2); font-weight: 500; font-size: .95rem; text-decoration: none; transition: background .15s, color .15s; }
.main-nav a:hover { background: var(--surface-2); color: var(--text); }
.main-nav a[aria-current="page"] { color: var(--primary-text); background: var(--primary-soft); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); transition: background .15s, color .15s, border-color .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.theme-toggle .i-sun, [data-theme="dark"] .theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
.theme-toggle svg { transition: transform .4s ease; }
.theme-toggle:hover svg { transform: rotate(20deg); }
.nav-toggle { display: none; }
.nav-toggle .i-close { display: none; }
.nav-toggle[aria-expanded="true"] .i-menu { display: none; }
.nav-toggle[aria-expanded="true"] .i-close { display: block; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-grid; }
  .main-nav { position: absolute; left: 0; right: 0; top: var(--header-h); background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); padding: 10px 16px 16px; display: none; margin: 0; }
  .main-nav.open { display: block; animation: drop .18s ease-out; }
  .main-nav ul { flex-direction: column; gap: 2px; }
  .main-nav a { padding: 12px 14px; font-size: 1rem; }
  .header-actions { margin-left: auto; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Category icon tiles (colour + icon come from cats.css) ---------- */
.cat-ic { --s: 38px; display: inline-grid; place-items: center; width: var(--s); height: var(--s); flex: none; border-radius: 11px; background: color-mix(in srgb, var(--c, var(--primary)) 13%, transparent); }
.cat-ic::before { content: ""; width: 50%; height: 50%; background: var(--c, var(--primary)); -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
[data-theme="dark"] .cat-ic { background: color-mix(in srgb, var(--c, var(--primary)) 22%, transparent); }
[data-theme="dark"] .cat-ic::before { background: color-mix(in srgb, var(--c, var(--primary)) 55%, #fff); }
.cat-ic.sm { --s: 26px; border-radius: 8px; }
.cat-ic.lg { --s: 48px; border-radius: 14px; }
.cat-ic.xl { --s: 60px; border-radius: 18px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 28px 0 56px; overflow: hidden; isolation: isolate; color: #ecfdf5;
  background: radial-gradient(60% 80% at 85% 10%, rgba(52, 211, 153, .22), transparent 60%),
              radial-gradient(50% 70% at 0% 100%, rgba(16, 185, 129, .16), transparent 60%),
              linear-gradient(135deg, var(--hero-1), var(--hero-2)); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%); }
.hero-lang-wrap { display: flex; justify-content: flex-end; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: center; margin-top: 18px; }
.hero-inner { max-width: 720px; }
.hero h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; margin-bottom: 18px; color: #fff; }
.hero h1 .grad { display: block; color: #6ee7b7; font-size: .6em; margin-top: 12px; letter-spacing: -.02em; line-height: 1.2; }
.hero-sub { font-size: clamp(1rem, .95rem + .3vw, 1.15rem); color: rgba(236, 253, 245, .82); max-width: 600px; margin: 0 0 28px; }
.hero-search { position: relative; max-width: 640px; display: flex; align-items: center; background: #fff; color: #18181b; border: 2px solid rgba(110, 231, 183, .55); border-radius: 999px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .45); padding: 0 8px 0 20px; transition: border-color .15s, box-shadow .15s; }
.hero-search:focus-within { border-color: #34d399; box-shadow: 0 0 0 5px rgba(52, 211, 153, .3), 0 18px 40px -12px rgba(0, 0, 0, .45); }
.hero-search .kbd { background: #f4f4f5; border-color: #e4e4e7; color: #71717a; }
[data-theme="dark"] .hero-search { background: var(--surface); color: var(--text); }
[data-theme="dark"] .hero-search .kbd { background: var(--surface-2); border-color: var(--border); color: var(--muted); }
.hero .search-results { color: var(--text); }
.hero-panel { list-style: none; margin: 0; padding: 22px; display: grid; gap: 18px; border-radius: 20px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(110, 231, 183, .28); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.hero-panel li { display: flex; gap: 14px; align-items: flex-start; }
.hero-panel .icon { width: 38px; height: 38px; padding: 9px; border-radius: 12px; background: rgba(52, 211, 153, .16); color: #6ee7b7; flex: none; }
.hero-panel span { display: flex; flex-direction: column; }
.hero-panel b { color: #fff; font-size: 1rem; }
.hero-panel small { color: rgba(236, 253, 245, .72); font-size: .85rem; line-height: 1.4; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 28px; } .hero-panel { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .hero-panel { grid-template-columns: 1fr; padding: 18px; gap: 14px; } .hero-lang-wrap { justify-content: center; } }
.hero-search > .icon { color: var(--muted); width: 22px; height: 22px; }
.hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; padding: 18px 12px; font-size: 1.05rem; }
.hero-search input::-webkit-search-cancel-button { cursor: pointer; }
.kbd { display: inline-grid; place-items: center; min-width: 28px; height: 26px; padding: 0 7px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font: 600 .75rem var(--font); }
.hero-search .search-results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 20; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); text-align: left; max-height: 420px; overflow-y: auto; }
.hero-popular { margin: 18px 0 0; font-size: .9rem; color: rgba(236, 253, 245, .7); display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.hero-popular a { padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); color: #ecfdf5; text-decoration: none; font-weight: 500; transition: background .15s, border-color .15s; }
.hero-popular a:hover { background: rgba(52, 211, 153, .18); border-color: #34d399; color: #fff; }
@media (max-width: 600px) { .hide-sm { display: none; } .hero { padding-top: 20px; } }

/* Category menu (below hero) */
.cat-menu { margin-top: 40px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.sec-head h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.75rem); font-weight: 800; letter-spacing: -.025em; margin: 0 0 2px; }
.sec-head p { margin: 0; color: var(--muted); font-size: .95rem; }
.sec-more { display: inline-flex; align-items: center; gap: 6px; flex: none; font-weight: 600; font-size: .92rem; color: var(--primary-text); text-decoration: none; }
.sec-more:hover { text-decoration: underline; }
.sec-more .icon { width: 16px; height: 16px; }
.trust-bar { list-style: none; margin: 28px 0 0; padding: 20px 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.trust-bar li { display: flex; align-items: center; gap: 12px; }
.trust-bar .icon { width: 40px; height: 40px; padding: 10px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-text); flex: none; }
.trust-bar span { display: flex; flex-direction: column; line-height: 1.3; }
.trust-bar b { font-size: .93rem; color: var(--text); }
.trust-bar small { font-size: .82rem; color: var(--muted); }
@media (max-width: 900px) { .trust-bar { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .trust-bar { grid-template-columns: 1fr; padding: 16px; } .sec-more { display: none; } }
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.cat-card { display: flex; align-items: center; gap: 12px; height: 100%; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); box-shadow: var(--shadow-sm); transition: transform .15s, border-color .15s, box-shadow .15s; }
.cat-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 55%, var(--border)); box-shadow: var(--shadow); color: var(--text); }
.cc-text { display: flex; flex-direction: column; min-width: 0; }
.cc-name { font-weight: 600; font-size: .92rem; line-height: 1.3; }
.cc-count { font-size: .8rem; color: var(--muted); }
@media (max-width: 1100px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) {
  .cat-menu { padding: 0; }
  .cat-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding: 4px 16px 12px; scrollbar-width: none; }
  .cat-grid::-webkit-scrollbar { display: none; }
  .cat-grid li { flex: 0 0 auto; scroll-snap-align: start; }
  .cat-card { flex-direction: column; align-items: flex-start; width: 138px; gap: 10px; }
}

/* ---------- Tool directory ---------- */
.section-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin: 0 0 12px; }
.recent { margin-top: 8px; margin-bottom: 8px; }
.directory { padding: 24px 0 40px; }
.cat-section { padding: 28px; margin-bottom: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); scroll-margin-top: calc(var(--header-h) + 16px); }
.cat-section:target { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, var(--primary)) 40%, transparent); } 100% { box-shadow: var(--shadow-sm); } }
.cat-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.cat-head-text { flex: 1; min-width: 0; }
.cat-head h2 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem); margin: 0 0 2px; }
.cat-head p { margin: 0; color: var(--muted); font-size: .95rem; }
.cat-more { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 8px 14px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); text-decoration: none; font-weight: 600; font-size: .9rem; }
.cat-more:hover { background: var(--primary-soft); color: var(--primary-text); }
.cat-more .icon { width: 16px; height: 16px; }
.group-title { font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; margin: 22px 0 10px; }
.cat-head + .group-title { margin-top: 4px; }
@media (max-width: 600px) {
  .cat-section { padding: 18px 16px; border-radius: var(--radius); }
  .cat-head { flex-wrap: wrap; gap: 12px; }
  .cat-head p { display: none; }
  .cat-more { padding: 6px 10px; }
}

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.tool-link { display: flex; align-items: center; gap: 12px; height: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s, background .15s; }
a.tool-link:hover { border-color: color-mix(in srgb, var(--c) 60%, var(--border)); background: color-mix(in srgb, var(--c) 5%, var(--surface)); transform: translateY(-1px); box-shadow: var(--shadow); color: var(--text); }
.tool-link .cat-ic { --s: 34px; border-radius: 10px; }
.tl-text { display: flex; flex-direction: column; min-width: 0; }
.tl-name { font-weight: 600; font-size: .93rem; line-height: 1.3; }
.tl-desc { font-size: .8rem; color: var(--muted); line-height: 1.35; margin-top: 1px; }
.tool-link.is-soon { opacity: .62; cursor: default; }
.soon { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 6px; background: var(--surface-3); color: var(--muted); font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; vertical-align: 2px; }
@media (max-width: 600px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tool-link { padding: 10px; gap: 10px; }
  .tool-link .cat-ic { --s: 30px; }
  .tl-desc { display: none; }
  .tl-name { font-size: .86rem; }
}
@media (max-width: 340px) { .tool-grid { grid-template-columns: 1fr; } }

/* ---------- Search results (hero + modal) ---------- */
.search-results { padding: 6px; }
.search-results li a, .search-results li > span { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; }
.search-results li a:hover, .search-results li.active a { background: var(--primary-soft); }
.search-results .sr-name { font-weight: 600; font-size: .95rem; display: block; }
.search-results .sr-cat { font-size: .8rem; color: var(--muted); display: block; }
.search-results .sr-empty { padding: 16px; color: var(--muted); text-align: center; font-size: .95rem; }
.search-results li > span { opacity: .6; }
.search-results .cat-ic { --s: 32px; }
.search-modal { position: fixed; inset: 0; z-index: 300; display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.search-backdrop { position: absolute; inset: 0; background: rgba(9, 9, 11, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.search-panel { position: relative; width: 100%; max-width: 620px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .16s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.search-field { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--border); }
.search-field > .icon { color: var(--muted); }
.search-field input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; padding: 18px 4px; font-size: 1.05rem; }
.search-field .kbd { cursor: pointer; }
.search-panel .search-results { max-height: min(60vh, 460px); overflow-y: auto; }
body.modal-open { overflow: hidden; }

/* ---------- Page hero (static + category pages) ---------- */
.page-hero { padding: 28px 0 32px; background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: 10px; }
.page-hero .lead { font-size: 1.1rem; color: var(--text-2); margin: 0; max-width: 720px; }
.cat-hero { display: flex; gap: 20px; align-items: flex-start; }
.cat-count { margin: 10px 0 0; font-size: .9rem; color: var(--muted); font-weight: 500; }
.page-body { padding-top: 32px; padding-bottom: 56px; }
.cat-tools { margin-bottom: 40px; }
.cat-tools .group-title:first-child { margin-top: 0; }
.cat-prose { max-width: 820px; margin: 0 auto 40px; }
.other-cats h2 { font-size: 1.3rem; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); text-decoration: none; font-weight: 500; font-size: .92rem; }
.chip:hover { border-color: color-mix(in srgb, var(--c, var(--primary)) 60%, var(--border)); color: var(--text); }
@media (max-width: 600px) { .cat-hero { flex-direction: column; gap: 14px; } }

/* ---------- Breadcrumb ---------- */
.breadcrumb { margin-bottom: 16px; font-size: .88rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumb li { display: inline-flex; align-items: center; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin: 0 8px 0 4px; color: var(--border-strong); }
.breadcrumb a { color: var(--text-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-text); text-decoration: underline; }

/* ---------- Prose (SEO content) ---------- */
.prose { color: var(--text-2); font-size: 1.02rem; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: clamp(1.35rem, 1.2rem + .6vw, 1.7rem); margin: 2em 0 .6em; color: var(--text); font-weight: 700; }
.prose h3 { font-size: 1.18rem; margin: 1.6em 0 .5em; color: var(--text); font-weight: 650; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--primary); }
.prose strong { color: var(--text); font-weight: 650; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--code-bg); border: 1px solid var(--border); border-radius: 6px; padding: .1em .4em; }
.prose pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: 12px; padding: 16px; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; }
.prose blockquote { margin: 1.4em 0; padding: 14px 18px; border-left: 4px solid var(--primary); background: var(--primary-soft); border-radius: 0 12px 12px 0; color: var(--text); }
.prose blockquote p:last-child { margin: 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0 1.6em; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { background: var(--surface-2); color: var(--text); font-weight: 650; white-space: nowrap; }
.prose tbody tr:hover { background: var(--surface-2); }
.prose ol.howto { list-style: none; padding: 0; counter-reset: step; }
.prose ol.howto > li { counter-increment: step; position: relative; padding: 2px 0 2px 48px; margin: 0 0 16px; min-height: 34px; }
.prose ol.howto > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 10px; background: var(--primary); color: var(--on-primary); font-weight: 700; display: grid; place-items: center; font-size: .95rem; }
.prose .feature-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.prose .feature-list li { margin: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font-size: .96rem; line-height: 1.55; }
.prose .feature-list li strong { display: block; margin-bottom: 2px; }
.prose details.faq { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin: 0 0 10px; overflow: hidden; }
.prose details.faq summary { cursor: pointer; list-style: none; padding: 14px 48px 14px 18px; font-weight: 600; color: var(--text); position: relative; }
.prose details.faq summary::-webkit-details-marker { display: none; }
.prose details.faq summary::after { content: ""; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.prose details.faq[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.prose details.faq summary:hover { background: var(--surface-2); }
.prose details.faq > div { padding: 0 18px 4px; }
.prose .callout { padding: 16px 18px; border-radius: 12px; background: var(--info-soft); border: 1px solid var(--border); color: var(--text); margin: 1.4em 0; }
.prose .callout p:last-child { margin: 0; }
.prose .cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 1.2em 0 1.6em; }
.prose .cards li { margin: 0; padding: 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.prose .cards li strong { display: block; font-size: 1.02rem; margin-bottom: 4px; }
.prose .cards .icon { color: var(--primary); width: 24px; height: 24px; margin-bottom: 8px; }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; margin-bottom: 2.4em; }
.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cf-field { display: flex; flex-direction: column; gap: 6px; }
.cf-field label { font-weight: 600; font-size: .92rem; color: var(--text); }
.cf-field input, .cf-field select, .cf-field textarea { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 1rem; line-height: 1.5; }
.cf-field textarea { resize: vertical; min-height: 150px; }
.cf-field input:focus, .cf-field select:focus, .cf-field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
.cf-field [aria-invalid="true"] { border-color: var(--danger); }
.cf-error { margin: 0; font-size: .85rem; color: var(--danger); }
.cf-counter { margin: 0; font-size: .8rem; color: var(--muted); text-align: right; }
.cf-submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border: 0; border-radius: 12px; background: var(--primary); color: var(--on-primary); font-weight: 700; font-size: 1rem; }
.cf-submit:hover { background: var(--primary-hover); }
.cf-note { margin: 0; font-size: .85rem; color: var(--muted); }
.cf-status { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--success-soft); color: var(--success); font-weight: 500; }
.contact-info { display: flex; flex-direction: column; gap: 14px; }
.ci-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.ci-card h2 { font-size: 1.05rem !important; margin: 0 0 6px !important; }
.ci-card p { margin: 0 0 6px; font-size: .95rem; }
.ci-card .muted { color: var(--muted); font-size: .88rem; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } .cf-row { grid-template-columns: 1fr; } }

/* ---------- Home content ---------- */
.home-content { padding: 24px 0 64px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { color: var(--muted); font-size: .92rem; max-width: 340px; margin: 14px 0; }
.footer-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--success-soft); color: var(--success) !important; font-weight: 600; font-size: .85rem !important; }
.footer-badge .icon { width: 16px; height: 16px; }
.footer-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text); font-weight: 700; margin: 6px 0 14px; }
.site-footer ul li { margin: 0 0 8px; }
.site-footer ul a { color: var(--muted); text-decoration: none; font-size: .93rem; }
.site-footer ul a:hover { color: var(--primary-text); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 36px; padding-top: 20px; padding-bottom: 24px; border-top: 1px solid var(--border); font-size: .85rem; color: var(--muted); }
.footer-bottom p { margin: 0; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 420px) { .footer-grid { gap: 24px 16px; } }

/* ---------- Back to top + toasts ---------- */
.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); display: grid; place-items: center; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s, transform .2s, visibility .2s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--primary-text); border-color: var(--primary); }
.toast-region { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { pointer-events: auto; padding: 11px 18px; border-radius: 12px; background: var(--text); color: var(--bg); font-weight: 500; font-size: .93rem; box-shadow: var(--shadow-lg); animation: toast-in .2s ease-out; }
.toast.error { background: var(--danger); color: #fff; }
.toast.success { background: #15803d; color: #fff; }
.toast.hide { opacity: 0; transform: translateY(6px); transition: all .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  .site-header, .site-footer, .to-top, .search-modal, .side, .related, .trust-badges { display: none !important; }
  body { background: #fff; color: #000; }
}
.group-more{margin:6px 0 18px}.group-more a{display:inline-flex;align-items:center;gap:6px;font-weight:600;color:var(--primary-text);text-decoration:none;padding:8px 14px;border:1px dashed var(--border-strong);border-radius:var(--radius-sm)}.group-more a:hover{background:var(--primary-soft)}.group-more .icon{width:16px;height:16px}
.hero-tagline{font-weight:700;letter-spacing:.01em;color:#6ee7b7;margin:0 0 14px;font-size:.95rem}.footer-tagline{font-weight:600;color:var(--primary-text);margin:4px 0 8px}

/* Hero language switcher */
.hero-lang{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px 10px;margin:0 auto 18px}
.hero-lang .hl-label{display:inline-flex;align-items:center;gap:6px;font-size:.85rem;font-weight:600;color:var(--muted)}
.hero-lang .hl-label .icon{width:16px;height:16px}
.hero-lang ul{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;list-style:none;margin:0;padding:4px;background:var(--surface);border:1px solid var(--border);border-radius:999px}
.hero-lang .hl-btn{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:6px 14px;border-radius:999px;font-size:.9rem;font-weight:600;color:var(--text);text-decoration:none;transition:background .15s,color .15s}
.hero-lang a.hl-btn:hover,.hero-lang a.hl-btn:focus-visible{background:var(--primary-soft);color:var(--primary-text)}
.hero-lang .hl-btn.is-active{background:var(--primary);color:var(--on-primary)}
.hero-lang .hl-code{font-size:.7rem;font-weight:800;letter-spacing:.04em;padding:2px 5px;border-radius:5px;background:var(--surface-2);color:var(--primary-text)}
.hero-lang .is-active .hl-code{background:var(--surface);color:var(--primary-text)}
@media (max-width:480px){.hero-lang .hl-label{width:100%;justify-content:center}.hero-lang .hl-btn{padding:6px 11px}}
/* Hero language switcher on the emerald band */
.hero .hero-lang{margin:0}
.hero .hero-lang .hl-label{color:rgba(236,253,245,.7)}
.hero .hero-lang ul{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.16)}
.hero .hero-lang .hl-btn{color:#ecfdf5;min-height:32px;padding:4px 12px;font-size:.85rem}
.hero .hero-lang a.hl-btn:hover,.hero .hero-lang a.hl-btn:focus-visible{background:rgba(52,211,153,.18);color:#fff}
.hero .hero-lang .hl-btn.is-active{background:#10b981;color:#022c22}
.hero .hero-lang .hl-code{background:rgba(255,255,255,.12);color:#a7f3d0}
.hero .hero-lang .is-active .hl-code{background:rgba(2,44,34,.18);color:#022c22}
/* Category cards: card style closer to the new design */
.cat-card{padding:16px;border-radius:16px}
.cat-card:hover{box-shadow:0 10px 24px -12px color-mix(in srgb,var(--c) 45%,transparent)}.hero-go{display:inline-grid;place-items:center;width:46px;height:46px;margin-left:8px;border:0;border-radius:999px;background:#047857;color:#fff;flex:none;transition:background .15s,transform .15s}
.hero-go:hover{background:#065f46;transform:scale(1.04)}
.hero-go .icon{width:20px;height:20px}
.hero-search input{padding:16px 12px}
@media (min-width:1180px){.cat-grid{grid-template-columns:repeat(7,1fr)}}

/* ==========================================================================
   Emerald band for category + static pages, card shine, heading accents
   ========================================================================== */
.page-hero { position: relative; isolation: isolate; overflow: hidden; color: #ecfdf5; border-bottom: 0; padding: 26px 0 40px;
  background: radial-gradient(55% 90% at 90% 0%, rgba(52, 211, 153, .22), transparent 60%), linear-gradient(135deg, var(--hero-1), var(--hero-2)); }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 90%); mask-image: linear-gradient(180deg, #000, transparent 90%); }
.page-hero h1 { color: #fff; }
.page-hero .lead, .page-hero .cat-count { color: rgba(236, 253, 245, .86); }
.page-hero .lead a { color: #a7f3d0; }
.page-hero .cat-ic { background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.page-hero .cat-ic::before { background: color-mix(in srgb, var(--c, #34d399) 45%, #fff); }
.page-hero .breadcrumb a, .tool-band .breadcrumb a { color: rgba(236, 253, 245, .85); }
.page-hero .breadcrumb li, .tool-band .breadcrumb li { color: rgba(236, 253, 245, .65); }
.page-hero .breadcrumb li + li::before, .tool-band .breadcrumb li + li::before { color: rgba(255, 255, 255, .35); }
.page-hero .breadcrumb a:hover, .tool-band .breadcrumb a:hover { color: #fff; }

/* Shine sweep on cards */
.tool-link, .cat-card { position: relative; overflow: hidden; }
.tool-link::after, .cat-card::after { content: ""; position: absolute; top: 0; bottom: 0; left: -80%; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .6), transparent); transform: skewX(-20deg); transition: left .7s ease; }
[data-theme="dark"] .tool-link::after, [data-theme="dark"] .cat-card::after { background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .08), transparent); }
a.tool-link:hover::after, .cat-card:hover::after { left: 140%; }
.tool-link, .cat-card { box-shadow: 0 2px 0 var(--border), 0 6px 14px -12px rgba(24, 24, 27, .3); }
[data-theme="dark"] .tool-link, [data-theme="dark"] .cat-card { box-shadow: 0 2px 0 #0b0b0d; }

/* Heading accents in long-form content */
.prose h2 { position: relative; padding-left: 16px; }
.prose h2::before { content: ""; position: absolute; left: 0; top: .18em; bottom: .18em; width: 5px; border-radius: 4px; background: linear-gradient(180deg, #34d399, #047857); }
.cat-section .cat-head h2, .sec-head h2 { letter-spacing: -.025em; }
@media (prefers-reduced-motion: reduce) { .tool-link::after, .cat-card::after { display: none; } }
/* Search dropdown must float above the content below the hero */
.hero { overflow: visible; z-index: 5; }
.hero .hero-search { z-index: 6; }
.hero .search-results { z-index: 50; max-height: min(420px, 60vh); }

/* ================================================================
   Hero refresh 2026-10: animated aurora, floating format chips,
   staggered entrance, shimmering headline, search glow
   ================================================================ */
.hero-fx { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hero-blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; will-change: transform; }
.hero-blob.b1 { width: 520px; height: 520px; top: -180px; right: -120px; background: radial-gradient(circle, rgba(52,211,153,.75), rgba(16,185,129,0) 70%); animation: heroDrift1 18s ease-in-out infinite alternate; }
.hero-blob.b2 { width: 440px; height: 440px; bottom: -200px; left: -140px; background: radial-gradient(circle, rgba(45,212,191,.6), rgba(13,148,136,0) 70%); animation: heroDrift2 22s ease-in-out infinite alternate; }
.hero-blob.b3 { width: 300px; height: 300px; top: 30%; left: 45%; background: radial-gradient(circle, rgba(167,243,208,.35), rgba(167,243,208,0) 70%); animation: heroDrift3 26s ease-in-out infinite alternate; }
.hero-beam { position: absolute; top: -40%; left: -30%; width: 40%; height: 180%; transform: rotate(18deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.07), transparent); animation: heroBeam 9s ease-in-out infinite; }
@keyframes heroDrift1 { to { transform: translate(-120px, 90px) scale(1.15); } }
@keyframes heroDrift2 { to { transform: translate(140px, -80px) scale(1.1); } }
@keyframes heroDrift3 { to { transform: translate(-160px, -60px) scale(1.3); } }
@keyframes heroBeam { 0%, 15% { left: -40%; } 60%, 100% { left: 120%; } }
.hero::before { animation: heroGrid 40s linear infinite; }
@keyframes heroGrid { to { background-position: 44px 44px, 44px 44px; } }

.hero-badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 6px 14px 6px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600; letter-spacing: .01em; color: #d1fae5; background: rgba(255,255,255,.08); border: 1px solid rgba(110,231,183,.35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hero-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.7); animation: heroPulse 2s ease-out infinite; }
@keyframes heroPulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.7); } 80%, 100% { box-shadow: 0 0 0 10px rgba(52,211,153,0); } }

.hero h1 .grad { background: linear-gradient(90deg, #6ee7b7, #a7f3d0 25%, #5eead4 50%, #34d399 75%, #6ee7b7); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: heroShimmer 6s linear infinite; }
@keyframes heroShimmer { to { background-position: 200% center; } }

.hero-search { animation: heroGlow 4s ease-in-out infinite; }
@keyframes heroGlow { 0%, 100% { box-shadow: 0 18px 40px -12px rgba(0,0,0,.45), 0 0 0 0 rgba(52,211,153,0); } 50% { box-shadow: 0 18px 40px -12px rgba(0,0,0,.45), 0 0 28px 2px rgba(52,211,153,.28); } }
.hero-search:focus-within { animation: none; }

.hero-side { position: relative; }
.hero-panel { position: relative; z-index: 1; transition: transform .35s ease, box-shadow .35s ease; }
.hero-panel:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 24px 50px -20px rgba(0,0,0,.55); }
.hero-panel li { padding: 6px; margin: -6px; border-radius: 14px; transition: background .2s, transform .2s; }
.hero-panel li:hover { background: rgba(255,255,255,.06); transform: translateX(4px); }
.hero-panel li:hover .icon { background: #10b981; color: #022c22; }
.hero-panel .icon { transition: background .2s, color .2s; }

.hero-chip { position: absolute; z-index: 2; padding: 7px 12px; border-radius: 12px; font-size: .8rem; font-weight: 800; letter-spacing: .03em; color: #022c22; background: linear-gradient(135deg, #a7f3d0, #34d399); box-shadow: 0 12px 24px -10px rgba(0,0,0,.5); animation: heroFloat 6s ease-in-out infinite; }
.hero-chip.c1 { top: -18px; left: -26px; }
.hero-chip.c2 { top: 34%; right: -34px; animation-delay: -1.5s; background: linear-gradient(135deg, #fff, #d1fae5); }
.hero-chip.c3 { bottom: -16px; left: 18%; animation-delay: -3s; background: linear-gradient(135deg, #5eead4, #14b8a6); }
.hero-chip.c4 { bottom: 22%; left: -30px; animation-delay: -4.5s; background: linear-gradient(135deg, #fde68a, #fbbf24); }
@keyframes heroFloat { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-12px) rotate(2deg); } }
@media (max-width: 960px) { .hero-chip { display: none; } }

/* staggered entrance */
.hero-badge, .hero-tagline, .hero h1, .hero-sub, .hero-search, .hero-popular, .hero-side { animation-name: heroUp; animation-duration: .7s; animation-timing-function: cubic-bezier(.2,.7,.2,1); animation-fill-mode: both; }
.hero-badge { animation-delay: .05s; } .hero-tagline { animation-delay: .12s; } .hero h1 { animation-delay: .2s; } .hero-sub { animation-delay: .3s; }
.hero-popular { animation-delay: .5s; } .hero-side { animation-delay: .35s; }
.hero-search { animation: heroUp .7s cubic-bezier(.2,.7,.2,1) .4s both, heroGlow 4s ease-in-out 1.2s infinite; }
@keyframes heroUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ================================================================
   Footer social icons: neutral at rest, brand colours on hover/focus
   ================================================================ */
.footer-social { margin-top: 18px; }
.footer-social .footer-title { margin-bottom: 10px; }
.social-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.site-footer .social-list li { margin: 0; }
.soc { --brand: var(--primary); --glow: rgba(4,120,87,.35); position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; isolation: isolate; text-decoration: none; transition: color .25s, border-color .25s, transform .3s cubic-bezier(.3,1.6,.5,1), box-shadow .3s; }
.soc svg { width: 19px; height: 19px; transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.soc::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--brand); transform: translateY(101%); transition: transform .3s ease; }
.soc:hover, .soc:focus-visible { color: #fff; border-color: transparent; transform: translateY(-4px); box-shadow: 0 10px 22px -8px var(--glow); }
.soc:hover::before, .soc:focus-visible::before { transform: none; }
.soc:hover svg, .soc:focus-visible svg { transform: scale(1.12) rotate(-6deg); }
.soc:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.soc-facebook  { --brand: #1877f2; --glow: rgba(24,119,242,.55); }
.soc-x         { --brand: #000000; --glow: rgba(0,0,0,.55); }
.soc-linkedin  { --brand: #0a66c2; --glow: rgba(10,102,194,.55); }
.soc-pinterest { --brand: #e60023; --glow: rgba(230,0,35,.5); }
.soc-whatsapp  { --brand: #25d366; --glow: rgba(37,211,102,.55); }
.soc-telegram  { --brand: #26a5e4; --glow: rgba(38,165,228,.55); }
.soc-youtube   { --brand: #ff0000; --glow: rgba(255,0,0,.5); }
.soc-instagram { --brand: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); --glow: rgba(214,36,159,.55); }
.soc-tiktok    { --brand: #000000; --glow: rgba(37,244,238,.45); }
.soc-tiktok:hover svg, .soc-tiktok:focus-visible svg { filter: drop-shadow(-1.5px -1px 0 #25f4ee) drop-shadow(1.5px 1px 0 #fe2c55); }
[data-theme="dark"] .soc-x:hover, [data-theme="dark"] .soc-tiktok:hover { border-color: rgba(255,255,255,.35); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .soc-x:hover, :root:not([data-theme="light"]) .soc-tiktok:hover { border-color: rgba(255,255,255,.35); } }

@media (prefers-reduced-motion: reduce) {
  .hero-blob, .hero-beam, .hero::before, .hero-dot, .hero h1 .grad, .hero-search, .hero-chip,
  .hero-badge, .hero-tagline, .hero h1, .hero-sub, .hero-popular, .hero-side { animation: none !important; }
  .hero-beam { display: none; }
  .soc, .soc svg, .soc::before, .hero-panel, .hero-panel li { transition: none; }
}
/* hero grid children may shrink below their longest word/line (fixes horizontal scroll on narrow phones) */
.hero-grid > * { min-width: 0; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero-tagline, .hero-sub { overflow-wrap: anywhere; }
/* social icons must beat the generic ".site-footer ul a" colours */
.site-footer .social-list a.soc { color: var(--muted); text-decoration: none; }
.site-footer .social-list a.soc:hover, .site-footer .social-list a.soc:focus-visible { color: #fff; text-decoration: none; }
.hero-chip.c2 { right: -8px; top: 30%; }
/* chips sit on the panel's edges, never over its text */
.hero-chip.c1 { top: -22px; left: -18px; }
.hero-chip.c2 { top: -24px; right: 26px; left: auto; }
.hero-chip.c3 { bottom: -20px; right: 44px; left: auto; }
.hero-chip.c4 { bottom: 34%; left: -46px; }

/* ---------- Equal-width category cards + tidy card text (site-wide) ---------- */
.cat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 1180px) { .cat-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cat-grid > li { display: flex; min-width: 0; }
.cat-card { flex: 1; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 12px; min-height: 132px; padding: 18px 16px; }
.cat-card .cat-ic { --s: 42px; border-radius: 12px; }
.cc-text { gap: 4px; width: 100%; }
.cc-name { font-size: .95rem; font-weight: 650; line-height: 1.28; letter-spacing: -.01em; text-wrap: balance; hyphens: auto; overflow-wrap: break-word; }
.cc-count { font-size: .8rem; font-weight: 500; margin-top: auto; }
.cat-card .cc-count { display: inline-flex; align-self: flex-start; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--c, var(--primary)) 10%, transparent); color: color-mix(in srgb, var(--c, var(--primary)) 70%, var(--text)); }
[data-theme="dark"] .cat-card .cc-count { color: color-mix(in srgb, var(--c, var(--primary)) 50%, #fff); }
.trust-bar { margin-top: 32px; }
.tool-link { align-items: flex-start; }
.tool-link .cat-ic { margin-top: 1px; }
.tl-name, .tl-desc { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: break-word; hyphens: auto; }
.tl-name { -webkit-line-clamp: 2; }
.tl-desc { -webkit-line-clamp: 2; margin-top: 2px; }
@media (max-width: 600px) {
  .cat-grid > li { flex: 0 0 auto; }
  .cat-card { width: 140px; min-height: 120px; padding: 14px; gap: 10px; }
  .cat-card .cat-ic { --s: 36px; }
  .cc-name { font-size: .88rem; }
  .tl-desc { display: none; }
}@media (max-width: 600px) {
  .cat-menu > .sec-head { padding: 0 16px; }
  .cat-menu > .trust-bar { margin: 20px 16px 0; }
  .cat-grid { scroll-padding-inline: 16px; }
}
.recent { margin-top: 28px; }

/* ---------- Footer language switcher: one horizontal row ---------- */
.footer-bottom { align-items: center; }
.lang-switch { display: inline-flex; align-items: center; gap: 10px; }
.lang-switch > .icon { width: 18px; height: 18px; color: var(--muted); flex: none; }
.lang-switch ul { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 4px; list-style: none; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.lang-switch li { display: flex; }
.lang-switch a, .lang-switch span { display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; line-height: 1.2; color: var(--text-2); text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.lang-switch a:hover { background: var(--primary-soft); color: var(--primary-text); }
.lang-switch span[aria-current] { background: var(--primary); color: #fff; }
@media (max-width: 760px) {
  .footer-bottom { flex-direction: column; text-align: center; gap: 14px; }
  .lang-switch { order: -1; }
  .lang-switch a, .lang-switch span { padding: 6px 11px; }
}@media (max-width: 480px) { .lang-switch > .icon { display: none; } .lang-switch ul { gap: 2px; padding: 3px; flex-wrap: nowrap; } .lang-switch a, .lang-switch span { padding: 6px 9px; font-size: .8rem; } }

/* ---------- Header language menu (sticky with the header) ---------- */
.hdr-lang { position: relative; }
.hdr-lang > summary { list-style: none; cursor: pointer; }
.hdr-lang > summary::-webkit-details-marker { display: none; }
.hl-btn.icon-btn { width: auto; padding: 0 10px; gap: 6px; display: inline-flex; align-items: center; font-weight: 700; font-size: .85rem; color: var(--text); }
.hl-btn .icon { width: 18px; height: 18px; }
.hl-btn .hl-chev { width: 14px; height: 14px; transition: transform .2s; color: var(--muted); }
.hdr-lang[open] .hl-chev { transform: rotate(180deg); }
.hdr-lang[open] > .hl-btn { border-color: var(--primary); color: var(--primary-text); background: var(--primary-soft); }
.hl-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 120; animation: drop .16s ease-out; }
.hl-menu a, .hl-menu span { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: .92rem; font-weight: 500; }
.hl-menu b { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 4px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); font-size: .72rem; font-weight: 700; letter-spacing: .04em; }
.hl-menu a:hover, .hl-menu a:focus-visible { background: var(--primary-soft); color: var(--primary-text); }
.hl-menu span[aria-current] { background: var(--primary-soft); color: var(--primary-text); font-weight: 650; }
.hl-menu span[aria-current] b { background: var(--primary); color: #fff; }
.hl-menu .hl-check { width: 16px; height: 16px; margin-left: auto; }
@media (max-width: 480px) { .hl-btn .hl-chev { display: none; } .hl-btn.icon-btn { padding: 0 9px; } .header-actions { gap: 4px; } }@media (max-width: 420px) { .header-inner { gap: 8px; } .header-actions .icon-btn { width: 38px; height: 38px; border-radius: 11px; } .hl-btn.icon-btn { width: auto; padding: 0 8px; gap: 4px; } .logo { font-size: 1.08rem; gap: 7px; } .logo-mark { width: 30px; height: 30px; } }
