/* Klog Bolig follows the MCP family's visual language (energimcp.dk), set in Bricolage Grotesque,
   warm off-white, 22px tiles, pill controls. Tracking stays at zero. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
:root {
  --bg: #f7f4ee; --alt: #efeae0; --tile: #ffffff; --ink: #1f2a44; --dim: #4a5468; --faint: #7a8294;
  --line: #e6e0d4; --line-strong: #d3cbbb; --btn: #1f2a44; --btn-ink: #f7f4ee; --soft-btn: #efeae0;
  --nav: rgba(247, 244, 238, 0.86);
  --brand: #c8553d; --brand-bg: #f6e3dc;
  --ok: #0f7b4f; --ok-bg: #e6f3ec; --mid: #9a6400; --mid-bg: #fdf1d6; --warn: #c1352a; --warn-bg: #fbe9e7; --ai: #5b4bd6; --ai-bg: #eeebfc;
  --t-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 22px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #121826; --alt: #1a2233; --tile: #1c2539; --ink: #f7f4ee; --dim: #b4bac6; --faint: #8a92a3;
    --line: #2b3550; --line-strong: #3a4563; --btn: #f7f4ee; --btn-ink: #1f2a44; --soft-btn: #242e45;
    --nav: rgba(18, 24, 38, 0.86);
    --brand: #e27a5e; --brand-bg: #3a2420;
    --ok: #3fbf85; --ok-bg: #16291f; --mid: #f0bc55; --mid-bg: #2e2412; --warn: #ef6b5f; --warn-bg: #321a18; --ai: #a99cff; --ai-bg: #221e3a;
  }
}
html { -webkit-font-smoothing: antialiased; width: 100%; overflow-x: hidden; }
body { font-family: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.45; letter-spacing: 0; max-width: 100%; }
.mono { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 8px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; flex: none; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 20; background: var(--nav); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.top-inner { max-width: 1320px; margin: 0 auto; padding: 10px 22px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 26px; line-height: 1; font-weight: 700; text-decoration: none; flex: none; }
.mark { width: 30px; height: 30px; }
.search { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: var(--tile); border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; height: 44px; max-width: 720px; }
.search:focus-within { border-color: var(--line-strong); box-shadow: 0 4px 18px rgba(0,0,0,.06); }
.search svg { color: var(--faint); }
.search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; color: var(--ink); outline: none; height: 100%; }
.search input::placeholder { color: var(--faint); }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); list-style: none; background: var(--tile); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 50px rgba(0,0,0,.12); overflow: hidden; }
.suggest li { padding: 10px 16px; display: flex; justify-content: space-between; gap: 12px; cursor: pointer; font-size: 15px; }
.suggest li small { color: var(--faint); font-size: 12px; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--alt); }
/* Recent searches, shown when the box is empty. */
.suggest li.suggest-head { cursor: default; padding: 10px 16px 6px; font-size: 12px; color: var(--faint); align-items: center; }
.suggest li.suggest-head:hover { background: none; }
.suggest li.suggest-head button { font-size: 12px; color: var(--dim); text-decoration: underline; text-underline-offset: 3px; }
.suggest li.suggest-note { font-size: 13px; color: var(--dim); white-space: normal; line-height: 1.4; }
.suggest.recent li[data-i] { justify-content: flex-start; align-items: center; }
.suggest .sg-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-ico { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--faint); stroke-width: 1.8; stroke-linecap: round; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; font-size: 15px; font-weight: 500; white-space: nowrap; transition: opacity 300ms var(--t-ease), transform 300ms var(--t-ease), border-color 300ms var(--t-ease); text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--btn); color: var(--btn-ink); }
.btn.soft { background: var(--soft-btn); }
.btn.line { border: 1px solid var(--line-strong); }
.btn.line:hover { border-color: var(--ink); }
.icon-btn-square { position: relative; width: 44px; height: 44px; padding: 0; flex: none; }
.icon-btn-square .count { position: absolute; top: -2px; right: -2px; }

/* Everything except the brand and search lives behind this one button, so
   the bar's own width never depends on how many actions are enabled or on
   text hiding at a breakpoint — only .menu-panel's layout has to respond. */
.menu-wrap { position: relative; flex: none; margin-left: auto; }
/* Wide screens: logo left, search centred on the page, menu right. */
@media (min-width: 641px) {
  .top-inner:has(.search) { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(0, 720px) minmax(130px, 1fr); }
  .top-inner:has(.search) .brand { justify-self: start; }
  .top-inner:has(.search) .search { max-width: none; width: 100%; }
  .top-inner:has(.search) .menu-wrap { justify-self: end; margin-left: 0; }
}
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; display: flex; flex-direction: column; gap: 2px; background: var(--tile); border: 1px solid var(--line); border-radius: 16px; padding: 6px; box-shadow: 0 18px 50px rgba(0,0,0,.12); z-index: 30; animation: pop-in 180ms var(--panel-ease); }
.menu-panel[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .menu-panel { animation: none; } }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; color: var(--ink); text-decoration: none; white-space: nowrap; cursor: pointer; width: 100%; text-align: left; background: none; }
.menu-item:hover { background: var(--alt); }
.menu-item svg { color: var(--dim); flex: none; }
.menu-item .count { margin-left: auto; }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu-sep[hidden] { display: none; }

@media (max-width: 640px) {
  .brand { font-size: 0; gap: 0; }
  .top-inner { padding-inline: 22px; gap: 8px; }
}

main { max-width: 1320px; margin: 0 auto; padding: 0 22px 80px; }

