/* ============================================================
   VARKIDO — Design System
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
    --vk-indigo: #4f46e5;
    --vk-indigo-600: #4338ca;
    --vk-cyan: #06b6d4;
    --vk-violet: #7c3aed;

    --bg: #ffffff;
    --bg-soft: #f7f8fb;
    --bg-elev: #ffffff;
    --bg-code: #0f172a;
    --surface: #ffffff;
    --surface-2: #f1f3f9;
    --border: #e5e7ef;
    --border-strong: #d3d7e3;

    --text: #0f172a;
    --text-soft: #475069;
    --text-mute: #6b7280;
    --text-invert: #f8fafc;

    --brand: var(--vk-indigo);
    --brand-soft: #eef0ff;
    --accent: var(--vk-cyan);

    --ok: #059669;
    --ok-soft: #ecfdf5;
    --warn: #d97706;
    --warn-soft: #fffbeb;
    --err: #dc2626;
    --err-soft: #fef2f2;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 26px;

    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, .06);
    --shadow: 0 8px 24px rgba(15, 23, 42, .08);
    --shadow-lg: 0 18px 48px rgba(15, 23, 42, .12);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --mono: 'JetBrains Mono', 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;

    --container: 1200px;
    --header-h: 68px;
    --transition: .18s ease;
}

html[data-theme="dark"] {
    --bg: #0b1020;
    --bg-soft: #0f1528;
    --bg-elev: #131a30;
    --surface: #131a30;
    --surface-2: #1a2340;
    --border: #232c48;
    --border-strong: #2f3a5c;

    --text: #eef2ff;
    --text-soft: #b6c0dd;
    --text-mute: #8b96b8;
    --text-invert: #0b1020;

    --brand-soft: #1c2350;
    --ok-soft: #0c2a22;
    --warn-soft: #2a2110;
    --err-soft: #2a1414;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, .4);
    --shadow: 0 10px 30px rgba(0, 0, 0, .45);
    --shadow-lg: 0 22px 60px rgba(0, 0, 0, .55);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; letter-spacing: -.02em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 200;
    background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Icons ---------- */
.icon { width: 20px; height: 20px; flex: none; }
.icon-sm { width: 16px; height: 16px; flex: none; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.2rem; letter-spacing: -.03em; }
.brand:hover { text-decoration: none; }
.brand-mark svg { width: 32px; height: 32px; border-radius: 8px; }
.brand-name { background: linear-gradient(120deg, var(--vk-indigo), var(--vk-cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.main-nav > a, .nav-drop-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 12px; border-radius: var(--radius-sm);
    color: var(--text-soft); font-weight: 600; font-size: .94rem;
    background: none; border: 0; transition: var(--transition);
}
.main-nav > a:hover, .nav-drop-btn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-dropdown { position: relative; }
.nav-drop-menu {
    position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px;
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: 8px; display: none; z-index: 120;
}
.nav-dropdown.open .nav-drop-menu { display: block; }
.nav-drop-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--text-soft); font-weight: 500; }
.nav-drop-menu a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    background: none; border: 1px solid transparent; color: var(--text-soft); transition: var(--transition);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.nav-toggle { display: none; }
.theme-icon-dark { display: none; }
html[data-theme="dark"] .theme-icon-light { display: none; }
html[data-theme="dark"] .theme-icon-dark { display: inline-flex; }

/* ---------- Search overlay ---------- */
.search-overlay { position: fixed; inset: 0; z-index: 150; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); padding-top: 12vh; }
.search-overlay-inner { max-width: 720px; }
.search-box { display: flex; align-items: center; gap: 10px; background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 6px 8px 6px 16px; box-shadow: var(--shadow-lg); }
.search-box-icon { color: var(--text-mute); }
.search-box input { flex: 1; border: 0; background: none; padding: 12px 0; font-size: 1.05rem; outline: none; }
.search-results { margin-top: 14px; max-height: 55vh; overflow-y: auto; display: grid; gap: 6px; }
.search-result { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--border); color: var(--text); }
.search-result:hover, .search-result.active { border-color: var(--brand); background: var(--brand-soft); text-decoration: none; }
.search-result .sr-icon { color: var(--brand); }
.search-result .sr-name { font-weight: 600; }
.search-result .sr-cat { margin-left: auto; font-size: .78rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: .04em; }
.search-empty { padding: 20px; text-align: center; color: var(--text-mute); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
    font-weight: 600; font-size: .94rem; transition: var(--transition); white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-xs); }
