.debt-page {
  align-items: stretch;
}

.debt-hero {
  overflow: hidden;
  position: relative;
  border-color: rgba(var(--primary-green-rgb), 0.18);
  background:
    linear-gradient(135deg, rgba(var(--primary-green-rgb), 0.1), rgba(255, 255, 255, 0.96) 52%, rgba(166, 106, 0, 0.09)),
    var(--surface);
}

.debt-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.debt-hero h1 {
  max-width: 880px;
}

.debt-hero-actions,
.debt-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.debt-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(var(--primary-green-rgb), 0.22);
  border-radius: 10px;
  background: var(--surface);
  color: var(--accent-dark);
  padding: 10px 16px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.debt-button.primary,
.debt-wizard button.primary {
  border-color: var(--primary-green);
  background: var(--primary-green);
  color: #fff;
}

.debt-button:hover,
.debt-button:focus-visible,
.debt-wizard button:hover,
.debt-wizard button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(var(--primary-green-rgb), 0.42);
}

.debt-layout {
  width: min(100%, 1080px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  padding: clamp(18px, 4vw, 48px);
  box-shadow: var(--shadow);
}

.debt-prose {
  max-width: 780px;
}

.debt-prose p,
.debt-prose li,
.debt-table td,
.debt-table th {
  color: var(--text);
  font-size: clamp(1rem, 1.08vw, 1.1rem);
  line-height: 1.78;
}

.debt-prose h2,
.debt-section-title {
  max-width: 780px;
  margin: clamp(28px, 5vw, 52px) 0 10px;
  color: var(--heading);
  font-size: clamp(1.55rem, 2.8vw, 2.35rem);
  line-height: 1.18;
}

.debt-prose h2::before,
.debt-section-title::before {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary-green), var(--accent-gold));
  margin-bottom: 14px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid rgba(var(--primary-green-rgb), 0.18);
  border-radius: 999px;
  background: rgba(var(--primary-green-rgb), 0.07);
  color: var(--accent-dark);
  padding: 5px 10px;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.debt-story-card,
.debt-note,
.debt-framework,
.debt-faq details,
.hidden-score-card,
.quick-xray,
.xray-visual-card,
.portfolio-side,
.simulator-card,
.summary-share-card,
.dashboard-insight,
.reasoning-box,
.forgotten-card,
.timeline-card,
.profile-card,
.question-checklist,
.decision-tree {
  border: 1px solid rgba(var(--primary-green-rgb), 0.16);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(var(--primary-green-rgb), 0.055), rgba(255, 255, 255, 0.94)),
    var(--surface);
  box-shadow: var(--small-shadow);
}

.quick-xray {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: clamp(16px, 3vw, 28px);
  align-items: stretch;
  margin: 24px 0 8px;
  padding: clamp(18px, 3vw, 28px);
  background:
    linear-gradient(135deg, rgba(var(--primary-green-rgb), 0.08), rgba(255, 255, 255, 0.95) 58%, rgba(166, 106, 0, 0.08)),
    var(--surface);
}

.quick-xray h2,
.summary-share-card h2 {
  margin: 12px 0 16px;
  color: var(--heading);
  font-size: clamp(1.35rem, 2.3vw, 1.9rem);
  line-height: 1.16;
}

.quick-xray-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quick-xray-output {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  padding: 16px;
}

.xray-stat {
  border-radius: 10px;
  background: var(--surface);
  padding: 13px;
}

.xray-stat.wide,
.quick-xray-output p {
  grid-column: 1 / -1;
}

