/* Ceny bydlení — International Typographic Style ("swiss").
   Inspired by Josef Müller-Brockmann: white paper, near-black ink, one signal red.
   Schibsted Grotesk (OFL) for everything — neo-grotesk, crisp Czech diacritics,
   variable weight 400–700. Thick black rules as structure; no decorative radii,
   shadows, gradients, or glassmorphism. Red for marks, active states, key figures
   only. Lining figures (not tabular: Schibsted widens the decimal comma). */

/* ==========================================================================
   Fonts
   ========================================================================== */

@font-face {
    font-family: "Schibsted Grotesk";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("fonts/schibsted-latin-ext.woff2") format("woff2");
    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;
}

@font-face {
    font-family: "Schibsted Grotesk";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("fonts/schibsted-latin.woff2") format("woff2");
    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;
}

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
    color-scheme: light dark;

    --sans: "Schibsted Grotesk", "Helvetica Neue", Helvetica, "Arial", ui-sans-serif, system-ui, sans-serif;
    /* No separate serif: Swiss modernism is mono-typographic. */

    --step--2: clamp(.72rem, .70rem + .08vw, .78rem);
    --step--1: clamp(.84rem, .82rem + .10vw, .90rem);
    --step-0:  clamp(.98rem, .95rem + .14vw, 1.06rem);
    --step-1:  clamp(1.18rem, 1.08rem + .46vw, 1.50rem);
    --step-2:  clamp(1.50rem, 1.28rem + 1.06vw, 2.24rem);
    --step-3:  clamp(2.00rem, 1.56rem + 2.10vw, 3.40rem);
    --step-4:  clamp(2.60rem, 1.90rem + 3.40vw, 5.00rem);
    --step-5:  clamp(3.40rem, 2.20rem + 5.80vw, 7.60rem);

    --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
    --s-6: 36px; --s-7: 56px; --s-8: 88px;
    --gutter: clamp(18px, 5vw, 72px);
    --section: clamp(56px, 7vw, 112px);
    --wrap: 1240px;
    --wrap-wide: 1440px;
    --measure: 66ch;
    --tracking-caps: .14em;

    /* Fixed: hero and footer are black in both themes */
    --noir: #0a0a0a;
    --noir-2: #111111;
    --noir-line: rgb(245 245 245 / .10);
    --on-noir: #f5f5f5;
    --on-noir-muted: #888888;

    /* Adaptive tokens */
    --bg:          light-dark(#fafafa, #0b0b0b);
    --surface:     light-dark(#ffffff, #111111);
    --ink:         light-dark(#0a0a0a, #f0f0f0);
    --ink-2:       light-dark(#1e1e1e, #c8c8c8);
    --muted:       light-dark(#6b6b6b, #888888);
    --line:        light-dark(rgb(10 10 10 / .11), rgb(245 245 245 / .11));
    --line-strong: light-dark(rgb(10 10 10 / .26), rgb(245 245 245 / .26));
    --accent:      light-dark(#e2231a, #ff4438);   /* signal red, AA on both grounds */
    --accent-soft: light-dark(rgb(226 35 26 / .07), rgb(255 68 56 / .10));
    --good:        light-dark(#1a6b35, #3acf6a);
    --bad:         light-dark(#c01010, #f05050);
    --slate:       light-dark(#304a6a, #7098c0);
    --ochre:       light-dark(#7a5800, #c89020);

    /* Charts */
    --viz-1: light-dark(#e2231a, #ff4438);
    --viz-2: light-dark(#0a0a0a, #d0d0d0);
    --viz-3: light-dark(#888888, #555555);
    --viz-4: light-dark(#a06a00, #d4900a);
    --viz-5: light-dark(#0a6868, #22b0b0);
    --viz-grid:  light-dark(rgb(10 10 10 / .07), rgb(245 245 245 / .07));
    --viz-axis:  light-dark(rgb(10 10 10 / .40), rgb(245 245 245 / .40));
    --viz-label: light-dark(#6b6b6b, #888888);
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark; }

/* ==========================================================================
   Base
   ========================================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink-2);
    font-family: var(--sans);
    font-size: var(--step-0);
    font-weight: 400;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; }
img { display: block; height: auto; }

h1, h2, h3, h4 {
    margin: 0 0 var(--s-4);
    color: var(--ink);
    font-family: var(--sans);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.05;
    text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }

p { margin: 0 0 var(--s-4); }

a {
    color: var(--ink);
    text-decoration-color: var(--line-strong);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: color .15s, text-decoration-color .15s;
}
a:hover { color: var(--accent); text-decoration-color: currentColor; }

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

code { font-size: .87em; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip {
    position: fixed; top: -60px; left: var(--s-4); z-index: 100;
    padding: 10px 16px;
    background: var(--ink); color: var(--bg);
}
.skip:focus { top: var(--s-4); }

/* Lining figures for data. Not tabular: Schibsted Grotesk's tabular set widens the comma and the period too
   ("4 ,38", "mil . Kč"), which breaks Czech decimals; right-aligned columns read fine without it. */
.num, .data-table, .kv dd, .stat__value, .calc__payment,
.hero__figure-value, .rank-mini strong, .auction-card__price strong {
    font-variant-numeric: proportional-nums lining-nums;
}

/* The typographic device: caps labels in 700 weight */
.kicker, .stat__label, .crumbs, .nav__link, .chip, .btn,
.data-table thead th, .site-footer__title, .card__kicker,
.menu__title, .filters label, .origin, .pill, .demo-notice,
.auction-card__meta, .living__cats p, .search__submit, .hero__hints,
.page-head__meta .note, .chart__legend, .source {
    font-family: var(--sans);
    font-size: var(--step--2);
    font-weight: 700;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
}

.source, .chart__legend, .page-head__meta .note {
    letter-spacing: .06em;
    text-transform: none;
    font-weight: 400;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--wide { max-width: calc(var(--wrap-wide) + 2 * var(--gutter)); }

.section { padding-block: var(--section); }
.section + .section { padding-top: 0; }

.stack > * + * { margin-top: var(--s-7); }

.grid { display: grid; gap: var(--s-6); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0; }

.split { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.split > * { min-width: 0; }
@media (max-width: 980px) { .split { grid-template-columns: minmax(0, 1fr); } }

.site-main { min-height: 60vh; }

/* ==========================================================================
   Demo notice, header, navigation
   ========================================================================== */

.demo-notice {
    padding: 9px 0;
    background: var(--noir);
    color: var(--on-noir-muted);
    text-align: center;
    letter-spacing: .08em;
    text-transform: none;
    font-weight: 400;
}
.demo-notice a { color: var(--on-noir); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: light-dark(#ffffff, #0b0b0b);
    border-bottom: 3px solid var(--ink);
}

/* Dark mode: thin line instead of 3px rule */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .site-header { border-bottom-width: 1px; border-bottom-color: var(--line-strong); }
}
:root[data-theme="dark"] .site-header { border-bottom-width: 1px; border-bottom-color: var(--line-strong); }

.site-header__inner { display: flex; align-items: center; gap: var(--s-6); min-height: 76px; }

.brand { display: inline-flex; flex-shrink: 0; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand__mark { width: 30px; height: 30px; flex-shrink: 0; color: var(--ink); }
.brand__name {
    font-family: var(--sans);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .22em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}
.brand__name em { font-style: normal; font-weight: 400; }

.nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); margin-left: auto; }
.nav__link {
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    color: var(--ink-2);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: .12em;
    transition: color .15s, border-color .15s;
}
.nav__link:hover { color: var(--ink); }
.nav__link[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.site-header__tools { display: flex; align-items: center; gap: var(--s-3); }
.nav + .site-header__tools { margin-left: var(--s-4); }

.icon-btn {
    display: inline-grid; place-items: center;
    width: 36px; height: 36px; padding: 0;
    border: 0; background: transparent;
    color: var(--ink); cursor: pointer;
    transition: color .15s;
}
.icon-btn:hover { color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }

.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle__sun { display: block; }
    :root:not([data-theme="light"]) .theme-toggle__moon { display: none; }
}

.menu-btn { display: none; }

@media (max-width: 1380px) {
    .nav { display: none; }
    .site-header__tools, .nav + .site-header__tools { margin-left: auto; }
    .menu-btn { display: inline-grid; }
}

/* Mobile menu popover */
.menu {
    inset: 0 0 auto auto;
    width: min(360px, 100vw);
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: var(--s-7) var(--s-6);
    border: 0;
    border-left: 3px solid var(--ink);
    background: var(--bg);
    color: var(--ink);
}

.menu::backdrop { background: rgb(0 0 0 / .45); }
.menu__title { margin: 0 0 var(--s-4); color: var(--muted); }
.menu__list { margin: 0 0 var(--s-7); padding: 0; list-style: none; }
.menu__link {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-family: var(--sans);
    font-size: var(--step-2);
    font-weight: 700;
    letter-spacing: -.02em;
    text-decoration: none;
    transition: color .15s;
}
.menu__link:hover { color: var(--accent); }
.menu .field { display: grid; gap: 8px; margin-bottom: var(--s-5); }

/* ==========================================================================
   Search and suggestions
   ========================================================================== */

.search { position: relative; }
.search__field {
    display: flex; align-items: center; gap: 10px;
    height: 38px;
    border-bottom: 2px solid var(--line-strong);
    transition: border-color .15s;
}
.search__field:focus-within { border-bottom-color: var(--ink); }
.search__icon { flex-shrink: 0; color: var(--muted); }
.search__input {
    width: 170px; min-width: 0;
    border: 0; outline: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: var(--step--1);
}
.search__input::placeholder { color: var(--muted); font-weight: 400; }
.search__input::-webkit-search-cancel-button { display: none; }
.search__kbd { display: none; }

@media (max-width: 640px) { .site-header .search { display: none; } }

.search--hero { max-width: 660px; }
.search--hero .search__field { height: 64px; gap: 16px; }
.search--hero .search__input { width: 100%; font-size: var(--step-1); }
.search--hero .search__input::placeholder { font-size: var(--step-2); }

.search__submit {
    flex-shrink: 0; height: 44px; padding: 0 20px;
    border: 2px solid currentColor;
    background: transparent; color: var(--ink);
    cursor: pointer;
    transition: background .15s, color .15s;
}
.search__submit::after { content: "\2002\2192"; }
.search__submit:hover { background: var(--ink); color: var(--bg); }

.suggest {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
    min-width: 300px; margin: 0; padding: 0;
    border: 2px solid var(--ink);
    background: var(--surface);
    list-style: none;
}
.suggest[hidden] { display: none; }
.site-header .suggest { left: auto; width: max(100%, 340px); max-width: calc(100vw - 32px); }
.suggest__item a {
    display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
    padding: 10px 14px;
    color: var(--ink); text-decoration: none;
    transition: background .1s;
}
.suggest__item a:hover,
.suggest__item[aria-selected="true"] a { background: var(--accent-soft); }
.suggest__name { font-size: var(--step-0); font-weight: 600; }
.suggest__meta { color: var(--muted); font-size: var(--step--2); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }

/* ==========================================================================
   Page heads and hero
   ========================================================================== */

.page-head {
    padding: clamp(36px, 6vw, 88px) 0 clamp(24px, 4vw, 48px);
    margin-bottom: var(--s-6);
    border-bottom: 1px solid var(--line);
}
.page-head h1 { max-width: 20ch; margin-bottom: var(--s-5); }
.page-head .lead { margin: 0; }
.page-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); margin: var(--s-5) 0 0; }
.page-head__links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-6); }
.page-head .search__input { width: 100%; }

.hero {
    padding: clamp(56px, 9vw, 152px) 0 clamp(48px, 7vw, 112px);
    background: var(--noir);
    color: var(--on-noir-muted);
    /* Top red rule: the key Swiss structural mark */
    border-top: 5px solid var(--accent);
}
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 112px); align-items: end; }
@media (max-width: 980px) { .hero__inner { grid-template-columns: minmax(0, 1fr); } }
.hero .kicker { color: var(--on-noir-muted); }
.hero h1 {
    max-width: 16ch;
    margin-bottom: var(--s-6);
    color: var(--on-noir);
    font-size: var(--step-5);
    font-weight: 700;
    line-height: .98;
    letter-spacing: -.04em;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero .lead { max-width: 52ch; margin-bottom: var(--s-7); color: var(--on-noir-muted); font-weight: 400; }
.hero .search__field { border-bottom-color: var(--noir-line); border-bottom-width: 2px; }
.hero .search__field:focus-within { border-bottom-color: var(--on-noir); }
.hero .search__input { color: var(--on-noir); }
.hero .search__input::placeholder { color: var(--on-noir-muted); }
.hero .search__submit { color: var(--on-noir); }
.hero .search__submit:hover { background: var(--on-noir); color: var(--noir); }
.hero .suggest { color: var(--ink); }
.hero__hints { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: var(--s-5) 0 0; color: var(--on-noir-muted); }
.hero__hints a { color: var(--on-noir); text-decoration: none; border-bottom: 1px solid var(--noir-line); }
.hero__hints a:hover { border-bottom-color: var(--on-noir); }

.hero__figure { margin: 0; padding: var(--s-5) 0 0 var(--s-6); border-left: 4px solid var(--accent); }
.hero__figure-label { margin: 0 0 var(--s-3); font-size: var(--step--2); font-weight: 700; letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.hero__figure-value {
    margin: 0;
    color: var(--on-noir);
    font-size: var(--step-4);
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: proportional-nums lining-nums;
    letter-spacing: -.03em;
    overflow-wrap: anywhere;
}
.hero__figure-value span { display: block; margin-top: 6px; color: var(--on-noir-muted); font-size: var(--step--1); font-weight: 400; letter-spacing: .06em; }
.hero__figure-note { margin: var(--s-4) 0 0; font-size: var(--step--1); }

/* ==========================================================================
   Typography helpers
   ========================================================================== */

.kicker { display: block; margin: 0 0 var(--s-4); color: var(--muted); }

.lead { max-width: var(--measure); color: var(--ink-2); font-size: var(--step-1); font-weight: 400; line-height: 1.55; }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 1.5em; font-size: var(--step-2); border-top: 3px solid var(--ink); padding-top: var(--s-4); }
.prose li { margin-bottom: .4em; }
.note { color: var(--muted); font-size: var(--step--1); }
.source { margin: var(--s-4) 0 0; color: var(--muted); line-height: 1.6; }
.source a { color: inherit; }

/* Section heads: thick rule above, no roman numerals — number in red */
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--s-6);
    margin-bottom: var(--s-6);
    padding: var(--s-4) 0 var(--s-3);
    border-top: 4px solid var(--ink);
    border-bottom: 1px solid var(--line);
}
.section-head h2 { margin: 0; }
.section-head .kicker { margin-bottom: var(--s-3); color: var(--accent); font-weight: 700; }
.section-head p { max-width: 60ch; margin: var(--s-3) 0 0; color: var(--ink-2); }

.more-link {
    flex-shrink: 0;
    color: var(--ink);
    font-size: var(--step--2);
    font-weight: 700;
    letter-spacing: var(--tracking-caps);
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}
.more-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* Generated text: bold intro, no drop cap (Swiss is anti-decorative) */
.generated { max-width: var(--measure); }
.generated p { margin: 0 0 var(--s-4); color: var(--ink); font-size: var(--step-1); line-height: 1.6; }
.generated p:first-child { font-weight: 700; }

.delta--up   { color: var(--bad); }
.delta--down { color: var(--good); }

/* ==========================================================================
   Buttons, chips, labels
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 28px;
    border: 2px solid var(--ink);
    background: var(--ink);
    color: var(--bg);
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { border-color: var(--accent); background: var(--accent); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); background: var(--accent); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.chip {
    display: inline-flex; align-items: center;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    color: var(--ink-2);
    text-decoration: none;
    letter-spacing: .10em;
    transition: color .15s, border-color .15s;
}
.chip:hover { color: var(--ink); border-bottom-color: var(--line-strong); }
.chip[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.pill { color: var(--muted); letter-spacing: .10em; }
.pill--good { color: var(--good); }
.pill--brass { color: var(--accent); }

.origin {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--muted); letter-spacing: .10em; white-space: nowrap;
}
.origin::before { content: ""; width: 14px; height: 2px; background: currentColor; }
.origin--model { color: var(--slate); }
.origin--group { color: var(--ochre); }
.origin--deal  { color: var(--good); }
.origin--mock  { color: var(--bad); }

/* ==========================================================================
   Panels, cards, figures
   ========================================================================== */

/* Panel: opened by a thick rule, no box decoration */
.panel { padding: var(--s-5) 0 0; border-top: 3px solid var(--ink); background: none; }
.panel__title { margin: 0 0 var(--s-4); font-size: var(--step-2); font-weight: 700; }
.panel__title a { color: var(--ink); text-decoration: none; }
.panel__title a:hover { color: var(--accent); }
.panel__sub { margin: 0 0 var(--s-4); color: var(--muted); font-size: var(--step--1); }

/* Cards: border-box, no radius, no soft shadows */
.card, .living, .calc__result {
    border: 2px solid var(--line-strong);
}

.card { display: flex; flex-direction: column; gap: 8px; padding: var(--s-6); color: var(--ink); text-decoration: none; transition: border-color .15s; }
a.card:hover { border-color: var(--accent); color: var(--ink); }
.card__kicker { color: var(--muted); }
.card__title { font-size: var(--step-2); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.card__text { color: var(--ink-2); font-size: var(--step--1); }

/* Region list: bare row list, no card box */
.card--region { padding: var(--s-4) 0; border: 0; border-bottom: 1px solid var(--line); }
.card--region .card__title { font-size: var(--step-1); font-weight: 600; }
.card--region:hover .card__title { color: var(--accent); }
.grid--4 { column-gap: var(--s-6); }

/* KPI tiles: strong top rule, then light dividers */
.kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
    margin: 0;
    border-top: 4px solid var(--ink);
    border-bottom: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: var(--s-5) var(--s-5) var(--s-5) 0; }
.stat + .stat { padding-left: var(--s-5); border-left: 1px solid var(--line); }
.stat dd { margin: 0; }
.stat__label { color: var(--muted); }
.stat__value {
    color: var(--ink);
    font-size: clamp(1.4rem, 1.05rem + .75vw, 1.85rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -.03em;
}
.stat__unit { margin-left: 6px; color: var(--muted); font-size: var(--step--1); font-weight: 400; letter-spacing: .04em; }
.stat__sub { color: var(--muted); font-size: var(--step--1); line-height: 1.45; }

@media (max-width: 620px) {
    .kpis { grid-template-columns: 1fr 1fr; }
    .stat, .stat + .stat { padding: var(--s-4) var(--s-3) var(--s-4) 0; border-left: 0; border-bottom: 1px solid var(--line); }
    .stat__value { font-size: var(--step-2); }
}

.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0 var(--s-6); margin: 0 0 var(--s-4); font-size: var(--step--1); }
.kv dt, .kv dd { padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); font-weight: 600; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; } .kv dt { padding-bottom: 0; border: 0; } }

.empty {
    padding: var(--s-7) var(--s-5);
    border-top: 4px solid var(--ink);
    border-bottom: 1px solid var(--line);
    color: var(--muted); text-align: center;
}
.empty__title { margin: 0 0 var(--s-2); color: var(--ink); font-size: var(--step-2); font-weight: 700; }

.columns { margin: 0; padding: 0; list-style: none; columns: 4 200px; column-gap: var(--s-6); }
.columns li { margin: 0 0 6px; break-inside: avoid; font-size: var(--step--1); }
.columns a { text-decoration: none; }

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.crumbs ol { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 var(--s-6); padding: 0; list-style: none; color: var(--muted); letter-spacing: .10em; }
.crumbs li + li::before { content: "—"; margin-right: 10px; color: var(--line-strong); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

/* ==========================================================================
   Tables and rankings
   ========================================================================== */

.table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.data-table th, .data-table td { padding: 11px 14px 11px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: baseline; }
.data-table thead th { padding-bottom: 9px; border-bottom: 3px solid var(--ink); color: var(--muted); font-size: .66rem; white-space: nowrap; }
.data-table td.num, .data-table th.num { padding-right: 0; padding-left: 14px; text-align: right; white-space: nowrap; }
.data-table tbody tr { transition: background .1s; }
.data-table tbody tr:hover { background: var(--accent-soft); }
.data-table tr.is-self td { color: var(--ink); font-weight: 700; }
.data-table tr.is-self td:first-child { box-shadow: inset 3px 0 0 var(--accent); padding-left: 11px; }
.data-table a { color: var(--ink); font-weight: 600; text-decoration: none; }
.data-table a:hover { color: var(--accent); }

.rank-pos { color: var(--muted); font-size: 1.15rem; font-weight: 700; }
.rank-pos--top { color: var(--accent); }

.rank-mini { margin: var(--s-3) 0 var(--s-4); padding: 0; list-style: none; counter-reset: rank; font-size: var(--step--1); }
.rank-mini li { display: flex; align-items: baseline; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); counter-increment: rank; }
.rank-mini li::before { content: counter(rank, decimal-leading-zero); min-width: 22px; color: var(--accent); font-size: .88rem; font-weight: 700; }
.rank-mini a { color: var(--ink); text-decoration: none; }
.rank-mini a:hover { color: var(--accent); }
.rank-mini strong { margin-left: auto; color: var(--ink); font-weight: 700; white-space: nowrap; }

/* ==========================================================================
   Forms
   ========================================================================== */

.filters {
    display: flex; flex-wrap: wrap; align-items: end;
    gap: var(--s-4) var(--s-5); margin: 0 0 var(--s-6);
    padding-bottom: var(--s-5);
    border-bottom: 1px solid var(--line);
}
.filters .field { display: grid; gap: 6px; min-width: 180px; }
.filters label { color: var(--muted); }

.input, .select {
    min-height: 44px;
    padding: 0 30px 0 0;
    border: 0;
    border-bottom: 2px solid var(--line-strong);
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: var(--step--1);
    font-weight: 500;
    transition: border-color .15s;
}
.select {
    appearance: none;
    background:
        linear-gradient(45deg, transparent 50%, currentColor 50%) right 8px top 55% / 5px 5px no-repeat,
        linear-gradient(-45deg, transparent 50%, currentColor 50%) right 3px top 55% / 5px 5px no-repeat;
}
.select option { background: var(--surface); color: var(--ink); }
.input:focus, .select:focus { outline: 0; border-bottom-color: var(--ink); }

.pager { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin: var(--s-6) 0 0; padding: 0; list-style: none; }

/* ==========================================================================
   Charts
   ========================================================================== */

.chart { margin: 0; }
.chart__title { margin: 0 0 var(--s-4); color: var(--ink); font-size: var(--step-1); font-weight: 700; letter-spacing: -.02em; }
.chart__svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart__grid { stroke: var(--viz-grid); stroke-width: 1; }
.chart__axis { stroke: var(--viz-axis); stroke-width: 1; }
.chart__label { fill: var(--viz-label); font: 700 11px var(--sans); letter-spacing: .04em; }
.chart__line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart__dot { stroke: var(--bg); stroke-width: 2; }
.chart__legend { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: var(--s-4) 0 0; padding: 0; list-style: none; color: var(--ink-2); }
.chart__legend li { display: inline-flex; align-items: center; gap: 8px; }
.chart__swatch { width: 18px; height: 2px; }
.chart details { margin-top: var(--s-4); font-size: var(--step--1); }
.chart summary { color: var(--muted); cursor: pointer; font-size: var(--step--2); letter-spacing: var(--tracking-caps); text-transform: uppercase; font-weight: 700; }
.slot-1 { stroke: var(--viz-1); background: var(--viz-1); fill: var(--viz-1); }
.slot-2 { stroke: var(--viz-2); background: var(--viz-2); fill: var(--viz-2); }
.slot-3 { stroke: var(--viz-3); background: var(--viz-3); fill: var(--viz-3); }
.slot-4 { stroke: var(--viz-4); background: var(--viz-4); fill: var(--viz-4); }
.slot-5 { stroke: var(--viz-5); background: var(--viz-5); fill: var(--viz-5); }

/* ==========================================================================
   Living box
   ========================================================================== */

.living { display: grid; gap: var(--s-4); padding: var(--s-6); }
.living .kicker { margin: 0; }
.living .panel__title { margin: 0; }
.living__head { display: flex; align-items: center; gap: var(--s-5); }
.living__index { margin: 0; color: var(--ink); font-size: var(--step-5); font-weight: 700; line-height: .9; letter-spacing: -.04em; }
.living__index small { color: var(--muted); font-size: .25em; font-weight: 400; }
.living__head .note { margin: 0; line-height: 1.5; }
.living__cats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.living__cats p { margin: 0; color: var(--muted); }
.living__cats ul { margin: 8px 0 0; padding: 0; list-style: none; font-size: var(--step--1); }
.living__cats li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.living__cats strong { color: var(--ink); font-weight: 600; }
@media (max-width: 520px) { .living__cats { grid-template-columns: 1fr; } }

/* ==========================================================================
   Auctions
   ========================================================================== */

.auction-list { margin: 0; padding: 0; list-style: none; border-top: 4px solid var(--ink); }

.auction-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    gap: var(--s-5);
    align-items: baseline;
    padding: var(--s-5) 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
}

a.auction-card:hover { color: var(--ink); }
a.auction-card:hover .auction-card__title { color: var(--accent); }
.auction-card__date { display: grid; gap: 2px; color: var(--muted); font-size: var(--step--2); letter-spacing: .12em; }
.auction-card__date strong {
    color: var(--ink);
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1;
}
.auction-card__title { margin: 0; font-size: var(--step-1); font-weight: 600; line-height: 1.25; letter-spacing: -.01em; transition: color .15s; }
.auction-card__meta { margin: 6px 0 0; color: var(--muted); letter-spacing: .10em; }
.auction-card__price { display: grid; justify-items: end; gap: 2px; white-space: nowrap; }
.auction-card__price strong { font-size: var(--step-2); font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.auction-card__price span { color: var(--muted); font-size: var(--step--2); letter-spacing: .06em; }

@media (max-width: 640px) {
    .auction-card { grid-template-columns: 64px minmax(0, 1fr); gap: var(--s-3) var(--s-4); }
    .auction-card__price { grid-column: 2; justify-items: start; }
}

.ratio-bar { position: relative; height: 2px; margin: var(--s-5) 0; background: var(--line-strong); }
.ratio-bar__fill { position: absolute; top: -1px; left: 0; height: 4px; background: var(--accent); }
.ratio-bar__mark { position: absolute; top: -7px; width: 2px; height: 16px; background: var(--ink); }

/* Rent vs. buy: owner's monthly cost against the rent (templates/rent_vs_buy/place.html.twig) */
.versus { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; align-items: center; gap: var(--s-3) var(--s-4); margin: var(--s-5) 0; font-size: var(--step--1); }
.versus__label { color: var(--muted); font-weight: 700; letter-spacing: var(--tracking-caps); text-transform: uppercase; font-size: var(--step--2); }
.versus__track { position: relative; height: 10px; background: var(--line); }
.versus__bar { display: block; width: 0; min-width: 2px; height: 100%; transition: width .2s ease; }
.versus__value { white-space: nowrap; color: var(--ink); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Mortgage calculator
   ========================================================================== */

.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.calc > * { min-width: 0; }
@media (max-width: 880px) { .calc { grid-template-columns: minmax(0, 1fr); } }
.calc__form { display: grid; gap: var(--s-5); }
.calc__field { display: grid; gap: 10px; }
.calc__field label {
    display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3);
    color: var(--muted);
    font-size: var(--step--2);
    font-weight: 700;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
}
.calc__field output {
    color: var(--ink);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -.02em;
    text-transform: none;
}

.calc__field input[type="range"] { width: 100%; height: 20px; margin: 0; appearance: none; background: transparent; cursor: pointer; }
.calc__field input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--line-strong); }
.calc__field input[type="range"]::-moz-range-track { height: 2px; background: var(--line-strong); }
.calc__field input[type="range"]::-webkit-slider-thumb { width: 14px; height: 14px; margin-top: -6px; border: 2px solid var(--ink); background: var(--bg); appearance: none; }
.calc__field input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border: 2px solid var(--ink); border-radius: 0; background: var(--bg); }

.calc__result { position: sticky; top: 100px; padding: var(--s-6); }
.calc__payment {
    margin: 0;
    color: var(--ink);
    font-size: var(--step-5);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.04em;
}
.calc__payment small { display: block; margin-top: 8px; color: var(--muted); font-size: var(--step--1); font-weight: 400; letter-spacing: .06em; }
.calc__cta { margin-top: var(--s-6); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    margin-top: var(--section);
    padding: var(--s-8) 0 var(--s-6);
    background: var(--noir);
    color: var(--on-noir-muted);
    font-size: var(--step--1);
    border-top: 5px solid var(--accent);
}
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: var(--s-7); }
.site-footer .brand { margin-bottom: var(--s-5); color: var(--on-noir); }
.site-footer .brand__mark { color: var(--on-noir); }
.site-footer__title { margin: 0 0 var(--s-4); color: var(--on-noir-muted); }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin: 0 0 8px; }
.site-footer a { color: var(--on-noir); text-decoration: none; transition: color .15s; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--noir-line); }
.site-footer__about p { max-width: 40ch; font-weight: 400; }
.site-footer__bottom {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3) var(--s-5);
    margin-top: var(--s-7); padding-top: var(--s-5);
    border-top: 1px solid var(--noir-line);
    font-size: var(--step--2);
}

