/* NTLB shared styles for tool pages */
:root {
    --paper: #F6F5F1; --surface: #FFFFFF; --sunken: #EFEDE7;
    --ink: #15171C; --ink-2: #474C57; --ink-3: #737985;
    --line: #E3E0D8; --line-strong: #CFCBC1;
    --accent: #E0522A; --accent-hover: #C7431E; --accent-soft: #FCE9E2;
    --ok: #1F8A4C; --ok-soft: #E3F4EA;
    --focus: #2F6FEB;
    --radius: 14px; --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(21, 23, 28, .05), 0 6px 20px -8px rgba(21, 23, 28, .12);
    --shadow-lg: 0 2px 4px rgba(21, 23, 28, .06), 0 24px 48px -16px rgba(21, 23, 28, .22);
    --display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
    --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace;
    --wrap: 1200px;
    --page: #F6F5F1;
    --c-writing: #3E6B33; --t-writing: #E7F0E1;
    --c-code: #2B5797; --t-code: #E4ECF7;
    --c-finance: #8A5B0F; --t-finance: #F6ECD9;
    --c-productivity: #8B3A63; --t-productivity: #F4E5EE;
    --c-design: #B23A2C; --t-design: #FBE6E1;
    --c-media: #1D6B66; --t-media: #E1F1EF;
    --c-general: #4A4592; --t-general: #EAE8F6;
    --c-games: #6D3FD6; --t-games: #EEE8FB;
    --c-learning: #0B7A99; --t-learning: #E0F3F8;
    --c-seo: #475569; --t-seo: #E8EDF3;
    --c-random: #B4236B; --t-random: #FBE7F1;
    --c-kitchen: #C2410C; --t-kitchen: #FFEDD5;
}
:root[data-theme="dark"], .tool-hero, .site-footer, .site-header.on-dark {
    --paper: #121317; --surface: #1B1D22; --sunken: #17191D;
    --ink: #F2F1ED; --ink-2: #BFC2C9; --ink-3: #959AA4;
    --line: #2B2E35; --line-strong: #3D4149;
    --accent: #FF6A3D; --accent-hover: #FF8662; --accent-soft: #3A1E15;
    --ok: #5FD394; --ok-soft: #16291E;
    --focus: #6EA0FF;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -10px rgba(0, 0, 0, .5);
    --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, .6);
    --c-writing: #9CCB8C; --t-writing: #1E2A1B; --c-code: #8DB4F0; --t-code: #1A2433;
    --c-finance: #E3B866; --t-finance: #2C2416; --c-productivity: #E59DC2; --t-productivity: #2D1C25;
    --c-design: #F2958A; --t-design: #301D1A; --c-media: #7CCFC6; --t-media: #16292A;
    --c-general: #ADA7F0; --t-general: #211F33;
    --c-games: #B79CFF; --t-games: #241D36;
    --c-learning: #6CCFE6; --t-learning: #13282D;
    --c-seo: #AAB6C8; --t-seo: #1C222B;
    --c-random: #F59CC8; --t-random: #2E1A25;
    --c-kitchen: #FDBA74; --t-kitchen: #2D1E14;
}
:root[data-theme="dark"] { --page: #121317; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --paper: #121317; --surface: #1B1D22; --sunken: #17191D;
        --ink: #F2F1ED; --ink-2: #BFC2C9; --ink-3: #959AA4;
        --line: #2B2E35; --line-strong: #3D4149;
        --accent: #FF6A3D; --accent-hover: #FF8662; --accent-soft: #3A1E15;
        --ok: #5FD394; --ok-soft: #16291E;
        --focus: #6EA0FF;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -10px rgba(0, 0, 0, .5);
        --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, .6);
        --c-writing: #9CCB8C; --t-writing: #1E2A1B; --c-code: #8DB4F0; --t-code: #1A2433;
        --c-finance: #E3B866; --t-finance: #2C2416; --c-productivity: #E59DC2; --t-productivity: #2D1C25;
        --c-design: #F2958A; --t-design: #301D1A; --c-media: #7CCFC6; --t-media: #16292A;
        --c-general: #ADA7F0; --t-general: #211F33;
        --c-games: #B79CFF; --t-games: #241D36;
        --c-learning: #6CCFE6; --t-learning: #13282D;
        --c-seo: #AAB6C8; --t-seo: #1C222B;
        --c-random: #F59CC8; --t-random: #2E1A25;
        --c-kitchen: #FDBA74; --t-kitchen: #2D1E14;
        --page: #121317;
    }
}
.tool-hero, .site-footer, .site-header.on-dark { color: var(--ink); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
kbd { font-family: var(--body); font-size: .72rem; font-weight: 600; color: var(--ink-3); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; background: var(--paper); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 86%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: background-color .25s, border-color .25s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header.on-dark { background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.site-header.on-dark.scrolled { background: rgba(18, 19, 23, .82); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); border-bottom-color: rgba(255, 255, 255, .06); }
.site-header.menu-open { background: var(--paper); transition: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: var(--line); box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .45); }
.header-row { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.03em; line-height: 1.1; }
.brand-mark { width: 30px; height: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.brand-mark span { background: var(--ink); border-radius: 3px; }
.brand-mark span:nth-child(4) { background: var(--accent); border-radius: 50%; }
.brand small { display: block; font-family: var(--body); font-weight: 500; font-size: .72rem; letter-spacing: 0; color: var(--ink-3); margin-top: 1px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav > a, .nav > .dd > button { padding: 8px 12px; border-radius: 8px; font-size: .95rem; font-weight: 500; color: var(--ink-2); background: none; border: 0; display: inline-flex; align-items: center; gap: 6px; }
.nav > a:hover, .nav > .dd > button:hover, .nav > .dd.open > button { color: var(--ink); background: var(--sunken); }
.dd { position: relative; }
.dd svg.i { width: 16px; height: 16px; transition: transform .2s; }
.dd.open > button svg.i { transform: rotate(180deg); }
.dd-panel { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: 560px; padding: 10px; display: none; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.dd.open .dd-panel { display: grid; }
.dd-panel a { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 10px; }
.dd-panel a:hover { background: var(--sunken); }
.dd-panel strong { display: block; font-size: .93rem; font-weight: 600; }
.dd-panel a > span:last-child > span { display: block; font-size: .8rem; color: var(--ink-3); line-height: 1.35; }
.mini-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--t); color: var(--c); flex: none; }
.mini-ico svg.i { width: 18px; height: 18px; }
.search-trigger { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 12px; margin-left: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; color: var(--ink-3); font-size: .9rem; }
.search-trigger:hover { border-color: var(--line-strong); color: var(--ink-2); }
.theme-btn, .icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); display: inline-grid; place-items: center; }
.theme-btn { margin-left: 6px; }
.theme-btn:hover, .icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.theme-btn svg.i, .icon-btn svg.i { width: 18px; height: 18px; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-btn .sun { display: none; }
    :root:not([data-theme="light"]) .theme-btn .moon { display: block; }
}
.menu-btn, .search-btn-m { display: none; }
.mobile-nav { display: none; }

