/* ==========================================================================
   Vammalan Kiinteistönvälitys Oy LKV – site stylesheet
   Modern, dependency-free CSS (no Bootstrap). Mobile first.
   ========================================================================== */

:root {
  --brand: #003399;
  --brand-700: #00287a;
  --brand-100: #dbe4f7;
  --brand-50: #eef2fb;
  --accent: #c9761a;
  --new: #0f7a3a;
  --ink: #1b2430;
  --ink-2: #4b5563;
  --ink-3: #6b7280;
  --paper: #ffffff;
  --paper-2: #f5f7fb;
  --line: #e3e8f0;
  --ok-bg: #e7f6ec;  --ok-ink: #155e33;  --ok-line: #9fd4b4;
  --err-bg: #fdecec; --err-ink: #8a1c1c; --err-line: #f2b3b3;
  --warn-bg: #fff6e5; --warn-ink: #7a4b00; --warn-line: #f5d38a;
  --radius: 12px;
  --radius-s: 8px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-2: 0 4px 6px -1px rgba(16, 24, 40, .08), 0 12px 24px -6px rgba(16, 24, 40, .14);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-h: 54px;
}
@media (max-width: 860px) { :root { --header-h: 50px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); scroll-padding-bottom: 100px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.6 var(--font);
  color: var(--ink);
  background: var(--paper);
}
body.no-scroll { overflow: hidden; }
/* sticky footer: short pages (retired listing, error states) keep the footer at the viewport bottom */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body > main { flex: 1 0 auto; }
body > .footer { flex-shrink: 0; margin-top: auto; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; font-weight: 700; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); }
a:hover { color: var(--brand-700); }
:focus-visible { outline: 3px solid #7aa2ff; outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.container { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: 1.25rem; }
.section { padding: 3.5rem 0; }
.section--alt { background: var(--paper-2); }
.section__head { margin-bottom: 1.5rem; }
.section__head h2 { margin-bottom: .3rem; }
.section__head p { margin: 0; color: var(--ink-3); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; margin-bottom: .5rem; }
.muted { color: var(--ink-3); }
.lead { font-size: 1.1rem; }
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-s);
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.2rem; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 600; line-height: 1.2; cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-700); color: #fff; }
.btn--outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn--outline:hover { background: var(--brand-50); }
.btn--light { background: #fff; color: var(--brand); }
.btn--light:hover { background: var(--brand-50); color: var(--brand-700); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .75); }
.btn--ghost-light:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.btn--sm { padding: .45rem .9rem; font-size: .9rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: default; }
.btn svg { width: 1.1em; height: 1.1em; fill: currentColor; }

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--brand); color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 30px; width: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; align-items: center; }
.site-nav a:not(.btn) { color: #fff; text-decoration: none; padding: .45rem .8rem; border-radius: var(--radius-s); font-weight: 600; font-size: .95rem; display: block; }
.site-nav a:not(.btn):hover, .site-nav a:not(.btn):focus-visible { background: rgba(255, 255, 255, .14); }
.site-nav a[aria-current="true"] { background: rgba(255, 255, 255, .22); }
.site-nav .btn { margin-left: .5rem; }
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0; background: transparent; border: 0; border-radius: var(--radius-s); cursor: pointer;
}
.nav-toggle span { display: block; width: 24px; height: 2px; margin: 0 auto; background: #fff; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .brand img { height: 26px; }
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; left: 0; right: 0; top: var(--header-h);
    background: var(--brand-700); box-shadow: 0 12px 24px rgba(0, 0, 0, .25);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform .2s ease, opacity .2s ease, visibility 0s .2s;
  }
  .site-nav.is-open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: .75rem 1rem 1.25rem; gap: .15rem; }
  .site-nav a:not(.btn) { padding: .85rem 1rem; font-size: 1.05rem; }
  .site-nav .btn { margin: .5rem 1rem 0; }
}

/* ---------- Page banner (status messages) ---------- */
.page-banner { position: sticky; top: var(--header-h); z-index: 40; }
.page-banner .alert { border-radius: 0; margin: 0; }

