/* November 2 alignment corrections. Loaded after global alignment and legacy route CSS. */
@media screen {
  body[data-route="/residents"] .residents-page .residents-hero {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 64px;
    align-items: center;
    padding-block: 96px;
  }

  body[data-route="/residents"] .residents-page .residents-hero-copy {
    container-type: inline-size;
    min-width: 0;
    align-self: stretch;
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 24px;
  }

  body[data-route="/residents"] .residents-page .residents-hero-copy > * {
    margin: 0;
  }

  body[data-route="/residents"] .residents-page .resident-headline-phrase {
    display: inline-block;
  }

  body[data-route="/residents"] .residents-page .section {
    padding-block: 96px;
  }

  body[data-route="/residents"] .residents-page .section-heading {
    container-type: inline-size;
    width: 100%;
    max-width: 960px;
    margin-bottom: 32px;
  }

  body[data-route="/residents"] .residents-page .band .section-heading {
    max-width: 960px;
  }

  body[data-route="/residents"] .residents-page .section-heading .eyebrow {
    margin-bottom: 24px;
  }

  body[data-route="/residents"] .residents-page .section-heading .body-large {
    margin-top: 24px;
    max-width: 68ch;
  }

  body[data-route="/residents"] .residents-page p {
    max-width: 68ch;
    line-height: 1.5;
    text-wrap: pretty;
  }

  body[data-route="/residents"] .residents-page :is(h1, h2, h3) {
    text-wrap: balance;
  }

  /* Both grid cells stretch to the same row; shorter copy remains vertically centered. */
  body[data-route="/residents"] .residents-page .resident-hero-visual {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
    align-self: stretch;
    aspect-ratio: 3 / 2;
    border-radius: 24px;
  }

  body[data-route="/residents"] .residents-page .resident-interior {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    border-radius: 24px;
  }

  body[data-route="/residents"] .residents-page .resident-interior img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  body[data-route="/residents"] .residents-page .resident-bubble {
    padding: 8px 16px;
    border-radius: 24px;
  }

  /* A shared title track and flexible paragraph track align all six benefit cards. */
  body[data-route="/residents"] .residents-page .resident-benefits .cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 24px;
    margin-top: 0;
    align-items: stretch;
  }

  body[data-route="/residents"] .residents-page .resident-benefits .card {
    display: grid;
    grid-row: auto;
    grid-template-rows: 32px minmax(3.66em, auto) 1fr;
    align-content: start;
    align-items: start;
    gap: 16px;
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: 32px;
    border-radius: 24px;
  }

  body[data-route="/residents"] .residents-page .resident-benefits .card-top {
    margin: 0;
    align-items: start;
  }

  body[data-route="/residents"] .residents-page .resident-benefits .card .icon {
    width: 24px;
    height: 24px;
  }

  body[data-route="/residents"] .residents-page .resident-benefits .card h3 {
    margin: 0;
    min-height: 3.66em;
    font-size: var(--type-card);
    line-height: 1.22;
    letter-spacing: normal;
    white-space: normal;
  }

  body[data-route="/residents"] .residents-page .resident-benefits .card p {
    margin: 0;
    min-height: 0;
    max-width: 68ch;
    font-size: var(--type-card-body);
    line-height: 1.5;
  }

  body[data-route="/residents"] .residents-page :is(.day-scenes, .lifestyle-scenes) {
    display: grid;
    grid-auto-rows: 1fr;
    gap: 24px;
    align-items: stretch;
  }

  body[data-route="/residents"] .residents-page .day-scenes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body[data-route="/residents"] .residents-page .lifestyle-scenes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-route="/residents"] .residents-page :is(.day-scene, .lifestyle-scene) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    gap: 24px;
    min-width: 0;
    padding: 24px;
    border-radius: 24px;
    align-items: stretch;
  }

  body[data-route="/residents"] .residents-page :is(.day-scene, .lifestyle-scene) figure {
    display: grid;
    place-items: center;
    aspect-ratio: 3 / 2;
    min-width: 0;
    margin: 0;
    border-radius: 24px;
  }

  body[data-route="/residents"] .residents-page :is(.day-scene-art, .lifestyle-scene-art) {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
  }

  body[data-route="/residents"] .residents-page .day-scene-copy {
    display: grid;
    grid-template-rows: minmax(3.66em, auto) 1fr;
    gap: 16px;
    align-items: start;
  }

  body[data-route="/residents"] .residents-page :is(.day-scene, .lifestyle-scene) h3 {
    margin: 0;
    line-height: 1.22;
  }

  body[data-route="/residents"] .residents-page .day-scene h3 {
    min-height: 3.66em;
  }

  body[data-route="/residents"] .residents-page .day-scene p {
    margin: 0;
    font-size: var(--type-body);
    line-height: 1.5;
  }

  body[data-route="/residents"] .residents-page .lifestyle-copy {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 24px;
    align-items: start;
  }

  body[data-route="/residents"] .residents-page .lifestyle-dialogue {
    gap: 16px;
  }

  body[data-route="/residents"] .residents-page .lifestyle-dialogue p {
    padding: 16px;
    border-radius: 24px;
    font-size: var(--type-body);
    line-height: 1.5;
  }

  /* Platform and assistant marks use the same tile and contained image box. */
  body[data-route="/residents"] .residents-page .resident-logo-groups {
    width: min(100%, 576px);
    margin-inline: auto;
    gap: 24px;
    justify-items: stretch;
  }

  body[data-route="/residents"] .residents-page :is(.resident-logo-row, .resident-assistant-row) {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 24px;
  }

  body[data-route="/residents"] .residents-page .resident-logo {
    inline-size: 100%;
    block-size: 96px;
    min-width: 0;
    padding: 16px;
    border-radius: 24px;
  }

  body[data-route="/residents"] .residents-page .resident-logo img {
    width: 56px;
    height: 56px;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }
}

