/* Rezido — "Dunav": white, ink text, one river blue for actions. Design notes: docs/design/README.md */

/* ---------- Fonts (self-hosted, SIL OFL 1.1, licence in static/fonts/) ---------- */
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/onest-latin-wght-normal.3db826ed1c5d.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/onest-latin-ext-wght-normal.3e2cb9888206.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  --ink: #1e2026;
  --ink-2: #4a4f5a;
  --ink-3: #6b707b;
  --line: #e2e4e9;
  --line-2: #c9ccd3;
  --canvas: #f5f6f8;
  --paper: #ffffff;
  --blue: #0b63ce;
  --blue-dark: #0a52ab;
  --blue-soft: #eaf2fd;
  --sun: #ffc53d;
  --sun-soft: #fff4d6;
  --ai: #0b63ce;
  --ai-soft: #eaf2fd;
  --ai-line: #c5dbf6;
  --star: #1e2026;
  --star-off: #d3d6dc;
  --danger: #b42318;
  --danger-soft: #fdeeec;
  --ok: #18794e;
  --ok-soft: #e6f4ec;

  --display: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --text: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --r-sm: 8px;
  --r-md: 12px;
  --wrap: 1280px;
  --wrap-wide: 1760px; /* pages of cards: home, search, saved */
  --gutter: 16px;
  --header-h: 64px;
  --shadow-float: 0 12px 32px rgba(30, 32, 38, 0.16), 0 2px 6px rgba(30, 32, 38, 0.08);
  --shadow-card: 0 6px 20px rgba(30, 32, 38, 0.1);
  --ring: 0 0 0 3px rgba(11, 99, 206, 0.28);
  --focus: 0 0 0 2px #fff, 0 0 0 4px var(--blue);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
@media (min-width: 768px) {
  :root { --gutter: 32px; --header-h: 76px; }
}
@media (min-width: 1280px) {
  :root { --gutter: 48px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "ss01" 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.015em; line-height: 1.1; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); }
h2 { font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem); }
h3 { font-size: 1.125rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
b, strong { font-weight: 600; }
small { font-size: 0.875rem; }
.num { font-variant-numeric: lining-nums; }
.muted { color: var(--ink-3); }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: var(--focus); border-radius: 4px; }
::selection { background: var(--blue-soft); color: var(--ink); }

.i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.25em; }
.i-sm { width: 1em; height: 1em; vertical-align: -0.15em; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: calc(760px + 2 * var(--gutter)); }
.wrap-text { max-width: calc(700px + 2 * var(--gutter)); }
/* Pages of cards use the width of the screen, like Airbnb; a flat's page and forms stay at
   1280 px, where text keeps a readable line. */
.page-wide .wrap { max-width: calc(var(--wrap-wide) + 2 * var(--gutter)); }
.page-wide .wrap.wrap-narrow { max-width: calc(760px + 2 * var(--gutter)); }
.page-wide .wrap.wrap-text { max-width: calc(700px + 2 * var(--gutter)); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); font-weight: 500;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8125rem; font-weight: 500; color: var(--ink-3);
  margin: 0 0 12px;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--blue); --btn-fg: #fff; --btn-bd: var(--blue);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  font: inherit; font-weight: 500; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
  color: var(--btn-fg); background: var(--btn-bg); border: 1px solid var(--btn-bd); border-radius: var(--r-sm);
  cursor: pointer; transition: background-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
}
.btn:hover { --btn-bg: var(--blue-dark); --btn-bd: var(--blue-dark); }
.btn:active { transform: translateY(1px); }
.btn-sun { --btn-bg: var(--sun); --btn-fg: var(--ink); --btn-bd: var(--sun); }
.btn-sun:hover { --btn-bg: #ffb703; --btn-bd: #ffb703; }
.btn-line { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--ink); }
.btn-line:hover { --btn-bg: var(--canvas); --btn-fg: var(--ink); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: transparent; text-decoration: underline; text-underline-offset: 3px; padding: 0 8px; }
.btn-ghost:hover { --btn-bg: var(--canvas); --btn-bd: var(--canvas); }
.btn-danger { --btn-bg: #fff; --btn-fg: var(--danger); --btn-bd: var(--danger); }
.btn-danger:hover { --btn-bg: var(--danger); --btn-fg: #fff; --btn-bd: var(--danger); }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 0.9375rem; }
.btn-wide { width: 100%; }
.btn-on-dark { --btn-bg: #fff; --btn-fg: var(--ink); --btn-bd: #fff; }
.btn-on-dark:hover { --btn-bg: #e9ebef; --btn-bd: #e9ebef; }
.link-button {
  font: inherit; color: var(--ink); background: none; border: 0; padding: 8px 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; min-height: 44px;
}
.link-button.danger, .danger { color: var(--danger); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; border-radius: var(--r-sm); }
.logo-mark { width: 30px; height: 30px; flex: none; }
.logo-word { font-family: var(--display); font-weight: 600; font-size: 1.5rem; letter-spacing: -0.04em; line-height: 1; }
.logo-city {
  font-size: 0.75rem; font-weight: 500; color: var(--ink-3);
  padding-left: 10px; border-left: 1px solid var(--line); line-height: 1.2;
}
.nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-weight: 500; text-decoration: none; border-radius: var(--r-sm); color: var(--ink-2);
}
.nav-link:hover { background: var(--canvas); color: var(--ink); }
.nav-link[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); border-radius: 0; }
.nav-cta { margin-left: 8px; }
.menu { position: relative; display: none; }
.menu > summary {
  list-style: none; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--r-sm); cursor: pointer; border: 1px solid var(--line);
}
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; z-index: 50;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-float); padding: 8px;
}
.menu-panel a { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 12px; text-decoration: none; font-weight: 500; border-radius: var(--r-sm); }
.menu-panel a:hover { background: var(--canvas); }
@media (max-width: 767px) {
  .nav .nav-link { display: none; }
  .nav-cta { margin-left: 0; }
  .menu { display: block; }
  .logo-city { display: none; }
}

