/* /tools/troubleshooter/ */
.tsw { margin: 8px 0 3rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); overflow: hidden; }
.tsw-progress { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.tsw-progress li { display: flex; align-items: center; gap: 8px; margin: 0; padding: 14px 16px; font: 600 13px/1.2 var(--sans); color: var(--ink-3); border-right: 1px solid var(--line); }
.tsw-progress li:last-child { border-right: 0; }
.tsw-progress span { display: grid; place-items: center; flex-shrink: 0; width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--line-2); font: 600 11.5px/1 var(--mono); }
.tsw-progress li.is-cur { color: var(--ink); background: var(--panel); }
.tsw-progress li.is-cur span { border-color: var(--accent); color: var(--accent); }
.tsw-progress li.is-done span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (max-width: 640px) { .tsw-progress li { justify-content: center; padding: 12px 4px; font-size: 0; gap: 0; } .tsw-progress span { font-size: 11.5px; } }
.tsw-form { padding: 22px 22px 18px; }
.tsw-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.tsw-step legend { padding: 0; margin: 0 0 14px; font: 700 1.3rem/1.25 var(--sans); letter-spacing: -.02em; color: var(--ink); outline: none; }
.tsw-hint { margin: -4px 0 14px; color: var(--ink-2); font-size: 15px; }
.tsw-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.tsw-opt { position: relative; display: block; cursor: pointer; }
.tsw-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tsw-opt > span { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 13px 14px 13px 42px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); transition: border-color .15s, background-color .15s; position: relative; }
.tsw-opt > span::before { content: ""; position: absolute; left: 14px; top: 15px; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--ink-3); background: var(--panel); }
.tsw-opt input[type="checkbox"] + span::before { border-radius: 4px; }
.tsw-opt b { font-weight: 600; font-size: 15px; color: var(--ink); }
.tsw-opt small { font-size: 13px; color: var(--ink-3); }
.tsw-opt:hover > span { border-color: var(--ink-3); }
.tsw-opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.tsw-opt input:checked + span::before { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--panel); }
.tsw-opt input[type="checkbox"]:checked + span::before { box-shadow: none; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 8 3 3 6-6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.tsw-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.tsw-sub { margin-top: 18px; display: grid; gap: 6px; max-width: 560px; }
.tsw-build-l { display: block; margin: 18px 0 6px; }
.tsw-build { max-width: 260px; font-family: var(--mono); }
.tsw-nav { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.tsw-nav .btn-primary { margin-left: auto; }
.tsw-nav .btn:disabled { opacity: .45; cursor: not-allowed; }
.tsw-msg { font-size: 14px; color: var(--warn); order: -1; }
.tsw-result { padding: 22px; }
.tsw-res-head h2 { margin: 0 0 4px; outline: none; }
.tsw-res-head .btn-row { margin: 12px 0 8px; }
.tsw-fixes { list-style: none; counter-reset: fx; margin: 18px 0 26px; padding: 0; display: grid; gap: 10px; }
.tsw-fix { counter-increment: fx; position: relative; margin: 0; padding: 16px 18px 14px 60px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); }
.tsw-fix::before { content: counter(fx, decimal-leading-zero); position: absolute; left: 16px; top: 16px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--ink); color: var(--bg); font: 600 12px/1 var(--mono); }
.tsw-fix:first-child::before { background: var(--accent); color: var(--accent-ink); }
.tsw-fix h3 { margin: 4px 0 6px; font-size: 1.05rem; }
.tsw-fix p { margin: 0 0 6px; color: var(--ink-2); font-size: 15px; }
.tsw-fix a { font-size: 14px; font-weight: 600; }
.tsw-result .code pre { white-space: pre-wrap; }
@media (max-width: 560px) {
  .tsw-form, .tsw-result { padding: 16px; }
  .tsw-fix { padding: 50px 14px 12px; }
  .tsw-fix::before { top: 12px; left: 14px; }
  .tsw-res-head .btn-row .btn { flex: 1; }
}
