@import url("/fonts.css");
/* Värit: public/klik-tokens.css (ladataan ennen tätä). Haku-, kohde- ja autopaikkasivut ovat vuokralaisteemassa
   (suunta A); vuokranantajien lomakkeet (asuntotieto, vuokra-arvio) vuokranantajateemassa (suunta B). */
:root {
  --brand-blue: var(--klik-primary);
  --dark: var(--klik-ink);
  --ink: var(--klik-text);
  --muted: var(--klik-muted);
  --line: var(--klik-line);
  --paper: var(--klik-tint-1);
  --yellow: var(--klik-accent);
}
/* Keep the original navigation outside the redesigned content styles. */
@scope (html) to (.source-chrome) {
.form-page {
  background: var(--klik-tint-1);
}
.crm-form-frame {
  display: block;
  width: 100%;
  border: 0;
}
* {
  box-sizing: border-box;
}
:scope {
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
}
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
a:hover {
  text-decoration: underline;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--brand-blue);
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  line-height: 1.18;
}
h1 {
  letter-spacing: -2px;
}
img {
  max-width: 100%;
  display: block;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 13px 21px;
  border: 1px solid var(--line);
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  background: white;
}
.button:hover {
  text-decoration: none;
  filter: brightness(0.95);
}
.primary {
  background: var(--brand-blue);
  color: white;
  border-color: var(--brand-blue);
}
.secondary {
  color: var(--brand-blue);
  border-color: var(--brand-blue);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.7px;
  font-weight: 700;
  color: var(--brand-blue);
}
.search-layout {
  max-width: 1380px;
  margin: auto;
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  gap: 36px;
  padding: 42px 40px 80px;
}
.filter-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.filter-title h2 {
  font-size: 21px;
  margin: 0;
}
.filter-title a {
  font-size: 12px;
  color: var(--brand-blue);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
}
.field input,
.field select,
select {
  width: 100%;
  background: white;
  border: 1px solid var(--klik-field-border);
  border-radius: 5px;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 13px;
}
.field-pair {
  display: flex;
  gap: 10px;
}
.field-pair .field {
  width: 50%;
  margin: 0;
}
/* Ristiriitainen vuokra- tai pinta-alaväli (render.mjs range, search.js checkRanges). */
.range-error {
  margin: 10px 0 0;
  color: var(--klik-error);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}
