@font-face {
  font-family: "Switzer";
  src: url("fonts/switzer-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("fonts/switzer-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("fonts/switzer-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f6f6f4;
  --surface: #ffffff;
  --ink: #0f1115;
  --ink-2: #5a606b;
  --ink-3: #6a707b;
  --hair: rgb(15 17 21 / 0.1);
  --hair-strong: rgb(15 17 21 / 0.18);
  --accent: #1c2b45;
  --accent-hover: #22345a;
  --accent-pressed: #15213a;
  --on-accent: #ffffff;
  --night: #0b0c0e;
  --chrome: rgb(246 246 244 / 0.8);
  --gutter: 20px;
  --topbar: 64px;
  --radius: 12px;
  --shadow-card: 0 1px 2px rgb(15 17 21 / 0.04), 0 12px 32px rgb(15 17 21 / 0.06);
  /* Buttons have no outline. A tight contact shadow sets them on the surface,
     a soft ambient one lifts them; pressing lowers them back down. */
  --shadow-raised: 0 0.5px 1px rgb(15 17 21 / 0.14), 0 1px 3px rgb(15 17 21 / 0.06), 0 6px 16px -4px rgb(15 17 21 / 0.14);
  --shadow-raised-hover: 0 0.5px 1px rgb(15 17 21 / 0.14), 0 2px 6px rgb(15 17 21 / 0.07), 0 12px 24px -6px rgb(15 17 21 / 0.18);
  --shadow-pressed: 0 0.5px 1px rgb(15 17 21 / 0.16), 0 1px 2px rgb(15 17 21 / 0.06);
  --shadow-accent: 0 0.5px 1px rgb(11 18 32 / 0.34), 0 2px 4px rgb(28 43 69 / 0.16), 0 8px 20px -6px rgb(28 43 69 / 0.44);
  --shadow-accent-hover: 0 0.5px 1px rgb(11 18 32 / 0.34), 0 3px 6px rgb(28 43 69 / 0.18), 0 14px 28px -8px rgb(28 43 69 / 0.5);
  --shadow-accent-pressed: 0 0.5px 1px rgb(11 18 32 / 0.38), 0 1px 3px rgb(28 43 69 / 0.22);
  --shadow-float: 0 1px 2px rgb(15 17 21 / 0.1), 0 10px 28px -4px rgb(15 17 21 / 0.24);
  --ease-out: cubic-bezier(0.32, 0.72, 0, 1);
}

@media (min-width: 900px) {
  :root {
    --gutter: 32px;
  }
}

@media (prefers-contrast: more) {
  :root {
    --ink-2: var(--ink);
    --ink-3: var(--ink);
    --hair: rgb(15 17 21 / 0.45);
    --hair-strong: var(--ink);
    --chrome: var(--paper);
  }
}

@media (prefers-reduced-transparency: reduce) {
  :root {
    --chrome: var(--paper);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Layers that set their own display must still disappear when hidden. */
[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topbar) + 16px);
}

html.viewer-open {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Switzer", system-ui, sans-serif;
  font-size: 17px;
  line-height: 26px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p,
dl,
dd,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* Sample notice */

.sample-note {
  padding: 8px var(--gutter);
  background: #ebebe7;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  letter-spacing: 0.01em;
}

.sample-note a {
  margin-left: 4px;
  color: var(--ink);
  font-weight: 500;
  text-underline-offset: 3px;
  text-decoration-color: var(--hair-strong);
}

/* Top bar: transparent over the page, a material once the photos scroll away */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar);
  transition: background-color 200ms ease, box-shadow 200ms ease;
}

.topbar.is-stuck {
  background: var(--chrome);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 var(--hair);
}

@media (prefers-reduced-transparency: reduce) {
  .topbar.is-stuck {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wordmark {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.topbar-summary {
  margin-left: auto;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.topbar-summary .tabular {
  color: var(--ink);
}

.topbar.is-stuck .topbar-summary {
  opacity: 1;
  transform: none;
}

.topbar .button {
  margin-left: auto;
}

.topbar-summary + .button {
  margin-left: 0;
}

@media (max-width: 599px) {
  .topbar-summary {
    display: none;
  }

  .topbar .button {
    margin-left: auto;
  }
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
  user-select: none;
  transition: transform 100ms ease-out, background-color 150ms ease, box-shadow 150ms ease;
}

.button-small {
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
  line-height: 20px;
}

.button-large {
  height: 52px;
  padding: 0 20px;
  font-size: 15px;
  line-height: 20px;
  width: 100%;
}

.button-accent {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-accent);
}

.button-quiet {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-raised);
}

.button-glass {
  background: rgb(255 255 255 / 0.88);
  color: var(--ink);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: var(--shadow-float);
}

@media (hover: hover) {
  .button-accent:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-accent-hover);
  }

  .button-quiet:hover {
    box-shadow: var(--shadow-raised-hover);
  }

  .button-glass:hover {
    background: #fff;
  }
}

/* Pressed comes after hover so a click on a desktop still shows the press. */
.button:active {
  transform: scale(0.98);
}

.button-accent:active {
  background: var(--accent-pressed);
  box-shadow: var(--shadow-accent-pressed);
}

.button-quiet:active {
  background: #f3f3f0;
  box-shadow: var(--shadow-pressed);
}

.button-glass:active {
  box-shadow: var(--shadow-pressed);
}

/* Higher contrast settings still need a visible edge where a white button sits on white. */
@media (prefers-contrast: more) {
  .button-quiet,
  .button-glass {
    box-shadow: inset 0 0 0 1px var(--ink);
  }
}

@media (forced-colors: active) {
  .button {
    border: 1px solid ButtonText;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button:active {
    transform: none;
    opacity: 0.8;
  }
}

.link-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgb(28 43 69 / 0.3);
  text-underline-offset: 4px;
  min-height: 44px;
}

/* Photos at the top */

.hero {
  position: relative;
}

.hero-carousel {
  position: relative;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  aspect-ratio: 4 / 3;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  height: 100%;
  overflow: hidden;
}

.carousel-slide img,
.mosaic-tile img,
.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgb(15 17 21 / 0.62);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  font-weight: 500;
  pointer-events: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero-mosaic {
  display: none;
}

@media (min-width: 900px) {
  .hero-carousel {
    display: none;
  }

  .hero-mosaic {
    position: relative;
    display: grid;
    gap: 8px;
    max-width: 1240px;
    height: clamp(420px, 42vw, 560px);
    margin: 8px auto 0;
    padding: 0 var(--gutter);
  }

  .mosaic-tile {
    position: relative;
    overflow: hidden;
    min-height: 0;
  }

  .mosaic-tile img {
    transition: transform 700ms var(--ease-out), filter 300ms ease;
  }

  .mosaic-1 {
    grid-template-columns: 1fr;
  }
  .mosaic-2 {
    grid-template-columns: 1fr 1fr;
  }
  .mosaic-3 {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
  }
  .mosaic-4,
  .mosaic-5 {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
  }
  .mosaic-3 .mosaic-tile:first-child,
  .mosaic-4 .mosaic-tile:first-child,
  .mosaic-5 .mosaic-tile:first-child {
    grid-row: span 2;
  }
  .mosaic-4 .mosaic-tile:nth-child(2) {
    grid-column: span 2;
  }

  /* Only the outer corners are rounded, so the mosaic reads as one surface. */
  .hero-mosaic .mosaic-tile:first-child {
    border-radius: 14px 0 0 14px;
  }
  .mosaic-1 .mosaic-tile:first-child {
    border-radius: 14px;
  }
  .mosaic-2 .mosaic-tile:nth-child(2),
  .mosaic-3 .mosaic-tile:nth-child(2),
  .mosaic-4 .mosaic-tile:nth-child(2),
  .mosaic-5 .mosaic-tile:nth-child(3) {
    border-top-right-radius: 14px;
  }
  .mosaic-2 .mosaic-tile:nth-child(2),
  .mosaic-3 .mosaic-tile:nth-child(3),
  .mosaic-4 .mosaic-tile:nth-child(4),
  .mosaic-5 .mosaic-tile:nth-child(5) {
    border-bottom-right-radius: 14px;
  }

  .hero-all {
    position: absolute;
    right: calc(var(--gutter) + 16px);
    bottom: 16px;
  }

  @media (hover: hover) {
    .mosaic-tile:hover img {
      transform: scale(1.02);
      filter: brightness(1.03);
    }
  }
}

/* Page body */

.layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 900px) {
  .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 64px;
    margin-top: 40px;
  }
}