.btn-primary:hover { background: var(--vk-indigo-600); }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--border-strong); }
.btn-ghost { background: none; color: var(--text-soft); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--err-soft); color: var(--err); border-color: transparent; }
.btn-danger:hover { background: var(--err); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 56px; overflow: hidden; }
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(60% 60% at 15% 0%, color-mix(in srgb, var(--vk-indigo) 14%, transparent), transparent 70%),
        radial-gradient(50% 50% at 90% 10%, color-mix(in srgb, var(--vk-cyan) 12%, transparent), transparent 70%);
}
.hero-inner { max-width: 780px; margin-inline: auto; text-align: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: .82rem; margin-bottom: 20px; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -.035em; }
.hero h1 .grad { background: linear-gradient(120deg, var(--vk-indigo), var(--vk-cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin-top: 18px; font-size: clamp(1.02rem, 2vw, 1.22rem); color: var(--text-soft); }
.hero-search { margin: 30px auto 0; max-width: 620px; }
.hero-search .search-box { box-shadow: var(--shadow); }
.hero-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
.hero-stat { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: var(--bg-elev); border: 1px solid var(--border); font-weight: 600; font-size: .9rem; color: var(--text-soft); }
.hero-stat .icon { color: var(--brand); }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.section-head p { color: var(--text-soft); margin-top: 6px; }
.section-head .link-more { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Tool grid & cards ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tool-card {
    position: relative; display: flex; gap: 14px; padding: 18px;
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg);
    color: var(--text); transition: var(--transition); box-shadow: var(--shadow-xs);
}
.tool-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.tool-card-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius); background: var(--brand-soft); color: var(--brand); flex: none; }
.tool-card-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tool-card-title { font-weight: 700; font-size: 1rem; }
.tool-card-desc { color: var(--text-soft); font-size: .88rem; line-height: 1.5; }
.fav-btn { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--text-mute); border-radius: 8px; opacity: 0; transition: var(--transition); }
.tool-card:hover .fav-btn { opacity: 1; }
.fav-btn:hover { background: var(--surface-2); color: var(--err); }
.fav-btn.active { opacity: 1; color: var(--err); }
.fav-btn.active .icon { fill: var(--err); }

/* ---------- Category cards ---------- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.category-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text); transition: var(--transition); }
.category-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.category-card .cc-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: var(--radius); background: linear-gradient(135deg, var(--brand-soft), color-mix(in srgb, var(--vk-cyan) 14%, transparent)); color: var(--brand); }
.category-card h3 { font-size: 1.1rem; }
.category-card p { color: var(--text-soft); font-size: .9rem; }
.category-card .cc-count { margin-top: auto; font-size: .82rem; font-weight: 600; color: var(--brand); }

/* ---------- Page header ---------- */
.page-head { padding: 44px 0 8px; }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-head .lead { margin-top: 12px; color: var(--text-soft); max-width: 760px; font-size: 1.05rem; }
.breadcrumbs { padding: 18px 0 0; font-size: .86rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; color: var(--text-mute); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--border-strong); }
.breadcrumbs a { color: var(--text-soft); }

/* ---------- Tool page layout ---------- */
.tool-layout { display: grid; grid-template-columns: 1fr; gap: 28px; padding: 24px 0 56px; }
.tool-app { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow); overflow: hidden; }
.tool-app-head { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.tool-app-head .ta-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius); background: var(--brand-soft); color: var(--brand); }
.tool-app-head h2 { font-size: 1.05rem; }
.tool-app-head p { font-size: .85rem; color: var(--text-mute); }
.tool-app-body { padding: 24px; }

