/*
 * Colours follow Octet's "SaaS Landing" palette: #FCFCFC, #E3E4E6, #C3C3C5 (neutrals) and #8BCAF9, #40AAF8, #1297FD (blues).
 * #1297FD (--brand-bright) is used for logos, charts and highlights. White text on it is only 3.1:1, so buttons, links and
 * the active menu item use --brand (#0B78D6, the same blue one step deeper, 4.5:1 with white). #C3C3C5 is for borders only.
 */
:root {
  --bg: #fcfcfc; --surface: #fff; --ink: #0f1b2d; --muted: #5c6470; --line: #e3e4e6; --soft: #f2f3f5; --border: #c3c3c5;
  --brand: #0b78d6; --brand-ink: #0a6cc2; --brand-bright: #1297fd; --brand-mid: #40aaf8; --brand-light: #8bcaf9; --brand-soft: #e8f4fe; --accent: #c2410c;
  --nav-bg: #0f1b2d; --nav-ink: #c9d3e0; --nav-dim: #8593a8; --hero-end: #0f1b2d;
  --ok: #15803d; --ok-soft: #e3f3e7; --warn: #a16207; --warn-soft: #fbf1d3; --bad: #b91c1c; --bad-soft: #fde8e6; --info: #1d4ed8; --info-soft: #e4ecfd;
  --info-ink: #1e3a8a; --info-line: #c9d8fb; --warn-ink: #713f12; --warn-line: #ecd9a0; --bad-ink: #7f1d1d; --bad-line: #f1c4bf;
  --subtle: #f7f8fa; --field: #fff; --link: var(--brand); --on-brand: #fff; --nav-fg: #fff; --nav-hover: rgba(255, 255, 255, .06); --nav-rule: rgba(255, 255, 255, .1);
  --hero-ink: #dbe8f6; --chart-out: #a3acb9; --stars: #d97706;
  --radius: 12px; --radius-sm: 9px; --font: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 4px 16px rgba(15, 27, 45, .05); --shadow-lift: 0 6px 24px rgba(15, 27, 45, .12);
  color-scheme: light;
}
/* Dark theme: chosen by the site default (Customize → Theme) or by each person in Settings. */
:root[data-theme="dark"] {
  --bg: #0f141b; --surface: #171e27; --ink: #e6ebf1; --muted: #9aa4b2; --line: #2a323d; --soft: #1f2731; --border: #3a4350; --subtle: #131920; --field: #121821;
  --brand-soft: #10263d; --link: var(--brand-light);
  --ok: #4ade80; --ok-soft: #12301f; --warn: #facc15; --warn-soft: #33290f; --bad: #f87171; --bad-soft: #3a1a1a; --info: #93c5fd; --info-soft: #13243f;
  --info-ink: #bfdbfe; --info-line: #1e3a66; --warn-ink: #fde68a; --warn-line: #5a4614; --bad-ink: #fecaca; --bad-line: #6b2626;
  --chart-out: #5f6b7a; --stars: #fbbf24;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .3); --shadow-lift: 0 6px 24px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 24px; } h2 { font-size: 18px; } h3 { font-size: 16px; } h4 { font-size: 14px; }
p { margin: 0 0 8px; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); } .small { font-size: 13px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grow { flex: 1; min-width: 0; }
.pre { white-space: pre-wrap; }

/* Shell */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100%; }
.side { background: var(--nav-bg); color: var(--nav-ink); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--nav-fg); font-weight: 700; font-size: 18px; padding: 4px 10px 14px; }
.brand .logo { width: 32px; height: 32px; border-radius: 9px; background: var(--brand-bright); display: grid; place-items: center; }
.nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--nav-dim); padding: 14px 10px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--nav-ink); font-weight: 500; }
.nav a:hover { background: var(--nav-hover); text-decoration: none; }
.nav a.active { background: var(--brand); color: var(--on-brand); }
.nav .count { margin-left: auto; background: var(--accent); color: #fff; border-radius: 99px; font-size: 11px; padding: 0 7px; font-weight: 700; }
.side-user { margin-top: auto; padding: 12px 10px 2px; border-top: 1px solid var(--nav-rule); font-size: 13px; }
.side-user b { color: var(--nav-fg); display: block; }
.main { min-width: 0; padding: 26px 32px 60px; max-width: 1280px; width: 100%; }
.topbar { display: none; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

/* Surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card > h3 { margin-bottom: 12px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0; overflow-wrap: anywhere; }
.stat .value.text { font-size: 18px; }
.stat.bad .value { color: var(--bad); } .stat.ok .value { color: var(--ok); }

/* Buttons & forms */
.btn { border: 1px solid transparent; border-radius: var(--radius-sm); padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; background: var(--brand); color: var(--on-brand); white-space: nowrap; }
.btn:hover { background: var(--brand-ink); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); } .btn.ghost:hover { background: var(--soft); }
.btn.danger { background: var(--surface); color: var(--bad); border-color: var(--bad-line); } .btn.danger:hover { background: var(--bad-soft); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 7px; }
.btn.block { width: 100%; justify-content: center; }
.link { background: none; border: 0; padding: 0; color: var(--link); font: inherit; cursor: pointer; font-weight: 600; }
label.field { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 13px; }
label.field .hint { font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; color: inherit; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 11px; background: var(--field); width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
textarea { min-height: 90px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; font-size: 14px; }
.form { display: grid; gap: 14px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form .three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters > * { flex: 1 1 150px; max-width: 240px; }
.filters > .wide { flex: 2 1 240px; max-width: 360px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--subtle); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td .sub { color: var(--muted); font-size: 13px; }

/* Badges, tabs, misc */
.badge { display: inline-flex; align-items: center; border-radius: 99px; padding: 2px 9px; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.info { background: var(--info-soft); color: var(--info); } .badge.brand { background: var(--brand-soft); color: var(--link); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 9px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--link); border-color: var(--brand); }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.photo { background: linear-gradient(135deg, var(--brand-soft), var(--line)); display: grid; place-items: center; color: var(--brand-light); overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard { padding: 0; overflow: hidden; display: flex; flex-direction: column; color: inherit; transition: transform .12s, box-shadow .12s; }
a.pcard:hover, .pcard.click:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lift); cursor: pointer; }
.pcard .photo { aspect-ratio: 16 / 10; }
.pcard .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.price { font-weight: 700; font-size: 17px; color: var(--link); }
.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; border-radius: var(--radius); overflow: hidden; }
.gallery .photo { aspect-ratio: 16 / 10; } .gallery .thumbs { display: grid; gap: 8px; } .gallery .thumbs .photo { aspect-ratio: auto; height: 100%; cursor: pointer; }
.thumbs-row { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs-row .photo { width: 84px; height: 64px; border-radius: 8px; position: relative; }
.thumbs-row .x { position: absolute; top: 2px; right: 2px; background: rgba(0, 0, 0, .6); color: #fff; border: 0; border-radius: 99px; width: 20px; height: 20px; cursor: pointer; line-height: 1; }
.todo a { display: flex; gap: 12px; align-items: center; padding: 11px 4px; border-bottom: 1px solid var(--line); color: inherit; }
.todo a:last-child { border: 0; } .todo a:hover { background: var(--soft); text-decoration: none; }
.todo .n { min-width: 30px; height: 30px; border-radius: 99px; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.todo .n.warn { background: var(--warn-soft); color: var(--warn); } .todo .n.bad { background: var(--bad-soft); color: var(--bad); } .todo .n.info { background: var(--info-soft); color: var(--info); }
.bars { display: flex; align-items: flex-end; gap: 14px; height: 170px; padding-top: 8px; }
.bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; font-size: 12px; color: var(--muted); }
.bars .pair { display: flex; align-items: flex-end; gap: 3px; flex: 1; width: 100%; justify-content: center; }
.bars .bar { width: 38%; max-width: 26px; border-radius: 5px 5px 0 0; min-height: 2px; background: var(--brand); }
.bars .bar.out { background: var(--chart-out); }
.bars.many { gap: 6px; }
td.neg, .neg { color: var(--bad); }
tr.total td { font-weight: 700; border-top: 2px solid var(--line); }
tr.muted td { color: var(--muted); }
.announce { margin: 0 0 16px; }
.changes { margin: 6px 0 0; font-size: 12px; border-collapse: collapse; }
.changes td { padding: 2px 8px 2px 0; border: 0; vertical-align: top; }
.changes .old { color: var(--muted); text-decoration: line-through; }
.mbars svg { width: 100%; height: auto; display: block; margin-top: 8px; }
.mbars .axis { font-size: 11px; fill: var(--muted); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
.banner { border-radius: var(--radius); padding: 12px 16px; background: var(--info-soft); color: var(--info-ink); border: 1px solid var(--info-line); }
.banner.warn { background: var(--warn-soft); color: var(--warn-ink); border-color: var(--warn-line); } .banner.bad { background: var(--bad-soft); color: var(--bad-ink); border-color: var(--bad-line); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.facts div span { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.facts div b { font-size: 15px; }
.timeline { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 18px; display: grid; gap: 16px; }
.timeline > div { position: relative; }
.timeline > div::before { content: ""; position: absolute; left: -24px; top: 6px; width: 10px; height: 10px; border-radius: 99px; background: var(--brand); }
.stars { color: var(--stars); letter-spacing: 1px; }
.agreement { background: var(--subtle); border: 1px solid var(--line); border-radius: 10px; padding: 18px; max-height: 340px; overflow: auto; white-space: pre-wrap; font-family: Georgia, "Times New Roman", serif; font-size: 14px; }

/* Notifications bell */
.bell { position: fixed; top: 16px; right: 22px; z-index: 35; }
.bell-btn { position: relative; width: 42px; height: 42px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.bell-btn:hover { background: var(--soft); }
.bell .dot { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.bell-panel { position: absolute; right: 0; top: 50px; width: min(380px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(15, 27, 45, .2); overflow: hidden; }
.bell-list { max-height: min(60vh, 460px); overflow-y: auto; }
.bell-item { display: grid; gap: 2px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 11px 14px 11px 22px; font: inherit; font-size: 13px; cursor: pointer; position: relative; color: inherit; }
.bell-item:hover { background: var(--soft); }
.bell-item b { font-size: 14px; }
.bell-item.unread { background: var(--brand-soft); }
.bell-item.unread::before { content: ""; position: absolute; left: 9px; top: 17px; width: 7px; height: 7px; border-radius: 99px; background: var(--brand); }
.page-head { padding-right: 56px; }

/* Map search */
.map { height: 520px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 0; }
.map.small { height: 240px; }
.map-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 16px; align-items: start; }
.map-results { max-height: 560px; overflow-y: auto; padding-right: 4px; }
.price-pin span { display: inline-block; transform: translate(-50%, -100%); background: var(--brand); color: #fff; font: 700 12px/1 "Segoe UI", system-ui, sans-serif; padding: 5px 8px; border-radius: 99px; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); white-space: nowrap; }
.price-pin:hover span, .price-pin.on span { background: var(--accent); }
.leaflet-popup-content { display: grid; gap: 4px; font: 14px/1.4 "Segoe UI", system-ui, sans-serif; margin: 12px 14px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--brand); color: var(--on-brand); }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 4px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }

/* Pie chart */
.pie { display: grid; grid-template-columns: 170px 1fr; gap: 18px; align-items: center; }
.pie svg { width: 170px; height: 170px; }
.pie-big { font-size: 22px; font-weight: 700; fill: var(--ink); }
.pie-small { font-size: 11px; fill: var(--muted); }
.pie-legend td { padding: 6px 6px; border-bottom: 1px solid var(--line); font-size: 14px; }
.pie-legend tr.on td { background: var(--soft); }
.pie-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 8px; }

/* Modal & toast */
.overlay { position: fixed; inset: 0; background: rgba(15, 27, 45, .5); display: grid; place-items: start center; padding: 5vh 16px; overflow-y: auto; z-index: 50; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 540px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.modal.wide { max-width: 780px; }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal .content { padding: 20px; }
.modal .close { background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.toasts { position: fixed; bottom: 20px; right: 20px; display: grid; gap: 8px; z-index: 100; }
.toast { background: var(--nav-bg); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: 360px; }
.toast.bad { background: var(--bad); }

/* Chat */
.chat { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 150px); min-height: 440px; padding: 0; overflow: hidden; }
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; }
.chat-list .item { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line); color: inherit; }
.chat-list .item:hover { background: var(--soft); text-decoration: none; } .chat-list .item.on { background: var(--brand-soft); }
.chat-list h4 { padding: 10px 16px; background: var(--subtle); color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); }
.thread { display: flex; flex-direction: column; min-height: 0; }
.thread .head { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.thread .msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; background: var(--subtle); }
.bubble { max-width: 72%; padding: 8px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); align-self: flex-start; }
.bubble.mine { align-self: flex-end; background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.bubble.removed { font-style: italic; opacity: .7; }
.bubble .meta { font-size: 11px; opacity: .7; margin-top: 2px; }
.thread form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.composer form { border-top: 0; } .composer { border-top: 1px solid var(--line); }
.compose-note { padding: 8px 12px 0; gap: 6px; }
.thread form .attach { flex: 0 0 auto; padding: 0 12px; }
.bubble .quote { font-size: 12px; border-left: 3px solid currentColor; opacity: .8; padding: 2px 8px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bubble .files { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.bubble.mine .link, .bubble.mine .files .muted { color: #fff; }
.bubble .acts { display: inline-flex; gap: 8px; margin-left: 8px; opacity: 0; transition: opacity .12s; }
.bubble:hover .acts, .bubble:focus-within .acts { opacity: 1; }
.bubble .acts .link { font-size: 11px; color: inherit; text-decoration: underline; }
@media (hover: none) { .bubble .acts { opacity: 1; } }

/* Blog and community */
.prose { line-height: 1.7; font-size: 16px; max-width: 70ch; }
.prose h2 { font-size: 22px; margin: 26px 0 8px; } .prose h3 { font-size: 18px; margin: 20px 0 6px; }
.prose p, .prose ul { margin: 0 0 14px; } .prose ul { padding-left: 22px; }
.blog-card { display: flex; flex-direction: column; color: inherit; overflow: hidden; padding: 0; }
.blog-card:hover { text-decoration: none; box-shadow: var(--shadow-lift); }
.blog-card .photo { height: 170px; border-radius: 0; }
.blog-card .body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.blog-cover { width: 100%; max-height: 380px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.vote { display: inline-flex; flex-direction: column; align-items: center; min-width: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 4px 6px; font: inherit; font-weight: 700; cursor: pointer; color: var(--ink); }
.vote[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.vote:disabled { cursor: default; opacity: .75; }
.post-row { display: flex; gap: 12px; align-items: flex-start; }
.pinned { border-left: 4px solid var(--brand); }
.heart { font-size: 18px; line-height: 1; }

/* Auth */
.auth { min-height: 100%; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth .hero { background: linear-gradient(160deg, var(--brand), var(--hero-end)); color: #fff; padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.auth .hero h1 { font-size: 36px; line-height: 1.15; }
.auth .hero ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; color: var(--hero-ink); }
.auth .hero li { display: flex; gap: 10px; } .auth .hero li::before { content: "✓"; color: var(--brand-light); font-weight: 700; }
.auth .panel { display: grid; place-items: center; padding: 32px 20px; }
.auth .box { width: 100%; max-width: 420px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 6px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.role-pick button { border: 1px solid var(--line); background: var(--surface); color: inherit; border-radius: 10px; padding: 10px; text-align: left; cursor: pointer; font: inherit; }
.role-pick button.on { border-color: var(--brand); background: var(--brand-soft); }
.role-pick b { display: block; } .role-pick span { font-size: 12px; color: var(--muted); }
.demo-list { display: grid; gap: 6px; max-height: 250px; overflow: auto; }
.demo-list button { display: flex; justify-content: space-between; gap: 8px; text-align: left; border: 1px solid var(--line); background: var(--surface); color: inherit; border-radius: 8px; padding: 7px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.demo-list button:hover { border-color: var(--brand); background: var(--brand-soft); }

.receipt { border: 1px dashed var(--border); border-radius: 12px; padding: 22px; background: var(--bg); }
.receipt dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; margin: 14px 0 0; }
.receipt dt { color: var(--muted); } .receipt dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .4); }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--nav-bg); color: #fff; position: sticky; top: 0; z-index: 30; font-weight: 700; }
  .topbar button { background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; line-height: 1; }
  .main { padding: 18px 16px 60px; }
  .bell { top: 6px; right: 10px; } .bell-btn { box-shadow: none; } .page-head { padding-right: 0; }
  .map-layout { grid-template-columns: 1fr; } .map { height: 380px; } .map-results { max-height: none; }
  .pie { grid-template-columns: 1fr; justify-items: center; }
  .g2, .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth { grid-template-columns: 1fr; } .auth .hero { display: none; }
  .chat { grid-template-columns: 1fr; height: auto; } .chat-list { max-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); } .thread { height: 60vh; }
}
@media (max-width: 600px) {
  .g2, .g3, .g4, .form .two, .form .three { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; } .gallery .thumbs { display: none; }
  .filters > *, .filters > .wide { max-width: none; flex-basis: 100%; }
}
@media print {
  body * { visibility: hidden; }
  .receipt, .receipt * { visibility: visible; }
  .receipt { position: absolute; left: 0; top: 0; width: 100%; border: 0; }
  .overlay { position: static; background: none; }
}
/* Signature pad: always white, like paper, so dark ink shows in both themes. */
.sigpad { display: block; width: 100%; height: 150px; background: #fff; border: 1px dashed var(--line); border-radius: 10px; touch-action: none; cursor: crosshair; }
.checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 600px) { .checks { grid-template-columns: 1fr; } }

/* ---- Public site (signed out): header, hero search, footer, comparison table ---- */
.public { min-height: 100%; display: flex; flex-direction: column; }
.pub-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 12px max(20px, calc((100% - 1240px) / 2)); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.pub-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.pub-actions a:not(.btn) { color: var(--ink); font-weight: 600; }
.pub-menu { display: none; background: none; border: 0; font-size: 22px; color: var(--ink); cursor: pointer; justify-self: end; }
.btn.pill { border-radius: 99px; padding: 9px 18px; }
.btn.pill.lg { padding: 14px 26px; font-size: 16px; }
.btn.pill.ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn.light { background: #fff; color: #0f1b2d; border-color: #fff; } .btn.light:hover { background: #eef1f5; }
.pub-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--ink); }
.pub-brand .logo { width: 32px; height: 32px; border-radius: 9px; background: var(--brand); display: grid; place-items: center; }
.pub-nav { display: flex; align-items: center; justify-content: center; gap: 26px; flex-wrap: wrap; }
.pub-nav a:not(.btn) { color: var(--ink); font-weight: 600; }
.pub-main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px 16px 48px; box-sizing: border-box; }
.pub-wide { flex: 1; width: 100%; }
.pub-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
.pub-footer { padding: 56px 0 28px; color: var(--muted); font-size: 14px; }
.pub-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.pub-footer-grid h4 { color: var(--ink); font-size: 14px; margin: 6px 0 14px; }
.pub-footer-grid div > a:not(.pub-brand) { display: block; color: var(--muted); margin-bottom: 12px; }
.pub-footer-brand p { max-width: 280px; margin-top: 12px; }
.pub-footer-base { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 36px; padding-top: 18px; font-size: 13px; }
.pub-hero { background: linear-gradient(160deg, var(--brand), var(--hero-end)); color: #fff; border-radius: var(--radius); padding: 44px 32px; display: grid; gap: 14px; }
.pub-hero h1 { font-size: 34px; line-height: 1.15; margin: 0; max-width: 760px; }
.pub-hero p { margin: 0; color: var(--hero-ink); max-width: 680px; }
.pub-search { display: flex; flex-wrap: wrap; gap: 10px; background: var(--surface); color: var(--ink); padding: 12px; border-radius: 12px; align-items: center; }
.pub-search > select, .pub-search > input { flex: 1 1 160px; }
.pub-search .seg { flex: 0 0 auto; }
.pcard-link { display: block; }
.pcard-title { color: inherit; }
table.compare th:first-child { width: 150px; color: var(--muted); font-weight: 600; }
table.compare thead th { vertical-align: top; min-width: 180px; }
table.compare .photo { aspect-ratio: 16 / 10; border-radius: 8px; }
@media (max-width: 600px) { .pub-hero { padding: 28px 18px; } .pub-hero h1 { font-size: 26px; } .pub-nav { gap: 12px; } }
/* ---- Maintenance board, visit calendar, expense bars ---- */
.board { display: grid; grid-template-columns: repeat(6, minmax(190px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.board-col { background: var(--soft); border: 2px solid transparent; border-radius: var(--radius); padding: 10px; display: grid; gap: 8px; min-height: 140px; align-content: start; }
.board-col.over { border-color: var(--brand); background: var(--brand-soft); }
.board-col.no { border-color: var(--bad); }
.board-col > header { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 4px; }
.board-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 4px; box-shadow: var(--shadow); cursor: grab; }
.board-card[draggable="false"] { cursor: default; opacity: .8; }
.board-card .sub { font-size: 12px; }
.board-move { font-size: 12px; padding: 4px 6px; margin-top: 4px; }
.board-empty { text-align: center; padding: 8px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); gap: 1px; }
.cal-head { background: var(--soft); padding: 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; }
.cal-day { background: var(--surface); min-height: 92px; padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day.out { background: var(--bg); }
.cal-day.out .cal-num { color: var(--muted); opacity: .6; }
.cal-day.today .cal-num { background: var(--brand); color: #fff; border-radius: 99px; padding: 0 7px; }
.cal-num { font-size: 12px; font-weight: 600; align-self: flex-start; }
.cal-item { display: block; font-size: 11.5px; line-height: 1.3; padding: 2px 5px; border-radius: 5px; background: var(--info-soft); color: var(--info); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-item.emergency, .cal-item.high { background: var(--bad-soft); color: var(--bad); }
.cal-item.low { background: var(--soft); color: var(--muted); }
.exp-bars { display: grid; gap: 8px; }
.exp-bar { display: grid; grid-template-columns: minmax(110px, 180px) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.exp-track { background: var(--soft); border-radius: 4px; height: 10px; }
.exp-track > div { background: var(--brand); height: 100%; border-radius: 0 4px 4px 0; }
@media (max-width: 600px) {
  .cal-day { min-height: 64px; }
  .cal-item { font-size: 0; padding: 0; height: 6px; border-radius: 3px; }
  .exp-bar { grid-template-columns: 1fr auto; }
  .exp-bar .exp-track { grid-column: 1 / -1; grid-row: 2; }
}
/* ---- Inspection report form ---- */
.insp-item { display: grid; grid-template-columns: minmax(140px, 1fr) auto; gap: 6px 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.insp-item > input { grid-column: 1 / -1; }
.insp-item .seg button { padding: 6px 10px; font-size: 13px; }
.insp-item .seg button.on.ok { background: var(--ok); } .insp-item .seg button.on.warn { background: var(--warn); }
.insp-item .seg button.on.bad { background: var(--bad); } .insp-item .seg button.on { background: var(--muted); }
.insp-item .seg button.on.ok, .insp-item .seg button.on.warn, .insp-item .seg button.on.bad { color: #fff; }
@media (max-width: 600px) {
  .insp-item { grid-template-columns: 1fr; }
  .insp-item .seg { display: flex; } .insp-item .seg button { flex: 1; padding: 8px 4px; }
}
/* Customisable chrome: logo, top navigation, footer, maintenance banner */
.logo-img { height: 32px; max-width: 140px; object-fit: contain; border-radius: 6px; }
.maint { margin: 0 0 16px; }
.lock { font-size: 11px; opacity: .8; }
.site-foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 13px; }
.shell.top { display: block; }
.topnav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 8px 76px 8px 20px; background: var(--nav-bg); color: var(--nav-ink); }
.topnav .brand { padding: 0; flex: 0 0 auto; }
.topnav .nav { display: flex; flex: 1; gap: 2px; overflow-x: auto; scrollbar-width: thin; }
.topnav .nav-section { display: flex; gap: 2px; }
.topnav .nav-section + .nav-section { border-left: 1px solid var(--nav-rule); padding-left: 6px; margin-left: 4px; }
.topnav .nav a { padding: 7px 10px; white-space: nowrap; }
.topnav .top-user { flex: 0 0 auto; display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--nav-ink); }
.topnav .top-user b { color: var(--nav-fg); }
.topnav .menu-btn { display: none; background: none; border: 0; color: var(--nav-fg); font-size: 22px; cursor: pointer; }
.shell.top .main { margin: 0 auto; }
.shell.top .bell { top: 8px; }
@media (max-width: 900px) {
  .topnav { flex-wrap: wrap; padding-right: 70px; }
  .topnav .menu-btn { display: block; margin-left: auto; }
  .topnav .nav, .topnav .top-user { display: none; }
  .shell.top.open .topnav .nav { display: flex; flex-direction: column; width: 100%; flex-basis: 100%; }
  .shell.top.open .topnav .nav-section { flex-direction: column; border: 0; padding: 0; margin: 0; }
  .shell.top.open .topnav .top-user { display: flex; width: 100%; justify-content: space-between; padding: 8px 10px; }
}
/* Plans */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.plan-card { display: flex; flex-direction: column; gap: 10px; }
.plan-card.highlight { border: 2px solid var(--brand-bright); }
.plan-card .amount { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.plan-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; }
.plan-card li.no { color: var(--muted); text-decoration: line-through; }
.swatch { width: 44px; height: 36px; padding: 2px; border-radius: var(--radius-sm); cursor: pointer; }
.preview-box { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

/* ---- Home page (visitors) ---- */
.home h1, .home h2 { letter-spacing: -0.035em; line-height: 1.04; font-weight: 700; color: var(--ink); }
.home-section { padding-top: clamp(64px, 9vw, 120px); }
.home-hero { position: relative; padding-top: clamp(36px, 6vw, 64px); }
.home-hero-text { text-align: center; }
.home-hero-text h1 { font-size: clamp(40px, 7.2vw, 96px); max-width: 1000px; margin: 0 auto; }
.home-hero-text p { font-size: clamp(16px, 1.6vw, 20px); color: var(--ink); opacity: .85; max-width: 560px; margin: 18px auto 0; line-height: 1.45; }
.home-hero-photo { margin-top: -10px; height: clamp(300px, 42vw, 520px); overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%); mask-image: linear-gradient(to bottom, transparent 0, #000 22%); }
.home-hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; display: block; }
.home-search { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; width: min(1020px, calc(100% - 32px)); margin: -58px auto 0; padding: 14px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 18px 50px rgba(15, 27, 45, .16); }
.home-search > select, .home-search > input { flex: 1 1 150px; border-radius: 12px; padding: 12px 14px; }
.home-search .seg { border-radius: 99px; padding: 4px; background: var(--soft); border: 0; }
.home-search .seg button { border-radius: 99px; padding: 9px 18px; }
.home-search .btn { padding: 13px 26px; font-size: 16px; }
.home-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 36px; }
.home-head h2, .home-intro h2 { font-size: clamp(32px, 4.4vw, 56px); }
.home-head p { font-size: 18px; color: var(--muted); margin: 0; }
.home-head p a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.home-img { border-radius: 22px; overflow: hidden; background: var(--soft); }
.home-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.home-choice { color: inherit; display: flex; flex-direction: column; }
.home-choice:hover { text-decoration: none; } .home-choice:hover img { transform: scale(1.03); }
.home-choice .home-img { aspect-ratio: 4 / 5; } .home-choice img { transition: transform .4s ease; }
.home-choice h3 { font-size: 24px; letter-spacing: -.02em; margin: 22px 0 8px; }
.home-choice p { color: var(--muted); margin: 0 0 12px; line-height: 1.5; }
.home-link { color: var(--link); font-weight: 700; font-size: 14px; } .home-link.light { color: var(--brand-light); }
.home-intro { max-width: 680px; margin-bottom: 40px; }
.home-intro p, .home-lede { font-size: clamp(17px, 1.6vw, 21px); color: var(--muted); line-height: 1.45; margin-top: 18px; }
.home-steps { display: grid; gap: 32px; }
.home-step { position: sticky; top: calc(88px + var(--i) * 16px); display: grid; grid-template-columns: 1fr 1.6fr; gap: 40px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 32px; box-shadow: 0 -6px 30px rgba(15, 27, 45, .06); min-height: 440px; }
.home-step-n { font-weight: 700; color: var(--link); font-size: 14px; letter-spacing: .08em; }
.home-step-text h3 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -.03em; margin: 10px 0 12px; }
.home-step-text p { color: var(--muted); font-size: 17px; line-height: 1.55; margin: 0; max-width: 400px; }
.home-step-visual { position: relative; padding: 0 0 0 64px; }
.home-step-visual .home-img { aspect-ratio: 5 / 4; }
.home-step-visual .mock-card { position: absolute; left: 0; top: 28px; width: min(340px, 58%); font-size: 13px; }
.home-step-visual.dark { padding: 0 0 48px 0; } .home-step-visual.dark .mock-card { left: -40px; top: auto; bottom: 0; width: min(320px, 60%); }
.mock-card { background: #fff; color: #0f1b2d; border-radius: 18px; box-shadow: 0 20px 50px rgba(15, 27, 45, .22); overflow: hidden; font-size: 14px; }
.mock-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid #e3e4e6; font-size: 16px; }
.mock-rows { padding: 6px 20px 12px; }
.mock-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #eceef1; color: #5c6470; }
.mock-row:last-child { border-bottom: 0; } .mock-row b { color: #0f1b2d; font-weight: 600; }
.mock-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 18px; }
.mock-chips span { border: 1px solid #e3e4e6; border-radius: 99px; padding: 5px 12px; font-size: 13px; }
.mock-card .badge.ok { background: #e3f3e7; color: #15803d; } .mock-card .badge.warn { background: #fbf1d3; color: #a16207; }
.mock-card .badge.info { background: #e4ecfd; color: #1d4ed8; } .mock-card .badge.brand { background: #e8f4fe; color: #0b6fc2; }
.home-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 40px; }
.home-dark { background: #0f1b2d; color: #c9d3e0; margin-top: clamp(64px, 9vw, 120px); padding: clamp(64px, 9vw, 120px) 0; }
.home .home-dark h2, .home .home-dark h3 { color: #fff; }
.home-split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.home-dark-text h2 { font-size: clamp(34px, 4.6vw, 58px); }
.home-dark-text p { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.45; margin: 22px 0 32px; }
.home-dark .home-img { aspect-ratio: 3 / 2; }
.home-dark-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 72px; padding-top: 56px; }
.home-dark-cols h3 { font-size: 24px; letter-spacing: -.02em; margin-bottom: 12px; }
.home-dark-cols p { line-height: 1.55; margin: 0 0 14px; }
.home-split.community { grid-template-columns: 1.3fr 1fr; }
.home-split.community h2 { font-size: clamp(32px, 4vw, 50px); }
.home-img.tall { aspect-ratio: 3 / 2; }
.home-list { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line); }
.home-list li { border-bottom: 1px solid var(--line); }
.home-list a { display: grid; gap: 4px; padding: 18px 0; color: inherit; }
.home-list a:hover { text-decoration: none; } .home-list a:hover b { color: var(--link); }
.home-list b { font-size: 18px; } .home-list span { color: var(--muted); font-size: 14px; }
.home-closing { position: relative; border-radius: 28px; overflow: hidden; min-height: 520px; display: flex; align-items: center; }
.home-closing img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 80% center; }
.home-closing-text { position: relative; padding: clamp(28px, 6vw, 80px); max-width: min(640px, 58%); color: #0f1b2d; }
.home .home-closing-text h2 { font-size: clamp(34px, 4.8vw, 62px); color: #0f1b2d; }
.home-closing-text p { font-size: clamp(17px, 1.6vw, 21px); margin: 18px 0 0; line-height: 1.45; }
.home-closing-text .home-actions { margin-top: 32px; }

@media (max-width: 960px) {
  .pub-head { grid-template-columns: 1fr auto; }
  .pub-menu { display: block; grid-column: 2; grid-row: 1; }
  .pub-nav, .pub-actions { display: none; grid-column: 1 / -1; }
  .pub-head.open .pub-nav { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 8px 0; }
  .pub-head.open .pub-actions { display: flex; justify-content: flex-start; padding-bottom: 8px; }
  .home-choices { grid-template-columns: 1fr; }
  .home-choice .home-img { aspect-ratio: 16 / 10; }
  .home-step { grid-template-columns: 1fr; gap: 24px; padding: 22px; min-height: 0; top: calc(76px + var(--i) * 10px); }
  .home-step-visual { padding: 0; } .home-step-visual .mock-card { position: relative; left: auto; top: auto; width: auto; margin-top: -60px; margin-left: 12px; margin-right: 12px; }
  .home-split, .home-split.community, .home-dark-cols { grid-template-columns: 1fr; gap: 32px; }
  .home-step-visual.dark .mock-card { left: auto; bottom: auto; width: auto; }
  .home-closing { min-height: 460px; align-items: flex-start; }
  .home-closing img { object-position: 70% center; }
  .pub-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .home-search { border-radius: 20px; } .home-search > * { flex: 1 1 100% !important; } .home-search .seg { display: flex; } .home-search .seg button { flex: 1; }
  .home-search .btn { justify-content: center; }
  .pub-footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) { .home-closing-text { max-width: none; background: linear-gradient(180deg, rgba(246, 231, 205, .94) 55%, rgba(246, 231, 205, 0)); } }