.field input[aria-invalid="true"] {
  border-color: var(--klik-error);
}
fieldset {
  padding: 0 0 24px;
  margin: 0 0 23px;
  border: none;
  border-bottom: 1px solid var(--line);
}
legend {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  min-height: 33px;
}
.check input {
  accent-color: var(--brand-blue);
  width: 17px;
  height: 17px;
}
.filter-submit {
  margin-top: 25px;
  width: 100%;
  justify-content: space-between;
}
.help-card {
  background: var(--klik-panel-bg);
  color: var(--klik-on-panel-text);
  box-shadow: inset 0 0 0 1px var(--klik-panel-line);
  border-radius: 8px;
  padding: 24px;
  margin-top: 32px;
  font-size: 13px;
}
.help-card h3 {
  font-size: 16px;
  color: var(--klik-on-panel);
}
.help-card p {
  margin-bottom: 9px;
}
.help-card a {
  color: var(--klik-panel-accent);
  font-weight: 700;
}
.help-card a:focus-visible {
  outline-color: var(--klik-panel-focus);
}
.results-toolbar {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  min-height: 42px;
}
.results-toolbar h2 {
  font-size: 22px;
  margin: 0;
  white-space: nowrap;
}
.results-toolbar h2 span {
  font-size: 15px;
  font-weight: 400;
}
.results-toolbar label {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.results-toolbar select {
  width: 170px;
}
.text-button {
  border: 0;
  background: none;
  padding: 8px 0;
  color: var(--brand-blue);
  font-size: 12px;
  white-space: nowrap;
}
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 23px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s;
}
.card:hover {
  box-shadow: var(--klik-shadow-hover);
}
.card-picture {
  display: block;
  position: relative;
  background: var(--paper);
}
.card-picture img {
  aspect-ratio: 1.4;
  object-fit: cover;
  width: 100%;
  height: auto;
}
.badge {
  position: absolute;
  left: 12px;
  top: 12px;
  background: #fff;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
}
.card-body {
  padding: 19px;
}
.card .eyebrow {
  font-size: 9px;
  letter-spacing: 1px;
  margin-bottom: 9px;
}
.card h2 {
  font-size: 21px;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.rooms {
  font-size: 12px;
  margin-bottom: 10px;
}
.rooms span {
  margin: 0 4px;
  color: var(--muted);
}
.card-summary {
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
  margin-bottom: 17px;
}
.card-bottom {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.card-bottom strong {
  font-size: 21px;
  color: var(--dark);
  white-space: nowrap;
}
.card-bottom small {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}
.card-bottom > span {
  font-size: 10px;
  color: var(--muted);
}
.card-availability {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}
.no-picture {
  height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  padding-top: 40px;
  font-size: 13px;
}
.other-properties {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  border-top: 1px solid var(--line);
  margin-top: 38px;
  padding-top: 24px;
  font-size: 12px;
}
.other-properties a {
  color: var(--brand-blue);
  font-weight: 700;
}
.empty {
  padding: 60px 25px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: white;
  border-radius: 6px;
  padding: 12px 20px;
  display: none;
  z-index: 100;
}
.listing {
  max-width: 1300px;
  margin: auto;
  padding: 24px 40px 88px;
}
.breadcrumbs {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  margin: 15px 0 30px;
}
.listing-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.listing-heading h1 {
  font-size: 46px;
  color: var(--dark);
  margin: 10px 0 8px;
}
.listing-heading p {
  margin: 0;
  color: var(--muted);
}
.listing-heading p span {
  margin: 0 10px;
}
.heading-price {
  display: flex;
  flex-direction: column;
  text-align: right;
}
.heading-price strong {
  font-size: 36px;
  color: var(--brand-blue);
}
.heading-price span {
  font-size: 13px;
  color: var(--muted);
}
.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 220px 220px;
  gap: 10px;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper);
}
.gallery-image {
  overflow: hidden;
}
.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.main-image {
  grid-row: span 2;
}
.gallery-count {
  position: absolute;
  bottom: 20px;
  right: 20px;
}
.listing-tabs {
  display: flex;
  align-items: center;
  gap: 35px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}
