/* KeyFlow app styles. Designed at 390px wide first; wider screens get the same layout, centred.
   Colours match the landing page and the old app, with a dark version for phones in dark mode. */

:root {
  --bg: #F7F5EF; --surface: #FFFFFF; --ink: #1F1F1D; --muted: #6E6D66; --faint: #9C9A92;
  --line: #E6E2D8; --line2: #D9D4C7;
  --sage: #5F7A62; --sage-soft: #EAF0EA; --sage-ink: #37503B;
  --red-soft: #FBEBE7; --red-ink: #8E3520;
  --amber-soft: #FBF0DC; --amber-ink: #7E5813;
  --lake: #DCE6EE;
  --r: 12px;
  --tabbar: 64px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141412; --surface: #1E1E1B; --ink: #EDEBE3; --muted: #A3A198; --faint: #78766F;
    --line: #2E2E29; --line2: #3A3A34;
    --sage: #9BBFA0; --sage-soft: #1F2820; --sage-ink: #BDD8C1;
    --red-soft: #2C1D18; --red-ink: #E0A08C;
    --amber-soft: #2A2317; --amber-ink: #D9BC85;
    --lake: #1A2431;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.45 var(--font); -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
a { color: var(--sage-ink); }
:focus-visible { outline: 3px solid var(--sage); outline-offset: 2px; }
h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.02em; margin: 0; font-weight: 650; }
.muted { color: var(--muted); }

/* ---------- logo ---------- */
.logo { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.mark { width: 24px; height: 24px; border-radius: 8px; background: var(--sage); display: grid; place-items: center; flex: none; }
.mark span { width: 8px; height: 8px; border-radius: 50%; background: var(--bg); }

/* ---------- starting up ---------- */
.boot {
  min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; justify-items: center;
  gap: 16px; padding: 24px; text-align: center;
}
.boot p { margin: 0; max-width: 300px; }
/* Only appears if the app hasn't started after 8 seconds (no internet, or a file didn't load). */
.boot-slow { color: var(--muted); opacity: 0; animation: appear .2s 8s forwards; }
@keyframes appear { to { opacity: 1; } }
.boot-note { margin: 16px; padding: 12px 14px; border-radius: 10px; background: var(--red-soft); color: var(--red-ink); }

/* ---------- messages ---------- */
.msg { margin: 0; padding: 12px 14px; border-radius: 10px; font-size: 15px; }
.msg-error { background: var(--red-soft); color: var(--red-ink); }
.msg-info { background: var(--sage-soft); color: var(--sage-ink); }
.banner {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--red-soft); color: var(--red-ink);
  border-bottom: 1px solid var(--line);
}
.banner p { margin: 10px 0; }
.banner button {
  flex: none; min-width: 48px; min-height: 44px; padding: 0 6px; border: 0; background: none;
  color: inherit; font-weight: 600; text-decoration: underline; cursor: pointer;
}

