/* The final person market sits directly on the page. The milestone preview keeps
   its own bounded shell; this stage has no enclosing panel or nested scroll. */
.td .td-graph-stage {
  --td-p: 0px;
  --td-c: 40px;
  --td-plot-min: 0px;
  --td-plot-max: 390px;
  display: block;
  min-width: 0;
  max-height: none;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.td .td-graph-stage .td-chart {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto auto;
  grid-template-areas: "head head" "fig ranges" "legend legend" "plot plot";
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.td .td-graph-stage .td-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: none;
  align-items: start;
  column-gap: 32px;
  row-gap: 16px;
  height: auto;
  min-height: 0;
  margin-bottom: 28px;
}

.td .td-graph-stage .td-final-heading {
  min-width: 0;
}

.td .td-graph-stage .td-final-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
}

.td .td-graph-stage .td-av {
  flex: 0 0 auto;
  width: 25px;
  height: 31px;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.td .td-graph-stage .td-av span {
  inset: 0 auto auto 0;
  color: var(--td-text);
  font: 400 22px/31px var(--td-font-index);
  letter-spacing: -0.04em;
}

.td .td-graph-stage .td-final-overline {
  color: #8fa9c2;
  font: 400 10px/16px var(--td-font-num);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.td .td-graph-stage .td-title {
  color: var(--td-text);
  font: 400 clamp(42px, 4.8vw, 68px)/1.04 var(--td-font-index);
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.td .td-graph-stage .td-overview-subtitle {
  max-width: 62ch;
  margin-top: 14px;
  color: var(--td-text-muted);
  font: 400 16px/24px var(--td-font-ui);
}

.td .td-graph-stage .td-head-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "picker picker" "volume tag";
  align-items: center;
  gap: 18px 16px;
  min-width: 210px;
  padding-top: 0;
}
.td .td-final-picker-slot {
  grid-area: picker;
  display: grid;
  gap: 5px;
  min-width: 0;
}
.td .td-final-picker-slot label {
  color: var(--td-text-faint);
  font: 400 8px/14px var(--td-font-num);
  letter-spacing: 0.17em;
}
.td .td-final-picker-slot select {
  width: 100%;
  padding: 6px 24px 8px 0;
  border: 0;
  border-bottom: 1px solid var(--td-hairline);
  border-radius: 0;
  background: var(--td-ground);
  color: var(--td-text);
  font: 400 14px/20px var(--td-font-ui);
  cursor: pointer;
}
.td .td-final-picker-slot > span {
  color: var(--td-text-faint);
  font: 400 10px/16px var(--td-font-ui);
}

.td .td-graph-stage .td-hvol {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  grid-area: volume;
  gap: 4px;
  margin: 0;
}

.td .td-graph-stage .td-hvol .td-lab {
  color: var(--td-text-faint);
  font-size: 11px;
  line-height: 16px;
}

.td .td-graph-stage .td-hvol-v {
  color: var(--td-text);
  font: 400 16px/22px var(--td-font-num);
}

.td .td-graph-stage .td-tag {
  grid-area: tag;
  height: 34px;
  padding: 0 0 0 20px;
  border: 0;
  border-left: 1px solid var(--td-hairline);
  border-radius: 0;
  color: var(--td-text-faint);
  font: 400 10px/16px var(--td-font-num);
  letter-spacing: 0.04em;
}

.td .td-graph-stage .td-fig {
  height: auto;
  min-height: 60px;
  column-gap: 10px;
  row-gap: 6px;
}

.td .td-graph-stage .td-fig-v {
  font: 400 52px/60px var(--td-font-ui);
  letter-spacing: -0.045em;
}

.td .td-graph-stage .td-fig-l {
  color: var(--td-text-faint);
  font-size: 12px;
  line-height: 20px;
}

.td .td-graph-stage .td-selected-label {
  display: inline-block;
  margin-left: 12px;
  padding-left: 12px;
  color: var(--td-text-muted);
  font-size: 13px;
}

.td .td-graph-stage .td-fig .td-chg {
  align-self: center;
  margin-left: 8px;
  font-size: 12px;
  line-height: 20px;
}

.td .td-graph-stage .td-ranges {
  align-self: center;
  justify-self: end;
  gap: 4px;
  margin: 0;
}

.td .td-graph-stage .td-rng {
  min-width: 40px;
  height: 36px;
  padding-inline: 10px;
  font-size: 11px;
}

.td .td-graph-stage .td-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  margin: 12px 0 0;
}

.td .td-graph-stage .td-leg {
  height: 36px;
  min-height: 36px;
  gap: 8px;
  padding: 0;
  border-radius: 0;
  font-size: 12px;
  line-height: 20px;
}

.td .td-graph-stage .td-leg:hover,
.td .td-graph-stage .td-leg[aria-pressed="true"] {
  background: transparent;
}

.td .td-graph-stage .td-leg[aria-pressed="true"] .td-leg-n {
  color: var(--td-text);
}

.td .td-graph-stage .td-leg-full {
  display: inline;
}

.td .td-graph-stage .td-leg-short {
  display: none;
}

.td .td-graph-stage .td-leg-v {
  margin-left: 0;
  font-size: 11px;
}

.td .td-graph-stage .td-plotwrap {
  height: clamp(300px, 29vw, 390px);
  min-height: 0;
  margin-top: 30px;
}

.td .td-graph-stage .td-dot,
.td .td-graph-stage .td-xdot {
  box-shadow: 0 0 0 2px var(--td-ground);
}

.td .td-graph-stage .td-activity-mount {
  min-width: 0;
  margin-top: 36px;
}

.td .td-graph-stage .td-rules {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  padding: 24px 0 0;
  margin-top: 32px;
  background: transparent;
  border-top: 1px solid var(--td-hairline);
}

.td .td-graph-stage .td-rules-h {
  display: block;
  color: var(--td-text-faint);
  font: 400 10px/16px var(--td-font-num);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.td .td-graph-stage .td-rules-sel {
  margin-top: 10px;
  font-size: 13px;
  line-height: 20px;
}

.td .td-graph-stage .td-rule {
  max-width: 80ch;
  margin-top: 8px;
  font-size: 12px;
  line-height: 20px;
}

.td .td-graph-stage .td-honest {
  margin-top: 8px;
  font-size: 10px;
  line-height: 16px;
}

.td .td-graph-stage .td-facts {
  grid-template-columns: repeat(3, max-content);
  justify-content: space-between;
  gap: 28px;
}

.td .td-graph-stage .td-facts dt {
  font-size: 10px;
  line-height: 16px;
}

.td .td-graph-stage .td-facts dd {
  margin-top: 5px;
  font-size: 12px;
  line-height: 20px;
}

@container td (max-width: 879px) {
  .td .td-graph-stage .td-head {
    column-gap: 20px;
  }

  .td .td-graph-stage .td-title {
    font-size: 48px;
  }

  .td .td-graph-stage .td-head-meta {
    min-width: 175px;
    gap: 14px 12px;
  }

  .td .td-graph-stage .td-tag {
    height: auto;
    padding: 0;
    border: 0;
    font-size: 9px;
  }

  .td .td-graph-stage .td-overview-subtitle {
    font-size: 14px;
    line-height: 22px;
  }

  .td .td-graph-stage .td-legend {
    column-gap: 16px;
  }

  .td .td-graph-stage .td-leg {
    font-size: 11px;
  }

  .td .td-graph-stage .td-plotwrap {
    height: 300px;
  }

  .td .td-graph-stage .td-rules {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .td .td-graph-stage .td-facts {
    justify-content: start;
    column-gap: 40px;
  }
}

@container td (max-width: 539px) {
  .td .td-graph-stage .td-chart {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto auto;
    grid-template-areas: "head" "fig" "ranges" "legend" "plot";
  }

  .td .td-graph-stage .td-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 20px;
  }

  .td .td-graph-stage .td-final-identity {
    margin-bottom: 9px;
  }

  .td .td-graph-stage .td-title {
    font-size: clamp(36px, 10.5vw, 48px);
  }

  .td .td-graph-stage .td-overview-subtitle {
    margin-top: 12px;
    font-size: 13px;
    line-height: 20px;
  }

  .td .td-graph-stage .td-head-meta {
    grid-template-areas: "picker picker" "volume tag";
    gap: 15px 20px;
    align-items: center;
    padding-top: 0;
  }
  .td .td-final-picker-slot {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 14px;
  }
  .td .td-final-picker-slot select {
    font-size: 12px;
    padding: 5px 16px 6px 0;
  }
  .td .td-final-picker-slot > span {
    font-size: 9px;
  }

  .td .td-graph-stage .td-hvol {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
  }

  .td .td-graph-stage .td-hvol .td-lab {
    font-size: 10px;
  }

  .td .td-graph-stage .td-hvol-v {
    font-size: 12px;
    line-height: 18px;
  }

  .td .td-graph-stage .td-fig {
    column-gap: 8px;
    min-height: 50px;
  }

  .td .td-graph-stage .td-fig-v {
    font-size: 44px;
    line-height: 50px;
  }

  .td .td-graph-stage .td-fig-l {
    font-size: 11px;
  }

  .td .td-graph-stage .td-selected-label {
    display: none;
  }

  .td .td-graph-stage .td-fig .td-chg {
    margin-left: 4px;
    font-size: 11px;
  }

  .td .td-graph-stage .td-ranges {
    justify-self: start;
    margin-top: 10px;
  }

  .td .td-graph-stage .td-rng {
    height: 36px;
    min-width: 42px;
  }

  .td .td-graph-stage .td-legend {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 14px;
    margin-top: 12px;
  }

  .td .td-graph-stage .td-leg {
    height: 32px;
    min-height: 32px;
    font-size: 10px;
    gap: 6px;
  }

  .td .td-graph-stage .td-leg-full {
    display: none;
  }

  .td .td-graph-stage .td-leg-short {
    display: inline;
  }

  .td .td-graph-stage .td-leg-v {
    margin-left: auto;
    font-size: 10px;
  }

  .td .td-graph-stage .td-plotwrap {
    height: 260px;
    margin-top: 24px;
  }

  .td .td-graph-stage .td-activity-mount {
    margin-top: 26px;
  }

  .td .td-graph-stage .td-rules {
    gap: 18px;
    padding-top: 20px;
    margin-top: 26px;
  }

  .td .td-graph-stage .td-facts {
    justify-content: space-between;
    column-gap: 14px;
  }

  .td .td-graph-stage .td-facts dd {
    font-size: 10px;
  }
}
html[data-phase="graph"] .td,
html[data-phase="graph-transition"] .td {
  box-shadow: none;
}