/* Welcome */
.welcome { text-align: center; padding-block: clamp(56px, 10vw, 110px) 20px; }
.eyebrow { display: inline-block; font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 12px; text-transform: uppercase; color: var(--dim); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; margin-bottom: 18px; background: var(--tile); }
.welcome h1 { font-size: clamp(38px, 6.4vw, 64px); line-height: 1.05; font-weight: 500; text-wrap: balance; }
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--dim); max-width: 640px; margin: 18px auto 0; text-wrap: balance; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 28px; }
.chip { padding: 9px 16px; border-radius: 999px; background: var(--tile); border: 1px solid var(--line); font-size: 15px; transition: border-color 300ms var(--t-ease); }
.chip:hover { border-color: var(--ink); }
/* Footer: the people behind Klog Bolig. */
.site-foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 40px 0 calc(28px + env(safe-area-inset-bottom, 0px)); color: var(--dim); font-size: 14px; }
.foot-inner { max-width: 1320px; margin: 0 auto; padding-inline: 22px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px 48px; }
.foot-brand { display: flex; flex-direction: column; gap: 12px; max-width: 40ch; font-size: 15px; }
.foot-brand .brand { color: var(--ink); font-size: 26px; gap: 10px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot-links a { color: var(--dim); }
.foot-team h2 { display: flex; align-items: center; min-height: 30px; font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.founders { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.founder { display: flex; gap: 16px; align-items: center; background: var(--tile); border-radius: var(--radius); padding: 18px; }
.founder img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; background: var(--alt); }
.founder div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.founder b { color: var(--ink); font-weight: 600; font-size: 16px; }
.founder span { font-size: 14px; color: var(--faint); }
.founder p { font-size: 14px; margin-top: 4px; }
.founder-in { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; font-weight: 500; color: var(--dim); text-decoration: none; align-self: flex-start; min-height: 24px; }
.founder-in:hover { color: var(--ink); }
.founder-in svg { width: 16px; height: 16px; fill: currentColor; }
.foot-note { max-width: 1320px; margin: 28px auto 0; padding-inline: 22px; font-size: 12px; color: var(--faint); }
@media (max-width: 760px) { .foot-inner { grid-template-columns: 1fr; } }
body.map-full .site-foot { display: none; }

/* Messages about new homes. */
.follow-alert { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0 12px; font-size: 14px; color: var(--dim); }
.follow-alert svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.alerts-inner .fsec .btn { align-self: flex-start; }
.al-msg { background: var(--ok-bg); color: var(--ink); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.al-warn { color: var(--mid); }
.al-state.on { color: var(--ok); font-weight: 500; font-size: 14px; }
.al-watches { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.al-watches a { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--alt); font-size: 14px; text-decoration: none; }
.al-mail { display: flex; gap: 8px; }
.digest { position: relative; margin-top: 14px; max-width: 520px; }
.digest-form { display: grid; gap: 8px; }
.digest-form label, .digest-on { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--dim); }
.digest-on b { color: var(--ink); font-weight: 500; }
.digest svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.al-mail input { flex: 1; min-width: 0; font: inherit; font-size: 15px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; }
.al-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.al-actions .btn[disabled] { opacity: .45; pointer-events: none; }

/* Feedback: a button always on screen, a panel with your threads. */
.fb-btn { position: fixed; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 65; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 14px; border-radius: 999px; background: var(--btn); color: var(--btn-ink); font-size: 14px; font-weight: 500; box-shadow: 0 8px 28px rgba(0,0,0,.22); transition: transform 300ms var(--t-ease); }
.fb-btn:active { transform: scale(0.97); }
.fb-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fb-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--warn); color: #fff; font-size: 12px; display: grid; place-items: center; }
.fb-panel { position: fixed; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(70px + env(safe-area-inset-bottom, 0px)); z-index: 66; width: min(380px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 100px)); display: flex; flex-direction: column; gap: 10px; padding: 14px; overflow-y: auto; background: var(--tile); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 18px 50px rgba(0,0,0,.28); animation: pop-in 180ms var(--panel-ease); font-size: 14px; }
.fb-head { display: flex; align-items: center; gap: 8px; }
.fb-head b { flex: 1; min-width: 0; font-weight: 500; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-x, .fb-back { width: 30px; height: 30px; border-radius: 50%; background: var(--soft-btn); color: var(--dim); flex: none; font-size: 14px; }
.fb-back { font-size: 20px; line-height: 1; }
.fb-form { display: flex; flex-direction: column; gap: 8px; }
.fb-form textarea { width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; resize: vertical; }
.fb-form .btn { align-self: flex-end; }
.fb-shot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fb-attach { font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--dim); }
.fb-hint { font-size: 12px; color: var(--faint); }
.fb-thumb { position: relative; }
.fb-thumb img { height: 64px; border-radius: 8px; border: 1px solid var(--line); display: block; }
.fb-thumb button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 10px; }
.fb-note { font-size: 13px; background: var(--ok-bg); border-radius: 10px; padding: 8px 10px; }
.fb-warn { color: var(--warn); }
.fb-sub { font-size: 12px; font-weight: 500; color: var(--dim); margin-top: 4px; }
.fb-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.fb-list button { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "dot t st" ". meta meta"; align-items: center; gap: 2px 8px; text-align: left; padding: 8px 10px; border-radius: 12px; }
.fb-list button:hover { background: var(--alt); }
.fb-dot { grid-area: dot; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.fb-t { grid-area: t; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-list .fb-status { grid-area: st; }
.fb-list small { grid-area: meta; font-size: 12px; color: var(--faint); }
.fb-status { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--alt); color: var(--dim); white-space: nowrap; }
.fb-status.s-i-gang { background: var(--mid-bg); color: var(--mid); }
.fb-status.s-løst { background: var(--ok-bg); color: var(--ok); }
.fb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; color: var(--faint); }
.fb-meta a { color: var(--ink); }
.fb-msgs { list-style: none; display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.fb-msgs li { display: flex; flex-direction: column; max-width: 85%; gap: 2px; }
.fb-msgs li span { padding: 8px 12px; border-radius: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.fb-msgs li.me { align-self: flex-end; align-items: flex-end; }
.fb-msgs li.me span { background: var(--btn); color: var(--btn-ink); border-bottom-right-radius: 4px; }
.fb-msgs li.agent span { background: var(--alt); border-bottom-left-radius: 4px; }
.fb-msgs small { font-size: 11px; color: var(--faint); }
.fb-msgs li.shot img { max-width: 180px; border-radius: 10px; border: 1px solid var(--line); display: block; }
/* Out of the way of the map's own buttons in full screen, and of the compare bar on phones. */
body.map-full .fb-btn { bottom: 212px; }
@media (max-width: 640px) { .fb-btn span:not(.fb-count) { display: none; } .fb-btn { padding: 0 12px; } body:has(.cmp-bar:not([hidden])) .fb-btn { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }

/* Sharing with friends and family. */
.share-inner .fsec .btn.line { align-self: flex-start; }
.share-link { display: flex; gap: 8px; }
.share-link input { flex: 1; min-width: 0; font: inherit; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; }

/* The Brug page. */
.u-head { flex-direction: row !important; justify-content: space-between; align-items: flex-end !important; flex-wrap: wrap; }
.u-bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; background: var(--tile); border-radius: 16px; padding: 14px 14px 0; }
.u-bars span { flex: 1; min-height: 2px; background: var(--ok); border-radius: 4px 4px 0 0; opacity: .85; }
.u-bars span:hover { opacity: 1; }
.u-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); margin-top: 6px; }
.u-funnel { list-style: none; display: flex; flex-direction: column; gap: 8px; background: var(--tile); border-radius: 16px; padding: 14px; }
.u-funnel li { display: grid; grid-template-columns: 180px minmax(0, 1fr) 40px; align-items: center; gap: 12px; font-size: 14px; }
.u-funnel i { display: block; height: 10px; border-radius: 999px; background: var(--ink); opacity: .75; min-width: 2px; }
.u-funnel b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.u-top { list-style: none; counter-reset: u; background: var(--tile); border-radius: 16px; padding: 6px 14px; }
.u-top li { counter-increment: u; display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.u-top li:first-child { border-top: 0; }
.u-top li::before { content: counter(u); color: var(--faint); width: 16px; }
.u-top span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-top b { font-weight: 500; font-variant-numeric: tabular-nums; }
.u-users { width: 100%; border-collapse: collapse; background: var(--tile); border-radius: 16px; overflow: hidden; font-size: 14px; }
.u-users th, .u-users td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--line); white-space: nowrap; }
.u-users th { color: var(--faint); font-weight: 500; font-size: 12px; border-top: 0; }
.u-users td:nth-child(n+3), .u-users th:nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; }
.u-users b { font-weight: 500; }
.u-users tbody tr { cursor: pointer; }
.u-users tbody tr:hover, .u-users tbody tr.on { background: var(--alt); }
.u-timeline { list-style: none; background: var(--tile); border-radius: 16px; padding: 6px 14px; max-height: 520px; overflow-y: auto; }
.u-timeline li { display: grid; grid-template-columns: 130px 200px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.u-timeline li:first-child { border-top: 0; }
.u-timeline small { color: var(--faint); font-size: 12px; }
.u-timeline b { font-weight: 500; }
.u-timeline span { color: var(--dim); overflow-wrap: anywhere; }
@media (max-width: 640px) { .u-funnel li { grid-template-columns: 1fr 60px 32px; } .u-timeline li { grid-template-columns: 1fr; gap: 2px; } }

/* Front page: a dashboard of your numbers and homes. */
.welcome { text-align: left; padding-block: 32px 20px; }
.welcome h1 { font-size: clamp(30px, 4.4vw, 44px); }
.welcome .lede { margin: 8px 0 0; font-size: 17px; max-width: 60ch; }
.welcome .chips { justify-content: flex-start; margin-top: 18px; }
/* "Jeg vil … og har …": the two choices that make "Bedste boliger" yours, as pills in a sentence */
.wish { margin: 12px 0 0; font-size: 17px; color: var(--dim); line-height: 1.8; }
/* Each select as wide as its choice, where the browser can (field-sizing) */
/* The choices read as words in the sentence: bold, underlined in tegl, with a small chevron. */
.wish select { appearance: none; -webkit-appearance: none; font: inherit; font-weight: 600; color: var(--ink); background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23C8553D' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 1px center / 12px; border: 0; border-bottom: 2px solid var(--brand); border-radius: 0; padding: 0 17px 0 0; margin: 0 2px; max-width: 100%; field-sizing: content; cursor: pointer; line-height: 1.3; transition: color 200ms var(--t-ease), background-color 200ms var(--t-ease); }
.wish select:hover { color: var(--brand); }
.wish select:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
@media (prefers-color-scheme: dark) { .wish select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23E27A5E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); } }
@media (max-width: 640px) { .wish { font-size: 16px; } }
.dash-hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.dash-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dash { display: flex; flex-direction: column; gap: 28px; margin-top: 28px; }
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.dash-kpi { display: flex; flex-direction: column; gap: 2px; background: var(--tile); border-radius: 18px; padding: 14px 16px; text-decoration: none; border: 1px solid transparent; transition: border-color 300ms var(--t-ease); }
.dash-kpi:hover { border-color: var(--line-strong); }
.dash-kpi small { font-size: 13px; color: var(--dim); }
.dash-kpi b { font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums; }
.dash-kpi span { font-size: 13px; color: var(--faint); }
.dash-kpi em { font-style: normal; color: var(--ok); font-weight: 500; }
.dash-kpi b span { font-size: inherit; color: inherit; }
@media (max-width: 640px) { .dash-kpis { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 8px; margin: 0 -22px; padding: 0 22px; scroll-padding-left: 22px; } .dash-kpis::-webkit-scrollbar { display: none; } .dash-kpi { flex: 0 0 160px; scroll-snap-align: start; } .dash-kpi { padding: 12px; } .dash-kpi b { font-size: 21px; } .dash-kpi span { font-size: 12px; } .dash-cols { grid-template-columns: 1fr; } }
.dash-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dash-head h2 { font-size: 20px; font-weight: 500; }
.dash-head h2 small { font-size: 14px; font-weight: 400; color: var(--dim); margin-left: 8px; }
.dash-head a { font-size: 14px; color: var(--dim); }
.dash-example { margin-top: 12px; }
.dash-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.dash-grid .card .save { display: none; }
.dash-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 28px; }
.dash-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.dash-list button { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: var(--tile); border-radius: 16px; padding: 8px 12px 8px 8px; border: 1px solid transparent; transition: border-color 300ms var(--t-ease); }
.dash-list button:hover { border-color: var(--line-strong); }
.dash-list img, .dash-noimg { width: 64px; height: 48px; object-fit: cover; border-radius: 10px; flex: none; background: var(--alt); }
.dash-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dash-main b { font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-main span { font-size: 13px; color: var(--dim); }
.dash-num { display: flex; flex-direction: column; align-items: flex-end; font-weight: 500; font-size: 15px; white-space: nowrap; }
.dash-num small { font-size: 12px; font-weight: 400; color: var(--faint); }
.dash-seen { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 8px; }
.dash-list .pill { flex: none; }
.seen-list li { display: flex; align-items: center; gap: 8px; }
.seen-list li > button:first-child { flex: 1; min-width: 0; }
.dash-list .seen-del { width: 32px; height: 32px; padding: 0; justify-content: center; border-radius: 50%; background: var(--soft-btn); color: var(--dim); flex: none; }
.dash-list .seen-del:hover { color: var(--ink); border-color: transparent; }
.history .res-head { flex-direction: row; justify-content: space-between; align-items: flex-end; }
.history .phase-head { margin: 22px 0 10px; }
@media (max-width: 640px) { .dash-seen { grid-template-columns: 1fr; } .dash-list .pill { display: none; } }
.dash-empty { display: flex; flex-direction: column; gap: 4px; background: var(--tile); border-radius: 16px; padding: 16px 18px; font-size: 14px; color: var(--dim); }
.dash-empty b { color: var(--ink); font-weight: 500; }
.how { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 900px; margin: 64px auto 0; text-align: left; }
.how li { counter-increment: s; background: var(--tile); border-radius: var(--radius); padding: 22px; display: grid; grid-template-columns: 30px 1fr; gap: 4px 12px; }
.how li::before { content: counter(s); grid-row: span 2; width: 26px; height: 26px; border-radius: 8px; background: var(--alt); display: grid; place-items: center; font-size: 13px; font-weight: 500; }
.how b { font-weight: 500; }
.how span { color: var(--dim); font-size: 14px; }
@media (max-width: 760px) { .how { grid-template-columns: 1fr; } }

/* Results */
.res-head { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding-block: 32px 18px; }
.res-head h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 500; line-height: 1.1; }
.meta { color: var(--dim); font-size: 14px; margin-top: 6px; }
.tally { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.god { color: var(--ok); background: var(--ok-bg); }
.pill.taet { color: var(--mid); background: var(--mid-bg); }
.pill.nej { color: var(--dim); background: var(--alt); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 22px; font-size: 14px; }
.seg { display: inline-flex; background: var(--alt); border-radius: 999px; padding: 3px; }
/* Long segment groups scroll sideways inside themselves rather than widening the page. */
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; }
.seg button { padding: 6px 12px; border-radius: 999px; color: var(--dim); font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--tile); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); cursor: pointer; }
.check input { accent-color: var(--ink); width: 16px; height: 16px; }
.select { display: inline-flex; align-items: center; gap: 8px; color: var(--dim); }
.sort-top { margin-left: auto; }
.sort-top[hidden] { display: none; }
@media (max-width: 640px) { .sort-top { margin-left: 0; font-size: 0; gap: 0; } .sort-top.select select { font-size: 14px; max-width: calc(100vw - 44px); } }
.select select { font: inherit; color: var(--ink); background: var(--tile); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px 18px; }
.card { background: var(--tile); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-align: left; transition: transform 400ms var(--t-ease), box-shadow 400ms var(--t-ease); }
.card:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(0,0,0,.08); }
.photo { position: relative; aspect-ratio: 3 / 2; background: var(--alt); overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo img.img-missing { visibility: hidden; }
.photo-strip { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.photo-strip::-webkit-scrollbar { display: none; }
.photo-strip img { flex: 0 0 100%; scroll-snap-align: center; }
.photo-strip img[hidden] { display: none; }
.photo-dots { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 5px; pointer-events: none; }
.photo-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); box-shadow: 0 0 2px rgba(0,0,0,.35); transition: background 300ms var(--panel-ease); }
.photo-dots i.on { background: #fff; }
.photo-dots i[hidden], .one-photo .photo-dots, .one-photo .photo-nav { display: none; }
.photo-nav { display: none; }
@media (hover: hover) {
  .photo-nav { display: grid; place-items: center; position: absolute; top: 50%; width: 32px; height: 32px; margin-top: -16px; border-radius: 50%; background: rgba(255,255,255,.9); color: #0a0a0a; opacity: 0; transition: opacity 300ms var(--panel-ease); }
  .photo-nav.prev { left: 10px; } .photo-nav.next { right: 10px; }
  .photo-nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .photo:hover .photo-nav, .photo-nav:focus-visible { opacity: 1; }
  .photo.at-start .photo-nav.prev:not(:focus-visible), .photo.at-end .photo-nav.next:not(:focus-visible) { opacity: 0; pointer-events: none; }
}
.photo:has(img.img-missing)::after { content: ""; position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; transform: translate(-50%, -50%); background: var(--dim); opacity: .45; pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='M3 11 12 4l9 7'/%3E%3Cpath d='M5.5 9.5V20h13V9.5'/%3E%3Cpath d='M10 20v-5h4v5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='M3 11 12 4l9 7'/%3E%3Cpath d='M5.5 9.5V20h13V9.5'/%3E%3Cpath d='M10 20v-5h4v5'/%3E%3C/svg%3E") center / contain no-repeat; }
.gallery img.img-missing { display: none; }
.gallery-none { flex: 1; height: 260px; margin: 0; display: grid; place-items: center; border-radius: 16px; background: var(--alt); color: var(--dim); font-size: 15px; text-align: center; padding: 0 16px; }
.photo .badge.mine-cut { color: var(--ok); background: var(--ok-bg); }
.card.gone { opacity: .6; }
.mine-changes { flex-basis: 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; font-size: 15px; }
.mine-changes .btn { padding: 6px 14px; font-size: 14px; }
.photo .over { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.photo .pill { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.photo .pill.nej { background: rgba(255,255,255,.88); color: #5c5c5e; }
.badge { display: inline-flex; align-items: center; justify-content: center; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; background: rgba(10,10,10,.72); color: #fff; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.price { font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.strategy { font-size: 12px; color: var(--dim); white-space: nowrap; }
.addr { font-size: 15px; line-height: 1.3; }
.addr small { display: block; color: var(--faint); font-size: 13px; margin-top: 2px; }
.addr .days { display: block; }
.addr .days.long { color: var(--mid); font-weight: 500; }
/* Card figures: the same tiles as the key figures on a home. */
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.metrics > div { background: var(--alt); border-radius: 12px; padding: 9px 11px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.metrics small { font-size: 12px; color: var(--dim); }
.metrics b { font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metrics span { font-size: 11.5px; color: var(--dim); }
.metrics > div.hl { background: var(--mid-bg); }
.metrics > div.hl b, .metrics > div.hl span { color: var(--mid); }
.good { color: var(--ok); } .bad { color: var(--warn); }
.reason { font-size: 14px; color: var(--dim); margin-top: auto; }
.more { display: flex; justify-content: center; margin-top: 28px; }

.state { text-align: center; padding: 80px 20px; color: var(--dim); display: flex; flex-direction: column; gap: 14px; align-items: center; }
.state h2 { color: var(--ink); font-weight: 500; font-size: 22px; }
.spinner { width: 28px; height: 28px; border: 2.5px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton .photo, .skeleton .sk { background: linear-gradient(90deg, var(--alt), var(--line), var(--alt)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.sk { height: 14px; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Detail sheet */
dialog { border: 0; color: var(--ink); background: var(--bg); }
dialog::backdrop { background: rgba(0,0,0,.36); backdrop-filter: blur(3px); }
.sheet { width: min(980px, 100vw); max-width: 100vw; height: 100vh; max-height: 100vh; margin: 0 0 0 auto; overflow-y: auto; }
.sheet[open] { animation: slide 500ms var(--t-ease); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
/* Split view (wide screens): the home is a panel docked on the right, under
   the top bar, and the search keeps the rest of the width, sharp and usable. */
:root { --split-w: clamp(540px, 46vw, 860px); }
.sheet.docked { position: fixed; inset: var(--top-h, 64px) 0 0 auto; z-index: 15; width: var(--split-w); height: auto; max-height: none; margin: 0; padding: 0; border-left: 1px solid var(--line); box-shadow: -18px 0 50px rgba(0,0,0,.08); }
body.split main { max-width: none; margin: 0 var(--split-w) 0 0; }
body.split .cmp-bar { left: calc((100vw - var(--split-w)) / 2); }
body.split .mapview.full { right: var(--split-w); top: var(--top-h, 64px); }
body.split .mapview { grid-template-columns: minmax(250px, 300px) 1fr; }
/* The edge between the search and a docked home, dragged to change its width. */
.split-handle { display: none; position: fixed; top: var(--top-h, 64px); bottom: 0; right: var(--split-w); width: 12px; transform: translateX(50%); z-index: 16; cursor: col-resize; touch-action: none; }
.split-handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 4px; height: 44px; border-radius: 999px; background: var(--line-strong); transform: translate(-50%, -50%); transition: background 200ms var(--t-ease), height 200ms var(--t-ease); }
.split-handle:hover::after, .split-handle:focus-visible::after, body.split-dragging .split-handle::after { background: var(--ink); height: 64px; }
body.split .split-handle { display: block; }
body.split-dragging { cursor: col-resize; user-select: none; }
body.split-dragging .sheet.docked, body.split-dragging main { transition: none; }
.d-bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 22px; background: var(--nav); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.d-bar .links { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--soft-btn); display: grid; place-items: center; font-size: 15px; flex: none; }
.d-body { padding: 0 22px 60px; display: flex; flex-direction: column; gap: 28px; }
.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -22px; padding: 16px 22px 0; }
.gallery img { height: 260px; width: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 16px; scroll-snap-align: start; flex: none; background: var(--alt); }
@media (max-width: 640px) { .gallery img, .gallery-none { height: 180px; } }
.d-head .price .d-verdict { margin-top: 8px; font-size: 13px; }
.lbl-short { display: none; }
/* Phones: the sticky bar stays one row (scrolls sideways like the gallery),
   and the save box shrinks to its button, so address, price and verdict fit
   on the first screen. */
@media (max-width: 640px) {
  .d-bar { padding: 8px 16px; gap: 8px; }
  .d-bar .links { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; gap: 6px; }
  .d-bar .links::-webkit-scrollbar { display: none; }
  .d-bar .links .btn { padding: 8px 12px; font-size: 14px; flex: none; }
  .lbl-full { display: none; }
  .lbl-short { display: inline; }
  .case.case-off { padding: 0; background: none; margin-top: 0; }
  .case-off > span { display: none; }
  .case-off .btn { width: 100%; }
}
.d-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.d-head h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 500; line-height: 1.15; }
.d-head .sub { color: var(--dim); margin-top: 6px; font-size: 15px; }
.d-head .price { font-size: 28px; text-align: left; }
.facts-wide { grid-column: 1 / -1; }
.plan-row { display: block; }
.sk-line { display: block; height: 14px; width: 60%; margin-top: 4px; border-radius: 6px; background: var(--alt); }
.d-head .price small { display: block; font-size: 13px; color: var(--dim); font-weight: 400; }
/* The four key figures under the price: pill buttons that go to their section. */
.d-keys { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; margin-top: -6px; }
.key-pill { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--soft-btn); color: inherit; font-variant-numeric: tabular-nums; }
.key-pill.good { color: var(--ok); background: var(--ok-bg); }
.key-pill.bad { color: var(--warn); background: var(--warn-bg); }
@media (max-width: 640px) { .key-pill { padding: 5px 10px; font-size: 12px; } }
.answer { border-radius: var(--radius); padding: 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.answer.god { background: var(--ok-bg); } .answer.taet { background: var(--mid-bg); } .answer.nej { background: var(--alt); }
.answer h3 { font-size: 22px; font-weight: 500; }
.answer p { font-size: 16px; max-width: 70ch; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { background: var(--tile); border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.kpi small { font-size: 13px; color: var(--dim); }
.kpi b { font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi span { font-size: 12px; color: var(--faint); }
@media (max-width: 760px) { .kpis { grid-template-columns: 1fr 1fr; } }
.section-title { font-size: 20px; font-weight: 500; margin-bottom: 12px; }
/* The sections of a home fold: the heading is the handle, with a chevron. */
details.acc > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; border-radius: 10px; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary .section-title { margin-bottom: 0; flex: 1; transition: color 250ms var(--panel-ease); }
details.acc > summary::after { content: ""; width: 9px; height: 9px; border-right: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint); transform: rotate(45deg); transition: transform 300ms var(--t-ease); margin-right: 6px; flex: none; }
details.acc[open] > summary { margin-bottom: 12px; }
details.acc[open] > summary::after { transform: rotate(-135deg); }
details.acc:not([open]) > summary { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
details.acc > summary:hover .section-title { color: var(--dim); }
.strategies { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 820px) { .strategies { grid-template-columns: 1fr; } }
.strat { background: var(--tile); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; border: 2px solid transparent; }
.strat.best { border-color: var(--ink); }
.strat header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.strat h4 { font-size: 17px; font-weight: 500; }
.strat p { font-size: 14px; color: var(--dim); }
.meter { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 3px; background: var(--ink); }
.meter i.god { background: var(--ok); } .meter i.taet { background: var(--mid); } .meter i.nej { background: var(--faint); }
.rows { display: flex; flex-direction: column; }
.rows div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 5px 0; border-top: 1px solid var(--line); }
.rows div:first-child { border-top: 0; }
.rows b { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* The workbook, as a statement */
.sheet-table { background: var(--tile); border-radius: var(--radius); overflow: hidden; }
.sheet-table h5 { font-size: 13px; font-weight: 500; color: var(--dim); background: var(--alt); padding: 10px 18px; }
/* Rows in the workbook statement. Not the outline buttons, which are .btn.line. */
.line:not(.btn) { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 15px; }
.line:not(.btn):first-of-type { border-top: 0; }
.line .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.line .src { grid-column: 1 / -1; font-size: 12px; color: var(--faint); }
.line.total { background: var(--alt); }
.line.total .v { font-size: 17px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 11px; padding: 2px 7px; border-radius: 999px; margin-right: 6px; }
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tag.data { color: var(--ok); background: var(--ok-bg); }
.tag.antaget { color: var(--mid); background: var(--mid-bg); }
.tag.formel { color: var(--dim); background: var(--alt); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 820px) { .cols { grid-template-columns: 1fr; } }

.adjust { background: var(--tile); border-radius: var(--radius); padding: 18px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 760px) { .adjust { grid-template-columns: 1fr; } }
.rehab-cmp { margin-top: 10px; background: var(--tile); border-radius: var(--radius); padding: 14px 18px; overflow-x: auto; }
.rehab-cmp table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rehab-cmp th, .rehab-cmp td { padding: 6px 8px; text-align: right; font-weight: 400; white-space: nowrap; }
.rehab-cmp th:first-child { text-align: left; color: var(--dim); white-space: normal; padding-left: 0; }
.rehab-cmp thead th { font-size: 13px; color: var(--dim); }
.rehab-cmp thead th:last-child, .rehab-cmp td:last-child { color: var(--ink); font-weight: 500; }
.rehab-cmp tbody tr + tr { border-top: 1px solid var(--line); }
.rehab-cmp .note { margin: 8px 0 0; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--dim); }
.field input, .field select { font: inherit; font-size: 15px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-variant-numeric: tabular-nums; width: 100%; }
.field span { font-size: 12px; color: var(--faint); }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; }
.facts div { background: var(--tile); padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.facts small { color: var(--faint); font-size: 12px; }
.contact { background: var(--tile); border-radius: var(--radius); padding: 20px; display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; }
.contact b { font-weight: 500; font-size: 17px; }
.flag { background: var(--mid-bg); border-radius: 16px; padding: 14px 16px; font-size: 14px; }

/* Settings drawer */
.drawer { width: min(460px, 100vw); max-width: 100vw; height: 100vh; max-height: 100vh; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; }
.drawer[open] { animation: slide 500ms var(--t-ease); }
.drawer-inner { display: flex; flex-direction: column; gap: 18px; padding: 20px 22px 40px; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer-head h2 { font-size: 24px; font-weight: 500; }
.note { font-size: 13px; color: var(--dim); }
fieldset { border: 0; display: flex; flex-direction: column; gap: 10px; background: var(--tile); border-radius: 18px; padding: 16px; }
legend { font-weight: 500; font-size: 15px; float: left; width: 100%; margin-bottom: 4px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* Assumption sliders */
.slider { display: flex; flex-direction: column; gap: 6px; padding-block: 4px; }
.s-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.s-top output { font-weight: 500; }
.slider input[type="range"] { width: 100%; accent-color: var(--ink); }
.s-src { font-size: 12px; color: var(--faint); line-height: 1.4; }

/* Negotiation: your offer and the highest offer that still works */
.bid { background: var(--tile); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.bid-top { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bid-top div { display: flex; flex-direction: column; gap: 2px; }
.bid-top small { font-size: 13px; color: var(--dim); }
.bid-top b { font-size: 26px; font-weight: 500; line-height: 1.15; }
.bid-top span { font-size: 13px; color: var(--faint); }
.bid-max { border-left: 1px solid var(--line); padding-left: 16px; }
.bid-max b { color: var(--ok); }
.bid input[type="range"] { width: 100%; accent-color: var(--ink); }
.bid-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.field.inline { flex-direction: row; align-items: center; gap: 8px; }
.field.inline input { width: 160px; }
@media (max-width: 640px) { .bid-top { grid-template-columns: 1fr; } .bid-max { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 12px; } }

/* Per-strategy offer, and the inline sliders on yellow numbers */
.need { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; background: var(--alt); border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--dim); }
.need b { font-size: 16px; font-weight: 500; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.need small { grid-column: 1 / -1; font-size: 12px; color: var(--faint); }
.dial { display: flex; flex-direction: column; gap: 4px; width: 100%; margin-top: 2px; }
.dial-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dial-top output { font-size: 13px; font-weight: 500; color: var(--ink); }
.dial input[type="range"] { width: 100%; accent-color: var(--mid); }
.reset { font-size: 12px; color: var(--dim); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.adjust .field b { font-weight: 500; color: var(--ink); font-size: 14px; }
.strat .field small { font-size: 12px; color: var(--faint); }

/* Two money columns: per year and per month */
.sheet-table h5.two, .line.two { display: grid; grid-template-columns: 1fr 120px 100px; gap: 2px 14px; }
.sheet-table h5.two span:not(:first-child) { text-align: right; }
.line.two .v.m { color: var(--dim); }
.line.two.total .v.m { color: var(--ink); }
@media (max-width: 640px) { .sheet-table h5.two, .line.two { grid-template-columns: 1fr 96px 84px; } }

/* Requirement checklist */
.reqs { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.reqs li { display: grid; grid-template-columns: 20px 1fr auto; gap: 0 8px; align-items: baseline; font-size: 14px; }
.reqs .mark { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; align-self: center; }
.reqs li.ok .mark { background: var(--ok-bg); color: var(--ok); }
.reqs li.no .mark { background: var(--warn-bg); color: var(--warn); }
.reqs b { font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.reqs li.no b { color: var(--warn); }
.reqs small { grid-column: 2 / -1; font-size: 12px; color: var(--faint); }
.missing { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; font-size: 15px; }
.missing b { font-weight: 500; }
.how-link { font-size: 14px; color: var(--dim); align-self: flex-start; }
.reason .short { display: block; color: var(--warn); margin-top: 2px; }

/* (i) info boxes */
.info { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-strong); font: italic 600 11px/1 Georgia, "Times New Roman", serif; color: var(--dim); vertical-align: 2px; margin-left: 4px; background: var(--tile); }
.info:hover { border-color: var(--ink); color: var(--ink); }
/* On the list cards the (i) gets a 26px tap area without moving the layout;
   in a tile it sits in the top corner, so no label wraps because of it. */
.card .info { position: relative; }
.card .info::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; }
.card .metrics > div { position: relative; }
.card .metrics small .info { position: absolute; top: 7px; right: 4px; width: 15px; height: 15px; margin: 0; font-size: 10px; }
.infobox { position: fixed; z-index: 1000; padding: 18px 44px 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--tile); color: var(--ink); box-shadow: 0 24px 70px rgba(0,0,0,.22); font: 400 15px/1.5 "Bricolage Grotesque", system-ui, sans-serif; text-align: left; letter-spacing: 0; animation: pop-in 180ms var(--t-ease); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } }
.infobox b { display: block; margin-bottom: 4px; font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.infobox i { font-style: normal; font-weight: 500; font-size: inherit; color: inherit; }
.infobox-close { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; background: var(--soft-btn); font-size: 13px; display: grid; place-items: center; }
.infobox-close:hover { background: var(--line); }


/* Motion, from transitions.dev (same recipes and tuning as energimcp) */
:root {
  --panel-open-dur: 400ms; --panel-close-dur: 350ms; --panel-translate-y: 10px; --panel-blur: 2px; --panel-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --digit-dur: 500ms; --digit-distance: 8px; --digit-stagger: 70ms; --digit-blur: 2px; --digit-ease: cubic-bezier(0.34, 1.45, 0.64, 1);
  --t-reveal-dur: 900ms; --t-distance: 18px; --t-blur: 2px; --t-stagger: 60ms;
}
/* Panel reveal: the info box */
.infobox { animation: none; transform: translateY(var(--panel-translate-y)); opacity: 0; filter: blur(var(--panel-blur)); pointer-events: none;
  transition: transform var(--panel-close-dur) var(--panel-ease), opacity var(--panel-close-dur) var(--panel-ease), filter var(--panel-close-dur) var(--panel-ease); will-change: transform, opacity, filter; }
.infobox[data-open="true"] { transform: translateY(0); opacity: 1; filter: blur(0); pointer-events: auto;
  transition: transform var(--panel-open-dur) var(--panel-ease), opacity var(--panel-open-dur) var(--panel-ease), filter var(--panel-open-dur) var(--panel-ease); }
.info[aria-expanded="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.info { transition: background 250ms var(--panel-ease), color 250ms var(--panel-ease), border-color 250ms var(--panel-ease); }
/* On touch screens the mark keeps its size, but the tap area is 26px. */
@media (pointer: coarse) { .info { position: relative; } .info::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; } }
/* Number pop-in: figures that changed since the last render */
@keyframes t-digit-pop-in { 0% { transform: translateY(var(--digit-distance)); opacity: 0; filter: blur(var(--digit-blur)); } 100% { transform: none; opacity: 1; filter: blur(0); } }
.t-digit-group { display: inline-flex; align-items: baseline; }
.t-digit { display: inline-block; will-change: transform, opacity, filter; white-space: pre; }
.t-digit-group.is-animating .t-digit { animation: t-digit-pop-in var(--digit-dur) var(--digit-ease) both; }
.t-digit-group.is-animating .t-digit[data-stagger="1"] { animation-delay: var(--digit-stagger); }
.t-digit-group.is-animating .t-digit[data-stagger="2"] { animation-delay: calc(var(--digit-stagger) * 2); }
/* Stagger reveal: cards when an area loads */
@keyframes t-reveal { from { opacity: 0; transform: translateY(var(--t-distance)); filter: blur(var(--t-blur)); } }
.card.t-reveal { animation: t-reveal var(--t-reveal-dur) var(--panel-ease) both; animation-delay: calc(var(--t-index, 0) * var(--t-stagger)); }
@media (prefers-reduced-motion: reduce) {
  .infobox, .info { transition: none !important; }
  .t-digit-group .t-digit, .card.t-reveal { animation: none !important; }
}

/* Why the price differs */
.why { background: var(--tile); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.why-lead { font-size: 16px; max-width: 72ch; }
.why-lead b { font-weight: 500; }
.why-sub { font-size: 14px; color: var(--dim); }
.why-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.why-list li { display: flex; flex-direction: column; gap: 2px; padding-left: 14px; border-left: 2px solid var(--mid); }
.why-list b { font-weight: 500; font-size: 15px; }
.why-list span { font-size: 14px; color: var(--dim); }
.drift-list li { border-left-color: var(--line-strong); }
.drift-list li.total { border-left-color: var(--ink); }
.why-comps summary { cursor: pointer; font-size: 14px; color: var(--dim); }
.why-comps table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.why-comps th, .why-comps td { text-align: left; padding: 7px 8px; border-top: 1px solid var(--line); white-space: nowrap; }
.why-comps th { color: var(--faint); font-weight: 500; border-top: 0; }
.scroll-x { overflow-x: auto; }

/* Sale history */
.sales { background: var(--tile); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.sales-top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sales-top div { display: flex; flex-direction: column; gap: 2px; }
.sales-top small { font-size: 13px; color: var(--dim); }
.sales-top b { font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.sales-top span { font-size: 12px; color: var(--faint); }
@media (max-width: 760px) { .sales-top { grid-template-columns: 1fr; } }
.sales-list { width: 100%; border-collapse: collapse; font-size: 14px; }
.sales-list th, .sales-list td { text-align: left; padding: 7px 8px; border-top: 1px solid var(--line); }
.sales-list th { color: var(--faint); font-weight: 500; border-top: 0; font-size: 13px; }


/* Strategy cards: keep headings on one line and numbers in their own column */
.strat { min-width: 0; }
.strat header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.strat h4 { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; min-width: 0; }
.strat header .pill { font-size: 12px; padding: 4px 10px; flex: none; }
.need { display: flex; flex-direction: column; gap: 2px; grid-template-columns: none; }
.need b { text-align: left; font-size: 18px; }
.need small { grid-column: auto; }
.rows div { align-items: flex-start; }
.rows div > span { min-width: 0; }
.rows div > span small { display: block; font-size: 12px; color: var(--faint); margin-top: 1px; }
.rows div.total b, .rows div.total > span { font-weight: 600; }
.reqs li { grid-template-columns: 20px minmax(0, 1fr) auto; }
.reqs li > span:nth-child(2) { min-width: 0; }
.reqs b { white-space: nowrap; }
.strat .field { gap: 4px; }
.strat .dial-top { gap: 6px; }


/* Salgsopstilling */
.doc { background: var(--tile); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.doc-empty { border: 1.5px dashed var(--line-strong); background: transparent; transition: border-color 250ms var(--panel-ease), background 250ms var(--panel-ease); }
.doc-empty.over { border-color: var(--ink); background: var(--alt); }
.doc-empty p { font-size: 15px; color: var(--dim); max-width: 70ch; }
.doc-empty b { color: var(--ink); font-weight: 500; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.doc-actions label.btn { cursor: pointer; }
.doc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.doc-grid div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.doc-grid small { font-size: 13px; color: var(--dim); }
.doc-grid b { font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.doc-grid span { font-size: 13px; color: var(--faint); }
@media (max-width: 700px) { .doc-grid { grid-template-columns: 1fr; } }
.easements { list-style: none; display: flex; flex-direction: column; gap: 4px; margin-top: 8px; font-size: 13px; }
.easements li { display: grid; grid-template-columns: 90px 1fr; gap: 10px; color: var(--dim); }

/* Renovation plan, step by step */
.plan { background: var(--tile); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 20px; }
.step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
.step > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.step b { font-weight: 500; }
.step-n { width: 26px; height: 26px; border-radius: 8px; background: var(--alt); display: grid; place-items: center; font-size: 13px; font-weight: 500; }
.cash { background: var(--tile); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.cash-steps { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.cash-steps .step small { font-size: 12px; color: var(--dim); }
.cash-steps .step .note { font-size: 13px; }
.cash-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cash-row .num { white-space: nowrap; }
.cash-total { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 17px; }
.cash-total b { font-weight: 600; }
.cash-buffer { display: flex; flex-direction: column; gap: 10px; }
.cash-buffer > small { color: var(--dim); font-size: 13px; }
.cash-buffer .cash-row b { font-weight: 500; }
.cash-buffer .note { display: block; }
.cash .how-link { align-self: flex-start; }
/* Your money against "I alt kontant": a pill select, and what's short or left. */
.cash-extra { margin-top: 8px; }
/* "Regn med standardbeløbet" when the condition is unknown: wraps at 375 px. */
.cash-rehab { margin-top: 8px; width: fit-content; max-width: 100%; white-space: normal; text-align: left; }
.cash-notin { margin-top: -4px; }
.cash-mine { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cash-mine b { font-weight: 500; }
.cash-mine select { font: inherit; font-size: 15px; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; min-width: 0; }
.cash-diff { display: flex; flex-direction: column; gap: 4px; }
.signals { list-style: disc; padding-left: 18px; font-size: 14px; color: var(--dim); display: flex; flex-direction: column; gap: 3px; }
.items { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) 110px 130px 120px; gap: 4px 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item.on { background: var(--alt); }
.item-name { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; min-width: 0; }
.item-name input { accent-color: var(--ink); width: 16px; height: 16px; flex: none; }
.item-num { display: flex; align-items: center; gap: 6px; }
.item-num input { width: 100%; font: inherit; font-size: 14px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font-variant-numeric: tabular-nums; }
.item-num small { font-size: 12px; color: var(--faint); white-space: nowrap; }
.item b { text-align: right; font-weight: 500; }
.item:not(.on) b { color: var(--faint); }
.item-why { grid-column: 1 / -1; font-size: 12px; color: var(--faint); padding-left: 24px; }
.photo-review { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; border-radius: 14px; }
.photo-review .note:empty { display: none; }
/* The photo review at the top of a home. */
.photo-top { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--ai); background: var(--ai-bg); }
.photo-top .note { margin: 0; }
.photo-top .pr-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pr-src { color: var(--dim); font-size: 13px; }
.photo-wait { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; color: var(--dim); }
.photo-wait .spinner { width: 16px; height: 16px; flex: none; }
.pr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pr-chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: 13px; background: var(--tile); }
.pr-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.pr-chip.todo::before { background: var(--warn); }
.pr-chip.dated::before { background: var(--mid); }
.pr-chip.light::before { background: var(--ok); }
.pr-fix { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.pr-fix p { margin: 0; font-size: 14px; }
.pr-vis { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.pr-vis-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pr-vis-pair img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.pr-vis figcaption { font-size: 13px; color: var(--dim); }
.pr-vis-ask { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
@media (max-width: 560px) { .pr-vis-pair { grid-template-columns: 1fr; } }
.pr-group.light { border-left-color: var(--ok); }
/* The photo review: what needs doing (red), what looks fine (green), what no photo shows (grey). */
.photo-review.done { align-items: stretch; gap: 10px; padding: 14px 16px; border: 1px solid var(--ai); background: var(--ai-bg); }
.pr-head { display: flex; align-items: center; gap: 4px; }
.pr-head b { font-size: 15px; }
.pr-group { background: var(--tile); border-radius: 12px; padding: 10px 12px; border-left: 4px solid var(--faint); }
.pr-group.todo { border-left-color: var(--warn); }
.pr-group.fine { border-left-color: var(--ok); }
.pr-group.dated { border-left-color: var(--mid); }
.dated .pr-icon { background: var(--mid-bg); color: var(--mid); }
.pr-overall { display: flex; flex-direction: column; gap: 2px; background: var(--tile); border-radius: 12px; padding: 10px 12px; font-size: 14px; border-left: 4px solid var(--faint); }
.pr-overall b { font-weight: 500; }
.pr-overall span { font-size: 13px; color: var(--dim); }
.pr-overall.lvl-renovering { border-left-color: var(--warn); }
.pr-overall.lvl-middel { border-left-color: var(--mid); }
.pr-overall.lvl-istandsat { border-left-color: var(--ok); }
.pr-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.pr-icon { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; background: var(--alt); color: var(--dim); }
.todo .pr-icon { background: var(--warn-bg); color: var(--warn); }
.fine .pr-icon { background: var(--ok-bg); color: var(--ok); }
.pr-group ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.pr-group.unseen ul { flex-direction: row; flex-wrap: wrap; gap: 6px; }
.pr-group.unseen li { font-size: 13px; color: var(--dim); background: var(--alt); border-radius: 999px; padding: 2px 10px; }
.pr-group.unseen li b { font-weight: 400; }
.pr-title { cursor: pointer; list-style: none; }
.pr-title::-webkit-details-marker, .pr-point summary::-webkit-details-marker { display: none; }
.pr-group:not([open]) .pr-title { margin-bottom: 0; }
.pr-count { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 11px; color: var(--faint); background: var(--alt); border-radius: 999px; padding: 1px 7px; }
.pr-chev { margin-left: auto; width: 8px; height: 8px; border-right: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint); transform: rotate(45deg); transition: transform 300ms var(--t-ease); flex: none; }
details[open] > summary > .pr-chev { transform: rotate(-135deg); }
.pr-point summary { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; list-style: none; border-radius: 8px; }
.pr-point summary img { width: 56px; height: 40px; object-fit: cover; border-radius: 8px; flex: none; }
.pr-point summary div { display: flex; flex-direction: column; min-width: 0; }
.pr-point b { font-weight: 500; font-size: 14px; }
.pr-point small { font-size: 12px; color: var(--dim); }
.pr-point[open] summary img { opacity: 0; width: 0; margin-right: -10px; }
.pr-photo { display: block; width: 100%; max-width: 480px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; margin-top: 8px; }
.pr-point .note { margin-top: 4px; font-size: 12px; }
.pr-group.none .note { margin: 0; }
.tag.ai { color: var(--ai); background: var(--ai-bg); }
.item.ai { box-shadow: inset 4px 0 0 var(--ai); }
.item-why.ai-why { color: var(--ai); }
.plan-total span { font-size: 26px; font-weight: 500; }
.plan-total small { font-size: 13px; color: var(--dim); margin-left: 6px; }
@media (max-width: 760px) { .item { grid-template-columns: 1fr 1fr; } .item-name { grid-column: 1 / -1; } .item b { grid-column: 1 / -1; text-align: left; } }

/* Saved homes and phases */
.card { cursor: pointer; }
.card:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.photo .save { position: absolute; right: 10px; bottom: 10px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.9); color: #0a0a0a; display: grid; place-items: center; backdrop-filter: blur(8px); transition: transform 300ms var(--t-ease); }
.photo .save:hover { transform: scale(1.08); }
.photo .save.cmp { right: 54px; }
.photo .save svg { width: 18px; height: 18px; }
.photo .save.on { background: #1f2a44; color: #fff; }
.photo .save.on svg { fill: currentColor; }
.badge.phase { background: #fff; color: #1f2a44; }
.card-note { font-size: 13px; color: var(--dim); background: var(--alt); border-radius: 10px; padding: 8px 10px; }
.phase-head { grid-column: 1 / -1; font-size: 20px; font-weight: 500; margin-top: 10px; display: flex; gap: 8px; align-items: baseline; }
.phase-head span { font-size: 14px; color: var(--faint); }
.phase-head .phase-cmp { margin-left: auto; align-self: center; padding: 7px 14px; font-size: 14px; }
.case { background: var(--tile); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.case-off { flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 15px; color: var(--dim); }
.bid-send { display: flex; }
.bm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .bm-row { grid-template-columns: 1fr; } }
.bm-caveats { display: flex; flex-direction: column; gap: 6px; }
.bm-caveats:empty { display: none; }
.bm-conds { gap: 8px; font-size: 15px; }
.bm-conds legend { float: left; font-size: 13px; color: var(--dim); }
.bm-conds label { display: flex; align-items: center; gap: 8px; }
.bm-inner textarea { font: inherit; font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; resize: vertical; width: 100%; }
.bm-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bid-sent { font-size: 15px; color: var(--ink); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.bid-sent span { flex-basis: 100%; color: var(--mid); }
.bid-sent span.good { color: var(--ok); } .bid-sent span.bad { color: var(--warn); }
.bid-answer, .bid-counter { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.bid-counter[hidden] { display: none; }
.bid-counter input { width: 160px; max-width: 100%; }
.bought-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; background: var(--tile); border-radius: var(--radius); padding: 16px 18px; }
.bought-totals div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bought-totals small { font-size: 13px; color: var(--dim); }
.bought-totals b { font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bought-totals span { font-size: 12px; color: var(--dim); }
.bought-totals .note { grid-column: 1 / -1; }
@media (max-width: 640px) { .bought-totals { grid-template-columns: 1fr; } }
/* A bought home's road to the first tenant, like tracking a parcel: in a row
   on wide screens, top to bottom on phones. Reached steps fill in tegl. */
.journey { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.jr-steps { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.jr-steps li { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 24px 8px 0 0; font-size: 13px; color: var(--faint); min-width: 0; }
.jr-steps li::before { content: ""; position: absolute; top: 7px; left: 16px; right: 2px; height: 2px; border-radius: 1px; background: var(--line-strong); transition: background 400ms var(--panel-ease); }
.jr-steps li:last-child::before { display: none; }
.jr-steps li.done::before { background: var(--brand); }
.jr-steps b { font-weight: 500; font-size: 14px; }
.jr-steps li.done b, .jr-steps li.now b { color: var(--ink); }
.jr-steps small { font-size: 12px; overflow-wrap: anywhere; }
.jr-dot { position: absolute; top: 0; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--tile); border: 2px solid var(--line-strong); }
.jr-steps li.done .jr-dot { background: var(--brand); border-color: var(--brand); }
.jr-steps li.now .jr-dot { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-bg); }
.jr-steps li.jr-new .jr-dot { animation: jr-reach var(--t-reveal-dur) var(--panel-ease) both; }
@keyframes jr-reach { from { transform: scale(0.4); opacity: 0.3; } }
.jr-next { align-self: flex-start; text-align: left; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--brand); }
@media (max-width: 640px) {
  .jr-steps { grid-auto-flow: row; }
  .jr-steps li { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 8px; padding: 0 0 14px 28px; }
  .jr-steps li::before { top: 18px; bottom: 2px; left: 7px; right: auto; width: 2px; height: auto; }
  .jr-dot { top: 1px; }
}
@media (prefers-reduced-motion: reduce) { .jr-steps li.jr-new .jr-dot { animation: none; } }
.bought { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.bought > b { font-weight: 500; font-size: 16px; }
.bought-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .bought-fields { grid-template-columns: 1fr; } }
.bought-table { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.bought-table th, .bought-table td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: right; overflow-wrap: anywhere; }
.bought-table th:first-child { text-align: left; font-weight: 400; color: var(--dim); }
.bought-table thead th { font-size: 12px; font-weight: 500; color: var(--dim); }
@media (max-width: 640px) { .bought-table { font-size: 12px; } .bought-table th:first-child { width: 31%; overflow-wrap: normal; } }
.case-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.deadlines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.deadlines li { display: flex; flex-direction: column; gap: 4px; }
.vc-list { list-style: none; margin: 0; padding: 0; }
.vc-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.vc-list .seg button { min-height: 44px; padding: 0 14px; }
.case textarea { font: inherit; font-size: 15px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; resize: vertical; width: 100%; }
.case select { font: inherit; font-size: 15px; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.count { font-size: 12px; background: var(--ink); color: var(--bg); border-radius: 999px; padding: 1px 7px; min-width: 18px; text-align: center; }
.count:empty { display: none; }

/* Negotiation: floor, ceiling and asking price on one line */
.nego { background: var(--tile); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.nego-top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.nego-top div { display: flex; flex-direction: column; gap: 2px; }
.nego-top small { font-size: 13px; color: var(--dim); }
.nego-top b { font-size: 22px; font-weight: 500; }
.nego-top span { font-size: 12px; color: var(--faint); }
@media (max-width: 700px) { .nego-top { grid-template-columns: 1fr; } }
.range { position: relative; height: 26px; margin: 4px 8px; }
.range-track { position: absolute; left: 0; right: 0; top: 11px; height: 4px; border-radius: 2px; background: var(--line); }
.range-zone { position: absolute; top: 9px; height: 8px; border-radius: 4px; background: var(--ok); opacity: .45; }
.range-zone.gap { background: var(--warn); }
.range .mark { position: absolute; top: 4px; width: 4px; height: 18px; border-radius: 2px; transform: translateX(-2px); }
.mark.floor, .dot.floor { background: var(--mid); }
.mark.ceil, .dot.ceil { background: var(--ok); }
.mark.ask, .dot.ask { background: var(--faint); }
.mark.you, .dot.you { background: var(--ink); }
.range .mark.you { width: 12px; height: 12px; top: 7px; border-radius: 50%; transform: translateX(-6px); border: 2px solid var(--tile); }
.range-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--dim); }
.range-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.comps-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.comps-table th, .comps-table td { text-align: left; padding: 7px 8px; border-top: 1px solid var(--line); white-space: nowrap; }
.comps-table th { color: var(--faint); font-weight: 500; border-top: 0; }

/* Limitations, said where the decision is made */
.caveat { font-size: 13px; line-height: 1.45; color: var(--ink); background: var(--mid-bg); border-left: 3px solid var(--mid); border-radius: 0 10px 10px 0; padding: 9px 12px; }
.focus-note { margin: -8px 0 18px; font-size: 14px; max-width: 900px; }

/* The chosen filters as pills over the list: one row, scrolls sideways on phones */
.active-filters { display: flex; gap: 8px; align-items: center; margin: -8px 0 18px; overflow-x: auto; scrollbar-width: none; }
.active-filters::-webkit-scrollbar { display: none; }
.af-pill { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 5px 5px 14px; border-radius: 999px; background: var(--tile); border: 1px solid var(--line); font-size: 14px; white-space: nowrap; }
.af-pill button { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; color: var(--dim); transition: background 300ms var(--t-ease), color 300ms var(--t-ease); }
.af-pill button:hover { background: var(--alt); color: var(--ink); }
.af-reset { flex: none; padding: 6px 12px; border-radius: 999px; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; color: var(--ink); white-space: nowrap; }
.af-ways { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 640px; }
.af-ways .btn { white-space: normal; }

/* Free-text search */
.textsearch { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.textsearch input { font: inherit; font-size: 14px; color: var(--ink); background: var(--tile); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; width: 260px; }
.textsearch button { font-size: 12px; color: var(--dim); background: var(--alt); border-radius: 999px; padding: 4px 9px; }
.textsearch button:hover { color: var(--ink); }
.strat.off { opacity: .75; }

/* Engine room */
.engine-room { background: var(--tile); border-radius: var(--radius); padding: 16px 20px; }
.engine-room summary { cursor: pointer; font-weight: 500; }
.er-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 14px; }
.er-grid .wide { grid-column: 1 / -1; }
@media (max-width: 760px) { .er-grid { grid-template-columns: 1fr; } }
.er-grid h5 { font-size: 13px; font-weight: 600; color: var(--dim); margin-bottom: 6px; }
.er-list { list-style: none; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.er-list .plus { color: var(--ok); } .er-list .minus { color: var(--warn); }
.er-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
.er-table td, .er-table th { text-align: left; padding: 5px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.er-text { font-size: 13px; line-height: 1.55; white-space: pre-wrap; max-height: 320px; overflow: auto; background: var(--bg); border-radius: 10px; padding: 12px; }
.er-photos { font-size: 13px; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow: auto; }
.er-json { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 12px; background: var(--bg); border-radius: 10px; padding: 12px; max-height: 260px; overflow: auto; }
mark { background: var(--mid-bg); color: var(--ink); border-radius: 3px; padding: 0 2px; }

/* Map */
.head-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
/* The icon rule above (svg 18×18) would shrink Leaflet's drawing layer and hide every dot. */
.leaflet-container svg { width: auto; height: auto; stroke-linecap: initial; }
/* Map view: homes in view on the left, the map on the right (Boligsiden-style). */
:root { --view-h: max(520px, calc(100vh - 150px)); } /* the map view, and the filter column beside it */
.mapview { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 16px; height: var(--view-h); }
.map-wrap { position: relative; isolation: isolate; border-radius: var(--radius); overflow: hidden; background: var(--alt); }
.map { position: absolute; inset: 0; background: var(--alt); }
.map.drawing, .map.drawing .leaflet-interactive { cursor: crosshair; }
.map-loading { display: none !important; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 600; display: flex; align-items: center; gap: 10px; background: var(--tile); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; font-size: 14px; font-weight: 500; box-shadow: 0 18px 50px rgba(0,0,0,.18); animation: pop-in 180ms var(--panel-ease); white-space: nowrap; }
.map-loading[hidden] { display: none; }
.map-loading .spinner { width: 16px; height: 16px; border-width: 2px; margin: 0; }
.ml-skel { pointer-events: none; }
.ml-skel .sk { display: block; height: 10px; margin: 4px 0; }
.ml-skel .sk, .ml-skel .ml-noimg { background: linear-gradient(90deg, var(--alt), var(--line), var(--alt)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.map-list { overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; }
.map-list-head { font-size: 14px; color: var(--dim); padding: 2px 2px 4px; }
.map-list-head b { color: var(--ink); font-weight: 500; }
.map-list-more { font-size: 13px; color: var(--dim); padding: 8px 2px; }
.ml-item { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; text-align: left; background: var(--tile); border-radius: 16px; padding: 8px; border: 1px solid transparent; transition: border-color 200ms var(--t-ease); }
.ml-item:hover { border-color: var(--line-strong); }
.ml-item img, .ml-noimg { width: 96px; height: 80px; border-radius: 10px; object-fit: cover; background: var(--alt); display: block; }
.ml-body { display: flex; flex-direction: column; gap: 2px; font-size: 13px; min-width: 0; }
.ml-body b { font-size: 16px; font-weight: 500; }
.ml-body span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-body .dim { color: var(--dim); }
.ml-body .pill { align-self: flex-start; margin-top: 4px; font-size: 11px; padding: 3px 8px; max-width: 100%; white-space: normal; line-height: 1.3; }
.map-tools { position: absolute; top: 12px; left: 12px; z-index: 500; display: flex; flex-wrap: wrap; gap: 8px; max-width: calc(100% - 130px); }
.map-btn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 12px; background: var(--tile); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,.12); font-size: 14px; font-weight: 500; white-space: nowrap; }
.map-btn.icon { width: 40px; padding: 0; justify-content: center; }
.map-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.map-shape { padding-right: 6px; }
.map-shape button { width: 26px; height: 26px; border-radius: 50%; background: var(--alt); display: grid; place-items: center; font-size: 12px; }
.map-sizes { position: absolute; top: 60px; left: 12px; z-index: 500; display: flex; gap: 4px; background: var(--tile); border: 1px solid var(--line); border-radius: 999px; padding: 3px; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.map-sizes button { font-size: 13px; padding: 5px 10px; border-radius: 999px; color: var(--dim); }
.map-sizes button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.map-hint { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 500; background: var(--ink); color: var(--bg); font-size: 14px; padding: 8px 14px; border-radius: 999px; white-space: nowrap; animation: pop-in 180ms var(--panel-ease); }
.map-listbtn { position: absolute; top: 12px; right: 12px; z-index: 500; }
/* Above the zoom buttons and the map credits under them (together about 100px). */
.map-sat { position: absolute; right: 12px; bottom: 112px; z-index: 500; }
/* Towns: population and growth from Danmarks Statistik. */
.map-townsbtn { position: absolute; right: 12px; bottom: 160px; z-index: 500; }
.map-towns { position: absolute; left: 12px; bottom: 12px; z-index: 500; width: min(270px, calc(100% - 24px)); max-height: calc(100% - 84px); overflow-y: auto; background: var(--tile); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; box-shadow: 0 4px 14px rgba(0,0,0,.12); display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.map-towns .note { font-size: 12px; }
.mt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left; padding-top: 8px; border-top: 1px solid var(--line); }
.mt-head b { font-weight: 500; font-size: 14px; }
.mt-min { width: 26px; height: 26px; border-radius: 50%; background: var(--soft-btn); position: relative; flex: none; display: inline-block; }
.mt-min::after { content: ""; position: absolute; left: 9px; top: 8px; width: 7px; height: 7px; border-right: 1.5px solid var(--dim); border-bottom: 1.5px solid var(--dim); transform: rotate(45deg); transition: transform 300ms var(--t-ease); }
.map-towns.open .mt-min::after { transform: rotate(-135deg); top: 11px; }
.map-towns:not(.open) .mt-body { display: none; }
.mt-legend { display: flex; flex-direction: column; gap: 2px; }
.mt-legend b { font-weight: 500; font-size: 14px; }
.mt-legend small { color: var(--dim); font-size: 12px; }
.mt-scale { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: 11px; color: var(--dim); }
.mt-scale span { display: inline-flex; align-items: center; gap: 4px; }
.mt-scale i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.mt-body { display: flex; flex-direction: column; gap: 8px; }
.mt-title { font-weight: 500; font-size: 14px; }
.mt-list { list-style: none; counter-reset: t; display: flex; flex-direction: column; gap: 2px; }
.mt-list li { counter-increment: t; display: flex; align-items: center; gap: 8px; }
.mt-list li::before { content: counter(t); width: 18px; font-size: 11px; color: var(--faint); text-align: right; flex: none; }
.mt-list button { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; padding: 5px 6px; border-radius: 8px; }
.mt-list button:hover { background: var(--alt); }
.mt-list button b { font-weight: 500; font-size: 13px; }
.mt-list button span { font-size: 11px; color: var(--dim); }
.mt-list em { font-style: normal; color: var(--ok); font-weight: 500; }
.mt-list a { font-size: 12px; color: var(--dim); flex: none; }
.town-popup .leaflet-popup-content { width: auto !important; }
.town-pop { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; font: 13px/1.4 "Bricolage Grotesque", system-ui, sans-serif; }
.town-pop > b { font-size: 16px; font-weight: 500; padding-right: 26px; }
.town-pop > span { color: var(--dim); }
.town-pop dl { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; margin: 6px 0 10px; }
.town-pop dt { color: var(--dim); }
.town-pop dd { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.town-pop .btn { color: var(--btn-ink); text-decoration: none; padding: 8px 14px; font-size: 14px; }
.town-pop a.btn.primary { color: var(--btn-ink); }
.map-wrap .leaflet-bottom.leaflet-right .leaflet-control-zoom { margin: 0 12px 12px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.map-wrap .leaflet-control-zoom a { background: var(--tile); color: var(--ink); width: 40px; height: 36px; line-height: 36px; }
.map-wrap .leaflet-control-attribution { font-size: 10px; }
.mapview.full { position: fixed; inset: 0; z-index: 60; height: auto; padding: 12px; gap: 12px; background: var(--bg); }
body.map-full { overflow: hidden; }
@media (max-width: 900px) {
  .mapview { grid-template-columns: 1fr; height: calc(100vh - 170px); }
  .map-list { display: none; }
  .map-tools { max-width: calc(100% - 24px); }
  .map-listbtn { top: auto; bottom: 16px; right: auto; left: 12px; }
}
/* Map popup: Leaflet's own frame, restyled to Klog Bolig's tiles, with photos first. */
.kv-pop .leaflet-popup-content-wrapper { padding: 0; border-radius: 18px; overflow: hidden; background: var(--tile); color: var(--ink); box-shadow: 0 18px 50px rgba(0,0,0,.22); }
.kv-pop .leaflet-popup-content { margin: 0; width: 260px !important; }
.kv-pop .leaflet-popup-tip { background: var(--tile); }
.kv-pop a.leaflet-popup-close-button { top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font: 18px/28px "Bricolage Grotesque", system-ui, sans-serif; text-align: center; z-index: 2; }
.kv-pop a.leaflet-popup-close-button:hover { background: rgba(0,0,0,.65); color: #fff; }
.map-pop { position: relative; display: flex; flex-direction: column; font: 14px/1.4 "Bricolage Grotesque", system-ui, sans-serif; }
.map-pics { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: var(--alt); }
.map-pics::-webkit-scrollbar { display: none; }
.map-pics img { flex: none; width: 100%; height: 160px; object-fit: cover; scroll-snap-align: start; }
.map-pics-n { position: absolute; top: 128px; left: 10px; font-size: 12px; color: #fff; background: rgba(0,0,0,.5); border-radius: 999px; padding: 2px 8px; }
.map-pop-body { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px 16px; }
.map-pop-body b { font-size: 18px; font-weight: 500; }
.map-pop-body .dim { color: var(--dim); }
.map-pop-body .pill { margin-top: 6px; font-size: 12px; padding: 4px 10px; }
.map-pop-body .btn { align-self: stretch; margin-top: 10px; padding: 9px 14px; font-size: 14px; }

/* Summary at the top of a home */
.summary { background: var(--tile); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
/* Six key figures as tiles in an even grid: label, number, one short line. */
.sum-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sum-kpis > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; background: var(--alt); border-radius: 14px; padding: 12px 14px; }
.sum-kpis small { font-size: 12px; color: var(--dim); }
.sum-kpis b { font-size: 20px; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sum-kpis span { font-size: 12.5px; line-height: 1.35; color: var(--dim); }
.sum-kpis > div.hl { background: var(--mid-bg); }
.sum-kpis > div.hl b, .sum-kpis > div.hl span { color: var(--mid); }
@media (max-width: 640px) { .sum-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sum-kpis b { font-size: 18px; } }
.sum-ai { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.sum-text { font-size: 15px; display: flex; flex-direction: column; gap: 6px; }
.sum-text h6 { font-size: 13px; font-weight: 600; color: var(--dim); margin-top: 6px; }
.sum-text ul { padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.sum-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Emphasis in the AI summary */
.sum-text b { font-weight: 600; }
.sum-text b.good { color: var(--ok); }
.sum-text b.bad { color: var(--warn); }
.sum-action { font-size: 17px; font-weight: 500; line-height: 1.4; padding: 12px 14px; border-radius: 12px; border-left: 4px solid var(--mid); background: var(--mid-bg); }
.sum-action.god { border-left-color: var(--ok); background: var(--ok-bg); }
.sum-action.nej { border-left-color: var(--warn); background: var(--warn-bg); }

/* Realtor info box */
.realtor { background: var(--tile); border-radius: var(--radius); padding: 16px 20px; display: grid; grid-template-columns: 1fr 1.4fr 1.2fr; gap: 16px; align-items: start; }
.realtor small { display: block; font-size: 12px; color: var(--dim); }
.realtor-chain b { font-size: 19px; font-weight: 500; display: block; }
.realtor-chain span { font-size: 13px; color: var(--faint); }
.agent { display: flex; flex-direction: column; gap: 2px; }
.agent b { font-size: 17px; font-weight: 500; }
.agent > span { font-size: 13px; color: var(--dim); }
.agent-contact { display: flex; gap: 12px; flex-wrap: wrap; font-size: 15px; color: var(--ink) !important; margin-top: 2px; }
.realtor-office { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
@media (max-width: 760px) { .realtor { grid-template-columns: 1fr; } }

/* Tasks on a saved home */
.tasks { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.tasks-head { display: flex; align-items: center; gap: 10px; }
.tasks-head b { font-weight: 500; font-size: 16px; }
.tasks h6 { font-size: 12px; font-weight: 600; color: var(--dim); margin-top: 8px; }
.tasks ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.tasks li { display: flex; align-items: flex-start; gap: 8px; }
.tasks li label { display: flex; gap: 10px; align-items: flex-start; flex: 1; cursor: pointer; font-size: 15px; }
.tasks li input { accent-color: var(--ok); width: 17px; height: 17px; margin-top: 2px; flex: none; }
.tasks li small { display: block; font-size: 12px; color: var(--faint); }
.tasks li .task-act .field { flex: none; flex-wrap: wrap; max-width: 100%; gap: 6px; font-size: 12px; color: var(--dim); cursor: default; }
.tasks li .task-act input[type=datetime-local] { width: auto; height: auto; max-width: 100%; margin: 0; font-size: 13px; padding: 4px 8px; border-radius: 999px; }
/* Phones: a task's buttons get their own row under the text. */
@media (max-width: 640px) { .tasks li { flex-wrap: wrap; } .tasks li .task-act { order: 3; flex: 1 1 100%; padding-left: 27px; } }
.tasks li.done span { color: var(--faint); text-decoration: line-through; }
.task-del { color: var(--faint); font-size: 12px; padding: 2px 6px; opacity: 0; }
.tasks li:hover .task-del { opacity: 1; }
.task-add { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.task-add input { flex: 1; min-width: 200px; font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; background: var(--bg); color: var(--ink); }
.task-add select { font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px; background: var(--bg); color: var(--ink); }
.card-tasks { font-size: 13px; color: var(--ok); }

/* Tasks with inline document import */
.task-act { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; flex: none; }
.task-act .btn { padding: 5px 11px; font-size: 13px; cursor: pointer; }
.task-act small { font-size: 12px; color: var(--dim); }

/* Forced auctions */
.badge.auction { background: #c1352a; color: #fff; }
.badge.new { background: #fff; color: var(--ok); }
.auction-box { background: var(--tile); border-radius: var(--radius); padding: 16px 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; border-left: 4px solid var(--warn); }
.auction-box > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.auction-box small { font-size: 12px; color: var(--dim); }
.auction-box b { font-size: 16px; font-weight: 500; }
.auction-box span { font-size: 13px; color: var(--faint); }
.auction-box .caveat, .auction-box .note, .auction-box .au-actions { grid-column: 1 / -1; }
.au-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 860px) { .auction-box { grid-template-columns: 1fr 1fr; } }
.auctions { padding-bottom: 60px; }
.au-row { display: grid; grid-template-columns: 110px 96px minmax(0, 1fr) 150px 170px; gap: 14px; align-items: center; background: var(--tile); border-radius: 16px; padding: 10px 14px; margin-bottom: 8px; }
.au-row img, .au-noimg { width: 96px; height: 64px; object-fit: cover; border-radius: 10px; background: var(--alt); }
.au-when, .au-main, .au-num { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.au-when b { font-weight: 500; text-transform: capitalize; }
.au-when span, .au-main span, .au-num span { font-size: 13px; color: var(--dim); }
.au-when small { font-size: 12px; color: var(--warn); }
.au-main b { font-weight: 500; }
.au-main small.bad { font-size: 12px; }
.au-num small { font-size: 12px; color: var(--faint); }
.au-num b { font-weight: 500; font-variant-numeric: tabular-nums; }
.au-act { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
@media (max-width: 860px) { .au-row { grid-template-columns: 90px 1fr; } .au-row img, .au-noimg { display: none; } .au-num, .au-act { grid-column: 1 / -1; align-items: flex-start; } }
.bid-m2 { font-size: 13px !important; color: var(--dim) !important; margin-top: 2px; }
.bid-m2 b { color: var(--ink); font-weight: 600; }

/* Komitélog: dated committee decisions, in the drawer and on a saved case */
.cl-form textarea, .cl-form input[type="date"] { font: inherit; font-size: 15px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; width: 100%; min-width: 0; }
.cl-form textarea { resize: vertical; }
.cl-form .field input:disabled { opacity: .5; }
.cl-log { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.cl-log li { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; border-top: 1px solid var(--line); padding-top: 10px; }
.cl-log li:first-child { border-top: 0; padding-top: 0; }
.cl-log p { font-size: 15px; overflow-wrap: anywhere; }
.cl-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; font-size: 14px; }
.cl-top small { font-size: 12px; color: var(--faint); }
.cl-log .task-del { opacity: 1; }
.cl-case { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.cl-case b { font-weight: 500; font-size: 16px; }
.cl-form #cl-unit { font-size: 13px; color: var(--dim); }

/* Filter drawer: the bar keeps only the strategy and this button. */
.filter-btn { padding: 8px 16px; font-size: 14px; }
.filter-btn .count { margin-left: -2px; }
.filter-inner { padding-bottom: 110px; }
.fsec { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.fsec h3 { font-size: 13px; font-weight: 500; color: var(--dim); }
.fsec .seg { flex-wrap: wrap; overflow: visible; border-radius: 18px; align-self: flex-start; }
.fsec .textsearch input { width: 100%; }
.frange { display: flex; gap: 10px; }
.frange label { display: flex; align-items: center; gap: 6px; font-size: 14px; flex: 1 1 0; min-width: 0; }
.frange input { font: inherit; font-size: 14px; color: var(--ink); background: var(--tile); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; width: 100%; min-width: 0; }
.fchecks { display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.fchecks .check { color: var(--ink); }
.fsec-row { flex-direction: row; flex-wrap: wrap; gap: 12px 18px; font-size: 14px; }
.fsec-row .fsec-note { flex-basis: 100%; margin-top: -6px; }
.filter-foot { position: sticky; bottom: 0; display: flex; justify-content: space-between; gap: 12px; padding: 14px 22px calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--bg); border-top: 1px solid var(--line); }
.filter-foot .btn.primary { flex: 1; }
/* Filters in a column on the right (wide screens with no home docked). The
   column runs the full height of the results and its card sticks under the top bar. */
.results.has-side { position: relative; padding-right: 324px; }
.filter-side { position: absolute; top: 32px; right: 0; bottom: 0; width: 300px; } /* top is set to the homes' top in app.js */
.filter-side-in { position: sticky; top: calc(var(--top-h, 64px) + 16px); height: var(--view-h); max-height: 100%; display: flex; flex-direction: column; overflow-y: auto; background: var(--tile); border-radius: var(--radius); }
.filter-side .filter-inner { flex: 1; }
/* With the map, the column scrolls with the page like the map does, so the two stay level; with the list it stays in view. */
.results.has-side:has(#mapview:not([hidden])) .filter-side-in { position: relative; top: 0; }
.filter-side .filter-inner { padding: 18px 18px 6px; gap: 14px; }
.filter-side .drawer-head h2 { font-size: 18px; }
.filter-side [data-close] { display: none; }
.filter-side .filter-foot { position: sticky; bottom: 0; padding: 12px 18px; background: var(--tile); }
.results.is-mine.has-side { padding-right: 0; }
.results.is-mine .filter-side { display: none; }
/* Daglig oversigt with nothing new: no filters, counts or map, only the message. */
.results.is-overview-empty.has-side { padding-right: 0; }
.results.is-overview-empty .filter-side, .results.is-overview-empty .filters, .results.is-overview-empty .head-right, .results.is-overview-empty .focus-note { display: none; }
.results.is-loading .filter-side { opacity: .45; pointer-events: none; transition: opacity var(--reveal-dur) ease-in-out; }
/* On a phone the drawer fills the screen, so its close button and "Vis boliger"
   must stay in view: the head sticks at the top, the filters scroll between,
   and the foot sits at the bottom of the visible viewport (dvh, not vh, which
   iOS measures behind the browser bar). */
#filter-drawer[open] { display: flex; flex-direction: column; overflow: hidden; }
#filter-drawer .filter-inner { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 24px; padding-top: 0; }
#filter-drawer .drawer-head { position: sticky; top: 0; z-index: 1; background: var(--bg); padding-block: calc(16px + env(safe-area-inset-top, 0px)) 8px; }
#filter-drawer .filter-foot { position: static; flex: none; }

/* Landsdel: its municipalities as chips under the quick picks. */
.region-list { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 18px; animation: pop-in 180ms var(--panel-ease); }
.region-list .chips { justify-content: center; max-width: 760px; margin-top: 0; }
.region-list .chip { font-size: 14px; padding: 6px 14px; }
.region-list .chip-all { font-weight: 500; border-color: var(--line-strong); }
#quick .chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Compare: a bar at the bottom while homes are picked, then a side-by-side table. */
.cmp-bar { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 12px; background: var(--tile); border: 1px solid var(--line); border-radius: 999px; padding: 8px 8px 8px 10px; box-shadow: 0 18px 50px rgba(0,0,0,.18); animation: pop-in 180ms var(--panel-ease); max-width: calc(100vw - 32px); }
.cmp-bar[hidden] { display: none; }
/* Toast: above the compare bar and the feedback button, never on top of them. */
.toast { position: fixed; left: 50%; width: max-content; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--btn); color: var(--btn-ink); font-size: 14px; box-shadow: 0 12px 36px rgba(0,0,0,.22); animation: toast-in var(--panel-open-dur) var(--panel-ease); }
.toast span { min-width: 0; }
.toast button { flex: none; padding: 7px 14px; border-radius: 999px; background: color-mix(in srgb, var(--btn-ink) 16%, transparent); color: inherit; font-size: 14px; font-weight: 500; }
.toast.out { opacity: 0; transform: translate(-50%, var(--panel-translate-y)); transition: opacity var(--panel-close-dur) var(--panel-ease), transform var(--panel-close-dur) var(--panel-ease); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, var(--panel-translate-y)); } }
@media (max-width: 640px) { body:has(.cmp-bar:not([hidden])) .toast { bottom: calc(140px + env(safe-area-inset-bottom, 0px)); } }
.cmp-thumbs { display: flex; }
.cmp-thumbs img, .cmp-thumbs span { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--tile); margin-left: -8px; background: var(--alt); }
.cmp-thumbs :first-child { margin-left: 0; }
.cmp-bar .btn { padding: 9px 16px; font-size: 14px; }
/* The comparison page uses the whole screen width. */
body:has(#compare:not([hidden])) main { max-width: none; }
body:has(#compare:not([hidden])) .top-inner { max-width: none; }
.compare-view { padding-top: 28px; }
.c-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.c-top h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 500; line-height: 1.1; }
.c-top .meta { margin-top: 6px; }
.c-top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.c-top-actions [data-c-diff][aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.c-scroll { margin: 0 -22px; padding: 0 22px 60px; }
/* Narrow screens scroll the table sideways; then the homes can't stay pinned to the page. */
@media (max-width: 1320px) { .c-scroll { overflow-x: auto; } .c-home, .c-add, .c-corner { top: 0 !important; position: relative !important; } }
.c-grid { display: grid; min-width: min-content; }
.c-grid > div { padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.c-label { color: var(--dim); position: sticky; left: 0; background: var(--bg); z-index: 2; }
.c-corner { border-bottom: 0 !important; }
.c-val { font-variant-numeric: tabular-nums; }
.c-val small { display: block; font-size: 12px; color: var(--dim); }
.c-val.best { background: var(--ok-bg); color: var(--ok); font-weight: 500; }
.c-val.best .good, .c-val.best .bad { color: inherit; }
.c-empty { border-bottom-color: transparent !important; }
.c-sec { font-size: 13px; font-weight: 500; color: var(--ink); background: var(--alt); border-radius: 10px; margin-top: 16px; border-bottom: 0 !important; position: sticky; left: 0; }
.c-home, .c-add { position: sticky; top: 66px; z-index: 3; background: var(--bg); display: flex; flex-direction: column; gap: 4px; border-bottom: 1px solid var(--line) !important; padding-bottom: 14px !important; }
.c-corner { position: sticky; top: 66px; z-index: 4; background: var(--bg); }
.c-home img, .c-noimg { width: 100%; height: clamp(120px, 14vw, 200px); object-fit: cover; border-radius: 16px; background: var(--alt); margin-bottom: 8px; }
.c-home b { font-size: 16px; font-weight: 500; }
.c-home span { color: var(--dim); font-size: 13px; }
.c-home .badge { align-self: flex-start; margin-top: 4px; background: var(--alt); color: var(--ink); text-align: left; }
.c-home .badge.mine-cut { color: var(--ok); background: var(--ok-bg); }
.c-home .c-reprice { align-self: flex-start; margin-top: 2px; max-width: 100%; white-space: normal; text-align: left; }
.c-home.gone > :not(.badge):not(.c-remove), .c-val.gone { opacity: .6; }
.c-remove { position: absolute; top: 20px; right: 22px; background: rgba(0,0,0,.5); color: #fff; }
.c-save { position: absolute; top: 20px; right: 64px; background: rgba(0,0,0,.5); color: #fff; }
.c-save svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.c-save.on { background: #fff; color: #0a0a0a; }
.c-save.on svg { fill: currentColor; }
.c-label small { display: block; font-size: 12px; }
.c-cash { display: block; margin-top: 6px; font: inherit; font-size: 13px; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; max-width: 100%; }
.c-open { margin-top: 8px; padding: 7px 12px; font-size: 13px; align-self: flex-start; }
.c-plus { width: 100%; height: clamp(120px, 14vw, 200px); border: 1.5px dashed var(--line-strong); border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--dim); font-size: 14px; transition: border-color 250ms var(--panel-ease), color 250ms var(--panel-ease), background 250ms var(--panel-ease); }
.c-plus span { font-size: 34px; line-height: 1; font-weight: 300; }
.c-plus:hover { border-color: var(--ink); color: var(--ink); background: var(--tile); }
.c-bar { display: none; }
/* Phones: two homes per screen width, each row's name as a small heading
   above its values, and a thin bar of the homes pinned on top that scrolls
   sideways with the grid. */
@media (max-width: 640px) {
  .c-bar { display: block; position: sticky; top: 66px; z-index: 5; margin: 0 -22px; padding: 0 22px; overflow: hidden; background: var(--bg); border-bottom: 1px solid var(--line); }
  .c-bar-track { display: grid; grid-template-columns: repeat(var(--n), calc((100vw - 44px) / 2)); min-width: min-content; }
  .c-bar-track > div { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 0; min-width: 0; }
  .c-bar-track img, .c-bar-track .c-noimg { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: none; margin: 0; }
  .c-bar-track span { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
  .c-bar-track b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .c-bar-track small { color: var(--dim); font-size: 12px; }
  .c-scroll { scroll-snap-type: x mandatory; scroll-padding-left: 22px; }
  .c-grid { grid-template-columns: repeat(var(--n), calc((100vw - 44px) / 2)) !important; }
  .c-grid > .c-home { scroll-snap-align: start; }
  .c-grid > .c-label { grid-column: 1 / -1; justify-self: start; position: sticky; left: 0; font-size: 13px; color: var(--dim); background: none; border-bottom: 0; padding: 12px 0 0; }
  .c-grid > .c-sec { justify-self: start; width: calc(100vw - 44px); }
  .c-grid > .c-corner, .c-grid > .c-empty { display: none; }
  .c-grid > .c-val { padding: 4px 8px 10px 0; }
  .c-grid > .c-val.best { padding-left: 8px; border-radius: 8px; }
  .c-grid > .c-add { order: 1; grid-column: 1 / -1; position: sticky !important; left: 0; width: calc(100vw - 44px); border-bottom: 0 !important; padding-top: 18px !important; }
  .c-grid > .c-add .c-plus { height: 88px; }
}
.c-add-form { display: none; flex-direction: column; gap: 8px; }
.c-add.open .c-plus { display: none; }
.c-add.open .c-add-form { display: flex; animation: pop-in 180ms var(--panel-ease); }
.c-add input { font: inherit; font-size: 14px; color: var(--ink); background: var(--tile); border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; }
.c-add .btn { align-self: flex-start; padding: 8px 16px; font-size: 14px; }

/* A home with no listing: your price and the register's facts. */
.off-form { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.off-form h2 { font-size: 24px; font-weight: 500; overflow-wrap: anywhere; }
.off-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.off-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
/* A tip and the questions for a seller. */
.link-btn { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; font: inherit; }
.link-btn:hover { text-decoration-color: var(--ink); }
.tip-form textarea, .seller-form textarea { width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; resize: vertical; }
.tip-shots { display: flex; flex-wrap: wrap; gap: 8px; }
.tip-shots:empty { display: none; }
.tip-shot { position: relative; }
.tip-shot img { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.tip-shot button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 11px; }
.tip-file { cursor: pointer; }
.tip-wide { grid-column: 1 / -1; }
.field.from-tip input, .field.from-tip select { border-color: var(--ai); }
.field .tip-quote { color: var(--ai); overflow-wrap: anywhere; }
.tip-desc summary { cursor: pointer; font-size: 14px; color: var(--dim); margin-bottom: 8px; }
.seller-form .fsec { gap: 12px; }
.seller-form .fsec h3 { font-size: 15px; color: var(--ink); }
.seller-q { font-size: 14px; color: var(--ink); }
.seller-seg { flex-wrap: wrap; border-radius: 18px; align-self: flex-start; }
.seller-seg label { position: relative; }
.seller-seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.seller-seg span { display: inline-block; padding: 6px 12px; border-radius: 999px; color: var(--dim); font-size: 14px; cursor: pointer; }
.seller-seg input:checked + span { background: var(--tile); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.seller-seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 1px; }
.seller-parts { display: flex; flex-direction: column; gap: 8px; }
.seller-part { display: grid; grid-template-columns: 72px minmax(0, 1fr) 110px; align-items: center; gap: 10px; }
.seller-part b { font-weight: 500; font-size: 14px; }
.seller-year { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); }
.seller-year input { width: 100%; font: inherit; font-size: 14px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
@media (max-width: 640px) { .seller-part { grid-template-columns: 1fr; gap: 6px; } .seller-year { max-width: 160px; } }

/* Follow a search for the daily overview. */
.follow-btn { margin-top: 10px; padding: 7px 14px; font-size: 14px; }
.follow-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.follow-btn svg { display: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Phones: the search's head folds to a few short lines (follow beside the
   title, the count and "Hent igen", the view switch with the tally as bare
   numbers), so the first home's price and address are on the first screen. */
@media (max-width: 640px) {
  #results > .res-head { padding-block: 16px 12px; gap: 10px; }
  #results > .res-head > div:first-child { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; width: 100%; }
  #results > .res-head > div:first-child > * { grid-column: 1 / -1; }
  #results > .res-head > div:first-child > h1 { grid-column: 1; }
  #results > .res-head > div:first-child > .follow-btn { grid-column: 2; grid-row: 1; margin-top: 0; padding: 7px 12px; gap: 6px; }
  #results .follow-btn svg { display: block; }
  #results .follow-alert { margin-left: 0; }
  #area-meta .meta-extra { display: none; }
  #results .tally { gap: 6px; }
  #results .tally .pill { padding: 5px 10px; }
  #results .tally .tally-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #results > .filters { padding-bottom: 12px; margin-bottom: 14px; gap: 8px 10px; }
}

/* Loading: a veil with a spinner and shimmering text over whatever is
   loading, blocking it until done. Shimmer text and the veil's fade (skeleton
   reveal: 400ms ease-in-out, 2px blur) are transitions.dev recipes. */
:root { --shimmer-dur: 2000ms; --shimmer-band: 400%; --reveal-dur: 400ms; --reveal-blur: 2px; }
.is-busy { position: relative; }
.busy-veil { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; text-align: center; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); border-radius: inherit; font-size: 14px; font-weight: 500; cursor: progress; animation: t-veil-in var(--reveal-dur) ease-in-out both; }
.busy-veil.is-leaving { animation: t-veil-out var(--reveal-dur) ease-in-out both; }
@keyframes t-veil-in { from { opacity: 0; filter: blur(var(--reveal-blur)); } }
@keyframes t-veil-out { to { opacity: 0; filter: blur(var(--reveal-blur)); } }
.spinner.inline { display: inline-block; width: 13px; height: 13px; border-width: 2px; vertical-align: -2px; margin-right: 8px; }
.t-shimmer { position: relative; display: inline-block; color: var(--dim); }
.t-shimmer::before { content: attr(data-text); position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(90deg, transparent 0%, transparent 40%, var(--ink) 50%, transparent 60%, transparent 100%); background-size: var(--shimmer-band) 100%; background-repeat: no-repeat; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: t-shimmer var(--shimmer-dur) linear infinite; }
@keyframes t-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0% 0; } }
/* While an area loads, its controls wait. */
.results.is-loading .filters, .results.is-loading #tally, .results.is-loading .map-tools, .results.is-loading .map-sat, .results.is-loading .map-listbtn, .results.is-loading .map-sizes { opacity: .45; pointer-events: none; transition: opacity var(--reveal-dur) ease-in-out; }
.au-skel { height: 240px; border-radius: var(--radius); background: linear-gradient(90deg, var(--alt), var(--line), var(--alt)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@media (prefers-reduced-motion: reduce) {
  .t-shimmer::before, .busy-veil, .busy-veil.is-leaving { animation: none !important; }
}

/* What needs renovating, on the fix & flip card */
.reno-needs { background: var(--alt); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; margin-bottom: 10px; }
.reno-needs > b { font-weight: 500; }
.reno-needs ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.reno-needs li b { font-weight: 500; }
.reno-needs li small { display: block; color: var(--dim); font-size: 13px; }
.reno-needs p { color: var(--dim); }
.reno-needs.unknown { background: var(--mid-bg); }
.reno-needs.unknown p { color: var(--ink); }

/* Loading an area: a veil over everything under the top bar, blocking it. */
.page-busy { position: fixed; inset: 64px 0 0 0; z-index: 45; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--bg) 62%, transparent); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); cursor: progress; animation: t-veil-in var(--reveal-dur) ease-in-out both; }
.page-busy.is-leaving { animation: t-veil-out var(--reveal-dur) ease-in-out both; pointer-events: none; }
.page-busy-card { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; background: var(--tile); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 32px; box-shadow: 0 24px 70px rgba(0,0,0,.16); max-width: min(440px, 100%); }
.page-busy-card b { font-size: 17px; font-weight: 500; }
.page-busy-card small { color: var(--dim); font-size: 13px; line-height: 1.45; }
.spinner.big { width: 44px; height: 44px; border-width: 3.5px; }
body.page-is-busy { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .page-busy, .page-busy.is-leaving { animation: none !important; } }

/* What the numbers rest on that's thin, under the key figures. */
.unsure { margin-top: 10px; background: var(--mid-bg); color: var(--ink); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.unsure > b { font-weight: 500; color: var(--mid); }
.unsure ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.unsure li { display: grid; grid-template-columns: 120px 1fr; gap: 10px; color: var(--dim); }
.unsure li span { color: var(--ink); font-weight: 500; }
@media (max-width: 640px) { .unsure li { grid-template-columns: 1fr; gap: 0; } }

/* Your bid, when set, under the asking price (never in its place). */
.my-bid { display: block; font-size: 12.5px; font-weight: 500; color: var(--mid); }
.ml-body b .my-bid { display: inline; }

.meta-again { font: inherit; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }

.results.is-mine .filters, .results.is-mine .focus-note { display: none; }

/* Accounts in the share drawer */
.acc-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.acc-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.acc-list li > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acc-act { display: flex; gap: 6px; flex-wrap: wrap; }
.acc-act .btn { padding: 6px 12px; font-size: 13px; }
.acc-form { position: relative; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acc-form input[type="email"], .acc-form input[type="text"] { flex: 1 1 160px; min-width: 0; font: inherit; font-size: 15px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; }
.acc-owner { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--dim); }
.fsec { position: relative; }

/* "Hvad koster lånet?": the stress line under the monthly loan table. */
/* Loan comparison: the name on its own line, three figures under it, so four columns never squeeze a phone */
.loan-opts { margin-top: 10px; }
.line.lo-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lo-row .lo-name { grid-column: 1 / -1; }
.lo-row .lo-name small, .lo-row .v small { display: block; font-size: 12px; font-weight: 400; color: var(--faint); }
.lo-row .v { text-align: left; align-self: end; }
.loan-stress { margin-top: 10px; font-size: 14px; line-height: 1.45; background: var(--mid-bg); color: var(--ink); border-radius: 12px; padding: 10px 12px; }
.loan-stress b { color: var(--mid); font-weight: 500; }

/* "Passer bedre til dine krav i nærheden" on a home: small cards with the reason under each. */
.better .better-item { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.better.dash-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }

/* "Hvad kan gå galt?": your three sizes above the rows. */
.scen-inputs { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 12px; }
.scen-inputs .field.inline input { width: 96px; }
.scen-inputs span { color: var(--dim); }