/* ---------- Search modal ---------- */
.palette { position: fixed; inset: 0; z-index: 90; display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; background: rgba(12, 13, 16, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.palette.open { display: flex; }
.palette-box { width: 100%; max-width: 640px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 60px; border-bottom: 1px solid var(--line); }
.palette-input svg.i { color: var(--ink-3); }
.palette-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 1.05rem; color: var(--ink); }
.palette-list { max-height: min(420px, 60vh); overflow-y: auto; padding: 8px; }
.p-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: 8px 12px 6px; }
.p-item { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 10px; }
.p-item[aria-selected="true"], .p-item:hover { background: var(--sunken); }
.p-item .txt { display: block; min-width: 0; flex: 1; }
.p-item strong { display: block; font-weight: 600; font-size: .96rem; }
.p-item .txt > span { display: block; font-size: .84rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-item .cat { font-size: .75rem; font-weight: 600; color: var(--c); white-space: nowrap; }
.p-item mark { background: none; color: var(--accent); }
.p-empty { padding: 18px 12px; color: var(--ink-2); }
.p-empty a { color: var(--accent); font-weight: 600; }

/* ---------- Tool hero ---------- */
.tool-hero { position: relative; isolation: isolate; overflow: hidden; margin-top: -68px; padding: 108px 0 170px; background: linear-gradient(to bottom, var(--paper) 0%, var(--paper) 55%, color-mix(in srgb, var(--paper) 72%, var(--page)) 100%); }
.tool-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(45% 70% at 6% 0%, rgba(255, 106, 61, .28), transparent 70%), radial-gradient(40% 70% at 94% 10%, rgba(91, 141, 239, .24), transparent 70%); }
.hills { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 120px; display: block; pointer-events: none; z-index: -1; fill: var(--page); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; margin: 0 0 18px; padding: 0; font-size: .88rem; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.tool-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 700; letter-spacing: -0.035em; max-width: 18em; }
.tool-hero .lede { font-size: 1.1rem; color: var(--ink-2); max-width: 40em; margin: 14px 0 20px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: .82rem; font-weight: 500; color: var(--ink-2); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.badge svg.i { width: 14px; height: 14px; color: var(--accent); }
.badge.cat { color: var(--c); border-color: color-mix(in srgb, var(--c) 40%, transparent); }

/* ---------- Tool panel ---------- */
.tool-wrap { position: relative; z-index: 2; margin-top: -132px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.toolbar .spacer { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: .9rem; font-weight: 600; color: var(--ink); transition: border-color .15s, background .15s, color .15s; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn svg.i { width: 16px; height: 16px; }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--sunken); border-color: transparent; color: var(--ink); }
.btn.danger:hover { color: var(--accent); }
.field-label { display: block; font-size: .8rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.input { height: 40px; width: 100%; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); }
.input:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent); }
.status { font-size: .8rem; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

/* ---------- Workspace (big tools with an Expand mode) ---------- */
:root { --syn-tag: #1F5FB8; --syn-attr: #8A5B0F; --syn-str: #2E7D3A; --syn-com: #8B909A; --syn-kw: #A2348B; --syn-num: #B5481F; --syn-def: #2B5797; }
:root[data-theme="dark"] { --syn-tag: #7FB3FF; --syn-attr: #E3B866; --syn-str: #8FD694; --syn-com: #7A808C; --syn-kw: #E59DC2; --syn-num: #FF9C7A; --syn-def: #8DB4F0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --syn-tag: #7FB3FF; --syn-attr: #E3B866; --syn-str: #8FD694; --syn-com: #7A808C; --syn-kw: #E59DC2; --syn-num: #FF9C7A; --syn-def: #8DB4F0; } }

.ws { display: flex; flex-direction: column; height: 640px; overflow: hidden; }
.ws-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.ws-bar .spacer { flex: 1; }
.ws-bar .sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.ws-title { font-weight: 600; font-size: .92rem; display: none; align-items: center; gap: 8px; margin-right: 6px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--sunken); border: 1px solid var(--line); }
.seg button { height: 30px; min-width: 32px; padding: 0 9px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-3); display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: .84rem; font-weight: 600; }
.seg button svg.i { width: 16px; height: 16px; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 500; color: var(--ink-2); cursor: pointer; user-select: none; padding: 0 6px; }
.switch input { appearance: none; -webkit-appearance: none; width: 34px; height: 20px; border-radius: 99px; background: var(--line-strong); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(14px); }
.ws-main { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: var(--split, 50%) 8px minmax(0, 1fr); }
.ws-main.stack { grid-template-columns: 1fr; grid-template-rows: var(--split, 50%) 8px minmax(0, 1fr); }
.ws-main.only-code { grid-template-columns: 1fr; }
.ws-main.only-code .ws-gutter, .ws-main.only-code .ws-pane.preview { display: none; }
.ws-main.only-preview { grid-template-columns: 1fr; }
.ws-main.only-preview .ws-gutter, .ws-main.only-preview .ws-pane.code { display: none; }
.ws-pane { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.ws-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 34px; padding: 0 12px; font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line); background: var(--sunken); flex: none; }
.ws-label b { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink-2); font-size: .8rem; }
.ws-gutter { background: var(--sunken); border-left: 1px solid var(--line); border-right: 1px solid var(--line); cursor: col-resize; position: relative; touch-action: none; }
.ws-main.stack .ws-gutter { cursor: row-resize; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ws-gutter::after { content: ""; position: absolute; left: 50%; top: 50%; width: 2px; height: 32px; border-radius: 2px; background: var(--line-strong); transform: translate(-50%, -50%); }
.ws-main.stack .ws-gutter::after { width: 32px; height: 2px; }
.ws-gutter:hover::after, .ws-gutter.drag::after { background: var(--accent); }
.ws-main.dragging iframe { pointer-events: none; }
.ws-code { flex: 1; min-height: 0; position: relative; }
.ws-code textarea.raw { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; outline: 0; resize: none; padding: 12px 14px; font-family: var(--mono); font-size: 14px; line-height: 1.6; background: var(--surface); color: var(--ink); tab-size: 2; }
.ws-stage { flex: 1; min-height: 0; overflow: auto; background: var(--sunken); display: flex; justify-content: center; }
.ws-stage iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; transition: width .2s ease; }
.ws-stage.device iframe { margin: 14px auto; height: calc(100% - 28px); border-radius: 12px; box-shadow: 0 0 0 1px var(--line-strong), var(--shadow); flex: none; }
.ws-status { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 7px 12px; border-top: 1px solid var(--line); font-size: .78rem; color: var(--ink-3); flex: none; }
.ws-status span { display: inline-flex; gap: 6px; align-items: center; }
.ws-console { flex: none; max-height: 150px; overflow: auto; border-top: 1px solid var(--line); background: var(--surface); font-family: var(--mono); font-size: 12.5px; display: none; }
.ws-console.open { display: block; }
.ws-console div { padding: 5px 12px; border-bottom: 1px solid var(--line); white-space: pre-wrap; word-break: break-word; color: var(--ink-2); }
.ws-console div.err { color: #D93A2B; background: color-mix(in srgb, #D93A2B 8%, transparent); }
.ws-console div.warn { color: #A86B00; }
.ws-console .empty { color: var(--ink-3); }
.count-pill { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; font-size: .7rem; background: var(--line); color: var(--ink-2); }
.count-pill.err { background: #D93A2B; color: #fff; }
.mtabs { display: none; }

/* Expanded: the workspace fills the screen */
.ws.ws-full { position: fixed; inset: 0; z-index: 85; height: auto; border-radius: 0; border: 0; }
.ws.ws-full .ws-title { display: inline-flex; }
body.ws-open { overflow: hidden; }
body.ws-open .tool-wrap { z-index: 86; }

/* CodeMirror look, matched to the site */
.ws-code .CodeMirror { position: absolute; inset: 0; height: 100%; font-family: var(--mono); font-size: 14px; line-height: 1.6; background: var(--surface); color: var(--ink); }
.ws-code .CodeMirror-gutters { background: var(--sunken); border-right: 1px solid var(--line); }
.ws-code .CodeMirror-linenumber { color: var(--ink-3); padding: 0 8px 0 10px; }
.ws-code .CodeMirror-cursor { border-left: 2px solid var(--accent); }
.ws-code .CodeMirror-selected, .ws-code .CodeMirror-focused .CodeMirror-selected { background: color-mix(in srgb, var(--focus) 22%, transparent); }
.ws-code .CodeMirror-activeline-background { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.ws-code .cm-s-default .CodeMirror-matchingbracket, .ws-code .cm-s-default .CodeMirror-matchingtag { background: color-mix(in srgb, var(--accent) 18%, transparent); color: inherit !important; }
.ws-code .cm-s-default .cm-tag { color: var(--syn-tag); }
.ws-code .cm-s-default .cm-variable, .ws-code .cm-s-default .cm-operator { color: var(--ink); }
.ws-code .cm-s-default .cm-variable-3, .ws-code .cm-s-default .cm-type, .ws-code .cm-s-default .cm-builtin { color: var(--syn-def); }
.ws-code .cm-s-default .cm-error { color: #D93A2B; }
.ws-code .cm-s-default .cm-attribute { color: var(--syn-attr); }
.ws-code .cm-s-default .cm-string { color: var(--syn-str); }
.ws-code .cm-s-default .cm-comment { color: var(--syn-com); font-style: italic; }
.ws-code .cm-s-default .cm-keyword { color: var(--syn-kw); }
.ws-code .cm-s-default .cm-number, .ws-code .cm-s-default .cm-atom { color: var(--syn-num); }
.ws-code .cm-s-default .cm-def, .ws-code .cm-s-default .cm-property, .ws-code .cm-s-default .cm-variable-2 { color: var(--syn-def); }
.ws-code .cm-s-default .cm-bracket, .ws-code .cm-s-default .cm-meta, .ws-code .cm-s-default .cm-qualifier { color: var(--ink-3); }

@media (max-width: 760px) {
    .ws { height: 560px; }
    .ws-bar { gap: 4px; padding: 8px; }
    .ws-bar .hide-m { display: none; }
    .mtabs { display: inline-flex; }
    .ws-main, .ws-main.stack { grid-template-columns: 1fr !important; grid-template-rows: 1fr !important; }
    .ws-gutter { display: none !important; }
    .ws-main .ws-pane.preview { display: none; }
    .ws-main.m-preview .ws-pane.code { display: none; }
    .ws-main.m-preview .ws-pane.preview { display: flex; }
    .ws-stage.device iframe { margin: 8px auto; }
}

/* ---------- Text tool kit (live input -> result) ---------- */
.tk-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--sunken); }
.tk-opts:empty { display: none; }
.tk-opts .seg { flex-wrap: wrap; max-width: 100%; }
.tk-opts .seg button { height: 30px; white-space: nowrap; }
.tk-opts label.chk { display: inline-flex; align-items: center; gap: 7px; font-size: .88rem; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.tk-opts label.chk input { width: 16px; height: 16px; accent-color: var(--c); }
.tk-opts .fld { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 500; color: var(--ink-2); }
.tk-opts .fld .input, .tk-opts .fld select { height: 34px; width: auto; min-width: 70px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--ink); }
.tk-opts .fld input.input { width: 140px; }
.tk-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.tk-body.side { grid-template-columns: minmax(0, 1fr) 330px; }
.tk-body.one { grid-template-columns: 1fr; }
.tk-pane { display: flex; flex-direction: column; min-width: 0; }
.tk-pane + .tk-pane { border-left: 1px solid var(--line); }
.tk-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 6px 8px 6px 16px; border-bottom: 1px solid var(--line); font-size: .76rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.tk-label .meta { letter-spacing: 0; text-transform: none; font-weight: 500; font-size: .8rem; }
.tk-label .acts { display: inline-flex; gap: 4px; }
.tk-label .acts .btn { height: 30px; padding: 0 10px; font-size: .82rem; }
.tk-text { display: block; width: 100%; flex: 1; min-height: 340px; resize: vertical; border: 0; outline: 0; background: transparent; padding: 16px 18px; font-size: 1.02rem; line-height: 1.7; color: var(--ink); }
.tk-text.mono { font-family: var(--mono); font-size: .95rem; }
.tk-text[readonly] { background: color-mix(in srgb, var(--t) 35%, var(--surface)); }
.tk-text::placeholder { color: var(--ink-3); }
.tk-res { padding: 18px; display: flex; flex-direction: column; gap: 16px; background: var(--sunken); flex: 1; }
.tk-big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tk-big b { font-family: var(--display); font-size: 3rem; font-weight: 700; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.tk-big span { font-weight: 600; color: var(--ink-2); }
.tk-verdict { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; font-weight: 600; font-size: .9rem; background: var(--surface); border: 1px solid var(--line); }
.tk-verdict.yes { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.tk-verdict.no { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stat-grid div { background: var(--surface); padding: 10px 12px; min-width: 0; }
.stat-grid dt { font-size: .75rem; color: var(--ink-3); font-weight: 500; }
.stat-grid dd { margin: 2px 0 0; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.tk-h { font-family: var(--body); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 0 0 8px; }
.tk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tk-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: .92rem; }
.tk-list li > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tk-list li > span:last-child { font-size: .8rem; font-weight: 600; color: var(--c); background: var(--t); padding: 1px 8px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.tk-empty { color: var(--ink-3); font-size: .9rem; }
.tk-bars { display: grid; gap: 10px; }
.tk-bar { font-size: .86rem; }
.tk-bar .row { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; color: var(--ink-2); }
.tk-bar .row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tk-bar .track { height: 7px; border-radius: 99px; background: var(--line); overflow: hidden; }
.tk-bar .track i { display: block; height: 100%; border-radius: 99px; background: var(--c); transition: width .2s; }
.tk-bar.over .track i { background: #D93A2B; }
.tk-bar.over .row b { color: #D93A2B; }
.tk-table { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tk-table th, .tk-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.tk-table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); background: var(--sunken); }
.tk-table td:not(:first-child), .tk-table th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.tk-table tr:last-child td { border-bottom: 0; }
.tk-cards { display: grid; gap: 10px; }
.tk-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.tk-card .nm { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); width: 120px; flex: none; }
.tk-card .val { flex: 1; min-width: 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.tk-card .btn { height: 32px; padding: 0 10px; font-size: .82rem; flex: none; }
.tk-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 9px 16px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--ink-3); }
mark.hit { background: color-mix(in srgb, var(--c) 28%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
@media (max-width: 860px) {
    .tk-body, .tk-body.side { grid-template-columns: 1fr; }
    .tk-pane + .tk-pane { border-left: 0; border-top: 1px solid var(--line); }
    .tk-text { min-height: 220px; }
}
@media (max-width: 560px) {
    .toolbar .btn span.l { display: none; }
    .tk-big b { font-size: 2.4rem; }
    .tk-card { flex-wrap: wrap; }
    .tk-card .nm { width: 100%; }
}

/* ---------- Expand any big tool to full screen ---------- */
.panel[data-expand] { position: relative; }
.expand-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: .86rem; font-weight: 600; }
.expand-btn:hover { border-color: var(--ink); }
.expand-btn svg.i { width: 16px; height: 16px; }
.panel.legacy > .expand-btn { position: absolute; top: 10px; right: 10px; z-index: 5; box-shadow: var(--shadow); }
.panel.is-full { position: fixed; inset: 0; z-index: 85; border-radius: 0; border: 0; margin: 0; overflow: auto; display: flex; flex-direction: column; }
.panel.legacy[data-expand] { padding-top: 56px; }
.panel.is-full .tk-body { flex: 1; min-height: 0; }
.panel.is-full .tk-pane { min-height: 0; }
.panel.is-full .tk-text { min-height: 0; height: 100%; resize: none; }
.panel.is-full .tk-res { overflow: auto; }
body.ws-open .tool-wrap { z-index: 86; }

/* ---------- Converted tools: keep their own look inside a light panel ---------- */
.panel.legacy {
    padding: clamp(14px, 2.4vw, 30px); background: #fff; color: #15171C; color-scheme: light;
    --paper: #F6F5F1; --surface: #FFFFFF; --sunken: #EFEDE7; --ink: #15171C; --ink-2: #474C57; --ink-3: #737985;
    --line: #E3E0D8; --line-strong: #CFCBC1; --accent: #E0522A;
}
.lt { font-family: var(--body); line-height: 1.5; }
.lt h1, .lt h2, .lt h3, .lt h4, .lt h5, .lt h6 { font-family: inherit; letter-spacing: normal; line-height: 1.3; margin: revert; }
.lt .old-h1 { font-size: 1.8em; font-weight: 700; }
.lt a { color: revert; text-decoration: revert; }
.lt img { display: revert; }
.lt button, .lt input, .lt select, .lt textarea { transition: background-color .15s, border-color .15s, box-shadow .15s, color .15s; }
.lt input:focus-visible, .lt select:focus-visible, .lt textarea:focus-visible { outline: 0; border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.lt button:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
.lt > *:first-child { margin-top: 0; }
.lt > *:last-child { margin-bottom: 0; }

/* ---------- Content pages (legal, about, contact, blog) ---------- */
.page-hero { padding-bottom: 150px; }
.page-main { margin-top: -96px; position: relative; z-index: 2; }
.page-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: clamp(22px, 4vw, 44px); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 16px; color: var(--ink-2); }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--c, var(--accent)); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--accent-hover); }
.prose blockquote { margin: 18px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--ink-2); font-style: italic; }
.prose pre.code-sample { background: var(--sunken); border: 1px solid var(--line); border-radius: 12px; padding: 14px; overflow-x: auto; font-family: var(--mono); font-size: .88rem; }
.prose code { font-family: var(--mono); font-size: .9em; background: var(--sunken); padding: 1px 5px; border-radius: 5px; }
.prose img { border-radius: 14px; margin: 18px 0; }
.sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 36px; }
.sum-grid div { background: var(--sunken); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.sum-grid strong { display: block; margin-bottom: 4px; }
.sum-grid span { font-size: .92rem; color: var(--ink-2); }
.form-card { display: grid; gap: 16px; }
.form-card label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.form-card input, .form-card textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 1rem; }
.form-card textarea { min-height: 160px; resize: vertical; }
.form-card input:focus, .form-card textarea:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent); }
.form-ok { display: none; background: var(--ok-soft); color: var(--ok); border-radius: 12px; padding: 14px 16px; font-weight: 600; }
.form-ok.show { display: block; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.info-list { display: grid; gap: 12px; }
.info-list div { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.info-list svg.i { color: var(--accent); margin-top: 2px; }
.info-list strong { display: block; }
.info-list span { font-size: .9rem; color: var(--ink-2); }
.cat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 16px 0 8px; }
.cat-list a { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none !important; color: var(--ink) !important; }
.cat-list a:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.cat-list small { display: block; color: var(--ink-3); font-size: .8rem; }
/* blog */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .18s, transform .18s; }
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.post-card figure { margin: 0; aspect-ratio: 16 / 10; overflow: hidden; background: var(--sunken); }
.post-card img { width: 100%; height: 100%; object-fit: cover; }
.post-card .pb { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-meta { font-size: .8rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.post-meta b { color: var(--accent); font-weight: 600; }
.post-card h2, .post-card h3 { font-size: 1.15rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.post-card p { margin: 0; font-size: .9rem; color: var(--ink-2); line-height: 1.5; }
.post-card.featured { grid-column: 1 / -1; flex-direction: row; }
.post-card.featured figure { flex: 1.2; aspect-ratio: auto; min-height: 300px; }
.post-card.featured .pb { flex: 1; justify-content: center; padding: 32px; gap: 12px; }
.post-card.featured h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-family: var(--display); font-weight: 700; }
.article-hero h1 { max-width: 22em; }
.article-figure { margin: 0 0 32px; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 16 / 8; background: var(--sunken); }
.article-figure img { width: 100%; height: 100%; object-fit: cover; }
.article .prose { font-size: 1.06rem; }
.article .prose p { line-height: 1.75; }
.cta-tools { margin-top: 40px; padding: 24px; border-radius: 18px; background: var(--ink); color: var(--paper); display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.cta-tools strong { font-family: var(--display); font-size: 1.25rem; display: block; }
.cta-tools span { color: color-mix(in srgb, var(--paper) 70%, transparent); font-size: .95rem; }
.cta-tools a { background: var(--accent); color: #fff; padding: 11px 18px; border-radius: 10px; font-weight: 600; white-space: nowrap; }
@media (max-width: 1080px) { .post-grid { grid-template-columns: repeat(2, 1fr); } .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .post-grid, .sum-grid { grid-template-columns: 1fr; } .post-card.featured { flex-direction: column; } .post-card.featured figure { min-height: 0; aspect-ratio: 16 / 10; } .post-card.featured .pb { padding: 20px; } }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 95; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; font-size: .9rem; font-weight: 500; box-shadow: var(--shadow-lg); transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Content ---------- */
.page-body { padding-top: 56px; padding-bottom: 24px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; }
.prose { max-width: 760px; }
.prose section { margin-bottom: 56px; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 700; margin-bottom: 14px; }
.prose h3 { font-size: 1.12rem; font-weight: 600; margin: 22px 0 8px; letter-spacing: -0.01em; }
.prose p { color: var(--ink-2); margin: 0 0 14px; }
.prose p strong { color: var(--ink); }
.steps { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: var(--paper); font-family: var(--display); font-weight: 700; margin-bottom: 12px; }
.steps strong { display: block; margin-bottom: 4px; }
.steps span { font-size: .92rem; color: var(--ink-2); }
.defs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.defs div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.defs dt { font-weight: 600; margin-bottom: 4px; }
.defs dd { margin: 0; font-size: .92rem; color: var(--ink-2); }
.callout { display: flex; gap: 14px; background: var(--t, var(--accent-soft)); border-radius: var(--radius); padding: 18px 20px; margin: 20px 0; }
.callout svg.i { color: var(--c, var(--accent)); margin-top: 2px; }
.callout p { margin: 0; color: var(--ink); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-top: 16px; }
table.data { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.data th, table.data td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
table.data th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; background: var(--sunken); }
table.data tr:last-child td { border-bottom: 0; }
table.data td:last-child { font-weight: 600; white-space: nowrap; }
details.faq { border-bottom: 1px solid var(--line); }
details.faq:first-of-type { border-top: 1px solid var(--line); }
details.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-weight: 600; font-size: 1.02rem; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq .pm { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; flex: none; transition: transform .2s, background .2s; }
details.faq .pm svg.i { width: 14px; height: 14px; }
details.faq[open] .pm { transform: rotate(45deg); background: var(--ink); color: var(--paper); border-color: var(--ink); }
details.faq p { margin: 0 0 18px; }

.side { position: sticky; top: 92px; display: grid; gap: 16px; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.side-card h2 { font-family: var(--body); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 10px; }
.toc a { display: block; padding: 6px 10px; margin: 0 -10px; border-radius: 8px; font-size: .92rem; color: var(--ink-2); }
.toc a:hover, .toc a.active { background: var(--sunken); color: var(--ink); }
.rel a { display: flex; align-items: center; gap: 12px; padding: 8px; margin: 0 -8px; border-radius: 10px; }
.rel a:hover { background: var(--sunken); }
.rel strong { display: block; font-size: .92rem; font-weight: 600; }
.rel .txt > span { display: block; font-size: .8rem; color: var(--ink-3); line-height: 1.35; }
.rel .mini-ico { width: 34px; height: 34px; }

.more-tools { padding-top: 24px; padding-bottom: 8px; }
.more-tools h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 700; margin-bottom: 18px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card-tool { display: flex; flex-direction: column; gap: 12px; padding: 18px; border: 1px solid color-mix(in srgb, var(--c) 16%, var(--line)); border-radius: var(--radius); background: linear-gradient(160deg, var(--t) 0%, var(--surface) 62%); transition: transform .18s, box-shadow .18s; }
.card-tool:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-tool .mini-ico { background: var(--c); color: var(--surface); }
.card-tool strong { font-weight: 600; }
.card-tool span.d { font-size: .87rem; color: var(--ink-2); line-height: 1.45; }

/* ---------- Footer ---------- */
.site-footer { position: relative; background: var(--paper); margin-top: 150px; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -320px; height: 200px; pointer-events: none; background: linear-gradient(to bottom, transparent, rgba(18, 19, 23, .07)); }
.foot-hills { position: absolute; left: 0; right: 0; top: -119px; width: 100%; height: 120px; display: block; pointer-events: none; fill: #121317; transform: scaleX(-1); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; padding: 48px 0 40px; }
.foot-brand p { color: var(--ink-3); font-size: .92rem; margin: 14px 0 18px; max-width: 24em; }
.foot-brand a.mail { font-weight: 600; font-size: .92rem; }
.social { display: flex; gap: 8px; margin-top: 16px; }
.social a { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); }
.social a:hover { color: var(--ink); border-color: var(--ink); }
.social svg { width: 16px; height: 16px; fill: currentColor; }
.foot-col h3 { font-family: var(--body); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 14px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot-col a { font-size: .92rem; color: var(--ink-2); }
.foot-col a:hover { color: var(--accent); }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 0 28px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-3); }
.foot-bottom nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-bottom a:hover { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .content-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .side { position: static; grid-template-columns: 1fr 1fr; margin-bottom: 40px; }
    .side .toc-card { display: none; }
    .cards { grid-template-columns: repeat(2, 1fr); }
    .foot-grid { grid-template-columns: 1fr 1fr 1fr; }
    .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
    .nav, .search-trigger { display: none; }
    .menu-btn, .search-btn-m { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
    .search-btn-m { margin-left: auto; }
    .theme-btn { margin-left: 0; }
    .header-row { gap: 8px; }
    .brand { margin-right: auto; }
    .search-btn-m { margin-left: 0; }
    .mobile-nav.open { display: block; border-top: 1px solid var(--line); padding: 12px 0 20px; }
    .mobile-nav a { display: block; padding: 11px 4px; font-weight: 500; border-bottom: 1px solid var(--line); }
    .mobile-nav .m-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
    .mobile-nav .m-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 16px 4px 4px; }
    .steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .wrap { padding-left: 16px; padding-right: 16px; }
    .tool-hero { padding: 96px 0 140px; }
    .tool-hero .lede { font-size: 1rem; }
    .hills, .foot-hills { height: 80px; }
    .foot-hills { top: -79px; }
    .tool-wrap { margin-top: -110px; }
    .panel { border-radius: 16px; }
    .side { grid-template-columns: 1fr; }
    .defs { grid-template-columns: 1fr; }
    .cards { grid-template-columns: 1fr; }
    .foot-grid { grid-template-columns: 1fr 1fr; }
    .site-footer { margin-top: 110px; }
    .palette { padding-top: 70px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
