/*
 * Indexed form: the standard REPC page as one long form with a sticky
 * section index, and the submission receipt that confirms a saved REPC.
 *
 * Loaded on every page right after announcement_roles.css, so on equal
 * specificity these rules win over base.css. Everything is scoped under
 * .tpg-indexed-form or .tpg-receipt, so the guided REPC page, which shares
 * #repc-form and #dotloop, keeps its own rules. Colors come from base.css
 * and Bootstrap tokens only. The design guards give this file no neutral
 * rgba budget, so tints use the -rgb tokens or color-mix(). The
 * --tpg-indexed-form-* tokens are aliases of existing ones, set for each
 * theme.
 */
.tpg-indexed-form {
  --tpg-indexed-form-rule: var(--bs-border-color-translucent);
  --tpg-indexed-form-muted: var(--tpg-report-muted);
  --tpg-indexed-form-label: var(--bs-secondary-color);
  --tpg-indexed-form-track: rgba(var(--bs-body-color-rgb), 0.18);
  --tpg-indexed-form-fill: var(--tpg-700);
  --tpg-indexed-form-tint: rgba(var(--gold-rgb), 0.08);
  --tpg-indexed-form-tint-border: var(--tpg-600);
  --tpg-indexed-form-quiet-border: rgba(var(--bs-body-color-rgb), 0.28);
  --tpg-indexed-form-outline: rgba(var(--bs-body-color-rgb), 0.32);
  --tpg-indexed-form-attention: var(--tpg-warning);
  --tpg-indexed-form-attention-text: var(--tpg-warning-emphasis);
  --tpg-indexed-form-done: var(--tpg-success);
  --tpg-indexed-form-sticky-top: 1.5rem;
}

/* The nero neutrals vanish on the light panel, so the light track and quiet
   border mix the body color; dark keeps the board's nero values. The add
   controls take the outline-secondary border (body color at .32) in both. */
[data-bs-theme=dark] .tpg-indexed-form {
  --tpg-indexed-form-label: var(--tpg-400);
  --tpg-indexed-form-track: rgba(var(--tpg-nero-rgb), 0.18);
  --tpg-indexed-form-quiet-border: rgba(var(--tpg-nero-rgb), 0.18);
}

/* The header bar already draws the rule under the title; the header adds only space. */
.tpg-indexed-form .tpg-page-header {
  margin-bottom: 1.5rem !important;
}

.tpg-indexed-form .tpg-page-header__eyebrow:empty {
  display: none;
}

.tpg-indexed-form__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.tpg-indexed-form__rail {
  display: none;
}

.tpg-indexed-form__main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

@media (min-width: 1200px) {
  .tpg-indexed-form__layout {
    grid-template-columns: 15rem minmax(0, 1fr);
  }

  /* The stuck rail never outgrows the window: the row list scrolls inside
     the card, so the heading, progress and Review & submit stay in view. */
  .tpg-indexed-form__rail {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: var(--tpg-indexed-form-sticky-top);
    max-height: calc(100vh - 2 * var(--tpg-indexed-form-sticky-top));
    max-height: calc(100dvh - 2 * var(--tpg-indexed-form-sticky-top));
  }

  .tpg-indexed-form__rail > .tpg-section-index,
  .tpg-indexed-form__rail .tpg-section-index > .card-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .tpg-indexed-form__rail .tpg-section-index > .card-body > :not(.tpg-section-index__list) {
    flex: none;
  }

  /* The padding gives the row focus ring room inside the scroll box. */
  .tpg-indexed-form__rail .tpg-section-index__list {
    flex: 0 1 auto;
    min-height: 0;
    margin: 0.75rem -0.25rem 0.85rem;
    padding: 0.25rem;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .tpg-indexed-form__bar,
  .tpg-indexed-form__dock {
    display: none !important;
  }
}

/* Section index card: the same partial renders in the rail and the sheet. */
.tpg-section-index .card-header {
  padding: 1rem 1rem 0.85rem;
}

.tpg-section-index__heading {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tpg-section-index .card-body {
  padding: 1rem;
}

.tpg-section-index__count {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.6rem;
  font-size: 0.875rem;
}

.tpg-section-index__percent {
  color: var(--tpg-indexed-form-muted);
  font-variant-numeric: tabular-nums;
}

.tpg-section-index__progress,
.tpg-indexed-form__bar-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--tpg-indexed-form-track);
  overflow: hidden;
}

.tpg-section-index__progress > span,
.tpg-indexed-form__bar-progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--tpg-indexed-form-fill);
  transition: width var(--tpg-motion-duration-standard) var(--tpg-motion-ease-standard);
}

.tpg-section-index__list {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin: 1rem 0 1.1rem;
  padding: 0;
  list-style: none;
}

.tpg-section-index__row {
  position: relative;
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr) auto;
  column-gap: 0.5rem;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.35rem 0.6rem 0.35rem 0.5rem;
  border-left: 2px solid transparent;
  border-radius: 0.5rem;
  color: var(--bs-body-color);
  font-size: 0.875rem;
  line-height: 1.3;
  text-decoration: none;
}

.tpg-section-index__row:hover,
.tpg-section-index__row:focus-visible {
  background: var(--tpg-indexed-form-tint);
  color: var(--bs-emphasis-color);
}

.tpg-section-index__row:focus-visible {
  outline: none;
  box-shadow: var(--tpg-focus-ring);
}

.tpg-section-index__row[aria-current="true"] {
  border-left-color: var(--tpg-indexed-form-tint-border);
  background: var(--tpg-indexed-form-tint);
  color: var(--bs-emphasis-color);
}

.tpg-section-index__row--quiet {
  color: var(--tpg-indexed-form-muted);
}

/* Quiet rows (Dotloop import, Review) carry no number, so the title takes that column too. */
.tpg-section-index__row--quiet .tpg-section-index__num {
  display: none;
}

.tpg-section-index__row--quiet .tpg-section-index__title {
  grid-column: 1 / 3;
}

