.troubleshooting-page .top {
  position: static;
}

.troubleshooting-page main {
  max-width: 1080px;
}

.breadcrumb {
  margin: 22px 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumb a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.diagnostic-hero {
  padding: 18px 0 34px;
}

.diagnostic-hero h1 {
  max-width: 18ch;
}

.diagnostic-form {
  max-width: 760px;
  margin-top: 24px;
  padding: clamp(18px, 3vw, 26px);
}

.diagnostic-form .row {
  align-items: stretch;
}

.diagnostic-form input {
  margin-bottom: 0;
}

.diagnostic-form button {
  flex: 0 0 auto;
  border-radius: 14px;
}

.scan-reassurance {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  opacity: 0.82;
}

.diagnostic-result {
  scroll-margin-top: 24px;
  margin: 0 0 24px;
}

.diagnostic-result.is-loading {
  padding-block: 18px;
}

.diagnostic-ui {
  display: grid;
  gap: 14px;
}

.diagnostic-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.diagnostic-heading .section-title {
  margin-bottom: 0;
}

.diagnostic-domain {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.diagnostic-checks {
  display: grid;
  gap: 10px;
}

.diagnostic-row {
  display: grid;
  grid-template-columns: minmax(112px, 0.7fr) auto minmax(0, 2.2fr);
  align-items: center;
  gap: 12px 16px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(7, 24, 40, 0.46);
}

.diagnostic-check {
  color: var(--text);
}

.diagnostic-copy,
.diagnostic-detail {
  margin: 0;
  color: #c6d8eb;
  font-size: 0.96rem;
  line-height: 1.55;
}

.diagnostic-detail {
  grid-column: 1 / -1;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
}

.diagnostic-status,
.topic-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 5px 10px;
  min-width: 78px;
  background: #0a1b2d;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.diagnostic-status.is-pass {
  border-color: rgba(54, 211, 153, 0.45);
  color: var(--good);
}

.diagnostic-status.is-warning {
  border-color: rgba(245, 158, 11, 0.48);
  color: #f8bd52;
}

.diagnostic-status.is-monitoring {
  border-color: rgba(35, 197, 175, 0.42);
  color: #86d7ca;
}

.diagnostic-status.is-fail {
  border-color: rgba(251, 113, 133, 0.5);
  color: var(--bad);
}

.diagnostic-status.is-unknown {
  color: var(--muted);
}

.diagnostic-metric {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(24, 68, 101, 0.56), rgba(10, 27, 45, 0.58));
}

.diagnostic-metric-value {
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.06em;
  line-height: 1;
}

.diagnostic-note {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid var(--line);
  color: #c6d8eb;
  background: rgba(7, 24, 40, 0.36);
  font-size: 0.96rem;
  line-height: 1.55;
}

.diagnostic-note.is-pass {
  border-left-color: var(--good);
}

.diagnostic-note.is-warning {
  border-left-color: var(--accent);
}

.diagnostic-note.is-monitoring {
  border-left-color: var(--primary);
}

.diagnostic-note.is-fail {
  border-left-color: var(--bad);
}

.diagnostic-primary-verdict {
  padding: 16px 18px;
  border-left: 3px solid var(--line);
  background: rgba(7, 24, 40, 0.5);
}

.diagnostic-primary-verdict.is-fail {
  border-left-color: var(--bad);
}

.diagnostic-primary-verdict strong {
  display: block;
  color: var(--text);
  font-size: 1.1rem;
}

.diagnostic-primary-verdict p {
  margin: 4px 0 0;
  color: #c6d8eb;
}

.diagnostic-loading,
.diagnostic-failure {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #c6d8eb;
  font-size: 0.98rem;
}

.diagnostic-failure {
  display: block;
  padding: 4px 0;
}

.diagnostic-failure strong {
  color: var(--bad);
}

.diagnostic-failure p {
  margin: 6px 0 0;
}

.diagnostic-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(35, 197, 175, 0.28);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: diagnostic-spin 0.8s linear infinite;
}

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

.troubleshooting-content {
  display: grid;
  grid-template-columns: minmax(0, 740px) 260px;
  justify-content: center;
  gap: 32px;
  align-items: start;
}

.troubleshooting-article h2:not(:first-child) {
  margin-top: 28px;
}

.troubleshooting-article p,
.troubleshooting-article li {
  color: #c6d8eb;
  font-size: 1.03rem;
  line-height: 1.7;
}

.troubleshooting-content a,
.related-links a,
.reference-links a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.related-links {
  display: grid;
  gap: 10px;
}

.troubleshooting-sidebar {
  position: sticky;
  top: 22px;
}

.sidebar-audit-cta {
  display: grid;
  gap: 7px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.sidebar-audit-cta strong {
  font-size: 0.98rem;
}

.sidebar-audit-cta a {
  color: #86d7ca;
}

.conversion-card {
  border-color: rgba(245, 158, 11, 0.42);
  padding: 18px 20px;
}

.conversion-card input {
  margin: 8px 0 10px;
}

.conversion-card .section-title {
  margin-bottom: 6px;
}

.conversion-card p {
  max-width: 760px;
  margin: 0 0 12px;
}

.conversion-card label {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.guide-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.guide-group h3 {
  color: #86d7ca;
}

@media (max-width: 820px) {
  .troubleshooting-content,
  .guide-groups {
    grid-template-columns: 1fr;
  }

  .troubleshooting-sidebar {
    position: static;
  }
}

@media (max-width: 620px) {
  .diagnostic-form .row {
    flex-direction: column;
  }

  .diagnostic-form button {
    width: 100%;
  }

  .diagnostic-heading,
  .diagnostic-metric {
    align-items: flex-start;
    flex-direction: column;
  }

  .diagnostic-row {
    grid-template-columns: 1fr auto;
  }

  .diagnostic-copy,
  .diagnostic-detail {
    grid-column: 1 / -1;
  }
}
