/* The field app: one hand, bright sun, a cheap Android. Big type, big
   targets, high contrast, nothing that needs a hover. Laid out for a phone;
   on a desktop it stays a phone-width column. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* The hidden attribute must win over any display a class below sets. */
[hidden] { display: none !important; }

/* The palette. Every colour on a field screen comes from here, so the dark
   block below only has to redefine these - and "system" is the browser's own
   preference, honoured when no explicit choice is stored (see theme.js). */
:root {
  color-scheme: light;
  --map-ctrl-bg: #ffffff;
  --map-ctrl-line: rgba(15, 39, 66, 0.16);
  --map-ctrl-hover: #f1f5f9;
  --map-ctrl-filter: none;
  --brand: #2563eb;
  --brand-600: #1d4ed8;
  --brand-50: #eaf1ff;
  --brand-100: #cddcfd;
  --brand-ink: #1d4ed8;          /* the accent as text, on a page surface */
  --btn-fill: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);  /* a solid button, both themes */
  --navy: #13264a;
  --navy-2: #1e3a6e;
  --accent: #93c5fd;
  --badge-bg: #1e3a6e;           /* the numbered badge on a question */
  --pick-bg: #1d4ed8;            /* a chosen chip */
  --pick-ink: #ffffff;
  --bg: #f7f5ee;
  --card: #ffffff;
  --card-bd: #e7e3d6;
  --ink: #1e2b3c;
  --ink-2: #4c5a6e;
  --muted: #737160;
  --line: #e7e3d6;
  --line-2: #d6d0bf;
  --soft: #fbfaf5;
  --tint: #ede9dc;               /* a quiet filled circle or tile */
  --track: #edebe2;              /* the unfilled half of a bar */
  --neutral-bg: #f2f0e9;
  --field-bg: #ffffff;
  --field-bd: #d9d3c2;
  --chip-bg: #ffffff;
  --placeholder: #a19d8c;
  --sheet-bg: #efece2;           /* behind the map picker */
  --bar-bg: rgba(255, 253, 247, 0.92);
  --toast-bg: #1e2b3c;
  --toast-ink: #ffffff;
  /* Status: a fill keeps white on it in both themes, so only the tints,
     the borders and the text colours move. */
  --yes: #16794a;
  --yes-50: #e4f4ec;
  --yes-bd: #bde2cd;
  --yes-ink: #16794a;
  --no: #b3261e;
  --no-50: #fcebe9;
  --no-bd: #f2c7c2;
  --no-ink: #b3261e;
  /* Hot / warm / cold on a lead (services/desk.py HEAT). */
  --heat-hot: #c2410c;
  --heat-hot-bg: #ffedd5;
  --heat-warm: #a16207;
  --heat-warm-bg: #fef3c7;
  --heat-cold: #1d4ed8;
  --heat-cold-bg: #e3edff;
  --warn: #8a5300;
  --warn-50: #fff4e0;
  --warn-bd: #f0d8ab;
  --warn-solid: #d9912b;
  --info-50: #e9f1fb;
  --info-bd: #c9dbf0;
  --info-ink: #1e3f6b;
  --radius: 16px;
  --tap: 48px;
  --shadow: 0 1px 2px rgba(16, 34, 64, 0.05), 0 6px 18px rgba(16, 34, 64, 0.06);
  --fresh-sky: radial-gradient(700px 360px at 90% -120px, rgba(250, 196, 96, 0.2), transparent 62%), radial-gradient(560px 320px at 0% -100px, rgba(120, 170, 255, 0.14), transparent 55%);
}