.tpg-section-index__num {
  color: var(--tpg-indexed-form-muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.tpg-section-index__state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.125rem;
}

.tpg-section-index__state .tpg-inline-pill {
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
}

.tpg-section-index__missing {
  grid-column: 2 / -1;
  margin-top: 0.15rem;
  color: var(--tpg-indexed-form-attention-text);
  font-size: 0.78rem;
  line-height: 1.35;
}

.tpg-section-index__foot {
  width: 100%;
}

/* Status marks shared by the index, section heads and upload cards. */
.tpg-status-mark {
  display: inline-block;
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  color: var(--tpg-indexed-form-done);
  position: relative;
}

.tpg-status-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 45%;
  width: 0.28rem;
  height: 0.52rem;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}

.tpg-status-dot {
  display: inline-block;
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--tpg-indexed-form-attention);
}

.tpg-status-dot[data-tone="success"] {
  background: var(--tpg-indexed-form-done);
}

.tpg-status-dot[data-tone="danger"] {
  background: var(--tpg-danger);
}

.tpg-status-dot[data-tone="neutral"] {
  background: var(--tpg-indexed-form-muted);
}

/* Phone and tablet index bar, sheet and bottom dock. The bar and dock sit one
   layer below the mobile sidebar menu, so the open menu paints and takes taps
   over them. */
.tpg-indexed-form__bar {
  position: sticky;
  top: 0;
  z-index: calc(var(--tpg-mobile-sidebar-z-index) - 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  margin: 0 -1.5rem 1rem;
  padding: 0 0.75rem 0 1.5rem;
  border-bottom: 1px solid var(--tpg-indexed-form-rule);
  background: var(--bs-body-bg);
}

@media (max-width: 991px) {
  .tpg-indexed-form__bar {
    top: var(--tpg-mobile-top-nav-height);
  }
}

.tpg-indexed-form__bar-text {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  font-size: 0.875rem;
}

.tpg-indexed-form__bar-attention {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  overflow: hidden;
  color: var(--tpg-indexed-form-attention-text);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tpg-indexed-form__bar-progress {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 0;
}

.tpg-indexed-form__bar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--bs-body-color);
}

.tpg-indexed-form__bar-toggle:focus-visible {
  outline: none;
  box-shadow: var(--tpg-focus-ring);
}

.tpg-indexed-form__sheet.offcanvas-bottom {
  height: auto;
  max-height: 85vh;
  max-height: 85dvh;
  border-top-left-radius: var(--bs-border-radius);
  border-top-right-radius: var(--bs-border-radius);
  background: var(--bs-body-bg);
}

.tpg-indexed-form__sheet .offcanvas-body {
  padding: 0 1rem calc(1rem + env(safe-area-inset-bottom));
}

/* The sheet's index card shows no edge, so it drops the card clip and blur:
   a clipping card would hold the sticky heading instead of the sheet body,
   and the blur would pull the dimmed page in under that heading. */
.tpg-indexed-form__sheet .tpg-section-index {
  border: 0;
  box-shadow: none;
  background: transparent;
  overflow: visible;
  backdrop-filter: none;
}

/* In the sheet the index heading is a flat row that stays put while the list
   scrolls, and the close button shares its line. */
.tpg-indexed-form__sheet .offcanvas-header {
  position: absolute;
  top: 0.25rem;
  right: 0.5rem;
  z-index: 2;
  padding: 0;
}

.tpg-indexed-form__sheet .offcanvas-header .btn-close {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  padding: 0.625rem;
}

.tpg-indexed-form__sheet .tpg-section-index > .card-header {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-right: 3.5rem;
  border: 0;
  border-radius: 0;
  background: var(--bs-body-bg);
}

.tpg-indexed-form__dock {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: calc(var(--tpg-mobile-sidebar-z-index) - 1);
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--tpg-indexed-form-rule);
  background: var(--bs-body-bg);
  box-shadow: 0 -12px 24px rgba(var(--tpg-nero-rgb), 0.08);
}

[data-bs-theme=dark] .tpg-indexed-form__dock {
  background: var(--dark-800);
  box-shadow: 0 -12px 24px color-mix(in srgb, var(--dark-900) 35%, transparent);
}

.tpg-indexed-form__dock .btn {
  width: 100%;
  min-height: 3rem;
}

@media (max-width: 1199px) {
  .tpg-indexed-form {
    padding-bottom: 5.5rem;
  }

  /* Keep page toasts above the docked Review & submit bar. */
  body:has(.tpg-indexed-form__dock) #repc-toast-container {
    bottom: 5.5rem !important;
  }
}

/* Lift the phone digital-card launcher above the docked Review & submit bar. */
@media (max-width: 767.98px) {
  body:has(.tpg-indexed-form__dock:not([hidden])) .tpg-mobile-digital-card-launcher:not([hidden]) {
    bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }
}

/* Header draft status (actions slot). */
.tpg-indexed-form .tpg-page-header .repcdoc-form-card__header {
  padding: 0;
  border: 0;
  background: none;
}

/* A saved draft's status and "Last saved" can outgrow the header. A fixed,
   shrinkable share wraps the status instead of widening the page, and keeps
   the title's width steady while autosave changes the text. */
@media (min-width: 768px) {
  .tpg-indexed-form .tpg-page-header__actions {
    flex: 0 1 30rem;
  }
}

/* Autosave swaps short and long messages. The status, "Last saved" and Start
   over each keep their own line, so the header keeps one height and the form
   does not move during a click. */
.tpg-indexed-form .repcdoc-draft-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.tpg-indexed-form .repcdoc-draft-summary__content {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.1rem 0.45rem;
  max-width: 100%;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--tpg-indexed-form-rule);
  border-radius: 999px;
  background: rgba(var(--tpg-nero-rgb), 0.04);
  color: var(--bs-emphasis-color);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: start;
}

/* The dot sits on the status's first line when the status wraps. */
.tpg-indexed-form .repcdoc-draft-summary__content [data-tpg-draft-dot] {
  grid-area: 1 / 1;
  align-self: start;
  margin-top: calc((1.35em - 0.5rem) / 2);
}