/* "Kraj ili ulica" in the header of /stanovi/ (rezido.js: initPlaceSearch). */
.place-search { position: relative; flex: 0 1 420px; margin: 0 auto; display: none; }
@media (min-width: 900px) { .place-search { display: block; } }
/* Below 900px the search page header is logo mark, place box and menu, like Airbnb on a phone. */
@media (max-width: 899px) {
  .page-search .place-search { display: block; flex: 1 1 auto; min-width: 0; margin: 0; }
  .page-search .logo { margin-right: 0; }
  .page-search .logo-word, .page-search .logo-city, .page-search .nav .nav-link, .page-search .nav-cta { display: none; }
  .page-search .menu { display: block; }
  .page-search .place-search input { font-size: 1rem; min-height: 44px; padding-left: 16px; padding-right: 46px; }
  .page-search .place-search-go { right: 5px; top: 5px; }
  .page-search .place-list { position: fixed; left: var(--gutter); right: var(--gutter); top: calc(var(--header-h) - 2px); }
}
.place-search input {
  min-height: 48px; padding: 0 52px 0 20px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.9375rem;
  box-shadow: 0 1px 2px rgba(30, 32, 38, 0.06), 0 4px 12px rgba(30, 32, 38, 0.05);
}
.place-search input:focus-visible { border-radius: 999px; }
.place-search-go {
  position: absolute; right: 7px; top: 7px; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  background: var(--blue); color: #fff; display: grid; place-items: center; cursor: pointer;
}
.place-search-go:hover { background: var(--blue-dark); }
.place-search-go .i { width: 17px; height: 17px; }
.place-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60; margin: 0; padding: 8px; list-style: none;
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-float); max-height: min(440px, 70vh); overflow: auto;
}
.place-option { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.place-option .i { grid-row: span 2; width: 38px; height: 38px; padding: 9px; border-radius: 10px; background: var(--canvas); }
.place-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-hint { font-size: 0.8125rem; color: var(--ink-3); }
.place-option[aria-selected="true"], .place-option:hover { background: var(--canvas); }
.place-option[aria-selected="true"] .i, .place-option:hover .i { background: #fff; }
.place-none { padding: 10px 12px; color: var(--ink-3); font-size: 0.9375rem; }

/* ---------- Messages ---------- */
.messages { padding-top: 16px; display: grid; gap: 8px; }
.message {
  display: flex; gap: 12px; align-items: flex-start; margin: 0;
  padding: 14px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--canvas);
}
.message .i { margin-top: 2px; }
.message-success { background: var(--ok-soft); border-color: #b7dfc8; }
.message-success .i { color: var(--ok); }
.message-error { background: var(--danger-soft); border-color: #f5c2bc; }
.message-error .i { color: var(--danger); }
.message-info, .message-warning { background: var(--sun-soft); border-color: #f5dc9a; }

/* ---------- Trust marks ---------- */
.mark { display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; font-weight: 500; line-height: 1.2; white-space: nowrap; }
.mark-verified .i { color: var(--ink); }
.mark-fee {
  background: var(--sun); color: var(--ink); padding: 4px 10px 4px 8px; border-radius: 999px; font-weight: 600;
}
.mark-ai { color: var(--ai); }
.marks { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }

/* ---------- Condition from the photos (the AI score), as stars ---------- */
/* Stars are the condition seen on the photos, never ratings by people: the label says so where there is room. */
.stars { display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; line-height: 1; white-space: nowrap; color: var(--ink); }
.stars-row { display: inline-flex; gap: 1px; }
.stars-row .i { width: 14px; height: 14px; fill: var(--star-off); stroke: none; vertical-align: 0; }
.stars-1 .stars-row .i:nth-child(-n+1), .stars-2 .stars-row .i:nth-child(-n+2), .stars-3 .stars-row .i:nth-child(-n+3),
.stars-4 .stars-row .i:nth-child(-n+4), .stars-5 .stars-row .i:nth-child(-n+5) { fill: var(--star); }
.stars-val { font-weight: 500; font-variant-numeric: tabular-nums; }
.stars-label { color: var(--ink-3); }
.stars-lg .stars-row .i { width: 22px; height: 22px; }
.stars-lg .stars-val { font-size: 1.25rem; font-weight: 600; }
.meter-none { color: var(--ink-3); font-size: 0.875rem; }

/* ---------- Listing card ---------- */
.grid { display: grid; gap: 28px 20px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .page-wide .grid { grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 32px 24px; } }
@media (min-width: 1240px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card { position: relative; min-width: 0; }
.card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; border-radius: var(--r-md); }
.card-media { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; background: var(--canvas); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.card-link:hover .card-media img { transform: scale(1.03); }
.card-link:hover .card-title { text-decoration: underline; }
.no-photo { display: grid; place-items: center; height: 100%; color: var(--ink-3); font-size: 0.875rem; }
.card-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.8125rem; font-weight: 500; line-height: 1; padding: 7px 10px; border-radius: 999px;
  background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(30, 32, 38, 0.14);
}
.card-chip-count { right: 10px; bottom: 10px; background: rgba(30, 32, 38, 0.72); color: #fff; box-shadow: none; }
.card-chip-fee { left: 10px; top: 10px; background: var(--sun); }
.card-flag {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(30, 32, 38, 0.5); color: #fff; font-weight: 600; font-size: 1.375rem; letter-spacing: -0.01em;
}
.card-body { display: flex; flex-direction: column; gap: 1px; padding: 10px 2px 0; flex: 1; }
.card-price-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-price { margin: 0; font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.3; font-variant-numeric: tabular-nums; }
.card-price span { font-variant-numeric: normal; font-size: 0.875rem; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.card-spec { margin: 0; font-size: 0.9375rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-place { margin: 0; font-size: 0.9375rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-verified { display: inline-flex; align-items: center; gap: 5px; margin: 5px 0 0; font-size: 0.8125rem; color: var(--ink-2); }
.card.is-rented .card-price, .card.is-rented .card-spec { color: var(--ink-3); }

/* ---------- Sections ---------- */
.section { padding: 48px 0; }
@media (min-width: 768px) { .section { padding: 72px 0; } }
.section-canvas { background: var(--canvas); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head h2, .section-head h1 { margin: 0; }
.section-head p { margin: 4px 0 0; }
.section-head-inline { align-items: baseline; }
.arrow-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-decoration: none; min-height: 44px; }
.arrow-link:hover { text-decoration: underline; }

/* ---------- Home ---------- */
/* A photo of the city with the search on it, then what every listing shows, then the flats. */
.hero { padding: 16px 0 8px; }
@media (min-width: 768px) { .hero { padding: 24px 0 16px; } }
.hero-card { position: relative; border-radius: var(--r-md); overflow: hidden; background: #2b3a4a; }
.hero-media { position: relative; }
.hero-photo { width: 100%; height: 280px; object-fit: cover; object-position: 60% 50%; }
.hero-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 72px 20px 20px; color: #fff;
  background: linear-gradient(180deg, rgba(20, 24, 32, 0) 0%, rgba(20, 24, 32, 0.6) 55%, rgba(20, 24, 32, 0.72) 100%); }
.hero h1 { font-size: clamp(2rem, 1.3rem + 3.4vw, 4rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.02; margin: 0 0 10px; color: #fff; max-width: 11em; }
.hero-lead { margin: 0; font-size: 1rem; line-height: 1.45; max-width: 30em; color: rgba(255, 255, 255, 0.92); }
.lead { font-size: 1.125rem; color: var(--ink-2); max-width: 36em; }
@media (min-width: 768px) { .lead { font-size: 1.25rem; } }

/* On a phone the search sits under the photo; from 768 px it floats on the photo. */
.search {
  margin-top: 12px; display: grid; gap: 0; grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line-2); border-radius: var(--r-md); background: #fff; overflow: hidden;
}
.hero-card .search { margin: 0; border: 0; border-radius: 0; border-top: 1px solid var(--line); }
.search-field { display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; border-bottom: 1px solid var(--line); min-width: 0; }
.search-field:first-child { grid-column: 1 / -1; }
.search-field + .search-field + .search-field { border-left: 1px solid var(--line); }
.search-field label { font-size: 0.8125rem; font-weight: 500; color: var(--ink); }
.search .search-field select, .search .search-field input {
  font: inherit; border: 0; padding: 2px 0; background: transparent; color: var(--ink-2); width: 100%; min-height: 30px;
  -webkit-appearance: none; appearance: none; border-radius: 0;
}
.search-field select { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231e2026' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 2px center; padding-right: 20px; }
.search-field:focus-within { background: var(--canvas); }
.search .search-field select:focus-visible, .search .search-field input:focus-visible { box-shadow: none; outline: none; border: 0; }
.search .btn { grid-column: 1 / -1; border-radius: 0; min-height: 52px; border: 0; }
.hero-map {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 0 20px;
  border: 0; border-top: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 500; cursor: pointer;
}
.hero-map:hover { background: var(--canvas); }
.hero-map .i { width: 20px; height: 20px; }
@media (min-width: 768px) {
  .hero-photo { height: clamp(420px, 40vw, 600px); }
  .hero-text { top: 0; bottom: auto; right: auto; width: min(640px, 70%); padding: clamp(32px, 4vw, 64px);
    background: none; text-shadow: 0 1px 18px rgba(10, 14, 22, 0.45); }
  .hero-media::before { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(90deg, rgba(16, 22, 32, 0.62) 0%, rgba(16, 22, 32, 0.28) 45%, rgba(16, 22, 32, 0) 70%); }
  .hero-lead { font-size: 1.125rem; }
  .hero-search {
    position: absolute; left: clamp(32px, 4vw, 64px); right: clamp(32px, 4vw, 64px); bottom: clamp(28px, 3.5vw, 56px);
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  }
  .hero-card .search {
    grid-template-columns: minmax(150px, 1.2fr) minmax(130px, 1fr) minmax(130px, 1fr) auto; align-items: center;
    border: 0; border-radius: 999px; padding: 6px; box-shadow: var(--shadow-float); flex: 0 1 680px; min-width: 0;
  }
  /* From 768 px the search floats on the photo alone; "Pretraži" already shows the map on a computer. */
  .hero-map { display: none; }
  .search-field { border-bottom: 0; padding: 6px 20px; border-radius: 999px; }
  .search-field:first-child { grid-column: auto; }
  .search-field + .search-field { border-left: 1px solid var(--line); }
  .search-field:focus-within + .search-field, .search-field:hover + .search-field { border-left-color: transparent; }
  .search-field:hover { background: var(--canvas); }
  .search .btn { grid-column: auto; border-radius: 999px; padding: 0 24px; min-height: 52px; }
}

.promises { list-style: none; margin: 0; padding: 28px 0 8px; display: grid; gap: 20px; }
@media (min-width: 900px) { .promises { grid-template-columns: repeat(3, 1fr); gap: 32px; padding-top: 36px; } }
.promises li { display: grid; gap: 6px; }
@media (min-width: 900px) { .promises li { grid-template-columns: auto 1fr; gap: 14px; align-items: start; } }
.promises h2 { font-size: 1.0625rem; font-weight: 500; letter-spacing: 0; margin: 0 0 4px; line-height: 1.3; }
.promises p { margin: 0; color: var(--ink-2); font-size: 0.9375rem; max-width: 34em; }
.promises-mark { display: inline-flex; align-items: center; min-height: 26px; }
.promises-mark > .i { width: 26px; height: 26px; }
.promises-stars .stars-row .i { width: 15px; height: 15px; }

.section-tight { padding: 32px 0; }
@media (min-width: 768px) { .section-tight { padding: 40px 0; } }

.scale-section { display: grid; gap: 32px; }
@media (min-width: 980px) { .scale-section { grid-template-columns: 1fr 1.1fr; gap: 72px; align-items: start; } }
.scale { list-style: none; margin: 0; padding: 0; border: 1px solid var(--ai-line); border-radius: var(--r-md); background: #fff; overflow: hidden; }
.scale li { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--ai-line); }
.scale li:last-child { border-bottom: 0; }
.scale-text { color: var(--ink-2); font-size: 0.9375rem; }
@media (max-width: 479px) { .scale li { grid-template-columns: 1fr; } }

.cta-pair { display: grid; gap: 16px; }
@media (min-width: 900px) { .cta-pair { grid-template-columns: 1fr 1fr; gap: 20px; } }
.cta { padding: 32px 24px; border-radius: var(--r-md); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
@media (min-width: 768px) { .cta { padding: 40px; } }
.cta h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); }
.cta p { max-width: 32em; margin-bottom: 20px; }
.cta-blue { background: var(--blue-soft); }
.cta-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 0.875rem; font-weight: 500; }
.cta-ink .cta-kicker { color: #c9ccd3; }
.cta-ink { background: var(--ink); color: #fff; }
.cta-ink p { color: #d6d8de; }
.cta-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
.cta-list li { display: flex; gap: 10px; align-items: flex-start; }
.cta-list .i { margin-top: 3px; }

/* ---------- List page ---------- */
/* The title is one line above the results, so the filters and flats come first (funkcije.md, 6.A). */
.results-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 6px; }
.results-title h1 { margin: 0; font-size: 1.25rem; line-height: 1.25; }
@media (min-width: 768px) { .results-title h1 { font-size: 1.375rem; } }
.results-title .mark-fee { font-size: 0.8125rem; }

.filterbar { position: sticky; top: var(--header-h); z-index: 30; background: #fff; border-bottom: 1px solid var(--line); }
.filterbar-row { display: flex; align-items: flex-start; gap: 8px; padding: 10px 0; }
.filters-form { display: contents; }
.fpops { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 1 auto; min-width: 0; }
.fpop { position: relative; }
.fpop > summary, .chip-btn {
  list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: 999px; background: #fff; font-weight: 500; font-size: 0.9375rem;
  cursor: pointer; white-space: nowrap; user-select: none; color: var(--ink); font-family: inherit;
}
.fpop > summary::-webkit-details-marker { display: none; }
.fpop > summary:hover, .chip-btn:hover { border-color: var(--ink); }
.fpop > summary .chev { transition: transform 0.15s var(--ease); }
.fpop[open] > summary { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--canvas); }
.fpop[open] > summary .chev { transform: rotate(180deg); }
.fpop.is-set > summary { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.fpop.is-set:not([open]) > summary { background: var(--canvas); }
.fpop-value { font-weight: 600; }
.fpop-panel {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 35; width: 340px; max-width: calc(100vw - 32px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-float); padding: 20px;
}
.fpop-panel-wide { width: 560px; }
.fpop-right .fpop-panel { left: auto; right: 0; }
.fpop-title { font-size: 1rem; font-weight: 500; color: var(--ink); margin: 0 0 12px; }
.fpop-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.fpop .field { margin-bottom: 12px; }
.sortbox { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.sortbox label { font-size: 0.875rem; color: var(--ink-3); white-space: nowrap; }
.sortbox select { min-height: 40px; border-radius: 999px; padding: 0 34px 0 14px; font-size: 0.9375rem; font-weight: 500; border: 1px solid var(--line-2); width: auto; }

/* Namešten and Ljubimci: one click, the list reloads. */
.ftoggles { display: flex; align-items: center; gap: 8px; }
.chip.chip-toggle > span { min-height: 42px; padding: 0 12px; font-weight: 500; white-space: nowrap; }
.fpop-right-wide .fpop-panel { width: 420px; }
.bar-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.save-search { white-space: nowrap; min-height: 42px; --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--blue); padding: 0 8px; }
.save-search:hover { --btn-bg: var(--blue-soft); --btn-bd: var(--blue-soft); }
.save-search-link { display: none; align-items: center; gap: 6px; font-size: 0.875rem; font-weight: 500; }
@media (min-width: 900px) { .ftoggles { padding-left: 8px; border-left: 1px solid var(--line); } }
@media (max-width: 1199px) { .save-search-more { display: none; } }
.ftoggles .active-chip, .ftoggles .clear-link { display: none; }
@media (max-width: 899px) {
  .ftoggles { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
  .ftoggles::-webkit-scrollbar { display: none; }
  .ftoggles .active-chip, .ftoggles .clear-link { display: inline-flex; flex: none; white-space: nowrap; min-height: 42px; }
  .filterbar .active-filters { display: none; }
  .bar-end { display: none; }
  .save-search-link { display: inline-flex; margin-left: auto; }
}

/* Ready-made amounts under the price and move-in fields (JS only). */
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; }
.preset {
  min-height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff;
  font: inherit; font-size: 0.875rem; font-weight: 500; color: var(--ink); cursor: pointer;
}
.preset:hover { border-color: var(--ink); }
.preset[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.fpop-more .fpop-panel .row { margin-bottom: 4px; }
.filters-toggle { display: none; }
.filters-drawer-head, .filters-drawer-foot { display: none; }
.filter-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 0.8125rem; font-weight: 600; }

/* mobile drawer (only when JS is on) */
@media (max-width: 899px) {
  .js .filters-toggle { display: inline-flex; }
  .js .fpops {
    position: fixed; inset: 0; z-index: 60; background: #fff; flex-direction: column; flex-wrap: nowrap; gap: 0;
    overflow-y: auto; overscroll-behavior: contain; padding: 0 0 96px; visibility: hidden; transform: translateY(16px); opacity: 0;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s linear 0.2s;
  }
  .js .filters-open .fpops { visibility: visible; transform: none; opacity: 1; transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); }
  .js .filters-drawer-head {
    display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 2;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 8px 8px var(--gutter); min-height: 60px;
  }
  .js .filters-drawer-head h2 { margin: 0; font-size: 1.25rem; }
  .js .filters-drawer-foot {
    display: flex; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; background: #fff;
    border-top: 1px solid var(--line); padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  }
  .js .filters-drawer-foot .btn { flex: 1; }
  .js .fpops .fpop { border-bottom: 1px solid var(--line); }
  .js .fpops .fpop > summary {
    width: 100%; border: 0; border-radius: 0; min-height: 60px; padding: 0 var(--gutter); justify-content: flex-start;
    font-size: 1.0625rem; background: #fff; color: var(--ink); box-shadow: none;
  }
  .js .fpops .fpop[open] > summary { background: #fff; color: var(--ink); }
  .js .fpops .fpop > summary .chev { margin-left: auto; }
  .js .fpops .fpop-panel { position: static; width: auto; max-width: none; box-shadow: none; border: 0; border-radius: 0; padding: 0 var(--gutter) 20px; }
  .js .fpops .fpop-actions { display: none; }
  .js .fpops .fpop-title { display: none; }
  .js body.no-scroll { overflow: hidden; }
}
@media (max-width: 899px) {
  .sortbox label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .sortbox select { max-width: 170px; min-height: 36px; font-size: 0.875rem; padding-left: 12px; }
}

.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 0 12px; }
.active-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 8px 0 12px; border-radius: 999px;
  background: var(--ink); color: #fff; text-decoration: none; font-size: 0.875rem; font-weight: 500;
}
.active-chip .i { width: 16px; height: 16px; }
.active-chip:hover { background: #33353d; }
.clear-link { font-size: 0.875rem; font-weight: 500; padding: 8px; min-height: 36px; display: inline-flex; align-items: center; }

.results { padding: 16px 0 64px; background: #fff; min-height: 50vh; }
@media (min-width: 768px) { .results { padding-top: 20px; } }
.results-meta { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.results-count { margin: 0; font-size: 0.9375rem; color: var(--ink-2); }
.results-count b { font-family: var(--display); font-size: 1.125rem; color: var(--ink); font-weight: 600; }
.results .card-media { background: var(--canvas); }

.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 40px; flex-wrap: wrap; }
.pager-status { font-weight: 500; color: var(--ink-2); }

.empty { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 32px 24px; text-align: left; max-width: 720px; }
@media (min-width: 768px) { .empty { padding: 48px; } }
.empty-icon { width: 56px; height: 56px; border-radius: 14px; background: var(--canvas); display: grid; place-items: center; margin-bottom: 16px; }
.empty-icon .i { width: 28px; height: 28px; }
.empty h2 { margin-bottom: 8px; }
.empty-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* chip inputs (radios / checkboxes styled as chips) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; }
.chip > input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.chip > span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: #fff; font-size: 0.9375rem; font-weight: 500; cursor: pointer; line-height: 1.2;
}
.chip > input:hover + span { border-color: var(--ink); }
.chip > input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 500; }
.chip > input:checked + span .stars { color: #fff; }
.chip > input:checked + span .stars-row .i { fill: rgba(255, 255, 255, 0.35); }
.chip > input:checked + span .stars-1 .stars-row .i:nth-child(-n+1),
.chip > input:checked + span .stars-2 .stars-row .i:nth-child(-n+2),
.chip > input:checked + span .stars-3 .stars-row .i:nth-child(-n+3),
.chip > input:checked + span .stars-4 .stars-row .i:nth-child(-n+4),
.chip > input:checked + span .stars-5 .stars-row .i:nth-child(-n+5) { fill: #fff; }
.chip > input:focus-visible + span { box-shadow: var(--focus); }
.chip > input:checked + span::before {
  content: ""; width: 10px; height: 6px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translate(1px, -2px); margin-right: 2px;
}
.chips-stack { flex-direction: column; align-items: stretch; }
.chips-stack .chip > span { flex-wrap: wrap; row-gap: 6px; padding-top: 8px; padding-bottom: 8px; width: 100%; border-radius: var(--r-sm); min-height: 48px; justify-content: space-between; }
.chips-stack .chip > input:checked + span::before { display: none; }
.chips-scroll { max-height: 260px; overflow-y: auto; padding: 2px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 0; }
.field { margin-bottom: 20px; min-width: 0; }
.field > label, .field-label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 0.9375rem; }
.optional { font-weight: 400; color: var(--ink-3); font-size: 0.875rem; }
input[type="text"], input[type="email"], input[type="number"], input[type="date"], input[type="tel"], input[type="search"], select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  transition: border-color 0.15s var(--ease);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
select {
  -webkit-appearance: none; appearance: none; padding-right: 40px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231e2026' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 14px center;
}
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--ink); outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }
::placeholder { color: #80848e; opacity: 1; }
.help { font-size: 0.875rem; color: var(--ink-3); margin: 6px 0 0; }
.field-error, .errorlist {
  display: flex; gap: 6px; align-items: flex-start; color: var(--danger); font-weight: 500; font-size: 0.9375rem; margin: 8px 0 0; padding: 0; list-style: none;
}
.errorlist li { display: block; }
.field-error .i { margin-top: 2px; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); box-shadow: inset 4px 0 0 var(--danger); }
.has-error input:focus-visible, .has-error select:focus-visible, .has-error textarea:focus-visible { box-shadow: inset 4px 0 0 var(--danger), var(--ring); }
/* "This flat takes no pets" under the pet field (listings/_pet_warning.html) */
p.pet-warning { display: flex; gap: 8px; align-items: flex-start; margin: -12px 0 20px; padding: 10px 12px; background: var(--sun-soft); border-radius: var(--r-sm); font-size: 0.875rem; color: var(--ink-2); }
.pet-warning[hidden] { display: none; }
.pet-warning .i { flex: none; margin-top: 2px; }
.affix { position: relative; display: flex; align-items: stretch; }
.affix input { padding-right: 56px; }
.affix-unit { position: absolute; right: 1.5px; top: 1.5px; bottom: 1.5px; display: grid; place-items: center; min-width: 48px; padding: 0 12px; background: var(--canvas); border-left: 1px solid var(--line); color: var(--ink-2); font-weight: 500; border-radius: 0 4px 4px 0; pointer-events: none; }

.field-check { margin-bottom: 12px; }
.field > label.check { display: flex; font-weight: 500; font-size: 1rem; margin: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-weight: 500; line-height: 1.45; }
.check input, input[type="checkbox"], input[type="radio"] { accent-color: var(--ink); }
.check input { width: 22px; height: 22px; margin: 0; flex: none; margin-top: 1px; }
.has-error .check { color: var(--danger); }
.has-error .check input { outline: 2px solid var(--danger); outline-offset: 1px; box-shadow: none; }

.field-multi ul, .field-multi > div { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.field-multi label { font-weight: 500; }

.row { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) {
  .row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .row-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row-addr { grid-template-columns: 1fr 1.4fr 0.6fr; }
}
@media (min-width: 900px) { .row-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.toggles { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

.error-summary {
  border: 2px solid var(--danger); border-radius: var(--r-md); padding: 18px 20px; margin-bottom: 28px; background: var(--danger-soft);
}
.error-summary:focus, .error-summary:focus-visible { outline: none; box-shadow: none; }
.error-summary h2 { font-size: 1.125rem; margin: 0 0 8px; display: flex; gap: 8px; align-items: center; color: var(--danger); }
.error-summary ul { margin: 0; padding-left: 20px; }
.error-summary li { margin: 4px 0; }
.error-summary a { color: var(--ink); font-weight: 500; }

/* stepped forms */
.form-page { padding-top: 32px; padding-bottom: 80px; }
@media (min-width: 768px) { .form-page { padding-top: 48px; padding-bottom: 96px; } }
.form-intro { max-width: 720px; margin-bottom: 32px; }
.form-layout { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .form-layout { grid-template-columns: 240px minmax(0, 720px); gap: 64px; } }
.steps { display: none; }
@media (min-width: 1000px) {
  .steps { display: block; position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
}
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: step; }
.steps a {
  display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: center; padding: 8px 10px 8px 0; text-decoration: none; color: var(--ink-3); font-weight: 500;
}
.steps a::before {
  counter-increment: step; content: counter(step); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-2); font-size: 0.875rem; font-weight: 600; color: var(--ink-3); background: #fff;
}
.steps a.is-current { color: var(--ink); }
.steps a.is-current::before { border-color: var(--ink); color: var(--ink); box-shadow: var(--ring); }
.steps a.is-done::before { content: "✓"; background: var(--ink); border-color: var(--ink); color: #fff; }
.steps-after { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--ink-3); }
.steps-after ol { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.steps-after li { display: flex; gap: 8px; }

.step { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.step-card { border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px 20px 4px; background: #fff; }
@media (min-width: 768px) { .step-card { padding: 32px 32px 12px; } }
.step-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 24px; }
.step-num {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff;
  font-family: var(--display); font-weight: 600; font-size: 1.0625rem;
}
.step-head h2 { margin: 4px 0 4px; font-size: 1.375rem; }
.step-head p { margin: 0; color: var(--ink-3); font-size: 0.9375rem; }
.step legend { padding: 0; width: 100%; }
.step-card > legend.step-head, legend.subhead { float: left; width: 100%; }
.step-card > legend.step-head + *, legend.subhead + * { clear: both; }
.step-card { margin-bottom: 16px; }
.step-card::after { content: ""; display: block; clear: both; }
.subhead { font-size: 0.8125rem; font-weight: 600; color: var(--ink-3); margin: 8px 0 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.subhead:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.form-submit { display: grid; gap: 12px; margin-top: 8px; }
.form-submit .help { text-align: left; }
@media (min-width: 600px) { .form-submit { grid-template-columns: auto 1fr; align-items: center; gap: 20px; } }

/* photo upload */
.upload { position: relative; }
.upload-drop {
  display: grid; justify-items: center; gap: 8px; text-align: center; padding: 32px 20px; border: 2px dashed var(--line-2); border-radius: var(--r-md);
  background: var(--canvas); cursor: pointer; transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.upload-drop:hover, .upload.is-dragging .upload-drop { border-color: var(--ink); background: var(--blue-soft); }
.upload-drop .i { width: 36px; height: 36px; }
.upload-drop strong { font-size: 1.0625rem; }
.upload-drop small { color: var(--ink-3); }
.upload input[type="file"] { display: block; width: 100%; margin-top: 12px; font: inherit; font-size: 0.9375rem; }
.js .upload input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.upload input[type="file"]:focus-visible + .upload-drop, .upload:focus-within .upload-drop { border-color: var(--ink); box-shadow: var(--ring); }
.has-error .upload-drop { border-color: var(--danger); background: var(--danger-soft); }
.upload-status { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-weight: 500; font-size: 0.9375rem; }
.upload-status.is-ok { color: var(--ok); }
.thumbs { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 600px) { .thumbs { grid-template-columns: repeat(5, 1fr); } }
.thumbs li { position: relative; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; background: var(--canvas); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumb-badge { position: absolute; left: 6px; top: 6px; background: var(--ink); color: #fff; font-size: 0.75rem; font-weight: 600; padding: 3px 7px; border-radius: 999px; }
.thumb-num { position: absolute; left: 6px; bottom: 6px; background: rgba(30, 32, 38, 0.75); color: #fff; font-size: 0.75rem; font-weight: 600; padding: 2px 7px; border-radius: 999px; }
.thumb-remove {
  position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.94); color: var(--ink); cursor: pointer;
}
.thumb-remove:hover { background: var(--ink); color: #fff; }
.photo-tips { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 0.875rem; color: var(--ink-2); }
.photo-tips li { display: inline-flex; gap: 6px; align-items: center; }

/* ---------- Detail page ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.875rem; color: var(--ink-3); padding: 16px 0 12px; margin: 0; list-style: none; }
.crumbs a { color: var(--ink-2); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-2); }

.rented-banner { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r-sm); background: var(--ink); color: #fff; margin-bottom: 16px; font-weight: 500; }
.rented-banner .i { color: #fff; }
.demo-banner { background: var(--blue-soft); color: var(--ink); font-weight: 400; }
.demo-banner .i { color: var(--blue); }

.gallery { position: relative; margin: 0 calc(-1 * var(--gutter)); }
.gallery-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.gallery-track::-webkit-scrollbar { display: none; }
.g-item { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 4 / 3; display: block; position: relative; background: var(--canvas); overflow: hidden; }
.g-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-actions { position: absolute; right: 12px; bottom: 12px; z-index: 2; display: flex; align-items: center; gap: 8px; }
.gallery-count {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(30, 32, 38, 0.8); color: #fff; font-size: 0.875rem; font-weight: 500; padding: 6px 12px; border-radius: 999px;
}
.gallery-all { display: none; }
@media (min-width: 768px) {
  .gallery { margin: 0; }
  .gallery-track {
    display: grid; overflow: visible; gap: 8px; border-radius: var(--r-md); overflow: hidden;
    grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 230px 230px;
  }
  .g-item { aspect-ratio: auto; }
  .g-item:nth-child(n+6) { display: none; }
  .g-item:first-child { grid-row: 1 / 3; }
  .g-item:hover img { transform: scale(1.02); }
  .g-item img { transition: transform 0.4s var(--ease); }
  .gallery[data-count="1"] .gallery-track { grid-template-columns: 1fr; grid-template-rows: 460px; }
  .gallery[data-count="1"] .g-item:first-child { grid-row: auto; }
  .gallery[data-count="2"] .gallery-track { grid-template-columns: 1fr 1fr; grid-template-rows: 460px; }
  .gallery[data-count="2"] .g-item:first-child { grid-row: auto; }
  .gallery[data-count="3"] .gallery-track { grid-template-columns: 2fr 1fr; }
  .gallery[data-count="4"] .gallery-track { grid-template-columns: 2fr 1fr 1fr; }
  .gallery[data-count="4"] .g-item:nth-child(4) { grid-column: 2 / 4; }
  .gallery-count { display: none; }
  .gallery-actions { right: 16px; bottom: 16px; }
  .gallery-all {
    display: inline-flex;
    min-height: 44px; padding: 0 16px; gap: 8px; align-items: center; background: #fff; color: var(--ink); border: 1.5px solid var(--ink);
    border-radius: var(--r-sm); font: inherit; font-weight: 500; cursor: pointer; text-decoration: none;
  }
  .gallery-all:hover { background: var(--canvas); }
}
@media (min-width: 1100px) { .gallery-track { grid-template-rows: 250px 250px; } }

/* A flat's page: title, gallery, then the facts on the left and a sticky price card on the right. */
.detail-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; margin: 4px 0 16px; }
.detail-title h1 { font-size: clamp(1.5rem, 1.15rem + 1.3vw, 2rem); margin: 0; overflow-wrap: anywhere; max-width: 32em; }
.detail-save { margin: 0; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; margin: -4px -10px 0 0; border: 0; border-radius: var(--r-sm); background: none; font: inherit; font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { background: var(--canvas); }
.link-btn[aria-pressed="true"] .i { fill: var(--blue); stroke: var(--blue); }
@media (max-width: 599px) { .detail-title .link-btn { margin: -8px 0 -4px -10px; } }

.detail-layout { display: grid; gap: 32px; padding: 24px 0 64px; }
@media (min-width: 1000px) { .detail-layout { grid-template-columns: minmax(0, 1fr) 380px; gap: 64px; padding: 32px 0 96px; } }
.detail-head { margin-bottom: 20px; }
.detail-kind { font-size: 1.375rem; font-weight: 500; letter-spacing: -0.01em; margin: 0 0 4px; }
.detail-place { color: var(--ink-2); font-size: 1rem; margin: 0; }

.score-box { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 20px; padding: 16px 20px; margin: 0 0 8px; border: 1px solid var(--line); border-radius: var(--r-md); color: inherit; text-decoration: none; }
.score-box:hover { border-color: var(--line-2); background: var(--canvas); }
.score-box-title { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.score-box-title .i { color: var(--blue); width: 24px; height: 24px; }
.score-box-text { color: var(--ink-2); font-size: 0.9375rem; }
@media (max-width: 599px) {
  .score-box { grid-template-columns: 1fr auto; padding: 14px 16px; column-gap: 12px; }
  .score-box-title { white-space: nowrap; }
  .score-box-text { grid-column: 1 / -1; grid-row: 2; }
  .score-box .stars-lg .stars-row .i { width: 18px; height: 18px; }
  .score-box .stars-lg .stars-val { font-size: 1.0625rem; }
}

.highlights { list-style: none; margin: 8px 0 8px; padding: 16px 0 8px; display: grid; gap: 18px; border-top: 1px solid var(--line); }
.highlights li { display: grid; grid-template-columns: 24px 1fr; gap: 16px; align-items: start; }
.highlights .i { width: 24px; height: 24px; margin-top: 1px; }
.highlights h3 { margin: 0 0 2px; font-size: 1rem; font-weight: 500; letter-spacing: 0; line-height: 1.4; }
.highlights p { margin: 0; color: var(--ink-3); font-size: 0.9375rem; }

.detail-pair { display: grid; gap: 0 48px; border-top: 1px solid var(--line); }
@media (min-width: 720px) { .detail-pair { grid-template-columns: 1fr 1fr; } .detail-pair > .detail-section { border-top: 0; } }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; margin: 0 0 16px; }
.facts div { padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.facts dt { font-size: 0.8125rem; color: var(--ink-3); }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.features { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.features li { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.9375rem; font-weight: 500; }

.detail-section { padding: 28px 0; border-top: 1px solid var(--line); }
.detail-section h2 { font-size: 1.375rem; }
.description { max-width: 68ch; white-space: normal; color: var(--ink-2); font-size: 1.0625rem; }
details.owner-desc summary, .contact-more summary { cursor: pointer; font-weight: 500; min-height: 44px; display: flex; align-items: center; gap: 8px; list-style: none; }
details.owner-desc summary::-webkit-details-marker, .contact-more summary::-webkit-details-marker { display: none; }
details.owner-desc summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1.5px solid currentColor; border-radius: 50%; font-weight: 600; line-height: 1; }
details.owner-desc[open] summary::before { content: "–"; }
.contact-more[open] summary .i { transform: rotate(180deg); }

/* AI condition: the overall stars, then one card per part of the flat. */
.cond { margin: 0; }
.cond-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.cond-head h2 { margin: 0; display: flex; gap: 10px; align-items: center; }
.cond-head h2 .i { color: var(--blue); width: 26px; height: 26px; }
.cond-tag { font-size: 0.8125rem; font-weight: 500; color: var(--blue); background: var(--blue-soft); padding: 4px 10px; border-radius: 999px; }
.cond-overall { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 16px 0 20px; }
.cond-label { font-weight: 500; font-size: 1.125rem; margin: 0; }
.cond-areas { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 640px) { .cond-areas { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cond-area { display: grid; gap: 6px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); }
.cond-area-name { font-weight: 500; }
.cond-area-note { color: var(--ink-2); font-size: 0.9375rem; }
.cond-area-missing .cond-area-note { color: var(--ink-3); }
.cond-seen { padding: 16px 0 0; }
.cond-seen p { margin: 0 0 8px; font-size: 0.875rem; color: var(--ink-3); }
.cond-seen ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cond-seen li { font-size: 0.875rem; padding: 5px 12px; border-radius: 999px; background: var(--canvas); color: var(--ink); }
.cond-foot { padding: 16px 0 0; font-size: 0.875rem; color: var(--ink-3); }
.cond-foot p { margin: 0; }
.cond-foot details { margin-top: 8px; }
.cond-foot summary { cursor: pointer; font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; min-height: 36px; display: inline-flex; align-items: center; }
.cond-foot .scale { margin-top: 8px; }
.cond-empty { padding: 16px 0 0; }
.cond-empty p { margin: 0; color: var(--ink-2); }

/* contact card */
.contact { align-self: start; }
@media (min-width: 1000px) { .contact { position: sticky; top: calc(var(--header-h) + 24px); } }
.fee-card { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; padding: 12px 16px; font-size: 0.9375rem; border: 1px solid var(--line); border-radius: var(--r-md); font-weight: 500; }
.contact-card { border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; padding: 24px; box-shadow: var(--shadow-card); }
.contact-price { font-size: 1.625rem; font-weight: 600; letter-spacing: -0.02em; margin: 0; line-height: 1.1; font-variant-numeric: tabular-nums; }
.contact-price span { font-variant-numeric: normal; font-size: 1rem; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.contact-total { margin: 6px 0 0; font-size: 0.9375rem; }
.contact-price .price-flag { float: right; margin-top: 4px; padding: 4px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--ink); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0; }
.contact-total a { color: var(--ink); }
.contact-facts { display: grid; grid-template-columns: 1fr 1fr; margin: 18px 0; border: 1px solid var(--line-2); border-radius: var(--r-sm); }
.contact-facts div { padding: 10px 14px; min-width: 0; }
.contact-facts div + div { border-left: 1px solid var(--line-2); }
.contact-facts dt { font-size: 0.75rem; font-weight: 500; }
.contact-facts dd { margin: 0; font-size: 0.9375rem; color: var(--ink-2); }
.contact-card .btn + .btn { margin-top: 10px; }
.contact-note { margin: 14px 0 0; font-size: 0.875rem; color: var(--ink-3); text-align: center; }
.contact-done { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--ok); font-weight: 500; }
.ask { scroll-margin-top: calc(var(--header-h) + 16px); }
/* On a phone the price card comes right after the gallery; the report link stays at the end. */
@media (max-width: 999px) { .contact { order: -1; } .contact .report-link { display: none; } }
@media (min-width: 1000px) { .report-link-end { display: none; } }
.ask .help { margin: 0 0 16px; }
.detail-pair .costs { margin-top: 0; }
.ask form { max-width: 640px; }
.contact-body { max-width: 640px; }
.contact-body h2 { font-size: 1.25rem; margin-bottom: 4px; }
.contact-body .field { margin-bottom: 16px; }
.contact-body textarea { min-height: 110px; }
.contact-more summary { margin-bottom: 8px; }
.contact-sent { padding: 20px; background: var(--ok-soft); border-radius: var(--r-md); }
.contact-sent h2 { font-size: 1.25rem; display: flex; gap: 8px; align-items: center; }
.contact-sent .i { color: var(--ok); }
.contact-closed { padding: 20px; color: var(--ink-2); }

.mobile-bar { display: none; }
@media (max-width: 999px) {
  .mobile-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: #fff; border-top: 1px solid var(--line);
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(30, 32, 38, 0.08);
    transition: transform 0.2s var(--ease);
  }
  .mobile-bar.is-hidden { transform: translateY(110%); }
  .mobile-bar-price { font-family: var(--display); font-weight: 600; font-size: 1.375rem; line-height: 1.1; margin: 0; font-variant-numeric: tabular-nums; }
  .mobile-bar-price span { display: block; font-family: var(--text); font-size: 0.8125rem; font-weight: 500; color: var(--ink-3); }
  .mobile-bar .btn { flex: none; padding-left: 18px; padding-right: 18px; }
  .mobile-bar-price .nowrap { display: inline; white-space: nowrap; font: inherit; color: inherit; }
  .has-mobile-bar .site-footer { padding-bottom: 96px; }
}

/* lightbox */
.lightbox { padding: 0; border: 0; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; background: rgba(12, 13, 16, 0.96); color: #fff; }
.lightbox::backdrop { background: rgba(12, 13, 16, 0.96); }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 8px 8px 8px 20px; }
.lb-counter { font-weight: 500; }
.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; height: 100%; overflow: hidden; padding: 0 8px; touch-action: pan-y; }
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; min-width: 0; min-height: 0; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-btn {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.12); color: #fff;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.24); }
.lb-btn .i { width: 26px; height: 26px; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-thumbs { display: flex; gap: 6px; justify-content: center; padding: 12px; overflow-x: auto; }
.lb-thumbs button { flex: none; width: 64px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; cursor: pointer; background: #222; opacity: 0.6; }
.lb-thumbs button[aria-current="true"] { border-color: #fff; opacity: 1; }
.lb-thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 767px) { .lb-prev, .lb-next { display: none; } .lb-thumbs { display: none; } }

/* ---------- Simple pages (thanks, verify, unsubscribe) ---------- */
.single { padding-top: 48px; padding-bottom: 96px; }
@media (min-width: 768px) { .single { padding-top: 80px; padding-bottom: 120px; } }
.single-icon { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); margin-bottom: 24px; }
.single-icon .i { width: 32px; height: 32px; }
.single-icon-ok { background: var(--ok-soft); color: var(--ok); }
.single h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); }
.single .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.code-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 28px; }
.code-form .field { margin: 0; flex: 1 1 220px; max-width: 280px; }
.code-input {
  font-family: var(--display) !important; font-size: 2rem !important; font-weight: 600; letter-spacing: 0.4em; text-align: center;
  min-height: 64px !important; padding: 8px 0 8px 0.4em !important;
}
.code-form .btn { min-height: 64px; padding: 0 28px; }
.code-meta { margin-top: 20px; display: grid; gap: 4px; }
.numbered { list-style: none; counter-reset: n; padding: 0; margin: 24px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.numbered li { counter-increment: n; display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.numbered li::before { content: counter(n); width: 28px; height: 28px; border-radius: 50%; background: var(--canvas); display: grid; place-items: center; font-weight: 600; font-size: 0.875rem; }
.numbered li.is-done::before { content: "✓"; background: var(--ink); color: #fff; }

/* ---------- Owner / seeker manage ---------- */
.manage-head { padding: 32px 0 24px; border-bottom: 1px solid var(--line); }
@media (min-width: 768px) { .manage-head { padding: 48px 0 32px; } }
.manage-head h1 { overflow-wrap: anywhere; font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); }
.private-note { display: inline-flex; gap: 8px; align-items: center; font-size: 0.875rem; font-weight: 500; color: var(--ink-2); background: var(--canvas); padding: 6px 12px; border-radius: 999px; margin-bottom: 16px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--canvas); font-size: 0.9375rem; }
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.status-active { background: var(--ok-soft); }
.status-active::before { background: var(--ok); }
.status-pending, .status-draft { background: var(--sun-soft); }
.status-pending::before, .status-draft::before { background: #b07800; }
.status-rejected { background: var(--danger-soft); }
.status-rejected::before { background: var(--danger); }
.status-rented::before { background: var(--ink); }

.timeline { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: t; }
.timeline li { counter-increment: t; font-size: 0.8125rem; font-weight: 500; color: var(--ink-3); padding-top: 14px; border-top: 4px solid var(--line); line-height: 1.3; }
.timeline li.is-done { border-top-color: var(--ink); color: var(--ink); }
.timeline li.is-current { border-top-color: var(--blue); color: var(--ink); }
.manage-grid { display: grid; gap: 24px; padding-top: 32px; padding-bottom: 80px; }
@media (min-width: 1000px) { .manage-grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; align-items: start; } }
.panel { border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px 20px; background: #fff; margin-bottom: 20px; }
@media (min-width: 768px) { .panel { padding: 28px; } }
.panel h2 { font-size: 1.375rem; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.panel-head h2 { margin: 0; }
.panel-quiet { background: var(--canvas); border-color: var(--canvas); }
.panel-danger { border-color: #f1c4bf; }
.panel-danger h2 { color: var(--danger); font-size: 1.125rem; }
.inquiries { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.inquiry { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px; }
.inquiry-head { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; align-items: baseline; margin-bottom: 8px; }
.inquiry-name { font-weight: 600; font-size: 1.0625rem; margin: 0; }
.inquiry-date { font-size: 0.875rem; color: var(--ink-3); margin: 0; }
.inquiry-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; padding: 0; list-style: none; }
.inquiry-facts li { font-size: 0.8125rem; font-weight: 500; background: var(--canvas); border-radius: 999px; padding: 4px 10px; }
.inquiry-msg { border-left: 3px solid var(--line-2); padding-left: 12px; margin: 0 0 12px; color: var(--ink-2); }
.inquiry-contact { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.9375rem; }
.radio-cards { display: grid; gap: 8px; }
.radio-cards label { display: flex; gap: 12px; align-items: center; min-height: 52px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-sm); cursor: pointer; font-weight: 500; }
.radio-cards label:has(input:checked) { border-color: var(--ink); background: var(--blue-soft); }
.radio-cards input { width: 20px; height: 20px; margin: 0; }
.radio-cards ul, .radio-cards fieldset > div { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ai-preview { background: var(--ai-soft); border: 1px solid var(--ai-line); border-radius: var(--r-md); padding: 20px; margin-bottom: 20px; }
.ai-preview h2 { font-size: 1.125rem; display: flex; gap: 8px; align-items: center; }
.ai-preview h2 .i { color: var(--ai); }
.inline-form { display: inline; }
.side-actions { display: grid; gap: 8px; justify-items: start; }

/* ---------- Prose / legal ---------- */
.prose { padding-top: 40px; padding-bottom: 96px; }
.prose h1 { margin-bottom: 16px; }
.prose h2 { font-size: 1.375rem; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.prose p, .prose li { font-size: 1.0625rem; color: var(--ink-2); max-width: 68ch; }
.prose ul { padding-left: 22px; }
.prose li { margin: 8px 0; }
.prose li b { color: var(--ink); }
.draft-note { display: flex; gap: 12px; align-items: flex-start; background: var(--sun-soft); border: 1px solid #f5dc9a; border-radius: var(--r-sm); padding: 14px 16px; margin: 0 0 8px; font-size: 0.9375rem; }

/* ---------- Metrics ---------- */
.metrics { display: grid; gap: 16px; margin: 24px 0 48px; }
@media (min-width: 900px) { .metrics { grid-template-columns: repeat(3, 1fr); } }
.metric { border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; background: #fff; }
.metric-label { font-weight: 500; color: var(--ink-2); margin: 0 0 8px; }
.metric-value { font-family: var(--display); font-weight: 600; font-size: 2.75rem; line-height: 1; margin: 0 0 12px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.metric-bar { height: 8px; border-radius: 999px; background: var(--canvas); overflow: hidden; margin-bottom: 10px; }
.metric-bar span { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.metric-ok .metric-bar span { background: var(--ok); }
.metric-target { margin: 0; font-size: 0.875rem; color: var(--ink-3); display: flex; justify-content: space-between; gap: 8px; }
.metric-ok .metric-target b { color: var(--ok); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 48px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { font-size: 0.8125rem; color: var(--ink-3); background: var(--canvas); }
.table td + td, .table th + th { text-align: right; }
.table tr:last-child td { border-bottom: 0; }
.stat-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 640px; }
.stat-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.stat-list b { }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c9ccd3; padding: 48px 0 32px; margin-top: 0; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.2fr 2fr; gap: 64px; } }
.site-footer .logo { color: #fff; }
.site-footer .logo-city { color: #a3a7b0; border-color: #3d4049; display: inline; }
.footer-about { margin-top: 16px; font-size: 0.9375rem; max-width: 34em; }
.footer-promises { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 640px) { .footer-promises { grid-template-columns: repeat(3, 1fr); } }
.footer-promises li { border-top: 1px solid #3d4049; padding-top: 14px; font-size: 0.9375rem; }
.footer-promises b { display: block; color: #fff; margin-bottom: 4px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid #3d4049; font-size: 0.875rem; }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer a { color: #fff; }
.site-footer :focus-visible { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5); outline-color: #fff; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .card-link:hover .card-media img, .g-item:hover img { transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* drawer sits above the sticky site header */
@media (max-width: 899px) {
  .js .filterbar.filters-open { z-index: 70; }
  .js .fpops .chips-scroll { max-height: none; }
}

/* fields in a row share label / input / help rows, so inputs line up even when a label wraps */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 600px) {
    .row > .field { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
    .row > .field > label { align-self: end; }
  }
}

/* ---------- Map (static/js/map.js, loaded only when a map is opened) ---------- */
[hidden] { display: none !important; }

.map-toggle[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--canvas); }
@media (max-width: 999px) { .map-toggle { display: none !important; } }

.map-switch {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 45; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px;
  font: inherit; font-weight: 500; color: #fff; background: var(--ink); border: 0; border-radius: 999px;
  box-shadow: var(--shadow-float); cursor: pointer;
}
.map-switch:hover { background: #2c2e35; }
@media (min-width: 1000px) { .map-switch { display: none !important; } }
@media (max-width: 999px) { .has-map-switch .site-footer { padding-bottom: 96px; } }

.results-area {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px 0 8px; border-radius: 999px;
  border: 1.5px solid var(--ink); background: #fff; color: var(--ink); text-decoration: none; font-size: 0.875rem; font-weight: 500;
}
.results-area:hover { background: var(--ink); color: #fff; }
.results-count + .results-area { margin-right: auto; }
.results-pages { color: var(--ink-3); font-size: 0.875rem; }
[data-results][aria-busy="true"] { opacity: 0.55; transition: opacity 0.15s var(--ease); }

.map-pane { position: relative; }
.map { position: relative; width: 100%; height: 100%; background: #e9e7e2; }
.map.is-loading::after, .map.is-failed::after {
  content: "Učitavam mapu…"; position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 24px;
  text-align: center; color: var(--ink-2); font-weight: 500; background: #e9e7e2;
}
.map.is-failed::after { content: attr(data-message); }
.map-note {
  position: absolute; left: 10px; bottom: 10px; z-index: 2; margin: 0; display: inline-flex; align-items: center; gap: 6px;
  max-width: calc(100% - 70px); padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.94);
  font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); box-shadow: 0 1px 3px rgba(30, 32, 38, 0.12); pointer-events: none;
}

/* Desktop: the map is open from the start, as tall as the window, and stays while the list scrolls. */
@media (min-width: 1000px) {
  .results-layout.has-map {
    max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 42%); gap: 24px; align-items: start;
    padding-right: 16px;
  }
  .results-layout.has-map .grid { grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 28px 18px; }
  .results-layout.has-map .map-pane {
    position: sticky; top: calc(var(--header-h) + var(--filterbar-h, 63px) + 12px);
    height: calc(100vh - var(--header-h) - var(--filterbar-h, 63px) - 24px); min-height: 420px;
    border-radius: var(--r-md); overflow: hidden;
  }
}
@media (min-width: 1700px) {
  .results-layout.has-map { grid-template-columns: minmax(0, 1fr) minmax(380px, 38%); }
}

/* Phone and tablet: the map fills the screen under the filters; the button switches back. */
@media (max-width: 999px) {
  body.map-mode { overflow: hidden; }
  body.map-mode .site-footer, body.map-mode .results-col { display: none; }
  body.map-mode .results { padding: 0; min-height: 0; }
  body.map-mode .map-pane { position: fixed; left: 0; right: 0; bottom: 0; top: var(--map-top, 124px); z-index: 20; }
}

/* Price markers and groups. MapLibre positions them (with transform), so they never get one of their own. */
.map-pin {
  padding: 6px 10px; border: 0; border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer;
  font-family: var(--text); font-weight: 600; font-size: 0.875rem; line-height: 1.15; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(30, 32, 38, 0.08), 0 2px 6px rgba(30, 32, 38, 0.24);
  transition: background-color 0.12s var(--ease), color 0.12s var(--ease);
}
.map-pin.is-seen { background: #eceef1; color: var(--ink-3); }
.map-pin:hover, .map-pin.is-hot { background: var(--ink); color: #fff; z-index: 3; }
.map-pin.is-active { background: var(--blue); color: #fff; z-index: 4; padding: 7px 12px; }
.map-cluster {
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  background: #fff; color: var(--ink); cursor: pointer; font-family: var(--text); font-weight: 600; font-size: 0.9375rem;
  box-shadow: 0 0 0 1px rgba(30, 32, 38, 0.08), 0 2px 6px rgba(30, 32, 38, 0.24);
}
.map-cluster:hover { background: var(--ink); color: #fff; }

/* "Kirije po krajevima" over the list map: a switch and a small legend. */
.map-tools { position: absolute; left: 10px; top: 10px; z-index: 3; display: grid; gap: 8px; justify-items: start; max-width: calc(100% - 64px); }
.map-layer {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 0; border-radius: 999px;
  background: #fff; color: var(--ink); font: inherit; font-size: 0.875rem; font-weight: 500; cursor: pointer;
  box-shadow: 0 1px 4px rgba(30, 32, 38, 0.18);
}
.map-layer[aria-pressed="true"] { background: var(--ink); color: #fff; }
.map-legend { background: #fff; border-radius: var(--r-sm); padding: 10px 12px; box-shadow: 0 1px 4px rgba(30, 32, 38, 0.18); font-size: 0.8125rem; color: var(--ink-2); display: grid; gap: 6px; }
.map-legend .rents-legend-title { font-size: 0.8125rem; }
@media (max-width: 999px) {
  .map-note { top: 10px; bottom: auto; }
  .map-tools { top: 52px; }
}

/* The flat picked on the map: at the top on a computer, so it is in view before the page scrolls. */
.map-card {
  position: absolute; left: 10px; top: 52px; z-index: 4; width: 340px; max-width: calc(100% - 64px);
  background: #fff; border-radius: var(--r-md); box-shadow: var(--shadow-float); overflow: hidden;
}
.map-card-link { display: grid; grid-template-columns: 112px minmax(0, 1fr); text-decoration: none; color: inherit; min-height: 112px; }
.map-card-link img { width: 112px; height: 100%; object-fit: cover; background: var(--canvas); }
.map-card-body { padding: 10px 40px 12px 12px; display: grid; gap: 2px; align-content: start; }
.map-card-price { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.25rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.map-card-price span { font-family: var(--text); font-size: 0.8125rem; font-weight: 500; color: var(--ink-3); }
.map-card-spec { margin: 0; font-size: 0.875rem; font-weight: 500; }
.map-card-place { margin: 0; font-size: 0.875rem; color: var(--ink-2); }
.map-card-title { margin: 2px 0 0; font-size: 0.8125rem; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.map-card-link:hover .map-card-title { text-decoration: underline; }
.map-card-close {
  position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.9); color: var(--ink); cursor: pointer;
}
.map-card-close:hover { background: var(--canvas); }
@media (max-width: 999px) {
  /* Above the List/Map button and the map's source credits, which must stay visible. */
  .map-card { left: 12px; right: 12px; top: auto; width: auto; max-width: none; bottom: calc(96px + env(safe-area-inset-bottom)); }
  body.map-mode .maplibregl-ctrl-bottom-right { bottom: calc(68px + env(safe-area-inset-bottom)); }
}

/* Detail page: one flat as a circle, loaded on request. */
.location-line { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 4px; font-size: 1.0625rem; color: var(--ink-2); }
.location-line .i { margin-top: 3px; }
.location-line b { color: var(--ink); }
.map-detail {
  position: relative; height: 300px; margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  background-color: #eeece7;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.7) 2px, transparent 2px), linear-gradient(rgba(255, 255, 255, 0.7) 2px, transparent 2px);
  background-size: 56px 44px;
}
@media (min-width: 768px) { .map-detail { height: 340px; } }
.no-js .map-detail { display: none; }
.map-detail-cover { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center; }
.map-detail-cover::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 180px; height: 180px; transform: translate(-50%, -50%);
  border-radius: 50%; background: rgba(255, 197, 61, 0.3); border: 1.5px dashed var(--ink);
}
.map-detail-cover > * { position: relative; }
.map-detail-cover .btn { background: #fff; }
.map-detail-cover .btn:hover { background: var(--ink); }
.map-detail-cover p { margin: 0; font-size: 0.875rem; font-weight: 500; color: var(--ink-2); background: rgba(255, 255, 255, 0.85); padding: 2px 8px; border-radius: 999px; }
.map-detail.is-loading::after, .map-detail.is-failed::after {
  content: "Učitavam mapu…"; position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 24px;
  text-align: center; color: var(--ink-2); font-weight: 500; background: #eeece7;
}
.map-detail.is-failed::after { content: attr(data-message); }

/* MapLibre's own controls, in the site's type. */
.maplibregl-map { font-family: var(--text); }
.maplibregl-ctrl-attrib { font-size: 0.75rem; }
.maplibregl-ctrl-attrib a { color: var(--ink-2); }

/* ---------- Rents by neighbourhood (/kirije/) ---------- */
.rents { padding-top: 32px; padding-bottom: 24px; }
.rents-head { margin-bottom: 24px; }
.rents-head h1 { margin-bottom: 8px; }
.rents-layout { display: grid; gap: 24px; }
.rents-list h2 { font-size: 1.375rem; margin-bottom: 12px; }
.rents-map { order: -1; }
.map-rents { height: clamp(320px, 62vh, 520px); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
@media (min-width: 1000px) {
  .rents-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; gap: 40px; }
  .rents-map { order: 0; position: sticky; top: 88px; }
  .map-rents { height: min(620px, calc(100vh - 160px)); }
}
.rent-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rent-row { padding: 16px 0; border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.rent-row:target { background: var(--ai-soft); margin: 0 -12px; padding: 16px 12px; border-radius: var(--r-sm); }
.rent-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rent-row-head h3 { margin: 0; font-size: 1.1875rem; }
.rent-value { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.375rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rent-bar { height: 8px; margin: 8px 0 10px; border-radius: 4px; background: var(--canvas); overflow: hidden; }
.rent-bar span { display: block; height: 100%; border-radius: 4px; background: var(--ai); }
.rent-text { margin: 0; color: var(--ink-2); }
.rent-rooms { margin: 10px 0 0; padding-left: 20px; color: var(--ink-2); }
.rent-rooms li { margin: 6px 0; }
.rents-missing-title { margin-top: 28px; }
.rents-empty { margin-bottom: 8px; }
.rents-method { padding-top: 8px; padding-bottom: 72px; }
.rents-legend { margin-top: 10px; font-size: 0.875rem; color: var(--ink-2); display: grid; gap: 6px; }
.rents-legend-title { margin: 0; font-weight: 500; color: var(--ink); }
.rents-legend-scale { display: flex; align-items: center; gap: 10px; }
.rents-legend-bar { flex: 1; max-width: 260px; height: 10px; border-radius: 5px; }
.rents-legend-swatch, .rents-legend-empty { width: 18px; height: 12px; border-radius: 3px; flex: none; }
.rents-legend-end { white-space: nowrap; }
.rents-legend-none { margin: 0; display: flex; align-items: center; gap: 10px; }
.rents-legend-empty { border: 1.5px dashed #5c606b; background: #fff; }
.rents-popup .maplibregl-popup-content { padding: 8px 12px; border-radius: var(--r-sm); font-size: 0.875rem; }
.rents-popup .maplibregl-popup-content > div { display: grid; gap: 2px; }
.rents-popup .maplibregl-popup-content b { font-size: 0.9375rem; }
.results-rents { margin: 24px 0 0; }
.rent-compare { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 16px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--canvas); color: var(--ink-2); font-size: 0.9375rem; }
.rent-compare .i { margin-top: 3px; flex: none; }
.rent-compare b { color: var(--ink); }
.estimate-hint { margin: -4px 0 16px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--canvas); color: var(--ink-2); font-size: 0.9375rem; }
.estimate-hint b { color: var(--ink); }

/* ---------- Viewings (listings/viewings.py) ---------- */
.viewing-layout { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) {
  .viewing-layout { grid-template-columns: minmax(0, 720px) 300px; gap: 64px; align-items: start; }
  .viewing-next { position: sticky; top: calc(var(--header-h) + 32px); }
}
.viewing-next h2 { font-size: 1.125rem; margin: 0; }
.viewing-next .numbered { margin-top: 12px; font-size: 0.9375rem; }
.slot-days { display: grid; gap: 18px; margin-bottom: 20px; }
.slot-day { border: 0; padding: 0; margin: 0; min-width: 0; }
.slot-day legend { font-weight: 500; font-size: 0.9375rem; margin: 0 0 8px; padding: 0; }
.slot-day .chip > span { min-width: 68px; padding: 0 12px; justify-content: center; }
.step-card.has-error .slot-day .chip > span { border-color: var(--danger); }
.slot-days + .field-error { margin: -8px 0 20px; }
.viewing-facts { margin: 24px 0; border-top: 1px solid var(--line); }
.viewing-facts > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.viewing-facts dt { font-weight: 500; color: var(--ink-3); }
.viewing-facts dd { margin: 0; overflow-wrap: anywhere; }
.viewing-page .private-note { margin-bottom: 12px; }
.viewing-page h1 { margin-top: 12px; }
.viewing-page .actions form { display: contents; }
.status-viewing-confirmed { background: var(--ok-soft); }
.status-viewing-confirmed::before { background: var(--ok); }
.status-viewing-requested, .status-viewing-unconfirmed { background: var(--sun-soft); }
.status-viewing-requested::before, .status-viewing-unconfirmed::before { background: #b07800; }
.viewings-panel { scroll-margin-top: calc(var(--header-h) + 16px); }
.viewings-title { font-size: 1.0625rem; margin: 24px 0 12px; }
.viewing-requested { border: 1.5px solid #b07800; }
.viewing-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.viewing-item .inline-form { margin-top: 4px; }
.windows { list-style: none; margin: 0 0 8px; padding: 0; border-top: 1px solid var(--line); }
.windows li { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--line); }
.windows li > span { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; }
.window-forms { display: grid; gap: 12px; margin-top: 16px; }
.window-form { background: var(--canvas); border-radius: var(--r-sm); padding: 16px; }
.window-form-title { font-weight: 600; margin: 0 0 10px; }
.window-form > .field-error { margin: 0 0 10px; }
.window-fields { display: grid; gap: 10px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.window-fields .field { margin: 0; }
.window-fields .field:first-child, .window-fields .btn { grid-column: 1 / -1; }
@media (min-width: 600px) {
  .window-fields { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
  .window-fields .field:first-child, .window-fields .btn { grid-column: auto; }
  .window-fields .btn { min-height: 48px; }
}
.viewings-past { margin-top: 20px; }
.viewings-past summary { cursor: pointer; font-weight: 500; min-height: 44px; display: flex; align-items: center; gap: 8px; list-style: none; }
.viewings-past summary::-webkit-details-marker { display: none; }
.viewings-past[open] summary .i { transform: rotate(180deg); }
.viewings-past ul { margin: 4px 0 0; padding-left: 20px; color: var(--ink-2); }
.viewings-past li { margin: 6px 0; }

/* ---------- Monthly cost (listings/costs.py) ---------- */
.costs { margin-top: 20px; }
.costs h2 { margin-bottom: 12px; }
.cost-table { width: 100%; max-width: 560px; border-collapse: collapse; }
.cost-table th, .cost-table td { padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: baseline; }
.cost-table th { font-weight: 500; padding-right: 16px; }
.cost-table th span { display: block; font-size: 0.875rem; font-weight: 400; color: var(--ink-3); }
.cost-table td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cost-table .is-missing td { color: var(--ink-3); }
.cost-table tfoot th, .cost-table tfoot td { border-bottom: 0; border-top: 2px solid var(--ink); font-weight: 600; font-size: 1.125rem; }
.cost-table tfoot td { font-family: var(--display); font-size: 1.375rem; }
.costs .help { max-width: 560px; }
.cost-move-in { display: flex; gap: 8px; align-items: flex-start; max-width: 560px; margin: 16px 0 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--canvas); color: var(--ink-2); font-size: 0.9375rem; }
.cost-move-in .i { margin-top: 3px; flex: none; }
.cost-move-in b { color: var(--ink); }
.utilities { margin: 0 0 8px; }
.utilities-help { margin: 0 0 12px; }
.utilities-grid { display: grid; gap: 0 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .utilities-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.utility .field { margin-bottom: 8px; }
.utility .field-check { margin-bottom: 20px; }
.utility .field-check .check { font-size: 0.9375rem; }

/* ---------- Rent history and flags (listings/prices.py) ---------- */
.card-flags { position: absolute; left: 10px; top: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.card-flags .card-chip { position: static; }
.card-flags .card-chip-demo { background: var(--ink); color: #fff; }
.price-history h2 { margin-bottom: 8px; }
.price-history ol { list-style: none; margin: 0; padding: 0; max-width: 560px; }
.price-history li { display: flex; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.price-history time { flex: none; min-width: 6.5em; color: var(--ink-3); }
.price-history .help { max-width: 560px; }

/* ---------- Owner's numbers (listings/stats.py) ---------- */
.stats-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 16px 20px; margin: 0 0 28px; }
.stats-kpis div { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 10px; }
.stats-kpis dt { flex: 1; font-size: 0.875rem; color: var(--ink-3); margin: 0 0 6px; }
.stats-kpis dd { margin: 0; font-family: var(--display); font-weight: 600; font-size: 2rem; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stats-chart { margin: 0; }
.stats-chart figcaption { font-weight: 500; margin: 0 0 12px; }
.stats-chart figcaption .muted { font-weight: 400; }
.stats-bars { display: flex; height: 120px; border-bottom: 1px solid var(--line-2); }
.stats-day { flex: 1 1 0; display: flex; align-items: flex-end; padding: 0 1px; border-radius: 4px 4px 0 0; }
.stats-day i { display: block; width: 100%; background: var(--ink-2); border-radius: 4px 4px 0 0; }
.stats-day:hover, .stats-day.is-on { background: var(--canvas); }
.stats-day:hover i, .stats-day.is-on i { background: var(--ink); }
.stats-axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 0.8125rem; color: var(--ink-3); }
.stats-readout { color: var(--ink); font-weight: 500; text-align: center; }
.stats-table { margin-top: 12px; }
.stats-table summary { cursor: pointer; font-weight: 500; min-height: 44px; display: flex; align-items: center; gap: 8px; list-style: none; }
.stats-table summary::-webkit-details-marker { display: none; }
.stats-table[open] summary .i { transform: rotate(180deg); }
.stats-table .table { max-width: 360px; border: 1px solid var(--line); border-radius: var(--r-sm); border-collapse: separate; border-spacing: 0; }
.stats-table .table th, .stats-table .table td { padding: 8px 14px; }
.stats-empty { margin: 0; }
.stats-panel > .help { margin-top: 16px; }

/* ---------- Saved and recently viewed (listings/saved.py, rezido.js) ---------- */
.card-save {
  position: absolute; top: 6px; right: 6px; z-index: 2; display: grid; place-items: center;
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: transparent; color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}
.card-save:hover { transform: scale(1.06); }
.card-save .i { width: 24px; height: 24px; stroke-width: 2; }
.card-save[aria-pressed="true"] { color: var(--blue); filter: drop-shadow(0 0 1px #fff) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4)); }
[data-save][aria-pressed="true"] .i { fill: currentColor; }
.card-flags { right: 56px; }

.save-toggle[aria-pressed="true"] { --btn-bg: var(--ink); --btn-fg: #fff; }
.nav-saved { gap: 6px; }
.nav-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 0.75rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
@media (max-width: 767px) {
  .nav .nav-saved { display: inline-flex; position: relative; width: 44px; padding: 0; justify-content: center; }
  .nav-saved-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-saved .nav-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; font-size: 0.6875rem; }
  .nav-saved[aria-current="page"] { box-shadow: none; }
}
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.strip > .card { scroll-snap-align: start; }
@media (min-width: 600px) { .strip { grid-auto-columns: calc((100% - 40px) / 2.4); } }
@media (min-width: 980px) { .strip { grid-auto-columns: calc((100% - 60px) / 4); } }
.recent-section { padding-bottom: 8px; }
@media (min-width: 768px) { .recent-section { padding-bottom: 16px; } }
.saved-page { padding-top: 32px; padding-bottom: 80px; }
.saved-head { max-width: 760px; margin-bottom: 8px; }
.saved-head h1 { margin-bottom: 8px; }
.saved-section { margin-top: 40px; }
.saved-section .section-head h2 { font-size: 1.5rem; }
.saved-link { display: grid; gap: 6px; max-width: 560px; margin: 0 0 24px; }
.saved-link label { font-weight: 500; }

/* ---------- New flats right away (seekers/digest.py) ---------- */
.frequency-form { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }

/* ---------- Similar flats (listings/similar.py) ---------- */
.similar-section { background: var(--canvas); }

/* ---------- Floor plan (docs/plan/funkcije.md, 5.8) ---------- */
#korak-slike .floor-plan-field { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.upload-single .upload-drop { padding: 22px 20px; }
.upload-single .upload-drop .i { width: 30px; height: 30px; }
.upload-single .thumbs { grid-template-columns: minmax(0, 200px); }
.upload-single .thumbs li { aspect-ratio: 4 / 3; background: #fff; border: 1px solid var(--line); }
.upload-single .thumbs img { object-fit: contain; }
.floor-plan { display: block; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.floor-plan img { display: block; width: auto; height: auto; max-width: 100%; max-height: 560px; margin: 0 auto; }
.floor-plan:hover { border-color: var(--ink); }
.floor-plan-small { max-width: 320px; margin-bottom: 12px; }
.floor-plan-small img { max-height: 220px; }
.plan-panel .form { margin-top: 16px; }
.plan-remove { margin-top: 12px; }
.gallery-plan {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(30, 32, 38, 0.8); color: #fff; font-size: 0.875rem; font-weight: 500; padding: 6px 12px; border-radius: 999px;
  text-decoration: none;
}
@media (min-width: 768px) {
  .gallery-plan {
    min-height: 44px; padding: 0 16px; gap: 8px; font-size: 1rem; background: #fff; color: var(--ink);
    border: 1.5px solid var(--ink); border-radius: var(--r-sm);
  }
  .gallery-plan:hover { background: var(--canvas); }
}
.upload-single .upload-status:empty, .upload-single .thumbs:empty { display: none; }

/* ---------- Report a listing (docs/plan/funkcije.md, 5.9) ---------- */
.report-link { margin: 14px 0 0; text-align: center; font-size: 0.875rem; }
.report-link a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); }
.report-link a:hover { color: var(--ink); }
.report-listing {
  display: grid; gap: 4px; margin: 28px 0; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  color: var(--ink); text-decoration: none;
}
.report-listing:hover { border-color: var(--ink); }
.report-tip { margin-top: 32px; }