/* ---------- forms and buttons ---------- */
.stack { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 15px; }
.field input {
  width: 100%; min-height: 52px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line2);
  background: var(--surface); font-size: 17px;
}
.field input:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-soft); }
.field .code-input { font-size: 24px; letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 52px;
  padding: 12px 18px; border: 0; border-radius: 10px; background: var(--sage-ink); color: var(--bg);
  font-size: 17px; font-weight: 600; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.btn:disabled { opacity: .6; cursor: default; }
.btn-quiet { background: var(--surface); color: var(--ink); border: 1px solid var(--line2); }
.btn-plain { background: none; color: var(--sage-ink); min-height: 48px; padding: 8px; font-size: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 4px; }
.row .btn { flex: 1 1 auto; width: auto; }
.hint { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- sign-in ---------- */
.auth {
  min-height: 100vh; min-height: 100dvh; max-width: 420px; margin: 0 auto; display: flex; flex-direction: column;
  justify-content: center; gap: 28px; padding: 32px 20px calc(32px + env(safe-area-inset-bottom));
}
.auth h1 { font-size: 26px; }
.lead { margin: 8px 0 0; color: var(--muted); }
.lead strong { color: var(--ink); word-break: break-all; }

/* ---------- screens ---------- */
.screen { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(var(--tabbar) + 24px + env(safe-area-inset-bottom)); }
.top { padding: 8px 0 18px; }
.sub { margin: 4px 0 0; color: var(--muted); }
.empty { padding: 28px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-align: center; }
.empty svg { width: 36px; height: 36px; color: var(--sage); }
.empty h2 { margin: 12px 0 6px; font-size: 18px; }
.empty p { max-width: 320px; margin: 0 auto; color: var(--muted); }
.soon {
  display: inline-block; margin-top: 14px; padding: 3px 10px; border-radius: 999px;
  background: var(--amber-soft); color: var(--amber-ink); font-size: 13px; font-weight: 500;
}
.list .soon { margin-top: 0; }
.card { padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.card h2 { margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.card p { margin: 0 0 4px; overflow-wrap: anywhere; }
.card .msg { margin-bottom: 12px; }
.list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.list > li { border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 16px; }
.version { margin: 4px 0 0; color: var(--faint); font-size: 13px; text-align: center; }

/* ---------- icons ---------- */
.icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- bottom bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: var(--tabbar); color: var(--muted); font-size: 12px; font-weight: 500; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--sage-ink); }
.tab[aria-current="page"] .icon { stroke-width: 2.3; }

/* ---------- the strip that says "your data" or "sample data" ---------- */
.sample-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 8px;
  margin: -4px 0 12px; padding: 0 4px 0 12px; border-radius: 10px;
  background: var(--amber-soft); color: var(--amber-ink); font-size: 13px; font-weight: 500;
}
.sample-bar.real { background: var(--sage-soft); color: var(--sage-ink); }
.empty .not-built-more { margin-top: 14px; }
.sample-bar button {
  min-height: 44px; padding: 0 8px; border: 0; background: none; color: inherit;
  font-size: 13px; font-weight: 600; text-decoration: underline; cursor: pointer;
}

/* ---------- shared pieces ---------- */
.loading { padding: 16px 0; }
.small { font-size: 14px; }
.section { margin-top: 24px; }
.section-title {
  margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.count {
  margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--line); color: var(--ink);
  font-size: 12px; font-weight: 600; letter-spacing: 0;
}
.none { margin: 0; padding: 14px 16px; border: 1px dashed var(--line2); border-radius: var(--r); color: var(--muted); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  background: var(--line); color: var(--ink); font-size: 13px; font-weight: 500;
}
.chip-ok { background: var(--sage-soft); color: var(--sage-ink); }
.chip-warn { background: var(--amber-soft); color: var(--amber-ink); }
.chip-bad { background: var(--red-soft); color: var(--red-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.back {
  display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin: -8px 0 4px -6px; padding: 0 6px;
  color: var(--sage-ink); font-weight: 600; text-decoration: none;
}
.back svg { width: 20px; height: 20px; }
.row-link { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px; color: inherit; text-decoration: none; }
.row-time { flex: none; width: 76px; font-weight: 600; font-variant-numeric: tabular-nums; }
.row-main { flex: 1; min-width: 0; display: grid; }
.row-main > * { overflow: hidden; text-overflow: ellipsis; }
.channel {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--sage-soft); color: var(--sage-ink);
}
.channel svg { width: 20px; height: 20px; }
.btn-small { flex: 1 1 auto; width: auto; min-height: 44px; padding: 8px 14px; font-size: 15px; }

/* Filtered out (decision 36) */
.filtered-link { margin: 16px 0 0; display: grid; gap: 2px; }
.filtered-link a { color: var(--sage-ink); font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }
.filtered-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.filtered-row .btn-small { flex: none; }
.filtered-row .summary { overflow-wrap: anywhere; }
.filtered + .hint, .hint + .filtered { margin-top: 12px; }

/* ---------- notes that pop up above the bottom bar ---------- */
.toast-area {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 12px); z-index: 30;
  display: flex; justify-content: center; padding: 0 12px; pointer-events: none;
}
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; width: 100%; max-width: 480px;
  padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--ink); color: var(--bg); box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
}
.toast p { flex: 1; margin: 0; font-size: 15px; }
.toast button {
  flex: none; min-width: 48px; min-height: 44px; border: 0; border-radius: 8px; background: none; color: inherit;
  font-weight: 700; cursor: pointer;
}

