/* =========================================
   GUIDED QUESTIONS + STEP NAVIGATOR
   Complete stylesheet — replaces prior versions
   ========================================= */

.guided-experience {
  margin: 12px 0;
  color: #14251f;
  font-family: inherit;
  scroll-margin-top: 16px;
}

.guided-experience,
.guided-experience * {
  box-sizing: border-box;
}

/* Shared panel surface */

.guided-experience .guided-panel,
.guided-experience .guided-active {
  width: 100%;
  border: 1px solid var(--line, #d3ded7);
  border-radius: 12px;
  background: #fffdf7;
}

/* Collapsible heading */

.guided-experience .guided-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  list-style: none;
  cursor: pointer;
  background:var(--accent);
  color:mintcream;
}

.guided-experience .guided-summary::-webkit-details-marker {
  display: none;
}

.guided-experience .guided-summary::marker {
  content: "";
}

.guided-experience .guided-summary-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
}

.guided-experience .guided-summary-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 0.82rem;
}

.guided-experience .guided-label-open {
  display: none;
}

.guided-experience .guided-label-closed {
  display: inline;
}

.guided-experience .guided-panel[open] .guided-label-open {
  display: inline;
}

.guided-experience .guided-panel[open] .guided-label-closed {
  display: none;
}

.guided-experience .guided-panel[open] .guided-chevron {
  transform: rotate(180deg);
}

/* Question chooser */

.guided-experience .guided-panel-content {
  padding: 0 16px 16px;
}

.guided-experience .guided-help {
  margin: 0 0 12px;
  color: #52645a;
  font-size: 0.83rem;
  line-height: 1.45;
  width:75%;
}

.guided-experience .guided-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

/* Explicit button styles override general site button rules. */

.guided-experience button.guided-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;

  width: 100%;
  min-width: 0;
  max-width: none;
  height: auto;
  margin: 0;
  padding: 13px 14px;

  appearance: none;
  border: 1px solid #c5d4ca;
  border-radius: 9px;
  box-shadow: none;
  background: #fff;
  color: #14251f;

  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}

.guided-experience button.guided-card:hover {
  border-color: #729780;
  background: #f1f6f2;
}

.guided-experience .guided-card-kind {
  color: #63736a;
  font-size: 0.73rem;
  font-weight: 400;
}

/* Active question heading */

.guided-experience .guided-active {
  padding: 12px 16px;
}

.guided-experience .guided-active-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.guided-experience .guided-active-title {
  min-width: 0;
  margin: 0;
  padding: 0;
  color: #14251f;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.4;
}

/* Small navigation buttons */

.guided-experience button.guided-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;

  width: auto;
  min-width: 0;
  max-width: 100%;
  height: auto;
  margin: 0;
  padding: 8px 10px;

  appearance: none;
  border: 1px solid #c5d4ca;
  border-radius: 7px;
  box-shadow: none;
  background: #fff;
  color: #075541;

  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  cursor: pointer;
}

.guided-experience button.guided-action:hover:not(:disabled) {
  border-color: #729780;
  background: #f1f6f2;
}

.guided-experience button.guided-action:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Previous / current stop / next */

.guided-experience .guided-step-nav {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid #e0e7e1;
}

.guided-experience .guided-step-position {
  min-width: 0;
  text-align: center;
}

.guided-experience .guided-step-count {
  display: block;
  margin: 0 0 3px;
  color: #63736a;
  font-size: 0.73rem;
  line-height: 1.3;
}

.guided-experience .guided-step-position h3 {
  margin: 0;
  padding: 0;
  color: #294c38;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
}

/* Optional interpretation */

.guided-experience .guided-notice {
  margin-top: 9px;
  border: 0;
  background: transparent;
  color: #52645a;
  font-size: 0.82rem;
  line-height: 1.45;
}

.guided-experience .guided-notice > summary {
  width: fit-content;
  padding: 0;
  cursor: pointer;
  margin:0 auto;
  text-decoration:underline;
}

.guided-experience .guided-notice p {
  max-width: 100%;
  margin: 8px 0 0;
  text-align:center;
  font-style:italic;
}

/* Conditional messages */

.guided-experience .guided-exploration,
.guided-experience .guided-filter-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 7px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.guided-experience .guided-exploration {
  background: #edf4ef;
  color: #294c38;
}

.guided-experience .guided-filter-warning {
  background: #fff2d8;
  color: #654c16;
}

.guided-experience [hidden] {
  display: none !important;
}

/* Final reflection */

.guided-experience .guided-finish {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e0e7e1;
}

.guided-experience .guided-finish h3 {
  margin: 0 0 8px;
  font-family: inherit;
  font-size: 1rem;
}

.guided-experience .guided-finish p {
  max-width: 80%;
  margin: 0 0 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Keyboard focus */

.guided-experience button:focus-visible,
.guided-experience summary:focus-visible {
  outline: 3px solid #006bb6;
  outline-offset: 3px;
}

/* Medium screens */

@media (max-width: 900px) {
  .guided-experience .guided-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Small screens */

@media (max-width: 580px) {
  .guided-experience .guided-summary {
    gap: 10px;
    padding: 12px;
  }

  .guided-experience .guided-summary-title {
    font-size: 0.9rem;
  }

  .guided-experience .guided-summary-action {
    font-size: 0.75rem;
  }

  .guided-experience .guided-panel-content {
    padding: 0 12px 12px;
  }

  .guided-experience .guided-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .guided-experience .guided-active {
    padding: 12px;
  }

  .guided-experience .guided-active-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
  }

  .guided-experience .guided-active-title {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .guided-experience .guided-active-row > button:first-child {
    justify-self: start;
  }

  .guided-experience .guided-active-row > button:last-child {
    justify-self: end;
  }

  .guided-experience .guided-step-nav {
    gap: 8px;
  }

  .guided-experience .guided-step-position h3 {
    font-size: 0.8rem;
  }

  .guided-experience button.guided-action {
    padding: 8px;
    font-size: 0.75rem;
  }

  .guided-experience .guided-exploration,
  .guided-experience .guided-filter-warning {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* =========================================
   TOUR RELATIONSHIP EMPHASIS
   Does not alter the question panel layout.
   ========================================= */

/* Preserve existing solid/dashed/dotted patterns.
   Change only color, thickness, and opacity. */

#network line.link.tour-focus-link {
  stroke: #155a4a;
  stroke-width: 4px;
  stroke-opacity: 1;
  opacity: 1;
}

/* Outline the relevant card without replacing its
   node-type color or search highlighting. */

#details .connection-card.tour-focus-card {
  /*outline: 2px solid #357564;
  outline-offset: 2px;*/
}

/* Short interpretive note beneath the original relationship. */

#details .tour-focus-note {
  display: block;
  margin: 10px 0 0;
  padding: 9px 10px;
  border-left: 3px solid #357564;
  border-radius: 0 6px 6px 0;
  background: #edf4ef;
  color: #294c38;
  font-size: 0.82rem;
  line-height: 1.45;
}

#details .tour-focus-note-label {
  display: block;
  margin-bottom: 4px;
  color: #155a4a;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#details .tour-focus-note-text {
  display: block;
}