.tool-section { margin-top: 40px; }
.tool-section h2 { font-size: 1.4rem; margin-bottom: 14px; }
.tool-section h3 { font-size: 1.1rem; margin: 18px 0 8px; }
.tool-section p { color: var(--text-soft); margin-bottom: 12px; }
.tool-section ul, .tool-section ol { color: var(--text-soft); padding-left: 22px; margin-bottom: 12px; }
.tool-section li { margin-bottom: 6px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field .hint { font-size: .8rem; color: var(--text-mute); margin-top: 5px; }
.input, .textarea, .select {
    width: 100%; padding: 11px 13px; border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm); background: var(--bg); color: var(--text); transition: var(--transition);
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.textarea { min-height: 160px; resize: vertical; font-family: var(--mono); font-size: .9rem; line-height: 1.6; }
.textarea.plain { font-family: var(--font); }
textarea.is-invalid, input.is-invalid, select.is-invalid,
.input.is-invalid, .textarea.is-invalid, .select.is-invalid { border-color: #dc2626 !important; box-shadow: 0 0 0 3px rgba(220, 38, 38, .18) !important; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.checkbox { display: flex; align-items: center; gap: 9px; font-size: .92rem; cursor: pointer; }
.checkbox input { width: 17px; height: 17px; accent-color: var(--brand); }
.checkbox-row { display: flex; flex-wrap: wrap; gap: 16px; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type=range] { flex: 1; accent-color: var(--brand); }
.range-val { min-width: 54px; text-align: right; font-family: var(--mono); font-size: .88rem; font-weight: 600; }

/* ---------- Toolbars & actions ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ---------- Output / code ---------- */
.output-wrap { position: relative; margin-top: 16px; }
.output {
    background: var(--bg-code); color: #e2e8f0; border-radius: var(--radius);
    padding: 16px; font-family: var(--mono); font-size: .86rem; line-height: 1.65;
    overflow: auto; max-height: 460px; white-space: pre; tab-size: 2;
}
.output.light { background: var(--surface-2); color: var(--text); }
.output-copy { position: absolute; top: 10px; right: 10px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; text-align: center; }
.stat .stat-num { font-size: 1.5rem; font-weight: 800; font-family: var(--mono); color: var(--brand); }
.stat .stat-label { font-size: .78rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius); font-size: .9rem; margin-top: 14px; border: 1px solid transparent; }
.alert .icon { flex: none; margin-top: 1px; }
.alert-ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.alert-err { background: var(--err-soft); color: var(--err); border-color: color-mix(in srgb, var(--err) 25%, transparent); }
.alert-warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.alert-info { background: var(--brand-soft); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 25%, transparent); }
.alert[hidden] { display: none; }

/* ---------- Dropzone ---------- */
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); padding: 34px 20px; text-align: center; background: var(--bg-soft); transition: var(--transition); cursor: pointer; }
.dropzone:hover, .dropzone.dragover { border-color: var(--brand); background: var(--brand-soft); }
.dropzone .dz-icon { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--brand); }
.dropzone p { color: var(--text-soft); font-size: .92rem; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq-item { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 16px; }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.3rem; color: var(--brand); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 0 14px; color: var(--text-soft); font-size: .92rem; }

/* ---------- Filters ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 22px; }
.filter-bar .search-box { flex: 1; min-width: 240px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-soft); font-size: .86rem; font-weight: 600; transition: var(--transition); }
.chip:hover { border-color: var(--brand); color: var(--text); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.alpha-row { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; }
.alpha-row button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-soft); font-weight: 600; font-size: .82rem; }
.alpha-row button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-mute); }
.empty-state .icon { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--border-strong); }
.filters { margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; letter-spacing: .01em; border: 1px solid transparent; }
.badge-code { font-family: var(--mono); background: var(--brand-soft); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 25%, transparent); }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.badge-err { background: var(--err-soft); color: var(--err); border-color: color-mix(in srgb, var(--err) 25%, transparent); }
.badge-mute { background: var(--surface-2); color: var(--text-mute); border-color: var(--border); }

/* ---------- Loading state ---------- */
.loading-state { display: flex; align-items: center; gap: 12px; padding: 22px; color: var(--text-soft); font-size: .92rem; }
.loading-state[hidden] { display: none; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--border-strong); border-top-color: var(--brand); animation: vk-spin .7s linear infinite; flex: none; }
@keyframes vk-spin { to { transform: rotate(360deg); } }