/* ---------- Hero ----------
   A gradient with a faint pattern instead of a stretched photo: the only site
   photo (vammala2.jpg) is 1116x163 px and pixelates when used as a cover
   background. It is shown sharp as a slim strip above "Tietoa meistä" instead.
   With a high-resolution photo (2000 px wide or more) a photo hero is one line:
   background: #0b1a3f url("../hero.jpg") center / cover no-repeat;  + a dark overlay in ::before */
.hero {
  position: relative; isolation: isolate; color: #fff; overflow: hidden;
  background: linear-gradient(135deg, #001a4d 0%, var(--brand) 55%, #1c55c9 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 90% at 88% 15%, rgba(255, 255, 255, .16), transparent 60%),
    radial-gradient(40% 60% at 10% 100%, rgba(0, 0, 0, .18), transparent 70%),
    repeating-linear-gradient(-55deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 24px);
}
.hero .container { padding-block: 3rem 2.5rem; }
.hero .eyebrow { color: rgba(255, 255, 255, .8); }
.hero h1 { color: #fff; max-width: 24ch; margin-bottom: .6rem; font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
.hero p { max-width: 58ch; font-size: 1.05rem; color: rgba(255, 255, 255, .92); margin-bottom: 1.35rem; }
/* Skyline strip: the photo at (close to) its native height, so it stays sharp. */
.skyline-band { background: #0b1a3f; }
.skyline-band img { display: block; width: 100%; height: clamp(96px, 12vw, 172px); object-fit: cover; object-position: center 62%; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__stats { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.hero__stats li {
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25);
  padding: .35rem .85rem; border-radius: 999px; font-size: .9rem; font-weight: 600;
}
.hero__stats a { color: inherit; text-decoration: none; }

/* ---------- Listings ---------- */
/* Category switcher stays under the header while scrolling the listings, so the
   category can be changed from anywhere in the list. Tabs on wide screens, a
   native dropdown on phones (a scrolling strip hides categories, wrapped pills
   take three rows). */
.tabs-wrap {
  position: sticky; top: var(--header-h); z-index: 30;
  margin: 0 -1.25rem 1.25rem; padding: 0 1.25rem;
  background: var(--paper-2); border-bottom: 1px solid var(--line);
  transition: box-shadow .15s;
}
.tabs-wrap.is-stuck { box-shadow: 0 8px 14px -10px rgba(16, 24, 40, .35); }
.tabs-sentinel { height: 1px; margin-top: -1px; }
.tabs { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
/* Fading edge + chevron while more tabs are hidden to the right. */
.tabs-wrap.has-overflow::after {
  content: "\203A"; position: absolute; top: 0; bottom: 1px; right: 0; width: 64px;
  display: flex; align-items: center; justify-content: flex-end; padding-right: 1rem;
  color: var(--brand); font-size: 1.6rem; font-weight: 700; pointer-events: none;
  background: linear-gradient(90deg, rgba(245, 247, 251, 0), var(--paper-2) 60%);
}
.tabs-select { display: none; padding: .6rem 0; }
.tabs-select .select { font-weight: 600; color: var(--brand); }
@media (max-width: 700px) {
  .tabs { display: none; }
  .tabs-select { display: block; }
  .tabs-wrap.has-overflow::after { display: none; }
}
.toolbar { scroll-margin-top: calc(var(--header-h) + 60px); }
.tab {
  flex: 0 0 auto; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px;
  padding: .75rem .9rem; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap;
}
.tab:hover { color: var(--brand); }
.tab[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.tab .count { display: inline-block; margin-left: .4rem; background: var(--brand-50); color: var(--brand); border-radius: 999px; padding: 0 .55rem; font-size: .8rem; line-height: 1.5; }
.toolbar { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end; margin-bottom: 1.5rem; }
.toolbar .field { margin: 0; flex: 1 1 150px; max-width: 230px; }
.toolbar__count { margin-left: auto; color: var(--ink-3); font-size: .95rem; align-self: center; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1.25rem; }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1);
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.card:focus-within { box-shadow: 0 0 0 3px var(--brand-100), var(--shadow-2); }
.card__media { position: relative; aspect-ratio: 4 / 3; background: #e9edf3; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__noimg { display: grid; place-items: center; height: 100%; color: var(--ink-3); }
.card__body { padding: .9rem 1rem 1rem; display: grid; gap: .2rem; }
.card__price { margin: 0; font-weight: 700; font-size: 1.2rem; color: var(--brand); }
.card__title { margin: 0; font-size: 1.05rem; line-height: 1.35; }
.card__link { color: inherit; text-decoration: none; }
.card__link::after { content: ""; position: absolute; inset: 0; }
.card__link:focus-visible { outline: none; }
.card__loc { margin: 0; color: var(--ink-3); font-size: .95rem; }
.card__meta { list-style: none; margin: .35rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem .5rem; color: var(--ink-2); font-size: .9rem; }
.card__meta li + li::before { content: "·"; margin-right: .5rem; color: var(--ink-3); }
.card__badges { position: absolute; top: .6rem; left: .6rem; right: .6rem; z-index: 1; display: flex; flex-wrap: wrap; gap: .35rem; pointer-events: none; }
.badge {
  display: inline-block; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: .25rem .6rem; border-radius: 999px; line-height: 1.4; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.badge--new { background: var(--new); }
.badge--rent { background: var(--accent); }
.badge--reserved { margin-left: auto; background: #3b4252; }
.dialog__badges { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .4rem; font-size: .85rem; }
.dialog__badges .badge--reserved { margin-left: 0; }
.hero__stats li.stat--new { background: var(--new); border-color: transparent; }
.listing-status { margin: 0 0 1rem; }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--ink-3); background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }
.skeleton { background: linear-gradient(90deg, #eef1f6 25%, #e3e8f0 37%, #eef1f6 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; }
.card--skeleton .card__media { background: none; }
.card--skeleton .line { height: 14px; border-radius: 4px; margin: .35rem 0; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.listing-foot { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-top: 1.5rem; color: var(--ink-3); font-size: .9rem; }
/* "Show more" below the grid */
.load-more { display: flex; flex-direction: column; align-items: center; gap: .75rem; margin-top: 1.75rem; }
.load-more__count { margin: 0; color: var(--ink-3); font-size: .95rem; }
.load-more__bar { width: min(280px, 100%); height: 6px; border-radius: 999px; background: var(--brand-100); overflow: hidden; }
.load-more__bar span { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .2s; }
.load-more__actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }

/* ---------- Detail dialog ---------- */
.dialog {
  width: min(1000px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem);
  padding: 0; border: 0; border-radius: var(--radius); box-shadow: var(--shadow-2); color: var(--ink);
  overscroll-behavior: contain;
}
.dialog::backdrop { background: rgba(8, 14, 32, .65); }
.dialog__header {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; gap: 1rem;
  padding: 1rem 1.25rem; background: #fff; border-bottom: 1px solid var(--line);
}
.dialog__heading { min-width: 0; flex: 1; }
.dialog__title { margin: 0; font-size: 1.25rem; }
.dialog__sub { margin: .15rem 0 0; color: var(--ink-3); font-size: .95rem; }
.dialog__price { text-align: right; font-weight: 700; color: var(--brand); font-size: 1.25rem; white-space: nowrap; }
.dialog__price small { display: block; font-size: .75rem; font-weight: 500; color: var(--ink-3); }
/* Primary actions live in the sticky header so they are reachable without scrolling.
   On desktop the bar is transparent to layout (its children sit in the header row);
   on phones it becomes its own row: price left, buttons right. */
.dialog__bar { display: contents; }
.dialog__cta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: flex-end; }
.dialog__close {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--paper-2); color: var(--ink);
  font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.dialog__close:hover { background: var(--brand-100); }
.dialog__body { padding: 1.25rem; }
.gallery { position: relative; background: #0e1526; border-radius: var(--radius-s); overflow: hidden; }
/* Fixed-height stage: the dialog keeps its size, every image is letterboxed
   inside the stage in full (object-fit: contain) over a blurred copy of itself. */
.gallery__main { position: relative; width: 100%; height: clamp(260px, 62vh, 620px); overflow: hidden; touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none; }
.gallery__main img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; -webkit-user-drag: none; }
.gallery__main .gallery__img { object-fit: contain; z-index: 1; }
.gallery__main .gallery__bg { object-fit: cover; filter: blur(24px) saturate(.8); transform: scale(1.15); opacity: .55; pointer-events: none; }
.gallery__btn { z-index: 2;
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow-1);
}
.gallery__btn:hover { background: #fff; }
.gallery__btn--prev { left: .75rem; }
.gallery__btn--next { right: .75rem; }
.gallery__counter { position: absolute; z-index: 2; right: .75rem; bottom: .75rem; background: rgba(0, 0, 0, .62); color: #fff; padding: .2rem .65rem; border-radius: 999px; font-size: .85rem; }
.thumbs { display: flex; gap: .4rem; overflow-x: auto; padding: .6rem 0 .2rem; scroll-snap-type: x proximity; scrollbar-width: thin; }
.thumbs button {
  flex: 0 0 auto; width: 88px; height: 66px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden;
  background: #e9edf3; cursor: pointer; scroll-snap-align: start; opacity: .8;
}
.thumbs button[aria-current="true"] { border-color: var(--brand); opacity: 1; }
.thumbs button:hover { opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin: 1.25rem 0; }
.fact { background: var(--paper-2); border-radius: var(--radius-s); padding: .7rem .9rem; }
.fact__label { display: block; font-size: .75rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.fact__value { font-weight: 700; font-size: 1.05rem; overflow-wrap: anywhere; }
.presentation { white-space: pre-line; line-height: 1.7; margin: 0; }
.dialog__section { margin-top: 1.75rem; }
.dialog__section h3 { font-size: 1.05rem; padding-bottom: .4rem; border-bottom: 2px solid var(--brand-100); margin-bottom: .75rem; }
.dl { display: grid; grid-template-columns: minmax(160px, 1fr) 2fr; gap: .4rem 1rem; margin: 0; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; white-space: pre-line; }
.agent { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; background: var(--brand-50); border-radius: var(--radius-s); padding: 1rem 1.25rem; margin-top: 1.75rem; }
.agent__text { flex: 1 1 240px; }
.agent__text p { margin: 0; }
.dialog__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
@media (max-width: 640px) {
  .dialog { width: 100vw; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; max-width: none; border-radius: 0; margin: 0; }
  .dialog__header { display: block; padding: .9rem 1rem; }
  .dialog__heading { padding-right: 2.75rem; }             /* room for the close button */
  .dialog__close { position: absolute; top: .7rem; right: .75rem; }
  .dialog__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .75rem; margin-top: .6rem; }
  .dialog__price { text-align: left; display: flex; flex-direction: column; }
  .dialog__price small { display: block; }
  .dialog__body { padding: 1rem; }
  .dl { grid-template-columns: 1fr; gap: .1rem; }
  .dl dt { margin-top: .6rem; font-size: .85rem; }
  .gallery__main { height: clamp(220px, 46vh, 420px); }
}

/* ---------- Services / fees ---------- */
.two-col { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 800px) { .two-col { grid-template-columns: 1fr 1.4fr; } }
.note { font-size: .9rem; color: var(--ink-3); margin: 0; }
.subhead { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 1rem; }
.section__head--sub { margin-top: 3rem; }
.section__head--sub h3 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); margin-bottom: .3rem; }
/* What we broker: one panel with a short text + CTA and the property types as chips */
.broker-panel {
  display: grid; grid-template-columns: 1fr; gap: 1.5rem 2.5rem;
  background: var(--brand-50); border-radius: var(--radius); padding: 1.75rem;
}
@media (min-width: 860px) { .broker-panel { grid-template-columns: minmax(280px, 1fr) 1.4fr; align-items: center; padding: 2.25rem 2.5rem; } }
.broker-panel .eyebrow { color: var(--brand); margin-bottom: .35rem; }
.broker-panel h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); margin-bottom: .5rem; }
.broker-panel p { color: var(--ink-2); }
.broker-panel__text .btn { margin-top: .25rem; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; align-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem .95rem .55rem .7rem; background: #fff; border: 1px solid var(--brand-100); border-radius: 999px;
  font-weight: 600; font-size: .95rem; color: var(--ink); box-shadow: var(--shadow-1);
}
.chip svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Fees: pricing cards */
.pricing { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.price-card {
  display: flex; flex-direction: column; gap: .8rem;
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.5rem; box-shadow: var(--shadow-1);
}
.price-card__label { margin: 0; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--brand); }
.price-card__figure { margin: 0; font-size: clamp(1.6rem, 2.4vw, 2rem); font-weight: 800; line-height: 1.1; color: var(--ink); }
.price-card__figure small { display: block; margin-top: .3rem; font-size: .9rem; font-weight: 500; color: var(--ink-3); line-height: 1.4; }
.price-card ul { list-style: none; margin: .25rem 0 0; padding: 0; display: grid; gap: .5rem; font-size: .95rem; color: var(--ink-2); }
.price-card li { position: relative; padding-left: 1.5rem; }
.price-card li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--brand); font-weight: 700; }
.price-card__note { margin: auto 0 0; padding-top: .5rem; font-size: .85rem; color: var(--ink-3); }
.pricing-foot { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; justify-content: space-between; margin-top: 1.75rem; }

/* ---------- Contacts ---------- */
.people { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.person { display: flex; gap: 1rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow-1); }
.person img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: top; flex: 0 0 auto; }
.person h3 { margin: 0 0 .15rem; }
.person p { margin: 0; }
.person .role { color: var(--ink-3); font-size: .9rem; margin-bottom: .35rem; }
.contact-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.contact-links a { text-decoration: none; }
.contact-links a:hover { text-decoration: underline; }
.office { display: grid; gap: 1.5rem; grid-template-columns: 1fr; margin-top: 1.5rem; }
@media (min-width: 800px) { .office { grid-template-columns: 1fr 1fr; } }
.office__card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow-1); }
.office__card h3 { margin-bottom: .75rem; }
.office__card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; }
.office__card dt { color: var(--ink-3); }
.office__card dd { margin: 0; }
.map { border: 0; width: 100%; height: 100%; min-height: 260px; border-radius: var(--radius); background: var(--paper-2); }
.social { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1rem; }
.form__row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-1); }
.forms { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .forms { grid-template-columns: 3fr 2fr; } }
.field { display: grid; gap: .35rem; margin: 0; align-content: start; }
.field > label, .legend { font-weight: 600; font-size: .95rem; }
.req::after { content: " *"; color: #b42318; }
.hint { font-size: .85rem; color: var(--ink-3); }
.form input:not([type="radio"]):not([type="checkbox"]),
.form select, .form textarea, .select {
  width: 100%; padding: .65rem .8rem; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #c9d1de; border-radius: var(--radius-s); min-height: 44px;
}
.form select, .select { appearance: auto; }
.form textarea { resize: vertical; min-height: 120px; }
.form input:focus, .form select:focus, .form textarea:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.form input:user-invalid, .form textarea:user-invalid, .form select:user-invalid { border-color: #b42318; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 1rem 1.1rem 1.1rem; margin: 0; min-width: 0; }
fieldset legend { padding: 0 .4rem; font-weight: 700; }
.choices { display: grid; gap: .45rem; }
.choices--inline { grid-template-columns: repeat(auto-fit, minmax(140px, max-content)); }
.choice { display: flex; align-items: flex-start; gap: .55rem; font-weight: 400; cursor: pointer; }
.choice input { width: 20px; height: 20px; margin: .2rem 0 0; flex: 0 0 auto; accent-color: var(--brand); }
.form__actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.alert { padding: .9rem 1rem; border-radius: var(--radius-s); border: 1px solid; margin: 0; }
.alert--ok { background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok-line); }
.alert--error { background: var(--err-bg); color: var(--err-ink); border-color: var(--err-line); }
.alert--warn { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-line); }
.alert a { color: inherit; }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
/* reCAPTCHA v3 badge would sit on top of the "to top" button; Google allows hiding it
   when the notice text with the policy links is shown next to the form (it is). */