@media screen and (max-width: 800px) {
  body[data-route="/residents"] .residents-page .residents-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding-block: 64px;
  }

  body[data-route="/residents"] .residents-page .section {
    padding-block: 64px;
  }

  body[data-route="/residents"] .residents-page .resident-hero-visual {
    order: -1;
    aspect-ratio: 1 / 1;
  }

  body[data-route="/residents"] .residents-page .residents-hero-copy {
    text-align: left;
    gap: 24px;
  }

  /* A square crop leaves four readable notification rows at the 32px phone margins. */
  body[data-route="/residents"] .residents-page .resident-bubble {
    width: max-content;
    max-width: calc(50% - 24px);
    padding: 8px;
    line-height: 1.3;
    white-space: normal;
  }

  body[data-route="/residents"] .residents-page .bubble-light {
    top: 24px;
    left: 16px;
  }

  body[data-route="/residents"] .residents-page .bubble-evening {
    top: 24px;
    right: 16px;
  }

  body[data-route="/residents"] .residents-page .bubble-door {
    top: 32%;
    left: 16px;
  }

  body[data-route="/residents"] .residents-page .bubble-light-response {
    top: 32%;
    left: auto;
    right: 16px;
  }

  body[data-route="/residents"] .residents-page .bubble-thermostat {
    top: 57%;
    left: 16px;
  }

  body[data-route="/residents"] .residents-page .bubble-sink {
    top: 57%;
    left: auto;
    right: 16px;
  }

  body[data-route="/residents"] .residents-page .bubble-welcome {
    top: auto;
    bottom: 24px;
    left: 16px;
    max-width: calc(100% - 32px);
  }

  body[data-route="/residents"] .residents-page :is(.resident-benefits .cards, .day-scenes, .lifestyle-scenes) {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  body[data-route="/residents"] .residents-page .resident-benefits .card {
    padding: 24px;
  }

  body[data-route="/residents"] .residents-page .resident-platforms {
    text-align: left;
  }

  body[data-route="/residents"] .residents-page .resident-platforms :is(.section-heading, .body-large) {
    margin-inline: 0;
  }

  body[data-route="/residents"] .residents-page .resident-logo-groups {
    margin-inline: 0;
    gap: 16px;
  }

  body[data-route="/residents"] .residents-page :is(.resident-logo-row, .resident-assistant-row) {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
}

@media screen and (prefers-reduced-motion: reduce) {
  body[data-route="/residents"] .residents-page .resident-bubble {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* November 4: Residents-only compact rhythm. No typography, palette or asset changes. */
@media screen {
  body[data-route="/residents"] main > .breadcrumbs {
    padding-block: 24px 0;
    margin-block: 0;
  }

  body[data-route="/residents"] .residents-page {
    padding-block: 0;
    margin-block: 0;
  }

  body[data-route="/residents"] .residents-page .residents-hero {
    min-height: 0;
    height: auto;
    grid-template-columns: minmax(0, .42fr) minmax(0, .58fr);
    gap: 56px;
    align-items: center;
    align-content: normal;
    padding-block: 16px 56px;
    margin-block: 0;
  }

  body[data-route="/residents"] .residents-page .residents-hero-copy {
    align-self: center;
    min-height: 0;
    padding-block: 0;
  }

  body[data-route="/residents"] .residents-page .resident-hero-visual {
    width: min(100%, 600px);
    height: auto;
    min-height: 0;
    max-width: 600px;
    aspect-ratio: 3 / 2;
    align-self: center;
    justify-self: end;
    border-radius: 24px;
  }

  body[data-route="/residents"] .residents-page > section:is(.section, .band) {
    min-height: 0;
    height: auto;
    padding-block: 64px;
    margin-block: 0;
  }

  body[data-route="/residents"] .residents-page :is(.resident-days, .resident-platforms) > .container.section {
    padding-block: 0;
    margin-block: 0;
    min-height: 0;
  }

  body[data-route="/residents"] .residents-page .section-heading {
    margin-block: 0 32px;
  }

  body[data-route="/residents"] .residents-page .section-heading .eyebrow {
    margin-block: 0 12px;
  }

  body[data-route="/residents"] .residents-page .section-heading h2 {
    margin-block: 0;
  }

  body[data-route="/residents"] .residents-page .section-heading .body-large {
    margin-block: 16px 0;
    max-width: 640px;
  }

  body[data-route="/residents"] .residents-page .resident-benefits .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 24px;
    margin-block: 0;
  }

  body[data-route="/residents"] .residents-page .resident-benefits .card {
    grid-template-rows: auto auto 1fr;
    min-height: 0;
    padding: 28px;
    gap: 8px;
  }

  body[data-route="/residents"] .residents-page .resident-benefits .card h3 {
    min-height: 0;
    margin-block: 0;
  }

  body[data-route="/residents"] .residents-page .resident-benefits .card p {
    min-height: 0;
    margin-block: 0;
  }

  body[data-route="/residents"] .residents-page .day-scenes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-block: 0;
  }

  body[data-route="/residents"] .residents-page .day-scene {
    min-height: 0;
    padding: 24px;
    gap: 24px;
    grid-template-rows: auto 1fr;
  }

  body[data-route="/residents"] .residents-page .day-scene figure {
    aspect-ratio: auto;
    width: 40px;
    height: 40px;
    min-height: 0;
  }

  body[data-route="/residents"] .residents-page .day-scene-art {
    width: 40px;
    height: 40px;
  }

  body[data-route="/residents"] .residents-page .day-scene-copy {
    grid-template-rows: auto 1fr;
    gap: 8px;
  }

  body[data-route="/residents"] .residents-page .day-scene h3 {
    min-height: 0;
  }

  body[data-route="/residents"] .residents-page .resident-logo-groups {
    width: max-content;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 16px;
  }

  body[data-route="/residents"] .residents-page :is(.resident-logo-row, .resident-assistant-row) {
    grid-template-columns: repeat(3, 112px);
    gap: 16px;
  }

  body[data-route="/residents"] .residents-page .resident-logo {
    width: 112px;
    height: 64px;
    inline-size: 112px;
    block-size: 64px;
    padding: 8px;
  }

  body[data-route="/residents"] .residents-page .resident-logo img {
    width: 44px;
    height: 44px;
    max-width: 100%;
    max-height: 100%;
  }

  body[data-route="/residents"] .residents-page .lifestyle-scenes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-block: 0;
  }

  body[data-route="/residents"] .residents-page .lifestyle-scene {
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    grid-template-rows: auto;
    min-height: 0;
    align-items: center;
    gap: 24px;
  }

  body[data-route="/residents"] .residents-page .lifestyle-scene figure {
    aspect-ratio: auto;
    min-height: 0;
    height: auto;
    max-height: 220px;
  }

  body[data-route="/residents"] .residents-page .lifestyle-scene-art {
    width: 100%;
    height: auto;
    max-height: 220px;
  }

  body[data-route="/residents"] .residents-page .lifestyle-copy {
    grid-template-rows: auto 1fr;
    gap: 16px;
  }
}

