/* Kelo for Real Estate — app styles. Brand colours come from the company's theme as CSS variables
   (--brand, --brand-ink, --brand-soft, --brand-line, --accent, --radius) set on <body> by theme.css_vars(). */
:root {
  --ink: #16201C; --ink-2: #3D4A44; --muted: #66736D; --line: #E3E1DA; --paper: #F7F6F2; --card: #FFFFFF;
  --cream: #F3EFE6; --ok: #1E7A4C; --ok-soft: #E5F3EB; --bad: #B42318; --bad-soft: #FDECEA; --warn: #8A5A00; --warn-soft: #FFF4DC;
  --brand: #1F5A47; --brand-ink: #194A3A; --brand-soft: #E9EFEC; --brand-line: #C7D6D1; --accent: #E9A23B; --radius: 10px;
  --shadow: 0 1px 2px rgba(22,32,28,.06), 0 4px 16px rgba(22,32,28,.05);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --display: "Sora", var(--font);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 var(--font); color: var(--ink); background: var(--paper); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }
code { font: .9em "JetBrains Mono", ui-monospace, monospace; background: var(--cream); padding: 1px 5px; border-radius: 4px; }
img { max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ── layout ─────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--card); border-right: 1px solid var(--line); padding: 18px 14px 0; position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.side .logo { flex: none; }
.nav { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -14px; padding: 0 14px 12px; }
.side .logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; min-height: 52px; }
.side .logo img { max-height: 40px; max-width: 180px; object-fit: contain; }
.side .logo .co { font-weight: 600; font-size: .95rem; line-height: 1.2; }
.nav-group { display: flex; align-items: center; justify-content: space-between; width: 100%; margin: 10px 0 2px; padding: 5px 10px; border: 0; border-radius: 6px;
  background: none; font: 600 .72rem/1.4 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); cursor: pointer; text-align: left; }