.intro {
  padding: 28px 0 32px;
}

@media (min-width: 900px) {
  .intro {
    padding: 0 0 40px;
  }
}

.eyebrow {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* The eyebrow shares its line with the share button; the button's height is kept out of the rhythm. */
.intro-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: -10px;
}

.intro-top + h1 {
  margin-top: 0;
}

.badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgb(28 43 69 / 0.08);
  color: var(--accent);
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.08em;
}

.intro h1 {
  margin-top: 10px;
  max-width: 24ch;
  font-size: 28px;
  line-height: 34px;
  font-weight: 600;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

@media (min-width: 900px) {
  .intro h1 {
    font-size: 40px;
    line-height: 46px;
    letter-spacing: -0.028em;
  }
}

.place {
  margin-top: 8px;
  font-size: 16px;
  line-height: 24px;
  color: var(--ink-2);
}

.price-block {
  margin-top: 24px;
}

.price {
  display: inline-block;
  position: relative;
  padding-bottom: 12px;
  font-size: 36px;
  line-height: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.price::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

@media (min-width: 900px) {
  .price {
    font-size: 48px;
    line-height: 52px;
    letter-spacing: -0.034em;
  }
}

.price-unit {
  font-size: 0.5em;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-2);
}

.price-note + .price-note {
  margin-top: 4px;
}

.price-note {
  margin-top: 10px;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-2);
}