.tpg-indexed-form .repcdoc-draft-summary__status,
.tpg-indexed-form .tpg-draft-saved-at {
  grid-column: 2;
}

.tpg-indexed-form .repcdoc-draft-summary__content .repcdoc-draft-summary__pill {
  display: none;
}

.tpg-indexed-form .repcdoc-draft-summary__status {
  font-size: inherit;
}

.tpg-indexed-form .repcdoc-draft-summary__status.text-muted,
.tpg-indexed-form .repcdoc-draft-summary__status.text-success {
  color: inherit !important;
}

.tpg-indexed-form .repcdoc-draft-summary__action.btn {
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--bs-link-color);
  font-size: 0.875rem;
  font-weight: 500;
}

.tpg-indexed-form .repcdoc-draft-summary__action.btn:hover,
.tpg-indexed-form .repcdoc-draft-summary__action.btn:focus-visible {
  color: var(--bs-link-hover-color);
  text-decoration: underline;
}

.tpg-indexed-form .tpg-draft-saved-at:empty {
  display: none;
}

.tpg-indexed-form .tpg-draft-saved-at {
  color: var(--tpg-indexed-form-muted);
  font-weight: 500;
}

@media (max-width: 767px) {
  .tpg-indexed-form .tpg-page-header__bar {
    flex-direction: column;
    align-items: stretch;
  }

  .tpg-indexed-form .repcdoc-draft-summary {
    align-items: flex-start;
  }

  .tpg-indexed-form .repcdoc-draft-summary__content {
    border-radius: var(--bs-border-radius);
  }
}

/* On phones the long saved message takes two lines. Reserving them keeps the
   header one height when the short autosaving message replaces it. */
@media (max-width: 575.98px) {
  .tpg-indexed-form .repcdoc-draft-summary__status {
    min-height: calc(2em * 1.35);
  }
}

/* Dotloop import bar. */
.tpg-import-bar {
  padding: 1rem 1.25rem;
}

.tpg-import-bar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.tpg-import-bar__icon {
  flex: none;
  color: var(--gold);
}

.tpg-import-bar__copy {
  flex: 1 1 16rem;
  min-width: 0;
}

.tpg-import-bar__title {
  margin: 0;
  color: var(--bs-emphasis-color);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.tpg-import-bar__hint {
  margin: 0.15rem 0 0;
  color: var(--tpg-indexed-form-muted);
  font-size: 0.875rem;
}

.tpg-import-bar__picker {
  flex: 0 1 18.75rem;
  min-width: 12rem;
}

.tpg-import-bar__picker .bootstrap-select,
.tpg-import-bar__picker select {
  width: 100% !important;
}

.tpg-import-bar .tpg-form-error-inline:empty {
  display: none;
}

.tpg-import-bar .repcdoc-dotloop-connect-button {
  margin: 0;
}

/* The not-connected row also carries the older connect-cta class, whose
   #repc-form rule stacks it into a column; keep it one import bar row. */
.tpg-indexed-form #repc-form .tpg-import-bar__row.repcdoc-dotloop-connect-cta {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem 1rem;
}

@media (max-width: 767px) {
  .tpg-import-bar__picker {
    flex: 1 1 100%;
  }
}

/* Form panel and sections. */
.tpg-indexed-form #repc-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tpg-indexed-form__panel > .card-body {
  padding: 2rem;
}

@media (max-width: 767px) {
  .tpg-indexed-form__panel > .card-body {
    padding: 1.25rem 1rem 1.5rem;
  }
}

.tpg-indexed-form #repc-form fieldset {
  padding-top: 0;
  padding-bottom: 0;
}

.tpg-indexed-form .tpg-indexed-section,
.tpg-indexed-form .tpg-import-bar {
  scroll-margin-top: 5rem;
}

/* Below 992px the top nav and the index bar both stick, so index jumps land below both. */
@media (max-width: 991px) {
  .tpg-indexed-form .tpg-indexed-section,
  .tpg-indexed-form .tpg-import-bar,
  .tpg-indexed-form .tpg-review-card {
    scroll-margin-top: calc(var(--tpg-mobile-top-nav-height) + 4.5rem);
  }
}

/* The fee fieldset opens #form-details and reads as part of section 1, so it gets no rule.
   The #repc-form step outranks the fieldset padding reset above. The last field's 1rem
   bottom margin plus this 1rem margin puts the rule 2rem under the fields, as on the board. */
.tpg-indexed-form #repc-form .tpg-indexed-section + .tpg-indexed-section,
.tpg-indexed-form #repc-review-section > .tpg-indexed-section:first-child {
  margin-top: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--tpg-indexed-form-rule);
}

/* The upload cards drop their bottom margin, so the section adds it back for the rule. */
.tpg-indexed-form #repc-form #repc-documents-section {
  padding-bottom: 1rem;
}

/* The head keeps Bootstrap's floated legend (legend + * clears it): a
   float: none legend would become the fieldset's rendered legend and hide the
   section rule behind it. */
.tpg-indexed-section-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin: 0 0 1.25rem;
  padding: 0;
}

.tpg-indexed-section-head__num {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid rgba(var(--gold-rgb), 0.35);
  border-radius: 50%;
  background: var(--tpg-indexed-form-tint);
  color: var(--bs-emphasis-color);
  font-family: 'Aktiv Grotesk', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.tpg-indexed-section-head__title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: var(--bs-heading-color);
  font-family: 'Ivy Presto', Georgia, 'Times New Roman', serif;
  font-size: 1.65rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.tpg-indexed-section-head__pill {
  flex: none;
  font-family: 'Aktiv Grotesk', sans-serif;
  letter-spacing: normal;
}

.tpg-indexed-section-head__pill:empty {
  display: none;
}

.tpg-indexed-section-head__pill .tpg-status-dot,
.tpg-section-index__state .tpg-status-dot {
  width: 0.4rem;
  height: 0.4rem;
}

@media (max-width: 575px) {
  .tpg-indexed-section-head__title {
    font-size: 1.4rem;
  }

  .tpg-indexed-section-head__pill[data-tone="success"] {
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    overflow: hidden;
    color: transparent;
    font-size: 0;
  }

  .tpg-indexed-section-head__pill[data-tone="success"] .tpg-status-dot {
    width: 0.45rem;
    height: 0.45rem;
  }
}

/* Labels above fields, plain and upright. */
.tpg-indexed-form #repc-form .form-group:not(.hidden),
.tpg-indexed-form #repc-form .tpg-field:not(.hidden) {
  display: flex;
  flex-direction: column;
}