/* ---------- Today ---------- */
.cards { display: grid; gap: 12px; }
.card-item { padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.card-who {
  display: inline-block; padding: 12px 0; margin: -12px 0; color: var(--sage-ink);
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.card-item h3 { margin: 0 0 4px; font-size: 17px; line-height: 1.3; }
.card-item p { margin: 0; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.card-item .card-note { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--amber-soft); color: var(--amber-ink); font-size: 14px; }
.card-item .card-code {
  width: fit-content; margin-top: 6px; padding: 6px 12px; border-radius: 8px; background: var(--line); color: var(--ink);
  font: 600 18px ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; user-select: all;
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.feed { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.feed li, .timeline li { display: flex; align-items: flex-start; gap: 10px; }
.feed svg, .timeline svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--sage); }
.feed p, .timeline p { margin: 0; overflow-wrap: anywhere; }

/* ---------- Pipeline ---------- */
.stage-chips { display: flex; gap: 6px; margin: 0 -16px 12px; padding: 0 16px 4px; overflow-x: auto; scrollbar-width: none; }
.stage-chip {
  flex: none; min-height: 44px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 999px;
  background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer;
}
.board {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(82%, 300px); gap: 12px;
  margin: 0 -16px; padding: 0 16px 8px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px;
}
.column { display: grid; align-content: start; gap: 8px; padding: 12px; border-radius: var(--r); background: var(--line); scroll-snap-align: start; }
.column h2 { display: flex; align-items: center; margin: 0 0 4px; font-size: 15px; }
.column h2 .count { margin-left: auto; background: var(--surface); }
.deal-card {
  display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: inherit; text-decoration: none;
}
.deal-card .next { color: var(--muted); font-size: 14px; }
.deal-card .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.deal-card.lost { opacity: .75; }

/* ---------- Inbox ---------- */
.inbox-row { display: flex; align-items: flex-start; gap: 12px; min-height: 64px; padding: 12px 16px; color: inherit; text-decoration: none; }
.inbox-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.inbox-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.inbox-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.inbox-top .small { flex: none; }
.unread .inbox-top strong { font-weight: 700; }
.summary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 15px; }
.unread .summary { color: var(--ink); }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--sage); vertical-align: middle; }
.thread-links { margin: -6px 0 12px; }
.thread-links a { display: inline-block; padding: 12px 0; margin: -12px 0; font-weight: 600; }
.ai-summary { margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; background: var(--sage-soft); color: var(--sage-ink); font-size: 15px; }
.ai-summary strong { display: block; margin-bottom: 2px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.thread { display: grid; gap: 10px; margin: 0 0 20px; padding: 0; list-style: none; }
.bubble { max-width: 85%; padding: 10px 12px; border-radius: 14px; }
.bubble p { margin: 0; overflow-wrap: anywhere; }
.bubble.in { justify-self: start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.out { justify-self: end; background: var(--sage-soft); border-bottom-right-radius: 4px; }
.bubble .bubble-meta { margin-top: 4px; color: var(--muted); font-size: 12px; }
.bubble .bubble-text { white-space: pre-wrap; }
.bubble .bubble-subject { margin-bottom: 2px; font-weight: 600; }
.bubble .bubble-files { margin-top: 6px; color: var(--muted); font-size: 13px; }
.bubble-more {
  min-height: 44px; padding: 0; border: 0; background: none; color: var(--sage-ink);
  font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; cursor: pointer;
}
.coming { margin-top: 24px; }
.reply textarea {
  width: 100%; min-height: 96px; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 10px;
  background: var(--surface); font: inherit; font-size: 17px; resize: vertical;
}
.reply textarea:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-soft); }