.listing-tabs button {
  margin-left: auto;
}
.listing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 70px;
  margin-top: 52px;
}
.description {
  padding-bottom: 25px;
}
.description h2 {
  font-size: 29px;
  line-height: 1.3;
  margin: 15px 0 22px;
  color: var(--dark);
}
.rich-text {
  font-size: 15px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.rich-text a {
  color: var(--brand-blue);
  text-decoration: underline;
}
.contact-card {
  align-self: start;
  position: sticky;
  top: 25px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--klik-shadow);
}
.contact-card h2 {
  font-size: 24px;
  margin: 15px 0 23px;
}
.contact-card > p {
  font-size: 13px;
}
.contact-card .button {
  width: 100%;
  margin-bottom: 12px;
  font-size: 13px;
}
.muted {
  color: var(--muted);
  font-size: 12px !important;
}
.contact-card hr {
  margin: 25px 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.contact-card > a:not(.button) {
  font-size: 12px;
  color: var(--brand-blue);
}
.phone {
  display: block;
  font-size: 20px !important;
  margin: 18px 0 6px;
  font-weight: 700;
}
.notice {
  padding: 15px;
  background: var(--klik-tint-2);
  border-radius: 6px;
  font-size: 13px;
}
.rented {
  margin: 0 0 25px;
  background: #fff2d8;
}
.rented a {
  text-decoration: underline;
}
.details-section {
  padding: 36px 0;
  border-top: 1px solid var(--line);
}
.details-section h2 {
  font-size: 22px;
  color: var(--dark);
}
dl {
  margin: 0;
}
dl > div {
  display: grid;
  grid-template-columns: 42% 58%;
  padding: 12px 0;
  border-bottom: 1px solid var(--klik-line);
  font-size: 13px;
}
dt {
  color: var(--muted);
  padding-right: 18px;
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
}
dd p:last-child {
  margin: 0;
}
.all-photos {
  margin-top: 52px;
  border-top: 1px solid var(--line);
  padding-top: 40px;
}
.all-photos > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.all-photos img {
  aspect-ratio: 1.5;
  object-fit: cover;
  width: 100%;
  height: auto;
  border-radius: 30px;
}
dialog {
  background: #101b2af5;
  color: white;
  border: 0;
  max-width: 96vw;
  width: 1200px;
  height: 90vh;
  padding: 35px 60px;
  border-radius: 12px;
}
dialog::backdrop {
  background: #000b;
}
dialog img {
  width: 100%;
  height: 90%;
  object-fit: contain;
}
dialog button {
  position: absolute;
  background: #ffffff20;
  color: white;
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
}
dialog [data-close] {
  top: 12px;
  right: 12px;
}
dialog [data-prev] {
  left: 10px;
  top: 48%;
}
dialog [data-next] {
  right: 10px;
  top: 48%;
}
dialog p {
  text-align: center;
  margin: 10px;
}
.service {
  max-width: 850px;
  margin: var(--klik-section-y-tight) auto var(--klik-section-y);
  padding: 30px;
}
.service h1 {
  font-size: 42px;
  color: var(--dark);
  margin-top: 18px;
}
.service > p {
  font-size: 18px;
  color: var(--muted);
}
.service-links {
  display: grid;
  gap: 16px;
  margin-top: 40px;
}
.service-links a {
  color: var(--brand-blue);
}
@media (min-width: 1500px) {
  .search-hero {
    padding-left: calc((100vw - 1300px) / 2);
  }
}
@media (max-width: 1100px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .listing-layout {
    gap: 35px;
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .results-toolbar {
    flex-wrap: wrap;
  }
  .results-toolbar .text-button {
    display: none;
  }
  .gallery {
    grid-template-rows: 180px 180px;
  }
}
@media (max-width: 700px) {
  .search-hero {
    padding: 35px 22px;
  }
  .search-hero h1 {
    font-size: 44px;
  }
  .search-hero p {
    font-size: 13px;
    max-width: 85%;
  }
  .hero-mark {
    font-size: 180px;
    right: -25px;
    top: 55px;
    opacity: 0.55;
  }
  .search-layout {
    grid-template-columns: 1fr;
    padding: 25px 20px;
    gap: 28px;
  }
  .search-layout aside #filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 18px;
    padding: 20px;
    background: var(--paper);
    border-radius: 8px;
  }
  .filter-title {
    grid-column: span 2;
    margin-bottom: 3px;
  }
  .search-layout .field {
    margin-bottom: 4px;
  }
  .search-layout fieldset {
    padding-bottom: 10px;
    margin: 0;
  }
  .filter-submit {
    margin-top: 8px;
    grid-column: span 2;
  }
  .help-card {
    display: none;
  }
  .cards {
    gap: 14px;
  }
  .card-body {
    padding: 13px;
  }
  .card h2 {
    font-size: 18px;
  }
  .card-summary {
    display: none;
  }
  .card-bottom {
    display: block;
  }
  .card-bottom strong {
    font-size: 19px;
  }
  .card-bottom > span {
    display: none;
  }
  .card .eyebrow {
    font-size: 8px;
    letter-spacing: 0.4px;
  }
  .card-availability {
    font-size: 10px;
  }
  .rooms {
    font-size: 11px;
  }
  .results-toolbar {
    gap: 10px;
  }
  .results-toolbar h2 {
    font-size: 20px;
  }
  .results-toolbar h2 span {
    font-size: 12px;
  }
  .results-toolbar label {
    font-size: 0;
  }
  .results-toolbar select {
    width: 145px;
    font-size: 11px;
    min-height: 38px;
  }
  .listing {
    padding: 10px 20px 40px;
  }
  .breadcrumbs {
    font-size: 10px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .listing-heading {
    display: block;
  }
  .listing-heading h1 {
    font-size: 35px;
  }
  .listing-heading p {
    font-size: 12px;
  }
  .heading-price {
    flex-direction: row;
    align-items: baseline;
    text-align: left;
    gap: 8px;
    margin-top: 15px;
  }
  .heading-price strong {
    font-size: 29px;
  }
  .gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 240px 110px;
  }
  .main-image {
    grid-column: span 2;
    grid-row: span 1;
  }
  .gallery-count {
    padding: 8px 13px;
    font-size: 11px;
    bottom: 12px;
    right: 12px;
  }
  .listing-tabs {
    gap: 18px;
    font-size: 11px;
    overflow: auto;
  }
  .listing-tabs .text-button {
    display: none;
  }
  .listing-layout {
    display: flex;
    flex-direction: column-reverse;
    gap: 30px;
    margin-top: 25px;
  }
  .contact-card {
    position: static;
    width: 100%;
    padding: 22px;
  }
  .contact-card h2 br {
    display: none;
  }
  .description h2 {
    font-size: 24px;
  }
  .all-photos > div {
    grid-template-columns: 1fr 1fr;
  }
  dl > div {
    font-size: 12px;
  }
  .service {
    padding: 25px;
    margin-top: 25px;
  }
  .service h1 {
    font-size: 34px;
  }
  .service > p {
    font-size: 16px;
  }
  dialog {
    padding: 40px 38px;
    height: 75vh;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

/* Klik's original navigation, colours and type, with responsive search controls. */
:focus-visible {
  outline: 3px solid var(--brand-blue);
  outline-offset: 4px;
}
summary {
  cursor: pointer;
}
.search-hero {
  background: white;
  padding: 44px max(40px, calc((100% - 1220px) / 2)) 0;
  border: 0;
}
.search-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.search-hero h1 {
  color: var(--brand-blue);
  font-size: clamp(34px, 4vw, 48px);
  letter-spacing: -1.6px;
  margin: 13px 0 15px;
  line-height: 1.15;
}
.search-hero p {
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 28px;
  max-width: none;
}
.search-intro > .button {
  flex-shrink: 0;
}
.property-types {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.property-types a {
  padding: 13px 23px;
  font-weight: 700;
  border-bottom: 4px solid transparent;
}
/* Aktiivinen välilehti: sininen teksti ja 4 px:n sininen alaviiva (keltainen täyttö poistui väriuudistuksessa). */
.property-types a[aria-current] {
  color: var(--brand-blue);
  border-color: var(--brand-blue);
  background: transparent;
}
body:has(.search-layout) main {
  background: var(--paper);
}
.search-layout {
  max-width: 1300px;
  gap: 36px;
  grid-template-columns: 260px minmax(0, 1fr);
  padding-top: 40px;
}
.search-filters {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.search-filters > summary {
  display: none;
}
.search-filters #filters {
  padding: 26px 22px;
}
.filter-title {
  margin-bottom: 22px;
}
.filter-title h2 {
  font-size: 20px;
  color: var(--brand-blue);
}
.field,
legend,
.check {
  font-size: 14px;
}
.field input,
.field select,
select {
  font-size: 14px;
}
.check {
  min-height: 35px;
}
.help-card h3 {
  line-height: 1.45;
}
.results-toolbar {
  margin-bottom: 26px;
  gap: 18px;
}
.results-toolbar h2 {
  color: var(--brand-blue);
  font-size: 25px;
}
.results-toolbar h2 span {
  color: var(--ink);
  font-size: 16px;
}
.results-toolbar label {
  color: var(--ink);
}
.cards {
  gap: var(--klik-gap-md);
}
.card {
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--klik-shadow);
}
.card:hover {
  border-color: var(--klik-primary);
  box-shadow: var(--klik-shadow-hover);
}
.card-picture {
  overflow: hidden;
}
.card-picture img {
  aspect-ratio: 1.65;
  transition: transform 0.25s;
}
.card:hover .card-picture img {
  transform: scale(1.025);
}
.badge {
  background: var(--yellow);
  color: var(--klik-on-accent);
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 3px;
}
.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card .eyebrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.3px;
  margin-bottom: 13px;
}
.card-number {
  color: var(--muted);
  white-space: nowrap;
  font-size: 11px;
}
.card h2 {
  font-size: 25px;
  letter-spacing: -0.6px;
  margin-bottom: 10px;
  line-height: 1.3;
}
.rooms {
  font-size: 14px;
}
.card-summary {
  font-size: 14px;
  line-height: 1.55;
  min-height: 44px;
  margin-bottom: 20px;
}
.card-bottom {
  margin-top: auto;
  padding-top: 15px;
}
.card-bottom strong {
  color: var(--brand-blue);
  font-size: 26px;
}
.card-bottom small,
.card-bottom > span,
.card-availability {
  font-size: 12px;
}
.card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 17px;
  color: var(--brand-blue);
  font-size: 14px;
  font-weight: 700;
}
.card-link span {
  font-size: 22px;
  line-height: 1;
}
@media (max-width: 1100px) {
  .results-toolbar {
    flex-wrap: wrap;
  }
  .results-toolbar .text-button {
    display: block;
  }
  .card h2 {
    font-size: 22px;
  }
  .card-body {
    padding: 18px;
  }
}
@media (max-width: 900px) {
  .search-intro > .button {
    display: none;
  }
  .search-layout {
    grid-template-columns: 230px minmax(0, 1fr);
    padding: 24px;
    gap: 24px;
  }
  .search-hero {
    padding: 28px 24px 0;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .results-toolbar label {
    margin-left: 0;
  }
}
@media (max-width: 700px) {
  .search-hero h1 {
    font-size: 34px;
  }
  .search-hero p {
    font-size: 15px;
    line-height: 1.6;
  }
  .search-hero .eyebrow {
    font-size: 10px;
  }
  .property-types {
    gap: 0;
  }
  .property-types a {
    padding: 12px 15px;
    font-size: 13px;
  }
  .search-layout {
    display: block;
    padding: 22px 20px 40px;
  }
  .search-filters {
    margin-bottom: 26px;
  }
  .search-filters > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    font-weight: 700;
    color: var(--brand-blue);
    list-style: none;
  }
  .search-filters > summary::-webkit-details-marker {
    display: none;
  }
  .search-filters[open] > summary {
    border-bottom: 1px solid var(--line);
  }
  .search-filters[open] > summary span {
    transform: rotate(45deg);
  }
  .search-layout aside #filters {
    display: block;
    background: white;
    padding: 22px 20px;
  }
  .search-layout .field {
    margin-bottom: 20px;
  }
  .search-layout fieldset {
    margin-bottom: 20px;
    padding-bottom: 20px;
  }
  .search-layout .field-pair .field {
    margin-bottom: 0;
  }
  .filter-title {
    margin-bottom: 20px;
  }
  .filter-submit {
    width: 100%;
  }
  .results-toolbar h2 {
    font-size: 24px;
  }
  .results-toolbar h2 span {
    font-size: 15px;
  }
  .results-toolbar label {
    font-size: 12px;
    margin-right: auto;
  }
  .results-toolbar h2 {
    width: 100%;
    margin-bottom: 8px;
  }
  .results-toolbar select {
    font-size: 13px;
    width: 175px;
    min-height: 44px;
  }
  .cards {
    gap: 22px;
  }
  .card .eyebrow {
    font-size: 11px;
  }
  .card h2 {
    font-size: 25px;
  }
  .card-body {
    padding: 20px;
  }
  .card-summary {
    display: -webkit-box;
  }
  .card-bottom {
    display: flex;
  }
  .card-bottom strong {
    font-size: 26px;
  }
  .card-bottom > span {
    display: block;
  }
  .card-availability {
    font-size: 12px;
  }
  .rooms {
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

.preserve-lines,
.renovation-notes {
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.company-section {
  border-top: 4px solid var(--yellow);
  padding-top: 36px;
  margin-top: 36px;
}
.company-section > h2 {
  margin-top: 12px;
}
.renovations {
  margin-top: 32px;
}
.renovation-card {
  margin: 20px 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.renovation-planned {
  border-top: 4px solid var(--brand-blue);
  background: var(--klik-tint-1);
}
.renovation-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}
.renovations .renovation-heading h3 {
  color: var(--brand-blue);
  font-size: 20px;
  line-height: 1.35;
  margin: 0;
}
.renovation-heading > span,
.renovation-history summary > span:last-child {
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}
.renovation-group {
  display: grid;
  grid-template-columns: 115px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.renovation-group h4 {
  font-family: "Lato", sans-serif;
  color: var(--brand-blue);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
}
.renovation-group ul {
  margin: 0;
  padding: 0 0 0 18px;
}
.renovation-group li {
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 12px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.renovation-group li:last-child {
  margin-bottom: 0;
}
.renovation-group li::marker {
  color: var(--brand-blue);
}
.renovation-history {
  margin-top: 16px;
}
.renovation-history summary {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  color: var(--brand-blue);
  font-weight: 700;
  font-size: 14px;
}
.renovation-history summary > span:last-child {
  margin-left: 12px;
  font-weight: 400;
}
.renovation-history[open] summary {
  margin-bottom: 16px;
}
.renovation-date-note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 0;
}
@media (max-width: 700px) {
  .renovation-card {
    padding: 20px 16px;
  }
  .renovation-heading {
    display: block;
  }
  .renovation-heading > span {
    display: block;
    margin-top: 8px;
  }
  .renovation-group {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .renovation-history summary > span:last-child {
    display: block;
    margin: 8px 0 0;
  }
}
.renovation-notes {
  font-size: 14px;
  line-height: 1.8;
  margin-top: 20px;
}
.listing-tabs {
  flex-wrap: wrap;
  gap: 20px 28px;
}
@media (max-width: 700px) {
  .listing-tabs {
    gap: 14px 20px;
  }
}
.details-section dl > div {
  font-size: 14px;
}
.all-photos img {
  border-radius: 8px;
}

/* Live search and the shared public map. */
a.card {
  display: block;
  color: inherit;
  text-decoration: none;
}
a.card:focus-visible,
.map-card:focus-visible {
  outline: 3px solid var(--brand-blue);
  outline-offset: 3px;
}
.view-switch {
  display: flex;
  width: fit-content;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  margin: 0 0 16px;
}
.view-switch button {
  padding: 10px 24px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.view-switch button[aria-pressed="true"] {
  background: var(--brand-blue);
  color: white;
}
.view-switch button:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}
.search-status {
  color: var(--muted);
  font-size: 13px;
  min-height: 20px;
  margin-bottom: 14px;
}
[data-results-content][aria-busy="true"],
.property-map[aria-busy="true"] {
  opacity: 0.6;
}
.live-search:not(.search-failed) .filter-submit {
  display: none;
}
.results,
.listing-media {
  scroll-margin-top: 100px;
}
.listing-media {
  margin-bottom: 0;
}
.property-map {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper);
}
.map-stage {
  position: relative;
  isolation: isolate;
}
.map-canvas {
  height: 560px;
  min-height: 360px;
  background: #e8edf0;
}
.listing-media .map-canvas {
  height: 450px;
}
.map-message,
.map-summary {
  padding: 12px 18px;
  margin: 0;
  font-size: 13px;
}
.map-summary {
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.map-retry {
  margin: 0 18px 14px;
}
.property-map .leaflet-container {
  font-family: Lato, sans-serif;
}
.property-map .leaflet-control-attribution {
  font-size: 11px;
}
.map-price-pin {
  background: none;
  border: 0;
}
.map-price-pin span {
  display: block;
  background: var(--brand-blue);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 20px;
  padding: 5px 3px;
  text-align: center;
  font:
    700 12px Lato,
    sans-serif;
  box-shadow: 0 2px 8px #0004;
  white-space: nowrap;
}
.map-price-pin:hover span,
.map-price-pin:focus span {
  background: var(--klik-primary-hover);
  outline: 3px solid var(--klik-accent);
}
.map-selection {
  position: absolute;
  z-index: 1000;
  right: 12px;
  top: 12px;
  width: min(295px, calc(100% - 72px));
  max-height: calc(100% - 48px);
  overflow: auto;
  background: white;
  border-radius: 9px;
  box-shadow: 0 5px 28px rgb(var(--klik-shadow-rgb) / .25);
  padding: 15px;
}
.map-selection h3 {
  font-size: 17px;
  margin: 0 25px 14px 0;
}
.map-close {
  position: absolute;
  top: 5px;
  right: 7px;
  border: 0;
  background: white;
  font-size: 27px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  color: var(--dark);
}
.map-card {
  display: block;
  color: var(--dark);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 12px;
}
.map-card:hover {
  border-color: var(--brand-blue);
}
.map-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
}
.map-card-body {
  display: grid;
  gap: 6px;
  padding: 12px;
}
.map-card-body strong {
  font-size: 17px;
}
.map-card-body span {
  font-size: 12px;
}
.map-card-body b,
.map-card-link {
  color: var(--brand-blue);
}
.view-switch[hidden],
#listing-photos[hidden],
.property-map[hidden],
.map-stage[hidden],
.map-selection[hidden],
[data-results-content][hidden],
[data-clear-filters][hidden],
.map-retry[hidden],
.nearby-retry[hidden],
.nearby-results[hidden] {
  display: none;
}
@media (max-width: 700px) {
  .map-canvas {
    height: 520px;
  }
  .listing-media .map-canvas {
    height: 420px;
  }
  .map-selection {
    top: auto;
    bottom: 26px;
    left: 10px;
    right: 10px;
    width: auto;
    max-height: 48%;
    padding: 12px;
  }
  .map-card {
    display: flex;
  }
  .map-card img {
    width: 90px;
    height: 120px;
    flex-shrink: 0;
  }
  .map-card-body {
    min-width: 0;
    padding: 9px;
  }
  .map-card-body strong {
    font-size: 15px;
  }
}
.map-address {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  margin: 0;
  font-size: 14px;
}
.map-address a {
  color: var(--brand-blue);
}

.view-switch [data-media] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.view-icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

/* Give property photos the full phone width, including the expanded viewer. */
@media (max-width: 700px) {
  html:has(#lightbox[open]) {
    overflow: hidden;
  }
  .listing-media .gallery {
    display: block;
    margin-inline: -20px;
    border-radius: 0;
  }
  .listing-media .gallery-image.main-image {
    display: block;
  }
  .listing-media .gallery-image:not(.main-image) {
    display: none;
  }
  .listing-media .gallery-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }
  .all-photos > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-inline: -20px;
  }
  .all-photos img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    border-radius: 0;
  }
  #lightbox {
    background: #101b2a;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    padding: calc(60px + env(safe-area-inset-top, 0px)) 0
      calc(64px + env(safe-area-inset-bottom, 0px));
    border-radius: 0;
  }
  #lightbox img {
    display: block;
    height: 100%;
  }
  #lightbox button {
    width: 44px;
    height: 44px;
  }
  #lightbox [data-close] {
    top: calc(10px + env(safe-area-inset-top, 0px));
    right: 12px;
  }
  #lightbox [data-prev],
  #lightbox [data-next] {
    top: auto;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
  #lightbox [data-prev] {
    left: calc(50% - 112px);
  }
  #lightbox [data-next] {
    right: calc(50% - 112px);
  }
  #lightbox p {
    position: absolute;
    left: 50%;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    margin: 0;
  }
}



