/* =========================================
   GEARLY — DIAGNOSIS TOOL
========================================= */


/* HERO */

.diagnosis-hero {
  padding: 70px 0 65px;

  text-align: center;
}

.diagnosis-hero .container {
  max-width: 900px;
}


.back-link {
  display: inline-flex;

  margin-bottom: 30px;

  color: var(--muted);

  text-decoration: none;

  font-size: 13px;

  font-weight: 700;

  transition: color .2s ease;
}

.back-link:hover {
  color: var(--text);
}


.diagnosis-badge {
  display: inline-flex;

  align-items: center;

  gap: 8px;

  padding: 8px 13px;

  border-radius: 999px;

  background: var(--accent-soft);

  color: var(--accent-dark);

  font-size: 12px;

  font-weight: 800;

  margin-bottom: 20px;
}


.diagnosis-hero h1 {
  margin: 0;

  font-size: clamp(48px, 7vw, 78px);

  line-height: .98;

  letter-spacing: -4px;
}

.diagnosis-hero h1 span {
  display: block;

  color: var(--accent);
}


.diagnosis-hero p {
  max-width: 620px;

  margin: 25px auto 0;

  color: var(--muted);

  font-size: 16px;

  line-height: 1.7;
}


/* MAIN SECTION */

.diagnosis-section {
  padding: 20px 0 100px;
}


.diagnosis-layout {
  display: grid;

  grid-template-columns: 260px 1fr;

  gap: 28px;

  align-items: start;
}


/* SIDEBAR */

.diagnosis-sidebar {
  position: sticky;

  top: 100px;
}


.progress-card,
.answers-card {
  padding: 22px;

  border: 1px solid var(--line);

  border-radius: 18px;

  background: var(--card);
}


.answers-card {
  margin-top: 14px;
}


.progress-label {
  display: block;

  margin-bottom: 14px;

  color: var(--text);

  font-size: 13px;

  font-weight: 800;
}


.progress-bar {
  width: 100%;

  height: 7px;

  overflow: hidden;

  border-radius: 999px;

  background: #eceef1;
}


.progress-fill {
  width: 25%;

  height: 100%;

  border-radius: inherit;

  background: var(--accent);

  transition: width .3s ease;
}


.progress-text {
  display: block;

  margin-top: 10px;

  color: var(--muted);

  font-size: 12px;
}


/* ANSWERS */

.answers-card h3 {
  margin: 0 0 16px;

  font-size: 14px;
}


.answer-item {
  padding: 12px 0;

  border-bottom: 1px solid var(--line);
}

.answer-item:last-child {
  border-bottom: 0;
}


.answer-label {
  display: block;

  margin-bottom: 4px;

  color: var(--muted);

  font-size: 11px;
}

.answer-value {
  font-size: 13px;

  font-weight: 750;
}


.empty-answer {
  margin: 0;

  color: var(--muted);

  font-size: 12px;

  line-height: 1.6;
}


.restart-button {
  width: 100%;

  margin-top: 14px;

  padding: 13px;

  border: 1px solid var(--line);

  border-radius: 12px;

  background: transparent;

  color: var(--muted);

  font-size: 13px;

  font-weight: 750;

  cursor: pointer;

  transition:
    background .2s ease,
    color .2s ease;
}

.restart-button:hover {
  background: white;

  color: var(--text);
}


/* APP */

.diagnosis-app {
  min-height: 600px;

  padding: 45px;

  border: 1px solid var(--line);

  border-radius: 24px;

  background: var(--card);
}


.diagnosis-step {
  display: none;

  animation: diagnosisFade .3s ease;
}

.diagnosis-step.active {
  display: block;
}


@keyframes diagnosisFade {

  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }

}


.step-number {
  display: block;

  margin-bottom: 15px;

  color: var(--accent-dark);

  font-size: 12px;

  font-weight: 850;

  text-transform: uppercase;

  letter-spacing: 1px;
}


.diagnosis-step h2 {
  margin: 0;

  font-size: clamp(30px, 4vw, 45px);

  line-height: 1;

  letter-spacing: -2px;
}


.step-description {
  max-width: 580px;

  margin: 15px 0 35px;

  color: var(--muted);

  font-size: 14px;

  line-height: 1.7;
}


/* SYMPTOMS */

.symptom-grid {
  display: grid;

  grid-template-columns: repeat(2, 1fr);

  gap: 12px;
}


.symptom-card {
  min-height: 145px;

  padding: 20px;

  border: 1px solid var(--line);

  border-radius: 16px;

  background: #fafafa;

  text-align: left;

  cursor: pointer;

  transition:
    transform .2s ease,
    border-color .2s ease,
    box-shadow .2s ease,
    background .2s ease;
}


.symptom-card:hover {
  transform: translateY(-3px);

  background: white;

  border-color: var(--accent);

  box-shadow:
    0 12px 25px
    rgba(17, 24, 39, .06);
}


.symptom-icon {
  display: grid;

  width: 40px;

  height: 40px;

  place-items: center;

  margin-bottom: 22px;

  border-radius: 11px;

  background: var(--accent-soft);

  color: var(--accent-dark);

  font-size: 18px;

  font-weight: 800;
}


.symptom-card strong {
  display: block;

  font-size: 15px;
}


.symptom-card small {
  display: block;

  margin-top: 6px;

  color: var(--muted);

  font-size: 12px;

  line-height: 1.5;
}


/* CHOICE LIST */

.choice-list {
  display: flex;

  flex-direction: column;

  gap: 10px;
}