@media screen and (min-width: 601px) and (max-width: 1023px) {
  body[data-route="/residents"] .residents-page > section:is(.section, .band) {
    padding-block: 48px;
  }

  body[data-route="/residents"] .residents-page :is(.resident-benefits .cards, .day-scenes) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-route="/residents"] .residents-page .resident-logo-groups {
    grid-template-columns: max-content;
    margin-inline: auto;
  }

  body[data-route="/residents"] .residents-page .lifestyle-scene {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media screen and (max-width: 800px) {
  body[data-route="/residents"] .residents-page .residents-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding-block: 16px 56px;
  }

  body[data-route="/residents"] .residents-page .resident-hero-visual {
    order: -1;
    justify-self: start;
    width: 100%;
    aspect-ratio: 4 / 3;
  }
}

@media screen and (max-width: 600px) {
  body[data-route="/residents"] .residents-page > section:is(.section, .band) {
    padding-block: 40px;
  }

  body[data-route="/residents"] .residents-page :is(.resident-benefits .cards, .day-scenes, .lifestyle-scenes) {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-route="/residents"] .residents-page .resident-logo-groups {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  body[data-route="/residents"] .residents-page :is(.resident-logo-row, .resident-assistant-row) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body[data-route="/residents"] .residents-page .resident-logo {
    inline-size: 100%;
    width: 100%;
  }

  body[data-route="/residents"] .residents-page .lifestyle-scene {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media screen {
  body[data-route="/residents"] .residents-page .lifestyle-copy {
    align-self: stretch;
  }

  body[data-route="/residents"] .residents-page .lifestyle-dialogue {
    align-content: start;
  }
}