.key-facts {
  display: flex;
  flex-wrap: wrap;
  margin-top: 20px;
  font-size: 15px;
  line-height: 22px;
  font-weight: 500;
}

.key-facts li + li::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 12px;
  border-radius: 50%;
  background: var(--ink-3);
  vertical-align: middle;
}

.section {
  padding: 32px 0;
  border-top: 1px solid var(--hair);
}

@media (min-width: 900px) {
  .section {
    padding: 40px 0;
  }
}

.section h2 {
  font-size: 20px;
  line-height: 26px;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-lead {
  margin-top: 4px;
  font-size: 15px;
  line-height: 22px;
  color: var(--ink-2);
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.fact-group {
  margin-top: 24px;
}

.fact-group .facts {
  margin-top: 2px;
}

/* Room sizes: names on the left, metres aligned on the right, the total closing the grid. */

.rooms {
  display: grid;
  column-gap: 40px;
  margin-top: 12px;
}

@media (min-width: 640px) {
  .rooms {
    grid-template-columns: 1fr 1fr;
  }
}

.rooms div,
.nearby-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.rooms div {
  padding: 11px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 15px;
  line-height: 22px;
}

.rooms dd {
  flex: none;
  font-weight: 500;
}

.rooms .rooms-total {
  font-weight: 600;
  border-bottom-color: var(--hair-strong);
}

.distance {
  flex: none;
  color: var(--ink-2);
}

.nearby {
  margin-top: 28px;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 24px;
  margin-top: 12px;
}

@media (min-width: 640px) {
  .facts {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 32px;
  }
}

.facts div {
  padding: 14px 0;
  border-bottom: 1px solid var(--hair);
}

.facts dt {
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-2);
}

.facts dd {
  margin-top: 2px;
  font-size: 16px;
  line-height: 22px;
  font-weight: 500;
}

.prose {
  margin-top: 14px;
  max-width: 64ch;
}

.prose p + p {
  margin-top: 14px;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 8px;
  margin-top: 16px;
}

/* No lonely last photo: see galleryClass in render.ts. */
.gallery-odd .gallery-tile:first-child {
  grid-column: 1 / -1;
}

.gallery-odd .gallery-tile:first-child img {
  aspect-ratio: 3 / 2;
}

@media (min-width: 640px) {
  .gallery {
    grid-template-columns: repeat(6, 1fr);
    gap: 20px 12px;
  }

  .gallery .gallery-tile,
  .gallery-odd .gallery-tile:first-child {
    grid-column: span 2;
  }

  .gallery-odd .gallery-tile:first-child img {
    aspect-ratio: 4 / 3;
  }

  .gallery-lead-2 .gallery-tile:nth-child(-n + 2),
  .gallery-lead-4 .gallery-tile:nth-child(-n + 4) {
    grid-column: span 3;
  }

  .gallery-single .gallery-tile:first-child {
    grid-column: 1 / -1;
  }
}

.gallery-tile {
  display: block;
  text-align: left;
}

.gallery-tile img {
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  transition: transform 100ms ease-out;
}

.gallery-tile:active img {
  transform: scale(0.98);
}

.gallery-caption {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-2);
}

.features {
  display: grid;
  gap: 28px;
  margin-top: 16px;
}

@media (min-width: 640px) {
  .features {
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
  }
}

