/* App-owned map, photos, printable lease, scanning and provider integration styles. Ordinary UI uses dg-design. */
/* dg-exception: Mapbox draws its attribution on a fixed white strip in both themes; its links take
   the always-dark primary, not the page link color (rust on that strip in dark). */
.dg-page .mapboxgl-ctrl-attrib a:not([class]) {
  color: var(--dg-primary);
}

/* dg-exception: Mapbox listings pins and popups remain site-specific. */
.listings-map {
  border: 1px solid var(--dg-border);
  background: var(--dg-surface);
}

/* dg-exception: Mapbox listings pins and popups remain site-specific. */
.map-pop-popup .mapboxgl-popup-content {
  padding: 0;
  background: var(--dg-bg);
  border: 1px solid var(--dg-text);
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 16px 34px -16px color-mix(in srgb, var(--dg-primary) 45%, transparent);
  font-family: var(--dg-font-sans);
}

/* dg-exception: Mapbox listings pins and popups remain site-specific. */
.map-pop-popup .mapboxgl-popup-tip {
  display: none;
}

/* dg-exception: Mapbox listings pins and popups remain site-specific. */
.map-pop {
  display: block;
  width: 250px;
  text-decoration: none;
  color: inherit;
}

/* dg-exception: Mapbox listings pins and popups remain site-specific. */
.map-pop__img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--dg-border);
}

/* dg-exception: Mapbox listings pins and popups remain site-specific. */
.map-pop__body {
  padding: 0.65rem 0.8rem 0.75rem;
}

/* dg-exception: Mapbox listings pins and popups remain site-specific. */
.map-pop__title {
  font-family: var(--dg-font-serif);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--dg-text);
}

/* dg-exception: Mapbox listings pins and popups remain site-specific. */
.map-pop__specs {
  font-size: 0.8rem;
  color: var(--dg-text-muted);
  margin-top: 0.15rem;
}

/* dg-exception: Mapbox listings pins and popups remain site-specific. */
.map-pop__price {
  font-family: var(--dg-font-serif);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--dg-action);
  margin-top: 0.3rem;
}

/* dg-exception: Mapbox listings pins and popups remain site-specific. */
.map-pop:hover .map-pop__title {
  color: var(--dg-action);
}

/* dg-exception: Mapbox listings pins and popups remain site-specific. */
.map-price-pin {
  position: relative;
  display: inline-block;
  background: var(--dg-action);
  color: var(--dg-on-action);
  font-family: var(--dg-font-sans);
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 13px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--dg-primary) 45%, transparent);
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

/* dg-exception: Mapbox listings pins and popups remain site-specific. */
.map-price-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 10px;
  height: 10px;
  background: inherit;
  border-radius: 0 0 3px 0;
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 2px 2px 4px color-mix(in srgb, var(--dg-primary) 20%, transparent);
}

/* dg-exception: Mapbox listings pins and popups remain site-specific. */
.map-price-pin:hover,
.map-price-pin.is-active {
  background: var(--dg-action);
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 5px 12px color-mix(in srgb, var(--dg-primary) 50%, transparent);
  z-index: 3;
}

/* dg-exception: Mapbox listings pins and popups remain site-specific. */
.map-amenity-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  height: 1.65rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: var(--dg-surface);
  color: var(--dg-text);
  border: 1.5px solid var(--dg-text);
  box-shadow: 0 2px 6px color-mix(in srgb, var(--dg-primary) 35%, transparent);
  cursor: pointer;
  font-family: var(--dg-font-sans);
  line-height: 1;
}

/* dg-exception: Mapbox listings pins and popups remain site-specific. */
.map-amenity-pin__label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* dg-exception: Mapbox listings pins and popups remain site-specific. */
.map-amenity-pin:hover {
  background: var(--dg-surface);
  transform: scale(1.06);
  z-index: 2;
}

/* dg-exception: Mapbox listings pins and popups remain site-specific. */
.map-amenity-popup .mapboxgl-popup-content {
  padding: 0;
  background: var(--dg-bg);
  border: 1px solid var(--dg-text);
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 12px 24px -14px color-mix(in srgb, var(--dg-primary) 45%, transparent);
  font-family: var(--dg-font-sans);
}

