/*
 * Roomies' public pages, design B ("Open doors"): /find-a-roommate/browse and a listing's
 * page, /find-a-roommate/listings/<id>. docs/design/roomies/tokens.css adapted; the numbers are the design's
 * (docs/design/roomies/reference, HANDOFF.md).
 *
 * Unlayered on purpose, like the site's own CSS, which would otherwise beat it (CLAUDE.md,
 * "Traps in the site's CSS"): its h1–h5 sizes and colours, the coral on every link. Classes
 * here outrank those element rules without !important. Only these pages load it.
 */

:root {
  /* Surfaces */
  --rs-paper: #FAF7F3;          /* these pages' background (decision D9) */
  --rs-line: #EDE3DB;           /* hairlines and rings on paper */
  --rs-blush: #FBEBE4;          /* room cards */
  --rs-sky: #E6EDF7;            /* lease takeover cards */
  --rs-coral-tint: #FBE4DA;     /* a value that's set, a chip that's on */
  --rs-sand: #F3EAE3;           /* a value under the pointer */

  /* Brand */
  --rs-navy: #162949;
  --rs-navy-hover: #0E1D36;
  --rs-ink: #12223C;
  --rs-body: #4C4C4C;           /* 8.3:1 on paper */
  --rs-muted: #5B6577;          /* the sentence's linking words, 5.5:1 on paper */
  --rs-coral: #E98D81;          /* fills and large accents only; never small text on light */
  --rs-red: #F65E59;            /* borders and icons only */
  --rs-red-text: #C0302B;       /* error text, 5.7:1 */
  --rs-on-navy: #D6DEEA;        /* secondary text on navy */
  --rs-control-border: #7D8899; /* chips, inputs, outlined buttons: 3.6:1 */
  --rs-control-hover: #F2F5F9;

  /* Arches */
  --rs-arch: 999px 999px 14px 14px;        /* a card's photo */
  --rs-arch-small: 999px 999px 10px 10px;  /* page numbers, the quiz doorway */

  --rs-shadow-panel: 0 18px 44px rgba(18, 34, 60, .14), 0 0 0 1px var(--rs-line);
  --rs-shadow-hover: 0 14px 32px rgba(18, 34, 60, .16);
  --rs-shadow-stamp: 0 6px 14px rgba(18, 34, 60, .18);
  --rs-shadow-sheet: 0 -12px 32px rgba(18, 34, 60, .18);
  --rs-dim: rgba(14, 29, 54, .55);

  /* The sentence: desktop, then tablet and phone below */
  --rs-sentence-size: 34px;
  --rs-sentence-lh: 1.75;
  --rs-value-pad: 2px 10px 6px;
  --rs-value-gap: 6px;
  --rs-value-icon: 18px;
}
@media (max-width: 1023px) {
  :root { --rs-sentence-size: 26px; --rs-value-pad: 2px 8px 5px; --rs-value-gap: 5px; --rs-value-icon: 16px; }
}
@media (max-width: 639px) {
  :root { --rs-sentence-size: 21px; --rs-sentence-lh: 1.8; --rs-value-pad: 1px 6px 4px; --rs-value-gap: 4px; --rs-value-icon: 14px; }
}

body { background-color: var(--rs-paper); }

.rs-page {
  /* The site's header is fixed over the page. */
  padding-top: var(--header-size, 110px);
  font-family: Poppins, sans-serif;
  color: var(--rs-ink);
}
/* No more than an element's weight, so this page's classes set their own margins. */
:where(.rs-page) :is(p, h2, h3) { margin: 0; }
.rs-page :is(a, button, input, select, [tabindex]):focus-visible { outline: 3px solid var(--rs-navy); outline-offset: 2px; }
.rs-icon { flex: none; }

.rs-sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Hero ---------- */
.rs-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--rs-line); }
.rs-hero__arches { position: absolute; right: -160px; bottom: -2px; pointer-events: none; }
@media (max-width: 1099px) { .rs-hero__arches { display: none; } }
.rs-hero__inner { position: relative; max-width: 1200px; margin: 0 auto; padding: 56px 24px 44px; box-sizing: border-box; }
.rs-eyebrow { margin-bottom: 18px; font-size: 12px; font-weight: 600; letter-spacing: .16em; color: var(--rs-body); }
@media (max-width: 639px) {
  .rs-hero__inner { padding: 24px 16px; }
  .rs-eyebrow { margin-bottom: 12px; }
}