@media (max-width: 980px) {
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
    .site-footer__about { grid-column: 1 / -1; }
}
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
    .site-header, .site-footer, .menu, .search, .theme-toggle, .demo-notice { display: none !important; }
    body { background: #fff; color: #000; }
}

/* ==========================================================================
   Responsive utilities
   ========================================================================== */

@media (max-width: 640px) {
    .section-head { flex-direction: column; align-items: flex-start; gap: var(--s-3); }
}


/* ==========================================================================
   Maps (App\Map\ChoroplethMap, templates/map/_choropleth.html.twig): sequential
   palette --map-1 (low) … --map-6 (high), lighter→darker in light mode, darker→lighter in dark mode
   ========================================================================== */

:root {
    --map-1: light-dark(#ededed, #2b2b2b);
    --map-2: light-dark(#e5cfcd, #3b2321);
    --map-3: light-dark(#eba29c, #6c2a25);
    --map-4: light-dark(#e8635a, #ad3028);
    --map-5: light-dark(#e2231a, #ff4438);
    --map-6: light-dark(#8c120c, #ff9c94);
    --map-nodata: light-dark(#f2f2f2, #161616);
}

.map { margin: 0; }
.map__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-3) var(--s-5); margin: 0 0 var(--s-4); }
.map__title { margin: 0; font-size: var(--step-1); font-weight: 700; letter-spacing: -.01em; }
.map__switch .chip[aria-current="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.map__svg { display: block; width: 100%; height: auto; max-height: min(78vh, 760px); }
.map__area { fill-rule: evenodd; stroke: var(--bg); stroke-width: .5; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: fill-opacity .12s; }
.map__svg a { cursor: pointer; }
.map__svg a:hover .map__area { fill-opacity: .6; }
.map__border { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.map__outline { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.map__point { fill: var(--ink); stroke: var(--bg); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.map__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: var(--s-4) 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.map__legend li { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.map__legend .map__unit { color: var(--muted); }
.map__swatch { display: inline-block; width: 14px; height: 14px; }
.map__note { margin: var(--s-3) 0 0; color: var(--muted); font-size: var(--step--1); }
.map-q1 { fill: var(--map-1); background: var(--map-1); }
.map-q2 { fill: var(--map-2); background: var(--map-2); }
.map-q3 { fill: var(--map-3); background: var(--map-3); }
.map-q4 { fill: var(--map-4); background: var(--map-4); }
.map-q5 { fill: var(--map-5); background: var(--map-5); }
.map-q6 { fill: var(--map-6); background: var(--map-6); }
.map-nodata { fill: var(--map-nodata); background: var(--map-nodata); }

/* cadastral areas (k.ú.) of a city next to the rent of one k.ú. */
.ku-list { max-height: 34rem; margin: 0; padding: 0; overflow-y: auto; list-style: none; font-size: var(--step--1); }
.ku-list li { display: flex; justify-content: space-between; gap: var(--s-3); padding: 7px 0; border-bottom: 1px solid var(--line); }
.ku-list .num { color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ku-list .is-self { font-weight: 600; }
.ku-list .is-self span[aria-current] { color: var(--accent); }
.few { margin-left: 2px; color: var(--accent); text-decoration: none; cursor: help; }

/* auction map (AuctionController::auctionMap): upcoming auctions in the accent colour, sold ones muted */
.map--auctions .map__area { stroke: var(--bg); }
.map__point--auction { fill: var(--accent); }
.map__point--sold { fill: var(--muted); opacity: .55; }
.map__key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: var(--s-3) 0 0; padding: 0; list-style: none; color: var(--muted); font-size: var(--step--1); }
.map__key li { display: inline-flex; align-items: center; gap: 7px; }
.map__key span { width: 10px; height: 10px; border-radius: 50%; }
.map__key .map__key--auction { background: var(--accent); }
.map__key .map__key--sold { background: var(--muted); opacity: .55; }

/* ------------------------------------------------------------------ cookie consent (public/js/consent.js) */
.consent { position: fixed; inset: auto 0 0; z-index: 100; border-top: 3px solid var(--ink); background: var(--surface); box-shadow: 0 -8px 24px rgb(0 0 0 / .08); }
.consent[hidden] { display: none; }
.consent__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-5); max-width: var(--wrap-wide); margin: 0 auto; padding: 18px var(--gutter); }
.consent__inner > div:first-child { flex: 1 1 420px; }
.consent__title { margin: 0 0 4px; font-size: .72rem; font-weight: 700; letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.consent__text { margin: 0; max-width: 80ch; color: var(--ink); font-size: var(--step--1); }
.consent__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.consent__actions .btn { min-height: 44px; padding: 0 22px; }
@media (max-width: 560px) {
    .consent__actions { width: 100%; }
    .consent__actions .btn { flex: 1 1 0; padding: 0 12px; }
}
