.diagnostic-tool-page {
  --dt-bg: #06111a;
  --dt-surface: rgba(11, 22, 32, 0.88);
  --dt-surface-2: rgba(14, 28, 41, 0.94);
  --dt-line: rgba(117, 227, 255, 0.2);
  --dt-line-strong: rgba(143, 234, 255, 0.34);
  --dt-text: #ecf7ff;
  --dt-muted: #9cb7ca;
  --dt-accent: #86f8ea;
  --dt-accent-2: #7dd2ff;
  color: var(--dt-text);
  background:
    radial-gradient(circle at 12% -8%, rgba(92, 211, 244, 0.18), transparent 32%),
    radial-gradient(circle at 88% 10%, rgba(108, 255, 220, 0.12), transparent 28%),
    linear-gradient(180deg, #06111a 0%, #07141e 42%, #08131b 100%);
}

.diagnostic-tool-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 211, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 211, 255, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 16%, black 0%, transparent 75%);
  pointer-events: none;
  z-index: -1;
}

.diagnostic-tool-page h1,
.diagnostic-tool-page h2,
.diagnostic-tool-page h3 {
  font-family: Manrope, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.035em;
}

.diagnostic-tool-page .site-header {
  background: rgba(5, 11, 17, 0.84);
  border-bottom-color: rgba(126, 215, 255, 0.16);
}

.diagnostic-tool-page .brand-text strong,
.diagnostic-tool-page .site-nav a,
.diagnostic-tool-page .nav-toggle {
  color: #edf8ff;
}

.diagnostic-tool-page .brand-text small,
.diagnostic-tool-page .site-nav a {
  opacity: 0.84;
}

.diagnostic-tool-page .site-nav a:not(.button):hover,
.diagnostic-tool-page .site-nav a:not(.button)[aria-current="page"] {
  color: #ffffff;
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.45);
}

.diagnostic-tool-page .nav-toggle {
  background: rgba(8, 18, 27, 0.9);
  border-color: rgba(144, 230, 255, 0.36);
}

.diagnostic-tool-page .button.primary {
  background: linear-gradient(135deg, var(--dt-accent), var(--dt-accent-2));
  color: #032232;
}

.diagnostic-tool-page .button.ghost {
  border-color: rgba(146, 226, 255, 0.42);
  color: #d8eefc;
}

.diagnostic-tool-page .button.ghost:hover {
  background: rgba(96, 182, 215, 0.12);
}

.diag-hero {
  position: relative;
  border-bottom: 1px solid rgba(126, 215, 255, 0.16);
}

.diag-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(4, 10, 15, 0.94) 8%, rgba(4, 10, 15, 0.76) 44%, rgba(4, 10, 15, 0.28) 84%),
    url("../img/diagnostic-tool/hero.png") center / cover no-repeat;
}

.diag-hero::after {
  content: "";
  position: absolute;
  inset: auto auto -160px 58%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 255, 225, 0.16) 0%, rgba(94, 255, 225, 0) 70%);
  pointer-events: none;
}

.diag-hero .container {
  position: relative;
  z-index: 1;
  padding: 7rem 0 4.2rem;
}

.diag-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 1.2rem;
  align-items: end;
}