.tpg-indexed-form #repc-form .form-group > label:not(.repc-file-input-card),
.tpg-indexed-form #repc-form .tpg-field > label {
  order: -1;
}

.tpg-indexed-form #repc-form label:not(.repc-file-input-card):not(.form-check-label),
.tpg-indexed-form #repc-form legend.form-label,
.tpg-indexed-form #repc-form #title-header,
.tpg-indexed-form #repc-form .tpg-field-label {
  display: block;
  margin-bottom: 0.375rem;
  padding: 0;
  color: var(--tpg-indexed-form-label);
  font-size: 0.8125rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.tpg-indexed-form #repc-form .form-check-label {
  padding: 0;
  font-size: inherit;
  font-style: normal;
}

/* Empty radio rings take the muted outline the choice cards use, so the
   short-sale answers clear 3:1 on both themes. Checked keeps the gold fill;
   on light its edge takes the deeper gold, as the checked checkbox does. */
.tpg-indexed-form #repc-form .form-check-input[type="radio"]:not(:checked) {
  border-color: var(--tpg-indexed-form-muted);
}

[data-bs-theme=light] .tpg-indexed-form #repc-form .form-check-input[type="radio"]:checked {
  border-color: var(--tpg-700);
}

/* Radio-group legends and the title-company heading (it labels its select)
   take the label recipe over the global heading face and the subhead caps. */
.tpg-indexed-form #repc-form legend.form-label,
.tpg-indexed-form #repc-form #title-header {
  margin-top: 0;
  font-family: 'Aktiv Grotesk', sans-serif;
  font-weight: 600 !important;
  text-transform: none;
}

/* Checkboxes rendered inside their label read as body text. */
.tpg-indexed-form #repc-form .form-group > label:has(> input[type="checkbox"]) {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--bs-body-color);
  font-size: 0.9375rem;
  font-weight: 400;
}

/* The shared widget renders those boxes bare, so they take the site checkbox
   recipe here: a muted outline that fills gold with a dark check. */
.tpg-indexed-form #repc-form .form-group > label > input[type="checkbox"] {
  display: inline-grid;
  flex: none;
  place-content: center;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  border: 1.5px solid var(--tpg-indexed-form-muted);
  border-radius: 0.3rem;
  background: transparent;
  appearance: none;
  cursor: pointer;
}

.tpg-indexed-form #repc-form .form-group > label > input[type="checkbox"]:checked {
  border-color: var(--gold);
  background: var(--gold);
}

/* On light the checked edge takes the deeper gold so it still clears 3:1. */
[data-bs-theme=light] .tpg-indexed-form #repc-form .form-group > label > input[type="checkbox"]:checked {
  border-color: var(--tpg-700);
}

.tpg-indexed-form #repc-form .form-group > label > input[type="checkbox"]:checked::before {
  content: "";
  width: 0.625rem;
  height: 0.625rem;
  background: var(--tpg-950);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%);
}

/* Focus turns the edge gold, as the toggle switch's focus does, so it still
   shows on light, where the ring alone is faint. */
.tpg-indexed-form #repc-form .form-group > label > input[type="checkbox"]:focus-visible {
  border-color: var(--tpg-600);
  outline: none;
  box-shadow: var(--tpg-focus-ring);
}

.tpg-indexed-form #repc-form .required + label::after,
.tpg-indexed-form #repc-form .tpg-field-label--required::after {
  content: " *";
  color: var(--tpg-danger);
  font-weight: 700;
}

.tpg-indexed-form #repc-form .form-text {
  margin-top: 0.375rem;
  color: var(--tpg-indexed-form-muted) !important;
  font-size: 0.8125rem;
}

/* Subheads: the board's tracked caps in the light gold step. */
.tpg-indexed-form #repc-form .sub-section-header {
  margin: 1.5rem 0 0.75rem;
  padding: 0;
  color: var(--tpg-400);
  font-family: 'Aktiv Grotesk', sans-serif;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 600 !important;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* Gold is too light for small caps on the light panel, so light subheads
   take the dark neutral, as the light QR eyebrow does. */
[data-bs-theme=light] .tpg-indexed-form #repc-form .sub-section-header {
  color: var(--tpg-800);
}

.tpg-indexed-form #repc-form textarea.form-control {
  height: auto;
  min-height: 6rem;
}

/* Closed bootstrap-select toggles read as the shared select recipe. */
.tpg-indexed-form .bootstrap-select > .dropdown-toggle {
  min-height: calc(1.5em + 0.75rem + 2px);
  padding: 0.375rem 0.9rem 0.375rem 0.75rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background-color: var(--form-control-background);
  box-shadow: none;
  color: var(--bs-body-color);
  font-size: 1rem;
  font-weight: 400;
}

[data-bs-theme=dark] .tpg-indexed-form .bootstrap-select > .dropdown-toggle {
  background-color: var(--mid-100);
  color: var(--bs-emphasis-color);
}

.tpg-indexed-form .bootstrap-select > .dropdown-toggle.bs-placeholder {
  color: var(--tpg-indexed-form-muted);
}

/* The vendor caret becomes the select chevron, drawn in currentColor. */
.tpg-indexed-form .bootstrap-select > .dropdown-toggle::after {
  flex: none;
  width: 0.45rem;
  height: 0.45rem;
  margin: -0.25rem 0 0 0.75rem;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  vertical-align: middle;
}

.tpg-indexed-form .bootstrap-select > .dropdown-toggle:hover,
.tpg-indexed-form .bootstrap-select.show > .dropdown-toggle {
  background-color: var(--form-control-background-active);
}

