/* «Проверка связи» СамараЛан (пожелание №625). Цвета, шрифт, карточки и кнопки — из /style.css теста скорости */

body[data-view="load"] main { visibility: hidden; }

.nt {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 6vh;
  animation: rise .45s cubic-bezier(.2, .8, .2, 1) both;
}

#result.nt { margin-top: 8px; gap: 12px; }

.nt h1 { font-size: 26px; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
.nt-lead { margin: 0; color: var(--muted); font-size: 16px; }

.nt-field { display: block; margin-top: 8px; }
.nt-field span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.nt-field i { font-style: normal; font-weight: 400; color: var(--faint); margin-left: 4px; }

.nt-field input {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  outline: none;
}

.nt-field input::placeholder { color: var(--faint); }
.nt-field input:focus-visible { border-color: var(--down); box-shadow: 0 0 0 3px color-mix(in srgb, var(--down) 22%, transparent); }

.nt .button:disabled { opacity: .55; cursor: default; }
.nt .button:focus-visible { outline: 3px solid var(--down-b); outline-offset: 3px; }

.nt-note { margin: 0; font-size: 14px; color: var(--warn); }

/* ---------- Шаги ---------- */

.nt-steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.nt-steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 2px 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--faint);
}

.nt-steps li b { font-weight: 600; font-size: 16px; }
.nt-steps li span { grid-column: 2; font-size: 14px; color: var(--muted); min-height: 0; overflow-wrap: anywhere; }
.nt-steps li span:empty { display: none; }

.nt-steps li .mark {
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid var(--track);
}

.nt-steps li .mark svg { width: 16px; height: 16px; display: none; }

.nt-steps li[data-state="active"] { color: var(--text); border-color: color-mix(in srgb, var(--down) 45%, transparent); }
.nt-steps li[data-state="active"] .mark { border-color: var(--track); border-top-color: var(--down); animation: nt-spin .8s linear infinite; }

.nt-steps li[data-state="done"],
.nt-steps li[data-state="warn"],
.nt-steps li[data-state="skip"] { color: var(--text); }

.nt-steps li[data-state="done"] .mark { border-color: transparent; background: var(--ok); color: var(--bg); }
.nt-steps li[data-state="warn"] .mark { border-color: transparent; background: var(--warn); color: var(--bg); }
.nt-steps li[data-state="skip"] .mark { border-style: dashed; }
.nt-steps li[data-state="done"] .mark svg,
.nt-steps li[data-state="warn"] .mark svg { display: block; }

.nt-bar { grid-column: 2; height: 4px; border-radius: 2px; background: var(--track); overflow: hidden; }
.nt-bar i { display: block; height: 100%; width: 0; background: var(--down); border-radius: 2px; transition: width .2s linear; }
.nt-steps li:not([data-state="active"]) .nt-bar { display: none; }

@keyframes nt-spin { to { transform: rotate(360deg); } }

/* ---------- Итог ---------- */

.verdict.info { background: color-mix(in srgb, var(--down) 9%, transparent); border-color: color-mix(in srgb, var(--down) 28%, transparent); }
.verdict.info .ico { background: var(--down); }

.nt-lines { list-style: none; margin: 0; padding: 6px 16px; }

.nt-lines li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  padding: 12px 0;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.nt-lines li + li { border-top: 1px solid var(--line); }

.nt-lines .nt-dot {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ok);
  color: var(--bg);
}

.nt-lines .nt-dot svg { width: 13px; height: 13px; }
.nt-lines li[data-level="warn"] .nt-dot,
.nt-lines li[data-level="bad"] .nt-dot { background: var(--warn); }
.nt-lines li[data-level="info"] .nt-dot { background: var(--down); }

.nt-sent { margin: 2px 4px 0; font-size: 14px; color: var(--muted); text-align: center; }
.nt-sent b { color: var(--text); font-weight: 600; }

/* ---------- Полная проверка с устройства ---------- */

.nt-full { display: flex; flex-direction: column; gap: 12px; padding: 18px 16px; margin-top: 6px; }
.nt-full > div { display: flex; flex-direction: column; gap: 12px; }
.nt-full > div[hidden] { display: none; }
.nt-full h2 { font-size: 18px; line-height: 1.25; margin: 0; letter-spacing: -.01em; }
.nt-full-lead { margin: 0; font-size: 15px; line-height: 1.45; color: var(--muted); }
.nt-full .button { align-self: stretch; text-align: center; text-decoration: none; }
.nt-full .link { align-self: flex-start; margin-top: 0; padding: 4px 0; text-align: left; }
.nt-small { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); }

.nt-how { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.45; }
.nt-how li::marker { color: var(--faint); font-weight: 600; }

.nt-got {
  margin: 0;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ok);
  background: var(--ok-bg);
  border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent);
}

.nt-os { display: flex; gap: 6px; }
.nt-os button {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
}
.nt-os button[aria-selected="true"] { color: var(--text); background: var(--surface-solid); border-color: var(--down); }
.nt-os button:focus-visible { outline: 3px solid var(--down-b); outline-offset: 2px; }

.nt-cmd {
  margin: 0;
  padding: 12px 14px;
  max-height: 132px;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--track);
  color: var(--text);
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: all;
}

.nt-field textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
.nt-field textarea::placeholder { color: var(--faint); font-family: Inter, system-ui, sans-serif; font-size: 14px; }
.nt-field textarea:focus-visible { border-color: var(--down); box-shadow: 0 0 0 3px color-mix(in srgb, var(--down) 22%, transparent); }

.nt-row { display: flex; gap: 8px; flex-wrap: wrap; }
.nt-row:empty { display: none; }
.nt-row .button { flex: 1 1 140px; }

@media (min-width: 720px) {
  .nt { margin-top: 9vh; }
  .nt h1 { font-size: 30px; }
}
