/* Homepage-only shell for the interactive diagnostic station. */
body.home-diagnostic .site-header {
  border-color: #192b30;
  background: rgba(7, 18, 22, 0.96);
}

body.home-diagnostic .site-header :is(.brand, .nav a) {
  color: #dcebed;
}

body.home-diagnostic .site-header .nav a:hover,
body.home-diagnostic .site-header .nav a:focus-visible {
  color: #55e7e2;
}

body.home-diagnostic .site-header .button.secondary,
body.home-diagnostic .site-header .theme-toggle {
  color: #dcebed;
  border-color: #29444b;
  background: #0b1a1f;
}

body.home-diagnostic .site-header .nav-toggle span {
  background: #dcebed;
}

body.home-diagnostic .skip-link {
  position: fixed;
  z-index: 140;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: #061014;
  background: #55e7e2;
  border-radius: 4px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-160%);
}

body.home-diagnostic .skip-link:focus-visible {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.station-hero {
  --ink: #effafa;
  --muted: #8ca3aa;
  --dim: #647b82;
  --base: #061014;
  --surface: #0a171c;
  --surface-2: #0d1e24;
  --line: #20353b;
  --line-bright: #39727a;
  --cyan: #55e7e2;
  --blue: #69b9e8;
  --mint: #5ce2b2;
  --amber: #f1bd5a;
  --danger: #ee8e83;
  --page-pad: 42px;
  position: relative;
  min-height: calc(100svh - 70px);
  padding: 34px var(--page-pad) 20px;
  overflow: hidden;
  background: #061014;
}

.station-grid {
  position: absolute;
  inset: 0;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(93, 167, 174, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 167, 174, 0.12) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, #000 0, transparent 78%);
  pointer-events: none;
}

.station-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-areas:
    "copy jaw verify"
    "rail rail rail";
  grid-template-columns: minmax(292px, 360px) minmax(500px, 1fr) minmax(250px, 292px);
  column-gap: 28px;
  row-gap: 20px;
  width: 100%;
  max-width: 1760px;
  margin: 0 auto;
}

.station-copy {
  grid-area: copy;
  align-self: center;
  padding: 22px 0 12px;
}

.station-eyebrow {
  margin: 0 0 16px;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.station-copy h1 {
  max-width: 470px;
  margin: 0;
  font-size: 38px;
  font-weight: 790;
  line-height: 1.02;
  letter-spacing: 0;
  text-wrap: balance;
}

.station-lead {
  max-width: 400px;
  margin: 16px 0 22px;
  color: #9db0b6;
  font-size: 15px;
  line-height: 1.6;
}

.station-form {
  display: grid;
  gap: 8px;
}

.station-field,
.situation-field {
  display: grid;
  grid-template-columns: minmax(122px, 0.86fr) minmax(130px, 1.14fr);
  align-items: center;
  min-height: 52px;
  margin: 0;
  padding: 6px 8px 6px 10px;
  border: 1px solid #1d3339;
  border-radius: 6px;
  background: rgba(10, 24, 29, 0.9);
}

.station-field > span,
.situation-field legend {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #d5e1e3;
  font-size: 12px;
}

.station-field b,
.situation-field b {
  display: inline-grid;
  width: 23px;
  height: 23px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #29444b;
  border-radius: 4px;
  color: #b9cbcf;
  background: #12262c;
  font-size: 11px;
}

.station-field select {
  width: 100%;
  min-height: 38px;
  padding: 0 34px 0 11px;
  border: 1px solid #243d44;
  border-radius: 4px;
  outline: none;
  color: #e8f2f3;
  background: #0c1a1f;
  font-size: 12px;
}

.station-field select:focus-visible {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(85, 231, 226, 0.15);
}

.situation-field {
  grid-template-columns: 1fr;
  padding: 10px;
}

.situation-field legend {
  float: left;
  width: 100%;
  padding: 0;
}

.situation-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  clear: both;
  padding-top: 9px;
}

.situation-options label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.situation-options input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.situation-options span {
  display: grid;
  min-height: 50px;
  padding: 6px;
  place-items: center;
  border: 1px solid #294149;
  border-radius: 4px;
  color: #aebfc3;
  background: #0b191e;
  font-size: 11px;
  text-align: center;
}

.situation-options input:checked + span {
  border-color: var(--cyan);
  color: #eaffff;
  background: #103136;
  box-shadow: inset 0 0 18px rgba(85, 231, 226, 0.08);
}

.situation-options input:focus-visible + span {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 47px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
}

.primary-action {
  justify-content: space-between;
  padding: 0 18px;
  border: 1px solid var(--cyan);
  color: #061416;
  background: var(--cyan);
  box-shadow: 0 12px 30px rgba(22, 167, 164, 0.15);
}