[data-bs-theme=dark] .tpg-indexed-form .bootstrap-select > .dropdown-toggle:hover,
[data-bs-theme=dark] .tpg-indexed-form .bootstrap-select.show > .dropdown-toggle {
  background-color: var(--mid-400);
}

.tpg-indexed-form .bootstrap-select > .dropdown-toggle:focus-visible,
.tpg-indexed-form .bootstrap-select > .dropdown-toggle:focus {
  border-color: var(--bs-focus-border-color);
  outline: none !important;
  box-shadow: 0 0 0 0.2rem var(--bs-focus-ring-color);
}

.tpg-indexed-form .bootstrap-select.form-control,
.tpg-indexed-form .bootstrap-select.form-select {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.tpg-indexed-form .bootstrap-select .filter-option-inner-inner {
  overflow: hidden;
  text-overflow: ellipsis;
}

.tpg-indexed-form #repc-form .has-error .bootstrap-select > .dropdown-toggle {
  border-color: var(--tpg-danger);
  box-shadow: 0 0 0 0.2rem rgba(var(--tpg-danger-rgb), 0.25);
}

/* Represented choice cards over the kept select. */
.tpg-choice-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 575px) {
  .tpg-choice-cards {
    gap: 0.75rem;
  }
}

.tpg-choice-card {
  display: grid;
  grid-template-columns: 1.125rem minmax(0, 1fr);
  column-gap: 0.75rem;
  row-gap: 0.25rem;
  align-content: start;
  min-height: 5.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--tpg-indexed-form-quiet-border);
  border-radius: var(--bs-border-radius);
  background: var(--tpg-card-background);
  color: var(--bs-body-color);
  text-align: left;
  transition:
    border-color var(--tpg-motion-duration-fast) var(--tpg-motion-ease-standard),
    background-color var(--tpg-motion-duration-fast) var(--tpg-motion-ease-standard);
}

[data-bs-theme=light] .tpg-choice-card {
  background: var(--form-control-background-active);
}

.tpg-choice-card:hover {
  border-color: var(--tpg-indexed-form-tint-border);
}

.tpg-choice-card:focus-visible {
  outline: none;
  box-shadow: var(--tpg-focus-ring);
}

.tpg-choice-card[aria-checked="true"] {
  border-color: var(--tpg-indexed-form-tint-border);
  background: var(--tpg-indexed-form-tint);
}

.tpg-choice-card__radio {
  position: relative;
  grid-row: 1;
  align-self: center;
  width: 1.125rem;
  height: 1.125rem;
  border: 1.5px solid var(--tpg-indexed-form-muted);
  border-radius: 50%;
}

.tpg-choice-card[aria-checked="true"] .tpg-choice-card__radio {
  border-color: var(--gold);
  background: var(--gold);
}

.tpg-choice-card[aria-checked="true"] .tpg-choice-card__radio::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 0.375rem;
  height: 0.375rem;
  margin: auto;
  border-radius: 50%;
  background: var(--tpg-950);
}

.tpg-choice-card__title {
  color: var(--bs-emphasis-color);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.tpg-choice-card__hint {
  grid-column: 2;
  color: var(--tpg-indexed-form-label);
  font-size: 0.85rem;
  line-height: 1.4;
  text-wrap: balance;
}

.has-error .tpg-choice-card,
.tpg-choice-cards.has-error .tpg-choice-card {
  border-color: var(--tpg-danger);
}

/* The kept select stays focusable for validation but is drawn as cards. */
.tpg-indexed-form .tpg-choice-source {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

/* Upload cards: the group is the card; the pinned upload script builds the
   label, file line, status and Replace button inside it. */
.tpg-indexed-form #repc-documents-section .row > [class*="col-"]:not(.hidden) {
  display: flex;
}

.tpg-indexed-form #repc-documents-section .row > [class*="col-"] > .form-group {
  flex: 1 1 auto;
  width: 100%;
}

/* Required slots nest a second .row: it fills the column and drops its gutter
   margins, so every card in a grid row has the same width and height. */
.tpg-indexed-form #repc-documents-section .row > [class*="col-"] > .row {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  margin-inline: 0;
}

/* The shared form-group partial adds .mb-3; the grid gutter already spaces the cards. */
.tpg-indexed-form #repc-form .repc-file-input-group {
  position: relative;
  min-height: 8.5rem;
  margin-bottom: 0 !important;
  padding: 0.9rem 1rem 0.85rem;
  border: 1px solid var(--tpg-indexed-form-quiet-border);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--tpg-nero-rgb), 0.03);
}

/* A card with a file takes a gold edge; the test matches Replace below.
   :where() keeps the specificity low, so focus and content:none still win. */
.tpg-indexed-form #repc-form .repc-file-input-group.has-selected-file:where(:has(.selected-file):not(.is-missing)) {
  border-color: rgba(var(--gold-rgb), 0.28);
}

.tpg-indexed-form #repc-form .repc-file-input-group.is-missing {
  border-style: dashed;
  border-color: rgba(var(--tpg-warning-rgb), 0.55);
  background: rgba(var(--tpg-warning-rgb), 0.06);
}

.tpg-indexed-form #repc-form .repc-file-input-group > label.repc-file-input-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.45rem;
  min-height: 0;
  margin: 0;
  padding: 0 1.75rem 0 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  text-align: left;
  transform: none;
}

.tpg-indexed-form #repc-form .repc-file-input-group:hover > label.repc-file-input-card,
.tpg-indexed-form #repc-form .repc-file-input-group:focus-within > label.repc-file-input-card {
  border: 0;
  background: none;
  box-shadow: none;
  transform: none;
}

.tpg-indexed-form #repc-form .repc-file-input-group:focus-within {
  border-color: var(--bs-focus-border-color);
  box-shadow: 0 0 0 0.2rem var(--bs-focus-ring-color);
}

.tpg-indexed-form #repc-form .repc-file-input-group > label.repc-file-input-card .document-upload-label {
  color: var(--bs-emphasis-color);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}