.feature-group h3,
.fact-group h3 {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.feature-group ul {
  margin-top: 6px;
}

.feature-group li {
  padding: 11px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 15px;
  line-height: 22px;
}

.map {
  position: relative;
  margin-top: 16px;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border-radius: 14px;
  background: #e9e9e6;
  box-shadow: inset 0 0 0 1px var(--hair);
}

@media (min-width: 640px) {
  .map {
    aspect-ratio: 16 / 8;
  }
}

.map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(1) contrast(1.04) brightness(1.03);
}

.map-area {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 136px;
  height: 136px;
  margin: -68px 0 0 -68px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: rgb(28 43 69 / 0.12);
  pointer-events: none;
}

.map-note {
  margin-top: 10px;
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-2);
}

/* Agent */

.agent-column {
  padding: 8px 0 40px;
}

@media (min-width: 900px) {
  .agent-column {
    padding: 0;
  }

  .agent-card {
    position: sticky;
    top: calc(var(--topbar) + 24px);
  }
}

.agent-card {
  padding: 24px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hair), var(--shadow-card);
}

.agent-card .button + .button {
  margin-top: 8px;
}

.agent-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.monogram {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.agent-name {
  font-size: 17px;
  line-height: 22px;
  font-weight: 600;
}

.agent-title {
  margin-top: 2px;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-2);
}

.agent-meta {
  margin-top: 20px;
  border-top: 1px solid var(--hair);
}

.agent-meta div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 0;
  font-size: 13px;
  line-height: 18px;
}

.agent-meta dt {
  color: var(--ink-2);
}

.agent-meta dd {
  font-weight: 500;
}

/* Footer and phone dock */

.footer {
  border-top: 1px solid var(--hair);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px var(--gutter) calc(112px + env(safe-area-inset-bottom));
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-2);
}

.footer-inner p + p {
  margin-top: 6px;
}

.footer .signature {
  margin-top: 18px;
  color: var(--ink-3);
}

.footer .signature a {
  color: inherit;
  text-underline-offset: 3px;
}

@media (min-width: 900px) {
  .footer-inner {
    padding-bottom: 40px;
  }
}

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 8px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--chrome);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 -1px 0 var(--hair);
}

.dock .button-large {
  height: 48px;
}

@media (prefers-reduced-transparency: reduce) {
  .dock {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (min-width: 900px) {
  .dock {
    display: none;
  }
}

/* Photo viewer */

.viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  touch-action: none;
  --top: 64px;
  --bottom: 72px;
  --side: 0px;
}

@media (min-width: 900px) {
  .viewer {
    --top: 72px;
    --bottom: 80px;
    --side: 96px;
  }
}

.viewer-backdrop {
  position: absolute;
  inset: 0;
  background: var(--night);
}

.viewer-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.viewer-track {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.viewer-slide {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  padding: var(--top) var(--side) var(--bottom);
}

.viewer-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.viewer-flight {
  position: fixed;
  z-index: 51;
  overflow: hidden;
  pointer-events: none;
}

.viewer-flight img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.viewer-top,
.viewer-prev,
.viewer-next,
.viewer-caption {
  transition: opacity 200ms ease;
}

.viewer.chrome-hidden .viewer-top,
.viewer.chrome-hidden .viewer-prev,
.viewer.chrome-hidden .viewer-next,
.viewer.chrome-hidden .viewer-caption {
  opacity: 0;
  pointer-events: none;
}

.viewer-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px 20px;
}

.viewer-count {
  color: rgb(255 255 255 / 0.86);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.1);
  color: #fff;
  transition: background-color 150ms ease, transform 100ms ease-out;
}

.icon-button:active {
  transform: scale(0.94);
  background: rgb(255 255 255 / 0.2);
}

@media (hover: hover) {
  .icon-button:hover {
    background: rgb(255 255 255 / 0.18);
  }
}

.icon-button:disabled {
  opacity: 0.3;
  cursor: default;
}

.viewer-prev,
.viewer-next {
  position: absolute;
  top: 50%;
  margin-top: -22px;
  display: none;
}

.viewer-prev {
  left: 24px;
}

.viewer-next {
  right: 24px;
}

@media (min-width: 900px) and (hover: hover) {
  .viewer-prev,
  .viewer-next {
    display: inline-flex;
  }
}

