/* =========================================================
   LEARNING REWIRED LAB — TROUBLESHOOTING DECISION PATH
   Design Lab detail page
   URL: /resource-lab/troubleshooting-decision-path/
   Depends on:
   - /global.css
   - /assets/css/lab-detail.css
   ========================================================= */

.troubleshooting-decision-page {
  --tdp-ink: #f8fbff;
  --tdp-muted: rgba(226, 232, 240, 0.76);
  --tdp-muted-strong: rgba(226, 232, 240, 0.92);
  --tdp-line: rgba(148, 163, 184, 0.22);
  --tdp-line-strong: rgba(148, 163, 184, 0.34);
  --tdp-panel: rgba(10, 24, 42, 0.78);
  --tdp-panel-soft: rgba(255, 255, 255, 0.06);
  --tdp-panel-strong: rgba(12, 28, 50, 0.94);
  --tdp-cyan: #66e3ff;
  --tdp-lime: #b9ff7a;
  --tdp-blue: #72a7ff;
  --tdp-gold: #ffd36e;
  --tdp-pink: #ff87c8;
  --tdp-red: #ff8a8a;
  --tdp-shadow: 0 22px 62px rgba(0, 0, 0, 0.24);
  --tdp-shadow-soft: 0 16px 44px rgba(0, 0, 0, 0.18);

  position: relative;
  width: 100%;
  overflow: hidden;
  color: var(--tdp-ink);
}

.troubleshooting-decision-page *,
.troubleshooting-decision-page *::before,
.troubleshooting-decision-page *::after {
  box-sizing: border-box;
}

.troubleshooting-decision-page h1,
.troubleshooting-decision-page h2,
.troubleshooting-decision-page h3,
.troubleshooting-decision-page h4,
.troubleshooting-decision-page p {
  margin: 0;
}

.troubleshooting-decision-page a {
  color: inherit;
}

.troubleshooting-decision-page button {
  font: inherit;
}

/* =========================================================
   Shared shell corrections
   ========================================================= */

.troubleshooting-decision-page .resource-detail-inner,
.troubleshooting-decision-page .dld-shell {
  width: min(1120px, calc(100% - 40px));
  max-width: 1120px;
  margin-inline: auto;
}

.troubleshooting-decision-page .resource-detail-hero {
  max-width: 1120px;
  margin: 0 auto clamp(42px, 6vw, 72px);
}

.troubleshooting-decision-page .resource-detail-hero h1 {
  max-width: 1020px;
  padding-right: 0.12em;
  padding-bottom: 0.12em;
  overflow: visible;
}

.troubleshooting-decision-page .resource-detail-gradient {
  display: inline-block;
  padding-right: 0.08em;
  padding-bottom: 0.1em;
}

.troubleshooting-decision-page .resource-detail-btn.secondary {
  border-color: var(--tdp-line);
  background: rgba(255, 255, 255, 0.075);
  color: var(--tdp-ink) !important;
  box-shadow: none;
}

/* =========================================================
   Page article rhythm
   ========================================================= */

.tdp-article {
  display: grid;
  gap: clamp(40px, 5vw, 64px);
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.tdp-section {
  width: 100%;
  margin: 0 auto;
}

.tdp-overview-section,
.tdp-preview-section,
.tdp-two-column-section,
.tdp-process-section,
.tdp-code-section,
.tdp-closing-section {
  max-width: 1120px;
}

.tdp-preview-section,
.tdp-two-column-section,
.tdp-process-section,
.tdp-code-section {
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--tdp-line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 10% 0%, rgba(102, 227, 255, 0.12), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(185, 255, 122, 0.08), transparent 32%),
    rgba(255, 255, 255, 0.045);
  box-shadow: var(--tdp-shadow-soft);
}

.tdp-section-header {
  max-width: 820px;
  margin: 0 0 28px;
}

.tdp-section-header.compact {
  margin-bottom: 0;
}