.xray-stat span,
.dashboard-insight span,
.summary-stat-row span,
.simulator-stats span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.xray-stat strong,
.dashboard-insight strong,
.summary-stat-row strong,
.simulator-stats strong {
  display: block;
  margin-top: 5px;
  color: var(--heading);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.quick-xray-output p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

.invisible-portfolio,
.xray-visual-card,
.people-flow-section,
.retirement-dashboard,
.epf-simulator,
.summary-share-card,
.question-checklist {
  display: grid;
  gap: 18px;
  margin: clamp(28px, 5vw, 56px) 0;
}

.visible-invisible-grid,
.dashboard-insight-grid,
.summary-stat-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.portfolio-side {
  padding: 20px;
}

.portfolio-side.emphasis {
  background:
    linear-gradient(145deg, rgba(var(--primary-green-rgb), 0.09), rgba(166, 106, 0, 0.08)),
    var(--surface);
}

.portfolio-side span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.portfolio-side ul {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.portfolio-side li {
  border-bottom: 1px solid var(--line);
  color: var(--heading);
  padding-bottom: 9px;
  font-weight: 850;
}

.xray-visual-card {
  padding: clamp(18px, 3vw, 28px);
}

.layered-xray {
  display: grid;
  gap: 16px;
}

.xray-callout {
  width: fit-content;
  border: 1px solid rgba(184, 130, 22, 0.34);
  border-radius: 999px;
  background: rgba(184, 130, 22, 0.12);
  color: var(--heading);
  padding: 8px 12px;
  font-weight: 850;
}

.xray-bar {
  display: flex;
  min-height: 108px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(var(--primary-green-rgb), 0.08);
  box-shadow: var(--small-shadow);
}

.xray-layer {
  width: var(--w);
  min-width: 82px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
  color: #fff;
}

.xray-layer span,
.xray-layer strong {
  display: block;
}

.xray-layer span {
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.xray-layer strong {
  margin-top: 5px;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
}

.xray-layer.equity {
  background: var(--primary-green);
}

.xray-layer.hidden-debt {
  position: relative;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.11) 0 9px, rgba(255, 255, 255, 0) 9px 18px),
    #9a6500;
}

.xray-layer.hidden-debt::after {
  content: "Missed View";
  width: fit-content;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  padding: 4px 7px;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.xray-layer.visible {
  background: #b88216;
}

.xray-layer.other {
  background: #64748b;
}

.xray-insight-line {
  margin: 0;
  border-left: 4px solid var(--accent-gold);
  border-radius: 10px;
  background: rgba(184, 130, 22, 0.08);
  color: var(--text);
  padding: 12px 14px;
  font-weight: 750;
  line-height: 1.55;
}

.xray-layer-notes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.xray-layer-notes div {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  padding: 12px;
}

.xray-layer-notes span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.xray-layer-notes strong {
  display: block;
  margin-top: 5px;
  color: var(--heading);
  font-size: 0.95rem;
  line-height: 1.35;
}

.hidden-score-card {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 1.2fr);
  gap: clamp(18px, 4vw, 34px);
  align-items: center;
  margin: 24px 0 8px;
  padding: clamp(18px, 3vw, 30px);
  background:
    linear-gradient(135deg, rgba(var(--primary-green-rgb), 0.09), rgba(255, 255, 255, 0.96) 48%, rgba(166, 106, 0, 0.1)),
    var(--surface);
}

.hidden-score-copy h2 {
  margin: 12px 0 10px;
  color: var(--heading);
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
  line-height: 1.18;
}

.hidden-score-copy p {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.7;
}

.score-comparison {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.score-side {
  display: grid;
  align-content: center;
  gap: 7px;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  padding: 18px;
}

.score-side.highlight {
  border-color: rgba(var(--primary-green-rgb), 0.28);
  background: rgba(var(--primary-green-rgb), 0.08);
}

.score-side span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.score-side strong {
  color: var(--heading);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1;
}

.score-side em {
  color: var(--accent-dark);
  font-style: normal;
  font-weight: 850;
}

.score-arrow {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  letter-spacing: 0;
}

.debt-story-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.78fr);
  gap: clamp(18px, 4vw, 34px);
  margin: 22px 0 10px;
  padding: clamp(18px, 3vw, 28px);
}