.nav-group:hover { color: var(--ink-2); background: var(--paper); }
.nav-group .chev, .me .chev { flex: none; transition: transform .18s ease; }
.nav-sec.shut .nav-group .chev { transform: rotate(-90deg); }
.nav-sec.shut .nav-items { display: none; }
/* the signed-in person, pinned to the bottom of the menu: Help, My profile and Billing open from here */
.me { flex: none; position: relative; margin: 0 -14px; border-top: 1px solid var(--line); }
.me summary { display: flex; align-items: center; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); cursor: pointer; list-style: none; }
.me summary::-webkit-details-marker { display: none; }
.me summary:hover, .me[open] summary { background: var(--paper); }
.me-av { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font: 600 .8rem/1 var(--font); }
.me-who { flex: 1; min-width: 0; line-height: 1.3; }
.me-who b { display: block; font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-who small { color: var(--muted); font-size: .78rem; }
.me .chev { color: var(--muted); }
.me[open] .chev { transform: rotate(180deg); }
.me-menu { position: absolute; left: 12px; right: 12px; bottom: calc(100% + 6px); display: grid; gap: 2px; padding: 6px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 10px 28px rgba(22,32,28,.14); }
.me-menu a { padding: 8px 10px; border-radius: 7px; color: var(--ink-2); font-weight: 500; }
.me-menu a:hover { background: var(--paper); text-decoration: none; }
.me-menu a.on { background: var(--brand-soft); color: var(--brand-ink); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 500; }
.nav a:hover { background: var(--paper); text-decoration: none; }
.nav a.on { background: var(--brand-soft); color: var(--brand-ink); }
.nav a .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-line); flex: none; }
.nav a.on .dot { background: var(--brand); }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .grow { flex: 1; }
.shell { transition: grid-template-columns .22s ease; }
@media (min-width: 901px) {
  body.nav-collapsed .shell { grid-template-columns: 0 1fr; }
  body.nav-collapsed .side { visibility: hidden; overflow: hidden; padding-left: 0; padding-right: 0; border-right: 0; }
}
.content { padding: 28px; max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .grow { flex: 1; min-width: 220px; }
.page-head p { color: var(--muted); margin: 0; }
.trial-bar { background: var(--warn-soft); color: var(--warn); padding: 9px 28px; font-size: .9rem; border-bottom: 1px solid #F2DFB3; }
.trial-bar a { color: inherit; font-weight: 600; text-decoration: underline; }

/* ── pieces ─────────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tile { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--ink); box-shadow: var(--shadow); }
.tile:hover { border-color: var(--brand-line); text-decoration: none; }
.tile b { display: block; margin-bottom: 4px; }
.tile span { color: var(--muted); font-size: .88rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: var(--radius); border: 1px solid var(--brand);
       background: var(--brand); color: #fff; font: 600 .92rem var(--font); cursor: pointer; text-decoration: none; min-height: 40px; }
.btn:hover { background: var(--brand-ink); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.light { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #1B1405; }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.small { padding: 5px 11px; min-height: 32px; font-size: .85rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .78rem; font-weight: 600; background: var(--paper); color: var(--ink-2); border: 1px solid var(--line); }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: #BFE3CD; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: #F2DFB3; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: #F6C7C1; }
.badge.brand { background: var(--brand-soft); color: var(--brand-ink); border-color: var(--brand-line); }
.badge.st-cold { background: #E8F1FB; color: #1F5E9C; border-color: #C9DDF2; }
.badge.st-warm { background: var(--warn-soft); color: var(--warn); border-color: #F2DFB3; }
.badge.st-hot { background: #FDEBE3; color: #B5401A; border-color: #F5C9B5; }
.badge.st-customer { background: var(--ok-soft); color: var(--ok); border-color: #BFE3CD; }
.badge.st-past, .badge.st-not_interested { background: var(--paper); color: var(--muted); }
.remark { margin-top: 3px; font-size: .84rem; color: var(--ink-2); }
.nowrap, td .badge { white-space: nowrap; }
.cust-table td { vertical-align: top; }
.stand { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stand-form { align-items: flex-end; gap: 10px; }
.stand-form .field { margin-bottom: 0; }
.stand-form .wide { flex: 2; }
.stand-form .btn { flex: 0 0 auto; }
.flash { padding: 11px 16px; border-radius: var(--radius); margin-bottom: 18px; background: var(--ok-soft); color: var(--ok); border: 1px solid #BFE3CD; }
.flash.bad { background: var(--bad-soft); color: var(--bad); border-color: #F6C7C1; }
.note { padding: 12px 16px; border-radius: var(--radius); background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--brand-ink); margin-bottom: 16px; }
.empty { text-align: center; padding: 34px 18px; color: var(--muted); }

/* ── forms ──────────────────────────────────────────── */
label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 6px; }
.field { margin-bottom: 16px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .84rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=url], input[type=search],
input[type=date], input[type=datetime-local], input[type=time], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #CFCDC5; border-radius: 8px; font: 15px var(--font); color: var(--ink); background: #fff; min-height: 42px; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 3px solid var(--brand-soft); }
textarea { min-height: 96px; resize: vertical; }
input[type=color] { width: 56px; height: 42px; padding: 3px; border: 1px solid #CFCDC5; border-radius: 8px; background: #fff; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.row { display: flex; gap: 14px; flex-wrap: wrap; } .row > * { flex: 1; min-width: 160px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.choice { display: block; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; background: #fff; margin-bottom: 10px; font-weight: 400; }
.choice:hover { border-color: var(--brand-line); }
.choice input { margin-right: 8px; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice b { font-weight: 600; }
.choice .sub { display: block; color: var(--muted); font-size: .88rem; margin: 3px 0 0 26px; }
.code-input { font: 600 1.6rem "JetBrains Mono", monospace !important; letter-spacing: .35em; text-align: center; }

/* ── tables ─────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
/* every table cell stays on one line; tables.js shortens the widest text columns (with "…") when a table is too wide */
table th, table td { white-space: nowrap; }
.article table th, .article table td, .no-fit th, .no-fit td { white-space: normal; }
td.cut, th.cut { overflow: hidden; text-overflow: ellipsis; }
td.cut div, td.cut p { overflow: hidden; text-overflow: ellipsis; }
/* phones: a table that can't fit shows each row as a card, one "LABEL  value" line per cell (tables.js adds .stack) */
table.stack, table.stack tbody, table.stack tfoot, table.stack tr, table.stack td { display: block; width: auto; }
table.stack thead { display: none; }
table.stack tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
table.stack td { position: relative; border: 0; padding: 3px 0 3px 40%; overflow: hidden; text-overflow: ellipsis; max-width: none !important; text-align: left; }
table.stack td::before { content: attr(data-label); position: absolute; left: 0; top: 5px; width: 37%; overflow: hidden; text-overflow: ellipsis;
  font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
table.stack td:first-child, table.stack td[data-label=""] { padding-left: 0; }
table.stack td:first-child::before, table.stack td[data-label=""]::before { display: none; }
table.stack td:empty { display: none; }
table.stack td div, table.stack td p { overflow: hidden; text-overflow: ellipsis; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: var(--paper); }
tr:last-child td { border-bottom: 0; }

/* ── sign-in / sign-up pages ────────────────────────── */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 40px 16px; background: linear-gradient(180deg, var(--cream), var(--paper) 340px); }
.auth .brand { margin-bottom: 22px; } .auth .brand img { height: 40px; }
.auth .box { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 30px; box-shadow: var(--shadow); }
.auth .box.wide { max-width: 720px; }
.auth .foot { margin-top: 18px; font-size: .88rem; color: var(--muted); text-align: center; }
.steps { display: flex; gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; }
.steps li { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.steps li.on { background: var(--brand); }
.price-box { border: 1.5px solid var(--line); border-radius: 12px; padding: 18px; }
.price-box .amount { font: 700 1.6rem var(--display); }
.price-box ul { margin: 10px 0 0; padding-left: 18px; color: var(--ink-2); font-size: .9rem; }

/* ── help ───────────────────────────────────────────── */
.help-btn { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--brand); background: #fff; }
.help-btn:hover { background: var(--brand-soft); text-decoration: none; }
.article { max-width: 760px; }
.article h2 { margin-top: 1.4em; }
.article li { margin-bottom: .35em; }
.article table { margin: 1em 0; border: 1px solid var(--line); }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--brand-line); flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; color: #fff; }
.checklist .done .tick { background: var(--ok); border-color: var(--ok); }
.checklist .done a { color: var(--muted); text-decoration: line-through; }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 4px; vertical-align: -4px; border: 1px solid rgba(0,0,0,.12); }

/* ── set-up checklist drawer (top-bar "Setup") and "?" tips ── */
.su-btn { gap: 6px; }
.su-btn[hidden], .su-drawer[hidden] { display: none; }
.su-ico { flex: none; color: var(--brand); }
.su-count { font-size: .74rem; font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); border-radius: 99px; padding: 1px 7px; }
.su-count:empty { display: none; }
.su-scrim { position: fixed; inset: 0; background: rgba(22,32,28,.32); z-index: 60; }
.su-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(430px, 100vw); background: var(--card); z-index: 61; display: flex; flex-direction: column;
  box-shadow: -12px 0 32px rgba(22,32,28,.16); transform: translateX(100%); transition: transform .22s ease; padding-top: env(safe-area-inset-top, 0px); }
