/* Malo — mobile first (375 px), widened for tablets and computers. Patterns after Money Manager (docs/UI-ANALYSIS.md). */
:root {
  /* 0.14.0 visual refresh (SDD D42, UI-ANALYSIS section 17): one set of tokens for colour, type, space, radius and shadow */
  --green: #1f5a3d; --green-2: #2e7a52; --green-50: #eef6f1; --green-100: #d7eadf;
  --bg: #f4f5f3; --card: #fff; --ink: #17211b; --muted: #5b665f; --faint: #8a948d; --line: #e3e7e3; --line-2: #d4dad5;
  --bad: #c2362f; --bad-bg: #fdecea; --due: #9a5b00; --due-bg: #fff2d9; --paid: #2558b8; --paid-bg: #e9f0fc; --area: #2e7a52;
  --radius: 14px; --radius-s: 10px; --tap: 44px;
  --shadow: 0 1px 2px rgba(16, 24, 20, .04), 0 1px 3px rgba(16, 24, 20, .06);
  --shadow-lg: 0 10px 30px rgba(16, 24, 20, .12), 0 2px 6px rgba(16, 24, 20, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  /* chart series: categorical slots in fixed order (dataviz reference palette, validated for colour-blind separation) */
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s-other: #9aa19c;
}
@font-face { font-family: "Inter"; src: url("/fonts/inter-var-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--font); font-feature-settings: "cv11", "ss03"; -webkit-font-smoothing: antialiased; color: var(--ink); background: var(--bg); }
[hidden] { display: none !important; }
.hidden { display: none !important; }  /* 0.30.1: fields kept in a form but not shown */
a { color: var(--green); }
h1, h2, h3 { margin: 0; }
h2 { font-size: 1rem; }
small { color: var(--muted); }

/* top bar */
#topbar { position: sticky; top: 0; z-index: 900; display: flex; align-items: center; gap: .25rem; height: 56px; padding: 0 .4rem;
  background: var(--green); color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
#topbar h1 { font-size: 1.1rem; font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#topbar .icon { color: #fff; font-size: 1.5rem; }
.top-link { color: #fff; text-decoration: none; font-weight: 600; padding: .6rem .8rem; }
button.icon { min-width: var(--tap); min-height: var(--tap); border: 0; background: none; font-size: 1.2rem; cursor: pointer; color: inherit; padding: 0; }

/* drawer (menu button) */
#drawer { position: fixed; z-index: 1001; top: 0; bottom: 0; left: 0; width: min(300px, 85vw); background: #fff; display: flex; flex-direction: column;
  box-shadow: 2px 0 12px rgba(0,0,0,.2); padding-bottom: var(--safe-b); }
.drawer-head { background: var(--green); color: #fff; padding: 1.2rem 1rem; display: flex; flex-direction: column; }
.drawer-head small { color: #e2efe4; }
#drawer a, #drawer > button { display: block; padding: .9rem 1rem; text-decoration: none; color: var(--ink); border: 0; background: none; text-align: left; font: inherit; min-height: var(--tap); }
#drawer a.on { background: #e8f1ea; font-weight: 600; }
#drawer > button { margin-top: auto; color: var(--bad); border-top: 1px solid var(--line); cursor: pointer; }
#scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1000; }

/* content */
#view { padding: .75rem .75rem calc(150px + var(--safe-b)); max-width: 760px; margin: 0 auto; } /* room for the tab bar and the round + (0.7.0) */
.loading { color: var(--muted); padding: 2rem 0; text-align: center; }
.greet { margin: .2rem 0 .6rem; font-size: 1.15rem; font-weight: 600; }
.block { background: var(--card); border-radius: var(--radius); padding: .8rem; margin: .75rem 0; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.block > h2, .block-head h2 { margin-bottom: .4rem; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .2rem; }
.empty-line { color: var(--muted); margin: .3rem 0; font-size: .92rem; }
.empty { text-align: center; padding: 3rem 1rem; }
.hint { color: var(--muted); font-size: .85rem; margin: .3rem 0; }
.warn { background: #fff4d6; border-left: 4px solid #d9a400; padding: .5rem .7rem; font-size: .88rem; border-radius: 4px; }
.err { color: var(--bad); font-weight: 600; min-height: 1em; }
.bad { color: var(--bad) !important; }
.due { color: var(--due); }
.paid { color: var(--paid); }
.small-link { font-size: .88rem; }

/* summary strip (P1, P5) */
.strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.strip-cell { background: var(--card); padding: .6rem .7rem; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.strip-cell strong { font-size: 1.1rem; }
.strip-cell.bad strong { color: var(--bad); } .strip-cell.due strong { color: var(--due); } .strip-cell.paid strong { color: var(--paid); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: .75rem; }
.stat { background: var(--card); border-radius: var(--radius); padding: .7rem .5rem; text-align: center; text-decoration: none; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.stat strong { display: block; font-size: 1.35rem; color: var(--green); }
.stat small { font-size: .78rem; }

/* compact rows (P4): date left, description, amount right */
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: .6rem; min-height: var(--tap); padding: .45rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.row:last-child { border-bottom: 0; }
.row .when { width: 4.4rem; flex: none; font-size: .82rem; color: var(--muted); }
.row .what { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row .what strong { font-weight: 600; font-size: .95rem; }
.row .what small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .amt { font-weight: 700; white-space: nowrap; }
.row .chev { color: var(--muted); font-size: 1.3rem; }
.row.struck .amt, .row.struck .what small { text-decoration: line-through; opacity: .6; }
.row-btn { display: flex; flex-direction: column; align-items: flex-start; width: 100%; min-height: var(--tap); padding: .7rem .5rem; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; text-align: left; cursor: pointer; }

/* property cards */
.cards { display: grid; gap: .6rem; }
.pcard { display: flex; flex-direction: column; gap: .1rem; background: var(--card); border-radius: var(--radius); padding: .8rem; text-decoration: none; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); border-left: 4px solid var(--green); }
.pcard:active { background: #f0f5f1; }
.pcard-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.pcard .money { color: var(--paid); }
.chip { background: #e8f1ea; color: var(--green); font-size: .75rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; white-space: nowrap; }
.chip.big { font-size: .85rem; }

/* property page */
.hero { background: var(--card); border-radius: var(--radius); padding: .8rem; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .25rem .8rem; margin: .6rem 0 0; font-size: .92rem; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; }
.notes { white-space: pre-wrap; font-size: .92rem; }
.minimap { height: 240px; border-radius: 8px; margin-top: .4rem; }
.fullmap { height: calc(100vh - 56px - 64px - var(--safe-b)); margin: -.75rem; }
.screen-map { padding: .75rem !important; max-width: none !important; }
.ob { border: 1px solid var(--line); border-radius: 10px; padding: .6rem; margin: .5rem 0; }
.ob.closed { opacity: .65; }
.ob-head small { display: block; }
.ob-figs { display: flex; gap: 1.2rem; margin: .4rem 0; }
.ob-figs span { display: flex; flex-direction: column; } .ob-figs small { font-size: .75rem; }
.bar { height: 6px; background: #e9ecef; border-radius: 3px; overflow: hidden; margin: .2rem 0 .3rem; }
.bar i { display: block; height: 100%; background: var(--paid); }
.ob-actions { display: flex; gap: .5rem; margin-top: .5rem; }
.pays summary { cursor: pointer; font-size: .88rem; color: var(--green); padding: .4rem 0; min-height: var(--tap); display: flex; align-items: center; }
.timeline { list-style: none; margin: .3rem 0 0; padding: 0 0 0 1rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 .9rem .6rem; }
.timeline li::before { content: ""; position: absolute; left: -1.42rem; top: .35rem; width: .7rem; height: .7rem; border-radius: 50%; background: #c5cdc7; border: 2px solid #fff; }
.timeline li.current::before { background: var(--green); }
.tl-head { display: flex; flex-wrap: wrap; gap: .1rem .5rem; align-items: baseline; }
.timeline p { margin: .2rem 0; font-size: .92rem; white-space: pre-wrap; }
.photos { display: flex; gap: .4rem; overflow-x: auto; padding: .3rem 0; }
.photos img { width: 92px; height: 92px; object-fit: cover; border-radius: 8px; display: block; background: #eee; }
.tl-actions { display: flex; gap: .5rem; align-items: center; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.beacons-ro { width: 100%; border-collapse: collapse; font-size: .88rem; }
.beacons-ro th, .beacons-ro td { text-align: left; padding: .3rem .2rem; border-bottom: 1px solid var(--line); }

/* buttons and forms */
button, .button { min-height: var(--tap); padding: .5rem 1rem; border: 1px solid var(--green); background: #fff; color: var(--green); border-radius: 10px;
  cursor: pointer; font: inherit; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
button.primary, .button.primary { background: var(--green); color: #fff; }
button.danger { border-color: var(--bad); color: var(--bad); margin-top: 1rem; }
button.small, label.small { min-height: 36px; padding: .3rem .75rem; font-size: .85rem; border-radius: 999px; border: 1px solid var(--green); color: var(--green); background: #fff; font-weight: 600; display: inline-flex; align-items: center; cursor: pointer; }
button.small.primary { background: var(--green); color: #fff; }
button.link { border: 0; color: var(--muted); }
button.icon.small { min-height: 36px; min-width: 36px; border: 0; color: var(--muted); }
.wide { width: 100%; }
button:disabled { opacity: .5; }
label { display: block; margin: .55rem 0; font-size: .88rem; color: #39443c; }
input, select, textarea { display: block; width: 100%; min-height: var(--tap); padding: .55rem .6rem; margin-top: .2rem; font: inherit; font-size: 16px; color: var(--ink);
  border: 1px solid #c9cfca; border-radius: 8px; background: #fff; }
textarea { min-height: 4.5rem; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid #9cc9a6; outline-offset: 1px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; align-items: end; }
.card { background: var(--card); border-radius: var(--radius); padding: 1rem; }
.edit h2 { margin-top: 1.2rem; }
.beacon { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) minmax(0, 1fr) 32px 28px; gap: .25rem; align-items: center; margin: .3rem 0; }
.beacon input { min-height: 40px; padding: .3rem; margin: 0; font-size: 14px; }
.beacon .icon { min-width: 28px !important; }
.beacon .icon { min-width: 36px; min-height: 36px; }
#metrics { font-weight: 600; } #metrics.err { color: var(--bad); }

/* tabs, chips, calendar, bars (P5, P9) */
.tabs { display: flex; margin: .75rem 0 .2rem; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.tabs a { flex: 1; text-align: center; padding: .7rem 0; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; min-height: var(--tap); }
.tabs a.on { color: var(--green); border-bottom-color: var(--green); }
.chips { display: flex; gap: .4rem; overflow-x: auto; padding: .6rem 0; }
.chip-btn { min-height: 36px; padding: .3rem .8rem; border-radius: 999px; border: 1px solid #c9cfca; color: var(--ink); background: #fff; font-size: .85rem; white-space: nowrap; font-weight: 500; }
.chip-btn.on { background: var(--green); border-color: var(--green); color: #fff; }
.chips + div { background: var(--card); border-radius: var(--radius); padding: 0 .8rem; }
.cal-wrap { background: var(--card); border-radius: var(--radius); padding: .6rem; margin-top: .6rem; }
.cal-head { display: flex; justify-content: space-between; align-items: center; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-top: .3rem; }
.cal > b { text-align: center; font-size: .72rem; color: var(--muted); font-weight: 600; padding: .2rem 0; }
.cal button { min-height: 58px; padding: .15rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; font-weight: 400; overflow: hidden; }
.cal button span { font-size: .8rem; text-align: left; }
.cal button i { font-style: normal; font-size: .62rem; font-weight: 700; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal button.today { border-color: var(--green); border-width: 2px; }
.cal button.sel { background: #eaf2ec; }
i.bad { color: var(--bad); font-style: normal; } i.due { color: var(--due); font-style: normal; } i.paid { color: var(--paid); font-style: normal; }
.legend { font-size: .78rem; color: var(--muted); }
.legend i { font-weight: 700; }
.cal-detail h3 { font-size: .95rem; margin: .8rem 0 .2rem; }
.hbar { margin: .5rem 0; }
.hbar-label { display: flex; justify-content: space-between; gap: .5rem; font-size: .88rem; }
.hbar-label b { font-weight: 600; white-space: nowrap; font-size: .82rem; }
.hbar-track { display: flex; height: 12px; background: #eef0ee; border-radius: 6px; overflow: hidden; margin-top: .2rem; }
.hbar-track i { display: block; height: 100%; }
.hbar-track i.paid { background: var(--paid); } .hbar-track i.due { background: #f0b44c; } .hbar-track i.area { background: var(--area); }
.legend i::before { content: "■ "; }

/* "+" button (P3) and tab bar (P11) */
#fab { position: fixed; z-index: 950; right: 1rem; bottom: calc(76px + var(--safe-b)); width: 58px; height: 58px; border-radius: 50%; border: 0;
  background: var(--bad); color: #fff; font-size: 2rem; font-weight: 400; line-height: 1; box-shadow: 0 3px 10px rgba(0,0,0,.25); padding: 0; }
#tabbar { position: fixed; z-index: 940; left: 0; right: 0; bottom: 0; display: flex; background: #fff; border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
#tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60px; text-decoration: none; color: var(--muted); font-size: .72rem; }
#tabbar a span { font-size: 1.25rem; filter: grayscale(1); opacity: .7; }
#tabbar a.on { color: var(--green); font-weight: 700; }
#tabbar a.on span { filter: none; opacity: 1; }

/* bottom sheet for records */
#sheet { position: fixed; z-index: 1002; left: 0; right: 0; bottom: 0; max-height: 92vh; display: flex; justify-content: center; }
.sheet-body { width: 100%; max-width: 560px; background: #fff; border-radius: 16px 16px 0 0; overflow-y: auto; padding: .4rem 1rem calc(1rem + var(--safe-b)); box-shadow: 0 -4px 18px rgba(0,0,0,.2); }
.sheet-head { position: sticky; top: 0; background: #fff; display: flex; align-items: center; justify-content: space-between; padding: .4rem 0; z-index: 1; }
.sheet-head h2 { font-size: 1.05rem; }
.sheet-form .primary.wide { margin-top: .8rem; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding-bottom: .5rem; }
.action { flex-direction: column; align-items: flex-start; gap: .1rem; min-height: 86px; border: 1px solid var(--line); border-radius: 12px; padding: .6rem; color: var(--ink); font-size: 1.3rem; text-align: left; font-weight: 400; }
.action span { font-size: .95rem; font-weight: 700; }
.action small { font-size: .74rem; line-height: 1.25; }
#toast { position: fixed; z-index: 1100; left: 50%; transform: translateX(-50%); bottom: calc(150px + var(--safe-b)); background: #263028; color: #fff; padding: .6rem 1rem; border-radius: 10px; font-size: .9rem; max-width: 90vw; }
.radio { display: flex; gap: .7rem; align-items: flex-start; padding: .4rem 0; font-size: .95rem; color: var(--ink); }
.radio input { width: 22px; min-height: 22px; margin-top: .15rem; flex: none; }
.radio span { display: flex; flex-direction: column; }

/* sign-in */
#auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: linear-gradient(160deg, #2f5d3a, #4f8a5c); }
#auth .card { width: 100%; max-width: 400px; box-shadow: 0 6px 24px rgba(0,0,0,.2); }
.brand { color: var(--green); font-size: 2rem; }
#auth h2 { margin: 1rem 0 .3rem; }
.links { display: flex; flex-wrap: wrap; gap: .8rem; }
.links a { padding: .4rem 0; }

/* wider screens */
@media (min-width: 700px) {
  .strip { grid-template-columns: repeat(4, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .minimap { height: 320px; }
  .actions { grid-template-columns: repeat(3, 1fr); }
  #sheet { align-items: center; top: 0; }
  .sheet-body { border-radius: 16px; max-height: 90vh; }
}
@media (min-width: 1000px) {
  #view { max-width: 980px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
}
.map-note { background: rgba(255,255,255,.92); padding: .35rem .6rem; border-radius: 8px; font-size: .8rem; color: var(--ink); text-decoration: none; }
.pin-label { font-weight: 600; }

/* GPS capture (FR-8, FR-9) */
#sync-badge { display: block; background: #fff4e0; color: var(--due); text-align: center; font-size: .85rem; padding: .35rem; text-decoration: none; font-weight: 600; }
.gps-live { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; font-size: 1.05rem; }
.gps-live .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--muted); flex: none; }
.gps-live strong { font-size: 1.5rem; }
.gps-live.good .dot { background: #2e9e4f; } .gps-live.ok .dot { background: var(--due); } .gps-live.poor .dot { background: var(--bad); }
.gps-live.good strong, strong.good { color: #2e7d43; } .gps-live.ok strong, strong.ok { color: var(--due); } .gps-live.poor strong, strong.poor { color: var(--bad); }
.warn-chip { background: #fff4e0; color: var(--due); display: inline-block; margin-top: .4rem; white-space: normal; }
.big-btn { width: 100%; min-height: 64px; font-size: 1.15rem; margin-top: .6rem; }
.capture-panel { margin-top: .6rem; display: flex; flex-direction: column; gap: .45rem; }
.capture-panel h3 { margin: 0; }
.capture-panel .bar.good i { background: #2e9e4f; } .capture-panel .bar.poor i { background: var(--bad); }
.chip-btn.done { border-color: #2e9e4f; }
a.button.small { display: inline-flex; align-items: center; margin-top: .5rem; min-height: var(--tap); }
.capture-panel .bar { height: 10px; }
/* keep Leaflet's own stacking (controls at z-index 1000) inside each map, under the top bar, tab bar and sheets */
.minimap, .fullmap { position: relative; z-index: 0; isolation: isolate; }
.row.gp .what small { white-space: normal; }

/* 0.6.0: privacy, terms, sharing, activity (FR-21, FR-24, FR-25) */
label.check { display: flex; align-items: flex-start; gap: .55rem; min-height: var(--tap); margin: .5rem 0; font-size: .92rem; }
label.check input { width: 22px; height: 22px; margin: .1rem 0 0; flex: none; }
label.check small { display: block; color: var(--muted); font-size: .82rem; }
.banner { background: #eef4ff; border-radius: var(--radius); padding: .6rem .8rem; margin: .6rem 0; font-size: .9rem; }
h3.day { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin: .9rem 0 .2rem; }
h3.day:first-child { margin-top: .2rem; }
.row.act { align-items: flex-start; }
.row.act .what strong { font-weight: 500; font-size: .92rem; }
.row.act .what small { white-space: normal; }
.row.act .ico { display: inline-block; width: 1.2rem; color: var(--green); }
.row.act details { font-size: .85rem; margin-top: .2rem; }
ul.changes { margin: .2rem 0 0; padding-left: 1.1rem; word-break: break-word; }
.button.wide, a.button.wide { display: flex; justify-content: center; margin: .75rem 0; }
body.doc-page { background: #fff; }
body.doc-page main { max-width: 46rem; margin: 0 auto; padding: 1rem 1.1rem 3rem; line-height: 1.55; }
body.doc-page h1 { font-size: 1.6rem; margin: .6rem 0 .2rem; }
body.doc-page h2 { font-size: 1.1rem; margin: 1.4rem 0 .3rem; }
body.doc-page li { margin: .3rem 0; }

/* ---------- 0.7.0: search (FR-13), document text and suggestions (FR-12) ---------- */
#search-btn { color: #fff; text-decoration: none; font-size: 1.45rem; line-height: 1; min-width: var(--tap); min-height: var(--tap); display: inline-flex; align-items: center; justify-content: center; }
#search-btn[hidden] { display: none; }
.searchbar { position: sticky; top: 0; z-index: 5; background: var(--bg, #f4f6f4); padding-bottom: .2rem; }
.searchbar input { width: 100%; font-size: 1.05rem; min-height: var(--tap); padding: .55rem .8rem; border-radius: 999px; border: 1px solid #c9cfca; box-sizing: border-box; }
.result .what small.excerpt { white-space: normal; color: var(--ink); opacity: .85; line-height: 1.35; margin-top: .15rem; }
mark { background: #fde68a; color: inherit; padding: 0 .1em; border-radius: 2px; }
.doc-row { align-items: flex-start; cursor: pointer; }
.doc-row .what small { white-space: normal; }
.tstat { display: inline-block; font-size: .75rem; padding: 0 .45rem; border-radius: 999px; background: #eef2ef; color: var(--muted); margin-left: .3rem; }
.suggest { margin: .35rem 0 .1rem; padding: .45rem .6rem; border-radius: 10px; background: #fff7e0; border: 1px solid #f3dc9b; font-size: .86rem; }
.suggest .btns { display: flex; gap: .4rem; margin-top: .35rem; }
.suggest button { min-height: 36px; }
.ocr-text { white-space: pre-wrap; font-size: .82rem; max-height: 45vh; overflow: auto; background: #f7f8f7; border: 1px solid var(--line); border-radius: 8px; padding: .6rem; }
.found { font-size: .86rem; margin: .4rem 0; }
.found dt { font-weight: 600; } .found dd { margin: 0 0 .3rem; }

/* 0.8.0: focused edit screens (P31) */
button.top-link { background: none; border: 0; font: inherit; font-weight: 700; cursor: pointer; min-height: var(--tap); color: #fff; }
.edit.focus { max-width: 560px; margin: 0 auto; }
.edit.focus > .block:first-child { margin-top: 0; }
body.focus-edit #view { padding-bottom: calc(96px + var(--safe-b)); }
body.focus-edit #tabbar { display: none; }
.beacon-row { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; text-align: left; cursor: pointer; padding: .55rem .2rem; }
.beacon-row .when { width: 3rem; color: var(--ink); }
.beacon-row .what span { font-variant-numeric: tabular-nums; font-size: .92rem; }
.metrics { font-size: .9rem; margin: .2rem 0 .5rem; }
.stats-link { margin-top: .75rem; }

/* Stats (P32 to P34) */
.period { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.seg { display: inline-flex; background: #fff; border: 1px solid #c9cfca; border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: none; font: inherit; font-size: .85rem; padding: .35rem .8rem; min-height: 36px; cursor: pointer; color: var(--ink); }
.seg button.on { background: var(--green); color: #fff; font-weight: 600; }
.step { display: flex; align-items: center; gap: .1rem; }
.step strong { min-width: 8.5rem; text-align: center; font-size: .95rem; }
.step button:disabled { opacity: .3; }
.stat-total { display: flex; flex-direction: column; margin-bottom: .6rem; }
.stat-total strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.segbar { display: flex; gap: 2px; height: 12px; border-radius: 6px; overflow: hidden; background: var(--card); margin-bottom: .4rem; }
.segbar i { display: block; min-width: 3px; }
.stat-row { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; text-align: left; cursor: pointer; padding: .55rem .1rem; }
.stat-row.open { border-bottom-color: transparent; }
.swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.stat-row .amt { font-variant-numeric: tabular-nums; }
.stat-detail { padding: .2rem 0 .8rem 1.4rem; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .3rem; }
.monthbars svg { display: block; max-width: 420px; }
.monthbars .axis { stroke: #c9cfca; stroke-width: 1; }
.monthbars .tick { font-size: 9px; fill: var(--muted); }
.monthbars .bar { cursor: pointer; outline: none; }
.monthbars .bar.sel .tick { fill: var(--ink); font-weight: 700; }
.monthbars .bar.sel path { stroke: var(--ink); stroke-width: 1; }
.bar-read { margin: .1rem 0; font-size: .88rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* document preview (P35 to P37) */
#viewer { position: fixed; inset: 0; z-index: 980; background: #1f2421; color: #fff; display: flex; flex-direction: column; outline: none; }
body.viewing { overflow: hidden; }
body.viewing #fab, body.viewing #tabbar { display: none; }
.viewer-head { display: flex; align-items: center; gap: .3rem; height: 56px; padding: 0 .3rem; background: #111512; flex: none; }
.viewer-head .icon { color: #fff; font-size: 1.4rem; }
.viewer-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.viewer-title strong, .viewer-title small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-title small { color: #b9c2bb; font-size: .78rem; }
a.viewer-dl { color: #fff; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); font-size: 1.4rem; }
.viewer-body { flex: 1; overflow: auto; padding: .75rem; -webkit-overflow-scrolling: touch; }
.viewer-body img { display: block; max-width: 100%; margin: 0 auto; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.4); cursor: zoom-in; }
.viewer-body img.zoom { max-width: none; cursor: zoom-out; }
.viewer-body .page { margin: 0 auto 1rem; max-width: 900px; }
.viewer-body figcaption { text-align: center; color: #b9c2bb; font-size: .8rem; margin-top: .3rem; }
.viewer-body .loading, .viewer-body .hint, .viewer-body .empty p { color: #d5dcd6; }
.viewer-body .err { color: #ffb4b4; }
.center { text-align: center; }
.viewer-foot { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .3rem .5rem calc(.3rem + var(--safe-b)); background: #111512; flex: none; }
.viewer-foot button { min-height: var(--tap); background: none; border: 1px solid #4a534c; color: #fff; border-radius: 8px; padding: 0 .8rem; font: inherit; font-size: .9rem; cursor: pointer; }
.viewer-foot button:disabled { opacity: .35; cursor: default; }
.viewer-foot span { color: #b9c2bb; font-size: .85rem; }
.viewer-mid { display: flex; align-items: center; gap: .6rem; }

/* map overview (0.9.0, FR-30): a bubble per province with its property count; tap to zoom in */
.prov-bubble { display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--green); color: #fff;
  font-weight: 700; font-size: 1.05rem; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); cursor: pointer; }
.prov-bubble:focus-visible { outline: 3px solid #ffd84d; outline-offset: 2px; }
.leaflet-tooltip.prov-label { background: rgba(255,255,255,.92); border: 0; box-shadow: none; font-weight: 600; padding: 1px 6px; color: var(--ink); }
.leaflet-tooltip.prov-label::before { display: none; }
.map-notes { display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; }
ul.plain { list-style: none; margin: .4rem 0 0; padding: 0; }
ul.plain li { padding: .35rem 0; border-top: 1px solid var(--line); }
ul.plain li a { display: block; min-height: 32px; }

/* single sign-on buttons (FR-1a): equal size and weight (Google branding guidelines); brand colours kept */
.or { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .85rem; margin: 1rem 0 .6rem; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
#sso-buttons { display: flex; flex-direction: column; gap: .55rem; }
button.sso { display: flex; align-items: center; justify-content: center; gap: .65rem; width: 100%; font-weight: 600; font-family: Roboto, system-ui, sans-serif; }
button.sso-google { background: #fff; color: #1f1f1f; border: 1px solid #747775; }
button.sso-facebook { background: #1877f2; color: #fff; border: 1px solid #1877f2; }
.linked-row { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.linked-row .what { flex: 1; min-width: 0; }
.linked-row .what small { display: block; overflow: hidden; text-overflow: ellipsis; }
.status-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .35rem; background: var(--muted); }
.status-dot.on { background: var(--green-2); }
h3.sub { font-size: .9rem; margin: 1rem 0 .2rem; color: var(--muted); font-weight: 600; }
.linked-row a.button.small { margin-top: 0; }
small.reminder { display: flex; align-items: center; margin-top: .25rem; }

/* GPS blocked or unavailable (0.10.0) */
.gps-help { margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: #fdf3e2; border: 1px solid #e8c78f; color: #3b2a0c; }
.gps-help strong { display: block; margin-bottom: 4px; }
.gps-help ol { margin: 0; padding-left: 20px; }
.gps-help li { margin: 4px 0; line-height: 1.4; }
.leaflet-tooltip.prov-name { background: transparent; border: 0; box-shadow: none; padding: 0; color: #fff; font-size: 11px; font-weight: 600;
  text-shadow: 0 0 3px #10261a, 0 0 2px #10261a; pointer-events: none; }
.leaflet-tooltip.prov-name::before { display: none; }
/* 0.11.0: charges by year (Stats), weekday rule, delete buttons in edit sheets */
.year-row .what { min-width: 0; }
.year-row .bar { margin: .35rem 0 .2rem; }
.sheet-form button.danger.wide { margin-top: .6rem; }

/* ---------- computer layout (0.12.0; FR-31, SDD D37; UI-ANALYSIS section 15) ----------
   From 1024 px the body gets class "wide" (set in app.js from one media query, so the CSS and the screens agree).
   The phone and tablet layouts below 1024 px are unchanged. */
.wide-only { display: none; }
body.wide .wide-only { display: block; }
body.wide { --side: 232px; }
/* Signed out (0.13.0, Lighton's comment on 0.12.0): no sidebar, top bar or empty screen behind the sign-in card */
body:not(.signed-in) #drawer, body:not(.signed-in) #view, body:not(.signed-in) #sync-badge, body:not(.signed-in) #scrim { display: none !important; }
body.wide.signed-in #drawer[hidden] { display: flex !important; }
body.wide #drawer { width: var(--side); z-index: 950; box-shadow: none; border-right: 1px solid var(--line); overflow-y: auto; }
body.wide .drawer-head { height: 56px; padding: .35rem 1rem; justify-content: center; }
body.wide #drawer a { padding: .6rem 1rem; min-height: 40px; }
body.wide #drawer a:hover { background: #f0f5f1; }
body.wide #drawer hr { border: 0; border-top: 1px solid var(--line); margin: .4rem 0; }
body.wide #drawer > button#side-add { margin: .8rem 1rem .5rem; border: 0; border-radius: 999px; background: var(--green); color: #fff; font-weight: 600; text-align: center; padding: .6rem 1rem; }
body.wide #drawer > button#side-add:hover { background: var(--green-2); }
body.wide #menu-btn, body.wide #tabbar, body.wide #fab { display: none !important; }
body.wide #topbar, body.wide #sync-badge { margin-left: var(--side); }
body.wide #topbar { padding: 0 1rem; }
body.wide #view { --w: 1240px; max-width: var(--w); padding: 1rem 1.5rem 2.5rem;
  margin: 0 0 0 calc(var(--side) + max(0px, (100vw - var(--side) - var(--w)) / 2)); }
body.wide.focus-edit #view { --w: 760px; }
body.wide #view.screen-map { padding: 0 !important; max-width: none !important; margin-left: var(--side); }
/* Home: figures across the top, "Coming up" beside "Needs attention" */
/* Home: the map on the right (0.13.1); "Coming up" beside "Needs attention" when there is room (from 1440 px) */
body.wide .cards { grid-template-columns: repeat(3, 1fr); }
/* list beside detail (Properties) and list beside map (Map) */
.split { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 1rem; align-items: start; }
.pane { background: var(--card); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(0,0,0,.05); position: sticky; top: calc(56px + 1rem);
  max-height: calc(100vh - 56px - 2rem); overflow-y: auto; }
.pane-head { display: flex; justify-content: space-between; align-items: center; padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
.pane-row { display: flex; flex-direction: column; padding: .55rem .8rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink);
  border-left: 3px solid transparent; min-height: var(--tap); background: none; border-top: 0; border-right: 0; font: inherit; text-align: left; width: 100%; cursor: pointer; }
.pane-row:hover { background: #f0f5f1; }
.pane-row.on { border-left-color: var(--green); background: #e8f1ea; }
.pane-row small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.split-main > .hero:first-child, .split-main > .block:first-child { margin-top: 0; }
.map-split { grid-template-columns: 300px minmax(0, 1fr); gap: 0; height: calc(100vh - 56px); }
.map-split .pane { position: static; max-height: none; height: 100%; border-radius: 0; box-shadow: none; border-right: 1px solid var(--line); }
.map-split .fullmap { height: 100%; margin: 0; }
.pane-row .open { font-size: .85rem; align-self: flex-start; }
/* tables with sortable columns (Properties, Money) */
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.grid th { text-align: left; border-bottom: 2px solid var(--line); padding: 0; white-space: nowrap; }
table.grid th button { font: inherit; font-weight: 600; color: var(--muted); background: none; border: 0; padding: .6rem .6rem; cursor: pointer; min-height: var(--tap); width: 100%; text-align: left; }
table.grid th.num button { text-align: right; }
table.grid th[aria-sort="ascending"] button, table.grid th[aria-sort="descending"] button { color: var(--green); }
table.grid td { padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.grid tbody tr { cursor: pointer; }
table.grid tbody tr:hover, table.grid tbody tr:focus { background: #f0f5f1; outline: none; }
table.grid tbody tr:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
table.grid .num { text-align: right; white-space: nowrap; }
table.grid td a { font-weight: 600; text-decoration: none; }
table.grid .bad { color: var(--bad); font-weight: 600; } table.grid .due { color: var(--due); font-weight: 600; } table.grid .paid { color: var(--paid); }
.table-note { margin: .6rem 0 0; }
button.small-link { background: none; border: 0; color: var(--green); cursor: pointer; font: inherit; font-size: .88rem; padding: .3rem 0; min-height: var(--tap); }

/* ---------- guided upload, checklist and tags (0.13.0; FR-32 to FR-34, SDD D38, D40; UI-ANALYSIS section 16) ---------- */
.checklist { border: 1px solid var(--line); border-radius: var(--radius); padding: .2rem .7rem .5rem; margin: 0 0 .8rem; background: #fbfcfb; }
.checklist > summary { display: flex; justify-content: space-between; align-items: center; gap: .5rem; min-height: var(--tap); cursor: pointer; font-weight: 600; }
.checklist > summary small { font-weight: 500; color: var(--bad); }
.checklist > summary small.ok { color: var(--area); }
.ck-row { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; gap: .5rem; align-items: center; padding: .45rem 0; border-top: 1px solid var(--line); }
.ck-icon { width: 1.4rem; height: 1.4rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; border: 2px solid #b8c1ba; color: #8a948c; }
.ck-have .ck-icon { background: var(--area); border-color: var(--area); color: #fff; }
.ck-missing .ck-icon { border-color: var(--green); color: var(--green); }
.ck-what { display: flex; flex-direction: column; min-width: 0; }
.ck-what small { color: var(--muted); }
.ck-not_needed .ck-what strong, .ck-later .ck-what strong { color: var(--muted); font-weight: 500; }
.ck-not_needed .ck-what strong { text-decoration: line-through; }
.ck-act { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
button.small.link { border-color: transparent; background: none; color: var(--muted); font-weight: 500; text-decoration: underline; padding: .3rem .4rem; }
.tags { display: flex; flex-wrap: wrap; gap: .3rem; margin: .3rem 0 .1rem; }
.tag { display: inline-flex; align-items: center; gap: .2rem; font: inherit; font-size: .75rem; padding: .15rem .55rem; border-radius: 999px;
  background: #eef1f4; color: #3b4652; border: 1px solid #dde3e8; cursor: pointer; min-height: 28px; }
.tag.own { background: #e8f1ea; color: var(--green); border-color: #cfe2d4; }
.tag-x { border: 0; background: none; color: inherit; font-size: .75rem; cursor: pointer; min-width: 28px; min-height: 28px; padding: 0; }
.tag-add { display: flex; gap: .4rem; margin: .4rem 0 .8rem; }
.tag-add input { flex: 1; min-width: 0; }
.review-row { display: flex; flex-direction: column; gap: .35rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.review-row .what { display: flex; flex-direction: column; min-width: 0; }
.review-row .what strong { overflow-wrap: anywhere; }
.review-type { display: flex; align-items: center; gap: .5rem; font-size: .85rem; }
.review-type select { flex: 1; min-width: 0; }
.drop-hint { margin: 0 0 .4rem; }
section.block.drop-on { outline: 3px dashed var(--green); outline-offset: 4px; background: #f3f8f4; }
.homemap { height: 230px; border-radius: 8px; background: #eef3ef; position: relative; z-index: 0; isolation: isolate; cursor: default; }
.homemap .leaflet-interactive { cursor: pointer; }
.homemap .prov-bubble { font-size: .9rem; }
@media (min-width: 1440px) { body.wide .docs-split { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 1rem; align-items: start; }
body.wide .docs-split > .checklist { margin: 0; } }
body.wide .review-row { display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: start; }
.checklist .bar i { background: var(--area); }
/* phone: the buttons go under the text so the label keeps the width */
body:not(.wide) .ck-row { grid-template-columns: 1.6rem minmax(0, 1fr); }
body:not(.wide) .ck-act { grid-column: 2; justify-content: flex-start; }
.tag-edit h3 { margin-top: 1.2rem; }

/* ====================================================================================================================
   0.14.0 visual refresh (Lighton, November 8, 2026; SDD D42; UI-ANALYSIS section 17, P69 to P76)
   Calm surfaces as in Mercury and Stripe: white cards on a soft grey page, a hairline border plus a faint shadow, one
   radius; Inter with tabular figures; line icons (Lucide) instead of emoji; status as tinted pills (Monzo, Stessa);
   a white top bar and sidebar with the brand green kept for the active item and the main action.
   ==================================================================================================================== */
.ico { width: 1.25em; height: 1.25em; flex: none; display: inline-block; vertical-align: -.25em; stroke: currentColor; fill: none;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
button .ico, .button .ico { margin-right: .4rem; }
button.icon .ico, a.icon .ico, .chev .ico, .row-ico .ico, .action-ico .ico, .brand-mark .ico, .act-ico .ico { margin: 0; }
h1, h2, h3, strong, b { letter-spacing: -.01em; }
h2 { font-size: 1rem; font-weight: 600; }
strong, .amt, .strip-cell strong, .stat strong, table.grid .num { font-variant-numeric: tabular-nums; }

/* top bar: white, ink text; the green stays for actions */
#topbar { background: rgba(255, 255, 255, .92); color: var(--ink); box-shadow: none; border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(8px); backdrop-filter: saturate(1.4) blur(8px); padding: 0 .35rem; }
#topbar h1 { font-size: 1.05rem; font-weight: 650; }
#topbar .icon, #search-btn { color: var(--ink); font-size: 1.3rem; }
#topbar .icon .ico, #search-btn .ico { width: 22px; height: 22px; }
.top-link, button.top-link { color: var(--green); }

/* menu (phone) and sidebar (computer) */
#drawer { background: #fff; }
.drawer-head { background: #fff; color: var(--ink); flex-direction: row; align-items: center; gap: .7rem; padding: 1.1rem 1rem .9rem; border-bottom: 1px solid var(--line); }
.drawer-head small { color: var(--muted); font-size: .8rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-head strong { font-size: 1.05rem; }
.brand-text { min-width: 0; display: flex; flex-direction: column; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--green); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.brand-mark .ico { width: 19px; height: 19px; stroke-width: 2.2; }
#drawer a, #drawer > button { display: flex; align-items: center; gap: .75rem; margin: 1px .5rem; padding: .7rem .75rem; border-radius: var(--radius-s); color: #2f3a33; font-weight: 500; font-size: .95rem; }
#drawer a .ico, #drawer > button .ico { width: 20px; height: 20px; color: var(--faint); margin: 0; }
#drawer a:hover { background: #f3f5f3; }
#drawer a.on { background: var(--green-50); color: var(--green); font-weight: 600; }
#drawer a.on .ico { color: var(--green); }
#drawer > button#logout-btn { margin: auto .5rem .5rem; border-top: 0; color: var(--bad); }
#drawer > button#logout-btn .ico { color: var(--bad); }
#drawer hr { border: 0; border-top: 1px solid var(--line); margin: .5rem 1rem; }
a.plan-badge, #drawer a.plan-badge { margin: .6rem .75rem .2rem; padding: .55rem .75rem; border-radius: var(--radius-s); background: linear-gradient(135deg, #eef6f1, #f6f2e6);
  border: 1px solid var(--green-100); color: var(--green); font-size: .85rem; font-weight: 600; gap: .5rem; text-decoration: none; }
a.plan-badge small { margin-left: auto; color: var(--muted); font-weight: 500; font-size: .75rem; }
#drawer a.plan-badge .ico { color: var(--green); width: 17px; height: 17px; }
#drawer a.plan-badge[hidden] { display: none; }

/* cards */
.block, .hero, .stat, .pane, .cal-wrap, .tabs, .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.block { padding: 1rem 1.1rem; margin: 1rem 0; }
.block > h2, .block-head h2 { margin-bottom: .5rem; }
.greet { font-size: 1.4rem; font-weight: 650; letter-spacing: -.02em; margin: .4rem 0 .9rem; }
.chips + div { border: 1px solid var(--line); box-shadow: var(--shadow); }

/* figures: separate tiles of equal height (P69) */
.strip { gap: .6rem; background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.strip-cell { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: .8rem .9rem; gap: .2rem; transition: border-color .15s; }
.strip-cell:hover, .stat:hover { border-color: var(--line-2); }
.strip-cell small, .stat small { font-size: .78rem; color: var(--muted); font-weight: 500; }
.strip-cell strong { font-size: 1.3rem; font-weight: 650; letter-spacing: -.02em; }
.stats { gap: .6rem; margin-top: .6rem; }
.stat { padding: .8rem .6rem; }
.stat strong { font-size: 1.45rem; font-weight: 650; color: var(--ink); letter-spacing: -.02em; }

/* rows: icon tile, text, pill, amount (P70) */
.row { gap: .75rem; padding: .6rem 0; }
.row .what strong { font-weight: 600; }
.row .what small { color: var(--muted); font-size: .84rem; }
.row .amt { font-weight: 650; }
.row .chev { color: var(--faint); display: inline-flex; }
.row-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--green-50); color: var(--green); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.row-ico .ico { width: 18px; height: 18px; }
.row-ico.bad { background: var(--bad-bg); color: var(--bad); } .row-ico.due { background: var(--due-bg); color: var(--due); }
.due-row .when { width: auto; order: 3; }
.due-row .amt { order: 4; min-width: 5.5rem; text-align: right; }
.pill { display: inline-block; font-size: .74rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; white-space: nowrap; }
.pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.due { background: var(--due-bg); color: var(--due); } .pill.paid { background: var(--paid-bg); color: var(--paid); }
.chip { background: var(--green-50); color: var(--green); font-weight: 600; }
.act-ico { display: inline-flex; width: 1.4rem; color: var(--green); vertical-align: -.15em; }
.act-ico .ico { width: 16px; height: 16px; }
.banner { display: flex; align-items: center; gap: .5rem; }

/* property cards (P71): icon tile, name, stage chip */
.pcard { border: 1px solid var(--line); border-left: 1px solid var(--line); box-shadow: var(--shadow); padding: .9rem 1rem; gap: .2rem; transition: border-color .15s, box-shadow .15s; }
.pcard:hover { border-color: var(--line-2); box-shadow: var(--shadow-lg); }
.pcard-top { justify-content: flex-start; gap: .65rem; margin-bottom: .2rem; }
.pcard-top strong { flex: 1; min-width: 0; }
.pcard small { color: var(--muted); }

/* buttons and fields (P72) */
button, .button { border: 1px solid var(--line-2); color: var(--ink); background: #fff; border-radius: var(--radius-s); font-weight: 600; box-shadow: 0 1px 1px rgba(16,24,20,.04); transition: background .15s, border-color .15s; }
button:hover, .button:hover { border-color: #b9c2bb; background: #fafbfa; }
button.primary, .button.primary { background: var(--green); border-color: var(--green); color: #fff; }
button.primary:hover, .button.primary:hover { background: var(--green-2); border-color: var(--green-2); }
button.small, label.small { border-color: var(--line-2); color: var(--ink); }
button.small.primary { border-color: var(--green); }
button.danger { border-color: #f0c4c0; color: var(--bad); }
button.icon, button.icon:hover, button.link, .tag-x, .seg button, .cal button.sel { box-shadow: none; }
button.icon:hover { background: rgba(0,0,0,.04); border-color: transparent; }
button.link, button.small.link, button.small-link { background: none; }
input, select, textarea { border: 1px solid var(--line-2); border-radius: var(--radius-s); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(46, 122, 82, .18); }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(46, 122, 82, .35); outline-offset: 2px; }
label { color: #3a463e; font-weight: 500; }
.tabs { padding: 4px; gap: 4px; }
.tabs a { border-radius: var(--radius-s); border-bottom: 0; padding: .55rem 0; }
.tabs a.on { background: var(--green-50); }
.seg button.on, .chip-btn.on { background: var(--green); }

/* add sheet (P73): icon tiles */
.action { gap: .35rem; min-height: 96px; border-radius: var(--radius); box-shadow: none; padding: .8rem; }
.action:hover { border-color: var(--green-100); background: #fbfdfc; }
.action-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--green-50); color: var(--green); display: inline-flex; align-items: center; justify-content: center; }
.action-ico .ico { width: 18px; height: 18px; }
.sheet-body { border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg); }
@media (min-width: 700px) { .sheet-body { border-radius: 20px; } }
#sheet-close .ico { width: 20px; height: 20px; }
#scrim { background: rgba(16, 24, 20, .4); }
#toast { background: #17211b; border-radius: 12px; box-shadow: var(--shadow-lg); }

/* phone: tab bar with an active pill behind the icon (Material 3, Monzo), "+" in brand green */
#tabbar { background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
#tabbar a { gap: .15rem; font-weight: 500; font-size: .72rem; }
#tabbar a span { filter: none; opacity: 1; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 30px; border-radius: 999px; transition: background .15s; }
#tabbar a span .ico { width: 21px; height: 21px; margin: 0; }
#tabbar a.on { color: var(--green); font-weight: 650; }
#tabbar a.on span { background: var(--green-50); }
#fab { background: var(--green); border-radius: 18px; width: 56px; height: 56px; box-shadow: 0 6px 16px rgba(31, 90, 61, .35); }
#fab .ico { width: 26px; height: 26px; margin: 0; stroke-width: 2.2; }
#fab:hover { background: var(--green-2); }

/* sign-in */
#auth { background: radial-gradient(1200px 600px at 10% -10%, #dcefe3 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #f3ead2 0%, transparent 55%), var(--bg); }
#auth .card { border-radius: 20px; padding: 1.6rem 1.5rem; box-shadow: var(--shadow-lg); }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em; }
.brand .brand-mark { width: 40px; height: 40px; border-radius: 12px; }

/* tables (Stripe): quieter headings, roomier rows */
table.grid th { border-bottom: 1px solid var(--line); }
table.grid th button { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); box-shadow: none; border-radius: 0; }
table.grid th button:hover { background: none; color: var(--ink); }
table.grid td { padding: .7rem .6rem; }
table.grid tbody tr:hover, table.grid tbody tr:focus { background: #f6f8f6; }
.pane-row.on { background: var(--green-50); }
.pane-row:hover, body.wide #drawer a:hover { background: #f3f5f3; }

/* computer layout (P74): white sidebar beside the page; Home on one grid, map top-aligned with the figures */
body.wide #drawer { border-right: 1px solid var(--line); }
body.wide .drawer-head { height: auto; padding: 1rem 1rem .9rem; justify-content: flex-start; }
body.wide #drawer a { padding: .6rem .75rem; min-height: 40px; }
body.wide #drawer > button#side-add { margin: .9rem .75rem .6rem; border-radius: var(--radius-s); padding: .65rem 1rem; justify-content: center; box-shadow: 0 2px 6px rgba(31, 90, 61, .25); }
body.wide #drawer > button#side-add .ico { color: #fff; width: 18px; height: 18px; }
body.wide #view { padding: 1.5rem 2rem 3rem; }
body.wide .greet { margin-top: 0; }
body.wide .home-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 30%); gap: 1rem; align-items: start; }
body.wide .home-main > .strip:first-child, body.wide .home-main > :first-child { margin-top: 0; }
body.wide .home-split > .home-map { position: sticky; top: calc(56px + 1.5rem); margin: 0; }
body.wide .home-split .homemap { height: 340px; }
@media (min-width: 1440px) {
  body.wide .home-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 1rem; align-items: stretch; }
  body.wide .home-main > * { grid-column: 1 / -1; }
  body.wide .home-main > section.block { grid-column: auto; margin-bottom: 0; }
}
.homemap { background: #eef4f0; border-radius: var(--radius-s); }
.home-map .hint { margin-bottom: 0; }
#drawer > button#logout-btn { justify-content: flex-start; border: 0; background: none; box-shadow: none; font-weight: 500; }
#drawer > button#logout-btn:hover { background: var(--bad-bg); }
@media (min-width: 1440px) { body.wide .home-split .homemap { height: 400px; } }
.home-map .block-head a { white-space: nowrap; }
.home-map .block-head h2 { min-width: 0; }
.pill.open { background: #eef1ee; color: var(--muted); }
table.grid .pill { font-size: .74rem; }
table.grid .pill.bad, table.grid .pill.due { font-weight: 600; }
.action { justify-content: flex-start; }

/* 0.15.0: Map of all properties (Lighton's comment on 0.14.0): light map, a Map | Satellite switch, list rows in the 0.14.0 style */
.map-seg.leaflet-control { box-shadow: var(--shadow); border-color: var(--line); }
.map-seg button { min-height: 32px; padding: .3rem .85rem; font-weight: 500; }
.map-light .leaflet-tooltip.prov-name { color: #6b7a71; text-shadow: none; font-weight: 500; }
.map-light .leaflet-tooltip.prov-label { border: 1px solid var(--line); }
.map-light .map-note { border: 1px solid var(--line); }
.map-note { border-radius: 999px; padding: .3rem .75rem; box-shadow: var(--shadow); }
.map-split .pane-row { flex-direction: row; align-items: center; gap: .65rem; padding: .6rem .8rem; }
.map-split .pane-row .what { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.map-split .pane-row .what strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.map-split .pane-row small { color: var(--muted); display: flex; align-items: center; gap: .4rem; }
.map-split .pane-row .pill { font-size: .7rem; padding: .05rem .5rem; }
.map-split .pane-row a.chev { color: var(--muted); display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; flex: none; }
.map-split .pane-row a.chev:hover { background: var(--green-50); color: var(--green); }
.pane-head .pill-btn { border: 1px solid #cfdcd4; border-radius: 999px; padding: .2rem .7rem; }
.leaflet-container.map-light { background: #efefef; }
.leaflet-popup-content a { color: var(--green); font-weight: 600; text-decoration: none; }

/* 0.15.0: admin area (FR-35 to FR-39, SDD D43): its own links in the sidebar and menu; the owner's screens hidden */
body:not(.admin) .admin-only { display: none !important; }
body.admin #drawer a[data-nav]:not(.admin-only), body.admin #drawer hr, body.admin #side-add, body.admin #plan-badge,
body.admin #tabbar, body.admin #fab, body.admin #search-btn, body.admin #sync-badge { display: none !important; }
.admin-page { max-width: 1400px; }
.admin-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-top: .75rem; }
.admin-tile { background: var(--card); border-radius: var(--radius); padding: .75rem .9rem; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: .1rem; border: 1px solid var(--line); }
.admin-tile .lbl { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--muted); }
.admin-tile .lbl .ico { width: 16px; height: 16px; color: var(--green); }
.admin-tile strong { font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.admin-tile small { color: var(--muted); font-size: .78rem; }
a.admin-tile:hover { border-color: #cfdcd4; }
.adminmap { height: 300px; background: transparent; }
.adminmap.leaflet-container { background: transparent; }
.prov-count span { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--green); color: #fff; font-weight: 600; font-size: .8rem; box-shadow: 0 0 0 2px #fff; }
.district-list h3 { font-size: .85rem; margin: .6rem 0 .2rem; color: var(--muted); font-weight: 600; }
.district-row, .health-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.district-row small { color: var(--muted); }
.health-row .val { display: flex; align-items: center; gap: .5rem; color: var(--muted); text-align: right; }
.admin-gate { max-width: 440px; margin: 1.5rem auto; display: flex; flex-direction: column; gap: .6rem; padding: 1.4rem; }
.admin-gate .gate-ico { width: 48px; height: 48px; border-radius: 14px; background: var(--green-50); color: var(--green); display: inline-flex; align-items: center; justify-content: center; }
.admin-gate .gate-ico .ico { width: 26px; height: 26px; }
.admin-gate input[name=code] { font-size: 1.4rem; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
.admin-gate .qr { display: block; margin: .4rem auto; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.admin-gate .key { display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.admin-gate .key code { font-size: .95rem; text-align: center; overflow-wrap: anywhere; }
.row small.muted, small.muted { color: var(--muted); }
table.grid td.num, table.grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
.invite-form .primary .ico { width: 16px; height: 16px; vertical-align: -3px; }
#top-action .pill-btn { display: inline-flex; align-items: center; gap: .3rem; background: #fff; cursor: pointer; font: inherit; font-size: .85rem; color: var(--green); }
#top-action .pill-btn .ico { width: 15px; height: 15px; }
body.wide .admin-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body.wide .admin-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, 1fr); gap: .9rem; align-items: start; }
body.wide .admin-grid .block { margin-top: .9rem; }
body.wide .adminmap { height: 420px; }
body.wide .admin-two { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(0, 1.4fr); gap: .9rem; align-items: start; }

/* 0.15.1: show or hide a password; a second field to confirm a new one (Lighton, November 8, 2026) */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 2.8rem; }
.pw-eye { position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none;
  color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 8px; box-shadow: none; padding: 0; min-height: 0; }
.pw-eye:hover { color: var(--green); background: var(--green-50); }
.pw-eye .ico { width: 18px; height: 18px; margin: 0; }
/* 0.16.0: admin second step on a phone (Lighton's comment) */
.admin-gate .gate-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: .3rem 0; }
.admin-gate .gate-actions > * { min-height: var(--tap); display: inline-flex; align-items: center; gap: .35rem; }
.admin-gate .gate-qr summary { cursor: pointer; color: var(--muted, #5b6b62); font-size: .9rem; min-height: var(--tap); display: flex; align-items: center; justify-content: center; }
/* 0.16.0: admin accounts and reports (FR-41 to FR-43; SDD D44), 0.14.0 tokens */
.admin-filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .75rem 0; }
.admin-filter .search-box, .admin-filter .filter-box { display: flex; align-items: center; gap: .35rem; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 0 .55rem; min-height: var(--tap); }
.admin-filter .search-box { flex: 1 1 220px; }
.admin-filter .filter-box { flex: 1 1 140px; }
.admin-filter .search-box input, .admin-filter .filter-box select { border: 0; background: none; outline: none; min-height: 40px; font: inherit; width: 100%; padding: 0; }
.admin-filter .ico { width: 18px; height: 18px; color: var(--muted); flex: none; }
.admin-filter > button { min-height: var(--tap); display: inline-flex; align-items: center; gap: .35rem; }
.admin-filter > button .ico { color: inherit; }
.link-box code { word-break: break-all; font-size: .85rem; background: var(--green-50); padding: .5rem .6rem; border-radius: var(--radius-s); display: block; user-select: all; }
.back-link { display: inline-flex; align-items: center; gap: .2rem; margin: .5rem 0; min-height: var(--tap); }
.user-page .kv { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.user-page .kv small { color: var(--muted); }
.user-page .kv > span { text-align: right; overflow-wrap: anywhere; }
.user-page .pills { display: flex; flex-wrap: wrap; gap: .3rem; }
.use-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.use-cell { background: var(--bg); border-radius: var(--radius-s); padding: .55rem .7rem; display: flex; flex-direction: column; }
.use-cell strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.use-cell small { color: var(--muted); }
.action-row { display: flex; align-items: center; gap: .65rem; width: 100%; min-height: var(--tap); background: none; border: 0; border-top: 1px solid var(--line); font: inherit; color: var(--ink); text-align: left; cursor: pointer; padding: .3rem 0; }
.action-row span { flex: 1; }
.action-row .ico { width: 18px; height: 18px; color: var(--green); }
.action-row .ico:last-child { color: var(--faint); }
.action-row.danger, .action-row.danger .ico:first-child { color: var(--bad); }
.row.compact { min-height: 44px; }
body.wide .user-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .9rem; align-items: start; }
body.wide .use-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.reports .block-head .csv { display: inline-flex; align-items: center; gap: .25rem; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: .5rem; overflow-x: auto; }
.bar-group { flex: 0 0 56px; display: flex; flex-direction: column; align-items: stretch; height: 100%; gap: 4px; }
.bar-pair { flex: 1; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--line-2); }
.bar-pair .bar { flex: 1; border-radius: 4px 4px 0 0; min-height: 2px; }
.bar.s1, .sw.s1 { background: var(--s1); } .bar.s2, .sw.s2 { background: var(--s2); }
.bar-group small { color: var(--muted); font-size: .72rem; text-align: center; white-space: nowrap; }
.legend { display: flex; gap: 1rem; font-size: .82rem; color: var(--muted); margin-top: .5rem; }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.meter { margin: .55rem 0; }
.meter-top { display: flex; justify-content: space-between; font-size: .9rem; }
.meter-track { height: 8px; background: #eef0ee; border-radius: 4px; margin-top: .25rem; overflow: hidden; }
.meter-track span { display: block; height: 100%; background: var(--green-2); border-radius: 4px; }
body.wide .report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; align-items: start; }
.closing-banner { display: flex; gap: .5rem; align-items: flex-start; background: var(--due-bg); color: var(--due); border-radius: var(--radius-s); padding: .7rem .85rem; margin: .5rem 0 .75rem; }
.closing-banner .ico { flex: none; width: 18px; height: 18px; margin-top: .1rem; }
.closing-banner a { color: inherit; font-weight: 600; }
/* 0.16.1: Excel and PDF downloads, custom reports (FR-44; Lighton's comments on 0.16.0) */
.report-tabs a { display: inline-flex; align-items: center; padding: .35rem .85rem; min-height: 36px; color: var(--ink); text-decoration: none; font-size: .85rem; }
.report-tabs a.on { background: var(--green); color: #fff; font-weight: 600; }
.file-btns { display: inline-flex; gap: .4rem; flex-wrap: wrap; }
.file-btns > a, .file-btns > button { display: inline-flex; align-items: center; gap: .3rem; min-height: 36px; padding: .3rem .75rem; font-size: .85rem; }
.reports .admin-filter .file-btns { margin-left: auto; }
.reports .dl { display: inline-flex; gap: .7rem; }
.custom-grid { display: flex; flex-direction: column; gap: .75rem; }
body.wide .custom-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: .9rem; align-items: start; }
.custom-side fieldset.cols { border: 0; padding: 0; margin: 0 0 .5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0 .5rem; }
.custom-side label.check { margin-top: 0; }
.custom-side legend { font-size: .85rem; color: var(--muted); margin-bottom: .2rem; }
.custom-side .check { min-height: 36px; display: flex; align-items: center; gap: .35rem; }
.custom-side label { display: block; margin-top: .45rem; }
.custom-actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: space-between; margin: .3rem 0 .6rem; }
.custom-preview tfoot td { font-weight: 600; border-top: 2px solid var(--line-2); }
.saved-row { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.chip-btn.saved { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); overflow: hidden; }
.chip-btn.saved button { border: 0; background: none; font: inherit; font-size: .85rem; padding: .3rem .6rem; min-height: 36px; cursor: pointer; }
.chip-btn.saved button.x { padding: .3rem .45rem; color: var(--faint); }
.chip-btn.saved .ico { width: 14px; height: 14px; }
/* 0.16.2: pages and "Show more" (Lighton's comments on 0.16.1) */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .6rem; font-size: .85rem; }
.pager select { min-height: 36px; border: 1px solid var(--line-2); border-radius: var(--radius-s); background: var(--card); padding: 0 .4rem; font: inherit; }
.pager .pg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-2); border-radius: var(--radius-s); overflow: hidden; margin-left: auto; background: var(--card); }
.pager .pg button { border: 0; border-left: 1px solid var(--line); background: none; font: inherit; min-width: 40px; min-height: 40px; padding: 0 .6rem; cursor: pointer; color: var(--ink); }
.pager .pg button:first-child { border-left: 0; }
.pager .pg button.on { background: var(--green); color: #fff; font-weight: 600; }
.pager .pg button:disabled { color: var(--faint); cursor: default; }
.pager .gap { padding: 0 .4rem; align-self: center; color: var(--faint); }
.more-btn { margin-top: .6rem; }

/* 0.17.0: support and operations (SDD D47): banners, passkey gate, support cards, alerts badge */
.notice-banner { display: flex; gap: .5rem; align-items: flex-start; border-radius: var(--radius-s); padding: .6rem .7rem .6rem .85rem; margin: .5rem 0 .75rem;
  background: var(--paid-bg); color: var(--paid); font-size: .92rem; }
.notice-banner.maintenance { background: var(--due-bg); color: var(--due); }
.notice-banner.warning { background: var(--bad-bg); color: var(--bad); }
.notice-banner > .ico { flex: none; width: 18px; height: 18px; margin-top: .15rem; }
.notice-banner > span { flex: 1; }
.notice-banner .notice-x { min-width: 36px; min-height: 36px; margin: -.4rem -.3rem -.4rem 0; color: inherit; }
#auth-notices .notice-banner { margin: 0 0 .75rem; }
#auth-notices:empty { display: none; }
.passkey-gate { text-align: center; align-items: center; }
.passkey-gate button.primary { width: 100%; }
.gate-alt { max-width: 440px; margin: 0 auto 1.5rem; }
.gate-alt > summary { cursor: pointer; color: var(--green); font-weight: 600; padding: .6rem 0; min-height: var(--tap); text-align: center; list-style: none; }
.gate-alt > summary::-webkit-details-marker { display: none; }
.gate-alt .admin-gate { margin-top: .25rem; }
.support-card { border: 1px solid var(--due); }
.support-card h2 { display: flex; align-items: center; gap: .4rem; }
.support-banner { background: var(--paid-bg); color: var(--paid); }
.passkey-nudge { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; margin-bottom: .75rem; }
.passkey-nudge .what { flex: 1; display: flex; flex-direction: column; }
button.small-link.danger-link { color: var(--bad); margin-left: .6rem; }
label.check.muted { color: var(--faint); }
.nav-count { margin-left: auto; min-width: 20px; height: 20px; border-radius: 10px; background: var(--bad); color: #fff; font-size: .75rem; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 .35rem; }
.settings-page .row select { max-width: 11rem; }
.row-actions { display: flex; gap: .2rem; }
.row-actions .danger-link { margin-left: .8rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn-row > button { flex: 1 1 10rem; }
.settings-page .row .what small { white-space: normal; }

/* data protection (0.18.0; FR-53 to FR-55; SDD D48): tabs, deadline clock, request kinds */
.dp-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0 .25rem; }
a.pill-link { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--line-2);
  background: #fff; color: var(--ink); text-decoration: none; font-size: .88rem; font-weight: 600; }
a.pill-link .ico { width: 16px; height: 16px; color: var(--green); }
a.pill-link.on { background: var(--green-50); border-color: var(--green-100); color: var(--green); }
.dp-clock { display: flex; align-items: center; gap: .5rem; border-radius: var(--radius-s); padding: .6rem .75rem; margin: .5rem 0 .75rem; font-weight: 600; font-size: .92rem; }
.dp-clock .ico { width: 18px; height: 18px; flex: none; }
.dp-clock.ok { background: var(--green-50); color: var(--green); } .dp-clock.due { background: var(--due-bg); color: var(--due); } .dp-clock.bad { background: var(--bad-bg); color: var(--bad); }
.dp-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.dp-actions > * { min-height: var(--tap); display: inline-flex; align-items: center; gap: .35rem; }
.dp-detail .linked-row .what small { color: var(--muted); }
.dp-detail .linked-row .what strong { font-weight: 500; white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; margin: 0 0 .5rem; }
.admin-tiles.two strong { font-size: 1.05rem; }
.dp-self { display: flex; gap: .5rem; align-items: flex-start; background: var(--green-50); border-radius: var(--radius-s); padding: .6rem .75rem; font-size: .9rem; margin-bottom: .6rem; }
.dp-self .ico { width: 18px; height: 18px; color: var(--green); flex: none; margin-top: .1rem; }
fieldset.dp-kinds, form fieldset { border: 0; padding: 0; margin: .3rem 0 .6rem; }
fieldset legend { font-size: .88rem; font-weight: 600; margin-bottom: .3rem; }
label.dp-kind { display: flex; align-items: center; gap: .6rem; min-height: var(--tap); border-top: 1px solid var(--line); font-size: .93rem; cursor: pointer; }
label.dp-kind input { width: 20px; height: 20px; margin: 0; flex: none; order: 3; margin-left: auto; }
label.dp-kind .ico { width: 18px; height: 18px; color: var(--green); flex: none; }
.check-list label.check { min-height: 36px; margin: .1rem 0; }
details.dp-act { border-top: 1px solid var(--line); padding: .55rem 0; }
details.dp-act summary { cursor: pointer; min-height: var(--tap); display: flex; flex-direction: column; justify-content: center; gap: .1rem; }
details.dp-act p { margin: .35rem 0; font-size: .9rem; overflow-wrap: anywhere; }
table.dp-record td { vertical-align: top; font-size: .86rem; } table.dp-record td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.grid.click tbody tr { cursor: pointer; }
/* 0.18.0 (BACKLOG, FR-30): on a phone the map attribution wraps to two lines; lift the notes above it and make it smaller */
body:not(.wide) .leaflet-control-attribution { font-size: 10px; line-height: 1.3; }
body:not(.wide) .leaflet-bottom.leaflet-left .map-notes { margin-bottom: 2.6rem; }
#top-action .pill-btn + .pill-btn { margin-left: .4rem; }
body:not(.wide) #top-action .lbl-wide { display: none; }

/* 0.19.0: modules per account (FR-56 to FR-59; SDD D49) */
.switch { position: relative; width: 48px; min-width: 48px; height: 28px; border-radius: 999px; border: 0; padding: 0; background: var(--line-2); cursor: pointer; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s; }
.switch[aria-checked="true"] { background: var(--green-2); } .switch[aria-checked="true"]::after { left: 23px; }
.switch:disabled { opacity: .5; cursor: default; }
.switch-hit { min-height: var(--tap); display: flex; align-items: center; }
.module-row .row-ico.on { background: var(--green-50); color: var(--green); }
.module-row .what small { white-space: normal; }
.module-wait { margin: 0 0 6px 52px; }
.mod-set { border-top: 1px solid var(--line); } .mod-set .row { border: 0; } .mod-set select { width: auto; min-height: var(--tap); }
.plan-checks { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 0 0 10px 52px; } .plan-checks small { width: 100%; }
.plan-grid { width: 100%; border-collapse: collapse; font-size: .92rem; } .plan-grid th, .plan-grid td { padding: 8px 6px; text-align: left; border-top: 1px solid var(--line); }
.plan-grid th { color: var(--muted); font-weight: 500; } .plan-grid td.c, .plan-grid th.c { text-align: center; }
.plan-grid select { min-height: 36px; }

/* Rentals, part 1 (0.20.0; FR-60 to FR-64; UI-ANALYSIS section 24) */
.chips.wrap { flex-wrap: wrap; overflow: visible; }
a.chip-btn { display: inline-flex; align-items: center; text-decoration: none; min-height: var(--tap); }
.amt-col { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; }
a.row-card { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); min-height: var(--tap); }
a.row-card .what { flex: 1; min-width: 0; display: flex; flex-direction: column; }
a.row-card .what small { color: var(--muted); }
.row-btn-flat { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; text-align: left; cursor: pointer; }
fieldset.checks { border: 1px solid var(--line); border-radius: var(--radius-s); padding: .3rem .8rem; margin: .6rem 0; }
fieldset.checks legend { font-size: .88rem; padding: 0 .3rem; }
fieldset.checks label.check { display: inline-flex; margin: .2rem 1rem .2rem 0; min-height: 36px; align-items: center; }
.cond { display: flex; flex-direction: column; }
.cond-row { display: grid; grid-template-columns: 1fr 6.2rem; gap: .3rem .5rem; padding: .45rem 0; border-bottom: 1px solid var(--line); align-items: center; }
.cond-row .cond-item { font-size: .9rem; }
.cond-row input { grid-column: 1 / -1; }
body.wide .cond-row { grid-template-columns: 1fr 7rem 1.2fr; }
body.wide .cond-row input { grid-column: auto; }
.notice { border-bottom: 1px solid var(--line); padding: .5rem 0; }
.notice:last-child { border-bottom: 0; }
.notice p { margin: .2rem 0; }
.row .row-actions { display: flex; gap: .2rem; align-items: center; }

/* Tenant view (0.20.2; FR-64a): an account that only rents sees Your rental and Account, not the owner's tools */
.tenant-tab, .tenant-own { display: none !important; }
body.tenant-view .tenant-tab { display: flex !important; }
body.tenant-view .tenant-own { display: block !important; color: var(--muted) !important; font-size: .88rem; margin-top: .6rem; }
body.tenant-view #tabbar a:not(.tenant-tab), body.tenant-view #drawer a:not([data-tenant]):not(.admin-only),
body.tenant-view #search-btn, body.tenant-view #fab, body.tenant-view #side-add, body.tenant-view #plan-badge { display: none !important; }
body.tenant-view #renting-link { display: block !important; }
/* 0.21.0: notice "queries by" rows, tenant history box */
fieldset.ways .way-row { display: grid; grid-template-columns: 8.5rem 1fr; gap: .5rem; align-items: center; }
fieldset.ways .way-row label.check { margin: .15rem 0; }
fieldset.ways .way-row input[type="tel"], fieldset.ways .way-row input[type="email"] { min-height: 40px; }
.hero.slim { padding: .7rem .9rem; margin-bottom: .6rem; }
.hero.slim .list { margin-top: .4rem; }
.muted { color: var(--muted); font-weight: 400; }
/* 0.21.0: buildings and units, charges, the tenant's property */
.unit-group { margin-top: .6rem; }
.unit-group-head { display: flex; align-items: baseline; gap: .5rem; padding: .3rem 0; }
.unit-group-head small { color: var(--muted); flex: 1; }
.unit-group-head .pill-btn { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; } /* 0.25.2 (FR-99) */
.units-map, .place-map { height: 220px; }
.pick-map { height: 220px; margin: .3rem 0; }
fieldset.units label.check.unit-pick { display: flex; width: 100%; margin: .15rem 0; align-items: flex-start; }
fieldset.units label.unit-pick span { display: flex; flex-direction: column; }
fieldset.units label.unit-pick small { color: var(--muted); }
fieldset.units > button { margin: .3rem 0 .4rem; }
.charge-row { border: 1px solid var(--line); border-radius: var(--radius-s); padding: .3rem .7rem .5rem; margin: .5rem 0; }
.total-box { background: var(--card); border-radius: var(--radius-s); padding: .5rem .8rem; margin: .7rem 0; }
.total-box > div, .due-lines > div { display: flex; justify-content: space-between; gap: 1rem; padding: .15rem 0; }
.total-box .total { font-weight: 600; border-top: 1px solid var(--line); margin-top: .2rem; padding-top: .3rem; }
details.due summary { cursor: pointer; font-weight: 600; }
.due-lines { font-size: .9rem; margin-top: .3rem; }
.due-lines .muted span:last-child { font-style: italic; }
.row-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.chips.wrap { flex-wrap: wrap; }
.row .pill { max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.block-head:has(.row-actions) { flex-wrap: wrap; gap: .4rem; }
.block-head .row-actions .small { white-space: nowrap; }
.due-lines, .due-lines span { color: var(--ink); font-weight: 400; }
.due-lines .muted span { color: var(--muted); }
/* full-screen building drawing (0.22.0) */
.draw-overlay { position: fixed; inset: 0; z-index: 3000; background: #fff; display: flex; flex-direction: column; }
.draw-head { padding: .6rem .9rem; display: flex; flex-direction: column; gap: .15rem; border-bottom: 1px solid var(--line, #e3e7e4); }
.draw-map { flex: 1; min-height: 0; position: relative; isolation: isolate; }
.draw-msg { margin: 0; padding: .4rem .9rem; font-size: .9rem; }
.draw-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; padding: .5rem .9rem calc(.6rem + var(--safe-b, 0px)); }
.draw-bar button { min-height: 44px; }
/* ledger, proofs, reports (0.22.0) */
.owed { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .6rem; margin: .2rem 0 .3rem; }
.owed small { width: 100%; color: var(--muted); }
.owed strong { font-size: 1.6rem; color: var(--ink); }
.owed span { color: var(--muted); font-size: .9rem; }
.ledger-actions { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: .5rem; margin: .5rem 0; }
.ledger-actions button { padding-left: .5rem; padding-right: .5rem; }
.proof-wait { border: 1px solid var(--due, #d9822b); border-radius: var(--radius); padding: .5rem .6rem; margin: .5rem 0; }
.amt.in { color: var(--green); }
.amt-col small.muted { display: block; font-size: .75rem; color: var(--muted); text-align: right; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.row-actions.wrap { flex-wrap: wrap; margin-top: .5rem; }
.report-bar { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: end; margin: .25rem 0 .5rem; }
.report-bar label { display: flex; flex-direction: column; font-size: .85rem; color: var(--muted); }
.report-bar input, .report-bar select { min-height: 40px; }
.stats.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 420px) { .stats.four { grid-template-columns: repeat(2, 1fr); } .ledger-actions { grid-template-columns: 1fr 1fr; } .ledger-actions .primary { grid-column: 1 / -1; } }
details.receipts summary { cursor: pointer; padding: .5rem 0; font-weight: 600; }
table.grid th .th { display: block; padding: .6rem; color: var(--muted); font-weight: 600; white-space: normal; }
table.grid th.num .th { text-align: right; }
.row .amt-col { flex-shrink: 0; } .row .amt-col .pill { max-width: none; }  /* 0.22.2: the status pill in a row is never cut to "O…" */

/* 0.23.0: drawing guide (Lighton's comment on 0.22.0) and the Vault opt-in list */
.draw-steps { margin: .2rem 0 0 1.1rem; padding: 0; font-size: .88rem; color: var(--muted, #5b665f); }
.draw-guide { position: absolute; top: .6rem; left: 50%; transform: translateX(-50%); z-index: 500; pointer-events: none; background: rgba(38,48,40,.88);
  color: #fff; padding: .35rem .8rem; border-radius: 999px; font-size: .9rem; white-space: nowrap; }
.plain-list { margin: .2rem 0 .8rem 1.2rem; line-height: 1.6; }
div.field { display: block; margin: .55rem 0; font-size: .88rem; color: #3a463e; font-weight: 500; }

/* 0.23.0: messages per tenancy (FR-79), WhatsApp invitation (FR-81) */
.thread { display: flex; flex-direction: column; gap: .45rem; max-height: 420px; overflow-y: auto; padding: .3rem 0; }
.bubble { max-width: 85%; background: var(--bg, #f4f6f4); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: .45rem .7rem; }
.bubble.mine { align-self: flex-end; background: #e7f3ec; border-color: #cfe5d8; border-radius: 14px 14px 4px 14px; }
.bubble p { margin: 0 0 .2rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble small { color: var(--muted); font-size: .76rem; }
.bubble-file { display: inline-flex; align-items: center; gap: .3rem; font-size: .88rem; margin: .1rem 0 .2rem; overflow-wrap: anywhere; }
.thread-event { align-self: center; text-align: center; font-size: .82rem; color: var(--muted); margin: .1rem 0; max-width: 92%; }
.thread-event .ico { width: 14px; height: 14px; vertical-align: -2px; }
.composer { border: 1px solid var(--line); border-radius: 12px; padding: .4rem; margin-top: .5rem; }
.composer textarea { border: 0; width: 100%; resize: vertical; min-height: 44px; margin: 0; }
.composer-bar { display: flex; align-items: center; gap: .5rem; }
.composer-bar small { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-bar .primary { margin-left: auto; }
.count-badge { display: inline-flex; align-items: center; gap: .2rem; font-size: .78rem; font-weight: 600; color: #fff; background: var(--green, #1f5c3f); border-radius: 999px; padding: .05rem .45rem; flex: none; }
.count-badge .ico { width: 13px; height: 13px; }
.qr { display: flex; justify-content: center; margin: .4rem 0; }
.qr svg { width: 200px; height: 200px; }
.qr-code { text-align: center; font-size: 1.3rem; font-weight: 600; letter-spacing: .06em; margin: .2rem 0 .6rem; }
.messages .err:empty { display: none; }

/* 0.24.0: property managers (FR-85 to FR-90) */
.acting-banner { display: flex; gap: .55rem; align-items: center; background: #e8f0fb; color: #1d4f91; border-radius: var(--radius-s); padding: .55rem .8rem; margin: .25rem 0 .75rem; }
.acting-banner .ico { flex: none; width: 18px; height: 18px; }
.acting-banner span { flex: 1; min-width: 0; }
.acting-banner button { flex: none; }
label.check.indent { margin-left: 2rem; min-height: 0; }
.bubble small.bubble-who { display: block; font-weight: 600; margin: 0 0 .15rem; }

/* 0.24.1 (FR-92): roles under the name; "Managing for" stands out while a manager works for a landlord */
.brand-text .roles { color: var(--muted); font-size: .74rem; line-height: 1.25; white-space: normal; }
.brand-text .roles.acting { color: var(--accent, #1f5f46); font-weight: 600; }
body.tenant-view.no-rental .tenant-tab[data-nav="renting"] { display: none !important; }
/* 0.24.1: the stage on the edit screen; the "let as land" note (FR-91) */
.field-like { display: flex; flex-direction: column; gap: .35rem; margin: .2rem 0 .6rem; }
.field-like > .label { font-size: .85rem; font-weight: 600; }
.stage-now { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.land-note { background: var(--due-bg); color: var(--due); border-radius: var(--radius-s); padding: .6rem .8rem; margin: .4rem 0 .8rem; }
.land-note p { margin: 0 0 .4rem; }
/* 0.25.0: faults (FR-95 to FR-97) */
.fstep { display: flex; gap: 4px; margin: .6rem 0; }
.fstep span { flex: 1; text-align: center; font-size: .74rem; padding: .3rem 0; border-radius: 999px; background: var(--bg-2, #f1f3f2); color: var(--muted); }
.fstep span.done { background: var(--paid-bg); color: var(--paid); font-weight: 600; }
.fstep span[aria-current="step"] { outline: 1.5px solid var(--paid); }
.fdesc { margin: .4rem 0; padding: .5rem .8rem; border-left: 3px solid var(--line); border-radius: 0; color: var(--ink, inherit); }
.fphotos { display: flex; gap: 6px; flex-wrap: wrap; margin: .4rem 0; }
.fphotos img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.ftime { list-style: none; padding: 0; margin: .3rem 0; }
.ftime li { border-left: 2px solid var(--line); padding: .15rem 0 .5rem .7rem; margin-left: .3rem; }
.ftime li p { margin: .15rem 0 0; font-size: .9rem; }
.fcats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: .4rem 0 1rem; }
.fcat { display: flex; align-items: center; gap: .5rem; text-align: left; padding: .65rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: .88rem; min-height: 48px; }
.fcat[aria-pressed="true"] { border-color: var(--paid); background: var(--paid-bg); color: var(--paid); font-weight: 600; }
.furg { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; }
.furg small { color: var(--muted); }
details.fcard { border-bottom: 1px solid var(--line); padding: .4rem 0; }
details.fcard summary { display: flex; align-items: center; gap: .6rem; cursor: pointer; list-style: none; }
details.fcard summary::-webkit-details-marker { display: none; }
.trade-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 .8rem; }
details.fcard summary .what { display: flex; flex-direction: column; flex: 1; min-width: 0; }
button.row .what { text-align: left; }

/* 0.26.0 (FR-101): notices to tenants */
.notice-pill { display: inline-flex; align-items: center; gap: .25rem; margin-bottom: .25rem; }
.notice-pill .ico { width: 13px; height: 13px; }
.notice-body { white-space: pre-wrap; margin: .6rem 0 0; }
/* Build, part 1 (0.27.0; FR-103 to FR-106) */
.pick { display: flex; flex-wrap: wrap; gap: .4rem; }
.pick label { position: relative; margin: 0; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick span { display: inline-flex; align-items: center; min-height: 36px; padding: .3rem .85rem; border-radius: 999px; border: 1px solid #c9cfca; background: #fff; font-size: .85rem; font-weight: 500; cursor: pointer; }
.pick input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.pick input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.estimate-total { font-size: 2rem; font-weight: 700; letter-spacing: -.01em; margin: .2rem 0; }
.estimate-sec > summary { display: flex; justify-content: space-between; align-items: center; gap: .6rem; cursor: pointer; font-weight: 600; list-style: none; padding: .2rem 0; }
.estimate-sec > summary::-webkit-details-marker { display: none; }
.estimate-sec > summary::after { content: "›"; color: var(--muted); transform: rotate(90deg); transition: transform .15s; }
.estimate-sec[open] > summary::after { transform: rotate(-90deg); }
.estimate-sec .amt { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.stale-dot { color: #a3501f; }
.money-facts dd { text-align: right; font-variant-numeric: tabular-nums; }
/* 0.27.1: the satellite picture chooser on drawing maps */
.imagery-dates select { font: inherit; font-size: 13px; padding: .3rem .5rem; border-radius: 8px; border: 1px solid var(--line, #d6ddd8); background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); max-width: 15rem; }
/* 0.28.0: repairs under the lease, instalment plans, the tenant's warning */
.whose:empty { display: none; }
.rep-list .rep-row { flex-wrap: wrap; gap: .4rem; }
.rep-list .rep-row .what { flex: 1 1 100%; }
.plan-rows .plan-row { align-items: end; }

/* 0.29.0 (FR-111): leases of a tenancy or of a place I rent */
.lease-row { align-items: flex-start; }
.lease-row .row-actions { margin-top: .35rem; gap: .5rem; }
.row .what small.muted { display: block; margin-top: .15rem; }
.lease-row .what small { white-space: normal; overflow: visible; }

/* 0.30.0 (FR-114): the public "to rent" page and the owner's listing screens */
body.rent-page { background: var(--bg); margin: 0; }
.rent-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .6rem 1rem; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1000; }
.rent-brand { display: flex; align-items: center; gap: .45rem; color: var(--green); text-decoration: none; font-size: 1.05rem; }
.rent-brand span { color: var(--muted); font-size: .9rem; }
#rent-view { max-width: 72rem; margin: 0 auto; padding: .8rem 1rem 2rem; }
.rent-head h1, .rent-soon h1 { font-size: 1.45rem; margin: .4rem 0 .1rem; }
.rent-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .6rem; margin: .7rem 0; }
.rent-filters label { font-size: .82rem; color: var(--muted); display: grid; gap: .2rem; }
.rent-cols { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.rent-map { height: 15rem; border-radius: var(--radius); border: 1px solid var(--line); z-index: 0; }
.rent-map.small { height: 13rem; }
.rent-list { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); align-content: start; }
.rent-card { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: .7rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.rent-card img, .rent-nophoto { width: 7rem; height: 100%; min-height: 6.5rem; object-fit: cover; background: var(--green-50); display: grid; place-items: center; color: var(--green-2); }
.rent-card-body { display: grid; gap: .15rem; padding: .55rem .6rem .55rem 0; align-content: start; }
.rent-card-body small { color: var(--muted); }
.rent-card-body .pill { justify-self: start; margin-top: .2rem; }
.rent-price { color: var(--green); font-weight: 650; }
.rent-price.big { font-size: 1.2rem; margin: .2rem 0 .5rem; }
.rent-photo { width: 100%; max-height: 24rem; object-fit: cover; border-radius: var(--radius); background: var(--green-50); display: block; }
.rent-thumbs { display: flex; gap: .4rem; overflow-x: auto; padding: .4rem 0; }
.rent-thumbs button { padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex: 0 0 4.2rem; height: 3.2rem; min-height: 0; background: none; }
.rent-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rent-desc { white-space: pre-line; }
.rent-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rent-foot { max-width: 72rem; margin: 0 auto; padding: 0 1rem 2rem; color: var(--muted); font-size: .85rem; }
.rent-page .chip { display: inline-block; background: var(--green-50); color: var(--green); border-radius: 999px; padding: .15rem .6rem; font-size: .82rem; margin: 0 .3rem .3rem 0; }
.rent-page .warn .ico { width: 1rem; height: 1rem; vertical-align: -.15rem; }
@media (min-width: 900px) {
  .rent-cols { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .rent-cols.detail { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
  .rent-map { height: 30rem; position: sticky; top: 4.2rem; }
  .rent-map.small { height: 16rem; position: static; }
}
.listing-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: .5rem; margin: .5rem 0; }
.listing-photos figure { margin: 0; position: relative; }
.listing-photos img { width: 100%; height: 5.2rem; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.listing-photos button { position: absolute; top: .2rem; right: .2rem; min-height: 0; padding: .15rem .4rem; font-size: .75rem; }
.enq { border-top: 1px solid var(--line); padding: .6rem 0; }
.enq p { margin: .15rem 0; }
.rent-page .block h1 { font-size: 1.35rem; line-height: 1.25; margin: .45rem 0 .2rem; }

/* 0.31.0: building detection (FR-120 to FR-123; UI-ANALYSIS section 36) */
.find-map { height: 46vh; min-height: 260px; }
.find-status { margin: .6rem 0 .2rem; } .find-status p { margin: .2rem 0 .5rem; }
.find-busy { display: flex; align-items: center; gap: .5rem; color: var(--muted); }
.spinner { display: inline-block; box-sizing: border-box; width: 18px; min-width: 18px; height: 18px; flex: none; border: 3px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 4s; } }
.sg-num { display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #0b6fa4; color: #fff; font-weight: 700; font-size: .85rem; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); cursor: pointer; }
.sg-row { align-items: flex-start; flex-wrap: wrap; }
.sg-row .what { flex: 1 1 12rem; min-width: 0; } .sg-row .what small { display: block; color: var(--muted); white-space: normal; overflow: visible; }
.sg-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #0b6fa4; color: #fff; font-weight: 700; font-size: .85rem; display: inline-flex; align-items: center; justify-content: center; margin-top: .15rem; }
.find-foot .attribution { font-size: .78rem; }
.leaflet-tooltip.bld-name { background: rgba(38,48,40,.85); color: #fff; border: 0; box-shadow: none; padding: .1rem .4rem; font-weight: 600; }
.leaflet-tooltip.bld-name::before { display: none; }
body.wide .find-map { height: 58vh; }