.tpg-indexed-form #repc-form .repc-file-input-group > label.repc-file-input-card .selected-file {
  position: relative;
  padding-left: 1.2rem;
  color: var(--tpg-indexed-form-muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.tpg-indexed-form #repc-form .repc-file-input-group > label.repc-file-input-card .selected-file::before {
  content: "";
  position: absolute;
  top: 0.12rem;
  left: 0;
  width: 0.7rem;
  height: 0.85rem;
  border: 1.25px solid currentColor;
  border-radius: 2px 5px 2px 2px;
}

.tpg-indexed-form #repc-form .repc-file-input-group.is-missing > label.repc-file-input-card .selected-file {
  color: var(--tpg-indexed-form-attention-text);
}

/* The vendor "Choose file" cue becomes a small outline pill; with a file it
   reads Replace, unless the upload script already added a Replace button.
   Start over drops the file line but leaves has-selected-file, so Replace
   also needs that line and no Missing mark. */
.tpg-indexed-form #repc-form .repc-file-input-group > label.repc-file-input-card::before {
  content: "Choose file";
  order: 3;
  margin-top: 0.35rem;
  padding: 0.3rem 0.85rem;
  border: 1px solid rgba(var(--gold-rgb), 0.6);
  border-radius: 999px;
  color: var(--bs-link-color);
  font-size: 0.8125rem;
  font-weight: 500;
}

.tpg-indexed-form #repc-form .repc-file-input-group.has-selected-file:where(:has(.selected-file):not(.is-missing)) > label.repc-file-input-card::before {
  content: "Replace";
  margin-top: 0.5rem;
  padding: 0;
  border: 0;
}

.tpg-indexed-form #repc-form .repc-file-input-group:has(.replace-upload) > label.repc-file-input-card::before,
.tpg-indexed-form #repc-form .repc-file-input-group:has(input[type="file"]:disabled) > label.repc-file-input-card::before {
  content: none;
}

.tpg-indexed-form #repc-form .repc-file-input-group > .required + label.repc-file-input-card::after,
.tpg-indexed-form #repc-form .repc-file-input-group > input[required] + label.repc-file-input-card::after,
.tpg-indexed-form #repc-form .repc-file-input-group > label.repc-file-input-card::after {
  content: none;
}

.tpg-indexed-form #repc-form .repc-file-input-group .tpg-upload-mark {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
}

/* A missing card is a grid whose rows the label shares (subgrid): the card
   name keeps the full width, the Missing pill ends the "No file selected"
   line, and Choose file comes last. */
.tpg-indexed-form #repc-form .repc-file-input-group.is-missing:not(.hidden) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  align-content: start;
  column-gap: 0.5rem;
}

.tpg-indexed-form #repc-form .repc-file-input-group.is-missing > *,
.tpg-indexed-form #repc-form .repc-file-input-group.is-missing > label.repc-file-input-card > *,
.tpg-indexed-form #repc-form .repc-file-input-group.is-missing > label.repc-file-input-card::before {
  grid-column: 1 / -1;
}

.tpg-indexed-form #repc-form .repc-file-input-group.is-missing > label.repc-file-input-card {
  display: grid;
  grid-row: 1 / 4;
  grid-template-columns: subgrid;
  grid-template-rows: subgrid;
  row-gap: 0.45rem;
  padding-right: 0;
}

.tpg-indexed-form #repc-form .repc-file-input-group.is-missing > label.repc-file-input-card .document-upload-label {
  grid-row: 1;
}

.tpg-indexed-form #repc-form .repc-file-input-group.is-missing > label.repc-file-input-card .selected-file {
  grid-row: 2;
  grid-column: 1;
}

.tpg-indexed-form #repc-form .repc-file-input-group.is-missing > label.repc-file-input-card::before {
  grid-row: 3;
  justify-self: start;
}

.tpg-indexed-form #repc-form .repc-file-input-group.is-missing > .tpg-upload-mark {
  position: static;
  grid-row: 2;
  grid-column: 2;
  align-self: center;
}

/* On phones the pill leads the file line. */
@media (max-width: 575px) {
  .tpg-indexed-form #repc-form .repc-file-input-group.is-missing:not(.hidden) {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .tpg-indexed-form #repc-form .repc-file-input-group.is-missing > label.repc-file-input-card .selected-file {
    grid-column: 2;
  }

  .tpg-indexed-form #repc-form .repc-file-input-group.is-missing > .tpg-upload-mark {
    grid-column: 1;
  }
}

/* Each upload column is a size container, so a card can read its own width.
   A narrow card (three across beside the rail, from 1200px) moves the pill
   to its own row under the name, so "No file selected" keeps whole words. */
.tpg-indexed-form #repc-documents-section > .row > [class*="col-"] {
  container-type: inline-size;
}

@container (max-width: 14.5rem) {
  .tpg-indexed-form #repc-form .repc-file-input-group.is-missing:not(.hidden) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(4, auto);
  }

  .tpg-indexed-form #repc-form .repc-file-input-group.is-missing > label.repc-file-input-card {
    grid-row: 1 / 5;
  }

  .tpg-indexed-form #repc-form .repc-file-input-group.is-missing > label.repc-file-input-card .selected-file {
    grid-row: 3;
    grid-column: 1;
  }

  .tpg-indexed-form #repc-form .repc-file-input-group.is-missing > label.repc-file-input-card::before {
    grid-row: 4;
  }

  .tpg-indexed-form #repc-form .repc-file-input-group.is-missing > .tpg-upload-mark {
    grid-row: 2;
    grid-column: 1;
    justify-self: start;
  }
}

.tpg-indexed-form #repc-form .repc-file-input-group .upload-status {
  margin-top: 0.4rem;
  font-size: 0.78rem;
}

.tpg-indexed-form #repc-form .repc-file-input-group .replace-upload {
  align-self: flex-start;
  margin-top: 0.35rem;
  padding: 0;
  color: var(--bs-link-color);
  font-size: 0.8125rem;
  text-decoration: none;
}