.tdp-section-kicker,
.tdp-card-label,
.tdp-kicker {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 16px;
  padding: 8px 11px;
  border: 1px solid rgba(102, 227, 255, 0.2);
  border-radius: 999px;
  background: rgba(102, 227, 255, 0.1);
  color: var(--tdp-cyan);
  font-size: 0.7rem;
  font-weight: 920;
  letter-spacing: 0.11em;
  line-height: 1;
  text-transform: uppercase;
}

.tdp-section-header h2,
.tdp-info-card h2,
.tdp-closing-card h2 {
  max-width: 780px;
  margin: 0 0 18px;
  color: var(--tdp-ink);
  font-size: clamp(2.15rem, 4vw, 3.15rem);
  font-weight: 820;
  line-height: 1;
  letter-spacing: -0.058em;
  text-wrap: balance;
}

.tdp-section-header p:not(.tdp-section-kicker),
.tdp-info-card p,
.tdp-closing-card p:not(.tdp-section-kicker) {
  max-width: 720px;
  color: var(--tdp-muted);
  font-size: clamp(1rem, 1.35vw, 1.08rem);
  line-height: 1.72;
}

/* =========================================================
   Overview cards
   ========================================================= */

.tdp-overview-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.9fr 1fr;
  gap: 18px;
}

.tdp-info-card,
.tdp-path-panel,
.tdp-coach-panel,
.tdp-question-card,
.tdp-code-card,
.tdp-process-grid article {
  border: 1px solid var(--tdp-line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 12%, rgba(102, 227, 255, 0.08), transparent 38%),
    rgba(255, 255, 255, 0.055);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
}

.tdp-info-card {
  padding: clamp(24px, 3vw, 34px);
}

.tdp-info-card ul {
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--tdp-muted);
  line-height: 1.72;
}

/* =========================================================
   Live preview
   ========================================================= */

.tdp-demo {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 20px;
  align-items: start;
}

.tdp-path-panel,
.tdp-coach-panel {
  padding: clamp(24px, 3vw, 34px);
}