.su-drawer.on { transform: none; }
.su-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 18px 20px 10px; }
.su-head h2 { margin: 0 0 2px; font-size: 1.15rem; }
.su-sub, .su-why { font-size: .85rem; color: var(--muted); }
.su-bar { height: 6px; background: var(--paper); margin: 0 20px; border-radius: 99px; overflow: hidden; }
.su-bar span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.su-body { flex: 1; overflow: auto; padding: 12px 20px 8px; }
.su-next { background: var(--brand-soft); border-radius: 10px; padding: 9px 12px; color: var(--ink-2); font-size: .9rem; }
.su-group { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 16px 0 6px; }
.su-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.su-list li { display: flex; gap: 11px; padding: 9px 8px; border-radius: 10px; }
.su-list li:hover { background: var(--paper); }
.su-list .grow { flex: 1; min-width: 0; }
.su-tick { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--brand-line); display: grid; place-items: center; margin-top: 1px; font-size: .75rem; color: #fff; }
.su-list li.done .su-tick { background: var(--ok); border-color: var(--ok); }
.su-t { font-weight: 600; }
.su-list li.done .su-t { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }
.su-acts { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; }
.su-mark { font-size: .85rem; }
.su-card .su-bar { margin: 4px 0 12px; }
.su-card p { margin-bottom: 10px; }
.su-drawer { transition: transform .22s ease, width .22s ease; }
.su-drawer.wide { width: min(560px, 100vw); }
.su-body { position: relative; }
.su-back { display: block; font-size: .85rem; margin-bottom: 6px; }
.help-search { display: flex; gap: 8px; margin: 2px 0 16px; }
.help-search input { flex: 1; min-width: 0; }
.help-panel .article { max-width: none; font-size: .94rem; }
.help-panel .article h2 { font-size: 1.05rem; }
.help-panel .article h2.hl { background: var(--brand-soft); box-shadow: 0 0 0 6px var(--brand-soft); border-radius: 4px; }
.help-panel .article table { display: block; overflow-x: auto; }
.help-related h3 { font-size: .95rem; margin-top: 1.4em; }
.help-list { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 2px; }
.help-list li { padding: 7px 8px; border-radius: 8px; }
.help-list li:hover { background: var(--paper); }
.help-list a { display: block; font-weight: 600; }
.help-list span { display: block; font-size: .84rem; color: var(--muted); }
.su-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 20px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); font-size: .88rem; }
.qhelp { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--muted);
  font: 700 10.5px/1 var(--font); text-decoration: none !important; vertical-align: middle; margin-left: 6px; cursor: help; letter-spacing: 0; }