/* Dark. One list of tokens, applied twice: once for the phone set to dark with
   no choice of ours stored (system), once for an explicit choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --map-ctrl-bg: #16202f;
    --map-ctrl-line: rgba(255, 255, 255, 0.16);
    --map-ctrl-hover: #1e2a3c;
    --map-ctrl-filter: invert(0.92);
    --brand: #3b82f6;
    --brand-600: #2563eb;
    --brand-50: rgba(59, 130, 246, 0.16);
    --brand-100: #1e3a70;
    --brand-ink: #93b8fd;
    --navy: #111c2e;
    --navy-2: #17273f;
    --badge-bg: #2a4a8a;
    --pick-bg: #2f5fc4;
    --bg: #0b1018;
    --card: #131a26;
    --card-bd: #232e42;
    --ink: #e7eef8;
    --ink-2: #b4c2d4;
    --muted: #8496ac;
    --line: #232e42;
    --line-2: #33415a;
    --soft: #1a2434;
    --tint: #223046;
    --track: #223046;
    --neutral-bg: #1e2839;
    --field-bg: #101827;
    --field-bd: #35435c;
    --chip-bg: #18212f;
    --placeholder: #6f7f95;
    --sheet-bg: #0f1622;
    --bar-bg: rgba(15, 22, 34, 0.92);
    --toast-bg: #e7eef8;
    --toast-ink: #0b111c;
    --yes-50: rgba(45, 190, 120, 0.16);
    --yes-bd: rgba(60, 190, 120, 0.38);
    --yes-ink: #5cd39a;
    --no-50: rgba(230, 90, 80, 0.16);
    --no-bd: rgba(230, 100, 90, 0.4);
    --no-ink: #ff9a90;
    --heat-hot: #fdba74;
    --heat-hot-bg: rgba(234, 88, 12, 0.2);
    --heat-warm: #fcd34d;
    --heat-warm-bg: rgba(202, 138, 4, 0.2);
    --heat-cold: #93c5fd;
    --heat-cold-bg: rgba(59, 130, 246, 0.2);
    --warn-50: rgba(225, 155, 45, 0.16);
    --warn-bd: rgba(230, 170, 60, 0.38);
    --warn: #e3a848;
    --info-50: rgba(90, 145, 235, 0.16);
    --info-bd: rgba(120, 170, 240, 0.34);
    --info-ink: #9dc2f5;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 18px rgba(0, 0, 0, 0.35);
    --fresh-sky: radial-gradient(700px 360px at 90% -120px, rgba(251, 191, 36, 0.05), transparent 62%), radial-gradient(560px 320px at 0% -100px, rgba(59, 130, 246, 0.07), transparent 55%);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --map-ctrl-bg: #16202f;
  --map-ctrl-line: rgba(255, 255, 255, 0.16);
  --map-ctrl-hover: #1e2a3c;
  --map-ctrl-filter: invert(0.92);
  --brand: #3b82f6;
  --brand-600: #2563eb;
  --brand-50: rgba(59, 130, 246, 0.16);
  --brand-100: #1e3a70;
  --brand-ink: #93b8fd;
  --navy: #111c2e;
  --navy-2: #17273f;
  --badge-bg: #2a4a8a;
  --pick-bg: #2f5fc4;
  --bg: #0b1018;
  --card: #131a26;
  --card-bd: #232e42;
  --ink: #e7eef8;
  --ink-2: #b4c2d4;
  --muted: #8496ac;
  --line: #232e42;
  --line-2: #33415a;
  --soft: #1a2434;
  --tint: #223046;
  --track: #223046;
  --neutral-bg: #1e2839;
  --field-bg: #101827;
  --field-bd: #35435c;
  --chip-bg: #18212f;
  --placeholder: #6f7f95;
  --sheet-bg: #0f1622;
  --bar-bg: rgba(15, 22, 34, 0.92);
  --toast-bg: #e7eef8;
  --toast-ink: #0b111c;
  --yes-50: rgba(45, 190, 120, 0.16);
  --yes-bd: rgba(60, 190, 120, 0.38);
  --yes-ink: #5cd39a;
  --no-50: rgba(230, 90, 80, 0.16);
  --no-bd: rgba(230, 100, 90, 0.4);
  --no-ink: #ff9a90;
  --heat-hot: #fdba74;
  --heat-hot-bg: rgba(234, 88, 12, 0.2);
  --heat-warm: #fcd34d;
  --heat-warm-bg: rgba(202, 138, 4, 0.2);
  --heat-cold: #93c5fd;
  --heat-cold-bg: rgba(59, 130, 246, 0.2);
  --warn-50: rgba(225, 155, 45, 0.16);
  --warn-bd: rgba(230, 170, 60, 0.38);
  --warn: #e3a848;
  --info-50: rgba(90, 145, 235, 0.16);
  --info-bd: rgba(120, 170, 240, 0.34);
  --info-ink: #9dc2f5;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 18px rgba(0, 0, 0, 0.35);
  --fresh-sky: radial-gradient(700px 360px at 90% -120px, rgba(251, 191, 36, 0.05), transparent 62%), radial-gradient(560px 320px at 0% -100px, rgba(59, 130, 246, 0.07), transparent 55%);
}


html { -webkit-text-size-adjust: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
body.sheet-open, body.precise-open { overflow: hidden; }
a { color: var(--brand-600); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus-ring, rgba(37, 99, 235, 0.45)); outline-offset: 2px; }
svg { display: block; }

/* ---------- Header ---------- */
.bar {
  position: sticky;
  top: var(--env-h, 0px);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 8px 16px;
  padding-top: max(8px, env(safe-area-inset-top));
  background: var(--navy);
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: #fff; text-decoration: none; }
/* The company's logo, on every screen's bar (_app_shell.html logo()). A white
   chip whatever the theme: a logo is drawn for a light page, and a navy mark
   would vanish into the navy bar. The app's own drawn icon, standing in while
   no logo is uploaded, is already a navy tile, so it goes without the chip. */
.bar-logo {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  height: 30px; min-width: 30px; max-width: 92px; padding: 4px 5px;
  background: #fff; border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 4px 12px -4px rgba(3, 10, 26, 0.55);
}
/* Sized in the markup too (height="22"), so a phone still holding an older
   copy of this sheet shows a small mark rather than the picture's own size. */
.bar-logo img { display: block; height: 100%; width: auto; max-width: 82px; object-fit: contain; }
.bar-logo.stand-in { padding: 0; background: none; box-shadow: none; }
.bar-logo.stand-in img { width: 30px; max-width: none; border-radius: 8px; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* On the bar only: the field activity app's lists have a .brand-tag of their
   own (a record's company), which this must not become. */
.bar .brand-tag {
  flex: none; font-size: 10.5px; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase;
  color: #cfe0fd; background: rgba(147, 197, 253, 0.12); border: 1px solid rgba(147, 197, 253, 0.32);
  border-radius: 999px; padding: 3px 9px 2px;
}
.bar-right { display: flex; align-items: center; gap: 8px; flex: none; }
.bar-btn {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  background: rgba(255, 255, 255, 0.08); color: #e5eef8;
  border: 1px solid rgba(255, 255, 255, 0.24); border-radius: 10px;
  padding: 8px 12px; font-size: 14px; font-weight: 650; min-height: 40px;
  text-decoration: none;
}
.bar-btn svg { width: 18px; height: 18px; flex: none; }
.bar-btn:disabled, .bar-btn[aria-disabled="true"] { opacity: 0.5; }
.bar-badge {
  min-width: 20px; padding: 0 5px; border-radius: 999px; font-variant-numeric: tabular-nums;
  background: var(--accent); color: #0b2a4d; font-size: 12px; font-weight: 800;
  line-height: 20px; text-align: center;
}
/* One hand and a narrow phone: the labels go before the buttons do, the
   newer one last. */
@media (max-width: 420px) { .bar-btn-t { display: none; } }
@media (max-width: 359px) { #drafts-open span { display: none; } }
.back { display: flex; align-items: center; gap: 4px; min-width: 0; color: #fff; text-decoration: none; font-weight: 700; font-size: 17px; min-height: 42px; margin-left: -6px; }
.back svg { width: 26px; height: 26px; flex: none; }
.back .bar-logo { height: 28px; min-width: 28px; margin-right: 6px; border-radius: 8px; }
.back .bar-logo.stand-in img { width: 28px; border-radius: 8px; }
.back-t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Layout ---------- */
.wrap { max-width: 560px; margin: 0 auto; padding: 14px 14px 32px; display: grid; gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; box-shadow: var(--shadow); }
.card h2 { font-size: 17px; font-weight: 700; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.foot { text-align: center; font-size: 14.5px; padding: 6px 0 10px; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 12px 18px;
  background: var(--btn-fill); color: #fff; border: 0; border-radius: 12px;
  font-size: 16px; font-weight: 700; text-decoration: none;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease,
              box-shadow .2s ease, transform .2s ease;
}
.btn:disabled { opacity: 0.55; cursor: default; }
.btn svg { width: 22px; height: 22px; }
.btn.big { width: 100%; min-height: 56px; border-radius: 14px; font-size: 17.5px; }
.btn.small { min-height: 40px; padding: 8px 14px; font-size: 14.5px; border-radius: 10px; }
.btn.ghost { background: var(--card); color: var(--brand-600); border: 1.5px solid var(--brand-100); }
.btn.light { background: #fff; color: var(--navy); }

/* Every button turns inside out under the pointer: a solid one goes white
   with its fill as the text, a white or outlined one fills with the brand.
   A gradient cannot be transitioned, so the solid button's white is a layer
   under the text that fades in. On a phone there is no hover and a tapped
   button keeps :hover until the next tap, so there the flip is :active only -
   it shows while the thumb is down and lets go with it. The glass button on
   the activity hero (.near-btn) keeps its own look. */
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--ring-c, var(--brand));
  opacity: 0; transition: opacity .2s ease;
}
.btn:not(.ghost):not(.light):not(.near-btn):not(:disabled):active { color: var(--brand-600); }
.btn:not(.ghost):not(.light):not(.near-btn):not(:disabled):active::before { opacity: 1; }
.btn.ghost:not(:disabled):active,
.btn.light:not(:disabled):active {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.all-done .savebar .btn.big:not(.ghost) { --ring-c: var(--yes); }
.all-done .savebar .btn.big:not(.ghost):active { color: var(--yes); }
@media (hover: hover) {
  .btn:not(.ghost):not(.light):not(.near-btn):not(:disabled):hover,
  .btn:not(.ghost):not(.light):not(.near-btn):focus-visible {
    color: var(--brand-600); transform: translateY(-1px);
    box-shadow: 0 8px 20px -8px var(--btn-shadow, rgba(37, 99, 235, 0.6));
  }
  .btn:not(.ghost):not(.light):not(.near-btn):not(:disabled):hover::before,
  .btn:not(.ghost):not(.light):not(.near-btn):focus-visible::before { opacity: 1; }
  .btn.ghost:not(:disabled):hover, .btn.ghost:focus-visible,
  .btn.light:not(:disabled):hover, .btn.light:focus-visible {
    background: var(--brand); border-color: var(--brand); color: #fff;
    transform: translateY(-1px); box-shadow: 0 8px 20px -8px var(--btn-shadow, rgba(37, 99, 235, 0.6));
  }
  .all-done .savebar .btn.big:not(.ghost):hover {
    color: var(--yes); box-shadow: 0 8px 20px -8px rgba(22, 121, 74, 0.6);
  }
}

/* ---------- Home ---------- */
.hero {
  background: linear-gradient(155deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff; border-radius: 20px; padding: 18px 16px 16px;
  box-shadow: 0 10px 28px rgba(16, 34, 64, 0.22);
}
.hero-top { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #0b2a4d; font-weight: 800; font-size: 20px;
}
.hello { font-size: 19px; font-weight: 700; line-height: 1.25; }
.role { color: #c3d3e7; font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 14px; }
.stat { background: rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 10px 6px 8px; text-align: center; }
.stat b { display: block; font-size: 23px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11.5px; color: #c3d3e7; }
@media (max-width: 350px) { .stats { grid-template-columns: repeat(2, 1fr); } }
/* A late lead is said by the tile's label too, not the colour alone. */
.stat.late b { color: #ffc978; }
.hero-note { font-size: 12.5px; color: #c3d3e7; margin-top: -4px; }
/* The same tiles on a card rather than the navy hero. */
.stats.on-card { margin: 10px 0 8px; }
.stats.on-card .stat { background: var(--soft); border: 1px solid var(--line); }
.stats.on-card .stat span { color: var(--muted); }
.stats.on-card .stat.late b { color: var(--warn); }
/* Outbound calls and Given to you (19 Oct 2026): a second row under the
   four, two tiles wide, each with a line under its label - how many are due
   or late, how many not rung yet. One tile alone takes the whole row. */
.stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: -6px; }
.stats.two.one { grid-template-columns: minmax(0, 1fr); }
.stats.two.on-card { margin-top: 0; }
.stat-sub { display: block; margin-top: 2px; font-size: 11px; line-height: 1.3; color: #c3d3e7; opacity: 0.8; }
.stat-sub.late, .stat-sub.new { opacity: 1; font-weight: 700; color: #ffc978; }
.stats.on-card .stat-sub { color: var(--muted); }
.stats.on-card .stat-sub.late, .stats.on-card .stat-sub.new { color: var(--warn); }

.count { font-size: 13px; font-weight: 800; color: var(--brand-600); background: var(--brand-50); border-radius: 999px; padding: 2px 10px; }
.list { list-style: none; margin-top: 6px; }
.list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.time { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.who-cell b { display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-cell small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { font-size: 12px; font-weight: 750; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.pill.yes { background: var(--yes-50); color: var(--yes-ink); }
.pill.no { background: var(--neutral-bg); color: var(--ink-2); }
/* One of our own customers, met on a survey (forms "existing_customer"). */
.pill.ours { background: var(--info-50); color: var(--info-ink); }
/* New connection or existing customer: two wide chips side by side. */
.choices.cust-kind { display: grid; grid-template-columns: 1fr 1fr; }
.choices.cust-kind .choice span { justify-content: center; text-align: center; font-weight: 650; }
.empty { color: var(--muted); padding: 8px 0 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { background: var(--brand-50); color: var(--brand-ink); font-size: 13.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px; }

.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 14px; padding: 12px 14px; font-size: 14.5px; }
.banner b { display: block; }
.banner.warn { background: var(--warn-50); color: var(--warn); border: 1px solid var(--warn-bd); }
.banner.ok { background: var(--yes-50); color: var(--yes-ink); border: 1px solid var(--yes-bd, var(--yes)); }
.banner.err { background: var(--no-50); color: var(--no-ink); border: 1px solid var(--no-bd); margin-top: 8px; }
.banner.info { justify-content: flex-start; background: var(--info-50); color: var(--info-ink); border: 1px solid var(--info-bd); }
.banner.info svg { width: 22px; height: 22px; flex: none; }
.banner.info.spread { justify-content: space-between; }
.banner .btn.small { flex: none; white-space: nowrap; }
.banner .actions { display: flex; gap: 6px; flex: none; }

/* ---------- Sign in ---------- */
.auth { margin-top: 5vh; padding: 24px 20px; }
.auth-logo { display: block; height: 44px; max-width: 160px; object-fit: contain; margin: 0 auto 14px; }
.auth h1 { font-size: 24px; text-align: center; }
.auth > p.muted { text-align: center; margin: 6px 0 4px; }
.auth .btn.big { margin-top: 20px; }
.alert { background: var(--no-50); color: var(--no-ink); border-radius: 12px; padding: 11px 13px; font-size: 14.5px; font-weight: 600; margin-top: 14px; }
/* Already signed in to the panel in this browser: who, and one button. */
.auth-who { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--soft); border: 1.5px solid var(--line); }
.auth-who b { display: block; font-size: 16.5px; overflow-wrap: anywhere; }
.auth-who small { display: block; color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.auth-avatar { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: 19px; }
.auth-note { text-align: center; color: var(--muted); font-size: 13.5px; margin-top: 10px; }
.auth-other { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.auth-other summary { list-style: none; text-align: center; font-weight: 700; color: var(--brand-ink); cursor: pointer; padding: 8px 0; }
.auth-other summary::-webkit-details-marker { display: none; }

/* ---------- Form ---------- */
/* The survey reads as three short parts - the visit, the customer, their
   response - each a run of numbered cards. A card ticks itself off as it is
   answered (field-progress.js), so what is left is always in view. */
.survey-layout { display: grid; gap: 12px; }
/* The form is on this list because the question cards are its children, not
   .survey-main's - the gap stopped at the form and every card below it sat
   flush against the next one. A card that is waiting on an earlier answer is
   [hidden], so it takes no row and leaves no gap behind it. */
.survey-main, #survey { display: grid; gap: 12px; min-width: 0; }
.outline { display: none; }

.group-head { padding: 10px 4px 0; }
.group-head:first-child { padding-top: 0; }
.group-title {
  font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--brand-600); display: flex; align-items: center; gap: 10px;
}
.group-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.group-note { font-size: 13.5px; color: var(--muted); margin-top: 2px; }

.card.q { padding: 18px 16px 18px; border-color: var(--card-bd); box-shadow: 0 1px 2px rgba(15, 39, 66, 0.04), 0 8px 24px -12px rgba(15, 39, 66, 0.12); transition: border-color 0.2s, box-shadow 0.2s; }
.card.q:focus-within { border-color: var(--brand-100); box-shadow: 0 1px 2px rgba(15, 39, 66, 0.04), 0 10px 28px -12px var(--brand-glow, rgba(37, 99, 235, 0.28)); }
.card.q:has(.err:not(:empty)) { border-color: var(--no-bd); }

.sec { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.sec .n {
  width: 30px; height: 30px; flex: none; margin-top: -1px; border-radius: 9px; position: relative;
  display: grid; place-items: center;
  background: var(--badge-bg); color: #fff; font-size: 13.5px; font-weight: 800; font-variant-numeric: tabular-nums;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
  transition: background 0.25s, transform 0.25s;
}
.sec .n::after {
  content: ""; position: absolute; inset: 0; opacity: 0; transform: scale(0.6); transition: opacity 0.2s, transform 0.25s;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.card.done .sec .n { background: var(--yes); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.14); }
.card.done .sec .n b { opacity: 0; }
.card.done .sec .n::after { opacity: 1; transform: scale(1); }
.sec-t { font-size: 17px; font-weight: 750; line-height: 1.3; padding-top: 3px; letter-spacing: -0.005em; }
.opt { font-weight: 600; font-size: 11.5px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 2px; margin-left: 4px; }
.opt:empty { display: none; }
.hint.lead { margin: -8px 0 14px 42px; }
.field { margin-top: 14px; }
.field.first { margin-top: 0; }
.field > label { display: block; font-size: 13.5px; font-weight: 650; color: var(--ink-2); margin-bottom: 6px; }
.field > label .opt { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 500; vertical-align: 0; }

input:not([type="radio"]):not([type="checkbox"]), select, textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 11px 14px;
  font-size: 16.5px;               /* 16px+ keeps iOS from zooming in */
  color: var(--ink);
  background: var(--field-bg);
  border: 1.5px solid var(--field-bd);
  border-radius: 12px;
  box-shadow: inset 0 1px 2px rgba(15, 39, 66, 0.04);
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%2366768b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.4; margin-top: 10px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring, rgba(37, 99, 235, 0.14)); }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
.invalid { border-color: var(--no) !important; box-shadow: 0 0 0 4px rgba(179, 38, 30, 0.12) !important; }
.err { color: var(--no-ink); font-size: 13.5px; font-weight: 650; margin-top: 8px; display: flex; gap: 6px; align-items: flex-start; }
.err::before {
  content: ""; flex: none; width: 16px; height: 16px; margin-top: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%23b3261e'/%3E%3Cpath d='M12 7v6M12 16.5v.5' stroke='%23fff' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.err:empty { display: none; }
.hint { color: var(--muted); font-size: 13.5px; margin-top: 7px; }
.hint:empty { display: none; }
.hint.ok { color: var(--yes-ink); font-weight: 650; }
.hint.warn { color: var(--warn); font-weight: 650; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
@media (max-width: 370px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.other { margin-top: 10px; }

/* A question asked inside another one's card - "Problems with the current
   ISP" under Current ISP. Set apart by a rule and a step in, so it reads as
   part of the same answer rather than as a card of its own. */
.subq { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.sub-sec { font-size: 14.5px; font-weight: 750; color: var(--ink-2); margin-bottom: 10px; }
.subq textarea { min-height: 68px; }

/* Said under Activity once a chip is lit: the form opens on it tomorrow too,
   and the exec can change it. */
/* Masked rather than drawn, so the clock takes the text's colour in either
   theme. */
.sticky-note { display: flex; align-items: center; gap: 7px; }
.sticky-note::before {
  content: ""; flex: none; width: 15px; height: 15px; background: currentColor;
  --clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 6.5V12l4 2.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E");
  -webkit-mask: var(--clock) center / contain no-repeat;
  mask: var(--clock) center / contain no-repeat;
}

/* The same note under the address block, with the way out of it beside the
   words: the area is a convenience, not a decision the form has made. */
.area-kept { margin-top: 10px; }
.linkbtn {
  flex: none; padding: 2px 6px; margin-left: auto; border: 0; border-radius: 8px;
  background: none; color: var(--brand-600); font: inherit; font-weight: 700;
  text-decoration: underline;
}

/* ---------- The phone box's country (static/js/phone-cc.js) ----------
   The flag and dial code in front of the number, joined to the box, and the
   list of countries it opens in the flow of the form, as the plan picker's
   does. The flags come from a font of their own: Windows draws none. */
@font-face {
  font-family: "Twemoji Country Flags";
  src: url("/static/vendor/flags/TwemojiCountryFlags.woff2") format("woff2");
  unicode-range: U+1F1E6-1F1FF;
  font-display: swap;
}
.pcc-flag {
  font-family: "Twemoji Country Flags", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 21px; line-height: 1; font-weight: 400;
}
.phone-row { display: flex; }
.cc, .pcc-btn {
  display: flex; align-items: center; gap: 7px; flex: none; padding: 0 10px 0 13px;
  border: 1.5px solid var(--field-bd); border-right: 0; border-radius: 12px 0 0 12px;
  background: var(--soft); color: var(--ink-2); font: inherit; font-size: 16px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pcc-btn { min-height: var(--tap); cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.pcc-btn:focus-visible, .pcc-btn[aria-expanded="true"] {
  outline: none; position: relative; z-index: 1; border-color: var(--brand); border-right: 1.5px solid var(--brand);
  box-shadow: 0 0 0 4px var(--brand-ring, rgba(37, 99, 235, 0.14));
}
.pcc-chev { width: 16px; height: 16px; color: var(--muted); flex: none; transition: transform .15s ease; }
.pcc-btn[aria-expanded="true"] .pcc-chev { transform: rotate(180deg); }
/* [type] to outweigh the app's own input:not([type="radio"])... rule. */
.phone-row input[type="tel"] { flex: 1; min-width: 0; border-radius: 0 12px 12px 0; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.phone-row:has(input.invalid) .pcc-btn { border-color: var(--no); }
.sheet-form .pcc-btn { border-color: var(--line-2); border-radius: 10px 0 0 10px; }
.sheet-form .pcc-btn:focus-visible, .sheet-form .pcc-btn[aria-expanded="true"] { border-color: var(--brand); }
.sheet-form .phone-row input[type="tel"] { border-radius: 0 10px 10px 0; }

.pcc-panel {
  margin-top: 8px; background: var(--card); border: 1px solid var(--card-bd);
  border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
}
.pcc-search { display: flex; align-items: center; gap: 8px; padding: 4px 12px; border-bottom: 1px solid var(--line); background: var(--soft); }
.pcc-search svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.pcc-panel .pcc-search input[type="search"],
.pcc-panel .pcc-search input[type="search"]:focus {
  flex: 1; min-width: 0; width: auto; min-height: 44px; padding: 8px 0; margin: 0;
  border: 0; border-radius: 0; box-shadow: none; outline: none; background: transparent;
  font-size: 16.5px; color: var(--ink);
}
.pcc-list { list-style: none; margin: 0; padding: 6px; max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
.pcc-opt { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px; border-radius: 10px; cursor: pointer; }
.pcc-opt + .pcc-opt { margin-top: 2px; }
.pcc-opt.active { background: var(--tint); }
.pcc-opt[aria-selected="true"] { background: var(--brand-50); }
.pcc-opt .pcc-flag { font-size: 23px; }
.pcc-name { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.pcc-code { font-size: 14.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.pcc-tick { width: 18px; height: 18px; color: var(--brand-ink); flex: none; }
.pcc-sep {
  margin: 6px 6px 2px; padding: 10px 6px 4px; border-top: 1px solid var(--line);
  font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
}
.pcc-none { padding: 14px; font-size: 14px; color: var(--muted); margin: 0; }

/* Radio chips: the input covers its chip, so the whole chip is the target. */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; min-height: 44px; padding: 9px 16px;
  background: var(--chip-bg); border: 1.5px solid var(--field-bd); border-radius: 999px;
  font-size: 15px; font-weight: 650; color: var(--ink-2);
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.choices.sm .choice span { min-height: 40px; padding: 7px 14px; font-size: 14.5px; }
.choice input:active + span { transform: scale(0.97); }
.choice input:checked + span {
  background: var(--pick-bg); border-color: var(--pick-bg); color: var(--pick-ink);
  box-shadow: 0 4px 12px -4px rgba(16, 34, 64, 0.55);
}
.choice input:focus-visible + span { outline: 3px solid var(--focus-ring, rgba(37, 99, 235, 0.45)); outline-offset: 2px; }

/* A tally: one row per answer, the chip on the left and - once ticked - its
   number beside it, so "Airtel 40" reads as one line. */
.tally { display: flex; flex-direction: column; gap: 8px; }
.tally-row { display: flex; align-items: center; gap: 10px; }
.tally-row .choice { flex: 1 1 auto; min-width: 0; }
.tally-row .choice span { min-height: 42px; }
.tally-n { flex: 0 0 118px; width: 118px; font-variant-numeric: tabular-nums; }
@media (hover: hover) {
  .choice input:not(:checked):hover + span { border-color: var(--line-2); background: var(--soft); }
}

.yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.yesno label { position: relative; }
.yesno input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.yesno span {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 66px;
  background: var(--chip-bg); border: 1.5px solid var(--field-bd); border-radius: 14px;
  font-size: 18px; font-weight: 800; color: var(--ink-2);
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.yesno i {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid currentColor; opacity: 0.55; transition: opacity 0.15s, background 0.15s;
}
.yesno i svg { width: 17px; height: 17px; }
.yesno .yes span { border-color: var(--yes-bd); }
.yesno .no span { border-color: var(--no-bd); }
.yesno .yes i { color: var(--yes-ink); }
.yesno .no i { color: var(--no-ink); }
.yesno .yes input:checked + span { background: var(--yes); border-color: var(--yes); color: #fff; box-shadow: 0 6px 16px -6px rgba(22, 121, 74, 0.6); }
.yesno .no input:checked + span { background: var(--no); border-color: var(--no); color: #fff; box-shadow: 0 6px 16px -6px rgba(179, 38, 30, 0.6); }
.yesno input:checked + span i { color: #fff; opacity: 1; background: rgba(255, 255, 255, 0.18); border-color: transparent; }
.yesno input:focus-visible + span { outline: 3px solid var(--focus-ring, rgba(37, 99, 235, 0.45)); outline-offset: 2px; }

.tagbtns { display: flex; flex-wrap: wrap; gap: 7px; }
#waddo-chips { margin-bottom: 8px; }
.tagbtn {
  min-height: 38px; padding: 6px 13px;
  background: var(--chip-bg); border: 1.5px dashed var(--line-2); border-radius: 999px;
  font-size: 14px; font-weight: 650; color: var(--ink-2);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tagbtn[aria-pressed="true"] { border-style: solid; border-color: var(--brand); background: var(--brand-50); color: var(--brand-ink); }

/* The location card and its three ways of setting the place. */
.loc {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-radius: 14px;
  background: var(--soft); border: 1.5px solid var(--line);
  transition: background 0.25s, border-color 0.25s;
}
.loc-ic { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--tint); color: var(--ink-2); transition: background 0.25s, color 0.25s; }
.loc-ic svg { width: 22px; height: 22px; }
.loc-text { min-width: 0; flex: 1; }
.loc b { display: block; font-size: 15.5px; line-height: 1.3; }
.loc small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.loc-state { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); box-shadow: 0 0 0 3px rgba(182, 194, 208, 0.3); }
.loc[data-state="finding"] .loc-ic { background: var(--brand); color: #fff; animation: pulse 1.2s ease-in-out infinite; }
.loc[data-state="finding"] .loc-state { background: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25); animation: pulse 1.2s ease-in-out infinite; }
.loc[data-state="ok"] { background: var(--yes-50); border-color: var(--yes-bd); }
.loc[data-state="ok"] .loc-ic { background: var(--yes); color: #fff; }
.loc[data-state="ok"] .loc-state { background: var(--yes); box-shadow: 0 0 0 3px rgba(22, 121, 74, 0.22); }
.loc[data-state="warn"] { background: var(--warn-50); border-color: var(--warn-bd); }
.loc[data-state="warn"] .loc-ic { background: var(--warn-solid); color: #fff; }
.loc[data-state="warn"] .loc-state { background: var(--warn-solid); box-shadow: 0 0 0 3px rgba(217, 145, 43, 0.22); }
.loc[data-state="off"] { background: var(--no-50); border-color: var(--no-bd); }
.loc[data-state="off"] .loc-ic { background: var(--no); color: #fff; }
.loc[data-state="off"] .loc-state { background: var(--no); box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.22); }
@keyframes pulse { 50% { opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) { .loc-ic, .loc-state { animation: none !important; } * { transition: none !important; } }

/* A survey already taken at this house. Loud enough to stop a form being
   filled in twice, and with the way past it beside the words - the door next
   to it is a different house and a real survey, and only the exec standing
   there knows which this is. */
.dup-note {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px;
  margin-top: 10px; padding: 10px 13px; border-radius: 12px;
  background: var(--warn-50); border: 1.5px solid var(--warn-bd);
  color: var(--warn); font-size: 13.5px; font-weight: 650; line-height: 1.45;
}
.dup-note .linkbtn { color: var(--warn); }

/* Check feasibility (services.unms), its own card once the location, the
   name and the phone are in: the button, and UNMS's answer coloured like
   the pin's own card - green feasible, amber with the GIS team, red not
   feasible. */
.card.feas { display: grid; gap: 8px; border: 1.5px solid var(--brand-100); }
.card.feas:not([hidden]) { animation: feas-in 0.25s ease-out; }
@keyframes feas-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.feas-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.feas-label { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.feas-go {
  min-height: 44px; padding: 0 16px; border-radius: 12px; border: 0;
  background: var(--btn-fill); color: #fff; font: inherit; font-size: 15px; font-weight: 700;
  cursor: pointer;
}
.feas-go:disabled { background: var(--tint); color: var(--muted); cursor: not-allowed; }
.feas-go:focus-visible { outline: 3px solid var(--brand-100); outline-offset: 2px; }
.feas-need { margin: 0; font-size: 13.5px; color: var(--muted); }
.feas-need:empty { display: none; }
.feas-result { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1.5px solid var(--line); }
.feas-result b { font-size: 15.5px; line-height: 1.3; }
.feas-result small { color: var(--ink-2); font-size: 13.5px; line-height: 1.4; }
.feas-result .feas-code { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.feas[data-state="asking"] .feas-go { animation: pulse 1.2s ease-in-out infinite; }
.feas[data-state="ok"] { border-color: var(--yes-bd); background: var(--yes-50); }
.feas[data-state="ok"] .feas-result b { color: var(--yes); }
.feas[data-state="wait"] { border-color: var(--warn-bd); background: var(--warn-50); }
.feas[data-state="wait"] .feas-result b { color: var(--warn); }
.feas[data-state="no"] { border-color: var(--no-bd); background: var(--no-50); }
.feas[data-state="no"] .feas-result b { color: var(--no); }
.feas[data-state="warn"] .feas-result b { color: var(--warn); }
/* A pin the GIS team can't use yet (16 Nov 2026): the way to put it right. */
.feas[data-state="fix"] { border-color: var(--warn-bd); }
.feas[data-state="fix"] .feas-need { color: var(--warn); font-weight: 600; }
.feas-fix { display: flex; flex-wrap: wrap; gap: 8px; }
.feas-alt {
  min-height: 40px; padding: 0 14px; border-radius: 11px; border: 1.5px solid var(--line-2);
  background: var(--card); color: var(--ink); font: inherit; font-size: 14px; font-weight: 650;
  cursor: pointer;
}
.feas-alt:focus-visible { outline: 3px solid var(--brand-100); outline-offset: 2px; }
.feas-result .feas-where { color: var(--ink-2); font-size: 13px; }
/* The seconds to the next look: a bar that fills, and its words. */
.feas-timer { display: grid; gap: 5px; }
.feas-timer-t { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.feas-bar { display: block; height: 4px; border-radius: 4px; background: var(--tint); overflow: hidden; }
.feas-bar i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 4px; }
.feas-bar i.run { animation: feas-fill linear forwards; }
@keyframes feas-fill { from { width: 0; } to { width: 100%; } }
.feas[data-state="asking"] .feas-bar i { width: 35%; animation: feas-slide 1.1s ease-in-out infinite; }
@keyframes feas-slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
/* A checked draft has no Delete: what it says instead. */
.d-feas { margin-top: 5px; font-size: 12.5px; font-weight: 650; color: var(--warn); }
@media (prefers-reduced-motion: reduce) {
  .feas-go, .card.feas, .feas-bar i { animation: none !important; }
  .feas-bar i.run { width: 100%; }
}

/* The same answer on the exec's own survey and on the home screen. */
.feas-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.feas-pill.ok { background: var(--yes-50); color: var(--yes); border: 1px solid var(--yes-bd); }
.feas-pill.wait { background: var(--warn-50); color: var(--warn); border: 1px solid var(--warn-bd); }
.feas-pill.no { background: var(--no-50); color: var(--no); border: 1px solid var(--no-bd); }
.feas-pill.warn { background: var(--tint); color: var(--ink-2); border: 1px solid var(--line-2); }

.tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.tool {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  min-height: 78px; padding: 10px 4px 9px;
  background: var(--chip-bg); border: 1.5px solid var(--line); border-radius: 14px;
  font-size: 13px; font-weight: 700; color: var(--ink-2);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.tool svg { width: 20px; height: 20px; color: var(--brand-600); }
.tool > svg { box-sizing: content-box; padding: 7px; border-radius: 10px; background: var(--brand-50); }
.tool:active, .tool[aria-expanded="true"] { background: var(--brand-50); border-color: var(--brand); }
.tool[aria-expanded="true"] > svg { background: var(--brand); color: #fff; }
/* Greyed, not just faded: My GPS on an activity away from the customer. */
.tool:disabled { opacity: 0.55; filter: grayscale(1); }
@media (hover: hover) { .tool:not(:disabled):hover { border-color: var(--line-2); box-shadow: 0 4px 12px -6px rgba(15, 39, 66, 0.25); } }
.linkbox { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 10px; padding: 12px; border-radius: 14px; background: var(--soft); border: 1.5px solid var(--line); }
.linkbox .hint, .linkbox .err { grid-column: 1 / -1; margin-top: 0; }
details.help { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--soft); font-size: 14px; color: var(--ink-2); }
details.help summary { font-weight: 700; color: var(--brand-600); cursor: pointer; }
details.help ol { padding-left: 20px; margin-top: 8px; display: grid; gap: 4px; }

/* Progress: a line under the header, a rail above the form, the count in the save bar. */
.bar { flex-wrap: wrap; }
.bar-progress { flex-basis: 100%; height: 3px; margin: 6px -16px -8px; background: rgba(255, 255, 255, 0.12); }
.bar-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.35s ease; }
.progress { background: var(--card); border: 1px solid var(--card-bd); border-radius: var(--radius); padding: 12px 16px 14px; box-shadow: var(--shadow); }
.progress-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 9px; }
.progress-label { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.progress-count { font-size: 13.5px; color: var(--muted); }
.progress-count b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.progress-segs { display: flex; gap: 4px; }
.progress-segs i { flex: 1; height: 6px; border-radius: 3px; background: var(--track); transition: background 0.3s; }
.progress-segs i.on { background: var(--yes); }
.all-done .progress-segs i.on { background: var(--brand); }

/* Save bar, pinned to the bottom with the phone's home-bar inset. On a phone
   the two buttons take a line of their own under the count; side by side with
   it from a wide-ish screen up. */
.has-savebar .wrap { padding-bottom: 150px; }
.savebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  padding: 10px 14px; padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: var(--bar-bg); border-top: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -8px 24px rgba(15, 39, 66, 0.07);
}
.savebar-in { max-width: 560px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.save-side { min-width: 0; flex: 1 1 100%; }
.save-progress { font-size: 13px; color: var(--muted); white-space: nowrap; }
.save-progress b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.save-note { font-size: 12.5px; color: var(--warn); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.save-note:empty { display: none; }
/* Why Save is shut - no location from the phone yet; it wraps, unlike the note. */
.save-hold { margin: 2px 0 0; font-size: 12.5px; color: var(--warn); font-weight: 650; line-height: 1.35; }
/* Under it when the phone is only approximate: the way back into the sheet. */
.save-side .precise-open { margin: 2px 0 0 -6px; font-size: 13px; color: var(--warn); }
.save-actions { display: flex; flex: 1 1 100%; gap: 10px; }
.savebar .btn.big { width: auto; flex: 1 1 auto; min-width: 0; }
.savebar .btn.big.ghost { flex: 0 1 auto; }
.savebar .btn.big:not(.ghost) { box-shadow: 0 8px 20px -8px var(--btn-shadow, rgba(37, 99, 235, 0.7)); }
.all-done .savebar .btn.big:not(.ghost) { background: var(--yes); box-shadow: 0 8px 20px -8px rgba(22, 121, 74, 0.7); }
@media (min-width: 560px) {
  .has-savebar .wrap { padding-bottom: 116px; }
  .save-side { flex: 1 1 0; }
  .save-actions { flex: 0 0 auto; }
  .savebar .btn.big { min-width: 180px; }
  .savebar .btn.big.ghost { min-width: 0; }
}

/* On a wide screen the form gets an outline beside it: every question, ticked
   as it is answered, and the one on screen marked. */
@media (min-width: 960px) {
  .has-savebar .wrap { max-width: 900px; padding-top: 24px; padding-bottom: 120px; }
  .survey-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
  .outline { display: block; position: sticky; top: calc(85px + var(--env-h, 0px)); }
  .progress { display: none; }
  .survey-main, #survey { gap: 14px; }
  .card.q { padding: 22px 22px 22px; }
  .group-head { padding-top: 14px; }
  .savebar-in { max-width: 900px; padding-left: 284px; }
  .save-actions { flex: 1 1 auto; justify-content: flex-end; }
  .savebar .btn.big:not(.ghost) { max-width: 420px; }
  .save-side { text-align: right; padding-right: 4px; }
}
.outline-head { padding: 4px 4px 14px; }
.outline-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-600); }
.outline-title { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; margin-top: 2px; }
.outline-meter { height: 6px; border-radius: 3px; background: var(--track); margin-top: 12px; overflow: hidden; }
.outline-meter span { display: block; height: 100%; width: 0; background: var(--yes); transition: width 0.35s ease; }
.outline-sub { font-size: 13px; color: var(--muted); margin-top: 6px; }
/* minmax(0, 1fr), not the default auto column: an auto column grows to the
   longest label's one-line width, and every row (and its "opt") ran out
   across the form. */
.outline-list { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.outline-list a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 600; line-height: 1.3;
  transition: background 0.15s, color 0.15s;
}
.outline-list a:hover { background: var(--card); }
.outline-list .current a { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 39, 66, 0.06); }
.o-n {
  width: 22px; height: 22px; flex: none; border-radius: 7px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 800; background: var(--tint); color: var(--ink-2); font-variant-numeric: tabular-nums;
  transition: background 0.2s, color 0.2s;
}
.outline-list .current .o-n { background: var(--badge-bg); color: #fff; }
.outline-list .done .o-n {
  background: var(--yes); color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 14px; background-position: center; background-repeat: no-repeat;
}
/* A long question gets two lines before it is cut short. */
.o-t {
  flex: 1; min-width: 0; overflow: hidden; overflow-wrap: break-word;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
.o-opt { flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.outline-foot { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; padding: 12px 12px; border-radius: 12px; background: var(--brand-50); color: var(--brand-ink); font-size: 12.5px; font-weight: 600; line-height: 1.4; }
.outline-foot svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

.toast {
  position: fixed; left: 50%; bottom: 100px; z-index: 60; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 32px);
  padding: 12px 16px; border-radius: 12px;
  background: var(--toast-bg); color: var(--toast-ink); font-size: 15px; font-weight: 650;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}
.toast.ok { background: var(--yes); }
.toast.warn { background: #7a4a00; }

/* ---------- Drafts: half-filled surveys waiting on this phone ---------- */
/* A drawer in from the right, over the form it came from - the form is still
   there behind it, and one tap on the dimmed part puts the drawer away. The
   whole screen on a phone, a panel beside the form on anything wider. */
.sheet-back { position: fixed; inset: 0; z-index: 49; background: rgba(8, 20, 36, 0.5); }
.sheet {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: 100%; max-width: 440px;
  display: flex; flex-direction: column; background: var(--bg);
  box-shadow: -18px 0 44px rgba(8, 20, 36, 0.3);
  animation: sheet-in 0.22s ease-out;
}
@keyframes sheet-in { from { transform: translateX(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet .ms-top { align-items: center; }
.sheet-head { min-width: 0; }
.sheet-head b { display: block; color: #fff; font-size: 18px; font-weight: 750; line-height: 1.25; }
.sheet-head small { display: block; color: #c3d3e7; font-size: 12.5px; }
.sheet-body {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 14px 14px max(24px, env(safe-area-inset-bottom));
}
.sheet-empty { max-width: 330px; margin: 14vh auto 0; text-align: center; color: var(--muted); }
.sheet-empty svg { width: 52px; height: 52px; margin: 0 auto 14px; color: var(--line-2); }
.sheet-empty > b { display: block; font-size: 17.5px; color: var(--ink); margin-bottom: 6px; }
.sheet-empty p { font-size: 14.5px; line-height: 1.5; }
.sheet-empty p b { color: var(--ink-2); }

.draft-list { list-style: none; display: grid; gap: 10px; max-width: 560px; margin: 0 auto; }
.d-row { background: var(--card); border: 1px solid var(--card-bd); border-radius: var(--radius); padding: 14px 14px 12px; box-shadow: var(--shadow); }
/* The one the form behind this sheet is on. */
.d-row.here { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow); }
.d-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.d-top b { min-width: 0; font-size: 16.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-when { flex: none; font-size: 12.5px; color: var(--muted); }
.d-where { margin-top: 2px; font-size: 13.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-bar { height: 6px; margin-top: 11px; border-radius: 999px; background: var(--track); overflow: hidden; }
.d-bar i { display: block; height: 100%; background: var(--brand); }
.d-prog { margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.d-actions { display: flex; gap: 8px; margin-top: 12px; }
.d-actions .btn { flex: 1 1 auto; }
.d-actions .btn.ghost { flex: 0 0 auto; }

/* ---------- Map picker ---------- */
.mapsheet { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: var(--sheet-bg); }
.ms-top {
  position: relative; z-index: 3; display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--navy);
}
.icon-btn { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border: 0; border-radius: 12px; background: rgba(255, 255, 255, 0.12); color: #fff; }
.icon-btn svg { width: 24px; height: 24px; }
.ms-search { position: relative; flex: 1; min-width: 0; }
.ms-search input { min-height: 46px; border: 0; }
.ms-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; list-style: none;
  max-height: 55vh; overflow-y: auto; background: var(--card); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}
.ms-results button { display: block; width: 100%; padding: 11px 14px; text-align: left; background: var(--card); border: 0; border-top: 1px solid var(--line); }
.ms-results li:first-child button { border-top: 0; }
.ms-results b { display: block; font-size: 15.5px; }
.ms-results small { color: var(--muted); font-size: 13px; }
.ms-results .none { padding: 12px 14px; color: var(--muted); font-size: 14px; }
.ms-body { position: relative; flex: 1; min-height: 0; }
/* Two classes: maplibre-gl.css (loaded after this file) sets
   .maplibregl-map { position: relative } on the container, which would
   otherwise collapse it to no height at all. */
.mapsheet .ms-map { position: absolute; inset: 0; }
/* The pin hops off the map while the map slides under it and drops back with
   a small settle when it stops - the food-delivery apps' trick, and the thing
   that makes a fixed pin feel dragged. The dot stays on the ground throughout,
   so the exact point being chosen is never hidden under the pin. */
.ms-pin {
  position: absolute; left: 50%; top: 50%; z-index: 2; width: 40px; height: 52px;
  transform: translate(-50%, -100%); pointer-events: none;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.3));
  transition: transform .26s cubic-bezier(.22, 1.35, .45, 1), filter .26s ease;
}
.ms-moving .ms-pin {
  transform: translate(-50%, -100%) translateY(-13px);
  filter: drop-shadow(0 11px 7px rgba(0, 0, 0, 0.32));
}
/* A white ring, because the dot has to read on the dark basemap too. */
.ms-dot {
  position: absolute; left: 50%; top: 50%; z-index: 1; width: 8px; height: 8px;
  margin: -4px 0 0 -4px; border-radius: 50%; background: rgba(15, 39, 66, 0.55);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85); pointer-events: none;
  transition: transform .26s ease;
}
.ms-moving .ms-dot { transform: scale(1.5); }
.ms-locate {
  position: absolute; right: 12px; bottom: 14px; z-index: 2; width: 50px; height: 50px;
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: var(--card); color: var(--brand-ink); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}
.ms-locate svg { width: 24px; height: 24px; }
.ms-fail { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--ink-2); background: var(--sheet-bg); font-weight: 600; }
.ms-bottom {
  position: relative; z-index: 3; padding: 14px 16px; padding-bottom: max(14px, env(safe-area-inset-bottom));
  background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -8px 22px rgba(0, 0, 0, 0.07);
}
.ms-hint { font-size: 13.5px; color: var(--muted); }
.ms-place { min-height: 1.4em; margin: 3px 0 12px; font-size: 16.5px; font-weight: 750; transition: opacity .18s ease; }
/* The last name stays up, greyed, while the next one is being looked up. */
.ms-place.busy { opacity: .45; }
.mapsheet .maplibregl-ctrl-top-right { top: 4px; }
.mapsheet .maplibregl-ctrl-attrib { font-size: 11px; }

/* The exec's own targets on the home screen, a heading per period
   (services.sales_people.by_period). */
.t-period {
  font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin: 14px 0 0;
}
.card-head + .t-period { margin-top: 8px; }
.target-list { display: grid; gap: 12px; margin-top: 8px; }
.target-list li { display: grid; gap: 5px; }
.t-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13.5px; color: var(--muted); }
.t-line b { color: var(--ink); font-size: 14.5px; }
.t-line .t-num { font-size: 16px; font-variant-numeric: tabular-nums; }
.t-bar { height: 9px; border-radius: 999px; background: var(--track); overflow: hidden; }
.t-bar span { display: block; height: 100%; background: var(--brand); }
.t-bar span.done { background: var(--yes); }
.t-pace { text-align: right; }
.t-pace.behind { color: var(--warn); font-weight: 650; }
.t-pace.done { color: var(--yes-ink); font-weight: 700; }
.t-none { margin-top: 6px; }

/* ---------- Appearance: light / dark / system ---------- */
/* One control, three states, and the state is the aria-pressed button - no
   class bookkeeping and a screen reader reads it as a group of toggles. */
.theme-switch {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  margin-top: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.theme-opt {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.theme-opt svg { width: 17px; height: 17px; flex: none; }
.theme-opt[aria-pressed="true"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 39, 66, 0.12), 0 2px 8px -4px rgba(15, 39, 66, 0.3);
}
.theme-opt:focus-visible { outline: 3px solid var(--focus-ring, rgba(37, 99, 235, 0.45)); outline-offset: 1px; }
.theme-switch.compact .theme-opt span { display: none; }
.theme-switch.compact .theme-opt { padding: 8px 12px; }
/* On the sign-in screen the control sits under the card, on the page itself. */
.auth-foot { display: flex; justify-content: center; margin-top: 4px; }

/* MapLibre draws its own controls and attribution with a white chrome of its
   own; these follow the theme instead. The icons inside the buttons are
   background images, so they are inverted rather than recoloured. */
.maplibregl-ctrl-group {
  background: var(--map-ctrl-bg) !important;
  box-shadow: 0 0 0 1px var(--map-ctrl-line) !important;
}
.maplibregl-ctrl-group button + button { border-top-color: var(--map-ctrl-line) !important; }
.maplibregl-ctrl-group button:hover { background: var(--map-ctrl-hover) !important; }
.maplibregl-ctrl-group button span { filter: var(--map-ctrl-filter); }
.maplibregl-ctrl-attrib, .maplibregl-ctrl-attrib a {
  background: var(--map-ctrl-bg) !important;
  color: var(--ink) !important;
}
.maplibregl-ctrl-attrib-button { filter: var(--map-ctrl-filter); }

/* The light/dark switch each map carries (static/js/map-flavor.js). MapLibre
   draws its own control icons as background images and --map-ctrl-filter
   inverts the lot in dark mode; this icon is an SVG stroked in the text
   colour instead, so it must not be caught by that and is not a <span>. */
.map-flavor-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.map-flavor-btn svg { width: 17px; height: 17px; }
.maplibregl-popup-content {
  background: var(--map-ctrl-bg) !important;
  color: var(--ink) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}
.maplibregl-popup-tip { border-top-color: var(--map-ctrl-bg) !important; border-bottom-color: var(--map-ctrl-bg) !important; }

/* ---------- The drawer: their own leads and surveys ---------- */
/* Every figure on the home screen opens the list behind it, in from the left
   over the screen it came from (the drafts drawer comes in from the right, so
   the two never read as the same thing). */
.sheet.left { right: auto; left: 0; box-shadow: 18px 0 44px rgba(8, 20, 36, 0.3); animation-name: sheet-in-left; }
@keyframes sheet-in-left { from { transform: translateX(-100%); } to { transform: none; } }
.sheet .ms-top { gap: 10px; }
.sheet-loading { color: var(--muted); text-align: center; padding: 22px 0; font-size: 14.5px; }

/* A figure is a button now, so it must not look like one. */
button.stat { border: 0; font: inherit; color: inherit; cursor: pointer; width: 100%; }
button.stat:active { filter: brightness(1.12); }
/* A figure at nought opens nothing (19 Oct 2026): no press, the number quieter. */
button.stat:disabled { cursor: default; }
button.stat:disabled:active { filter: none; }
.stat.zero b { opacity: 0.55; }

/* The sort over a drawer's list (19 Oct 2026): one quiet line, right-aligned,
   the phone's own picker - small enough for a 360px screen, 16px so iOS
   does not zoom. */
.sheet-sort { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: -2px 0 10px; }
.sheet-sort label { font-size: 13px; font-weight: 650; color: var(--muted); }
.sheet-sort select {
  width: auto; max-width: 72%; min-height: 40px; padding: 7px 36px 7px 12px;
  font-size: 16px; font-weight: 650; border-radius: 10px; background-color: var(--card);
}

/* minmax(0, 1fr): a row as wide as the drawer, never wider - its words cut
   with an ellipsis rather than pushing the pills off the screen. */
.sheet-list { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.row-open {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--card); border: 1px solid var(--card-bd); border-radius: var(--radius);
  padding: 12px 14px;
}
.row-open:active { background: var(--soft); }
.row-main { min-width: 0; }
.row-main b { display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* When a lead was added and reached them, and who gave it - wrapped rather
   than cut, so a name is never half there. */
.row-main small.row-dates { margin-top: 1px; font-size: 12.5px; color: var(--ink-2); white-space: normal; }
.row-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.row-side small { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.late-word { color: var(--warn); font-weight: 650; }
.pill.sold { background: var(--yes); color: #fff; }
.pill.late { background: var(--warn-bg, rgba(255, 170, 60, 0.18)); color: var(--warn); }
/* Today's surveys: the whole row opens it, and the button under it closes the
   sale - the row keeps the three columns the other lists have. */
.list li.row-li { display: block; }
.list li.row-li .row-open {
  border: 0; background: none; padding: 0; border-radius: 0;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px;
  align-items: center; width: 100%;
}
.row-act { display: block; margin: 10px 0 2px auto; }
/* Leads that left them lately (services.exec_hold): in grey and not to be
   opened - a record of where each went, not something to work. */
.moved-list .is-moved .row-open { cursor: default; background: var(--soft); opacity: .72; }
.moved-list .is-moved .row-open:active { background: var(--soft); }
.moved-list .is-moved b { color: var(--ink-2); }
.pill.stage.tone-moved { background: var(--neutral-bg); color: var(--muted); }
/* The home screen's "Moved on" tile is grey for the same reason; "Pending
   15+ days" is a flag on them. */
.stat.moved:not(.zero) b { opacity: .75; }
.stat.flagged:not(.zero) b { color: #ffc978; }
.stats.on-card .stat.flagged:not(.zero) b { color: var(--warn); }
.lead-from-visit .btn { margin-top: 8px; }

.sheet-card { background: var(--card); border: 1px solid var(--card-bd); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; }
.sheet-card h3, .sheet-form h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.kv { display: flex; gap: 12px; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.kv:first-child { border-top: 0; }
/* Both sides share the line: a question as long as "ISPs in the building,
   and roughly how many connections each" wraps rather than pushing its
   answer off the card one letter a line. */
.kv > span { color: var(--muted); flex: 1 1 auto; min-width: 0; }
.kv > b { flex: 0 1 auto; max-width: 60%; min-width: 0; font-weight: 650; text-align: right;
  overflow-wrap: anywhere; }
.sheet-note { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin: 0 0 12px; }
.ev-list { list-style: none; display: grid; gap: 8px; }
.ev-list li { display: grid; gap: 2px; font-size: 14px; border-top: 1px solid var(--line); padding-top: 8px; }
.ev-list li:first-child { border-top: 0; padding-top: 0; }
.ev-when { color: var(--muted); font-size: 12.5px; }

.sheet-form { background: var(--card); border: 1px solid var(--card-bd); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.sheet-form .fld { display: block; margin-bottom: 10px; }
.sheet-form .fld > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.sheet-form input, .sheet-form select, .sheet-form textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line-2); border-radius: 10px;
  padding: 10px 12px;
}
.sheet-form textarea { resize: vertical; }
/* Send to the lead desk's note: under its label like the other boxes. */
.sheet-form.to-desk textarea { margin-top: 0; min-height: 72px; }
.sheet-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn.block { width: 100%; margin-top: 4px; }
.banner.flat { margin: 0 0 12px; }

/* The confirm box: nothing is claimed as sold by a stray tap. */
.confirm-back { position: fixed; inset: 0; z-index: 60; background: rgba(8, 20, 36, 0.55); display: grid; place-items: center; padding: 20px; }
.confirm-box { background: var(--card); border-radius: 16px; padding: 20px; max-width: 380px; width: 100%; box-shadow: 0 18px 44px rgba(8, 20, 36, 0.35); }
.confirm-box p { font-size: 15.5px; line-height: 1.5; margin-bottom: 16px; }
.confirm-btns { display: flex; gap: 10px; }
.confirm-btns .btn { flex: 1; }

/* The stage a lead is at, in the same colours the panel uses (one tone per
   stage, services/desk.py:TONES): green once somebody has said yes, amber for
   one marketing is following up, blue while a telecaller has it. The exec
   reads the words; the colour is what they see from across the list. */
.pill.stage { background: var(--neutral-bg); color: var(--ink-2); }
.pill.stage.tone-yes, .pill.stage.tone-won { background: var(--yes-50); color: var(--yes-ink); }
.pill.stage.tone-call, .pill.stage.tone-check { background: var(--info-50); color: var(--info-ink); }
.pill.stage.tone-no { background: var(--warn-50); color: var(--warn); }
.pill.stage.tone-lost { background: var(--neutral-bg); color: var(--no-ink); }
.pill.stage.tone-ours { background: var(--info-50); color: var(--ink-2); }

/* The morning light behind every screen of the phone apps. */
body {
  background-image: var(--fresh-sky);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* ---------- The plan picker (templates/_plan_pick.html, static/js/plan-pick.js) ----------
   A button that reads like the app's other boxes and opens a searchable list
   in the flow of the form - not floated over it, so the drawer's scrolling
   never cuts it off and the keyboard never covers it. */
.plan-pick { width: 100%; min-width: 0; }
.pp-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: var(--tap);
  text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background: var(--field-bg); border: 1.5px solid var(--field-bd); border-radius: 12px;
  padding: 8px 12px 8px 14px; box-shadow: inset 0 1px 2px rgba(15, 39, 66, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.sheet-form .pp-btn { background: var(--bg); border-color: var(--line-2); border-radius: 10px; }
.pp-btn:focus-visible, .pp-btn[aria-expanded="true"] { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14); }
.pp-val { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pp-val b { font-size: 15.5px; font-weight: 700; overflow-wrap: anywhere; line-height: 1.25; }
.pp-val small { font-size: 13px; color: var(--muted); }
.pp-val small.pp-unknown { color: var(--warn); }
.pp-placeholder { flex: 1; font-size: 16.5px; color: var(--placeholder); }
.pp-chev { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; transition: transform .15s ease; }
.pp-btn[aria-expanded="true"] .pp-chev { transform: rotate(180deg); }
.pp-panel {
  margin-top: 8px; background: var(--card); border: 1px solid var(--card-bd);
  border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
}
.pp-search { display: flex; align-items: center; gap: 8px; padding: 4px 12px; border-bottom: 1px solid var(--line); background: var(--soft); }
.pp-search svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.plan-pick .pp-search input[type="search"],
.plan-pick .pp-search input[type="search"]:focus {
  flex: 1; min-width: 0; width: auto; min-height: 44px; padding: 8px 0; margin: 0;
  border: 0; border-radius: 0; box-shadow: none; outline: none; background: transparent;
  font-size: 16.5px; color: var(--ink);
}
.pp-list { list-style: none; margin: 0; padding: 6px; max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
.pp-opt { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.pp-opt + .pp-opt { margin-top: 2px; }
.pp-opt.active { background: var(--tint); }
.pp-opt[aria-selected="true"] { background: var(--brand-50); }
.pp-o-name { font-weight: 700; font-size: 15px; color: var(--ink); overflow-wrap: anywhere; line-height: 1.25; }
.pp-o-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; color: var(--muted); }
.pp-price { margin-left: auto; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.vas-chip {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  padding: 1px 7px; border-radius: 999px; background: var(--info-50); color: var(--info-ink);
}
.pp-none { padding: 14px; font-size: 14px; color: var(--muted); margin: 0; }
.pp-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding: 6px 12px; font-size: 13px; color: var(--muted); }
.pp-clear { border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 8px 10px; border-radius: 8px; }
.pp-clear:active { color: var(--no-ink); background: var(--no-50); }

/* The plan typed under "Other", and the amount a listed plan fixes. */
.plan-pick .pp-native { margin-top: 8px; }
.pp-opt.pp-other { margin-top: 4px; border-top: 1px dashed var(--line-2); border-radius: 0 0 10px 10px; }
.pp-opt.pp-other .pp-o-name { color: var(--brand-ink); }
form input.pp-fixed[readonly] { background: var(--soft); color: var(--ink-2); border-style: dashed; }
.pp-fixed-note { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
/* The Waddo search (waddo-pick.js): a waddo an exec added is marked New until
   more than five salespeople have used it; the Add row greys out until the
   village is typed, since a waddo is its village's. */
.wp-new { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11.5px;
          font-weight: 700; background: var(--warn-50); color: var(--warn); }
.pp-val small.wp-new-note { color: var(--warn); }
.pp-opt[aria-disabled="true"] { cursor: default; opacity: .6; }

/* ---------- What a sale collects (templates/_payment.html) ---------- */
.pay { display: grid; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.pay-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 360px) { .pay-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pay-fld { display: block; }
.pay-fld > span { display: block; font-size: 13px; font-weight: 650; color: var(--ink-2); margin-bottom: 4px; }
.pay-fld[hidden] { display: none; }
/* A label that wraps under its "optional" keeps its box level with the
   others in the row: the row stretches the three alike, the box sits last. */
.pay-row .pay-fld { display: flex; flex-direction: column; }
.pay-row .pay-fld > input { margin-top: auto; }
.pay-row .opt { display: block; margin: 1px 0 0; vertical-align: 0; }
.pay .err { margin-top: -4px; }
.pay-modes { margin-top: 2px; }
.pay-total {
  display: flex; align-items: baseline; gap: 8px; margin: 0; padding: 10px 12px;
  border-radius: 12px; background: var(--brand-50); color: var(--brand-ink);
}
.pay-total[hidden] { display: none; }
.pay-total b { font-size: 18px; font-variant-numeric: tabular-nums; }
.pay-total small { margin-left: auto; font-size: 12.5px; color: var(--muted); }

/* ---------- Working with no signal (templates/_app_shell.html) ---------- */
/* The waiting bar: calm while things wait, amber past 18 hours, red past 24.
   Every screen of the app carries it, first thing under the header. */
.shell-bar {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: 14px; font-size: 14px; line-height: 1.4;
  background: var(--info-50); color: var(--info-ink); border: 1px solid var(--info-bd);
}
.shell-bar[hidden] { display: none; }
.shell-bar-ic { width: 26px; height: 26px; flex: none; }
.shell-bar-words { flex: 1; min-width: 0; }
.shell-bar-words b { display: block; font-size: 14.5px; font-weight: 750; }
.shell-bar-words span { display: block; }
.shell-bar .btn.small { flex: none; white-space: nowrap; }
.shell-bar .btn[hidden] { display: none; }
.shell-bar[data-level="soon"] { background: var(--warn-50); color: var(--warn); border-color: var(--warn-bd); }
.shell-bar[data-level="soon"] .shell-bar-words span { font-weight: 700; }
.shell-bar[data-level="overdue"], .shell-bar[data-level="problem"] {
  background: var(--no-50); color: var(--no-ink); border-color: var(--no-bd);
}
.shell-bar[data-level="overdue"] .shell-bar-words span { font-weight: 750; }
@media (prefers-reduced-motion: no-preference) {
  .shell-bar[data-level="overdue"] .shell-bar-ic { animation: shell-pulse 1.6s ease-in-out infinite; }
}
@keyframes shell-pulse { 50% { opacity: 0.35; } }

.shell-copy {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.shell-copy[hidden] { display: none; }
.shell-copy svg { width: 18px; height: 18px; flex: none; }

/* The 24-hour note, after a Save that could not go straight away. */
.shell-note-back {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px;
  background: rgba(8, 20, 36, 0.55);
}
.shell-note-back[hidden] { display: none; }
.shell-note {
  width: 100%; max-width: 360px; padding: 22px 20px 18px; border-radius: 20px;
  background: var(--card); color: var(--ink); text-align: center;
  box-shadow: 0 24px 60px rgba(8, 20, 36, 0.4);
  animation: shell-in 0.18s ease-out;
}
@keyframes shell-in { from { transform: translateY(12px) scale(0.98); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .shell-note { animation: none; } }
.shell-note-ic {
  display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 12px;
  border-radius: 16px; background: var(--warn-50); color: var(--warn);
}
.shell-note-ic svg { width: 30px; height: 30px; }
.shell-note h2 { font-size: 19px; font-weight: 780; margin-bottom: 8px; }
.shell-note p { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); margin-bottom: 18px; }

/* Install to the home screen. */
.install-card { display: flex; align-items: center; gap: 12px; padding: 14px; }
.install-card[hidden] { display: none; }
.install-card img { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.install-words { flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.4; }
.install-words b { display: block; font-size: 14.5px; color: var(--ink); }
.ios-share { display: inline-block; width: 17px; height: 17px; vertical-align: -3px; color: var(--brand-600); }
.install-card .btn { flex: none; }

/* The "needs signal" page (templates/_offline.html). */
.offline-card { text-align: center; padding: 30px 20px 22px; display: grid; gap: 12px; }
.offline-ic {
  display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 4px;
  border-radius: 18px; background: var(--info-50); color: var(--info-ink);
}
.offline-ic svg { width: 34px; height: 34px; }
.offline-card h1 { font-size: 21px; font-weight: 780; }
.offline-card p { color: var(--ink-2); font-size: 15px; line-height: 1.5; }

/* Tags on a row: sent offline, and sent late. */
.tag-off, .tag-late {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px;
  font-size: 11.5px; font-weight: 750; white-space: nowrap; vertical-align: 1px;
  background: var(--info-50); color: var(--info-ink);
}
.tag-late { background: var(--warn-50); color: var(--warn); }

/* How a call on a lead went (field/_lead.html): the answers, then the part
   the picked one asks for. */
.call-results { margin-bottom: 14px; }

/* An FTTH site's number, rung from the drawer (field/_survey.html): the call
   button, who answered, and the three ways a call can go, side by side. */
.site-check .btn.block { display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 14px; }
.site-check .btn.block svg { width: 18px; height: 18px; }
.site-check-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.site-check-btns .btn { padding-left: 8px; padding-right: 8px; white-space: nowrap; }
@media (max-width: 380px) {
  .site-check-btns { grid-template-columns: 1fr 1fr; }
  .site-check-btns .btn:first-child { grid-column: 1 / -1; }
}

/* ---------- The staff address's front page (public/staff_door.html) ---------- */
/* The phone apps' one sign-in: a navy band with the company's mark, and the
   card lifted over its lower edge. The mark sits on a white tile for the same
   reason as on the bar - a logo drawn for a light page. */
body.door { min-height: 100vh; min-height: 100dvh; background: var(--bg); }
.door-top {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: max(34px, calc(env(safe-area-inset-top) + 22px)) 24px 74px;
  color: #fff;
  background:
    radial-gradient(420px 220px at 85% -40px, rgba(147, 197, 253, 0.22), transparent 70%),
    radial-gradient(360px 240px at 0% 110%, rgba(59, 130, 246, 0.2), transparent 70%),
    linear-gradient(165deg, #1d3a78 0%, #13264a 52%, #0c1830 100%);
}
.door-mark {
  display: grid; place-items: center; width: 48px; height: 48px;
  background: #fff; border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28), 0 10px 26px -10px rgba(2, 8, 22, 0.8);
}
.door-mark img { display: block; width: 28px; height: 28px; object-fit: contain; }
.door-company {
  margin-top: 12px; font-size: 12px; font-weight: 750; letter-spacing: 0.24em;
  text-transform: uppercase; color: rgba(214, 228, 253, 0.8);
}
.door-top h1 { margin-top: 14px; font-size: 26px; font-weight: 780; letter-spacing: -0.01em; }
.door-top p { margin-top: 6px; font-size: 15px; color: rgba(226, 236, 252, 0.82); }
.door-main { max-width: 440px; margin: -50px auto 0; padding: 0 16px 32px; position: relative; }
.door-card {
  padding: 22px 20px 20px; border-radius: 20px;
  box-shadow: 0 1px 2px rgba(16, 34, 64, 0.06), 0 18px 40px -18px rgba(16, 34, 64, 0.35);
}
.door-card .alert { margin: 0 0 14px; }
.door-card .btn.big { margin-top: 20px; }
.door-pw { position: relative; }
.door-pw input { padding-right: 52px; }
.door-eye {
  position: absolute; top: 50%; right: 5px; transform: translateY(-50%);
  display: grid; place-items: center; width: 42px; height: 42px;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted);
}
.door-eye svg { width: 21px; height: 21px; }
.door-eye[aria-pressed="true"] .door-eye-off { display: none; }
.door-eye[aria-pressed="true"] { color: var(--brand-ink); }
.door-note { margin-top: 12px; text-align: center; color: var(--muted); font-size: 13px; }
.door-note a, .auth-note a { color: var(--brand); font-weight: 700; text-decoration: none; }
.door-card .alert.ok, .auth .alert.ok { background: var(--info-50); color: var(--info-ink); }
/* The panel's "keep me signed in" - the apps keep a phone signed in anyway. */
.door-keep { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px;
  font-size: 14px; color: var(--muted); cursor: pointer; }
.door-keep input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--brand); }
.door-main .auth-foot { margin-top: 10px; }

/* The choice, for somebody who opens more than one thing here. */
.door-apps { display: grid; gap: 10px; }
.door-app {
  display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 16px; background: var(--soft);
  color: var(--ink); text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.door-app img { flex: none; width: 46px; height: 46px; border-radius: 12px; }
.door-app-t { flex: 1 1 auto; min-width: 0; }
.door-app-t b { display: block; font-size: 16.5px; font-weight: 750; }
.door-app-t small { display: block; margin-top: 2px; color: var(--muted); font-size: 13.5px; }
.door-app-go { flex: none; width: 20px; height: 20px; color: var(--muted); }
.door-app:active { transform: scale(0.99); border-color: var(--brand); }
@media (hover: hover) {
  .door-app:hover { border-color: var(--brand); box-shadow: 0 8px 22px -14px rgba(37, 99, 235, 0.7); }
  .door-app:hover .door-app-go { color: var(--brand-ink); }
}
.door-out { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); text-align: center; }
.door-out button {
  border: 0; background: none; padding: 8px 4px; min-height: 40px;
  color: var(--brand-ink); font-size: 14.5px; font-weight: 700;
}

/* Leads the desk has given the exec and they have not rung yet: the first
   thing under their figures, one tap to the list. */
.ring-bar {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 14px; padding: 12px 14px;
  border: 0; border-radius: 14px; font: inherit; text-align: left; cursor: pointer;
  background: #ffc978; color: #3b2a00;
}
.ring-bar:active { filter: brightness(1.06); }
.ring-ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(59, 42, 0, .12); }
.ring-ic svg { width: 20px; height: 20px; }
.ring-words { flex: 1; min-width: 0; }
.ring-words b { display: block; font-size: 17px; }
.ring-words small { display: block; font-size: 12.5px; opacity: .85; }
.ring-go { font-size: 26px; line-height: 1; opacity: .7; }
.ring-bar.on-card { background: var(--warn-50); color: var(--warn); border: 1px solid var(--warn-bd); }
/* The Expo desk's event form while an event is open (field/home.html): the
   app's blue, a green dot for "open now". */
.expo-go-form { margin: 0; }
.ring-bar.expo-bar {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); color: #fff;
  box-shadow: 0 6px 18px -8px rgba(37, 99, 235, 0.8);
}
.ring-bar.expo-bar .ring-ic { background: rgba(255, 255, 255, 0.18); font-size: 19px; }
.ring-bar.expo-bar .ring-go { opacity: 0.85; }
.expo-live {
  display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%;
  vertical-align: 1px; background: #4ade80; animation: expo-live 2.2s ease-out infinite;
}
@keyframes expo-live {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.65); }
  70%, 100% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}
@media (prefers-reduced-motion: reduce) { .expo-live { animation: none; } }

/* A note box that became the answer when "Other" / "Something else" was
   picked (static/js/other-box.js): outlined, so the eye goes there. */
.other-wanted { border-color: var(--brand) !important; box-shadow: 0 0 0 1px var(--brand); }

/* A one-time notice ("Lead saved. ...") is part of the screen the phone keeps
   for no signal (sw.js); on that copy it would be old news, so it goes. */
body[data-copy] .banner[data-once] { display: none; }

/* A second button on a navy hero, in glass so the first stays the one the
   eye goes to: New lead under New survey here, What's up near me in the
   field activity app (which loads this sheet too). */
.near-btn { margin-top: 10px; background: rgba(255, 255, 255, 0.12); color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.35); }
.near-btn:active { background: rgba(255, 255, 255, 0.2); }
.hero .hero-note + .btn { margin-top: 12px; }

/* ---------- New lead (field/add.html) ----------
   The lead desk's Add a lead in this app's look: the survey's numbered cards
   and chips, with the ids and classes desk-add.js works through. */

/* At the top of the survey form: one tap to it, quiet enough to leave the
   form the thing on the screen. */
.new-lead {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; min-height: 60px;
  border: 1px solid var(--brand-100); border-radius: var(--radius); background: var(--brand-50);
  color: var(--brand-ink); text-decoration: none;
}
.new-lead:active { border-color: var(--brand); }
.new-lead[aria-disabled="true"] { opacity: 0.6; }
.new-lead-ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--card); }
.new-lead-ic svg { width: 21px; height: 21px; }
.new-lead-words { flex: 1; min-width: 0; }
.new-lead-words b { display: block; font-size: 16px; }
.new-lead-words small { display: block; font-size: 12.5px; color: var(--ink-2); }
.new-lead-go { font-size: 26px; line-height: 1; opacity: .6; }
@media (hover: hover) { .new-lead:hover { border-color: var(--brand); } }

.al-intro { padding: 2px 4px 0; }
.al-kicker { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-600); }
.al-lede { font-size: 15px; color: var(--ink); margin-top: 4px; line-height: 1.45; }
.al-after { font-size: 13.5px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.al-after b { color: var(--ink); }

/* The form sent back with something to put right: its words beside the
   error mark (.err's), not pushed to the far side by .banner. */
.banner.al-problem { justify-content: flex-start; margin-top: 0; }

.add-lead { display: grid; gap: 12px; min-width: 0; }
/* Asked only once the answer before it calls for them. */
.add-lead .via-heard, .add-lead .al-why-left { display: none; }
.add-lead:has(input[name="via"][data-heard]:checked) .via-heard { display: block; }
.add-lead .via-named { display: none; margin-top: 14px; }
.add-lead:has(input[name="via"][data-named]:checked) .via-named { display: block; }
.add-lead .via-named .other { margin-top: 0; width: 100%; }
.add-lead:has(input[name="was_ours"][value="yes"]:checked) .al-why-left { display: block; margin-top: 14px; }
.al-q + .al-q { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.hint.lead-in { margin: -4px 0 10px; }
.add-lead .field > textarea, .add-lead section > textarea { margin-top: 0; }
.al-held { margin-top: 12px; display: block; font-size: 14px; }
.al-held[hidden] { display: none; }

.al-village { position: relative; }
.al-suggest {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 12; margin-top: 4px; padding: 4px;
  list-style: none; background: var(--card); border: 1px solid var(--card-bd); border-radius: 14px;
  box-shadow: var(--shadow); max-height: 300px; overflow-y: auto; overscroll-behavior: contain;
}
.al-suggest li { display: flex; flex-direction: column; justify-content: center; min-height: 48px; padding: 8px 12px; border-radius: 10px; cursor: pointer; }
.al-suggest li b { font-weight: 650; }
.al-suggest li span { font-size: 12.5px; color: var(--muted); }
.al-suggest li[aria-selected="true"], .al-suggest li:active { background: var(--tint); }
.al-label { display: block; font-size: 13.5px; font-weight: 650; color: var(--ink-2); margin-bottom: 6px; }
.al-district {
  display: flex; align-items: center; min-height: var(--tap); padding: 0 14px; border-radius: 12px;
  background: var(--soft); border: 1.5px dashed var(--field-bd); color: var(--ink); font-weight: 650;
}
.al-district.is-empty { color: var(--muted); font-weight: 500; font-size: 14.5px; }
.al-map-row { display: flex; gap: 8px; align-items: center; }
.al-map-row input { flex: 1; min-width: 0; }
.al-map-row .btn { flex: none; min-height: var(--tap); }
.al-map-said { margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.al-map-said.is-good { color: var(--yes-ink); font-weight: 650; }
.al-map-said.is-bad { color: var(--warn); font-weight: 650; }
.al-saved { white-space: normal; }
.al-saved.is-saved { color: var(--yes-ink); font-weight: 650; }
/* The unfinished leads' badge: blank, not 0, with none (desk-add.js counts up). */
.bar-badge.count-pill:empty { display: none; }
#al-drafts-btn.dr-last .bar-badge { background: var(--no-50); color: var(--no-ink); }

/* Unfinished leads (field/add_drafts.html): each row coloured by the time it
   has before it goes to marketing. */
.dr-ok { --band: var(--yes); }
.dr-soon { --band: var(--warn-solid); }
.dr-last { --band: var(--no); }
.ld-list { list-style: none; margin-top: 10px; display: grid; gap: 10px; }
.ld-row { border: 1px solid var(--line); border-left: 4px solid var(--band, var(--line-2)); border-radius: 12px; padding: 10px 12px; background: var(--soft); }
.ld-main { display: grid; gap: 4px; color: inherit; text-decoration: none; }
.ld-who { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ld-who b { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-who small { flex: none; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.ld-said { font-size: 13.5px; color: var(--ink-2); }
.ld-clock { height: 5px; border-radius: 3px; background: var(--track); overflow: hidden; margin-top: 4px; }
.ld-clock i { display: block; height: 100%; background: var(--band, var(--brand)); }
.ld-left { font-size: 12.5px; color: var(--muted); }
.ld-bin { margin-top: 8px; }
.ld-bin summary { display: inline-flex; align-items: center; min-height: 36px; cursor: pointer; color: var(--no-ink); font-size: 13.5px; font-weight: 700; }
.ld-bin form { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.ld-bin p { font-size: 13px; color: var(--muted); }
.ld-bin .ld-bin-go { background: var(--no); }

/* --- Hot / warm / cold (templates/_heat.html, services/desk.py HEAT) ----------- */
.heat {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 7px;
  border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 1.5; white-space: nowrap;
}
.heat .heat-ic { width: 13px; height: 13px; flex: none; }
.heat.sm { font-size: 11.5px; padding: 1px 7px 1px 5px; }
.heat.sm .heat-ic { width: 11px; height: 11px; }
.heat.heat-hot { color: var(--heat-hot); background: var(--heat-hot-bg); }
.heat.heat-warm { color: var(--heat-warm); background: var(--heat-warm-bg); }
.heat.heat-cold { color: var(--heat-cold); background: var(--heat-cold-bg); }
.heat.heat-none { color: var(--muted); background: var(--neutral-bg); font-weight: 600; }
/* The pick: three tiles side by side, each its colour once chosen. */
.heat-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.heat-pick .choice span {
  flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 74px; padding: 10px 8px; border-radius: 14px; text-align: center;
}
.heat-pick .choice span .heat-ic { width: 20px; height: 20px; }
.heat-pick .choice span b { font-size: 15px; }
.heat-pick .choice span small { font-size: 11.5px; font-weight: 500; line-height: 1.3; color: var(--muted); }
.heat-pick .heat-hot span .heat-ic { color: var(--heat-hot); }
.heat-pick .heat-warm span .heat-ic { color: var(--heat-warm); }
.heat-pick .heat-cold span .heat-ic { color: var(--heat-cold); }
.heat-pick .heat-hot input:checked + span { background: var(--heat-hot-bg); border-color: var(--heat-hot); color: var(--heat-hot); box-shadow: none; }
.heat-pick .heat-warm input:checked + span { background: var(--heat-warm-bg); border-color: var(--heat-warm); color: var(--heat-warm); box-shadow: none; }
.heat-pick .heat-cold input:checked + span { background: var(--heat-cold-bg); border-color: var(--heat-cold); color: var(--heat-cold); box-shadow: none; }
.heat-pick input:checked + span small { color: inherit; opacity: 0.85; }
@media (max-width: 360px) { .heat-pick .choice span small { display: none; } .heat-pick .choice span { min-height: 56px; } }

/* New lead's "Where they are" (field/add.html, lead-place.js): the survey's
   location card and three ways, then the typed place below them. */
.al-ways { margin-bottom: 4px; }
.al-ways .tool[aria-busy="true"] > svg { animation: pulse 1.2s ease-in-out infinite; }
.al-linkbox { grid-template-columns: minmax(0, 1fr); }
.al-linkbox .al-label { margin-bottom: 0; }
.al-linkbox .al-map-said { margin-top: 0; }
.al-after-ways { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-2); }

/* --- Outbound call (field/call.html, static/js/outbound-call.js) -------------
   A number rung from the office: the green Call button, six tiles for how the
   call went, then the survey's numbered cards for what that answer asks. */
.ob-form { display: grid; gap: 12px; min-width: 0; }
.ob-form section > textarea { margin-top: 0; }
.banner.ob-lead { margin-bottom: 0; }

/* The Call button: the phone's own dialler, one tap. */
.ob-dial {
  display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; min-height: 64px;
  border-radius: 14px; background: var(--yes); color: var(--pick-ink); text-decoration: none;
  box-shadow: 0 8px 20px -12px var(--yes);
  transition: filter .15s ease, transform .1s ease;
}
.ob-dial:active { filter: brightness(1.1); transform: scale(0.99); }
.ob-dial-ic { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.ob-dial-ic svg { width: 21px; height: 21px; }
.ob-dial-words { min-width: 0; }
.ob-dial-words b { display: block; font-size: 18px; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.ob-dial-words small { display: block; font-size: 12.5px; opacity: 0.9; }
@media (hover: hover) { .ob-dial:hover { filter: brightness(1.08); } }

/* How the call went: six tiles two by two, each in its own colour once
   picked - green yes, amber later, red no, and quiet greys and blues for the
   calls that make no lead. */
.ob-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ob-results .choice { display: flex; }
.ob-results .choice span {
  flex: 1; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 2px;
  min-height: 98px; padding: 11px 12px 12px; border-radius: 14px; text-align: left;
}
.ob-r-ic {
  display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 5px; border-radius: 10px;
  background: var(--tone-bg); color: var(--tone); transition: background .15s, color .15s;
}
.ob-r-ic svg { width: 20px; height: 20px; }
.ob-results .choice span b { font-size: 15px; line-height: 1.25; color: var(--ink); }
.ob-results .choice span small { font-size: 12px; font-weight: 500; line-height: 1.3; color: var(--muted); }
.ob-r-interested { --tone: var(--yes-ink); --tone-bg: var(--yes-50); }
.ob-r-callback { --tone: var(--warn); --tone-bg: var(--warn-50); }
.ob-r-not_interested { --tone: var(--no-ink); --tone-bg: var(--no-50); }
.ob-r-no_answer { --tone: var(--ink-2); --tone-bg: var(--tint); }
.ob-r-existing { --tone: var(--info-ink); --tone-bg: var(--info-50); }
.ob-r-wrong_number { --tone: var(--muted); --tone-bg: var(--neutral-bg); }
.ob-results .choice input:checked + span {
  background: var(--tone-bg); border-color: var(--tone); color: var(--tone);
  box-shadow: inset 0 0 0 1px var(--tone);
}
.ob-results .choice input:checked + span .ob-r-ic { background: var(--card); }
.ob-results .choice input:checked + span b { color: var(--tone); }
.ob-results .choice input:checked + span small { color: var(--tone); opacity: 0.85; }
@media (max-width: 340px) {
  .ob-results .choice span small { display: none; }
  .ob-results .choice span { min-height: 80px; }
}

/* What saving does with the answer picked - said before it is done. */
.ob-after {
  margin-top: 12px; padding: 9px 12px; border-radius: 12px; background: var(--soft);
  border: 1px dashed var(--line-2); color: var(--ink-2); font-size: 13.5px; line-height: 1.45;
}

/* The call-back: quick times, each with its clock time, and the reminder
   said back in words. */
.ob-when .choice span small { margin-left: 6px; font-size: 12.5px; font-weight: 600; opacity: 0.7; font-variant-numeric: tabular-nums; }
.ob-pick { margin-top: 12px; }
.ob-at { margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--brand-ink); }

/* Follow-on questions inside a card, and the short answers that sit as
   equal tiles across it. */
.ob-follow { margin-top: 14px; }
.ob-two, .ob-three { display: grid; gap: 8px; }
.ob-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ob-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ob-two .choice span, .ob-three .choice span {
  justify-content: center; text-align: center; line-height: 1.2; padding-left: 8px; padding-right: 8px;
}

/* Where the map and link ways go (wired later); nothing until they do. */
.place-ways { margin-top: 14px; }
.place-ways:empty { display: none; }

/* New lead and Outbound call on the home screen's hero (field/home.html):
   one full-width button when only one is there, two tiles side by side when
   both are - icon over the words, so "Outbound call" fits a 360px phone. */
.hero-acts { display: grid; gap: 10px; margin-top: 10px; }
.hero .hero-note + .hero-acts { margin-top: 12px; }
.hero-acts .btn { margin-top: 0; }
.hero-acts.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hero-acts.pair .btn {
  flex-direction: column; gap: 4px; min-height: 70px; padding: 10px 8px;
  font-size: 15.5px; line-height: 1.2; text-align: center;
}
.hero-acts.pair .btn svg { width: 24px; height: 24px; }

/* Call-backs due, under "to ring": in the brand's blue, so the two bars
   read apart - one is leads not rung yet, the other leads booked. */
.ring-bar.cb-bar { margin-top: 10px; background: var(--brand-50); color: var(--brand-ink); }
.ring-bar.cb-bar .ring-ic { background: var(--card); }
.ring-bar.cb-bar.on-card { border: 1px solid var(--brand-100); }
.row-side small.cb-when { color: var(--brand-ink); font-weight: 650; }

/* In a lead's drawer: the call form on this lead, one tap away. */
.ob-script {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 11px 14px; min-height: 60px;
  border: 1px solid var(--brand-100); border-radius: var(--radius); background: var(--brand-50);
  color: var(--brand-ink); text-decoration: none;
}
.ob-script:active { border-color: var(--brand); }
.ob-script-ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--card); }
.ob-script-ic svg { width: 20px; height: 20px; }
.ob-script-words { flex: 1; min-width: 0; }
.ob-script-words b { display: block; font-size: 15.5px; }
.ob-script-words small { display: block; font-size: 12.5px; color: var(--ink-2); }
.ob-script-go { font-size: 26px; line-height: 1; opacity: 0.6; }
@media (hover: hover) { .ob-script:hover { border-color: var(--brand); } }
/* Outbound call's two ways (no GPS on a phone call). */
.tools.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* The app seen as somebody from the panel (templates/_look_band.html): whose
   app it is, read only, and the way back. Both apps load this file. */
.look-band {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 14px; padding: 10px 12px;
  background: var(--brand-50); color: var(--ink);
  border: 1px solid var(--brand-100); border-radius: 12px;
}
.look-eye { font-size: 18px; flex: none; }
.look-text { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; font-size: 13px; line-height: 1.35; }
.look-text b { color: var(--brand-ink); font-size: 14px; }
.look-text span { color: var(--ink-2); }
.look-band form { flex: none; margin: 0; }
.look-back {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 8px 12px; border: 0; border-radius: 10px;
  background: var(--btn-fill); color: #fff; white-space: nowrap;
}
@media (max-width: 420px) {
  .look-band { flex-wrap: wrap; }
  .look-text { flex-basis: 0; }          /* beside the eye; the button wraps below */
  .look-band form { width: 100%; }
  .look-back { width: 100%; }
}

/* A lead still open 15+ days after it came in (templates/_pending_flag.html,
   services.people_work, 19 Oct 2026). */
.pending-flag { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 12px;
  font-weight: 700; color: var(--warn); background: var(--warn-50); white-space: nowrap; }
.pending-flag.small { font-size: 11px; padding: 0 6px; }

/* A lead in the same stage too long (templates/_pending_flag.html,
   people_work.STAGE_DAYS, 11 Nov 2026): beside the ⚑, in another colour. */
.stage-flag { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 12px;
  font-weight: 700; color: var(--info-ink); background: var(--info-50); white-space: nowrap; }
.stage-flag.small { font-size: 11px; padding: 0 6px; }

/* Add a lead → Events → Which event (templates/_event_pick.html). */
.ev-pick select, .ev-pick input:not([hidden]) { display: block; width: 100%; margin: 6px 0 10px; min-height: 48px; }

/* ---------- A sheet from the bottom, over the form ----------
   The field activity form's "something of ours is already here" and both
   apps' "turn on precise location". Themed, unlike the viewfinder: this is
   our page asking a question. */
.spot-sheet {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(8, 16, 30, 0.55);
}
.spot-sheet[hidden] { display: none; }
.spot-in {
  width: min(100%, 560px);
  max-height: 92vh;
  overflow-y: auto;
  padding: 20px 16px calc(18px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: var(--sheet-bg, var(--card));
  box-shadow: var(--shadow);
}
.spot-in h2 { margin: 0 0 4px; font-size: 18px; color: var(--ink); }
.spot-acts { display: grid; gap: 8px; margin-top: 4px; }
.spot-acts .btn { width: 100%; }

/* ---------- Only an approximate location: the sheet that will not send it ----------
   The spot sheet's frame (activity-form.js; field-survey.js on the sales
   survey form; the steps from phone-steps.js). The steps are
   numbered cards, one switch to find in each, because this is read by
   somebody standing in a street with the phone's Settings open beside it. */
.approx-sheet .spot-in { display: grid; gap: 10px; }
.approx-top { display: flex; align-items: flex-start; justify-content: space-between; }
.approx-badge {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--warn-50); border: 1px solid var(--warn-bd); color: var(--warn);
}
.approx-badge svg { width: 24px; height: 24px; }
.approx-close { margin: -6px -6px 0 0; background: var(--soft); color: var(--ink); }
.approx-sheet h2 { font-weight: 800; }
.approx-sheet #approx-sub { margin: 0; }
.approx-state {
  margin: 0; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--soft);
  color: var(--ink); font-size: 14px; font-weight: 650; line-height: 1.4;
}
.approx-state[hidden] { display: none; }
.approx-state.warn { border-color: var(--warn-bd); background: var(--warn-50); color: var(--warn); }
.approx-state.ok { border-color: var(--yes-bd); background: var(--yes-50); color: var(--yes-ink); }
.approx-sheet #approx-ask { width: 100%; }
.approx-how { display: grid; gap: 10px; }
.approx-way {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card);
}
.approx-way h3 {
  margin: 0 0 8px; font-size: 12.5px; font-weight: 750; letter-spacing: .02em;
  text-transform: uppercase; color: var(--muted);
}
.approx-way ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; counter-reset: step; }
.approx-way li {
  display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start;
  font-size: 14.5px; line-height: 1.45; color: var(--ink); counter-increment: step;
}
.approx-way li::before {
  content: counter(step);
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand-50); color: var(--brand); font-size: 12.5px; font-weight: 800;
}
.approx-way li b { font-weight: 750; }
.approx-foot { margin: 0; }

/* --- Needs attention (4 Nov 2026, services.lead_attention) ------------------
   On home: a card with every reason and its count, each opening its leads.
   On a lead's row and in its drawer: how long it has been with them, and the
   reasons as small chips. Colours from the tokens above, so dark mode follows. */
.att-card {
  margin-top: 10px; border-radius: 16px; background: var(--card); color: var(--ink);
  border: 1px solid var(--warn-bd); overflow: hidden;
}
.att-head {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0;
  background: var(--warn-50); color: var(--warn); text-align: left; font: inherit; cursor: pointer;
}
.att-ic { width: 36px; height: 36px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--card); }
.att-ic svg { width: 20px; height: 20px; }
.att-words { flex: 1; min-width: 0; display: grid; }
.att-words b { font-size: 15.5px; }
.att-words small { font-size: 12.5px; opacity: .85; }
.att-rows { display: grid; grid-template-columns: 1fr 1fr; }
.att-row {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 0; background: none;
  color: var(--ink); text-align: left; font: inherit; cursor: pointer; border-top: 1px solid var(--line);
}
.att-row:nth-child(even) { border-left: 1px solid var(--line); }
.att-row:active { background: var(--soft); }
.att-row > b { font-size: 21px; font-variant-numeric: tabular-nums; min-width: 1.4em; color: var(--warn); }
.att-row.att-cb_late > b, .att-row.att-back > b { color: var(--no); }
.att-row span { display: grid; font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.att-row small { font-weight: 500; color: var(--muted); font-size: 12px; }

.row-main small.row-att { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 4px; white-space: normal; overflow: visible; }
.att-days { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.att-chip, .nk-chip {
  font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 1px 8px; white-space: nowrap;
  background: var(--warn-50); color: var(--warn); border: 1px solid var(--warn-bd);
}
.att-chip.att-cb_late, .att-chip.att-back { background: var(--no-50); color: var(--no-ink); border-color: var(--no-bd); }
.nk-chip { background: var(--neutral-bg); color: var(--ink-2); border-color: var(--line); }

.att-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 12px; padding: 10px 12px;
  border-radius: 12px; background: var(--soft); border: 1px solid var(--line);
}
.att-strip.needs { background: var(--warn-50); border-color: var(--warn-bd); }
.att-strip .att-days { font-size: 13.5px; }
.att-strip .att-days b { font-size: 17px; }
.att-goes { flex-basis: 100%; color: var(--muted); font-size: 12.5px; }

/* What is this number? - on every call. */
.nk-set { border: 0; padding: 0; margin: 4px 0 6px; min-width: 0; }
.nk-q { display: block; font-size: 13.5px; font-weight: 800; color: var(--ink-2); margin: 4px 0 8px; }
.nk-choices { display: grid; grid-template-columns: 1fr 1fr; }
.nk-said { font-size: 13px; color: var(--ink-2); background: var(--neutral-bg); border-radius: 10px; padding: 8px 10px; margin: 8px 0 0; }
.nk-topic { margin-top: 8px; }
.call-form h4.nk-q { margin-top: 12px; }
.fld .req { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--warn); margin-left: 6px; }
@media (max-width: 340px) { .att-rows, .nk-choices { grid-template-columns: 1fr; } .att-row:nth-child(even) { border-left: 0; } }
/* Pick from contacts on New lead (contact-pick.js). */
.contact-pick { margin-top: 8px; display: inline-flex; align-items: center; gap: 8px; }
.contact-pick svg { width: 18px; height: 18px; }

/* --- Home: search, feasibility checks, and their lists (16 Nov 2026) ------------ */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* On the hero, first thing: their own leads and surveys. */
.home-search {
  display: flex; align-items: center; gap: 8px; margin-top: 14px;
  padding: 4px 4px 4px 12px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22);
}
.home-search:focus-within { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.45); }
.home-search svg { width: 18px; height: 18px; flex: none; color: #c3d3e7; }
/* Over the app's own input look (field.css "input:not(...)"): the box is the bar. */
.home-search input[type="search"],
.home-search input[type="search"]:focus {
  flex: 1; min-width: 0; min-height: 40px; width: auto; margin: 0; padding: 0 2px;
  border: 0; border-radius: 0; background: transparent; box-shadow: none; color: #fff;
  font: inherit; font-size: 15px; outline: none;
}
.home-search input[type="search"]::placeholder { color: #c3d3e7; opacity: 1; }
.home-search button {
  min-height: 40px; padding: 0 14px; border: 0; border-radius: 11px; flex: none;
  background: #fff; color: var(--brand-600); font: inherit; font-size: 14px; font-weight: 700;
}
/* Inside the drawer: the same search, to look again. */
.sheet-search { display: flex; gap: 8px; margin-bottom: 10px; }
.sheet-search input {
  flex: 1; min-width: 0; min-height: 42px; padding: 0 12px; border-radius: 12px;
  border: 1.5px solid var(--line-2); background: var(--card); color: var(--ink); font: inherit; font-size: 15px;
}
.sheet-search input:focus { outline: none; border-color: var(--brand); }
.sheet-search button {
  min-height: 42px; padding: 0 14px; border-radius: 12px; border: 0;
  background: var(--btn-fill); color: #fff; font: inherit; font-size: 14px; font-weight: 700;
}
.sheet-h { margin: 14px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.sheet-list mark { background: var(--warn-50); color: inherit; border-radius: 3px; padding: 0 1px; }
.feas-card .count.new { color: var(--warn); background: var(--warn-50); }
/* A feasibility row: its result on the right, the GIS code and place under. */
.feas-list .row-side { align-items: flex-end; }
/* The number, the GIS code and the place are read whole - never cut off. */
.feas-list .row-main small { white-space: normal; overflow-wrap: anywhere; }
.feas-list .feas-place { color: var(--muted); font-size: 12.5px; }
.feas-list .nw { white-space: nowrap; }
.feas-list .row-open:disabled { cursor: default; opacity: 1; }
.feas-list .unsaved { color: var(--warn); font-weight: 650; }