/* ---------- Redirect chain ---------- */
.redirect-chain { list-style: none; counter-reset: hop; display: grid; gap: 6px; }
.redirect-chain li { counter-increment: hop; position: relative; padding: 8px 12px 8px 40px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); font-size: .84rem; word-break: break-all; }
.redirect-chain li::before { content: counter(hop); position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; }

/* ---------- Input group ---------- */
.input-group { display: flex; align-items: stretch; gap: 0; }
.input-group .input { border-radius: 0; }
.input-group .input:first-child { border-top-left-radius: var(--radius); border-bottom-left-radius: var(--radius); }
.input-group .input:last-child { border-top-right-radius: var(--radius); border-bottom-right-radius: var(--radius); }
.input-prefix, .input-suffix { display: flex; align-items: center; padding: 0 12px; background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-mute); font-family: var(--mono); font-size: .9rem; }
.input-prefix { border-right: 0; border-top-left-radius: var(--radius); border-bottom-left-radius: var(--radius); }
.input-suffix { border-left: 0; border-top-right-radius: var(--radius); border-bottom-right-radius: var(--radius); }
.input-flags { font-family: var(--mono); }

/* ---------- Regex highlight ---------- */
.rx-mark { background: color-mix(in srgb, var(--brand) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }

/* ---------- Progress bar ---------- */
.progress { height: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--brand); border-radius: 999px; transition: width .25s ease, background .25s ease; }
.progress-bar.is-warn { background: var(--warn); }
.progress-bar.is-over { background: var(--err); }

/* ---------- Diff ---------- */
.diff-add { background: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--ok); border-radius: 3px; padding: 0 2px; text-decoration: none; }
.diff-del { background: color-mix(in srgb, var(--err) 20%, transparent); color: var(--err); border-radius: 3px; padding: 0 2px; text-decoration: line-through; }

/* ---------- Preview panes ---------- */
.preview-pane { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg-elev); }
.preview-pane iframe { width: 100%; height: 380px; border: 0; background: #fff; }
.serp-preview { padding: 16px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); }
.serp-url { font-size: .82rem; color: var(--text-mute); }
.serp-title { color: #1a0dab; font-size: 1.15rem; margin: 3px 0; }
html[data-theme="dark"] .serp-title { color: #8ab4f8; }
.serp-desc { color: var(--text-soft); font-size: .9rem; }
.serp-preview.mobile { max-width: 360px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); }
table.data th { background: var(--surface-2); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-soft); }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: var(--bg-soft); }
.code-badge { font-family: var(--mono); font-weight: 700; color: var(--brand); }

/* ---------- Diff lines ---------- */
.diff-line { font-family: var(--mono); font-size: .85rem; padding: 2px 10px; white-space: pre-wrap; word-break: break-word; }
.diff-same { color: var(--text-mute); }

/* ---------- Color / gradient tools ---------- */
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.swatch { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); cursor: pointer; }
.swatch .sw-color { height: 90px; }
.swatch .sw-meta { padding: 8px 10px; background: var(--bg-elev); font-family: var(--mono); font-size: .82rem; display: flex; justify-content: space-between; }
.gradient-preview { height: 200px; border-radius: var(--radius); border: 1px solid var(--border); }
.shadow-stage { display: flex; align-items: center; justify-content: center; min-height: 240px; background: var(--surface-2); border-radius: var(--radius); border: 1px solid var(--border); }
.shadow-box { width: 140px; height: 140px; background: var(--bg-elev); border-radius: var(--radius); }
.color-input { width: 100%; height: 42px; padding: 3px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg); cursor: pointer; }

/* ---------- QR ---------- */
.qr-stage { display: flex; align-items: center; justify-content: center; padding: 24px; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); }
.qr-stage canvas, .qr-stage img { max-width: 100%; height: auto; }