.diag-brand-row {
  margin-top: 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.diag-production-icon {
  width: clamp(62px, 7vw, 86px);
  height: auto;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
}

.diag-brand-copy {
  display: grid;
  gap: 0.2rem;
}

.diag-brand-label {
  color: #9ec2d4;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.diag-brand-copy strong {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1;
  color: #f4fcff;
}

.diag-title {
  margin-top: 1rem;
  font-size: clamp(2.3rem, 6vw, 5.8rem);
  line-height: 0.94;
  max-width: 11ch;
  text-wrap: balance;
}

.diag-lead {
  margin-top: 1.35rem;
  max-width: 64ch;
  color: #d2e5f1;
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  line-height: 1.75;
}

.diag-jump {
  margin-top: 1.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.diag-jump a,
.diag-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(144, 230, 255, 0.28);
  background: rgba(11, 27, 39, 0.6);
  color: #d8effb;
  padding: 0.38rem 0.78rem;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.diag-jump a:hover {
  background: rgba(106, 195, 224, 0.18);
  border-color: rgba(149, 234, 255, 0.48);
}

.diag-meta {
  margin-top: 1.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.diag-hero-card,
.diag-panel,
.diag-surface,
.diag-stat,
.diag-gallery-card,
.diag-flow-card,
.diag-resource-card {
  border: 1px solid var(--dt-line);
  border-radius: 18px;
  background: var(--dt-surface);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(10px);
}

.diag-hero-card {
  padding: 1.1rem;
  display: grid;
  gap: 1rem;
}

.diag-hero-card-top {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.diag-app-icon {
  width: 78px;
  height: 78px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.diag-kicker {
  color: var(--dt-muted);
  line-height: 1.65;
}

.diag-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.diag-stat {
  padding: 0.95rem;
}

.diag-stat strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  color: #f4fdff;
}

.diag-stat span {
  color: var(--dt-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.diag-main {
  padding: 4.1rem 0 6.4rem;
}

.diag-section + .diag-section {
  margin-top: 4rem;
}

.diag-section {
  scroll-margin-top: 92px;
}

.diag-section-head {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.4rem;
}

.diag-section-head h2 {
  font-size: clamp(1.9rem, 4vw, 3.3rem);
  color: #f2fbff;
  max-width: 15ch;
}

.diag-section-head p {
  max-width: 72ch;
  color: #b6cfde;
}

.diag-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: 1rem;
}

.diag-panel {
  padding: 1.2rem;
}

.diag-panel h3 {
  margin-bottom: 0.8rem;
}

.diag-panel p,
.diag-panel li,
.diag-resource-card p,
.diag-flow-card p {
  color: #bbd4e3;
  line-height: 1.72;
}

.diag-panel ul,
.diag-resource-card ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.diag-side-stack {
  display: grid;
  gap: 1rem;
}

.diag-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.diag-surface {
  padding: 1.15rem;
}

.diag-surface h3 {
  margin-bottom: 0.6rem;
}

.diag-surface p {
  color: #b8d2e1;
  line-height: 1.7;
}

.diag-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.diag-gallery-featured {
  grid-template-columns: 1.2fr 1fr;
  margin-bottom: 1rem;
}

.diag-gallery-card {
  overflow: hidden;
}

.diag-shot {
  position: relative;
  display: block;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  cursor: zoom-in;
}

.diag-shot::after {
  content: "Open full-res";
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  padding: 0.42rem 0.68rem;
  border-radius: 999px;
  background: rgba(7, 15, 24, 0.78);
  border: 1px solid rgba(126, 215, 255, 0.2);
  color: #eaf7ff;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
}

.diag-gallery-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  display: block;
  background: linear-gradient(180deg, rgba(6, 12, 20, 0.94), rgba(10, 17, 26, 0.96));
}

.diag-gallery-copy {
  padding: 1rem;
}

.diag-gallery-copy h3 {
  margin-bottom: 0.45rem;
  font-size: 1.05rem;
}

.diag-gallery-copy p {
  color: #b2cada;
  line-height: 1.65;
}

.diag-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.diag-module-card {
  border: 1px solid var(--dt-line);
  border-radius: 18px;
  background: var(--dt-surface);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(10px);
  padding: 1rem;
}

.diag-module-head {
  margin-bottom: 0.9rem;
}

.diag-module-head h3 {
  margin-bottom: 0.4rem;
}

.diag-module-head p {
  color: #b5cede;
  line-height: 1.65;
}

.diag-module-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.diag-module-gallery img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  border: 1px solid rgba(126, 215, 255, 0.14);
  background: linear-gradient(180deg, rgba(6, 12, 20, 0.94), rgba(10, 17, 26, 0.96));
  object-fit: contain;
}

.diag-module-gallery-dense {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.diag-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}

.diag-lightbox[hidden] {
  display: none;
}

.diag-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 14, 0.82);
  backdrop-filter: blur(8px);
}

.diag-lightbox-figure {
  position: relative;
  z-index: 1;
  margin: 0;
  width: min(96vw, 1600px);
  max-height: calc(100svh - 4rem);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(126, 215, 255, 0.18);
  background: linear-gradient(180deg, rgba(6, 12, 20, 0.98), rgba(10, 17, 26, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.diag-lightbox-image {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: calc(100svh - 9rem);
  height: auto;
  object-fit: contain;
  background: #081019;
}

.diag-lightbox-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem 1rem;
  color: #d3e7f2;
  line-height: 1.55;
}

.diag-lightbox-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 999px;
  padding: 0.6rem 0.9rem;
  background: rgba(126, 215, 255, 0.12);
  border: 1px solid rgba(126, 215, 255, 0.2);
  color: #eff9ff;
  text-decoration: none;
  font-weight: 600;
}

.diag-lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 2;
  border: 1px solid rgba(126, 215, 255, 0.18);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: rgba(8, 16, 25, 0.86);
  color: #eef8ff;
  font: inherit;
  cursor: pointer;
}

.diag-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.diag-flow-card {
  padding: 1.1rem;
}

.diag-flow-card strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(130, 245, 231, 0.14);
  color: var(--dt-accent);
  margin-bottom: 0.8rem;
}

.diag-resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.diag-resource-card {
  padding: 1.1rem;
}

.diag-resource-card h3 {
  margin-bottom: 0.6rem;
}

.diag-resource-card ul {
  padding-left: 1.05rem;
  color: #bdd4e3;
}

.diag-note {
  color: #95b4c7;
  font-size: 0.9rem;
}

.diagnostic-tool-page .footer {
  background: #050b11;
  border-top-color: rgba(125, 208, 245, 0.18);
}

.diagnostic-tool-page .footer-text,
.diagnostic-tool-page .footer-links {
  color: #a8c5d6;
}

@media (max-width: 1100px) {
  .diag-hero-grid,
  .diag-layout,
  .diag-grid-3,
  .diag-gallery,
  .diag-gallery-featured,
  .diag-module-grid,
  .diag-flow,
  .diag-resource-grid {
    grid-template-columns: 1fr;
  }

  .diag-hero-card {
    max-width: 760px;
  }
}

@media (max-width: 760px) {
  .diag-hero .container {
    padding-top: 6rem;
  }

  .diag-hero-card,
  .diag-panel,
  .diag-surface,
  .diag-gallery-copy,
  .diag-flow-card,
  .diag-resource-card {
    padding: 1rem;
  }

  .diag-hero-stats {
    grid-template-columns: 1fr;
  }

  .diagnostic-tool-page .site-nav {
    background: rgba(5, 11, 17, 0.98);
    border-bottom-color: rgba(126, 215, 255, 0.18);
  }

  .diag-module-gallery,
  .diag-module-gallery-dense {
    grid-template-columns: 1fr;
  }

  .diag-lightbox {
    padding: 0.8rem;
  }

  .diag-lightbox-figure {
    width: min(96vw, 900px);
    max-height: calc(100svh - 2rem);
  }

  .diag-lightbox-image {
    max-height: calc(100svh - 8rem);
  }

  .diag-lightbox-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .diag-jump a,
  .diag-meta span {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .diag-title {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .diag-shot::after {
    right: 0.6rem;
    bottom: 0.6rem;
    font-size: 0.68rem;
  }
}