/* ---------- Tenant page ---------- */
.top + .chips { margin: -8px 0 4px; }
.facts { display: grid; gap: 1px; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--line); }
.facts div { display: grid; grid-template-columns: 88px 1fr; gap: 12px; padding: 12px 16px; background: var(--surface); }
.facts dt { color: var(--muted); font-size: 15px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.from-email { display: block; color: var(--muted); font-size: 13px; }
.deal-row { display: grid; gap: 6px; padding: 12px 16px; }
.doc-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.portal-link, .onboarding-link {
  margin: 8px 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--line);
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere;
}
.switch { display: flex; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; }
.switch input {
  appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 52px; height: 32px; margin: 0;
  border-radius: 999px; background: var(--line2); cursor: pointer; transition: background .15s;
}
.switch input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s;
}
.switch input:checked { background: var(--sage); }
.switch input:checked::after { transform: translateX(20px); }
.day { margin: 16px 0 8px; color: var(--muted); font-size: 14px; font-weight: 600; }
.timeline { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.clamp { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

/* ---------- more shared pieces (step 5, part 2) ---------- */
.spaced { margin-top: 16px; }
.hint { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field select {
  width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 17px;
}
.field select:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-soft); }
.chev { flex: none; color: var(--faint); font-size: 22px; line-height: 1; }
.with-icon { display: inline-flex; align-items: center; gap: 8px; }
.with-icon svg { width: 20px; height: 20px; color: var(--sage-ink); }
.row-button { width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.list > li.selected { background: var(--sage-soft); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--sage-ink); }

/* ---------- Calendar ---------- */
.week-nav { display: flex; gap: 8px; margin-bottom: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 12px; padding: 0; list-style: none; color: var(--muted); font-size: 13px; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.key { width: 14px; height: 14px; border-radius: 4px; }
.key.free { background: var(--sage-soft); border: 1px solid var(--sage); }
.key.busy { background: repeating-linear-gradient(135deg, var(--line2) 0 3px, var(--line) 3px 6px); }
.key.viewing { background: var(--sage-ink); }
.key.off { background: var(--red-soft); border: 1px solid var(--red-ink); }
.week { margin-top: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.week-head {
  position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 38px repeat(7, 1fr);
  border-bottom: 1px solid var(--line); background: var(--surface);
}
.day-name { display: grid; justify-items: center; padding: 6px 0; color: var(--muted); font-size: 12px; }
.day-name strong { display: grid; place-items: center; width: 28px; height: 28px; color: var(--ink); font-size: 16px; }
.day-name.today strong { border-radius: 50%; background: var(--sage-ink); color: var(--bg); }
.week-body { position: relative; display: grid; grid-template-columns: 38px repeat(7, 1fr); }
.hours { position: relative; }
.hours span { position: absolute; right: 4px; margin-top: 2px; color: var(--faint); font-size: 10px; white-space: nowrap; }
.day-col {
  position: relative; border-left: 1px solid var(--line);
  background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 48px);
}
.day-col.editing { touch-action: none; cursor: crosshair; }
.block { position: absolute; left: 2px; right: 2px; overflow: hidden; border-radius: 6px; font-size: 11px; }
.block.free { padding: 0; border: 1px solid var(--sage); background: var(--sage-soft); }
.day-col.editing .block.free { cursor: pointer; }
/* Hours for one date only (not every week). */
.block.free.once { border: 2px dotted var(--sage-ink); }
.block.busy { left: 45%; background: repeating-linear-gradient(135deg, var(--line2) 0 3px, var(--line) 3px 6px); }
.block.viewing {
  z-index: 1; display: flex; align-items: flex-start; padding: 2px 3px; background: var(--sage-ink); color: var(--bg);
  font-weight: 600; text-decoration: none;
}
.block.viewing.unconfirmed { border: 1px dashed var(--amber-ink); background: var(--amber-soft); color: var(--amber-ink); }
.block.off {
  display: flex; align-items: center; justify-content: center; border: 1px solid var(--red-ink);
  background: var(--red-soft); color: var(--red-ink); font-weight: 600;
}
.block.drafting { z-index: 1; background: var(--sage); opacity: .5; }
.add-hours { margin-top: 20px; }

/* ---------- Properties ---------- */
.map { display: block; width: 100%; height: auto; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); }
.map .land { fill: var(--surface); }
.map .lake { fill: var(--lake); }
.map .road { stroke: var(--line2); stroke-width: 2; }
.map .road.major { stroke-width: 3.5; }
.map-label { fill: var(--faint); font-family: var(--font); font-size: 9px; }
.map .lake-label { fill: var(--muted); font-style: italic; }
.pin { cursor: pointer; }
.pin circle { fill: var(--sage-ink); stroke: var(--surface); stroke-width: 2; }
.pin text { fill: var(--bg); font-family: var(--font); font-size: 10px; font-weight: 700; text-anchor: middle; }
.pin.approximate circle { fill: var(--amber-ink); }
.pin.selected circle { fill: var(--red-ink); stroke-width: 3; }
.pin:focus { outline: none; }
.pin:focus-visible circle { stroke: var(--ink); stroke-width: 3; }
.pin-no {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--sage-ink); color: var(--bg); font-size: 13px; font-weight: 700;
}
.map-note { margin: 6px 0 12px; }
.pin-no.off { background: var(--line); color: var(--muted); }
.map-img { aspect-ratio: auto; background: var(--surface); }
.map-loading { display: grid; place-items: center; aspect-ratio: 358 / 220; color: var(--muted); font-size: 14px; }
.add-row { margin: 0 0 12px; }
.suggestions { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.suggestions li + li { border-top: 1px solid var(--line); }
.suggestion {
  display: grid; gap: 2px; width: 100%; min-height: 48px; padding: 10px 14px; border: 0; background: none;
  color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.suggestion:hover, .suggestion:focus-visible { background: var(--sage-soft); }

/* ---------- Settings ---------- */
.setup-card { display: grid; gap: 10px; margin-bottom: 16px; }
.setup-card h2, .setup-card p { margin: 0; }
.progress { display: grid; grid-auto-flow: column; gap: 4px; margin: 4px 0; }
.progress span { height: 6px; border-radius: 3px; background: var(--line); }
.progress span.done { background: var(--sage); }
.switch-row { padding: 6px 16px; }
.switch .row-main { display: grid; }
.template-body { padding: 0 16px 14px 64px; }
.template-body p { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.steps { display: grid; gap: 6px; margin: 0; padding-left: 20px; }
.wizard { margin-top: 16px; }

/* ---------- Tenant portal ---------- */
.portal-head { display: grid; gap: 4px; margin-bottom: 16px; padding: 4px 0 16px; border-bottom: 1px solid var(--line); }
.portal-head p { margin: 0; }
.agent { display: grid; }
.portal h1 { margin-bottom: 8px; }
.portal .card { margin-bottom: 12px; }
.checklist { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.checklist > li { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.checklist > li.done { border-color: var(--sage); }
.checklist p { margin: 0; }
.points { display: grid; gap: 4px; margin: 0; padding-left: 20px; font-size: 15px; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slots .btn { flex: 1 1 45%; }
.tabbar.four { grid-template-columns: repeat(4, 1fr); }
.tabbar.three { grid-template-columns: repeat(3, 1fr); }
.portal .card .day { margin: 4px 0 0; }

/* ---------- step 9: changing a deal on the tenant page ---------- */
.deal-actions { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- step 10: the unsubscribe page, and outgoing email ---------- */
.unsubscribe { max-width: 480px; margin: 0 auto; padding: 32px 16px; display: grid; gap: 16px; }
.unsubscribe h1 { margin: 0; font-size: 24px; }
.unsubscribe p { margin: 0; }
.bubble-status { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.bubble-status.bad { color: var(--red-ink); font-weight: 600; }
.reply .alt-link { font-size: 15px; }

/* ---------- Automatic emails: sign-off and templates (step 10, part 2) ---------- */
.msg-warn { background: var(--amber-soft); color: var(--amber-ink); }
.template-form textarea {
  width: 100%; min-height: 140px; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 10px;
  background: var(--surface); color: inherit; font: inherit; font-size: 17px; resize: vertical;
}
.template-form textarea:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-soft); }
.template-form .actions { margin-top: 0; }
.signoff { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--line); font-size: 15px; white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- Calendar: offered times, time off, rules, own calendar (step 11) ---------- */
.offered .row-main .small { white-space: normal; }
.how { margin-top: 12px; }
.how summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--sage-ink); }
.how p { margin: 8px 0; }

/* ---------- Calendar: hours for that date only, or every week ---------- */
.repeat-choice { display: grid; gap: 4px; margin: 12px 0 0; padding: 0; border: 0; }
.repeat-choice legend { padding: 0; margin-bottom: 4px; color: var(--muted); }

/* ---------- Listing agents and viewing requests (step 13) ---------- */
.choices { margin: 0; padding: 0; border: 0; }
.choices legend { padding: 0; margin-bottom: 4px; font-weight: 600; font-size: 15px; }
.choice { align-items: flex-start; padding: 8px 0; }
.field .choice { font-weight: 400; }   /* a choice's label isn't bold (unlike a field's): only its name is */
.choice input { flex: none; margin-top: 2px; }
.choice .row-main .small, .viewing-row .record { white-space: normal; overflow-wrap: anywhere; }
.field .label { font-weight: 600; font-size: 15px; }
.viewing-row { align-items: flex-start; padding-top: 10px; padding-bottom: 10px; }
.timeline .note { color: var(--muted); font-size: 14px; }
.summary .lister { font-weight: 600; color: var(--sage-ink); }

/* ---------- The listing agent's answer page (step 13, part 2) ---------- */
.answer-page textarea {
  width: 100%; min-height: 96px; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 10px;
  background: var(--surface); color: inherit; font: inherit; font-size: 17px; resize: vertical;
}
.answer-page textarea:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-soft); }
.answer-page .facts div { grid-template-columns: 64px 1fr; }

/* ---------- the tenant's documents page (step 15) ---------- */
.doc-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
label.btn { cursor: pointer; text-align: center; }
label.btn.disabled { opacity: .6; cursor: default; }
.doc-files li { overflow-wrap: anywhere; }
.doc-files .btn { width: auto; min-height: 40px; padding: 6px 12px; font-size: 15px; margin-left: 6px; }
.doc-block { display: grid; gap: 10px; padding: 14px; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-block .field select { width: 100%; min-height: 48px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--surface); font-size: 16px; }
