/* Вкладки результата и формы инструментов. Цвета и отступы — токены из site.css. */
.tool-tabs{display:flex;gap:4px;overflow-x:auto;margin:16px 0;padding:4px;border:1px solid var(--line);border-radius:14px;background:var(--surface);scrollbar-width:none}
.tool-tabs::-webkit-scrollbar{display:none}
.tool-tab{flex:1 0 auto;min-height:44px;padding:8px 14px;border:0;border-radius:10px;background:transparent;color:inherit;font:inherit;font-weight:600;cursor:pointer;white-space:nowrap}
.tool-tab:hover{background:rgba(123,92,255,.08)}
.tool-tab.is-on{background:var(--violet-fill);color:#fff}
.tool-tab:focus-visible{outline:2px solid var(--violet);outline-offset:2px}
.tool-panel{display:grid;gap:16px;margin-bottom:16px;min-width:0}
.tool-panel>*{min-width:0}
.tool-panel .res-card{padding:20px;overflow-wrap:anywhere}
.tool-panel h2{margin:0 0 10px;font-size:1.15rem}
.tool-panel h3{margin:18px 0 8px;font-size:1rem}
.tool-panel ul{margin:0 0 10px;padding-left:20px}
.tool-panel li{margin:0 0 6px}
.tool-make p{margin:0 0 12px}
.tool-note{margin:10px 0 0;font-size:.9rem;color:var(--muted)}
.tool-err{margin:10px 0 0;color:var(--err);font-weight:600}
.tool-dl{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:10px 0 0}
.tool-dl .btn{min-height:44px}
.tool-busy{display:flex;gap:10px;align-items:center;margin-top:10px;font-weight:600}
.tool-spin{width:16px;height:16px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:tool-spin 1s linear infinite;flex:none}
@keyframes tool-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.tool-spin{animation:none}}
.tool-text{position:relative;margin-top:8px;max-height:560px;overflow:auto;padding:2px 6px 2px 2px}
.tool-para{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;align-items:start;margin:0 0 10px;line-height:1.55}
.tool-para .tool-time{user-select:none;margin-top:3px}
.tool-para-text,.tool-para-edit{display:block;width:100%;box-sizing:border-box;padding:2px 6px;border:0;border-radius:6px;background:transparent;color:inherit;font:inherit;line-height:inherit;overflow-wrap:anywhere}
.tool-para-text{cursor:text}
.tool-para-text:hover{background:color-mix(in srgb,var(--violet) 8%,transparent)}
.tool-para-text:focus-visible,.tool-para-edit:focus{outline:2px solid var(--violet);outline-offset:0}
.tool-para-text.is-empty{color:var(--muted);font-style:italic}
.tool-para-edit{resize:none;overflow:hidden;background:var(--surface)}
.tool-para mark{background:color-mix(in srgb,var(--hl) 45%,transparent);color:inherit;border-radius:3px}
.tool-para mark.is-cur{background:var(--hl);color:#111113}
.text-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:8px}
.text-bar .btn{min-height:44px}
.text-status{color:var(--muted);font-size:.9rem}
.text-status.is-bad{color:var(--err)}
.text-find{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px 12px;margin-top:10px;padding:12px;border:1px solid var(--line);border-radius:14px}
.text-find[hidden]{display:none}
.text-field{display:grid;gap:4px;font-size:.9rem;color:var(--muted)}
.text-field input{min-height:44px;padding:0 12px;border:1px solid var(--line-strong);border-radius:10px;background:var(--surface);color:var(--ink);font:inherit;font-size:1rem}
.text-find-row{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px 10px;align-items:center}
.text-find-row .btn{min-height:44px}
.text-case{display:inline-flex;gap:8px;align-items:center;min-height:44px;cursor:pointer}
.text-count{color:var(--muted);font-size:.9rem}
.text-offer{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center}
.text-offer[hidden]{display:none}
.tool-toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:60;padding:10px 18px;border-radius:12px;background:var(--ink);color:var(--bg);font-weight:600;animation:tool-toast 1.8s linear both}
@keyframes tool-toast{0%,90%{opacity:1}100%{opacity:0}}
@media (max-width:520px){.tool-para{grid-template-columns:minmax(0,1fr);gap:2px}.tool-para .tool-time{justify-self:start}}
@media (prefers-reduced-motion:reduce){.tool-toast{animation:none}}
.tool-time{padding:2px 6px;border:1px solid var(--line);border-radius:6px;background:transparent;color:var(--violet-ink);font:inherit;font-size:.85rem;font-variant-numeric:tabular-nums;cursor:pointer;white-space:nowrap}
.tool-time:hover{background:rgba(123,92,255,.1)}
.tool-time-ro{flex:none;width:58px;padding-top:9px;font-size:.85rem;font-variant-numeric:tabular-nums;color:var(--muted)}
.tool-source{display:block;width:100%;max-height:60vh;border-radius:14px;background:#000}
audio.tool-source{background:none}
.tool-brief{list-style:none;padding:0!important}
.tool-brief li{margin-bottom:10px}
.tool-tc{margin:0;padding:12px;max-height:340px;overflow:auto;border:1px solid var(--line);border-radius:10px;font:.9rem/1.6 ui-monospace,Consolas,monospace;white-space:pre-wrap}
.tool-sub{margin:10px 0 4px;font-weight:600}
.tool-edit{margin-top:14px}
.tool-edit summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-weight:600;color:var(--violet-ink)}
.tool-rows{display:grid;gap:6px;max-height:520px;overflow:auto;padding-right:4px;margin-top:8px}
.tool-row{display:flex;gap:8px;align-items:flex-start;min-width:0}
.tool-row textarea{flex:1;min-width:0;min-height:40px;padding:8px 10px;border:1px solid var(--ctl);border-radius:8px;background:transparent;color:inherit;font:inherit;resize:vertical}
.tool-burn{margin-top:18px;padding-top:6px;border-top:1px solid var(--line)}
.tool-burn .btn-primary{margin-top:12px}
.tool-field{display:grid;gap:4px;margin:0 0 10px;font-size:.9rem}
.tool-field span{font-weight:600}
.tool-field select{min-height:44px;width:100%;max-width:340px;padding:8px 10px;border:1px solid var(--ctl);border-radius:8px;background:var(--surface);color:inherit;font:inherit}
.tool-check{display:flex;gap:8px;align-items:center;min-height:44px}
.tool-ba{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.tool-ba h3{margin:0 0 6px}
.tool-ba video,.tool-ba audio{width:100%;border-radius:10px}
/* форма инструмента на его странице */
.tool-form{display:grid;gap:12px}
.tool-form .tool-field select,.tool-form .tool-field input{width:100%;max-width:none}
.tool-form .tool-field input{min-height:44px;padding:8px 10px;border:1px solid var(--ctl);border-radius:8px;background:transparent;color:inherit;font:inherit}
.tool-entry{display:flex;gap:8px;flex-wrap:wrap}
.tool-entry input[type=url]{flex:1 1 240px;min-width:0;min-height:48px;padding:10px 14px;border:2px solid var(--violet);border-radius:12px;background:transparent;color:inherit;font:inherit}
.tool-entry .btn{min-height:48px}
.tool-rows-opt{display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
@media (max-width:520px){.tool-entry .btn{width:100%}.tool-panel .res-card{padding:16px}}
/* конспект: раздел с кадром — кадр справа, на телефоне под текстом */
.tool-intro{margin:0 0 14px;max-width:72ch;font-size:1.05rem;line-height:1.55;color:var(--muted)}
.tool-sec{padding:16px 0;border-top:1px solid var(--line);min-width:0}
.tool-sec h3{margin:0 0 10px}
.tool-sec-body{min-width:0;max-width:72ch}
.tool-sec-body ul{margin-top:0}
.tool-formula{margin:8px 0;padding:8px 12px;border-left:3px solid var(--violet-ink);border-radius:0 8px 8px 0;background:rgba(123,92,255,.08);font:.98rem/1.5 ui-monospace,Consolas,monospace;overflow-wrap:anywhere}
.tool-figure{margin:12px 0 0;min-width:0}
.tool-figure a{display:block}
.tool-figure img{display:block;width:100%;aspect-ratio:16/9;object-fit:contain;border:1px solid var(--line);border-radius:10px;background:#000}
.tool-figure figcaption{margin-top:6px;font-size:.85rem;color:var(--muted)}
@media(min-width:900px){
  .tool-sec.has-img{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,38%);grid-template-rows:auto 1fr;column-gap:24px}
  .tool-sec.has-img h3{grid-column:1/-1}
  .tool-sec.has-img .tool-figure{margin-top:0}
}
