/* tools.isokov.uz — в стиле экосистемы isokov.uz: тёмный фон, лаймовый акцент, Oswald в заголовках. */
@font-face { font-family: "Oswald"; font-weight: 400 700; font-display: swap; src: url("/fonts/oswald-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Oswald"; font-weight: 400 700; font-display: swap; src: url("/fonts/oswald-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Oswald"; font-weight: 400 700; font-display: swap; src: url("/fonts/oswald-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }

:root {
  --bg: #0b0d10; --card: #12161b; --card-2: #171c22; --line: #232a33; --line-2: #333c47;
  --text: #eef1f4; --dim: #9aa5b1; --dim-2: #6c7784; --lime: #c7d300; --on-lime: #12150a;
  --ok: #8fd18f; --bad: #ff7a6b;
  --display: "Oswald", "Segoe UI", Roboto, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--body); overflow-x: clip; }
a { color: var(--lime); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.wrap { width: min(1080px, 100% - 32px); margin: 0 auto; }

/* шапка сайта под общей шапкой экосистемы */
.tl-top { display: flex; align-items: center; gap: 14px; padding: 18px 0 6px; flex-wrap: wrap; }
.tl-brand { font: 700 1.05rem/1 var(--display); letter-spacing: .04em; text-transform: uppercase; color: var(--text); }
.tl-brand i { font-style: normal; color: var(--lime); }
.tl-crumb { color: var(--dim-2); font-size: .9rem; }
.tl-lime { color: var(--lime); }

h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: .01em; text-wrap: balance; }
.tl-head { padding: 22px 0 18px; max-width: 760px; }
.tl-head h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); line-height: 1.05; margin: 0 0 10px; text-transform: uppercase; }
.tl-head p { margin: 0; color: var(--dim); font-size: 1.08rem; max-width: 62ch; }
.tl-private { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; font-size: .88rem; color: var(--ok); }
.tl-private svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

/* инструмент */
.tl-tool { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: grid; gap: 14px; }
.tl-drop { position: relative; display: grid; place-items: center; text-align: center; gap: 8px; min-height: 210px; padding: 26px 16px;
  border: 2px dashed var(--line-2); border-radius: 14px; background: var(--card-2); cursor: pointer; transition: border-color .15s, background .15s; }
.tl-drop:hover, .tl-drop.over { border-color: var(--lime); background: #1a2016; }
.has-files .tl-drop { min-height: 96px; padding: 14px; }
.tl-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tl-drop svg { width: 40px; height: 40px; fill: none; stroke: var(--lime); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.has-files .tl-drop svg { display: none; }
.tl-drop b { font: 600 1.15rem/1.2 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.tl-drop span { color: var(--dim); font-size: .92rem; }
.tl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--line-2);
  background: transparent; color: var(--text); font: 600 .98rem/1 var(--body); cursor: pointer; text-decoration: none; }
.tl-btn:hover { border-color: var(--dim-2); text-decoration: none; }
.tl-btn.p { background: var(--lime); border-color: var(--lime); color: var(--on-lime); }
.tl-btn.p:hover { filter: brightness(1.08); }
.tl-btn:disabled { opacity: .45; cursor: default; }

.tl-opts { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.tl-opt { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: .94rem; }
.tl-opt input[type="range"] { width: 160px; accent-color: var(--lime); }
.tl-opt output { min-width: 3ch; color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }
.tl-opt select, .tl-opt input[type="number"] { min-height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--text); font: inherit; }
.tl-opt input[type="number"] { width: 96px; }
.tl-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.tl-seg label { position: relative; }
.tl-seg input { position: absolute; opacity: 0; }
.tl-seg span { display: block; padding: 8px 12px; color: var(--dim); cursor: pointer; font-size: .9rem; }
.tl-seg input:checked + span { background: var(--lime); color: var(--on-lime); font-weight: 600; }
.tl-seg input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: -2px; }
[data-resize="pct"] .tl-px, [data-resize="px"] .tl-pc { display: none; }
.tl-opt input[type="checkbox"] { accent-color: var(--lime); width: 17px; height: 17px; }

.tl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tl-list:empty { display: none; }
.tl-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); flex-wrap: wrap; }
.tl-n { min-width: 1.2em; color: var(--dim-2); font-variant-numeric: tabular-nums; text-align: end; }
.tl-n:empty { display: none; }
.tl-name { flex: 1 1 200px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-name small { margin-inline-start: 8px; color: var(--dim-2); }
.tl-res { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tl-st { color: var(--dim); font-size: .9rem; font-variant-numeric: tabular-nums; }
.tl-st.ok { color: var(--ok); }
.tl-st.bad { color: var(--bad); }
.tl-dl { padding: 6px 12px; border-radius: 9px; background: var(--lime); color: var(--on-lime); font-weight: 700; font-size: .86rem; }
.tl-dl:hover { text-decoration: none; filter: brightness(1.08); }
.tl-ic { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line-2); background: transparent; color: var(--dim); cursor: pointer; font-size: 1rem; }
.tl-ic:hover:not(:disabled) { color: var(--text); border-color: var(--dim-2); }
.tl-ic:disabled { opacity: .3; cursor: default; }
.tl-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tl-tool:not(.has-files) .tl-actions { display: none; }
.tl-msg { margin: 0; font-size: .92rem; color: var(--dim); }
.tl-msg:empty { display: none; }
.tl-msg.bad { color: var(--bad); }
.tl-result { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--lime); background: #171c10; }
.tl-result b { display: block; }
.tl-result small { color: var(--dim); }

/* текст под инструментом */
.tl-sec { padding: 34px 0 0; }
.tl-sec h2 { font-size: 1.5rem; text-transform: uppercase; margin: 0 0 14px; }
.tl-steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tl-steps li { counter-increment: s; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--dim); }
.tl-steps li::before { content: counter(s); display: block; font: 700 1.4rem/1 var(--display); color: var(--lime); margin-bottom: 6px; }
.tl-faq details { border-bottom: 1px solid var(--line); }
.tl-faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.tl-faq summary::after { content: "+"; color: var(--lime); font-weight: 700; }
.tl-faq details[open] summary::after { content: "−"; }
.tl-faq p { margin: 0 0 14px; color: var(--dim); max-width: 70ch; }