/* ---------- Footer base ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); margin-top: 40px; padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-tagline { font-weight: 600; color: var(--text); }
.footer-note { color: var(--text-mute); font-size: .88rem; margin-top: 6px; max-width: 320px; }
.footer-col h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-mute); margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 9px; }
.footer-col a { color: var(--text-soft); font-size: .9rem; }
.footer-col a:hover { color: var(--brand); }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.text-center { text-align: center; }
.muted { color: var(--text-mute); }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.flex { display: flex; } .flex-wrap { flex-wrap: wrap; } .gap-2 { gap: 16px; } .items-center { align-items: center; }
.prose { max-width: 780px; }
.prose h2 { margin-top: 28px; margin-bottom: 12px; }
.prose p { color: var(--text-soft); margin-bottom: 14px; }
.prose ul { color: var(--text-soft); padding-left: 22px; margin-bottom: 14px; }

/* ---------- Generator components ---------- */
.dropzone-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--text-mute); }
.dropzone-inner p { margin: 0; }
.link-btn { background: none; border: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; padding: 0; }
.link-btn:hover { color: var(--vk-indigo-600); }
.icon-lg { width: 32px; height: 32px; }
.output-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: .82rem; font-weight: 600; color: var(--text-mute); }
.output-head + .output { border: 0; border-radius: 0; }

.favicon-preview { display: flex; flex-wrap: wrap; gap: 14px; margin: 18px 0; }
.favicon-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); min-width: 92px; }
.favicon-cell img { image-rendering: pixelated; background: repeating-conic-gradient(#e5e7eb 0% 25%, #fff 0% 50%) 50% / 12px 12px; border-radius: 4px; }

.palette { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 18px 0; }
.swatch-code { font-family: var(--mono); font-weight: 700; font-size: .95rem; letter-spacing: .02em; }
.swatch-copy { margin-top: 6px; align-self: flex-start; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.4); color: inherit; border-radius: 6px; padding: 3px 10px; font-size: .74rem; cursor: pointer; }
.swatch-copy:hover { background: rgba(255,255,255,.35); }

.stops { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.stop-row { display: grid; grid-template-columns: 56px 1fr 56px 40px; align-items: center; gap: 10px; }
.stop-row .color { width: 100%; height: 38px; padding: 2px; }
.stop-pos { font-family: var(--mono); font-size: .82rem; color: var(--text-mute); text-align: right; }

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .main-nav {
        position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch;
        background: var(--bg-elev); border-bottom: 1px solid var(--border); padding: 12px; gap: 2px;
        box-shadow: var(--shadow-lg); display: none; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    }
    .main-nav.open { display: flex; }
    .nav-toggle { display: inline-flex; }
    .nav-drop-menu { position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .hero { padding: 48px 0 36px; }
    .section { padding: 40px 0; }
    .tool-app-body { padding: 18px; }
}
@media (max-width: 420px) {
    .tool-grid { grid-template-columns: 1fr; }
    .hero-stats { gap: 8px; }
    .hero-stat { font-size: .82rem; padding: 7px 12px; }
}

/* ---------- Print ---------- */
@media print {
    .site-header, .site-footer, .fav-btn, .actions, .toolbar { display: none !important; }
    body { background: #fff; color: #000; }
}

/* ---------- Tool privacy badge ---------- */
.tool-privacy-badge {
    display: inline-flex; align-items: center; gap: 8px;
    margin: 0 0 18px; padding: 7px 14px;
    font-size: .82rem; font-weight: 600; color: var(--text-soft);
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 999px;
}
.tool-privacy-badge .icon { color: var(--brand); }


/* ============================================================
   VARKIDO — Image Tools Styles
   ============================================================ */

.img-upload {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border: 2px dashed #3b82f6;
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    cursor: pointer;
    transition: all .22s ease;
    background:
        radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--brand) 10%, transparent) 0%, transparent 60%),
        var(--bg-soft);
    margin-bottom: 20px;
    overflow: hidden;
}
.img-upload > * {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
.img-upload:hover {
    border-color: var(--brand);
    background:
        radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--brand) 16%, transparent) 0%, transparent 60%),
        var(--brand-soft);
}
.img-upload:hover .img-upload-icon { transform: translateY(-3px) scale(1.05); color: var(--brand); }
.img-upload.drag-over {
    border-color: var(--brand); border-style: solid;
    background:
        radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--brand) 20%, transparent) 0%, transparent 60%),
        var(--brand-soft);
}
.img-upload.drag-over .img-upload-icon { transform: translateY(-4px) scale(1.08); color: var(--brand); }
.img-upload-icon {
    display: flex !important; align-items: center !important; justify-content: center !important;
    width: 120px; height: 120px;
    margin: 0 auto 20px auto !important;
    color: #60a5fa;
    transition: transform .22s ease, color .22s ease;
}
.img-upload-icon svg { width: 120px; height: 120px; stroke-width: 1.5; }
.img-upload-title { font-size: 1.5rem; font-weight: 700; color: var(--text); margin-bottom: 4px; letter-spacing: -.02em; }
.img-upload-subtitle { font-size: .9rem; color: color-mix(in srgb, var(--brand) 80%, var(--text-soft)); margin-bottom: 14px; display: block; width: 100%; text-align: center; }
.img-upload-formats { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.img-upload-format {
    display: inline-flex; align-items: center;
    padding: 5px 16px; border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 14%, transparent);
    color: color-mix(in srgb, var(--brand) 85%, var(--text-soft));
    font-size: .8rem; font-weight: 600; letter-spacing: .02em;
    border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
}
.img-upload-hint { font-size: .78rem; color: var(--text-mute); display: block; width: 100%; text-align: center; margin-top: 0; }
.img-upload input[type="file"] {
    position: absolute !important; inset: 0 !important;
    width: 100% !important; height: 100% !important;
    opacity: 0 !important; cursor: pointer !important;
    z-index: 10 !important; font-size: 0 !important;
}
.img-upload input[type="file"]::-webkit-file-upload-button { display: none !important; }