.allocation-mini {
  display: grid;
  gap: 12px;
}

.allocation-row {
  display: grid;
  gap: 6px;
}

.allocation-row span {
  display: flex;
  justify-content: space-between;
  color: var(--heading);
  font-weight: 800;
}

.allocation-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(var(--primary-green-rgb), 0.11);
}

.allocation-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary-green), var(--accent-gold));
}

.reasoning-box {
  max-width: 860px;
  padding: clamp(18px, 3vw, 26px);
}

.reasoning-box h2 {
  margin-top: 12px;
}

.check-list {
  display: grid;
  gap: 10px;
  padding-left: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
  padding: 11px 12px 11px 38px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 17px;
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--primary-green);
}

.debt-note {
  max-width: 820px;
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 5px solid var(--accent-gold);
}

.debt-wizard {
  display: grid;
  gap: 20px;
  margin: clamp(28px, 5vw, 58px) 0;
  scroll-margin-top: 110px;
}

.wizard-shell {
  display: grid;
  grid-template-columns: minmax(270px, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: start;
}

.wizard-left-stack {
  display: grid;
  gap: 20px;
}

.wizard-panel,
.wizard-results,
.scenario-card,
.debt-stat,
.chart-card,
.comparison-card {
  border: 1px solid rgba(var(--primary-green-rgb), 0.16);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--small-shadow);
}

.wizard-panel,
.wizard-results {
  padding: clamp(16px, 2.8vw, 26px);
}

.wizard-panel {
  align-self: start;
}

.wizard-results {
  align-self: start;
}

.wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.wizard-step-tab,
.debt-wizard button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-tint);
  color: var(--text);
  padding: 8px 11px;
  font-weight: 750;
  cursor: pointer;
}

.wizard-step-tab[aria-selected="true"] {
  border-color: var(--primary-green);
  background: var(--soft-green);
  color: var(--accent-dark);
}

.wizard-step {
  display: none;
  gap: 14px;
}

.wizard-step.active {
  display: grid;
}

.wizard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.wizard-field {
  display: grid;
  gap: 7px;
}

.wizard-field label {
  color: var(--heading);
  font-size: 0.88rem;
  font-weight: 800;
}

.wizard-input {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-tint);
  padding: 0 12px;
}

.wizard-input span {
  color: var(--muted);
  font-weight: 800;
}

.wizard-input input,
.wizard-input select {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--heading);
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.result-stat-grid,
.debt-stat-grid,
.scenario-grid,
.comparison-grid,
.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.debt-stat,
.result-stat {
  padding: 16px;
}

.result-stat.wide {
  grid-column: 1 / -1;
}

.debt-stat span,
.result-stat span,
.scenario-card span,
.comparison-card span,
.timeline-card span,
.profile-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.debt-stat strong,
.result-stat strong {
  display: block;
  margin-top: 6px;
  color: var(--heading);
  font-size: clamp(1.18rem, 2vw, 1.55rem);
}

.interpretation {
  margin-top: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(var(--primary-green-rgb), 0.1), rgba(166, 106, 0, 0.08));
  padding: 16px;
}

.interpretation strong {
  display: block;
  color: var(--heading);
  font-size: 1.18rem;
  margin-bottom: 4px;
}

.chart-grid {
  margin-top: 0;
  grid-template-columns: 1fr;
}

.chart-card {
  padding: 18px;
}

.donut-wrap {
  display: grid;
  place-items: center;
  min-height: 220px;
}

.donut-svg {
  width: min(100%, 230px);
  height: auto;
}

.donut-svg circle {
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dasharray 0.28s ease, stroke-dashoffset 0.28s ease;
}