/* dg-exception: Mapbox listings pins and popups remain site-specific. */
.map-amenity-popup .mapboxgl-popup-tip {
  display: none;
}

/* dg-exception: Mapbox listings pins and popups remain site-specific. */
.map-amenity-pop {
  padding: 0.55rem 0.7rem 0.6rem;
  min-width: 7rem;
}

/* dg-exception: Mapbox listings pins and popups remain site-specific. */
.map-amenity-pop__title {
  font-family: var(--dg-font-serif);
  font-weight: 500;
  font-size: 0.92rem;
  line-height: 1.2;
  color: var(--dg-text);
}

/* dg-exception: Mapbox listings pins and popups remain site-specific. */
.map-amenity-pop__specs {
  font-size: 0.78rem;
  color: var(--dg-text-muted);
  margin-top: 0.15rem;
}

/* dg-exception: Insurance scanning animation remains site-specific. */
.lease-signing__processing {
  text-align: center;
  padding: 2.5rem 1.25rem 2rem;
}

/* dg-exception: Insurance scanning animation remains site-specific. */
.lease-signing__processing h2 {
  margin: 1.75rem 0 0.5rem;
}

/* dg-exception: Insurance scanning animation remains site-specific. */
.lease-signing__processing p {
  font-family: var(--dg-font-sans);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 30rem;
  margin: 0 auto 0.5rem;
}

/* dg-exception: Insurance scanning animation remains site-specific. */
.scan {
  position: relative;
  width: 108px;
  height: 138px;
  margin: 0 auto;
}

/* dg-exception: Insurance scanning animation remains site-specific. */
.scan__doc {
  position: absolute;
  inset: 0;
  background: var(--dg-bg);
  border: 1px solid var(--dg-border);
  border-radius: 2px;
  padding: 1.1rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  overflow: hidden;
}

/* dg-exception: Insurance scanning animation remains site-specific. */
.scan__line {
  display: block;
  height: 5px;
  border-radius: 2px;
  background: var(--dg-neutral-tint);
}

/* dg-exception: Insurance scanning animation remains site-specific. */
.scan__line--short {
  width: 58%;
}

/* dg-exception: Insurance scanning animation remains site-specific. */
.scan__beam {
  position: absolute;
  left: -6%;
  width: 112%;
  height: 26px;
  border-radius: 3px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--dg-action) 0%, transparent) 0%, color-mix(in srgb, var(--dg-action) 35%, transparent) 45%, color-mix(in srgb, var(--dg-action) 55%, transparent) 50%, color-mix(in srgb, var(--dg-action) 35%, transparent) 55%, color-mix(in srgb, var(--dg-action) 0%, transparent) 100%);
  box-shadow: 0 0 14px color-mix(in srgb, var(--dg-action) 45%, transparent);
  animation: scan-sweep 2.1s ease-in-out infinite;
}

/* dg-exception: Insurance scanning animation remains site-specific. */
@keyframes scan-sweep {
  0% {
    top: -14px;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  100% {
    top: 124px;
    opacity: 0;
  }
}
/* dg-exception: Insurance scanning animation remains site-specific. */
@media (prefers-reduced-motion: reduce) {
  .scan__beam {
    animation: none;
    top: 50%;
    opacity: 0.5;
  }
}
/* dg-exception: Moov hosted custom elements require fixed field and iframe dimensions. */
.moov-card-field {
  display: block;
  width: 100%;
  margin-bottom: 1.25rem;
}

/* dg-exception: Moov hosted custom elements require fixed field and iframe dimensions. */
.moov-card-field moov-card-link {
  display: block;
  width: 100%;
  background-color: var(--dg-bg);
  border: 1px solid var(--dg-border);
  border-radius: 2px;
  padding: 0.65rem 0.85rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* dg-exception: Moov hosted custom elements require fixed field and iframe dimensions. */
.moov-card-field moov-card-link:focus-within {
  border-color: var(--dg-action);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--dg-action) 15%, transparent);
}

