.rs-report-compare-stage3 {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--rs-border, #d5e5e1);
  border-radius: 22px;
  background: linear-gradient(180deg, #fff, #f7fbfa);
  color: var(--rs-ink, #08181d);
  box-shadow: 0 18px 44px rgba(8, 24, 29, .08);
}

.rs-report-compare-head,
.rs-report-compare-picker-head,
.rs-report-compare-workspace-head,
.rs-report-compare-section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.rs-report-compare-head h2 {
  margin: 3px 0 5px;
  font-size: clamp(22px, 3vw, 31px);
  line-height: 1.05;
  letter-spacing: -.045em;
}

.rs-report-compare-head p,
.rs-report-compare-picker-head span,
.rs-report-compare-workspace-head span,
.rs-report-compare-empty span {
  display: block;
  margin: 0;
  color: var(--rs-muted, #627379);
  font-size: 13px;
  line-height: 1.45;
}

.rs-report-compare-kicker {
  display: block;
  color: var(--rs-accent-dark, #117c5d);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.rs-report-compare-refresh,
.rs-report-compare-picker-actions button,
.rs-report-compare-workspace-head button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--rs-border, #d5e5e1);
  border-radius: 13px;
  background: #fff;
  color: var(--rs-ink, #08181d);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.rs-report-compare-refresh:hover,
.rs-report-compare-picker-actions button:hover,
.rs-report-compare-workspace-head button:hover {
  border-color: var(--rs-accent, #42d79f);
  background: #f2fbf7;
}

.rs-report-compare-stage3 button:disabled,
.rs-report-compare-stage3 input:disabled {
  cursor: wait;
  opacity: .55;
}

.rs-report-compare-status {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--rs-muted, #627379);
  font-size: 12px;
  font-weight: 750;
}

.rs-report-compare-status.is-success { color: #167354; }
.rs-report-compare-status.is-warning { color: #895d17; }
.rs-report-compare-status.is-error { color: #a94442; }

.rs-report-compare-empty {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 16px;
  border: 1px dashed var(--rs-border, #d5e5e1);
  border-radius: 17px;
  background: rgba(255, 255, 255, .74);
}

.rs-report-compare-empty > button { justify-self: start; margin-top: 4px; }

.rs-report-compare-picker {
  display: grid;
  gap: 13px;
  margin-top: 13px;
  padding: 15px;
  border: 1px solid var(--rs-border, #d5e5e1);
  border-radius: 18px;
  background: rgba(255, 255, 255, .84);
}

.rs-report-compare-picker-head strong,
.rs-report-compare-workspace-head strong {
  display: block;
  margin-bottom: 3px;
  font-size: 15px;
  letter-spacing: -.02em;
}

.rs-report-compare-picker-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.rs-report-compare-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 9px;
}

.rs-report-compare-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 11px 12px;
  border: 1px solid var(--rs-border, #d5e5e1);
  border-radius: 15px;
  background: #fff;
  cursor: pointer;
}

.rs-report-compare-choice:has(input:checked) {
  border-color: rgba(30, 163, 119, .58);
  background: #effaf5;
  box-shadow: inset 0 0 0 1px rgba(66, 215, 159, .22);
}

.rs-report-compare-choice input {
  width: 18px;
  height: 18px;
  accent-color: var(--rs-accent-dark, #117c5d);
}

.rs-report-compare-choice strong,
.rs-report-compare-choice small {
  display: block;
}

.rs-report-compare-choice strong {
  font-size: 13px;
  line-height: 1.25;
}

.rs-report-compare-choice small {
  margin-top: 4px;
  color: var(--rs-muted, #627379);
  font-size: 11px;
  font-weight: 750;
}

.rs-report-compare-start {
  justify-self: start;
  min-width: 210px;
}

.rs-report-compare-workspace-head {
  align-items: center;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--rs-border, #d5e5e1);
}

.rs-report-compare-notice {
  margin: 12px 0;
  padding: 11px 13px;
  border: 1px solid #d5e5e1;
  border-radius: 14px;
  background: #f2f8f6;
  color: #40565d;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.rs-report-compare-room {
  margin-top: 14px;
  border: 1px solid var(--rs-border, #d5e5e1);
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
}

.rs-report-compare-room-head {
  padding: 13px 15px;
  border-bottom: 1px solid var(--rs-border, #d5e5e1);
  background: linear-gradient(180deg, #fbfdfc, #f4f9f7);
}

.rs-report-compare-room-head h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.035em;
}

.rs-report-compare-scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-color: #a9c9bf #edf4f2;
}

.rs-report-compare-columns {
  display: grid;
  grid-template-columns: repeat(var(--rs-report-compare-columns), minmax(286px, 1fr));
  min-width: calc(var(--rs-report-compare-columns) * 286px);
}

.rs-report-compare-column {
  min-width: 0;
  padding: 0 14px 16px;
  border-right: 1px solid var(--rs-border, #d5e5e1);
}

.rs-report-compare-column:last-child { border-right: 0; }

.rs-report-compare-column-head {
  display: grid;
  gap: 2px;
  margin: 0 -14px 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--rs-border, #d5e5e1);
  background: #f8fbfa;
}

.rs-report-compare-column-head strong {
  font-size: 14px;
  line-height: 1.25;
}

.rs-report-compare-column-head span {
  color: var(--rs-accent-dark, #117c5d);
  font-size: 12px;
  font-weight: 900;
}

.rs-report-compare-column-head small {
  color: var(--rs-muted, #627379);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.rs-report-compare-facts {
  display: grid;
  gap: 8px;
  margin: 0 0 13px;
}

.rs-report-compare-facts > div {
  padding: 10px 11px;
  border: 1px solid #e1ece9;
  border-radius: 13px;
  background: #fbfdfc;
}

.rs-report-compare-facts dt {
  margin-bottom: 3px;
  color: var(--rs-muted, #627379);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.rs-report-compare-facts dd {
  margin: 0;
  color: var(--rs-ink, #08181d);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.rs-report-compare-facts dd > span { color: var(--rs-muted, #627379); }

.rs-report-compare-section-title {
  align-items: center;
  margin-bottom: 8px;
}

.rs-report-compare-section-title strong { font-size: 12px; }
.rs-report-compare-section-title span { color: var(--rs-muted, #627379); font-size: 10px; font-weight: 850; }

.rs-report-compare-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.rs-report-compare-photo {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #dce9e5;
  border-radius: 13px;
  background: #f7faf9;
}

.rs-report-compare-photo-frame {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #edf4f2, #e5efec);
}

.rs-report-compare-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .18s ease;
}

.rs-report-compare-photo.is-ready .rs-report-compare-photo-frame img { opacity: 1; }

.rs-report-compare-photo-frame > span {
  position: absolute;
  inset: auto 8px 8px;
  color: #60747a;
  font-size: 10px;
  font-weight: 850;
  text-align: center;
}

.rs-report-compare-photo.is-ready .rs-report-compare-photo-frame > span { display: none; }
.rs-report-compare-photo.is-unavailable .rs-report-compare-photo-frame { background: #f4f5f4; }

.rs-report-compare-photo figcaption {
  display: grid;
  gap: 3px;
  padding: 8px;
}

.rs-report-compare-photo figcaption strong { font-size: 10px; line-height: 1.3; }
.rs-report-compare-photo figcaption span { color: var(--rs-muted, #627379); font-size: 10px; line-height: 1.35; }

.rs-report-compare-no-photos,
.rs-report-compare-missing {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px dashed #cfdfda;
  border-radius: 13px;
  background: #fafcfb;
  color: var(--rs-muted, #627379);
  font-size: 11px;
  line-height: 1.4;
}

.rs-report-compare-missing strong { color: var(--rs-ink, #08181d); font-size: 12px; }
.rs-report-compare-column.is-missing { background: #fcfdfd; }

.rs-report-compare-landlord {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e0ebe8;
}

.rs-report-compare-landlord > strong { font-size: 12px; }

.rs-report-compare-landlord article {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid #e0ebe8;
  border-radius: 12px;
  background: #fbfdfc;
}

.rs-report-compare-landlord article > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.rs-report-compare-landlord b { font-size: 11px; line-height: 1.35; }
.rs-report-compare-landlord article > div span { color: #166f53; font-size: 10px; font-weight: 900; white-space: nowrap; }
.rs-report-compare-landlord p { margin: 0; color: var(--rs-muted, #627379); font-size: 10px; line-height: 1.4; white-space: pre-wrap; }
.rs-report-compare-landlord small { color: #4a6268; font-size: 9.5px; line-height: 1.35; }

@media (max-width: 720px) {
  .rs-report-compare-stage3 { padding: 14px; border-radius: 18px; }
  .rs-report-compare-head,
  .rs-report-compare-picker-head,
  .rs-report-compare-workspace-head { align-items: stretch; flex-direction: column; }
  .rs-report-compare-refresh,
  .rs-report-compare-workspace-head button { align-self: flex-start; }
  .rs-report-compare-picker-actions { justify-content: flex-start; }
  .rs-report-compare-choices { grid-template-columns: 1fr; }
  .rs-report-compare-start { width: 100%; min-width: 0; }
  .rs-report-compare-columns {
    grid-template-columns: repeat(var(--rs-report-compare-columns), minmax(252px, 1fr));
    min-width: calc(var(--rs-report-compare-columns) * 252px);
  }
  .rs-report-compare-photo-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .rs-report-compare-photo-frame img { transition: none; }
}

/* Stage 3.1: mobile-first aligned comparison workspace. */
.rs-report-compare-stage3,
.rs-report-compare-stage3 #rsReportCompareStage3Body,
.rs-report-compare-stage3 #rsReportCompareStage3Workspace {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.rs-report-compare-stage3 .rs-report-compare-workspace-actions,
.rs-report-compare-stage3 .rs-report-compare-section-actions,
.rs-report-compare-stage3 .rs-report-compare-scroll-tools,
.rs-report-compare-stage3 .rs-report-compare-scroll-tools > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.rs-report-compare-stage3 .rs-report-compare-workspace-actions {
  justify-content: flex-end;
}

.rs-report-compare-stage3 .rs-report-compare-workspace-actions button,
.rs-report-compare-stage3 .rs-report-compare-section-actions button,
.rs-report-compare-stage3 .rs-report-compare-scroll-tools button {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--rs-border, #d5e5e1);
  border-radius: 12px;
  background: #fff;
  color: var(--rs-ink, #08181d);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
}

.rs-report-compare-stage3 .rs-report-compare-section-controls {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--rs-border, #d5e5e1);
  border-radius: 15px;
  background: #fff;
}

.rs-report-compare-stage3 .rs-report-compare-section-controls summary {
  min-height: 28px;
  color: var(--rs-ink, #08181d);
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
  touch-action: manipulation;
}

.rs-report-compare-stage3 .rs-report-compare-section-controls p {
  margin: 5px 0 10px;
  color: var(--rs-muted, #627379);
  font-size: 11px;
  line-height: 1.45;
}

.rs-report-compare-stage3 .rs-report-compare-section-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.rs-report-compare-stage3 .rs-report-compare-section-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid #dce9e5;
  border-radius: 11px;
  background: #f9fcfb;
  color: var(--rs-ink, #08181d);
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  touch-action: manipulation;
}

.rs-report-compare-stage3 .rs-report-compare-section-choice input {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  accent-color: var(--rs-accent-dark, #117c5d);
}

.rs-report-compare-stage3 .rs-report-compare-scroll-tools {
  justify-content: space-between;
  margin: 12px 0 7px;
}

.rs-report-compare-stage3 .rs-report-compare-scroll-tools > span {
  color: var(--rs-muted, #627379);
  font-size: 11px;
  font-weight: 800;
}

.rs-report-compare-stage3 .rs-report-compare-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0 0 10px;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y pinch-zoom;
  scrollbar-width: auto;
  scrollbar-color: #78a99a #edf4f2;
}

.rs-report-compare-stage3 .rs-report-compare-scroll:focus-visible {
  outline: 3px solid rgba(30, 163, 119, .28);
  outline-offset: 3px;
}

.rs-report-compare-stage3 .rs-report-compare-matrix {
  width: 100%;
  min-width: var(--rs-report-compare-total-width);
}

.rs-report-compare-stage3 .rs-report-compare-report-grid {
  display: grid;
  grid-template-columns: repeat(var(--rs-report-compare-columns), minmax(0, 1fr));
  width: 100%;
}

.rs-report-compare-stage3 .rs-report-compare-report-head-row {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border: 1px solid var(--rs-border, #d5e5e1);
  border-radius: 16px;
  background: #f8fbfa;
}

.rs-report-compare-stage3 .rs-report-compare-column-head {
  min-width: 0;
  min-height: 82px;
  margin: 0;
  padding: 13px 14px;
  border-right: 1px solid var(--rs-border, #d5e5e1);
  border-bottom: 0;
}

.rs-report-compare-stage3 .rs-report-compare-column-head:last-child,
.rs-report-compare-stage3 .rs-report-compare-cell:last-child {
  border-right: 0;
}

.rs-report-compare-stage3 .rs-report-compare-block {
  min-width: 0;
  margin-top: 9px;
  border: 1px solid var(--rs-border, #d5e5e1);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.rs-report-compare-stage3 .rs-report-compare-block[hidden],
.rs-report-compare-stage3 .rs-report-compare-block-body[hidden] {
  display: none !important;
}

.rs-report-compare-stage3 .rs-report-compare-block-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 0;
  border-radius: 0;
  background: #f7fbf9;
  color: var(--rs-ink, #08181d);
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.rs-report-compare-stage3 .rs-report-compare-block-toggle > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.rs-report-compare-stage3 .rs-report-compare-block-toggle strong {
  font-size: 12px;
  line-height: 1.3;
}

.rs-report-compare-stage3 .rs-report-compare-block-toggle small {
  color: var(--rs-muted, #627379);
  font-size: 10px;
  font-weight: 750;
}

.rs-report-compare-stage3 .rs-report-compare-block-toggle > b {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #cfe2dc;
  border-radius: 9px;
  background: #fff;
  color: var(--rs-accent-dark, #117c5d);
  font-size: 17px;
  line-height: 1;
}

.rs-report-compare-stage3 .rs-report-compare-room {
  margin-top: 14px;
  border-radius: 18px;
}

.rs-report-compare-stage3 .rs-report-compare-room > .rs-report-compare-block-toggle {
  min-height: 54px;
  background: linear-gradient(180deg, #fbfdfc, #f0f8f5);
}

.rs-report-compare-stage3 .rs-report-compare-room > .rs-report-compare-block-toggle strong {
  font-size: 17px;
  letter-spacing: -.025em;
}

.rs-report-compare-stage3 .rs-report-compare-room > .rs-report-compare-block-body {
  padding: 0 9px 9px;
}

.rs-report-compare-stage3 .rs-report-compare-cell {
  min-width: 0;
  padding: 12px;
  border-top: 1px solid #e2ece9;
  border-right: 1px solid #e2ece9;
  background: #fff;
}

.rs-report-compare-stage3 .rs-report-compare-cell.is-missing {
  background: #fafcfb;
}

.rs-report-compare-stage3 .rs-report-compare-facts {
  margin: 0;
}

.rs-report-compare-stage3 .rs-report-compare-area-facts {
  margin-bottom: 10px;
}

.rs-report-compare-stage3 .rs-report-compare-photo-frame,
.rs-report-compare-stage3 .rs-report-compare-photo,
.rs-report-compare-stage3 .rs-report-compare-photo img {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.rs-report-compare-stage3 .rs-report-compare-photo img {
  pointer-events: none;
}

.rs-report-compare-stage3 .rs-report-compare-landlord-block > .rs-report-compare-block-body {
  padding: 0 8px 8px;
}

.rs-report-compare-stage3 .rs-report-compare-item-block {
  margin-top: 8px;
}

.rs-report-compare-stage3 .rs-report-compare-landlord-item {
  display: grid;
  gap: 5px;
  min-height: 100%;
  padding: 10px;
  border: 1px solid #e0ebe8;
  border-radius: 12px;
  background: #fbfdfc;
}

.rs-report-compare-stage3 .rs-report-compare-landlord-item > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.rs-report-compare-stage3 .rs-report-compare-landlord-item b {
  font-size: 11px;
  line-height: 1.35;
}

.rs-report-compare-stage3 .rs-report-compare-landlord-item > div span {
  color: #166f53;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.rs-report-compare-stage3 .rs-report-compare-landlord-item p {
  margin: 0;
  color: var(--rs-muted, #627379);
  font-size: 10px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.rs-report-compare-stage3 .rs-report-compare-landlord-item small {
  color: #4a6268;
  font-size: 9.5px;
  line-height: 1.35;
}

@media (max-width: 720px) {
  .rs-report-compare-stage3 .rs-report-compare-workspace-actions {
    justify-content: flex-start;
  }

  .rs-report-compare-stage3 .rs-report-compare-workspace-actions button,
  .rs-report-compare-stage3 .rs-report-compare-section-actions button {
    flex: 1 1 auto;
  }

  .rs-report-compare-stage3 .rs-report-compare-section-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rs-report-compare-stage3 .rs-report-compare-scroll-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .rs-report-compare-stage3 .rs-report-compare-scroll-tools > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .rs-report-compare-stage3 .rs-report-compare-cell {
    padding: 10px;
  }

  .rs-report-compare-stage3 .rs-report-compare-room > .rs-report-compare-block-body {
    padding: 0 6px 6px;
  }
}

@media (max-width: 390px) {
  .rs-report-compare-stage3 .rs-report-compare-section-choices {
    grid-template-columns: 1fr;
  }
}
