/* VisionFlow Tools — design system v2 (light + dark, EN + বাংলা). Class names are shared by every tool page. */
:root {
  --bg: #fafafa; --surface: #ffffff; --surface-2: #f4f4f5; --surface-3: #ebebee;
  --border: #e4e4e7; --border-strong: #d4d4d8; --text: #09090b; --text-2: #3f3f46; --muted: #6b6b75;
  --accent: #c8102e; --accent-soft: rgba(200, 16, 46, .08); --accent-ink: #ffffff;
  --inverse: #09090b; --inverse-ink: #fafafa;
  --ok: #157347; --warn: #9a6700; --err: #b42318; --info: #1d4ed8;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 1px rgba(0,0,0,.03), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 40px -12px rgba(0,0,0,.18), 0 4px 12px -4px rgba(0,0,0,.08);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
  --dot: rgba(9, 9, 11, .09);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Hind Siliguri", "Noto Sans Bengali", sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09090b; --surface: #111113; --surface-2: #18181b; --surface-3: #232327;
    --border: #26262b; --border-strong: #3a3a41; --text: #fafafa; --text-2: #d4d4d8; --muted: #9d9da8;
    --accent: #ff4d6a; --accent-soft: rgba(255, 77, 106, .12); --inverse: #fafafa; --inverse-ink: #09090b;
    --ok: #3ccf8e; --warn: #f5b83d; --err: #ff6b6b; --info: #6ea8ff;
    --shadow: 0 0 0 1px rgba(255,255,255,.02); --shadow-lg: 0 20px 50px -12px rgba(0,0,0,.7);
    --dot: rgba(255, 255, 255, .07); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09090b; --surface: #111113; --surface-2: #18181b; --surface-3: #232327;
  --border: #26262b; --border-strong: #3a3a41; --text: #fafafa; --text-2: #d4d4d8; --muted: #9d9da8;
  --accent: #ff4d6a; --accent-soft: rgba(255, 77, 106, .12); --inverse: #fafafa; --inverse-ink: #09090b;
  --ok: #3ccf8e; --warn: #f5b83d; --err: #ff6b6b; --info: #6ea8ff;
  --shadow: 0 0 0 1px rgba(255,255,255,.02); --shadow-lg: 0 20px 50px -12px rgba(0,0,0,.7);
  --dot: rgba(255, 255, 255, .07); color-scheme: dark;
}
:root[lang="bn"] { --font: "Hind Siliguri", "Noto Sans Bengali", "Inter", system-ui, sans-serif; }

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; min-height: 100vh; display: flex; flex-direction: column; }
:root[lang="bn"] body { font-size: 15.5px; line-height: 1.7; }
main { flex: 1 0 auto; overflow-x: clip; }
html, body { overflow-x: clip; }
a { color: inherit; }
img, canvas, video { max-width: 100%; }
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 560px) { .wrap { padding: 0 16px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
kbd { font: 600 11px/1 var(--mono); padding: 3px 5px; border-radius: 5px; border: 1px solid var(--border); border-bottom-width: 2px; background: var(--surface); color: var(--muted); }
code { font-family: var(--mono); font-size: .92em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }

/* ---------- Header */
.site-header { position: sticky; top: 0; z-index: 40; 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 var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: 10px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -.02em; font-size: 15.5px; white-space: nowrap; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(140deg, #ff3b5c, #c8102e 55%, #8a0a20); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 2px 8px -2px rgba(200,16,46,.5); flex: none; }
.brand-mark svg { width: 16px; height: 16px; }
.brand-sub { color: var(--muted); font-weight: 500; }
.hdr-nav { display: flex; gap: 2px; margin-left: 14px; }
.hdr-link { font: inherit; font-size: 14px; color: var(--muted); background: none; border: 0; padding: 7px 11px; border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.hdr-link:hover, .hdr-link[aria-expanded="true"] { color: var(--text); background: var(--surface-2); }
.hdr-link svg { width: 14px; height: 14px; stroke: currentColor; }
.search-pill { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 220px; height: 36px; padding: 0 8px 0 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer; box-shadow: var(--shadow); }
.search-pill:hover { border-color: var(--border-strong); color: var(--text-2); }
.search-pill svg { width: 15px; height: 15px; stroke: currentColor; flex: none; }
.search-pill span { flex: 1; text-align: left; }
.hdr-right { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; }
.chip-region { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px 0 9px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.chip-region:hover { border-color: var(--border-strong); }
.chip-region .live { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.chip-region .cc { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.btn-lang { height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); background: var(--accent-soft); color: var(--accent); font: 600 13.5px/1 "Hind Siliguri", var(--font); cursor: pointer; white-space: nowrap; }
.btn-lang:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
@media (max-width: 900px) { .hdr-nav { display: none; } .search-pill { min-width: 0; } .search-pill span, .search-pill kbd { display: none; } .search-pill { width: 36px; padding: 0; justify-content: center; } }
@media (max-width: 560px) { .brand-sub { display: none; } .chip-region .name { display: none; } }

/* ---------- Popovers / menus */
.pop { position: fixed; z-index: 60; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px; animation: pop .14s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.mega { width: min(640px, calc(100vw - 24px)); display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.mega a { display: flex; gap: 12px; padding: 10px; border-radius: 10px; text-decoration: none; align-items: flex-start; }
.mega a:hover, .mega a[aria-current="page"] { background: var(--surface-2); }
.mega b { display: block; font-size: 14px; font-weight: 600; }
.mega small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
@media (max-width: 560px) { .mega { grid-template-columns: 1fr; } }
.ticon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); flex: none; }
.ticon svg { width: 18px; height: 18px; stroke: var(--accent); }
.region-pop { width: min(340px, calc(100vw - 24px)); padding: 16px; }
.region-pop h4 { margin: 0 0 4px; font-size: 15px; }
.region-pop p { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.region-pop .kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; margin-bottom: 14px; }
.region-pop .kv dt { color: var(--muted); } .region-pop .kv dd { margin: 0; font-weight: 600; }

/* ---------- Command palette */
.cmdk-back { position: fixed; inset: 0; z-index: 80; background: rgba(9,9,11,.42); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 12px 12px; animation: fade .12s; }
@keyframes fade { from { opacity: 0; } }
.cmdk { width: min(620px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.cmdk-in svg { width: 18px; height: 18px; stroke: var(--muted); flex: none; }
.cmdk-in input { flex: 1; border: 0 !important; box-shadow: none !important; background: none !important; padding: 16px 0 !important; font-size: 16px !important; }
.cmdk-list { max-height: min(420px, 60vh); overflow: auto; padding: 6px; }
.cmdk-group { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
:root[lang="bn"] .cmdk-group { letter-spacing: 0; text-transform: none; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; text-decoration: none; color: var(--text); }
.cmdk-item .ticon { width: 30px; height: 30px; }
.cmdk-item .ticon svg { width: 16px; height: 16px; }
.cmdk-item b { font-weight: 600; font-size: 14px; } .cmdk-item small { color: var(--muted); font-size: 12.5px; margin-left: 4px; }
.cmdk-item kbd { margin-left: auto; }
.cmdk-item[aria-selected="true"] { background: var(--surface-2); }
.cmdk-foot { display: flex; gap: 14px; padding: 9px 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.cmdk-empty { padding: 26px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- Page header for tools */
.page-head { padding: 34px 0 22px; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--text); }
.crumbs .sep { opacity: .5; }
.page-title { display: flex; align-items: center; gap: 14px; }
.page-title .ticon { width: 44px; height: 44px; border-radius: 12px; }
.page-title .ticon svg { width: 22px; height: 22px; }
.page-head h1 { font-size: clamp(26px, 4vw, 36px); line-height: 1.15; margin: 0; letter-spacing: -.03em; font-weight: 700; }
:root[lang="bn"] .page-head h1 { letter-spacing: 0; line-height: 1.3; }
.page-head p { margin: 10px 0 0; color: var(--muted); max-width: 700px; font-size: 16px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.trust span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); padding: 4px 10px 4px 8px; border-radius: 99px; }
.trust svg { width: 13px; height: 13px; stroke: var(--ok); }
.bn { color: var(--muted); font-size: .92em; }

/* ---------- Layout */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; min-width: 0; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 860px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1 1 200px; min-width: 0; }
.section { margin: 0 0 44px; }
.sec-title { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
:root[lang="bn"] .sec-title { letter-spacing: 0; text-transform: none; font-size: 14px; }
h2 { letter-spacing: -.02em; }

/* ---------- Forms */
label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 7px; color: var(--text); }
label .hint, .hint { font-weight: 400; color: var(--muted); }
input[type=text], input[type=url], input[type=number], input[type=email], input[type=date], input[type=tel], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 10px 12px; outline: none; transition: border-color .12s, box-shadow .12s; min-height: 42px;
}
:root:not([data-theme="light"]) input, :root:not([data-theme="light"]) select, :root:not([data-theme="light"]) textarea { color-scheme: inherit; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--text) 30%, var(--border-strong)); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: var(--ring); }
input[type=color] { width: 46px; height: 40px; border: 1px solid var(--border-strong); border-radius: 9px; padding: 3px; background: var(--surface); cursor: pointer; }
input[type=range] { width: 100%; accent-color: var(--accent); }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
details > summary { list-style: none; } details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: ""; display: inline-block; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); margin: 0 10px 2px 2px; transition: transform .15s; }
details[open] > summary::before { transform: rotate(45deg); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 14.5px; font-weight: 600; border-radius: var(--radius-sm); padding: 10px 16px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; min-height: 42px; transition: background .12s, border-color .12s, transform .06s, box-shadow .12s; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; stroke: currentColor; }
.btn-primary { background: var(--inverse); border-color: var(--inverse); color: var(--inverse-ink); box-shadow: 0 1px 2px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.08); }
.btn-primary:hover { background: color-mix(in srgb, var(--inverse) 86%, var(--bg)); }
.btn-brand { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-brand:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-ghost { background: none; border-color: transparent; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 13.5px; border-radius: 9px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; max-width: 100%; }
.seg button { border: 0; background: transparent; font: inherit; font-size: 14px; padding: 7px 13px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 500; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--border); }

/* ---------- Feedback */
.msg { border-radius: var(--radius-sm); padding: 11px 13px; font-size: 14px; border: 1px solid transparent; }
.msg-err { background: color-mix(in srgb, var(--err) 9%, transparent); color: var(--err); border-color: color-mix(in srgb, var(--err) 22%, transparent); }
.msg-ok { background: color-mix(in srgb, var(--ok) 9%, transparent); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 22%, transparent); }
.msg-warn { background: color-mix(in srgb, var(--warn) 10%, transparent); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 24%, transparent); }
.hidden { display: none !important; }
.output { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; font-family: var(--mono); font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; color: var(--text-2); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--inverse); color: var(--inverse-ink); padding: 10px 16px; border-radius: 11px; font-size: 14px; font-weight: 500; z-index: 99; box-shadow: var(--shadow-lg); animation: toast .2s ease-out; max-width: calc(100vw - 32px); }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 8px); } }
@media (max-width: 760px) { .toast { bottom: 84px; } }
.drop { border: 1.5px dashed var(--border-strong); border-radius: var(--radius); padding: 30px 16px; text-align: center; color: var(--muted); cursor: pointer; background: var(--surface-2); transition: border-color .12s, background .12s; }
.drop:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border-strong)); }
.drop.over { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.drop .drop-ic { width: 38px; height: 38px; margin: 0 auto 10px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); }
.drop .drop-ic svg { width: 18px; height: 18px; stroke: var(--accent); }
.drop strong { color: var(--text); font-weight: 600; }
.progress { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #ff9a5a)); transition: width .2s; }
.checker { background-image: linear-gradient(45deg, #ddd 25%, transparent 25%), linear-gradient(-45deg, #ddd 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ddd 75%), linear-gradient(-45deg, transparent 75%, #ddd 75%);
  background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0; background-color: #fff; border-radius: var(--radius-sm); }
table th { font-weight: 600; font-size: 12.5px; color: var(--muted); }
table td, table th { border-bottom: 1px solid var(--border); }
.badge { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 2px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); margin-left: 7px; vertical-align: 2px; }

/* ---------- Home */
.hero { position: relative; padding: 64px 0 34px; text-align: center; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -60px -50vw 0; z-index: -1; background-image: radial-gradient(var(--dot) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 30%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 60% 70% at 50% 30%, #000 30%, transparent 75%); }
.hero::after { content: ""; position: absolute; left: 50%; top: -40px; width: min(720px, 90vw); height: 320px; transform: translateX(-50%); z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent); filter: blur(20px); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 5px 12px 5px 6px; box-shadow: var(--shadow); margin-bottom: 22px; }
.eyebrow b { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; letter-spacing: .03em; }
.hero h1 { font-size: clamp(34px, 6.2vw, 62px); line-height: 1.04; letter-spacing: -.045em; margin: 0 auto 18px; max-width: 860px; font-weight: 750; }
:root[lang="bn"] .hero h1 { letter-spacing: -.01em; line-height: 1.25; font-size: clamp(30px, 5.4vw, 52px); }
.hero h1 .grad { background: linear-gradient(100deg, var(--text) 10%, var(--accent) 55%, #ff8a4c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { font-size: clamp(16px, 2vw, 18.5px); color: var(--muted); max-width: 640px; margin: 0 auto; }

.smart { max-width: 720px; margin: 34px auto 0; text-align: left; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 18px; box-shadow: var(--shadow-lg); transition: border-color .15s, box-shadow .15s; }
.smart:focus-within { border-color: var(--accent); box-shadow: var(--shadow-lg), var(--ring); }
.smart.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.smart-in { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 8px; }
.smart-in > svg { width: 20px; height: 20px; stroke: var(--muted); margin-top: 10px; flex: none; }
.smart textarea, .cmdk-in input { outline: none !important; }
@media (max-width: 560px) { .smart textarea { min-height: 76px; font-size: 16px !important; } }
.smart textarea { border: 0 !important; box-shadow: none !important; background: none !important; padding: 8px 0 !important; min-height: 46px; max-height: 180px; resize: none; font-size: 17px !important; line-height: 1.5; }
.smart-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px 10px 16px; flex-wrap: wrap; border-top: 1px dashed transparent; }
.smart-detect { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; margin-right: auto; min-height: 34px; }
.smart-detect .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }
.smart-detect.on .dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.smart-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.smart-hints { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.smart-hints button { font: inherit; font-size: 13px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 5px 12px; cursor: pointer; }
.smart-hints button:hover { color: var(--text); border-color: var(--border-strong); }

.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tool { position: relative; display: flex; flex-direction: column; text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); transition: border-color .15s, transform .15s, box-shadow .15s; overflow: hidden; min-height: 176px; }
.tool::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .2s; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 9%, transparent), transparent 45%); }
.tool:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.tool:hover::before { opacity: 1; }
.tool h3 { margin: 16px 0 6px; font-size: 16px; letter-spacing: -.01em; display: flex; align-items: center; }
.tool p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.tool .go { margin-top: auto; padding-top: 14px; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tool:hover .go { color: var(--accent); }
.tool .go svg { width: 14px; height: 14px; stroke: currentColor; transition: transform .15s; }
.tool:hover .go svg { transform: translateX(3px); }
.tool .icon { width: 40px; height: 40px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; }
.tool .icon svg { width: 20px; height: 20px; stroke: var(--accent); }
.tool .tag { position: absolute; top: 18px; right: 18px; font-size: 11px; font-weight: 600; color: var(--muted); border: 1px solid var(--border); border-radius: 99px; padding: 2px 8px; }

.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .pillars { grid-template-columns: minmax(0, 1fr); } }
.pillar { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.pillar svg { width: 20px; height: 20px; stroke: var(--accent); }
.pillar h4 { margin: 10px 0 4px; font-size: 14.5px; }
.pillar p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

.audience { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 820px) { .audience { grid-template-columns: minmax(0, 1fr); } }
.aud { padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.aud .lvl { font: 600 11.5px/1 var(--mono); color: var(--accent); }
.aud h4 { margin: 10px 0 6px; font-size: 16px; }
.aud p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.term { background: #0b0b0e; color: #d7d7de; border-radius: var(--radius-sm); padding: 12px 14px; font: 12.5px/1.6 var(--mono); overflow-x: auto; white-space: pre; border: 1px solid #222228; }
.term .c { color: #6f6f7a; } .term .k { color: #ff7a90; } .term .s { color: #9fe0a8; }

/* ---------- Tool page extras (rendered by common.js) */
.extras { margin-top: 40px; display: grid; gap: 16px; }
.next { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.next .lbl { font-size: 13px; color: var(--muted); margin-right: 4px; }
.next a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 13.5px; font-weight: 500; padding: 6px 12px 6px 7px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); }
.next a:hover { border-color: var(--border-strong); background: var(--surface-2); }
.next a .ticon { width: 24px; height: 24px; border-radius: 7px; } .next a .ticon svg { width: 13px; height: 13px; }
.dev summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.dev summary .badge { margin-left: 0; font-family: var(--mono); }
.dev .term { margin-top: 12px; }
.dev p { color: var(--muted); font-size: 13.5px; margin: 10px 0 0; }
.copy-term { position: relative; }
.copy-term button { position: absolute; top: 8px; right: 8px; font: 600 11.5px var(--font); color: #c8c8d0; background: #1c1c22; border: 1px solid #2c2c33; border-radius: 7px; padding: 4px 9px; cursor: pointer; }

/* ---------- Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 56px; padding: 40px 0 36px; color: var(--muted); font-size: 13.5px; background: color-mix(in srgb, var(--surface-2) 45%, var(--bg)); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-grid h5 { margin: 0 0 12px; font-size: 12.5px; color: var(--text); font-weight: 600; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot-grid a { text-decoration: none; } .foot-grid a:hover { color: var(--text); }
.foot-grid p { margin: 12px 0 0; line-height: 1.55; max-width: 300px; }
.foot-bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); }
.foot-bottom select { width: auto; min-height: 34px; padding: 5px 32px 5px 10px; font-size: 13px; }
.status-dot { display: inline-flex; align-items: center; gap: 7px; }
.status-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

/* ---------- Mobile bottom bar */
.bottom-nav { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border); }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; font: inherit; font-size: 10.5px; font-weight: 500; color: var(--muted); text-decoration: none; background: none; border: 0; border-radius: 10px; cursor: pointer; }
  .bottom-nav svg { width: 21px; height: 21px; stroke: currentColor; }
  .bottom-nav [aria-current="page"] { color: var(--accent); }
}
@media print { .site-header, .site-footer, .bottom-nav, .extras, .no-print { display: none !important; } body { background: #fff; padding: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
