/* ── Protocol Test ───────────────────────────────────────────────── */
.tool-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}
.tool-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.tool-desc {
  color: var(--muted2);
  font-size: 14px;
  margin-bottom: 24px;
}

/* Form */
.proto-form .form-row {
  display: flex;
  gap: 10px;
}
.proto-form .input-wrap--url { flex: 1; }
.proto-form .input {
  width: 100%;
  height: 44px;
  padding: 12px 16px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  font-family: var(--mono);
  transition: border-color .2s, box-shadow .2s;
}
.proto-form .input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91,138,248,.3);
}
.proto-form .btn-primary {
  min-height: 44px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .15s, filter .2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.proto-form .btn-primary:hover { transform: scale(1.02); filter: brightness(1.1); }
.proto-form .btn-primary:active { transform: scale(0.98); }
.proto-form .btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; }

}

to   { opacity: 1; transform: translateY(0); }
}
@keyframes proto-load {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* Results */
.proto-results {
  margin-top: 16px;
  animation: fadeInUp .4s var(--ease-out);
}
.result-title {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--accent);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(91,138,248,.15);
}

/* Section labels */
.section-label {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin: 24px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.section-label:first-child { margin-top: 0; }

/* Protocol matrix grid */
.proto-matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.proto-matrix-card {
  padding: 18px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: border-color .2s, transform .15s;
}
.proto-matrix-card:hover { transform: translateY(-1px); }
.proto-matrix-card.proto-status--ok { border-color: rgba(34,197,94,.3); }
.proto-matrix-card.proto-status--no { border-color: rgba(239,68,68,.3); }

.proto-matrix-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
  flex-shrink: 0;
}
.proto-status--ok .proto-matrix-icon {
  background: rgba(34,197,94,.15);
  color: #22c55e;
}
.proto-status--no .proto-matrix-icon {
  background: rgba(239,68,68,.15);
  color: var(--danger);
}

.proto-matrix-protocol {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.proto-matrix-status {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
.proto-status--ok .proto-matrix-status { color: #22c55e; }
.proto-status--no .proto-matrix-status { color: var(--danger); }

.proto-matrix-detail {
  font-size: 12px;
  color: var(--muted2);
  word-break: break-word;
  line-height: 1.4;
}

/* Details tables */
.proto-details table,
.proto-tls table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.proto-details th,
.proto-tls th {
  text-align: left;
  padding: 10px 14px;
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);
  width: 180px;
}
.proto-details td,
.proto-tls td {
  padding: 10px 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  word-break: break-all;
  font-family: var(--mono);
  font-size: 13px;
}
.proto-details tr:last-child th,
.proto-details tr:last-child td,
.proto-tls tr:last-child th,
.proto-tls tr:last-child td { border-bottom: none; }

/* Timing bars */
.timing-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.timing-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.timing-label {
  width: 160px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.timing-track {
  flex: 1;
  height: 8px;
  background: var(--surface2);
  border-radius: 4px;
  overflow: hidden;
}
.timing-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: 4px;
  transition: width .4s ease-out;
}
.timing-value {
  width: 70px;
  flex-shrink: 0;
  text-align: right;
  font-size: 13px;
  font-family: var(--mono);
  color: var(--text);
  font-weight: 600;
}

/* Error */
.proto-error { margin-top: 16px; animation: fadeInUp .3s var(--ease-out); }
.card-error { border-color: rgba(248,113,113,.3); }
.card-error p { color: var(--red); font-size: 14px; margin: 0; }

/* Loading */
.proto-loading { margin-top: 16px; text-align: center; }
.loader-bar {
  height: 3px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}
.loader-bar::after {
  content: '';
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: 2px;
  animation: proto-load 1.2s ease-in-out infinite;
}
.loader-text {
  font-size: 13px;
  color: var(--muted2);
  text-align: center;
  animation: fadeInUp .3s;
}

/* Info section */
.info-section { margin-top: 32px; }
.info-section h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(91,138,248,.15);
}
.info-section p {
  font-size: 14px;
  color: var(--muted2);
  line-height: 1.7;
}

/* Responsive */
@media (max-width: 768px) {
  .proto-matrix-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .proto-form .form-row { flex-direction: column; }
  .proto-form .btn-primary { width: 100%; justify-content: center; }
  .proto-form .input { width: 100%; }
  .timing-label { width: 100px; font-size: 11px; }
  .timing-value { width: 60px; font-size: 12px; }
  .proto-details th,
  .proto-tls th { width: 120px; }
}