/* сетка инструментов */
.tl-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.tl-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--text); }
.tl-card:hover { border-color: var(--lime); text-decoration: none; }
.tl-card[aria-current] { border-color: var(--line-2); opacity: .55; pointer-events: none; }
.tl-card svg { flex: none; width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: #1d2312; fill: none; stroke: var(--lime); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tl-card b { display: block; font-weight: 600; }
.tl-card small { color: var(--dim); font-size: .86rem; line-height: 1.35; display: block; margin-top: 2px; }
.tl-group { margin: 26px 0 10px; font: 600 .8rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--dim-2); }

.tl-foot { margin: 48px 0 0; padding: 22px 0 34px; border-top: 1px solid var(--line); color: var(--dim-2); font-size: .88rem; display: flex; gap: 16px; flex-wrap: wrap; }
.tl-foot a { color: var(--dim); }
.tl-prose { max-width: 72ch; color: var(--dim); }
.tl-sec.tl-prose h2:first-child { margin-top: 0; }
.tl-prose p { margin: 0 0 12px; }
.tl-prose h2 { color: var(--text); font-size: 1.3rem; margin: 26px 0 8px; text-transform: uppercase; }

@media (max-width: 600px) {
  .tl-tool { padding: 12px; border-radius: 14px; }
  .tl-drop { min-height: 170px; }
  .tl-actions .tl-btn { flex: 1; }
  .tl-opt input[type="range"] { width: 120px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* языки без латиницы: заголовки системным шрифтом, без капса */
:lang(hi) h1, :lang(hi) h2, :lang(hi) .tl-drop b, :lang(ar) h1, :lang(ar) h2, :lang(ar) .tl-drop b { font-family: var(--body); font-weight: 700; text-transform: none; }
[dir="rtl"] .tl-faq summary::after { margin-inline-start: auto; }