.donut-center {
  fill: var(--heading);
  font-weight: 850;
  font-size: 3px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.bar-chart {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.bar-pair {
  display: grid;
  gap: 8px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  color: var(--heading);
  font-weight: 800;
}

.stacked-bar {
  display: flex;
  height: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(var(--primary-green-rgb), 0.1);
}

.bar-equity {
  background: var(--primary-green);
}

.bar-debt {
  background: var(--accent-gold);
}

.bar-other {
  background: #64748b;
}

.scenario-card,
.comparison-card {
  padding: 18px;
}

.scenario-card {
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.scenario-card:hover,
.scenario-card:focus-visible {
  border-color: var(--primary-green);
  transform: translateY(-2px);
}

.scenario-card strong,
.comparison-card strong {
  display: block;
  margin: 6px 0;
  color: var(--heading);
  font-size: 1.05rem;
}

.scenario-card p,
.comparison-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.forgotten-section,
.timeline-section,
.rahul-amit-section,
.decision-section {
  display: grid;
  gap: 18px;
  margin: clamp(28px, 5vw, 56px) 0;
}

.people-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.people-flow div {
  position: relative;
  min-height: 118px;
  display: grid;
  align-content: center;
  border: 1px solid rgba(var(--primary-green-rgb), 0.16);
  border-radius: 12px;
  background: var(--surface);
  color: var(--heading);
  padding: 16px;
  box-shadow: var(--small-shadow);
  font-weight: 850;
  line-height: 1.35;
}

.people-flow div:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -12px;
  top: 50%;
  width: 12px;
  height: 2px;
  background: rgba(var(--primary-green-rgb), 0.32);
}

.dashboard-insight {
  padding: 18px;
}

.dashboard-insight p,
.simulator-card p,
.summary-share-card p,
.copy-status {
  color: var(--muted);
  line-height: 1.62;
}

.simulator-card {
  max-width: 760px;
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 26px);
}

.simulator-card label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--heading);
  font-weight: 850;
}

.simulator-card input[type="range"] {
  width: 100%;
  accent-color: var(--primary-green);
}

.simulator-bars {
  display: flex;
  height: 20px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(var(--primary-green-rgb), 0.1);
}

.sim-bar {
  min-width: 2%;
  transition: width 0.2s ease;
}

.sim-bar.equity {
  background: var(--primary-green);
}

.sim-bar.debt {
  background: var(--accent-gold);
}

.simulator-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.simulator-stats div,
.summary-stat-row div {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
  padding: 13px;
}

.summary-share-card {
  max-width: 860px;
  padding: clamp(18px, 3vw, 28px);
  background:
    linear-gradient(135deg, rgba(var(--primary-green-rgb), 0.095), rgba(255, 255, 255, 0.95) 56%, rgba(166, 106, 0, 0.08)),
    var(--surface);
}

.summary-share-card .debt-button {
  width: fit-content;
}

.copy-status {
  min-height: 1.5em;
  margin: 0;
}

.question-checklist {
  max-width: 860px;
}

.forgotten-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.forgotten-card {
  min-height: 154px;
  padding: 16px;
}

.forgotten-card strong,
.timeline-card strong,
.profile-card strong {
  display: block;
  color: var(--heading);
  font-size: 1.05rem;
  line-height: 1.3;
}

.forgotten-card strong::before {
  content: "";
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary-green), var(--accent-gold));
  margin-bottom: 12px;
}

.forgotten-card p,
.timeline-card p,
.profile-card p,
.decision-tree p {
  color: var(--muted);
  line-height: 1.62;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  position: relative;
}

.timeline-grid::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 31px;
  height: 2px;
  background: linear-gradient(90deg, rgba(var(--primary-green-rgb), 0.2), rgba(166, 106, 0, 0.32));
}

.timeline-card {
  position: relative;
  padding: 48px 18px 18px;
}

.timeline-card::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 18px;
  width: 20px;
  height: 20px;
  border: 5px solid var(--surface);
  border-radius: 999px;
  background: var(--primary-green);
  box-shadow: 0 0 0 1px rgba(var(--primary-green-rgb), 0.28);
}