.qhelp:hover, .qhelp:focus-visible { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); outline: none; }
h1 .qhelp { width: 19px; height: 19px; font-size: 11.5px; position: relative; top: -3px; }
.qtip { position: fixed; z-index: 100; max-width: 290px; background: #16201C; color: #fff; font-size: .82rem; line-height: 1.45; padding: 9px 12px 10px; border-radius: 9px; box-shadow: 0 10px 28px rgba(0,0,0,.22); }
.qtip a { display: inline-block; margin-top: 6px; color: #F5C46B; font-weight: 600; font-size: .8rem; }
.qtip a:hover, .qtip a:focus-visible { color: #fff; text-decoration: underline; outline: none; }
.article h2 { scroll-margin-top: 80px; }
.article h2:target { background: var(--brand-soft); box-shadow: 0 0 0 6px var(--brand-soft); border-radius: 4px; }

.switch-mode { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.switch-mode h3 { margin-bottom: 4px; }

/* cookie banner on the sign-up and sign-in pages (templates/_analytics.html) */
.cookies { position: fixed; left: 18px; bottom: 18px; z-index: 80; max-width: 420px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(22,32,28,.18); }
.cookies[hidden] { display: none; }
.cookies p { margin: 0 0 10px; font-size: .9rem; color: var(--ink-2); }
.cookies p b { display: block; color: var(--ink); }
.cookie-btns { display: flex; gap: 8px; }
.cookie-btns .btn { flex: 1; }
@media (max-width: 600px) { .cookies { left: 10px; right: 10px; bottom: 10px; max-width: none; } }

/* ── copy box and how-to steps (calendar link) ── */
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; font: 13px "JetBrains Mono", ui-monospace, monospace; background: var(--paper); }
.copy-row .btn { flex: none; min-width: 124px; }
.copy-note { min-height: 1.3em; margin: 6px 0 10px; font-size: .88rem; color: var(--ok); }
.copy-note.bad { color: var(--bad); }
.howto details { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 10px; }
.howto summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; font-weight: 600; cursor: pointer; list-style: none; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::after { content: "+"; flex: none; font-size: 1.2rem; line-height: 1; color: var(--brand); }
.howto details[open] summary::after { content: "–"; }
.howto details[open] summary { border-bottom: 1px solid var(--line); }
.howto summary:hover { background: var(--paper); border-radius: 10px; }
.howto ol { margin: 12px 0 10px; padding: 0 16px 0 40px; }
.howto ol li { margin-bottom: .45em; }
.howto details > p { padding: 0 16px; font-size: .88rem; }
.howto h3 { margin-top: 20px; }
@media (max-width: 600px) { .copy-row { flex-direction: column; } }

/* ── small screens ──────────────────────────────────── */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 20; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  body.nav-open .side { transform: none; }
  .menu-btn { display: inline-flex; }
  .top, .trial-bar { padding-left: 16px; padding-right: 16px; }
  .content { padding: 18px 16px; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .su-btn { padding: 5px 9px; }
  .top { gap: 8px; }
  .top .btn { white-space: nowrap; }
}
@media (max-width: 400px) { .top .btn.accent { display: none; } }
@media (max-width: 600px) { th, td { padding: 8px 7px; } }   /* the trial bar's "Choose your plan" link stays */
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .side, .top, .trial-bar, .help-btn { display: none !important; } .shell { display: block; }
  table th, table td { white-space: normal; } td.cut, th.cut { max-width: none !important; overflow: visible; } }

/* ── records (Phase 1) ──────────────────────────────── */
.money-input { display: flex; align-items: stretch; }
.money-input span { display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid #CFCDC5; border-right: 0; border-radius: 8px 0 0 8px; background: var(--paper); color: var(--muted); font-size: .9rem; }
.money-input input { border-radius: 0 8px 8px 0 !important; }
.picker { position: relative; }
.pick-list { position: absolute; left: 0; right: 0; top: 100%; margin-top: -10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); z-index: 30; max-height: 260px; overflow-y: auto; }
.pick-list button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; font: inherit; cursor: pointer; }
.pick-list button:hover, .pick-list button.on { background: var(--brand-soft); }
.pick-list small { color: var(--muted); display: block; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 14px; }
a.sort { color: inherit; } a.sort.on { color: var(--brand-ink); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters .field { margin: 0; min-width: 140px; flex: 1; }
.filters .field.wide { flex: 2; min-width: 220px; }
.kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 8px 14px; margin: 0; }
.kv dt { color: var(--muted); font-size: .88rem; } .kv dd { margin: 0; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photos figure { margin: 0; position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--paper); }
.photos img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.photos figcaption { display: flex; gap: 4px; padding: 6px; font-size: .8rem; align-items: center; }
.photos figcaption form { display: inline; }
.prop-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.prop-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); box-shadow: var(--shadow); }
.prop-card:hover { border-color: var(--brand-line); text-decoration: none; }
.prop-card .ph { aspect-ratio: 4/3; background: var(--cream) center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .85rem; }
.prop-card .bd { padding: 12px 14px; } .prop-card b { display: block; } .prop-card .price { font-weight: 700; color: var(--brand-ink); margin-top: 4px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline .meta { font-size: .8rem; color: var(--muted); }
.timeline .body { white-space: pre-wrap; margin-top: 3px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.tabs a:hover { text-decoration: none; background: var(--paper); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font: 700 1.5rem var(--display); } .stat span { color: var(--muted); font-size: .85rem; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.board .col { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 120px; }
.board .col h3 { font-size: .85rem; display: flex; justify-content: space-between; }
.board .item { display: block; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; margin-bottom: 8px; color: var(--ink); font-size: .9rem; }
.board .item:hover { border-color: var(--brand-line); text-decoration: none; }
.overdue { color: var(--bad); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.nav a.sub { padding: 5px 10px 5px 28px; font-size: .88rem; font-weight: 400; color: var(--muted); }
.nav a.sub.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 500; }
a.stat.tile { color: var(--ink); } a.stat.tile:hover { text-decoration: none; border-color: var(--brand-line); }

/* ── small-screen safety: grid/flex children may shrink; long words and codes wrap ── */
.grid > *, .row > *, .main, .content { min-width: 0; }
.kv dd, .card p, .card li, td { overflow-wrap: anywhere; }
code { word-break: break-all; }
@media (max-width: 900px) { .kv { grid-template-columns: minmax(96px, 40%) 1fr; } .page-head .actions { width: 100%; } }

/* Continue with Google (Google's branding: white, the G mark, dark text) */
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 46px; padding: 0 16px;
  border: 1px solid #DADCE0; border-radius: 10px; background: #fff; color: #1F1F1F; font: 600 15px/1 Inter, system-ui, sans-serif;
  text-decoration: none; transition: background .2s, box-shadow .2s; }
.btn-google:hover { background: #F7F8F8; box-shadow: 0 1px 3px rgba(60, 64, 67, .2); color: #1F1F1F; }
.btn-google svg { flex: none; }
.or-line { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted, #6B7280); font-size: 13px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .3; }
