/* ============================================================
   Claude / ChatGPT 可用性检测页样式（ai-check.html）
   依赖 style-pages.css 的基础变量与 .connectivity-* 结构
   ============================================================ */

.ai-page .connectivity-hero {
  margin-bottom: 16px;
}

.ai-conclusion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.ai-conclusion {
  padding: 16px 18px 14px;
  border: 1px solid #e2e6ee;
  border-radius: 12px;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.ai-conclusion[data-level="ok"] {
  border-color: #a9e3c6;
  box-shadow: 0 8px 22px rgba(24, 138, 90, 0.08);
}

.ai-conclusion[data-level="warn"] {
  border-color: #f0d5a4;
  box-shadow: 0 8px 22px rgba(183, 121, 31, 0.08);
}

.ai-conclusion[data-level="bad"] {
  border-color: #f3c0c0;
  box-shadow: 0 8px 22px rgba(198, 47, 47, 0.07);
}

.ai-conclusion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-conclusion-head h2 {
  margin: 0;
  color: #222b39;
  font-size: 1.16rem;
}

.ai-badge {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.ai-ip-source {
  margin-left: 4px;
  color: #8a929f;
  font-size: 0.72rem;
}

.ai-badge.is-ok {
  background: #e9f8f0;
  color: #0f8055;
}

.ai-badge.is-warn {
  background: #fff4e1;
  color: #a86312;
}

.ai-badge.is-bad {
  background: #fdecec;
  color: #c02b2b;
}

.ai-badge.is-pending {
  background: #f1f3f6;
  color: #6b7280;
}

.ai-conclusion-sub {
  margin: 9px 0 12px;
  color: #667080;
  font-size: 0.84rem;
  line-height: 1.6;
}

.ai-reasons {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
  line-height: 1.55;
}

.ai-reasons li {
  color: #4b5563;
  overflow-wrap: anywhere;
}

.ai-reasons li strong {
  color: #333c49;
  font-weight: 600;
}

.ai-reasons li.is-bad {
  color: #c02b2b;
}

.ai-reasons li.is-warn {
  color: #a15c0f;
}

.ai-hosts {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #edf0f5;
}

.ai-host-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.ai-host-name {
  color: #3d4654;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.76rem;
}

.ai-host-status.is-ok {
  color: #12805a;
  font-weight: 600;
}

.ai-host-status.is-warn {
  color: #a86312;
  font-weight: 600;
}

.ai-host-status.is-bad {
  color: #c02b2b;
}

.ai-host-status.is-pending {
  color: #8a929f;
}

.ai-host-status {
  margin-left: auto;
  text-align: right;
}

.ai-host-retry {
  flex-shrink: 0;
  margin-left: 6px;
  padding: 2px 8px;
  border: 1px solid #c9d6ef;
  border-radius: 6px;
  background: #fff;
  color: #2a5bd7;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
}

.ai-host-retry:hover {
  border-color: #9bb8ea;
  background: #eef4ff;
}

.ai-host-retry:active {
  transform: translateY(1px);
}

.ai-block {
  margin-bottom: 26px;
}

.ai-block-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.ai-block-head h2 {
  margin: 0;
  color: #303846;
  font-size: 1.03rem;
}

.ai-block-hint {
  color: #8a929f;
  font-size: 0.75rem;
}

.ai-block-note {
  margin: 0 0 10px;
  color: #7c8492;
  font-size: 0.8rem;
  line-height: 1.6;
}

.ai-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ai-profile-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #e9edf4;
  border-radius: 9px;
  background: #f8fafc;
  box-sizing: border-box;
}

.ai-profile-label {
  color: #8a929f;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.ai-profile-value {
  color: #2c3442;
  font-size: 0.84rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ai-profile-empty {
  grid-column: 1 / -1;
  color: #c02b2b;
  font-size: 0.82rem;
  background: #fdf3f3;
  border-color: #f3d0d0;
}

.ai-table-wrap {
  overflow-x: auto;
  border: 1px solid #e9edf4;
  border-radius: 10px;
  background: #fff;
}

.ai-env-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.ai-env-table th,
.ai-env-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #edf0f5;
  text-align: left;
  vertical-align: middle;
}

.ai-env-table th {
  background: #fafbfd;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.ai-env-table tbody tr:last-child td {
  border-bottom: 0;
}

.ai-env-table td {
  color: #3d4654;
  overflow-wrap: anywhere;
}

.ai-env-table td:first-child {
  color: #222b39;
  font-weight: 600;
  white-space: nowrap;
}

.ai-env-tag {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.ai-env-tag.is-ok {
  background: #e9f8f0;
  color: #0f8055;
}

.ai-env-tag.is-warn {
  background: #fff4e1;
  color: #a86312;
}

.ai-env-tag.is-info {
  background: #f1f3f6;
  color: #6b7280;
}

.ai-env-summary {
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.76rem;
  font-weight: 600;
}

.ai-env-summary.is-ok {
  background: #e9f8f0;
  color: #0f8055;
}

.ai-env-summary.is-warn {
  background: #fff4e1;
  color: #a86312;
}

.ai-rule-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: #5b6472;
  font-size: 0.84rem;
  line-height: 1.65;
}

.ai-rule-list li strong {
  color: #333c49;
}

@media (max-width: 900px) {
  .ai-conclusion-grid {
    grid-template-columns: 1fr;
  }

  .ai-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .ai-conclusion {
    padding: 14px;
  }

  .ai-conclusion-head h2 {
    font-size: 1.05rem;
  }

  .ai-badge {
    font-size: 0.74rem;
    padding: 4px 9px;
  }

  .ai-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-env-table {
    min-width: 0;
  }

  .ai-env-table thead {
    display: none;
  }

  .ai-env-table tbody tr {
    display: block;
    padding: 10px 12px;
    border-bottom: 1px solid #edf0f5;
  }

  .ai-env-table tbody tr:last-child {
    border-bottom: 0;
  }

  .ai-env-table td {
    display: flex;
    gap: 10px;
    padding: 2px 0;
    border: 0;
    font-size: 0.8rem;
  }

  .ai-env-table td:first-child {
    display: block;
    padding: 0 0 4px;
    font-size: 0.86rem;
  }

  .ai-env-table td[data-label]::before {
    flex: 0 0 88px;
    color: #8a929f;
    font-size: 0.74rem;
    content: attr(data-label);
  }

  .ai-block-head {
    gap: 6px;
  }
}