.tpg-indexed-form .tpg-upload-summary {
  margin: -0.5rem 0 1rem;
  font-size: 0.875rem;
}

.tpg-indexed-form #add-another-document:not(.hidden) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  width: 100%;
  min-height: 8.5rem;
  margin: 0;
  padding: 1rem;
  border: 1px dashed var(--tpg-indexed-form-outline);
  border-radius: var(--bs-border-radius);
  background: none;
  color: var(--bs-emphasis-color);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.tpg-indexed-form #add-another-document:hover,
.tpg-indexed-form #add-another-document:focus-visible {
  border-color: var(--tpg-indexed-form-tint-border);
  background: var(--tpg-indexed-form-tint);
}

.tpg-indexed-form #add-another-document:focus-visible {
  outline: none;
  box-shadow: var(--tpg-focus-ring);
}

.tpg-indexed-form .tpg-add-card__plus {
  color: var(--gold);
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1;
}

.tpg-indexed-form .tpg-add-card__hint {
  color: var(--tpg-indexed-form-muted);
  font-size: 0.78rem;
  font-weight: 400;
}

/* On phones the add tile is a full-width outline pill. */
@media (max-width: 575px) {
  .tpg-indexed-form #add-another-document:not(.hidden) {
    flex-direction: row;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.375rem 0.75rem;
    border-style: solid;
    border-radius: 999px;
    background: rgba(var(--tpg-nero-rgb), 0.03);
    font-size: 1rem;
    font-weight: 400;
  }

  .tpg-indexed-form .tpg-add-card__hint {
    display: none;
  }
}

/* The add-another buyer, seller and agent links are div.btn-link in shared
   partials. They read as the small outline-secondary pill with a plus, at
   the start of the row, and fill the row on phones. They stay in inline
   flow so the space before the agent link's role span survives. */
.tpg-indexed-form :is(#add-buyer-client, #add-seller-client, #add-another-coop-agent) {
  display: inline-block;
  align-self: flex-start;
  padding: 0.25rem 0.625rem !important; /* .ps-0 is !important */
  border: 1px solid var(--tpg-indexed-form-outline);
  border-radius: var(--bs-btn-border-radius);
  background: rgba(var(--bs-body-color-rgb), 0.04);
  color: var(--bs-body-color);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: start;
  text-decoration: none;
}

.tpg-indexed-form :is(#add-buyer-client, #add-seller-client, #add-another-coop-agent)::before {
  content: "";
  display: inline-block;
  width: 0.625rem;
  height: 0.625rem;
  margin-right: 0.375rem;
  vertical-align: -0.0625rem;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
}

.tpg-indexed-form :is(#add-buyer-client, #add-seller-client, #add-another-coop-agent):hover {
  border-color: var(--bs-body-color);
  background: var(--bs-body-color);
  color: var(--bs-body-bg);
}

@media (max-width: 575px) {
  .tpg-indexed-form :is(#add-buyer-client, #add-seller-client, #add-another-coop-agent) {
    align-self: stretch;
    padding-block: 0.5625rem !important;
    font-size: 1rem;
    text-align: center;
  }
}

/* MLS number and Load Data share one line; the help text sits under both. */
.tpg-indexed-form .tpg-mls-load {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tpg-indexed-form .tpg-mls-load > .form-control {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.tpg-indexed-form .tpg-mls-load > .btn {
  flex: none;
}

/* Two fields that read as a pair (Preferred language and Housiversary gift)
   share a row from 768px; the gift's own label names it, so its subhead goes. */
.tpg-indexed-form #housiversary-section .sub-section-header {
  display: none;
}

@media (min-width: 768px) {
  .tpg-indexed-form .tpg-field-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0.75rem;
    align-items: start;
  }

  .tpg-indexed-form .tpg-field-pair .row > .col-md-6 {
    width: 100%;
  }

  /* Referral and Lead source pair up too. The client sections are shared
     partials, so the section is the grid: those two rows share a line and
     every other child spans it. The gap is the form-row gutter, so Lead
     source lines up with the other right-hand fields, and the rows align at
     the bottom because the referral label can wrap. While the referral
     contact row is open the section stacks, so the screen order stays the
     tab order. It also stacks while a server error list shows, because the
     list sits under one field and would push the pair out of line. */
  .tpg-indexed-form :is(#buyer-client-section, #seller-client-section):not(.hidden):has(> [id^="referral-"].hidden):not(:has(.errorlist)) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0.75rem;
    align-items: end;
  }

  .tpg-indexed-form :is(#buyer-client-section, #seller-client-section):has(> [id^="referral-"].hidden):not(:has(.errorlist)) > * {
    grid-column: 1 / -1;
  }

  .tpg-indexed-form :is(#buyer-client-section, #seller-client-section):has(> [id^="referral-"].hidden):not(:has(.errorlist)) > .row:has(:is(#id_referral_buyer, #id_referral_seller)) {
    grid-column: 1;
  }

  .tpg-indexed-form :is(#buyer-client-section, #seller-client-section):has(> [id^="referral-"].hidden):not(:has(.errorlist)) > .row:has(:is(#id_buyer_lead_source, #id_seller_lead_source)) {
    grid-column: 2;
  }

  .tpg-indexed-form :is(#buyer-client-section, #seller-client-section):has(> [id^="referral-"].hidden):not(:has(.errorlist)) > .row:has(:is(#id_referral_buyer, #id_referral_seller, #id_buyer_lead_source, #id_seller_lead_source)) > .col-md-6 {
    width: 100%;
  }
}

.tpg-indexed-form #repc-form .docs {
  margin-top: 1rem;
}

/* Review card. */
.tpg-review-card {
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px solid var(--tpg-indexed-form-rule);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--tpg-nero-rgb), 0.025);
  scroll-margin-top: 5rem;
}