.choice-button {
  width: 100%;

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 18px;

  border: 1px solid var(--line);

  border-radius: 13px;

  background: #fafafa;

  color: var(--text);

  font-size: 14px;

  font-weight: 700;

  cursor: pointer;

  text-align: left;

  transition:
    background .2s ease,
    border-color .2s ease,
    transform .2s ease;
}


.choice-button:hover {
  background: var(--accent-soft);

  border-color: var(--accent);

  transform: translateX(3px);
}


/* FAULT CODE */

.code-options {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 12px;
}


.code-choice {
  min-height: 130px;

  padding: 20px;

  border: 1px solid var(--line);

  border-radius: 16px;

  background: #fafafa;

  text-align: left;

  cursor: pointer;

  transition:
    transform .2s ease,
    border-color .2s ease,
    background .2s ease;
}


.code-choice:hover,
.code-choice.selected {
  border-color: var(--accent);

  background: var(--accent-soft);

  transform: translateY(-3px);
}


.code-choice strong {
  display: block;

  font-size: 14px;
}


.code-choice small {
  display: block;

  margin-top: 8px;

  color: var(--muted);

  font-size: 12px;

  line-height: 1.5;
}


.code-input-area {
  margin-top: 22px;

  padding: 20px;

  border-radius: 16px;

  background: #fafafa;

  border: 1px solid var(--line);
}


.code-input-area label {
  display: block;

  margin-bottom: 8px;

  font-size: 12px;

  font-weight: 800;
}


.code-input-area input {
  width: 100%;

  padding: 14px;

  border: 1px solid var(--line);

  border-radius: 11px;

  outline: none;

  background: white;

  color: var(--text);

  font-size: 16px;

  font-weight: 700;

  text-transform: uppercase;
}


.code-input-area input:focus {
  border-color: var(--accent);

  box-shadow:
    0 0 0 4px
    rgba(255, 107, 53, .1);
}


.continue-button,
.finish-button {
  display: inline-flex;

  align-items: center;

  gap: 10px;

  margin-top: 15px;

  padding: 13px 18px;

  border: 0;

  border-radius: 11px;

  background: var(--accent);

  color: white;

  font-size: 13px;

  font-weight: 800;

  cursor: pointer;

  transition:
    transform .2s ease,
    background .2s ease;
}


.continue-button:hover,
.finish-button:hover {
  transform: translateY(-2px);

  background: var(--accent-dark);
}


/* PREVIOUS */

.previous-button {
  margin-top: 30px;

  padding: 0;

  border: 0;

  background: transparent;

  color: var(--muted);

  font-size: 13px;

  font-weight: 750;

  cursor: pointer;
}

.previous-button:hover {
  color: var(--text);
}


/* RESULTS */

.result-summary {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 10px;

  margin-bottom: 30px;
}


.summary-item {
  padding: 15px;

  border: 1px solid var(--line);

  border-radius: 13px;

  background: #fafafa;
}


.summary-label {
  display: block;

  margin-bottom: 5px;

  color: var(--muted);

  font-size: 10px;

  text-transform: uppercase;

  letter-spacing: .7px;

  font-weight: 800;
}


.summary-value {
  display: block;

  font-size: 13px;

  font-weight: 800;
}


/* RECOMMENDATIONS */

.recommendations {
  display: flex;

  flex-direction: column;

  gap: 10px;
}


.recommendation-item {
  display: flex;

  align-items: flex-start;

  gap: 15px;

  padding: 18px;

  border: 1px solid var(--line);

  border-radius: 14px;

  background: #fafafa;
}


.recommendation-number {
  flex: 0 0 auto;

  display: grid;

  width: 30px;

  height: 30px;

  place-items: center;

  border-radius: 9px;

  background: var(--accent-soft);

  color: var(--accent-dark);

  font-size: 12px;

  font-weight: 850;
}


.recommendation-item strong {
  display: block;

  font-size: 14px;
}


.recommendation-item p {
  margin: 5px 0 0;

  color: var(--muted);

  font-size: 12px;

  line-height: 1.6;
}


/* WARNING */

.diagnosis-warning {
  margin-top: 25px;

  padding: 18px;

  border-left: 3px solid var(--accent);

  border-radius: 12px;

  background: var(--accent-soft);
}


.diagnosis-warning strong {
  font-size: 13px;
}


.diagnosis-warning p {
  margin: 6px 0 0;

  color: #6b4a3d;

  font-size: 12px;

  line-height: 1.6;
}


/* TABLET */

@media (max-width: 950px) {

  .diagnosis-layout {
    grid-template-columns: 1fr;
  }

  .diagnosis-sidebar {
    position: static;

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 14px;
  }

  .answers-card {
    margin-top: 0;
  }

  .restart-button {
    grid-column: 1 / -1;

    margin-top: 0;
  }

}


/* MOBILE */

@media (max-width: 650px) {

  .diagnosis-hero {
    padding: 50px 0;
  }

  .diagnosis-hero h1 {
    letter-spacing: -3px;
  }

  .diagnosis-app {
    min-height: auto;

    padding: 27px 18px;

    border-radius: 18px;
  }

  .diagnosis-sidebar {
    grid-template-columns: 1fr;
  }

  .symptom-grid {
    grid-template-columns: 1fr;
  }

  .code-options {
    grid-template-columns: 1fr;
  }

  .result-summary {
    grid-template-columns: 1fr;
  }

  .choice-button:hover {
    transform: none;
  }

}