.img-preview {
    background: var(--bg-soft); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; position: relative;
    display: flex; align-items: center; justify-content: center;
    min-height: 280px; margin-bottom: 16px;
}
.img-preview img, .img-preview canvas { max-width: 100%; max-height: 480px; display: block; }
.img-preview-toolbar {
    position: absolute; top: 10px; right: 10px;
    display: flex; gap: 4px;
    background: var(--bg-elev); padding: 6px;
    border-radius: var(--radius-sm); border: 1px solid var(--border);
    box-shadow: var(--shadow-sm); z-index: 10;
}
.img-preview-toolbar button {
    width: 34px; height: 34px; border: none; background: transparent;
    border-radius: 6px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--text-soft); transition: var(--transition);
}
.img-preview-toolbar button:hover { background: var(--surface-2); color: var(--text); }

.checkerboard {
    background-image:
        linear-gradient(45deg, #d1d5db 25%, transparent 25%),
        linear-gradient(-45deg, #d1d5db 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #d1d5db 75%),
        linear-gradient(-45deg, transparent 75%, #d1d5db 75%);
    background-size: 18px 18px;
    background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}
html[data-theme="dark"] .checkerboard {
    background-image:
        linear-gradient(45deg, #334155 25%, transparent 25%),
        linear-gradient(-45deg, #334155 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #334155 75%),
        linear-gradient(-45deg, transparent 75%, #334155 75%);
}

.img-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.img-compare-item h4 { font-size: .85rem; font-weight: 600; color: var(--text-soft); margin-bottom: 8px; }

.img-info { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.img-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.img-info-item { display: flex; flex-direction: column; gap: 2px; }
.img-info-label { font-size: .72rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: .03em; font-weight: 500; }
.img-info-value { font-size: .92rem; font-weight: 600; color: var(--text); font-family: var(--mono); }

.tool-sidebar {
    background: var(--bg-soft); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 20px;
    align-self: start; position: sticky; top: 88px;
}
.tool-sidebar h3 { font-size: .95rem; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
@media (min-width: 900px) {
    .tool-layout.has-sidebar { grid-template-columns: 1fr 300px; align-items: start; }
}

.color-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.color-swatch { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: var(--transition); cursor: pointer; }
.color-swatch:hover { border-color: var(--brand); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.color-swatch-preview { width: 100%; height: 56px; }
.color-swatch-info { padding: 8px 10px; background: var(--surface); }
.color-swatch-hex { font-family: var(--mono); font-size: .8rem; font-weight: 600; color: var(--text); }
.color-swatch-rgb { font-family: var(--mono); font-size: .7rem; color: var(--text-mute); margin-top: 2px; }

.layers-panel { max-height: 260px; overflow-y: auto; margin-bottom: 16px; }
.layer-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); margin-bottom: 6px; cursor: pointer; transition: var(--transition);
}
.layer-item:hover { border-color: var(--brand); }
.layer-item.active { border-color: var(--brand); background: var(--brand-soft); }
.layer-item-name { flex: 1; font-size: .85rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer-item-actions { display: flex; gap: 2px; }
.layer-item-actions button {
    width: 26px; height: 26px; border: none; background: transparent;
    border-radius: 4px; cursor: pointer; display: inline-flex;
    align-items: center; justify-content: center; color: var(--text-mute); font-size: .75rem;
}
.layer-item-actions button:hover { background: var(--surface-2); color: var(--text); }

.batch-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 16px; }
.batch-result { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; text-align: center; transition: var(--transition); }
.batch-result:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.batch-result img { width: 100%; height: 110px; object-fit: contain; background: var(--bg-soft); border-radius: var(--radius-sm); margin-bottom: 8px; }
.batch-result-name { font-size: .78rem; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-result-meta { font-size: .72rem; color: var(--text-mute); font-family: var(--mono); margin-top: 2px; }
.batch-result-status { font-size: .75rem; font-weight: 600; margin-top: 4px; cursor: pointer; }
.batch-result-status.ok { color: var(--ok); }
.batch-result-status.warn { color: var(--warn); }
.batch-result-status.err { color: var(--err); }

.crop-overlay { position: absolute; border: 2px solid var(--brand); box-shadow: 0 0 0 9999px rgba(15, 23, 42, .5); cursor: move; z-index: 5; }
html[data-theme="dark"] .crop-overlay { box-shadow: 0 0 0 9999px rgba(0, 0, 0, .6); }
.crop-handle { position: absolute; width: 12px; height: 12px; background: #fff; border: 2px solid var(--brand); border-radius: 2px; z-index: 6; }
.crop-handle.nw { top: -6px; left: -6px; cursor: nwse-resize; }
.crop-handle.ne { top: -6px; right: -6px; cursor: nesw-resize; }
.crop-handle.sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.crop-handle.se { bottom: -6px; right: -6px; cursor: nwse-resize; }
.crop-handle.n  { top: -6px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.crop-handle.s  { bottom: -6px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.crop-handle.e  { right: -6px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.crop-handle.w  { left: -6px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }

.wm-container { position: relative; display: inline-block; user-select: none; touch-action: none; }
.wm-container canvas { display: block; }

.code-output {
    background: var(--bg-code); color: #e2e8f0; padding: 16px;
    border-radius: var(--radius); font-family: var(--mono); font-size: .82rem;
    line-height: 1.55; overflow-x: auto; max-height: 320px; overflow-y: auto;
    white-space: pre-wrap; word-break: break-all; margin-bottom: 16px;
}

.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 500; }
.status-badge.ok   { background: var(--ok-soft);   color: var(--ok); }
.status-badge.warn { background: var(--warn-soft); color: var(--warn); }
.status-badge.err  { background: var(--err-soft);  color: var(--err); }
.status-badge.info { background: var(--brand-soft); color: var(--brand); }

.svg-viewer {
    width: 100%; min-height: 380px; background: var(--bg-soft);
    border: 1px solid var(--border); border-radius: var(--radius);
    overflow: auto; display: flex; align-items: center; justify-content: center;
    padding: 20px; margin-bottom: 16px;
}
.svg-viewer svg { max-width: 100%; max-height: 420px; }

.social-link {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 6px;
    background: transparent; color: var(--text-mute);
    transition: var(--transition); border: 1px solid var(--border);
}
.social-link:hover { background: var(--brand); color: #fff; border-color: var(--brand); text-decoration: none; }
.social-link svg { width: 14px; height: 14px; }

@media (max-width: 768px) {
    .img-compare { grid-template-columns: 1fr; }
    .tool-sidebar { position: static; }
    .actions { flex-direction: column; }
    .actions .btn { width: 100%; justify-content: center; }
    .img-preview-toolbar { top: 6px; right: 6px; padding: 4px; }
    .img-preview-toolbar button { width: 30px; height: 30px; }
    .grid-2 { grid-template-columns: 1fr; }
}


/* ============================================================
   FOOTER BOTTOM — 3 Columns (Copyright · Legal · Social)
   ============================================================ */
.footer-bottom {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    padding: 22px 0;
    border-top: 1px solid var(--border);
    margin-top: 36px;
    font-size: .84rem;
    color: var(--text-mute);
}

.footer-copy {
    justify-self: start;
    margin: 0;
    white-space: nowrap;
    color: var(--text-mute) !important;
}

/* Legal links */
.footer-legal {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.footer-bottom .footer-legal a,
.footer-bottom .footer-legal a:link,
.footer-bottom .footer-legal a:visited {
    color: var(--text-mute) !important;
    text-decoration: none !important;
    transition: color .15s ease;
    white-space: nowrap;
    font-size: .84rem;
    background: none;
}
.footer-bottom .footer-legal a:hover,
.footer-bottom .footer-legal a:focus {
    color: var(--text) !important;
    text-decoration: none !important;
}
.footer-bottom .footer-legal span {
    color: var(--border-strong) !important;
    font-size: .8rem;
    user-select: none;
}

/* ============================================================
   Social icons cluster (bottom right)
   ============================================================ */
.footer-social-bottom {
    justify-self: end;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
}

.footer-social-bottom .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-soft);
    transition: all .15s ease;
    text-decoration: none;
    flex: none;
}
.footer-social-bottom .social-link:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    transform: translateY(-1px);
}
.footer-social-bottom .social-link svg {
    width: 15px;
    height: 15px;
    display: block;
}

/* ============================================================
   Responsive — Footer Bottom
   ============================================================ */
@media (max-width: 900px) {
    .footer-bottom {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 14px;
        padding: 20px 0;
    }
    .footer-copy,
    .footer-legal,
    .footer-social-bottom {
        justify-self: center;
    }
    .footer-social-bottom {
        order: -1;
        margin-bottom: 4px;
    }
}

@media (max-width: 480px) {
    .footer-legal {
        gap: 6px;
        font-size: .78rem;
    }
    .footer-bottom .footer-legal a {
        font-size: .78rem;
    }
    .footer-social-bottom .social-link {
        width: 30px;
        height: 30px;
    }
}

/* ============================================================
   Cleanup
   ============================================================ */
.footer-brand .footer-social {
    display: none;
}

/* حل مشكلة خروج الكود عن الصفحة في أدوات Varkido */
.output-wrap, 
.tool-output, 
.result-box {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.output-wrap pre, 
.output-wrap textarea, 
.output-wrap code,
#sm-out {
    white-space: pre-wrap !important;
    word-break: break-all !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    max-width: 100% !important;
    max-height: 400px !important;
    box-sizing: border-box !important;
    display: block !important;
}
/* إجبار جميع حاويات الأدوات على احترام حدود الشاشة */
.tool-layout, .tool-layout > *, 
.vk-tool, .vk-tool > *, 
.tool-app, .tool-app-body, 
.output-wrap, .result-box {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* إجبار صناديق الكود على الالتفاف */
pre, textarea, code, .output, #sm-out {
    white-space: pre-wrap !important;
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    max-width: 100% !important;
    max-height: 400px !important;
    display: block !important;
    box-sizing: border-box !important;
}
/* حل مشكلة النصوص الطويلة في قسم الأمثلة والمحتوى */
.tool-section p, 
.prose p, 
.tool-content p,
.tool-section li,
.prose li,
.tool-section strong,
.prose strong {
    word-break: normal !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    max-width: 100% !important;
}