.tdp-progress {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.tdp-step-dot {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.tdp-step-dot span {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--tdp-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--tdp-muted);
  font-weight: 920;
}

.tdp-step-dot b {
  color: var(--tdp-muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tdp-step-dot.is-active span,
.tdp-step-dot.is-complete span {
  border-color: rgba(102, 227, 255, 0.44);
  background: rgba(102, 227, 255, 0.12);
  color: var(--tdp-cyan);
}

.tdp-step-dot.is-complete span {
  border-color: rgba(185, 255, 122, 0.48);
  background: linear-gradient(135deg, var(--tdp-cyan), var(--tdp-lime));
  color: #071321;
}

.tdp-step-line {
  height: 2px;
  border-radius: 999px;
  background: var(--tdp-line);
}

.tdp-question-card {
  padding: clamp(24px, 3vw, 34px);
}

.tdp-question-card.is-hidden {
  display: none;
}

.tdp-question-card h3,
.tdp-feedback h3,
.tdp-process-grid article h3 {
  margin: 0;
  color: var(--tdp-ink);
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.tdp-question-card h3 {
  font-size: clamp(1.55rem, 2.7vw, 2.4rem);
}

.tdp-question-card p:not(.tdp-kicker),
.tdp-feedback p,
.tdp-process-grid article p {
  color: var(--tdp-muted);
  font-size: 1rem;
  line-height: 1.72;
}

.tdp-question-card h3 + p {
  margin-top: 16px;
}

.tdp-choice-grid {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.tdp-choice-grid button {
  width: 100%;
  padding: 18px;
  border: 1px solid var(--tdp-line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--tdp-muted-strong);
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease,
    color 0.16s ease;
}

.tdp-choice-grid button:hover,
.tdp-choice-grid button.is-active,
.tdp-choice-grid button.active {
  transform: translateY(-2px);
  border-color: rgba(102, 227, 255, 0.48);
  background:
    radial-gradient(circle at top right, rgba(102, 227, 255, 0.12), transparent 42%),
    rgba(255, 255, 255, 0.085);
  color: var(--tdp-ink);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}

.tdp-choice-grid strong,
.tdp-choice-grid span {
  display: block;
}

.tdp-choice-grid strong {
  font-size: 0.98rem;
  line-height: 1.35;
}

.tdp-choice-grid span {
  margin-top: 8px;
  color: var(--tdp-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* =========================================================
   Coach panel
   ========================================================= */

.tdp-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.tdp-panel-header span {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid rgba(102, 227, 255, 0.2);
  border-radius: 999px;
  background: rgba(102, 227, 255, 0.1);
  color: var(--tdp-cyan);
  font-weight: 850;
  font-size: 0.78rem;
}

.tdp-score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.tdp-score-grid div {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid var(--tdp-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
}

.tdp-score-grid span {
  color: var(--tdp-muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.25;
}

.tdp-score-grid b {
  color: var(--tdp-cyan);
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.06em;
}

.tdp-feedback,
.tdp-path-summary {
  padding: 24px;
  border: 1px solid var(--tdp-line);
  border-radius: 24px;
}

.tdp-feedback {
  background:
    radial-gradient(circle at top right, rgba(185, 255, 122, 0.1), transparent 42%),
    rgba(255, 255, 255, 0.055);
}

.tdp-feedback h3 {
  margin-bottom: 12px;
  font-size: 1.55rem;
}

.tdp-feedback p {
  margin-bottom: 0;
}

.tdp-path-summary {
  margin-top: 14px;
  background: rgba(3, 8, 18, 0.72);
}

.tdp-path-summary span {
  display: block;
  margin-bottom: 10px;
  color: var(--tdp-lime);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 920;
}

.tdp-path-summary ol {
  margin: 0;
  padding-left: 20px;
  color: var(--tdp-muted-strong);
  line-height: 1.65;
}

.tdp-reset {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  padding: 0 20px;
  border: 1px solid var(--tdp-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
  color: var(--tdp-ink);
  font-size: 15px;
  font-weight: 850;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.tdp-reset:hover {
  transform: translateY(-2px);
  border-color: rgba(102, 227, 255, 0.38);
  background: rgba(102, 227, 255, 0.1);
}

/* =========================================================
   Two-column / process / code
   ========================================================= */

.tdp-two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: stretch;
}

.tdp-two-column-section.reverse {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tdp-code-card {
  overflow: hidden;
}

.tdp-code-card pre {
  margin: 0;
  max-height: 720px;
  overflow: auto;
  padding: clamp(20px, 3vw, 30px);
  border-radius: 26px;
  background: rgba(3, 8, 18, 0.92);
  color: rgba(226, 232, 240, 0.92);
  font-size: 0.84rem;
  line-height: 1.65;
}

.tdp-code-card.small-code pre {
  min-height: 100%;
}

.tdp-code-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.tdp-process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.tdp-process-grid article {
  padding: 24px;
}

.tdp-process-grid article span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 16px;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(102, 227, 255, 0.1);
  color: var(--tdp-cyan);
  font-size: 0.68rem;
  font-weight: 920;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.tdp-process-grid article h3 {
  margin: 0 0 12px;
  font-size: 1.24rem;
}

/* =========================================================
   Closing
   ========================================================= */

.tdp-closing-card {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 46px);
  border: 1px solid var(--tdp-line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 18% 8%, rgba(102, 227, 255, 0.14), transparent 34%),
    radial-gradient(circle at 88% 20%, rgba(185, 255, 122, 0.09), transparent 36%),
    rgba(255, 255, 255, 0.055);
  box-shadow: var(--tdp-shadow);
  text-align: left;
}

.tdp-closing-card p {
  max-width: 760px;
  margin-bottom: 26px;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1050px) {
  .tdp-overview-grid,
  .tdp-demo,
  .tdp-two-column-section,
  .tdp-two-column-section.reverse,
  .tdp-process-grid {
    grid-template-columns: 1fr;
  }

  .tdp-section-header.compact {
    margin-bottom: 22px;
  }
}

@media (max-width: 760px) {
  .troubleshooting-decision-page .resource-detail-inner,
  .troubleshooting-decision-page .dld-shell {
    width: min(100% - 32px, 1120px);
  }

  .tdp-article {
    gap: 42px;
  }

  .tdp-preview-section,
  .tdp-two-column-section,
  .tdp-process-section,
  .tdp-code-section,
  .tdp-closing-card {
    padding: 20px;
    border-radius: 26px;
  }

  .tdp-section-header h2,
  .tdp-info-card h2,
  .tdp-closing-card h2 {
    font-size: clamp(2.1rem, 10vw, 3.1rem);
    line-height: 1;
  }

  .tdp-path-panel,
  .tdp-coach-panel,
  .tdp-question-card,
  .tdp-info-card {
    padding: 20px;
    border-radius: 22px;
  }

  .tdp-panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .tdp-score-grid {
    grid-template-columns: 1fr;
  }

  .tdp-progress {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .tdp-step-line {
    width: 2px;
    height: 16px;
    margin-left: 19px;
  }

  .tdp-step-dot {
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-items: start;
  }

  .tdp-closing-card .resource-detail-btn {
    width: 100%;
  }

  .tdp-code-card pre {
    font-size: 12px;
  }
}

@media (max-width: 560px) {
  .troubleshooting-decision-page .resource-detail-inner,
  .troubleshooting-decision-page .dld-shell {
    width: min(100% - 28px, 1120px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tdp-reset,
  .tdp-choice-grid button {
    transition: none !important;
  }

  .tdp-reset:hover,
  .tdp-choice-grid button:hover,
  .tdp-choice-grid button.is-active,
  .tdp-choice-grid button.active {
    transform: none !important;
  }
}

/* =========================================================
   v2 LIGHT EDITORIAL MIGRATION
   ---------------------------------------------------------
   Page was authored as a dark glass theme (--tdp-ink near-white,
   surfaces built from translucent white meant for a dark page).
   The shared shell is now light (body #fff), so cards went
   white-on-white and near-white text vanished. Remap the page's
   local text/line/accent/shadow tokens to the light system and
   give every translucent surface a solid light background.
   Intentionally-dark code boxes keep their own light code text.
   ========================================================= */
.troubleshooting-decision-page {
  --tdp-ink: #0f172a;
  --tdp-muted: #475569;
  --tdp-muted-strong: #334155;
  --tdp-line: rgba(15, 23, 42, 0.10);
  --tdp-line-strong: rgba(15, 23, 42, 0.16);
  --tdp-cyan: #0e7490;
  --tdp-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  --tdp-shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.troubleshooting-decision-page .tdp-preview-section,
.troubleshooting-decision-page .tdp-two-column-section,
.troubleshooting-decision-page .tdp-process-section,
.troubleshooting-decision-page .tdp-code-section {
  background: #f8fafc;
}

.troubleshooting-decision-page .tdp-info-card,
.troubleshooting-decision-page .tdp-path-panel,
.troubleshooting-decision-page .tdp-coach-panel,
.troubleshooting-decision-page .tdp-question-card,
.troubleshooting-decision-page .tdp-code-card,
.troubleshooting-decision-page .tdp-process-grid article,
.troubleshooting-decision-page .tdp-step-dot span,
.troubleshooting-decision-page .tdp-choice-grid button,
.troubleshooting-decision-page .tdp-score-grid div,
.troubleshooting-decision-page .tdp-feedback,
.troubleshooting-decision-page .tdp-reset,
.troubleshooting-decision-page .tdp-closing-card,
.troubleshooting-decision-page .resource-detail-btn.secondary {
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.troubleshooting-decision-page .tdp-choice-grid button:hover,
.troubleshooting-decision-page .tdp-choice-grid button.is-active,
.troubleshooting-decision-page .tdp-choice-grid button.active {
  background: #eef6ff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.troubleshooting-decision-page .tdp-path-summary {
  background: #f1f5f9;
}