.profile-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.profile-card {
  padding: 20px;
}

.profile-card.emphasis {
  background:
    linear-gradient(145deg, rgba(var(--primary-green-rgb), 0.075), rgba(166, 106, 0, 0.08)),
    var(--surface);
}

.profile-card dl {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.profile-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
}

.profile-card dt {
  color: var(--muted);
  font-weight: 800;
}

.profile-card dd {
  margin: 0;
  color: var(--heading);
  font-weight: 850;
}

.decision-tree {
  max-width: 920px;
  display: grid;
  gap: 12px;
  padding: clamp(18px, 3vw, 26px);
}

.memory-quote {
  margin: clamp(26px, 5vw, 48px) 0 10px;
  border-left: 6px solid var(--accent-gold);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(var(--primary-green-rgb), 0.08), rgba(166, 106, 0, 0.09)),
    var(--surface);
  color: var(--heading);
  padding: clamp(18px, 3vw, 28px);
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  font-weight: 850;
  line-height: 1.32;
}

.decision-node {
  border-radius: 12px;
  background: var(--primary-green);
  color: #fff;
  padding: 14px 16px;
  font-weight: 850;
}

.decision-node.final {
  background: var(--accent-dark);
}

.decision-path {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.decision-path div {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  padding: 12px;
  line-height: 1.55;
}

.debt-table-wrap {
  max-width: 960px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 18px;
}

.debt-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  background: var(--surface);
}

.debt-table th,
.debt-table td {
  border-bottom: 1px solid var(--line);
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
}

.debt-table th {
  color: var(--heading);
  background: rgba(var(--primary-green-rgb), 0.07);
  font-size: 0.88rem;
  font-weight: 850;
}

.debt-framework {
  max-width: 820px;
  padding: 20px;
}

.debt-framework ol {
  margin: 0;
  padding-left: 22px;
}

.debt-faq {
  display: grid;
  gap: 10px;
  max-width: 860px;
}

.debt-faq details {
  padding: 16px 18px;
}

.debt-faq summary {
  color: var(--heading);
  cursor: pointer;
  font-weight: 850;
}

.debt-faq p {
  margin-bottom: 0;
}

.related-guide-panel {
  max-width: 860px;
  margin-top: 24px;
}

@media (max-width: 900px) {
  .debt-story-card,
  .hidden-score-card,
  .quick-xray,
  .wizard-shell,
  .chart-grid,
  .quick-xray-grid,
  .xray-layer-notes,
  .forgotten-grid,
  .timeline-grid,
  .profile-compare-grid,
  .people-flow,
  .dashboard-insight-grid {
    grid-template-columns: 1fr;
  }

  .people-flow div {
    min-height: auto;
  }

  .people-flow div:not(:last-child)::after {
    left: 24px;
    right: auto;
    top: auto;
    bottom: -12px;
    width: 2px;
    height: 12px;
  }

  .xray-bar {
    display: grid;
    min-height: 0;
  }

  .xray-layer {
    width: 100%;
    min-width: 0;
    min-height: 72px;
  }

  .timeline-grid::before {
    left: 28px;
    right: auto;
    top: 20px;
    bottom: 20px;
    width: 2px;
    height: auto;
  }
}

@media (max-width: 640px) {
  .debt-hero-actions,
  .debt-inline-actions,
  .wizard-actions {
    flex-direction: column;
  }

  .debt-button,
  .debt-wizard button {
    width: 100%;
  }

  .wizard-grid,
  .result-stat-grid,
  .debt-stat-grid,
  .scenario-grid,
  .comparison-grid,
  .visible-invisible-grid,
  .summary-stat-row,
  .simulator-stats,
  .score-comparison,
  .decision-path {
    grid-template-columns: 1fr;
  }

  .score-arrow {
    min-height: 32px;
    writing-mode: horizontal-tb;
  }

  .debt-layout {
    padding: 18px;
  }
}