.viewer-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 20px calc(24px + env(safe-area-inset-bottom));
  color: rgb(255 255 255 / 0.86);
  font-size: 15px;
  line-height: 22px;
  text-align: center;
  pointer-events: none;
}

/* Sample sheet */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(15 17 21 / 0.4);
  opacity: 0;
  transition: opacity 300ms ease;
}

.sheet-panel {
  position: relative;
  width: 100%;
  max-width: 460px;
  padding: 28px 24px calc(24px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: var(--surface);
  box-shadow: 0 24px 64px rgb(15 17 21 / 0.2);
  transform: translateY(100%);
  transition: transform 420ms var(--ease-out);
}

@media (min-width: 640px) {
  .sheet {
    align-items: center;
  }

  .sheet-panel {
    border-radius: 20px;
    transform: translateY(24px) scale(0.98);
    opacity: 0;
    transition: transform 420ms var(--ease-out), opacity 200ms ease;
  }
}

.sheet.is-open .sheet-backdrop {
  opacity: 1;
}

.sheet.is-open .sheet-panel {
  transform: none;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .sheet-panel,
  .sheet.is-open .sheet-panel {
    transform: none;
    transition: opacity 200ms ease;
  }

  .sheet-panel {
    opacity: 0;
  }

  .sheet.is-open .sheet-panel {
    opacity: 1;
  }
}

.sheet-panel h2 {
  margin-top: 8px;
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -0.016em;
}

.sheet-text {
  margin-top: 10px;
  font-size: 15px;
  line-height: 22px;
  color: var(--ink-2);
}

.sheet-quote {
  margin: 14px 0 20px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 15px;
  line-height: 22px;
}

.sheet-panel .button + .button {
  margin-top: 8px;
}

/* For agents: shown on sample pages only, after the listing, as its own layer */

/* Positioned so the sticky agent card above, and its shadow, stay behind it. */
.pitch {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border-top: 1px solid var(--hair);
}

.pitch-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px var(--gutter) 64px;
}

@media (min-width: 900px) {
  .pitch-inner {
    padding: 88px var(--gutter) 96px;
  }
}

.pitch h2 {
  margin-top: 12px;
  max-width: 20ch;
  font-size: 28px;
  line-height: 34px;
  font-weight: 600;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

@media (min-width: 900px) {
  .pitch h2 {
    font-size: 40px;
    line-height: 46px;
    letter-spacing: -0.028em;
  }
}

.pitch-lead {
  margin-top: 14px;
  max-width: 56ch;
  color: var(--ink-2);
}

.pitch-grid {
  display: grid;
  column-gap: 40px;
  margin-top: 36px;
  border-bottom: 1px solid var(--hair);
}

@media (min-width: 640px) {
  .pitch-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .pitch-grid {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 48px;
  }
}

.pitch-grid div {
  padding: 20px 0 24px;
  border-top: 1px solid var(--hair);
}

.pitch-grid dt {
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
}

.pitch-grid dd {
  margin-top: 6px;
  font-size: 15px;
  line-height: 22px;
  color: var(--ink-2);
}

.pitch-offer {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 32px;
}

@media (min-width: 640px) {
  .pitch-offer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .pitch-offer .button {
    width: auto;
    padding: 0 28px;
  }
}

/* A sold or withdrawn listing */

.closed {
  display: grid;
  gap: 40px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px var(--gutter) 64px;
}

@media (min-width: 900px) {
  .closed {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
    gap: 64px;
    padding: 96px var(--gutter) 120px;
  }
}

.closed-text h1 {
  margin-top: 12px;
  font-size: 32px;
  line-height: 38px;
  font-weight: 600;
  letter-spacing: -0.024em;
}

@media (min-width: 900px) {
  .closed-text h1 {
    font-size: 48px;
    line-height: 52px;
    letter-spacing: -0.034em;
  }
}

.closed-text h1 + p {
  margin-top: 16px;
  max-width: 46ch;
  color: var(--ink-2);
}

/* Short confirmations, such as a copied link */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 70;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  overflow-wrap: anywhere;
  box-shadow: var(--shadow-float);
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 200ms ease, transform 300ms var(--ease-out);
  pointer-events: none;
}

.toast:empty {
  display: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 900px) {
  .toast {
    bottom: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    transform: translate(-50%, 0);
    transition: opacity 200ms ease;
  }
}

.pitch-grid dd a {
  color: var(--accent);
  font-weight: 500;
  text-underline-offset: 3px;
  text-decoration-color: rgb(28 43 69 / 0.3);
}