.tpg-review-card__title {
  margin: 0;
  font-family: 'Ivy Presto', Georgia, 'Times New Roman', serif;
  font-size: 1.65rem;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.tpg-review-card__intro {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

.tpg-review-card__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 2rem;
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .tpg-review-card__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tpg-review-card__column {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tpg-review-card__block {
  padding: 1rem 0 1.1rem;
  border-top: 1px solid var(--tpg-indexed-form-rule);
}

.tpg-review-card__block--wide {
  grid-column: 1 / -1;
}

.tpg-review-card__block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

/* Block titles are h3s, so they keep the shared Ivy heading face and weight
   (css-architecture); only the size changes, and the color is restated over
   the dark card-body heading color. */
.tpg-indexed-form .tpg-review-card .tpg-review-card__block-title {
  margin: 0;
  color: var(--tpg-400);
  font-size: 1.125rem;
  line-height: 1.3;
}

[data-bs-theme=light] .tpg-indexed-form .tpg-review-card .tpg-review-card__block-title {
  color: var(--tpg-800);
}

/* Edit takes the theme link color: gold on dark, the dark neutral on light. */
.tpg-indexed-form .tpg-review-card__edit {
  color: var(--bs-link-color);
  font-size: 0.875rem;
  text-decoration: none;
}

.tpg-indexed-form .tpg-review-card__edit:hover,
.tpg-indexed-form .tpg-review-card__edit:focus-visible {
  color: var(--bs-link-color);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.tpg-review-card__line {
  margin: 0 0 0.25rem;
  font-size: 0.875rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.tpg-review-card__label {
  color: var(--tpg-indexed-form-muted);
}

.tpg-review-card__value {
  color: var(--bs-emphasis-color);
}

.tpg-review-card__name {
  margin: 0.4rem 0 0;
  color: var(--bs-emphasis-color);
  font-size: 0.875rem;
  font-weight: 600;
}

.tpg-review-card__name:first-child {
  margin-top: 0;
}

.tpg-review-card__docs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tpg-review-card__doc {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 1rem;
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  .tpg-review-card__doc {
    grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
  }
}

.tpg-review-card__empty {
  color: var(--tpg-indexed-form-attention-text);
}

/* Submit row: one submit button for the whole form. */
.tpg-submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--tpg-indexed-form-rule);
}

.tpg-indexed-form #repc-form .tpg-submit-row > button[type="submit"] {
  margin-top: 0;
}

.tpg-submit-row__note {
  color: var(--tpg-indexed-form-muted);
  font-size: 0.875rem;
}

.tpg-submit-row .tpg-inline-pill:empty {
  display: none;
}

@media (max-width: 575px) {
  .tpg-submit-row {
    justify-content: flex-start;
  }

  .tpg-submit-row > button[type="submit"] {
    width: 100%;
    min-height: 3rem;
  }
}

/* Styled Start over confirm. */
.tpg-confirm-dialog .modal-content {
  border: 1px solid var(--tpg-card-panel-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--tpg-card-panel-surface);
  box-shadow: var(--tpg-card-panel-shadow);
}

.tpg-confirm-dialog .modal-header,
.tpg-confirm-dialog .modal-footer {
  border-color: var(--tpg-indexed-form-rule, var(--bs-border-color-translucent));
}

.tpg-confirm-dialog .modal-title {
  font-family: 'Ivy Presto', Georgia, 'Times New Roman', serif;
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* Submission receipt: the confirmation page shown after a form submission
   is saved. */
.tpg-receipt {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 1.5rem;
}

.tpg-receipt__hero.card {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 1.5rem;
}

.tpg-receipt__check {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border: 1px solid rgba(var(--tpg-success-rgb), 0.28);
  border-radius: 50%;
  background: rgba(var(--tpg-success-rgb), 0.1);
  color: var(--tpg-success);
}

.tpg-receipt__heading {
  flex: 1 1 18rem;
  min-width: 0;
}

.tpg-receipt__title {
  margin: 0.6rem 0 0;
  font-family: 'Ivy Presto', Georgia, 'Times New Roman', serif;
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.15rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.15;
}

.tpg-receipt__meta {
  margin: 0.4rem 0 0;
  font-size: 0.875rem;
}

.tpg-receipt__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.tpg-receipt__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 992px) {
  .tpg-receipt__grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }
}

.tpg-receipt__card > .card-body {
  padding: 1rem 1.5rem 0.75rem;
}

.tpg-receipt__card-title {
  margin: 0 0 0.5rem;
  font-family: 'Ivy Presto', Georgia, 'Times New Roman', serif;
  font-size: 1.22rem;
  font-weight: 300;
  letter-spacing: 0.06em;
}

.tpg-receipt__facts {
  margin: 0;
}

.tpg-receipt__fact {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.15rem 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--bs-border-color-translucent);
}

@media (min-width: 576px) {
  .tpg-receipt__fact {
    grid-template-columns: 9.4rem minmax(0, 1fr);
  }
}

.tpg-receipt__fact:last-child {
  border-bottom: 0;
}

.tpg-receipt__fact > dt {
  color: var(--tpg-report-muted);
  font-size: 0.85rem;
  font-weight: 400;
}

.tpg-receipt__fact > dd {
  margin: 0;
  color: var(--bs-emphasis-color);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.tpg-receipt__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 0;
}

.tpg-receipt__pills .tpg-inline-pill[data-tone]::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--tpg-success);
}

.tpg-receipt__pills .tpg-inline-pill[data-tone="warning"]::before {
  background: var(--tpg-warning);
}

.tpg-receipt__subhead {
  margin: 1.25rem 0 0;
  color: var(--gold);
  font-family: 'Aktiv Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 700 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

[data-bs-theme=light] .tpg-receipt__subhead {
  color: var(--tpg-800);
}

.tpg-receipt__subhead + .tpg-receipt__pills {
  margin-top: 0.5rem;
}

.tpg-receipt__caveat {
  margin: 0.5rem 0 0;
  color: var(--tpg-report-muted);
  font-size: 0.78rem;
}

.tpg-receipt__keep {
  margin: 1.25rem 0 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bs-border-color-translucent);
  font-size: 0.875rem;
}

.tpg-receipt__keep strong {
  color: var(--bs-emphasis-color);
  font-weight: 600;
}