.primary-action:hover,
.primary-action:focus-visible {
  background: #84f3ef;
}

.primary-action span {
  font-size: 20px;
  line-height: 1;
}

.secondary-action {
  border: 1px solid #42646d;
  color: #bed0d4;
  background: #0b181d;
}

.secondary-action:hover,
.secondary-action:focus-visible {
  border-color: var(--cyan);
  color: #fff;
}

.jaw-zone {
  grid-area: jaw;
  min-width: 0;
  align-self: stretch;
}

.scene-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  padding: 0 9px;
  color: #739097;
  font-size: 10px;
  text-transform: uppercase;
}

.scene-kicker span {
  color: var(--cyan);
  letter-spacing: 0.14em;
}

.scene-kicker b {
  color: #587178;
  font-weight: 600;
}

.jaw-stage {
  position: relative;
  min-height: 570px;
  overflow: hidden;
  isolation: isolate;
  touch-action: none;
}

.jaw-stage::before {
  position: absolute;
  z-index: 5;
  top: 6%;
  bottom: 14%;
  left: 50%;
  width: 1px;
  content: "";
  opacity: 0.74;
  background: var(--cyan);
  box-shadow: 0 0 15px var(--cyan), 0 0 44px rgba(85, 231, 226, 0.45);
  pointer-events: none;
  animation: scan-line 5.5s ease-in-out infinite;
}

.jaw-stage::after {
  position: absolute;
  z-index: 4;
  right: 9%;
  bottom: 20%;
  left: 9%;
  height: 1px;
  content: "";
  opacity: 0.45;
  background: #4eb6bc;
  box-shadow: 0 0 16px rgba(85, 231, 226, 0.3);
  pointer-events: none;
}

@keyframes scan-line {
  0%, 100% { transform: translateX(-54px); opacity: 0.25; }
  50% { transform: translateX(54px); opacity: 0.85; }
}

.jaw-poster,
.jaw-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.jaw-poster {
  z-index: 1;
  object-fit: contain;
  opacity: 1;
  transition: opacity 350ms ease;
}

.jaw-stage canvas {
  z-index: 2;
  display: block;
  opacity: 0;
  outline: none;
  cursor: grab;
  transition: opacity 350ms ease;
}

.jaw-stage canvas:active {
  cursor: grabbing;
}

.jaw-stage.is-webgl-ready .jaw-poster {
  opacity: 0;
  pointer-events: none;
}

.jaw-stage.is-webgl-ready canvas {
  opacity: 1;
}

.scan-label,
.measure,
.axis-control,
.scene-actions,
.scene-instruction,
.scene-status {
  position: absolute;
  z-index: 7;
}