/* ---------- The sentence ---------- */
.rs-sentence {
  max-width: 1000px;
  font-family: Syne, Poppins, sans-serif;
  font-weight: 600;
  font-size: var(--rs-sentence-size);
  line-height: var(--rs-sentence-lh);
  color: var(--rs-muted);
  text-wrap: pretty;
  /* Syne's own figures sit at x-height, so its 0 reads as an o. */
  font-variant-numeric: lining-nums;
}
/* A value and the punctuation after it, never apart. */
.rs-keep { white-space: nowrap; }
.rs-value {
  display: inline-flex;
  align-items: center;
  gap: var(--rs-value-gap);
  vertical-align: middle;
  min-height: 44px;
  margin: 0 0 0 1px;
  padding: var(--rs-value-pad);
  border: 0;
  border-radius: 10px 10px 4px 4px;
  background: transparent;
  box-shadow: inset 0 -3px 0 var(--rs-coral);
  font: inherit;
  font-weight: 700;
  line-height: 1.25;
  color: var(--rs-navy);
  cursor: pointer;
}
.rs-value .rs-icon { width: var(--rs-value-icon); height: var(--rs-value-icon); }
.rs-value span { display: inline-flex; }
.rs-value:hover:not([aria-expanded="true"]) { background: var(--rs-sand); }
.rs-value[data-set="true"]:not([aria-expanded="true"]) { background: var(--rs-coral-tint); }
.rs-value[aria-expanded="true"] { background: var(--rs-navy); color: #fff; box-shadow: inset 0 -3px 0 var(--rs-navy); }
/* "pick a city": nothing picked yet. */
.rs-value[data-empty="true"]:not([aria-expanded="true"]) {
  box-shadow: none;
  background-image: linear-gradient(90deg, var(--rs-coral) 50%, transparent 0);
  background-size: 10px 3px;
  background-repeat: repeat-x;
  background-position: bottom;
}
.rs-value[data-invalid="true"]:not([aria-expanded="true"]) { box-shadow: inset 0 -3px 0 var(--rs-red); }
.rs-value__alert { color: var(--rs-red); }
.rs-value[aria-expanded="true"] .rs-value__alert { color: #fff; }

.rs-city-error { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 12px; font-size: 15px; line-height: 1.45; }
.rs-city-error__text { color: var(--rs-red-text); font-weight: 500; }

/* ---------- The editor under the sentence ---------- */
.rs-editor {
  box-sizing: border-box;
  max-width: 640px;
  margin-top: 18px;
  padding: 20px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--rs-shadow-panel);
  font-size: 15px;
  color: var(--rs-ink);
}
.rs-editor__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rs-editor__question { font-size: 16px; font-weight: 600; }
.rs-done {
  flex: none;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--rs-control-hover);
  font: 600 14px/1 Poppins, sans-serif;
  color: var(--rs-ink);
  cursor: pointer;
}
.rs-done:hover { background: #E4E9F0; }
.rs-choices { display: flex; flex-wrap: wrap; gap: 8px; }

.rs-citybox { position: relative; max-width: 480px; }
.rs-citybox__pin { position: absolute; z-index: 1; left: 18px; top: 50%; transform: translateY(-50%); display: flex; color: var(--rs-ink); pointer-events: none; }
.rs-citybox__alert { position: absolute; z-index: 1; right: 16px; top: 50%; transform: translateY(-50%); display: flex; color: var(--rs-red); pointer-events: none; }
.rs-citybox__input,
.rs-citybox gmp-place-autocomplete {
  display: block;
  box-sizing: border-box;
  width: 100%;
  border: 1.5px solid var(--rs-control-border);
  border-radius: 999px;
  background: #fff;
  font: 400 16px/1.5 Poppins, sans-serif;
  color: var(--rs-ink);
  color-scheme: light;
}
.rs-citybox__input { height: 52px; padding: 0 44px 0 48px; }
.rs-citybox__input::placeholder { color: #6B7684; opacity: 1; }
/* Google's box: its insides are a closed shadow root, so only it and its ::part()s can be styled. */
.rs-citybox gmp-place-autocomplete::part(input) { padding: 12px 44px 12px 48px; }
.rs-citybox gmp-place-autocomplete::part(focus-ring) { display: none; }
.rs-citybox gmp-place-autocomplete:focus-within,
.rs-citybox__input:focus-visible { border-color: var(--rs-navy); outline: 0; box-shadow: 0 0 0 1.5px var(--rs-navy); }
.rs-citybox[data-invalid="true"] .rs-citybox__input,
.rs-citybox[data-invalid="true"] gmp-place-autocomplete { border-color: var(--rs-red); }

.rs-rent { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 380px; }
.rs-field { display: flex; flex-direction: column; gap: 6px; }
.rs-field label { font-size: 13px; font-weight: 500; color: var(--rs-body); }
.rs-money { position: relative; display: block; }
.rs-money > span { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--rs-body); }
.rs-money input,
.rs-input {
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  padding: 0 14px 0 30px;
  border: 1px solid var(--rs-control-border);
  border-radius: 999px;
  background: #fff;
  font: 400 16px/1.2 Poppins, sans-serif;
  color: var(--rs-ink);
}
.rs-input { width: auto; padding: 0 16px; }
.rs-money input::placeholder { color: #6B7684; opacity: 1; }
.rs-date { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }

/* ---------- Chips ---------- */
.rs-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--rs-control-border);
  font: 500 14px/1 Poppins, sans-serif;
  color: var(--rs-ink);
  white-space: nowrap;
  cursor: pointer;
}
.rs-chip:hover { background: var(--rs-control-hover); }
.rs-chip[aria-pressed="true"] { background: var(--rs-coral-tint); box-shadow: inset 0 0 0 1.5px var(--rs-coral); }
.rs-chip__tick { display: none; }
.rs-chip[aria-pressed="true"] .rs-chip__tick { display: inline-flex; }
.rs-choice { min-height: 44px; padding: 0 18px; font-size: 15px; }
.rs-choice[aria-pressed="true"] { background: var(--rs-navy); color: #fff; box-shadow: inset 0 0 0 1.5px var(--rs-navy); }

.rs-also { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; }
.rs-also__label { flex: none; margin-right: 4px; font-size: 14px; font-weight: 600; color: var(--rs-body); }
.rs-clear {
  flex: none;
  min-height: 40px;
  padding: 0 6px;
  border: 0;
  background: none;
  font: 600 14px/1 Poppins, sans-serif;
  color: var(--rs-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
  cursor: pointer;
}
@media (max-width: 1023px) { .rs-also { margin-top: 16px; } }
@media (max-width: 639px) {
  .rs-chip, .rs-clear { min-height: 44px; }
  /* Sideways, edge to edge. Relative, or the page grows with it (CLAUDE.md's Tailwind traps). */
  .rs-also {
    position: relative;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: -16px;
    padding: 0 16px 2px;
    scrollbar-width: none;
  }
  .rs-also::-webkit-scrollbar { display: none; }
}

/* ---------- Links and buttons ---------- */
.rs-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--rs-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.rs-link:hover { color: var(--rs-navy-hover); text-decoration-thickness: 2px; }
.rs-link--tall { min-height: 48px; padding: 0 8px; font-size: 15px; }
.rs-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font: 600 16px/1.2 Poppins, sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.rs-button--navy, .rs-button--navy:hover { color: #fff; }
.rs-button--navy { background: var(--rs-navy); }
.rs-button--navy:hover { background: var(--rs-navy-hover); }
.rs-button--outline, .rs-button--outline:hover { color: var(--rs-navy); }
.rs-button--outline { background: #fff; box-shadow: inset 0 0 0 1.5px var(--rs-control-border); }
.rs-button--outline:hover { background: var(--rs-control-hover); }
.rs-button--block { width: 100%; }

/* ---------- Results ---------- */
.rs-results-wrap { max-width: 1200px; margin: 0 auto; padding: 40px 24px 96px; box-sizing: border-box; }
.rs-results__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 28px; }
.rs-count { font-size: 18px; line-height: 1.4; color: var(--rs-body); scroll-margin-top: 130px; }
.rs-count strong { font-weight: 600; color: var(--rs-ink); }
.rs-count:focus { outline: 0; }
.rs-count--updating { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.rs-sort { display: flex; align-items: center; gap: 10px; }
.rs-sort label { font-size: 14px; font-weight: 500; white-space: nowrap; }
.rs-select { position: relative; display: block; }
.rs-select select {
  height: 44px;
  padding: 0 40px 0 18px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--rs-control-border);
  font: 400 14px/1 Poppins, sans-serif;
  color: var(--rs-ink);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.rs-select .rs-icon { position: absolute; right: 14px; top: 13px; pointer-events: none; }
.rs-failed { margin-bottom: 16px; padding: 12px 16px; border-radius: 14px; background: #FDECEA; font-size: 15px; font-weight: 500; color: var(--rs-red-text); }
@media (max-width: 639px) {
  .rs-results-wrap { padding: 20px 16px 56px; }
  .rs-results__head { margin-bottom: 18px; }
  .rs-count { font-size: 15px; }
  .rs-count--updating { margin-bottom: 18px; }
}

/* The grid: 1 column on a phone (rows), then 2, 3 and 4 as the design's minmax(250px) gives at 1200px. */
.rs-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.rs-grid__item { display: flex; min-width: 0; }
.rs-grid__item > .rs-card { flex: 1; }
@media (min-width: 640px) {
  .rs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
  /* A Featured poster is two columns wide: two to a row in four columns, one in two. */
  .rs-grid__item--featured { grid-column: span 2; }
}
@media (min-width: 848px) {
  .rs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* In three, two wide would leave a hole beside each. */
  .rs-grid__item--featured { grid-column: 1 / -1; }
}
@media (min-width: 1120px) {
  .rs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rs-grid__item--featured { grid-column: span 2; }
}

/* ---------- The arch card (§7.1): a grid card, a row on a phone, a navy poster when Featured ---------- */
.rs-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 14px;
  box-sizing: border-box;
  padding: 14px 14px 22px;
  border-radius: 24px;
  font-family: Poppins, sans-serif;
  color: var(--rs-ink);
  text-decoration: none;
  transition: box-shadow .2s ease, transform .2s ease;
}
.rs-card:hover { color: var(--rs-ink); box-shadow: var(--rs-shadow-hover); transform: translateY(-2px); }
.rs-card:active { transform: none; }
.rs-card--room { background: var(--rs-blush); }
.rs-card--lease { background: var(--rs-sky); }
.rs-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; }
.rs-card__tags { display: flex; align-items: center; gap: 8px; }
.rs-pill { padding: 4px 11px; border-radius: 999px; background: #fff; font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.rs-card__featured { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.rs-card__distance { font-size: 12px; font-weight: 500; color: var(--rs-body); white-space: nowrap; }
.rs-card__photo { position: relative; display: block; }
.rs-card__arch { display: block; aspect-ratio: 1 / 1; border-radius: var(--rs-arch); overflow: hidden; background: #fff; }
.rs-card__arch img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.rs-card:hover .rs-card__arch img { transform: scale(1.03); }
.rs-card__initial {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  box-sizing: border-box;
  height: 100%;
  padding-bottom: 18%;
  font-size: 88px;
  font-weight: 600;
  line-height: 1;
  color: var(--rs-navy);
}
.rs-card__body { display: flex; flex-direction: column; gap: 4px; padding: 8px 4px 0; }
.rs-card__title { font-family: Poppins, sans-serif; font-size: 21px; font-weight: 600; line-height: 1.25; color: inherit; }
.rs-card__line { display: block; font-size: 14px; line-height: 1.45; color: var(--rs-body); }
/* Each look's own parts. */
.rs-card__inline-price,
.rs-card__line-distance,
.rs-card__cta { display: none; }

.rs-stamp {
  position: absolute;
  right: -4px;
  bottom: -14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: var(--rs-coral);
  color: var(--rs-ink);
  line-height: 1.15;
  box-shadow: var(--rs-shadow-stamp);
  transform: rotate(-8deg);
}
.rs-stamp b { font: 700 17px/1.15 Poppins, sans-serif; }
.rs-stamp small { font: 500 11px/1.15 Poppins, sans-serif; }

/* Featured: navy. */
.rs-card--featured { background: var(--rs-navy); color: #fff; }
.rs-card--featured:hover { color: #fff; }
.rs-page .rs-card--featured:focus-visible { outline-color: var(--rs-coral); }
.rs-card--featured .rs-pill { background: rgba(255, 255, 255, .14); }
.rs-card--featured .rs-card__distance,
.rs-card--featured .rs-card__line { color: var(--rs-on-navy); }
.rs-card--featured .rs-card__arch { background: #22365A; }
.rs-card--featured .rs-card__initial { color: #fff; }

@media (max-width: 639px) {
  /* A row: the arch on the left, the price in the first line. */
  .rs-card:not(.rs-card--featured) {
    grid-template-columns: 108px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "photo head" "photo body";
    gap: 0 14px;
    padding: 12px;
    border-radius: 22px;
  }
  .rs-card:not(.rs-card--featured) .rs-card__head { grid-area: head; padding: 4px 2px 0; }
  .rs-card:not(.rs-card--featured) .rs-card__photo { grid-area: photo; }
  .rs-card:not(.rs-card--featured) .rs-card__arch { width: 108px; height: 136px; aspect-ratio: auto; border-radius: 999px 999px 12px 12px; }
  .rs-card:not(.rs-card--featured) .rs-card__initial { padding-bottom: 22px; font-size: 48px; }
  .rs-card:not(.rs-card--featured) .rs-stamp { display: none; }
  .rs-card:not(.rs-card--featured) .rs-card__body { grid-area: body; padding: 6px 2px 4px; }
  .rs-card:not(.rs-card--featured) .rs-card__title { font-size: 18px; }
  .rs-card:not(.rs-card--featured) .rs-card__inline-price { display: inline; }
  .rs-card:not(.rs-card--featured) .rs-card__inline-price strong { font-weight: 700; color: var(--rs-ink); }
  .rs-card:not(.rs-card--featured) .rs-card__line + .rs-card__line { font-size: 13px; }
  .rs-card:not(.rs-card--featured) .rs-pill { padding: 3px 10px; }
  /* Featured on a phone: the grid card in navy, its arch 4:3. */
  .rs-card--featured .rs-card__arch { aspect-ratio: 4 / 3; }
}

@media (min-width: 640px) {
  /* Featured past a phone: the wide poster, the arch the card's full height. */
  .rs-card--featured {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    grid-template-rows: auto auto 1fr;
    grid-template-areas: "photo head" "photo body" "photo cta";
    gap: 12px 28px;
    padding: 16px 28px 16px 16px;
    border-radius: 28px;
  }
  .rs-card--featured .rs-card__head { grid-area: head; justify-content: flex-start; padding-top: 18px; }
  .rs-card--featured .rs-card__tags { gap: 10px; }
  .rs-card--featured .rs-card__distance { display: none; }
  .rs-card--featured .rs-card__photo { grid-area: photo; min-height: 360px; }
  .rs-card--featured .rs-card__arch { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 999px 999px 18px 18px; }
  .rs-card--featured .rs-card__initial { align-items: center; padding-bottom: 0; font-size: 96px; }
  .rs-card--featured .rs-stamp { right: -22px; bottom: 28px; width: 92px; height: 92px; box-shadow: 0 8px 18px rgba(0, 0, 0, .25); }
  .rs-card--featured .rs-stamp b { font-size: 20px; }
  .rs-card--featured .rs-stamp small { font-size: 12px; }
  .rs-card--featured .rs-card__body { grid-area: body; gap: 12px; padding: 0; }
  .rs-card--featured .rs-card__title { margin-top: 4px; font-size: 32px; line-height: 1.15; }
  .rs-card--featured .rs-card__line { font-size: 15px; line-height: 1.5; }
  .rs-card--featured .rs-card__line-distance { display: inline; }
  .rs-card--featured .rs-card__cta { grid-area: cta; align-self: end; display: inline-flex; align-items: center; gap: 8px; padding-bottom: 10px; font-size: 15px; font-weight: 600; }
  .rs-card--featured .rs-card__cta .rs-icon { color: var(--rs-coral); }
}

/* ---------- The quiz's doorway among the cards (§5.10) ---------- */
.rs-doorway {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  box-sizing: border-box;
  min-width: 0;
  padding: 28px 24px;
  border: 2px dashed #E2C9BE;
  border-radius: 24px;
  text-align: center;
}
.rs-doorway__arch {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 120px;
  height: 150px;
  border: 2px dashed var(--rs-coral);
  border-radius: var(--rs-arch-small);
  background: #FFF6F2;
  color: var(--rs-navy);
}
.rs-doorway__text { display: flex; flex-direction: column; gap: 6px; }
.rs-doorway__title { font-size: 18px; font-weight: 600; line-height: 1.3; }
.rs-doorway__line { font-size: 15px; line-height: 1.5; color: var(--rs-body); }
@media (max-width: 639px) {
  .rs-doorway { flex-direction: row; padding: 16px; text-align: left; }
  .rs-doorway__arch { width: 72px; height: 90px; }
  .rs-doorway--wide { display: none; }
}
@media (min-width: 640px) { .rs-doorway--phone { display: none; } }

/* ---------- Pages (§5.11) ---------- */
.rs-pages { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 56px; }
.rs-pages__list { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.rs-pages__arch,
.rs-pages__step {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--rs-control-border);
  color: var(--rs-ink);
  text-decoration: none;
}
.rs-pages__arch { width: 48px; height: 58px; padding-top: 6px; border-radius: var(--rs-arch-small); font-size: 16px; font-weight: 500; }
.rs-pages__arch[aria-current="page"] { background: var(--rs-navy); box-shadow: none; color: #fff; font-weight: 600; }
.rs-pages__step { gap: 6px; height: 48px; padding: 0 18px 0 22px; border-radius: 999px; font-size: 15px; font-weight: 600; }
.rs-pages__step:first-child { padding: 0 22px 0 18px; }
.rs-pages__arch:not([aria-current="page"]):hover,
.rs-pages__step:hover { background: var(--rs-control-hover); color: var(--rs-ink); }
.rs-pages__gap { align-self: center; padding: 0 4px; color: var(--rs-body); }
.rs-pages__showing { font-size: 14px; color: var(--rs-body); }

/* ---------- Before a place is picked (§5.6) ---------- */
.rs-start {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 56px 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--rs-line);
  text-align: center;
}
.rs-start__arch,
.rs-none__arch {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 72px;
  height: 90px;
  margin-bottom: 6px;
  border-radius: var(--rs-arch-small);
}
.rs-start__arch { background: var(--rs-blush); color: var(--rs-navy); }
.rs-start__title,
.rs-none__title { font-family: Poppins, sans-serif; font-size: 24px; font-weight: 600; line-height: 1.3; color: var(--rs-ink); }
.rs-start__title:focus,
.rs-none__title:focus { outline: 0; }
.rs-start__text { max-width: 440px; font-size: 16px; line-height: 1.55; color: var(--rs-body); }
.rs-start__tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 620px; margin: 14px 0 6px; text-align: left; }
.rs-start__tile { display: flex; align-items: flex-start; gap: 14px; }
.rs-start__icon { flex: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; color: var(--rs-navy); }
.rs-start__icon--room { background: var(--rs-blush); }
.rs-start__icon--lease { background: var(--rs-sky); }
.rs-start__tile-title { font-family: Poppins, sans-serif; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--rs-ink); }
.rs-start__tile-text { font-size: 14px; line-height: 1.5; color: var(--rs-body); }
.rs-start__quiz { font-size: 15px; color: var(--rs-body); }
@media (max-width: 639px) {
  .rs-start { padding: 36px 20px; }
  .rs-start__tiles { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

/* ---------- No places (§5.8) ---------- */
.rs-none {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  max-width: 840px;
  padding: 40px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--rs-line);
}
.rs-none__arch { border: 2px dashed var(--rs-coral); background: #FFF6F2; }
.rs-none__text { font-size: 16px; line-height: 1.55; color: var(--rs-body); }
.rs-none__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.rs-none__quiz { align-self: stretch; margin-top: 14px; padding-top: 20px; border-top: 1px solid var(--rs-line); font-size: 15px; color: var(--rs-body); }
@media (max-width: 639px) {
  .rs-none { padding: 28px 20px; }
  .rs-none__actions { flex-direction: column; align-self: stretch; }
}

/* ---------- Loading (§5.7) ---------- */
.rs-skeleton { display: flex; flex-direction: column; gap: 14px; padding: 14px 14px 22px; border-radius: 24px; background: #F7F1EC; }
.rs-skeleton__arch { display: block; aspect-ratio: 1 / 1; margin-top: 40px; border-radius: var(--rs-arch); }
.rs-skeleton__bar { display: block; width: 70%; height: 20px; border-radius: 10px; }
.rs-skeleton__bar--short { width: 55%; height: 14px; }
.rs-skeleton__bar--shorter { width: 40%; height: 14px; }
.rs-skel {
  background: linear-gradient(90deg, #EDE3DB 0, #F7F1EC 40%, #EDE3DB 80%);
  background-size: 900px 100%;
  animation: rs-shimmer 1.4s linear infinite;
}
@keyframes rs-shimmer { from { background-position: -450px 0; } to { background-position: 450px 0; } }
.rs-spin { animation: rs-spin .9s linear infinite; transform-origin: center; }
@keyframes rs-spin { to { transform: rotate(360deg); } }
@media (max-width: 639px) {
  .rs-skeleton { display: grid; grid-template-columns: 108px minmax(0, 1fr); grid-template-rows: repeat(3, auto) 1fr; gap: 10px 14px; padding: 12px; border-radius: 22px; }
  .rs-skeleton__arch { grid-row: 1 / -1; width: 108px; height: 136px; margin: 0; aspect-ratio: auto; border-radius: 999px 999px 12px 12px; }
  .rs-skeleton__bar { width: 80%; margin-top: 6px; }
  .rs-skeleton--past-phone { display: none; }
}

/* ---------- The phone's bar and edit sheet (§5.12) ---------- */
.rs-stickybar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* Under the site's header (1030), which covers it when it comes back. */
  z-index: 1020;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  min-height: 60px;
  padding: 8px 16px;
  border: 0;
  border-bottom: 1px solid var(--rs-line);
  background: var(--rs-paper);
  box-shadow: 0 4px 12px rgba(18, 34, 60, .06);
  font: 500 15px/1.3 Poppins, sans-serif;
  color: var(--rs-ink);
  text-align: left;
  cursor: pointer;
}
.rs-stickybar__where { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rs-stickybar__where > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-stickybar__edit { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--rs-navy); color: #fff; font-size: 14px; font-weight: 600; }

.rs-dim { position: fixed; inset: 0; z-index: 1040; background: var(--rs-dim); }
.rs-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  /* Over the site's header (1030). */
  z-index: 1041;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 24px);
  border-radius: 24px 24px 0 0;
  background: var(--rs-paper);
  box-shadow: var(--rs-shadow-sheet);
  overflow: hidden;
}
.rs-sheet__top { padding: 0 16px; }
.rs-sheet__handle { display: flex; justify-content: center; padding: 10px 0 8px; cursor: grab; touch-action: none; }
.rs-sheet__handle span { width: 40px; height: 4px; border-radius: 2px; background: #C9BDB3; }
.rs-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rs-sheet__title { font-family: Poppins, sans-serif; font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--rs-ink); }
.rs-sheet__title:focus { outline: 0; }
.rs-sheet__close { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 999px; background: #fff; color: var(--rs-ink); cursor: pointer; }
.rs-sheet__body { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 16px 18px; }
.rs-sheet__body .rs-editor { max-width: none; margin-top: 12px; }
.rs-sheet__foot { padding: 14px 16px 18px; border-top: 1px solid var(--rs-line); background: #fff; }

/* ---------- A listing's page (§6) ---------- */
.rs-listing__inner { max-width: 1200px; margin: 0 auto; padding: 24px 24px 96px; box-sizing: border-box; }
.rs-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--rs-navy); text-decoration: underline; text-underline-offset: 4px; }
.rs-back:hover { color: var(--rs-navy-hover); text-decoration-thickness: 2px; }
.rs-listing__columns { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 64px; margin-top: 20px; }
.rs-listing__main { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 40px; }
.rs-listing__intro { display: flex; flex-direction: column; gap: 14px; }
.rs-listing__pills { display: flex; flex-wrap: wrap; gap: 8px; }
.rs-listing__pills .rs-pill { padding: 5px 12px; font-size: 13px; }
.rs-pill--room { background: var(--rs-blush); }
.rs-pill--lease { background: var(--rs-sky); }
.rs-listing__pills .rs-pill--place { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; white-space: normal; }
.rs-listing__title {
  font-family: Syne, Poppins, sans-serif;
  font-weight: 700;
  font-size: 72px;
  line-height: 1.02;
  letter-spacing: -.02em;
  color: var(--rs-ink);
  font-variant-numeric: lining-nums;
}
.rs-listing__summary { font-size: 20px; line-height: 1.55; color: var(--rs-ink); }
.rs-label { margin-bottom: 14px; font-family: Poppins, sans-serif; font-size: 12px; font-weight: 600; letter-spacing: .16em; line-height: 1.4; color: var(--rs-body); }

/* The gallery: sticky beside the words on a wide screen, above them otherwise. */
.rs-gallery { flex: 1 1 400px; max-width: 500px; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 1024px) { .rs-gallery { position: sticky; top: 24px; } }
.rs-gallery__stage { position: relative; touch-action: pan-y; }
.rs-gallery__main {
  display: block;
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 0;
  border-radius: 999px 999px 24px 24px;
  overflow: hidden;
  background: #fff;
  cursor: zoom-in;
}
.rs-gallery__main img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rs-gallery__main--empty { display: flex; align-items: flex-end; justify-content: center; padding-bottom: 22%; font-size: 140px; font-weight: 600; line-height: 1; color: var(--rs-navy); cursor: default; }
.rs-stamp--listing { right: -28px; bottom: 44px; width: 116px; height: 116px; box-shadow: 0 10px 22px rgba(18, 34, 60, .2); }
.rs-stamp--listing b { font-size: 27px; }
.rs-stamp--listing small { font-size: 13px; }
.rs-gallery__count { position: absolute; left: 14px; bottom: 14px; display: none; padding: 4px 10px; border-radius: 999px; background: rgba(14, 29, 54, .8); color: #fff; font-size: 13px; font-weight: 500; }
.rs-gallery__step {
  position: absolute;
  top: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 4px 12px rgba(18, 34, 60, .18);
  color: var(--rs-ink);
  transform: translateY(-50%);
  cursor: pointer;
}
.rs-gallery__step--previous { left: 8px; }
.rs-gallery__step--next { right: 8px; }
.rs-gallery__thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.rs-gallery__thumb { display: block; width: 64px; height: 80px; padding: 0; border: 0; border-radius: var(--rs-arch-small); overflow: hidden; background: #fff; cursor: pointer; }
.rs-gallery__thumb[aria-current="true"] { box-shadow: 0 0 0 3px var(--rs-paper), 0 0 0 5px var(--rs-navy); }
.rs-gallery__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rs-gallery__thumb:hover img { filter: brightness(.93); }

/* THE DEAL: big value over its caption. The caption is the term (dt), so it comes first. */
.rs-deal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.rs-deal__tile { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 4px; padding: 18px 20px; border-radius: 20px; background: #fff; }
.rs-deal dt { font-size: 14px; font-weight: 400; line-height: 1.4; color: var(--rs-body); }
.rs-deal dd { margin: 0; font-size: 32px; font-weight: 600; line-height: 1.15; color: var(--rs-ink); }

.rs-household { display: flex; align-items: flex-start; gap: 18px; padding: 24px; border-radius: 24px; background: var(--rs-blush); }
.rs-household__initial {
  flex: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  box-sizing: border-box;
  width: 52px;
  height: 64px;
  padding-bottom: 10px;
  border-radius: var(--rs-arch-small);
  background: var(--rs-navy);
  color: #fff;
  font-size: 22px;
  font-weight: 600;
}
.rs-household__words { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rs-household__sentence { font-size: 19px; font-weight: 500; line-height: 1.5; }
.rs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rs-fact { padding: 6px 12px; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 500; }
.rs-feature { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: #fff; font-size: 15px; font-weight: 500; }
.rs-feature .rs-icon { color: var(--rs-navy); }

/* Community approval: green when given; never red, as not yet isn't a fault. */
.rs-approval { display: flex; align-items: flex-start; gap: 14px; padding: 20px 22px; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px var(--rs-line); }
.rs-approval--yes { background: #F1F6EA; box-shadow: 0 0 0 1px #D3E2BF; }
.rs-approval__heading { font-size: 17px; font-weight: 600; line-height: 1.4; }
.rs-approval__text { font-size: 15px; line-height: 1.5; color: var(--rs-body); }

.rs-contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 26px 28px; border-radius: 24px; background: #fff; box-shadow: 0 0 0 1px var(--rs-line); }
.rs-contact__title { font-size: 22px; font-weight: 600; line-height: 1.3; }
.rs-contact__text { margin-top: 4px; font-size: 15px; color: var(--rs-body); }
.rs-message { padding: 0 26px; }
.rs-report { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; color: var(--rs-body); text-decoration: underline; text-underline-offset: 3px; }
.rs-report:hover { color: var(--rs-ink); }
.rs-bar { display: none; }

@media (max-width: 1023px) { .rs-listing__title { font-size: 56px; } }
@media (max-width: 639px) {
  .rs-listing__inner { padding: 4px 16px 32px; }
  .rs-listing__columns { gap: 28px; margin-top: 8px; }
  .rs-listing__main { gap: 32px; }
  .rs-gallery { max-width: 100%; }
  .rs-stamp--listing { right: 10px; width: 96px; height: 96px; }
  .rs-stamp--listing b { font-size: 22px; }
  .rs-gallery__count { display: inline-block; }
  .rs-gallery__step { display: flex; }
  .rs-gallery__thumb { width: 56px; height: 70px; }
  .rs-listing__title { font-size: 44px; }
  .rs-listing__summary { font-size: 17px; }
  .rs-deal__tile { padding: 16px; }
  .rs-deal dd { font-size: 26px; }
  .rs-household { padding: 20px; }
  .rs-household__sentence { font-size: 17px; }
  /* The contact card becomes a bar at the foot of the screen. */
  .rs-contact { display: none; }
  /* No Message to put in a bar: the card stays, saying why. */
  .rs-contact--shut { display: flex; padding: 22px 20px; }
  .rs-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    /* Under the site's header (1030); the dialogs are in the top layer. */
    z-index: 1010;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--rs-line);
    background: #fff;
    box-shadow: 0 -6px 20px rgba(18, 34, 60, .08);
  }
  .rs-bar__words { min-width: 0; }
  .rs-bar__price { font-size: 18px; font-weight: 600; }
  .rs-bar__price span { font-size: 14px; font-weight: 400; color: var(--rs-body); }
  .rs-bar__line { font-size: 12px; color: var(--rs-body); }
  .rs-bar .rs-message { flex: none; padding: 0 22px; }
  /* Room for the bar under the footer's last line. */
  body:has(.rs-bar) #footer { padding-bottom: 88px; }
}

/* ---------- The Message dialog (§6.5) ---------- */
.rs-dialog {
  box-sizing: border-box;
  width: calc(100% - 32px);
  max-width: 440px;
  /* The browser centres a modal dialog with auto margins, which Tailwind's reset takes away. */
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: var(--rs-paper);
  box-shadow: 0 24px 60px rgba(14, 29, 54, .3);
  color: var(--rs-ink);
  font-family: Poppins, sans-serif;
}
.rs-dialog::backdrop { background: var(--rs-dim); }
.rs-dialog__panel { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 32px 28px 28px; text-align: center; }
.rs-dialog__close { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--rs-ink); cursor: pointer; }
.rs-dialog__close:hover { background: var(--rs-control-hover); }
.rs-dialog__arch { display: flex; align-items: flex-end; justify-content: center; width: 88px; height: 110px; border-radius: var(--rs-arch); overflow: hidden; background: #fff; }
.rs-dialog__arch img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rs-dialog__arch span { padding-bottom: 14px; font-size: 40px; font-weight: 600; line-height: 1; color: var(--rs-navy); }
.rs-dialog__title { font-family: Poppins, sans-serif; font-size: 22px; font-weight: 600; line-height: 1.3; color: var(--rs-ink); }
.rs-dialog__title:focus { outline: 0; }
.rs-dialog__text { font-size: 15px; line-height: 1.6; color: var(--rs-body); }
.rs-dialog__actions { align-self: stretch; display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.rs-dialog__actions .rs-button { padding: 12px 16px; }
.rs-button--navy-ring { box-shadow: inset 0 0 0 1.5px var(--rs-navy); }
/* The page behind a dialog stays where it is. */
body:has(dialog[open]) { overflow: hidden; }

/* ---------- The photo viewer ---------- */
.rs-viewer {
  box-sizing: border-box;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(14, 29, 54, .96);
  color: #fff;
  overflow: hidden;
}
.rs-viewer[open] { display: flex; align-items: center; justify-content: center; }
.rs-viewer::backdrop { background: transparent; }
.rs-viewer__photo { display: block; max-width: calc(100% - 176px); max-height: calc(100% - 128px); border-radius: 12px; object-fit: contain; }
.rs-viewer__close,
.rs-viewer__step {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  cursor: pointer;
}
.rs-viewer__close:hover, .rs-viewer__step:hover { background: rgba(255, 255, 255, .22); }
.rs-viewer__close { top: 16px; right: 16px; width: 48px; height: 48px; }
.rs-viewer__step { top: 50%; width: 56px; height: 56px; transform: translateY(-50%); }
.rs-viewer__step--previous { left: 24px; }
.rs-viewer__step--next { right: 24px; }
.rs-viewer__count { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); font-size: 15px; color: var(--rs-on-navy); }
.rs-page .rs-viewer :is(button):focus-visible { outline-color: var(--rs-coral); }
@media (max-width: 639px) {
  .rs-viewer__photo { max-width: 100%; max-height: calc(100% - 176px); border-radius: 0; }
  .rs-viewer__step { top: auto; bottom: 16px; transform: none; }
  .rs-viewer__step--previous { left: 16px; }
  .rs-viewer__step--next { right: 16px; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .rs-page *, .rs-page *::before, .rs-page *::after { transition: none !important; animation: none !important; }
  .rs-card:hover, .rs-card:hover .rs-card__arch img { transform: none; }
}