/* dg-exception: Moov hosted custom elements require fixed field and iframe dimensions. */
.moov-card-field .iframeWrapper {
  width: 100% !important;
  max-width: none !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

/* dg-exception: Moov hosted custom elements require fixed field and iframe dimensions. */
@media (max-width: 480px) {
  .moov-card-field moov-card-link {
    padding-left: 0.4rem;
    padding-right: 0.4rem;
  }
}
/* dg-exception: Moov hosted custom elements require fixed field and iframe dimensions. */
.moov-composable-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

/* dg-exception: Moov hosted custom elements require fixed field and iframe dimensions. */
.moov-composable-fields .moov-field-wide {
  grid-column: 1/-1;
}

/* dg-exception: Moov hosted custom elements require fixed field and iframe dimensions. */
.moov-composable-fields [data-moov-payment-target=field],
.moov-composable-fields [data-moov-card-fields-target=field] {
  display: block;
  min-width: 0;
  width: 100%;
  height: 3rem;
  box-sizing: border-box;
  border: 1px solid var(--dg-border);
  border-radius: 3px;
  padding: 0.75rem;
  background: var(--dg-bg);
  color: var(--dg-text);
  font-size: 1rem;
}

/* dg-exception: Moov hosted custom elements require fixed field and iframe dimensions. */
.moov-composable-fields [data-moov-payment-target=field]:has(.focus),
.moov-composable-fields [data-moov-card-fields-target=field]:has(.focus) {
  border-color: var(--dg-action);
}

/* dg-exception: Moov hosted custom elements require fixed field and iframe dimensions. */
.moov-composable-fields--preview .apply-field:nth-last-child(-n+3) .moov-preview-input {
  color: var(--dg-text-muted);
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-group {
  margin-bottom: 1.1rem;
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-q {
  font-family: var(--dg-font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dg-text-muted);
  margin-bottom: 0.45rem;
  display: block;
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-chip {
  position: relative;
  margin: 0;
  cursor: pointer;
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-chip span {
  display: inline-block;
  padding: 0.42rem 0.8rem;
  border: 1px solid var(--dg-border-strong);
  border-radius: 999px;
  font-size: 0.9rem;
  background: var(--dg-bg);
  transition: all 0.15s ease;
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-chip:hover span {
  border-color: var(--dg-action);
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-chip input:checked + span {
  border-color: var(--dg-action);
  background: var(--dg-surface);
  color: var(--dg-text);
  box-shadow: inset 0 0 0 1px var(--dg-action);
  font-weight: 600;
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-chip input:focus-visible + span {
  outline: 2px solid var(--dg-action);
  outline-offset: 2px;
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-stars {
  display: flex;
  gap: 0.15rem;
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-star input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-star {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin: 0;
  cursor: pointer;
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-star span {
  font-size: 2.5rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px var(--dg-text-muted);
  transition: color 0.12s ease;
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-stars:hover .tf-star span {
  color: var(--dg-action);
  -webkit-text-stroke-color: var(--dg-action);
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-star:hover ~ .tf-star span {
  color: transparent;
  -webkit-text-stroke-color: var(--dg-text-muted);
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-stars.is-set .tf-star span {
  color: transparent;
  -webkit-text-stroke-color: var(--dg-text-muted);
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-stars.is-set .tf-star.is-lit span {
  color: var(--dg-action);
  -webkit-text-stroke-color: var(--dg-action);
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-star input:focus-visible + span {
  outline: 2px solid var(--dg-focus);
  outline-offset: 2px;
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-comment {
  width: 100%;
  min-height: 4rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--dg-border-strong);
  background: var(--dg-bg);
  color: inherit;
  font-family: inherit;
  font-size: 0.95rem;
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-comment::placeholder {
  color: var(--dg-text-muted);
  opacity: 1;
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-hint {
  font-size: 0.85rem;
  color: var(--dg-text-muted);
  margin: 0 0 0.45rem;
  line-height: 1.45;
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
#tour-feedback .file-uploader__picker {
  border-color: var(--dg-border-strong);
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-photos {
  display: inline-block;
  margin-top: 0.5rem;
  cursor: pointer;
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-photos input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-photos span {
  display: inline-block;
  padding: 0.42rem 0.8rem;
  border: 1px dashed var(--dg-border);
  border-radius: 999px;
  font-size: 0.9rem;
}

/* dg-exception: Post-tour star ratings and feedback chips remain site-specific. */
.tf-photos:hover span {
  border-color: var(--dg-action);
}

/* dg-exception: short fields share a row as far as the width allows, and stack on a phone. */
.tenants-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: var(--dg-space-4);
}

/* dg-exception: a count needs a few digits, so its field does not stretch across its column. */
.tenants-short-field {
  max-width: 8rem;
}

/* dg-exception: requester-authored notes preserve intentional line breaks. */
.tenants-pre-wrap {
  white-space: pre-wrap;
}

/* dg-exception: user-entered fair rent is a short text field parsed by the existing service; its edge is the strong border so it reads at 3:1. */
.tenants-money-field {
  width: 8rem;
  border: 1px solid var(--dg-border-strong);
}

/* dg-exception: dg-design draws a boxed check as a hairline 18px box. The lock-up step has a renter tick each item off with a thumb, so each row is a 56px target with a 28px box and a visible pressed state. One nested block so the reason covers every rule of the checklist. */
.tour-tick {
  & .dg-check {
    gap: var(--dg-space-3);
    border-width: 2px;
    border-color: var(--dg-text-muted);
  }
  & .dg-check__input, & .tour-tick__mark {
    box-sizing: border-box;
    width: 28px;
    height: 28px;
    border: 2px solid var(--dg-border-strong);
    border-radius: var(--dg-radius-sm);
    background-size: 18px;
  }
  & .dg-check__input:checked {
    border-color: var(--dg-action);
  }
  & .dg-check:active {
    border-color: var(--dg-action);
    background: var(--dg-tint);
  }
  & .dg-check:has(:focus-visible) {
    outline: var(--dg-border-width-focus) solid var(--dg-focus);
    outline-offset: 2px;
  }
  & .tour-tick__mark {
    flex: none;
    background: var(--dg-surface) center/18px no-repeat;
  }
  & .tour-tick__text {
    flex: 1;
  }
  & .tour-tick__photo {
    flex-wrap: wrap;
  }
  & .tour-tick__photo.is-saved {
    border-color: var(--dg-action);
    background: var(--dg-tint);
  }
  & .tour-tick__photo.is-saved .tour-tick__mark {
    border-color: var(--dg-action);
    background-color: var(--dg-action);
    background-image: var(--dg-check-tick);
  }
  & .tour-tick__thumb {
    flex: none;
    width: 64px;
    height: 64px;
    overflow: hidden;
    border: 1px solid var(--dg-border-strong);
    border-radius: var(--dg-radius-sm);
    background: var(--dg-bg);
  }
  & .tour-tick__thumb:not(:has(img)) {
    border-style: dashed;
  }
  & .tour-tick__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  & .tour-tick__camera {
    flex: 1 1 100%;
  }
  & .tour-tick__camera .file-uploader__picker {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }
  & .tour-tick__photo.is-saved .file-uploader__picker {
    border-style: solid;
    border-color: var(--dg-border-strong);
  }
  & .tour-tick__photo:not(.is-saved) .file-uploader__picker {
    border-style: solid;
    border-color: var(--dg-action-fill);
    background: var(--dg-action-fill);
    color: var(--dg-on-action-fill);
  }
}

/* dg-exception: the tour-day steps are read outdoors with one hand. dg-design's task list is a quiet table of rows; here finished steps fold to one dimmed line with a filled check, the current step has a larger title and a full-width 56px action, the panel keeps one surface when the checklist's inputs arrive (public_forms.css would grey it), and a step swaps in with a short fade. One nested block so the reason covers every rule. */
.tour-steps {
  overflow-wrap: anywhere;
  &.dg-card {
    gap: var(--dg-space-3);
    padding-inline: var(--dg-space-4);
  }
  &.dg-card:not(.dg-card--dark):has(input) {
    background: var(--dg-surface);
  }
  & .dg-tasks {
    border-top: 0;
  }
  & .dg-tasks__item {
    scroll-margin-top: var(--dg-space-4);
  }
  & .dg-tasks__item--current {
    border-bottom-color: transparent;
  }
  & .dg-tasks__item--current .dg-tasks__title {
    font: var(--dg-type-h3);
  }
  & .dg-tasks__item--current .dg-tasks__note {
    font: var(--dg-type-body);
  }
  & .dg-tasks__item--current .dg-tasks__panel {
    padding: 0 0 var(--dg-space-4);
  }
  & .dg-tasks__item--current summary {
    cursor: default;
  }
  & .dg-tasks__item:focus {
    outline: none;
  }
  & .dg-tasks__item--current .dg-tasks__chevron, & .dg-tasks__action:empty {
    display: none;
  }
  & .dg-tasks__item--done .dg-tasks__row, & .dg-tasks__item--locked .dg-tasks__row {
    padding-block: var(--dg-space-3);
  }
  & :is(.dg-tasks__item--done, .dg-tasks__item--locked) .dg-tasks__title {
    color: var(--dg-text-muted);
    font: var(--dg-type-ui);
    font-size: 15px;
    font-weight: 400;
  }
  & :is(.dg-tasks__item--done, .dg-tasks__item--locked) .dg-tasks__note {
    font-size: 15px;
  }
  & .dg-tasks__item--locked .dg-tasks__marker {
    border-color: var(--dg-text-muted);
  }
  & .dg-tasks__item--done .dg-tasks__marker {
    background: var(--dg-action);
  }
  & .dg-tasks__item--done .dg-tasks__marker::after {
    background: var(--dg-on-action);
  }
  & .dg-btn {
    box-sizing: border-box;
    min-height: 56px;
    font-size: 1.0625rem;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
  }
  & .tour-tick__camera .dg-btn {
    min-height: 48px;
    font-size: 1rem;
  }
  & .dg-tasks__item.is-finishing .dg-tasks__panel {
    opacity: 0;
    transition: opacity var(--dg-motion-base) var(--dg-motion-ease);
  }
}

/* dg-exception: the current step, and the agent line, are a tinted band with an accent rule that reaches the card's edge. */
.tour-band, .tour-steps .dg-tasks__item--current {
  margin-inline: calc(-1 * var(--dg-space-4));
  padding-inline: calc(var(--dg-space-4) - var(--dg-border-width-accent)) var(--dg-space-4);
  border-left: var(--dg-border-width-accent) solid var(--dg-action);
  background: var(--dg-tint);
}

/* dg-exception: the agent line has no step row to pad it. */
.tour-band {
  padding-block: var(--dg-space-4);
}

/* dg-exception: the lock-up reminder is a plain bulleted list; the task list's nested lists would otherwise draw hollow circles. */
.tour-before {
  list-style: disc;
}

/* dg-exception: the lockbox video control is a 48px row and the vertical video keeps its 9:16 shape at any width. */
.tour-video {
  & .dg-accordion__summary {
    min-height: 48px;
  }
  & iframe {
    display: block;
    aspect-ratio: 9/16;
    width: 100%;
    height: auto;
  }
}

/* dg-exception: the lockbox code is set very large in a bordered box so it reads at arm's length at a door. */
.tour-code {
  box-sizing: border-box;
  padding: var(--dg-space-4);
  border: 2px solid var(--dg-border-strong);
  border-radius: var(--dg-radius-sm);
  background: var(--dg-surface);
  color: var(--dg-text);
  font-size: clamp(2.25rem, 13vw, 3.5rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.16em;
  line-height: 1.1;
  text-align: center;
}

/* dg-exception: the small links under the panel are plain text with a 44px thumb target, which dg-design's 24px text-link size is not. */
.tour-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--dg-space-5);
  margin-top: var(--dg-space-2);
  & a.dg-link {
    min-height: 44px;
  }
}
@media (max-width: 575.98px) {
  .tour-links {
    & > :first-child {
      flex-basis: 100%;
      justify-content: flex-start;
    }
  }
}

/* dg-exception: the tour header's Directions link keeps the same 44px thumb target. */
.tour-day-head {
  overflow-wrap: anywhere;
  & a.dg-link {
    min-height: 44px;
  }
}

/* dg-exception: the fade a step arrives with. */
@keyframes tour-step-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
/* dg-exception: a step that arrives fades in unless the visitor asked for less motion. */
@media (prefers-reduced-motion: no-preference) {
  .tour-steps.is-entering .dg-tasks__item--current {
    animation: tour-step-in var(--dg-motion-base) var(--dg-motion-ease);
  }
}
/* dg-exception: Mapbox controller requires an explicit map viewport. */
.listings-map {
  height: var(--dg-map-height, 70vh);
  min-height: 380px;
}

/* dg-exception: the membership marks exist only as white images (shared with the enterprise
   footer); on the light page footer they are inverted to a muted ink, and shown as-is in dark. */
.tenants-memberships img {
  width: auto;
  height: 26px;
  filter: invert(0.72);
}

/* dg-exception: the white membership marks need no inversion on the dark page. */
[data-theme=dark] .tenants-memberships img {
  filter: none;
  opacity: 0.85;
}

/* dg-exception: the same for the automatic theme when the OS is dark. */
@media (prefers-color-scheme: dark) {
  [data-theme=auto] .tenants-memberships img {
    filter: none;
    opacity: 0.85;
  }
}
/* dg-exception: uploaded tour-photo status changes without a page reload. */
.tenants-success-text {
  color: var(--dg-success);
}

/* dg-exception: uploaded identity images remain bounded beside the intake uploader. */
.tenants-id-preview {
  display: block;
  max-width: min(20rem, 100%);
  max-height: 15rem;
  object-fit: contain;
}

/* dg-exception: the home hero's display line is a full sentence; at display size it wraps to six lines on a phone. */
@media (max-width: 640px) {
  .hero__heading {
    font-size: 32px;
    letter-spacing: var(--dg-type-h1-tracking);
  }
}
/* dg-exception: the site footer's legal links are one evenly spaced, wrapping row. */
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--dg-space-1) var(--dg-space-4);
}

/* dg-exception: below 768px a signed-in resident's portal has its tab bar at the foot of the screen, so the marketing
   footer (wordmark, blurb, store badges, link columns) goes and only the legal row stays. */
@media (max-width: 767.98px) {
  .site-footer.site-footer--portal {
    padding-block: var(--dg-space-4);
  }
  .site-footer--portal .dg-footer__top {
    display: none;
  }
  .site-footer--portal .dg-footer__legal {
    padding-top: 0;
    border-top: 0;
  }
}
/* dg-exception: an approved home is a radio card, so the whole card is the click target. */
.lease-home-choice {
  cursor: pointer;
}

/* dg-exception: the chosen home card takes the action border (its radio is visually hidden). */
.lease-home-choice:has(:checked) {
  border-color: var(--dg-action);
  box-shadow: inset 0 0 0 1px var(--dg-action);
}

/* dg-exception: with the radio hidden, keyboard focus is shown on the card. */
.lease-home-choice:has(:focus-visible) {
  outline: var(--dg-border-width-focus) solid var(--dg-focus);
  outline-offset: 2px;
}

/* dg-exception: the chosen card swaps its "Choose this home" prompt for the Selected badge. */
.lease-home-choice:has(:checked) .lease-home-choice__select,
.lease-home-choice:not(:has(:checked)) .lease-home-choice__selected {
  display: none;
}

/* dg-exception: the household invite link stays off screen until copy-link's clipboard fallback
   marks it is-visible for the applicant to copy by hand. */
.applicant-household__link:not(.is-visible) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* dg-exception: radio-validate marks an unanswered yes/no pair; dg has no fieldset error state. */
.yes-no-pair--error {
  outline: 2px solid var(--dg-danger);
  outline-offset: 6px;
}

/* dg-exception: the payment celebration canvas overlays the viewport while the page reloads. */
.portal-pay-confetti {
  position: fixed;
  inset: 0;
  z-index: 3000;
  pointer-events: none;
}

/* dg-exception: dg-design hides a busy button's label and draws a spinner in ::before, which an
   <input type="submit"> (Rails f.submit, submit_tag) cannot have, so it showed as a blank bar. The
   input keeps its label, which Turbo's data-turbo-submits-with swaps for "Saving...". Upstream
   candidate for dg-design. */
form[aria-busy=true] input.dg-btn--primary[type=submit] {
  -webkit-text-fill-color: currentColor;
}

/* dg-exception: the day and time pickers size to the space the booking form is given (a page, a
   sidebar or a modal), not the screen. Upstream candidate, like every tour-picker rule below. */
.tour-picker {
  container-type: inline-size;
}

/* dg-exception: stacked when narrow: the month, then its times. */
.tour-picker__layout {
  display: grid;
  gap: var(--dg-space-3);
}

/* dg-exception: the month stays button-sized however wide the form is. */
.tour-calendar {
  max-width: 22rem;
}

/* dg-exception: wide enough for the month and two time columns side by side. */
@container (min-width: 36rem) {
  /* dg-exception: with room, the times sit beside the month instead of under it. */
  .tour-picker__layout {
    grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
    gap: var(--dg-space-5);
    align-items: start;
  }
  /* dg-exception: two time columns fit beside the month. */
  .tour-picker .tour-times {
    --dg-choices-cols: 2;
  }
}
/* dg-exception: dg-design has no month calendar; the tour booker's month heading and arrows.
   Upstream candidate, like every tour-calendar rule below. */
.tour-calendar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--dg-space-2);
}

/* dg-exception: the calendar's month name. */
.tour-calendar__title {
  font: var(--dg-type-ui);
  font-weight: 600;
  color: var(--dg-text);
}

/* dg-exception: the previous and next month arrows. */
.tour-calendar__nav {
  width: 40px;
  height: 40px;
  border: 1px solid var(--dg-border);
  border-radius: 50%;
  background: none;
  color: var(--dg-text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

/* dg-exception: an arrow past the bookable months. */
.tour-calendar__nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* dg-exception: the seven-column day grid. */
.tour-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

/* dg-exception: the weekday initials above the grid. */
.tour-calendar__weekday {
  padding-block: 4px;
  color: var(--dg-text-muted);
  font: var(--dg-type-small);
}

/* dg-exception: one day of the month. */
.tour-calendar__day {
  aspect-ratio: 1;
  border: 1px solid var(--dg-border);
  border-radius: 50%;
  background: none;
  color: var(--dg-text);
  font: var(--dg-type-ui);
  cursor: pointer;
}

/* dg-exception: hovering a bookable day. */
.tour-calendar__day:hover:not(:disabled) {
  border-color: var(--dg-action);
}

/* dg-exception: a day with no open times. */
.tour-calendar__day:disabled {
  border-color: transparent;
  color: var(--dg-text-muted);
  opacity: 0.4;
  cursor: default;
}

/* dg-exception: the chosen day. */
.tour-calendar__day[aria-pressed=true] {
  border-color: var(--dg-action-fill);
  background: var(--dg-action-fill);
  color: var(--dg-on-action-fill);
}

/* dg-exception: keyboard focus on a day or an arrow. */
.tour-calendar__day:focus-visible, .tour-calendar__nav:focus-visible {
  outline: var(--dg-border-width-focus) solid var(--dg-focus);
  outline-offset: 2px;
}

/* dg-exception: the time choices are boxed dg-check labels with the radio hidden, so the whole box is the target. */
.tour-times .dg-check {
  position: relative;
  justify-content: center;
  white-space: nowrap;
}

/* dg-exception: the hidden radio covers its box. */
.tour-times .dg-check__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

/* dg-exception: with the radio hidden, keyboard focus is shown on the box. */
.tour-times .dg-check:has(:focus-visible) {
  outline: var(--dg-border-width-focus) solid var(--dg-focus);
  outline-offset: 2px;
}

/* dg-exception: on a phone a text link gets a 44px tap area; the padding is taken back by the margin. */
@media (max-width: 767px) {
  .hero__cta-secondary, .places-foot__link, .app-resume__link {
    padding-block: 10px;
    margin-block: -10px;
  }
}
/* dg-exception: at 320px the owner card's long button wraps inside the card. */
@media (max-width: 359px) {
  .dg-card--accent .dg-btn {
    white-space: normal;
  }
}