.scan-label {
  top: 9%;
  left: 5%;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6c8a91;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scan-label span {
  width: 22px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.measure {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8ca7ad;
  font-family: Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.05em;
}

.measure i {
  display: block;
  width: 56px;
  height: 25px;
  border-top: 1px dashed #4f858d;
  border-left: 1px solid #4f858d;
}

.measure-left {
  top: 25%;
  left: 3%;
  flex-direction: row-reverse;
}

.measure-right {
  top: 18%;
  right: 3%;
}

.measure-right i {
  border-right: 1px solid #4f858d;
  border-left: 0;
}

.axis-control {
  right: 3%;
  bottom: 28%;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #688187;
  font-family: Consolas, monospace;
  font-size: 8px;
}

.axis-control i {
  width: 48px;
  height: 24px;
  border-top: 1px solid #55757c;
  border-radius: 50%;
  transform: translateY(10px);
}

.scene-actions {
  right: 50%;
  bottom: 15px;
  display: flex;
  gap: 6px;
  transform: translateX(50%);
}

.scene-actions button {
  min-height: 35px;
  padding: 0 12px;
  border: 1px solid #305158;
  border-radius: 4px;
  color: #a9bdc1;
  background: rgba(7, 18, 22, 0.9);
  font-size: 10px;
  white-space: nowrap;
  cursor: pointer;
}

.scene-actions button:hover,
.scene-actions button:focus-visible,
.scene-actions button[aria-pressed="true"] {
  border-color: var(--cyan);
  color: #eaffff;
  background: #0d292e;
}

.scene-instruction {
  right: 4%;
  bottom: 66px;
  margin: 0;
  color: #627b81;
  font-size: 9px;
}

.scene-status {
  left: 4%;
  bottom: 66px;
  margin: 0;
  color: var(--cyan);
  font-size: 9px;
}

.scene-disclaimer {
  max-width: 620px;
  margin: 3px auto 0;
  color: #60787e;
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

.scene-disclaimer a {
  color: #779ba2;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.scene-disclaimer a:hover,
.scene-disclaimer a:focus-visible {
  color: var(--cyan);
}

.verification-deck {
  grid-area: verify;
  align-self: center;
  padding: 19px 0 12px 19px;
  border-left: 1px solid #1c3339;
}

.verification-list {
  display: grid;
  gap: 7px;
}

.verification-list a {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  min-height: 62px;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid #1c3036;
  border-radius: 6px;
  background: rgba(10, 23, 28, 0.9);
}

.verification-list a:hover,
.verification-list a:focus-visible {
  border-color: #3e6870;
  background: #0e2026;
}

.verification-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #29444b;
  border-radius: 50%;
  color: #9fb6ba;
  background: #11242a;
  font-size: 9px;
}

.verification-list a > span:nth-child(2) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.verification-list b {
  color: #e7f0f1;
  font-size: 12px;
  font-weight: 680;
}

.verification-list small {
  display: block;
  font-size: 9px;
  line-height: 1.25;
}

.verification-list i {
  color: #789198;
  font-size: 20px;
  font-style: normal;
}

.station-hero .is-verified {
  color: var(--mint);
}

.station-hero .is-pending {
  color: var(--amber);
}

.verification-note {
  margin: 15px 5px 0 1px;
  color: #627a80;
  font-size: 9px;
  line-height: 1.55;
}

.journey-rail {
  grid-area: rail;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.journey-rail li {
  position: relative;
  display: grid;
  gap: 4px;
  justify-items: center;
  padding-top: 19px;
  color: #738b91;
  font-size: 9px;
  text-align: center;
}

.journey-rail li::before {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 50%;
  width: 12px;
  height: 12px;
  content: "";
  border: 2px solid #39535a;
  border-radius: 50%;
  background: var(--base);
  transform: translateX(-50%);
}

.journey-rail li::after {
  position: absolute;
  z-index: 1;
  top: 6px;
  right: 50%;
  width: 100%;
  height: 1px;
  content: "";
  background: #30464c;
}

.journey-rail li:first-child::after {
  display: none;
}

.journey-rail .is-current::before {
  border-color: var(--cyan);
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(85, 231, 226, 0.7);
}

.journey-rail .is-current,
.journey-rail .is-current b {
  color: var(--cyan);
}

.journey-rail b {
  color: #c2d1d4;
  font-size: 10px;
  font-weight: 650;
}

.journey-rail span {
  color: #566e74;
}

.station-bottom {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  width: 100%;
  max-width: 1760px;
  min-height: 86px;
  margin: 20px auto 0;
  border: 1px solid #1c3339;
  border-radius: 6px;
  background: #09161b;
}

.comparison-preview,
.clinic-entry {
  display: grid;
  align-items: center;
  padding: 16px 20px;
}

.comparison-preview {
  grid-template-columns: minmax(210px, 0.65fr) 1fr;
  gap: 22px;
  border-right: 1px solid #1c3339;
}

.comparison-preview > div:first-child,
.clinic-entry > div {
  display: grid;
  gap: 5px;
}

.comparison-preview b,
.clinic-entry b {
  color: #d7e4e6;
  font-size: 11px;
}

.comparison-preview span,
.clinic-entry span {
  color: #667e84;
  font-size: 9px;
  line-height: 1.4;
}

.comparison-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 28px;
}

.comparison-track::before {
  position: absolute;
  right: 7px;
  left: 7px;
  height: 1px;
  content: "";
  background: #39767d;
}

.comparison-track i {
  position: relative;
  z-index: 1;
  width: 13px;
  height: 13px;
  border: 2px solid #45666d;
  border-radius: 50%;
  background: #0a171c;
}

.comparison-track i:first-child,
.comparison-track i:nth-child(2) {
  border-color: var(--cyan);
  background: var(--cyan);
  box-shadow: 0 0 11px rgba(85, 231, 226, 0.55);
}

.clinic-entry {
  grid-template-columns: 1fr auto;
  gap: 18px;
}

.clinic-entry a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #35585f;
  border-radius: 4px;
  color: #d3e3e5;
  font-size: 10px;
  white-space: nowrap;
}

.clinic-entry a:hover,
.clinic-entry a:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan);
}

.station-hero {
  color: var(--ink);
  font-family: Inter, Manrope, "Segoe UI", Arial, sans-serif;
}

.station-copy h1 {
  color: var(--ink);
}