.grecaptcha-badge { visibility: hidden !important; }

/* Listing attached to a message / application */
.listing-summary[hidden] { display: none; }
.listing-summary--form { position: relative; margin: 0 0 1.25rem; padding-right: 3rem; }
.listing-summary__remove { position: absolute; top: .5rem; right: .5rem; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.listing-summary__remove:hover { background: var(--brand-100); }
@media (max-width: 520px) {
  .listing-summary img { width: 88px; height: 66px; }
}
.listing-summary { display: flex; gap: 1rem; align-items: center; padding: 1rem; background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: var(--radius); margin-top: 1rem; }
.listing-summary img { width: 120px; height: 90px; object-fit: cover; border-radius: var(--radius-s); flex: 0 0 auto; }
.listing-summary__body .eyebrow { color: var(--brand); margin-bottom: .2rem; }
.listing-summary__title { font-size: 1.1rem; margin: 0 0 .2rem; }
.listing-summary__meta { margin: 0 0 .3rem; color: var(--ink-2); }

/* ---------- Search watch panel ---------- */
.watch-panel { display: grid; grid-template-columns: 1fr; gap: 1.5rem 2.5rem; margin-top: 2.5rem; padding: 1.75rem; background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: var(--radius); }
@media (min-width: 900px) { .watch-panel { grid-template-columns: minmax(260px, 1fr) 1.6fr; align-items: start; padding: 2rem 2.25rem; } }
.watch-panel .eyebrow { color: var(--brand); margin-bottom: .35rem; }
.watch-panel h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); margin-bottom: .5rem; }
.watch-panel__text p { color: var(--ink-2); }
.watch-panel .form__row { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* ---------- Static listing pages (kohde/<id>/) ---------- */
.breadcrumb { font-size: .9rem; color: var(--ink-3); margin-bottom: .75rem; }
.breadcrumb a { text-decoration: none; }
.listing-head { padding-bottom: 1.5rem; }
.listing-head__row { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: flex-end; justify-content: space-between; }
.listing-head__badges { display: flex; gap: .35rem; margin: 0 0 .5rem; min-height: 1.2rem; }
.listing-head h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: .25rem; }
.listing-head__sub { margin: 0; color: var(--ink-2); }
.listing-head__price { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; color: var(--brand); line-height: 1.1; }
.listing-head__price small { display: block; font-size: .85rem; font-weight: 500; color: var(--ink-3); }
.listing-head__side { display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; }
.listing-head__cta { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
@media (max-width: 700px) {
  .listing-head__side { width: 100%; align-items: stretch; }
  .listing-head__price { text-align: left; }
  .listing-head__cta .btn { flex: 1 1 auto; }
}
.listing-layout { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .listing-layout { grid-template-columns: 1.25fr 1fr; align-items: start; } }
.listing-figure { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: #e9edf3; }
.listing-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.listing-figure__count { position: absolute; right: .75rem; bottom: .75rem; background: rgba(0, 0, 0, .62); color: #fff; padding: .2rem .65rem; border-radius: 999px; font-size: .85rem; }
.listing-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; margin-top: .5rem; }
.listing-thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.listing-actions { margin-top: 1.25rem; }
.listing-facts { margin-top: 0; }

/* ---------- Rental application page ---------- */
.page-head { background: var(--brand-50); padding: 2.5rem 0 2rem; }
.page-head h1 { margin-bottom: .4rem; }
.page-head p { margin: 0; color: var(--ink-2); }
.applicants { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .applicants { grid-template-columns: 1fr 1fr; } }
.rent-form .form-card { margin-bottom: 1.25rem; }
.sticky-actions { position: sticky; bottom: 0; background: rgba(255, 255, 255, .95); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); padding: .9rem 0; border-top: 1px solid var(--line); }

/* ---------- Footer ---------- */
.partners-band { background: #fff; border-top: 1px solid var(--line); padding: 1.75rem 0; }
.partners { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: center; justify-content: center; }
.partners img { height: 56px; width: auto; }
.footer { background: #0f1a33; color: #c7d0e0; padding: 2.5rem 0 1.5rem; font-size: .95rem; }
.footer a { color: #fff; }
.footer__grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 1.5rem; }
.footer h3 { color: #fff; font-size: 1rem; margin-bottom: .5rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.footer details { margin-top: .5rem; }
.footer summary { cursor: pointer; color: #fff; font-weight: 600; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 1rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; color: #9aa7c0; font-size: .85rem; }
.to-top { position: fixed; right: 1rem; bottom: 1rem; z-index: 30; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; box-shadow: var(--shadow-2); cursor: pointer; font-size: 1.2rem; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--brand-700); }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