/* The map preview keeps photo controls outside the links to the listing. */
.map-card-gallery { position: relative; background: var(--paper); }
.map-card-photo { display: block; }
.map-card-gallery img { display: block; width: 100%; height: 165px; object-fit: cover; }
.map-photo-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 1px solid #fff; border-radius: 50%; background: #fffef5ed; color: var(--dark); padding: 0; font: 32px/1 Arial, sans-serif; cursor: pointer; box-shadow: 0 2px 6px #0002; }
.map-photo-nav.previous { left: 6px; }
.map-photo-nav.next { right: 6px; }
.map-photo-nav:hover { background: white; }
.map-photo-nav:focus-visible, .map-card-photo:focus-visible, .map-card-body:focus-visible { outline: 3px solid var(--brand-blue); outline-offset: -3px; }
.map-photo-count { position: absolute; bottom: 8px; right: 8px; border-radius: 12px; background: color-mix(in srgb, var(--klik-ink) 87%, transparent); color: white; padding: 2px 9px; font: 700 12px/1.6 Lato, sans-serif; pointer-events: none; }
@media (max-width: 700px) {
  .map-selection { max-height: 68%; }
  .map-card { display: block; }
  .map-card-gallery img { width: 100%; height: 150px; }
}

.terms-summary { margin: 0 0 36px; padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--klik-tint-1); }
.terms-summary-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.terms-summary h2 { margin: 0; font-size: 24px; color: var(--dark); }
.terms-summary-heading a { font-size: 13px; color: var(--brand-blue); white-space: nowrap; }
.terms-summary dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 24px; margin: 0; }
.terms-summary dl > div { display: block; padding: 0; border: 0; }
.terms-summary dt { color: var(--muted); font-size: 13px; margin-bottom: 5px; }
.terms-summary dd { margin: 0; font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.terms-summary dd small { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; font-weight: 400; line-height: 1.5; white-space: pre-line; }
.nearby-controls { margin: 14px 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--klik-tint-1); min-width: 0; }
.nearby-controls legend { padding: 0 6px; font-size: 18px; font-weight: 700; color: var(--dark); }
.nearby-options { display: flex; flex-wrap: wrap; gap: 10px; }
.nearby-option { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border: 1px solid var(--klik-field-border); background: white; border-radius: 24px; cursor: pointer; font-size: 14px; }
.nearby-option:has(input:checked) { border-color: var(--brand-blue); background: var(--klik-tint-2); }
.nearby-option input { accent-color: var(--brand-blue); width: 17px; height: 17px; }
.nearby-symbol { display: inline-flex; }
.nearby-note, .nearby-status { margin: 10px 0 0; font-size: 13px; line-height: 1.5; }
.nearby-note { color: var(--muted); }
.nearby-note a { text-decoration: underline; }
.nearby-results { margin: 16px 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.nearby-results summary { cursor: pointer; font-weight: 700; }
.nearby-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); list-style: none; padding: 0; margin: 12px 0 0; gap: 8px; }
.nearby-result { display: flex; text-align: left; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 10px; background: white; border: 1px solid var(--line); border-radius: 6px; color: var(--dark); }
.nearby-result span { overflow-wrap: anywhere; }
.nearby-result small { white-space: nowrap; color: var(--muted); }
.nearby-marker-symbol { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 2px solid white; border-radius: 50%; box-shadow: 0 2px 6px #0004; color: white; background: var(--klik-primary); }
.nearby-marker-symbol.nearby-education { background: #675018; }
.nearby-marker-symbol.nearby-transit { background: #14624a; }
.nearby-popup strong { font-size: 15px; }
.nearby-popup p { margin: 8px 0; }
.nearby-popup a { display: inline-block; padding: 8px 0; }
@media (max-width: 700px) {
  .terms-summary { padding: 18px; }
  .terms-summary-heading { display: block; }
  .terms-summary h2 { font-size: 22px; margin-bottom: 10px; }
  .terms-summary dl { gap: 18px 14px; }
  .terms-summary dd { font-size: 15px; }
  .nearby-controls { padding: 12px; }
  .nearby-option { padding: 9px 10px; font-size: 13px; }
  .nearby-list { grid-template-columns: 1fr; }
}
@media (max-width: 360px) { .terms-summary dl { grid-template-columns: 1fr; } }

}