.station-hero .station-form.search-card {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.station-consents {
  display: grid;
  gap: 6px;
  margin-top: 2px;
  padding: 9px 10px;
  border: 1px solid #1d3339;
  border-radius: 5px;
  background: rgba(10, 24, 29, 0.74);
}

.station-consents .checkbox-line {
  grid-template-columns: 15px minmax(0, 1fr);
  gap: 7px;
  color: #718b91;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.35;
}

.station-consents .checkbox-line input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #55e7e2;
}

.station-consents a {
  color: #9cc4ca;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.station-disclaimer {
  margin: 2px 0 0;
  padding: 9px 10px;
  color: #7f979d;
  border: 1px solid #263d43;
  border-radius: 5px;
  background: rgba(7, 18, 22, 0.82);
  font-size: 10px;
  line-height: 1.45;
}

.clinic-entry-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.clinic-entry-actions a:last-child {
  color: #89a4aa;
  border-color: transparent;
}

.station-noscript {
  position: relative;
  z-index: 4;
  max-width: 1760px;
  margin: 12px auto 0;
  padding: 10px 12px;
  color: #061014;
  background: #f1bd5a;
  border-radius: 5px;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 1280px) {
  .station-hero {
    --page-pad: 26px;
  }

  .station-layout {
    grid-template-columns: minmax(280px, 330px) minmax(440px, 1fr) minmax(230px, 260px);
    column-gap: 20px;
  }

  .station-copy h1 {
    font-size: 35px;
  }

  .jaw-stage {
    min-height: 535px;
  }
}

@media (max-width: 1050px) {
  .station-layout {
    grid-template-areas:
      "copy jaw"
      "verify verify"
      "rail rail";
    grid-template-columns: minmax(280px, 340px) minmax(420px, 1fr);
  }

  .verification-deck {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 18px;
    padding: 20px 0 0;
    border-top: 1px solid #1c3339;
    border-left: 0;
  }

  .verification-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .verification-list a {
    grid-template-columns: 28px 1fr;
    min-height: 72px;
  }

  .verification-list a > i {
    display: none;
  }

  .verification-note {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    margin-bottom: 0;
  }
}

@media (max-width: 820px) {
  body.home-diagnostic .nav,
  body.home-diagnostic.js-enabled .nav {
    color: #dcebed;
    border-color: #29444b;
    background: #0b1a1f;
  }

  .station-hero {
    padding-top: 24px;
  }

  .station-layout {
    grid-template-areas:
      "copy"
      "jaw"
      "verify"
      "rail";
    grid-template-columns: minmax(0, 1fr);
  }

  .station-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
    column-gap: 28px;
    align-items: start;
    padding-top: 4px;
  }

  .station-copy .station-eyebrow,
  .station-copy h1,
  .station-copy .station-lead {
    grid-column: 1;
  }

  .station-form {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .jaw-stage {
    min-height: 560px;
  }

  .verification-deck {
    grid-template-columns: 1fr;
  }

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

  .verification-note {
    grid-column: auto;
    grid-row: auto;
  }

  .station-bottom {
    grid-template-columns: 1fr;
  }

  .comparison-preview {
    border-right: 0;
    border-bottom: 1px solid #1c3339;
  }
}

@media (max-width: 620px) {
  .station-hero {
    --page-pad: 16px;
    min-height: auto;
    padding-top: 20px;
  }

  .station-copy {
    display: block;
  }

  .station-copy h1 {
    max-width: 520px;
    font-size: 29px;
    line-height: 1.08;
  }

  .station-lead {
    font-size: 14px;
  }

  .station-field {
    grid-template-columns: minmax(118px, 0.85fr) minmax(0, 1.15fr);
  }

  .jaw-stage {
    min-height: 460px;
    margin-right: -8px;
    margin-left: -8px;
  }

  .scene-kicker,
  .measure,
  .axis-control {
    display: none;
  }

  .scan-label {
    top: 6%;
  }

  .scene-actions {
    right: 10px;
    left: 10px;
    justify-content: center;
    transform: none;
  }

  .scene-actions button {
    min-width: 0;
    padding: 0 8px;
    white-space: normal;
  }

  .scene-instruction {
    display: none;
  }

  .scene-status {
    right: 4%;
    bottom: 61px;
    text-align: center;
  }

  .journey-rail li {
    font-size: 8px;
  }

  .journey-rail span {
    display: none;
  }

  .comparison-preview {
    grid-template-columns: 1fr;
  }

  .clinic-entry {
    grid-template-columns: 1fr;
  }

  .clinic-entry-actions {
    width: 100%;
  }

  .clinic-entry-actions a {
    flex: 1 1 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .station-hero,
  .station-hero *,
  .station-hero *::before,
  .station-hero *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
