/* IDEAL SALES (sales.py) -- the whole look, on its own: no portal.css, no coord.css.

   THE REDESIGN (Kenyon, 2026-10-20: "I love the usable look of the Bar Manager app ... Dark
   and Light modes (or auto)"; the mockup, "this is PERFECT"). Calm neutrals; Lato only, sentence
   case (capitals only on the small group labels); black buttons; red only for act-now; venue
   dots. Every color is a token below, set for light and for dark; the account menu's switch puts
   light / dark / auto on <html data-theme>, auto following the phone.

   Sizes: type 13 / 14 / 15 / 17 / 18 / 22 / 30; radius 14 cards, 10 boxes and buttons, 999 pills;
   nothing tappable under 44px. Layouts switch by width only: phone <= 640px, computer >= 1025px. */

/* ------------------------------------------------------------------ tokens */
:root {
  --bg: #F7F5F2; --card: #FFFFFF; --soft: #F3F1EE; --track: #E4E1DC; --line: #E6E3DE;
  --field: #FFFFFF; --field-line: #D6D2CC; --field-off: #F3F1EE;
  --ink: #141414; --muted: #666666; --strong: #111111; --on-strong: #FFFFFF;
  --accent: #BD2035; --accent-bg: #FBEDEE; --green: #1F7A3D; --green-bg: #EAF4EC;
  --amber: #B86E00; --amber-bg: #FFF3DF; --blue: #2F5E9E; --blue-bg: #EBF1F9;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06); --pop: 0 8px 30px rgba(0, 0, 0, .18);
  --scrim: rgba(0, 0, 0, .35);
  --gutter: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D0D0C; --card: #191817; --soft: #211F1D; --track: #2E2B28; --line: #2C2A27;
    --field: #232220; --field-line: #4A4743; --field-off: #1E1C1A;
    --ink: #F1EEE9; --muted: #A39E95; --strong: #F1EEE9; --on-strong: #111111;
    --accent: #F0596B; --accent-bg: #3A1519; --green: #7FD49B; --green-bg: #15291C;
    --amber: #F2AD45; --amber-bg: #3A2A12; --blue: #8DB4E8; --blue-bg: #17222F;
    --shadow: none; --pop: 0 8px 30px rgba(0, 0, 0, .6); --scrim: rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0D0D0C; --card: #191817; --soft: #211F1D; --track: #2E2B28; --line: #2C2A27;
  --field: #232220; --field-line: #4A4743; --field-off: #1E1C1A;
  --ink: #F1EEE9; --muted: #A39E95; --strong: #F1EEE9; --on-strong: #111111;
  --accent: #F0596B; --accent-bg: #3A1519; --green: #7FD49B; --green-bg: #15291C;
  --amber: #F2AD45; --amber-bg: #3A2A12; --blue: #8DB4E8; --blue-bg: #17222F;
  --shadow: none; --pop: 0 8px 30px rgba(0, 0, 0, .6); --scrim: rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body.sales { margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.45 "Lato", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
/* HIDDEN MEANS HIDDEN (Kenyon, 2026-10-20: "if 'no second day' is selected, I don't want the second
   day form fields to appear at all") -- for every [hidden], whatever its layout says. */
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 30px; font-weight: 900; letter-spacing: -.01em; margin: 6px 0 16px; }
h2 { font-size: 22px; font-weight: 900; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 12px; }
b, strong { font-weight: 700; }
.lede { color: var(--muted); font-size: 15px; margin: 0 0 16px; }
.small, .aside { font-size: 14px; color: var(--muted); margin: 4px 0 0; }
.aside { margin-top: 18px; }
/* THE GROUP LABEL: the one place for capitals -- small, spaced, grey. */
.glabel, .qlabel, .dsec, .rhead {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
/* A box's own label: sentence case, small and bold. */
.lform label, .lform legend, .signcard label { font-size: 13px; font-weight: 700; color: var(--muted); }
:is(a, button, select, input, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
form.inline { display: inline; }
form { margin: 0; }

/* ------------------------------------------------------------------ boxes and buttons */
/* :where() keeps these at no weight, so a component's own box style always wins. */
:where(input:not([type=checkbox], [type=radio], [type=file]), select, textarea, .sel) {
  font: 400 16px/1.3 "Lato", system-ui, sans-serif;      /* 16px: an iPhone doesn't zoom in */
  color: var(--ink); background: var(--field); border: 1px solid var(--field-line); border-radius: 10px;
  padding: 0 12px; min-height: 44px; width: 100%; }
:where(textarea) { padding: 10px 12px; line-height: 1.45; resize: vertical; }
:where(select) { appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
:where(input, select, textarea):disabled { background-color: var(--field-off); color: var(--muted); -webkit-text-fill-color: var(--muted); opacity: 1; }
::placeholder { color: var(--muted); opacity: 1; }
input[type=checkbox], input[type=radio] { accent-color: var(--strong); width: 20px; height: 20px; margin: 0; flex: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border: 1px solid var(--strong); border-radius: 12px; background: var(--strong); color: var(--on-strong);
  font: 700 16px/1.1 "Lato", system-ui, sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; margin: 0; }
.btn:hover { opacity: .88; }
.btn.small { min-height: 40px; padding: 0 16px; border-radius: 10px; font-size: 15px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--field-line); }
.btn.ghost:hover { border-color: var(--ink); opacity: 1; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn > input[type=file] { display: none; }
.linkish { background: none; border: 0; padding: 0; min-height: 44px; font: 700 15px/1 "Lato", system-ui, sans-serif;
  color: var(--muted); cursor: pointer; }
.linkish:hover { color: var(--ink); }
.ibtn { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--field-line); background: transparent; color: var(--ink); cursor: pointer; }
.ibtn:hover { border-color: var(--ink); }

.note { padding: 12px 14px; border-radius: 10px; margin: 0 0 14px; background: var(--soft); color: var(--ink); font-size: 15px; }
.note.ok { background: var(--green-bg); }
.note.stop { background: var(--accent-bg); color: var(--ink); }
.note ul { margin: 6px 0 0; padding-left: 18px; }
.card { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 18px; border: 0; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.pill { display: inline-flex; align-items: center; min-height: 26px; padding: 0 12px; border-radius: 999px;
  background: var(--soft); color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; }
.viewonly { display: inline-flex; align-self: flex-start; min-height: 26px; align-items: center; padding: 0 12px; border-radius: 999px;
  background: var(--track); color: var(--ink); font-size: 13px; font-weight: 700; margin: 0; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; }
.fixed { margin: 0 0 4px; font-weight: 700; }
.bad { color: var(--accent); font-weight: 700; }
.ok-text { color: var(--green); }

/* A SEGMENTED SWITCH: the pipeline, the owner, the nurture months, light / dark / auto. */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; padding: 3px;
  background: var(--track); border-radius: 11px; }
.seg > a, .seg > button { min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 6px;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: 700 15px/1.1 "Lato", system-ui, sans-serif;
  text-decoration: none; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg > [aria-current="page"], .seg > [aria-pressed="true"], .seg > [aria-checked="true"] { background: var(--strong); color: var(--on-strong); }

/* ------------------------------------------------------------------ the page frame */
.top { padding-top: env(safe-area-inset-top); }
.top-in { max-width: 980px; margin: 0 auto; padding: 12px var(--gutter) 6px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; }
.cbrand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 44px; min-width: 0; }
.sicon { display: block; width: 32px; height: 32px; border-radius: 50%; flex: none; }
.cb-1 { font-size: 17px; font-weight: 900; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 12px; }
.nav > a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 6px; color: var(--muted); font-weight: 700;
  text-decoration: none; }
.nav > a[aria-current="page"], .nav > a:hover { color: var(--ink); }
.wrap { max-width: 980px; margin: 0 auto; padding: 6px var(--gutter) calc(48px + env(safe-area-inset-bottom)); }
.narrow { max-width: 440px; margin: 24px auto 0; }

/* The account menu: a round headshot button; who's signed in, the look, notifications, Log out. */
.acct { position: relative; }
.acct > summary { list-style: none; cursor: pointer; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  color: var(--ink); border: 1px solid var(--line); background: var(--card); }
.acct > summary::-webkit-details-marker { display: none; }
.acct[open] > summary { border-color: var(--ink); }
.acctmenu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: 272px; max-width: calc(100vw - 32px);
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--pop); padding: 6px; }
.acctwho { margin: 0; padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; line-height: 1.3; }
.acctwho span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.acctrow { padding: 10px 8px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.acctrow .glabel { padding: 0 4px; }
.tseg > button { min-height: 36px; font-size: 14px; }
.acctout { display: flex; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-radius: 10px; cursor: pointer;
  padding: 0 12px; min-height: 44px; font: 400 16px/1.2 "Lato", system-ui, sans-serif; color: var(--ink); }
.acctout:hover { background: var(--soft); }
.acctnote { font-size: 13px; color: var(--muted); margin: 6px 12px; }

/* ------------------------------------------------------------------ the dashboard */
.hi { margin: 4px 0 14px; }
.pipe { margin: 0 0 12px; padding: 4px; border-radius: 12px; }
.pipe > a { min-height: 44px; border-radius: 9px; color: var(--muted); }
.pipe > a b { font-weight: 700; }
.pipe > a[aria-current="page"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
:root[data-theme="dark"] .pipe > a[aria-current="page"] { background: var(--field-line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pipe > a[aria-current="page"] { background: var(--field-line); } }

.sfilter { display: flex; gap: 8px; margin: 0 0 6px; }
.search { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px;
  border: 1px solid var(--field-line); border-radius: 10px; background: var(--field); color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; padding: 0; min-height: 0; height: 100%; background: transparent; border-radius: 0; }
.search input:focus-visible { outline: none; }
.search:focus-within { border-color: var(--ink); }
.fdrop { position: relative; flex: none; }
.fdrop > summary { list-style: none; width: 46px; height: 46px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--field-line); border-radius: 10px; background: var(--field); color: var(--ink); position: relative; }
.fdrop > summary::-webkit-details-marker { display: none; }
.fdrop[open] > summary { border-color: var(--ink); }
.fdot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.fpanel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: grid; gap: 8px; padding: 14px;
  width: max-content; max-width: min(calc(100vw - 32px), 520px); background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--pop); }
.whofilter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 4px; }
.whofilter a { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--field-line); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px; }
.whofilter a[aria-current="page"] { background: var(--strong); border-color: var(--strong); color: var(--on-strong); }

/* The section head: "Open leads 12" and the round black + (Kenyon, 2026-10-19). */
.lgroup, .dlist { margin: 18px 0 0; overflow-anchor: none; }
.lhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.lhead h2 { display: flex; align-items: baseline; gap: 8px; }
.ltotal { color: var(--muted); font-weight: 700; }
.addplus { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--strong); color: var(--on-strong); }
.addplus svg { transition: transform .15s; }
.addplus[aria-expanded="true"] svg { transform: rotate(45deg); }
.addlead { margin: 10px 0 0; padding: 16px; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); }
.addlead .lform { margin: 0; }
.addgo { justify-content: flex-end; }

/* The groups: a small label with its count, then the rows in one white card. */
.qsec { margin: 16px 0 0; overflow-anchor: none; }
.qlabel { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.qlabel .cnt { background: var(--track); color: var(--ink); border-radius: 999px; padding: 1px 8px; letter-spacing: 0; font-size: 12px; }
.qsec.fresh > .qlabel .cnt { background: var(--accent-bg); color: var(--accent); }     /* act now */
.qempty { margin: 0; padding: 14px; color: var(--muted); font-size: 14px; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); }
.rcard { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; margin-top: 8px; }
.qsec .rcard { margin-top: 0; }

/* TODAY'S GOALS (Hunter, 2026-10-20): two tiles under Hi -- tap to count, green once it's met. */
.goals { margin: -4px 0 14px; }
.ghead { display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
.gedit { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-size: 14px; }
.gtiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gtile { position: relative; }
.gtap { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px 14px;
  background: var(--card); border: 0; border-radius: 14px; box-shadow: var(--shadow); color: var(--ink); text-align: left;
  font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .08s; }
.gtap:active { transform: scale(.97); }
.gname { font-size: 13px; font-weight: 700; color: var(--muted); }
.gnum { display: flex; align-items: center; gap: 2px; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gnum b { font-size: 30px; font-weight: 900; line-height: 1.1; color: var(--ink); }
.gcheck { display: none; margin-left: 6px; }
.gbar { display: block; width: 100%; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; margin-top: 4px; }
.gbar > span { display: block; height: 100%; background: var(--strong); border-radius: 3px; transition: width .2s; }
.gtile.met .gtap { background: var(--green-bg); }
.gtile.met .gnum b, .gtile.met .gnum { color: var(--green); }
.gtile.met .gcheck { display: inline; }
.gtile.met .gbar > span { background: var(--green); }
.gminus { position: absolute; top: 4px; right: 4px; width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.gminus:hover { color: var(--ink); }
.gform { display: flex; align-items: flex-end; gap: 8px; margin-top: 8px; padding: 12px; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); }
.gform label { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.gform .btn { flex: none; min-height: 44px; }

.gacts { display: inline-flex; align-items: center; gap: 14px; }
.gacts a.gedit { text-decoration: none; }

/* THE DAILY REPORT (Kenyon, 2026-10-21). */
.rphead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 8px; }
.rphead h1 { margin: 0; }
.rpday { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px;
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; }
.rpday > span { font-weight: 700; font-size: 16px; }
.rpday .ibtn { text-decoration: none; font-size: 20px; border: 0; width: 44px; height: 44px; }
.rpday .ibtn.off { color: var(--line); }
.rpreps { margin: 0 0 12px; }
.rptiles { margin-bottom: 4px; }
.rptiles .gtap { cursor: default; }
.rptiles .gtap:active { transform: none; }
.rpitem { display: flex; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); margin-top: -1px; }
.rpwhen { flex: none; width: 68px; font-size: 13px; color: var(--muted); padding-top: 2px; font-variant-numeric: tabular-nums; }
.rpwhat { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 15px; }
.rpwhat span { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; white-space: pre-wrap; }
.rpnone { margin-top: 16px; }
.rptext { width: 100%; min-height: 240px; margin-top: 16px; }

/* ------------------------------------------------------------------ a row */
/* The date chip | the name, the venue dot and details | the round tick and how long it's waited. */
.srow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 68px;
  border-top: 1px solid var(--line); margin-top: -1px; position: relative; }   /* the first row's line is clipped */
.srow.tap, .golink { cursor: pointer; }
@media (hover: hover) { .srow.tap:hover, .golink:hover { background: var(--soft); } }
.ldate { width: 46px; flex: none; text-align: center; line-height: 1.1; display: flex; flex-direction: column; align-items: center; }
.ldate .m { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ldate .d { font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; }
.ldate .y { font-size: 11px; color: var(--muted); }
.lmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lname { font-size: 17px; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lname a { text-decoration: none; }
.lmeta { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); min-width: 0; }
.lmeta .mt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vdot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; background: var(--muted); }
.vdot.ideal { background: var(--accent); }
.vdot.oly { background: var(--blue); }
.vdot.und { background: transparent; border: 1.5px solid var(--muted); }
.linqm, .tourtag { font-size: 13px; color: var(--muted); }
.tourtag { color: var(--blue); font-weight: 700; }
.tourtag.late { color: var(--accent); }
.lamt { flex: none; display: flex; align-items: center; gap: 10px; }
.lamt:has(> .ctick):not(:has(> .amtcol)) { flex-direction: column; gap: 2px; }   /* the tick over how long it's waited */
.amtcol { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.amt { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.age { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.age.late { color: var(--accent); }
.amtcol .age { font-weight: 400; }
/* The round tick: tap it and the row folds into its Undo bar. */
.ctick { position: relative; width: 44px; height: 44px; flex: none; cursor: pointer; display: grid; place-items: center; }
.ctick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.ctick .tk { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--field-line); display: grid; place-items: center;
  color: transparent; transition: background .15s, color .15s, border-color .15s; pointer-events: none; }
.ctick:hover .tk { border-color: var(--ink); }
.ctick input:checked + .tk { background: var(--green); border-color: var(--green); color: var(--on-strong); }
.ctick input:focus-visible + .tk { outline: 2px solid var(--ink); outline-offset: 2px; }
.chev { display: none; width: 44px; height: 44px; flex: none; place-items: center; color: var(--muted); }
.srow.opened { background: var(--card); }
.srow.opened > .lamt { display: none; }
.srow.opened > .chev { display: grid; }
/* LAST TRY / TIME TO CLOSE / NURTURE (Kenyon, 2026-10-17 and 10-19). */
.steppill { display: inline-block; vertical-align: 2px; margin-left: 6px; padding: 1px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.steppill.last { background: var(--amber-bg); color: var(--amber); }
.steppill.close { background: var(--accent-bg); color: var(--accent); }
.steppill.nurt { background: var(--track); color: var(--ink); }
.vinq { font-style: normal; }
/* Toured / No-show, right on the row of a tour that's passed (Kenyon, 2026-10-14). */
.tourout { display: inline-flex; flex-direction: column; gap: 6px; align-items: stretch; }
.tbtn { font: 700 14px/1 "Lato", system-ui, sans-serif; padding: 0 14px; min-height: 40px; border-radius: 10px; cursor: pointer;
  background: var(--strong); color: var(--on-strong); border: 1px solid var(--strong); white-space: nowrap; min-width: 92px; }
.tbtn.ghost { background: transparent; color: var(--ink); border-color: var(--field-line); }
.tbtn:disabled { opacity: .5; }

/* The Undo bar (the tick, Close lead): the row folds into it for a few seconds. */
.undobar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--strong); color: var(--on-strong); max-height: 180px; border-top: 1px solid var(--line); margin-top: -1px;
  transition: max-height .3s ease, opacity .3s ease, padding .3s ease; overflow: hidden; }
.undobar .btn { background: var(--on-strong); color: var(--strong); border-color: var(--on-strong); min-height: 44px; }
.undobar.saving .btn { visibility: hidden; }
.undobar.gone { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; }
.undobar .undoright { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.undobar .fudate { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.undobar .fudate input { width: auto; min-height: 40px; }

/* ------------------------------------------------------------------ the lead, open */
/* One soft panel under its row; the blocks apart by space alone. */
.lpanel { background: var(--soft); padding: 16px 14px 14px; }
.lpanel-in { display: flex; flex-direction: column; gap: 18px; max-width: 760px; margin: 0 auto; }
.lpanel-in.onlyform { gap: 12px; max-width: none; }
.lpanel > .small { margin: 0; }
.oseg { margin: 0; }
.oseg .assignbtn { min-height: 40px; }
/* CALL, TEXT, EMAIL (Kenyon, 2026-10-17): one bordered group, an icon over a word. */
.quick { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; background: var(--card); }
.qbtn { min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 4px;
  text-decoration: none; color: var(--ink); font-size: 13px; font-weight: 700; text-align: center; }
.qbtn + .qbtn { border-left: 1px solid var(--line); }
.qbtn svg { width: 20px; height: 20px; flex: none; }
.qbtn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
@media (hover: hover) { .qbtn:hover { background: var(--soft); } }
/* SEND WELCOME TEXT (Kenyon, 2026-10-17): the message as a bubble, Send text under it. */
.wtext { display: flex; flex-direction: column; gap: 8px; }
.wtextmsg { margin: 0; background: var(--card); border-radius: 16px 16px 16px 4px; padding: 12px 14px; font-size: 15px; line-height: 1.45;
  white-space: pre-wrap; }
.wtextgo { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.wtextdone { margin: 0; }
.replysent { color: var(--green); font-weight: 700; margin: 0; }
/* THE DETAILS AT A GLANCE (Kenyon, 2026-10-19), the pencil in the corner (redesign). */
.lsum { position: relative; background: var(--card); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.lsumedit { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; display: grid; place-items: center; color: var(--muted);
  font-size: 14px; }
.lsumedit[aria-expanded="true"] { width: auto; padding: 0 12px; color: var(--ink); }
.lsum dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; padding-right: 34px; }
.lsum dl > div { min-width: 0; }
.lsum dl > .wide { grid-column: 1 / -1; }
.lsum dt { font-size: 12px; font-weight: 700; color: var(--muted); }
.lsum dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.lsumalt { color: var(--muted); font-size: 13px; }
.lsumnotes { margin: 12px 0 0; font-size: 14px; color: var(--muted); line-height: 1.4; white-space: pre-wrap; }
.lsum:has(.lsumedit[aria-expanded="true"]) { min-height: 52px; }
@media (min-width: 641px) { .lsum dl { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* The lead's fields (Edit), the add-a-lead form, the builder: labelled boxes in a grid. */
.ledit { background: var(--card); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.rofs { border: 0; margin: 0; padding: 0; min-width: 0; }
.lform { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; }
.lform .f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.lform .f.notes { grid-column: span 2; }
.lform .f.wide { grid-column: 1 / -1; }
.lform fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.lform .checks { display: flex; flex-wrap: wrap; gap: 0 14px; align-content: flex-start; }
.lform .checks legend { width: 100%; margin-bottom: 4px; padding: 0; }
.lform .checks label, .lform .inl { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 15px; color: var(--ink);
  display: flex; gap: 8px; align-items: center; min-height: 40px; }
.lform .fhint { font-size: 12px; color: var(--muted); line-height: 1.3; }
.lform .val { font-size: 15px; padding: 10px 12px; min-height: 44px; border-radius: 10px; background: var(--card); color: var(--ink);
  overflow-wrap: anywhere; white-space: pre-wrap; }
.ledit .lform .f.rare.ownerf { display: none; }        /* the owner switch at the top of the card sets it */
.moretoggle { display: none; }
.lsaved { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.lsaved.ok { color: var(--green); }
.lsaved.bad { color: var(--accent); font-weight: 700; }

/* The rep log: + left of a one-line box (Kenyon, 2026-10-19); each entry its stamp over its words. */
.replog { display: flex; flex-direction: column; gap: 10px; }
.logform { display: flex; gap: 8px; align-items: flex-start; }
.logform .plus { order: -1; }
.plus { flex: none; width: 44px; height: 44px; border-radius: 10px; border: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--strong); color: var(--on-strong); }
.logbox { flex: 1 1 auto; min-width: 0; }
.logform textarea { height: 44px; min-height: 44px; resize: none; overflow: hidden; display: block; padding: 11px 12px; flex: 1; }
.logform.open textarea { height: 120px; overflow: auto; resize: vertical; }
.logsave { display: flex; gap: 14px; align-items: center; margin-top: 8px; }
.logs { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.logs li { display: flex; flex-direction: column; gap: 2px; font-size: 15px; line-height: 1.4; position: relative; padding-right: 48px; }
.logs .lhead2 { font-size: 13px; color: var(--muted); }
.logs .ltext { white-space: pre-wrap; overflow-wrap: anywhere; }
.logs .logedit { position: absolute; right: 0; top: 0; min-height: 36px; font-size: 13px; }
.logs .logedit-box { margin-top: 2px; }

/* The tour: one line -- a calendar, Tour, Book, the link (redesign, 2026-10-20). */
.tourbox { background: var(--card); border-radius: 12px; padding: 8px 8px 8px 14px; box-shadow: var(--shadow); }
.thead { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.tcal { flex: none; color: var(--blue); }
.tourline { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 15px; font-weight: 400; margin: 0; }
.tourline b { font-weight: 700; }
.tourline span { font-size: 13px; color: var(--muted); }
.tourbox > .small, .tourbox > .tmsg { margin: 6px 6px 4px 0; }
.tacts { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.tourpick { margin: 10px 6px 6px 0; }
/* A custom time (Hunter, 2026-10-20): the link top right above the slots; Mark tour booked under it. */
/* One line, even on a phone (Kenyon, 2026-10-20): the switch reads Venue / Wedding there. */
.tphead { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: nowrap; margin-bottom: 10px; }
.tphead .tkinds { margin-bottom: 0; flex: none; }
.tcustomlink { display: inline-flex; align-items: center; min-height: 44px; margin-left: auto; min-width: 0; font-weight: 700; font-size: 14px;
  color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .tphead .tkx { display: none; } .tphead .tkind { padding: 0 11px; } }
.tcustomlink:hover { text-decoration: underline; }
.tmarked { display: flex; flex-direction: column; gap: 8px; margin: 0 0 10px; padding: 12px; background: var(--soft); border-radius: 10px; }
.tmarked .small { margin: 0; }
.tmarked .tacts { margin: 0; }
.tcrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.tcrow label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); min-width: 0; }

.tkinds { display: inline-grid; grid-auto-flow: column; gap: 3px; padding: 3px; background: var(--track); border-radius: 11px; margin-bottom: 10px; }
.tkind { min-height: 38px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: 700 14px/1 "Lato", system-ui, sans-serif; cursor: pointer; }
.tkind[aria-pressed="true"] { background: var(--strong); color: var(--on-strong); }
.tday { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line); }
.tdlabel { font-weight: 700; font-size: 14px; padding-top: 10px; }
.tchips { display: flex; flex-wrap: wrap; gap: 6px; }
.tchip { font: 400 15px/1 "Lato", system-ui, sans-serif; padding: 0 14px; min-height: 40px; border: 1px solid var(--field-line); border-radius: 10px;
  background: var(--field); color: var(--ink); cursor: pointer; }
.tchip.on, .tchip:hover { background: var(--strong); border-color: var(--strong); color: var(--on-strong); }
.tmore { display: flex; justify-content: space-between; gap: 12px; padding-top: 4px; border-top: 1px solid var(--line); }
.tmore .linkish:only-child { margin-left: auto; }
.tconfirm { margin: 0 0 8px; padding: 12px; background: var(--soft); border-radius: 10px; }
.tconfirm p { margin: 0 0 6px; font-weight: 700; }
.tmsg { margin: 8px 0 0; }
.tmsg:empty { display: none; }
.tmsg.ok { color: var(--green); font-weight: 700; }
.tmsg.bad { color: var(--accent); font-weight: 700; }

/* Start proposal, full width and black; Close lead a quiet word under it. */
.lactions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.lactions > .small { text-align: center; }
.upform { display: block; }
.closer { display: flex; flex-direction: column; align-items: center; }
.closebtn { background: none; border: 0; min-height: 44px; padding: 0 12px; font: 700 15px/1 "Lato", system-ui, sans-serif;
  color: var(--muted); cursor: pointer; }
.closebtn:hover { color: var(--accent); }
.lcollapse { display: flex; justify-content: center; margin: -8px 0 -6px; }
.lcollapse button { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); cursor: pointer; }

/* CLOSE LEAD, A SHEET (redesign, 2026-10-20): up from the bottom on a phone, a box in the middle
   on a computer; the rest of the page dims behind it. */
.reasons { position: fixed; z-index: 80; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow-y: auto;
  background: var(--card); border-radius: 18px 18px 0 0; box-shadow: var(--pop), 0 0 0 100vmax var(--scrim);
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; text-align: left; }
.grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); align-self: center; }
.rtitle { font-size: 18px; font-weight: 900; margin: 0; }
.rhead { margin: 2px 0 0; }
.rgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.reason { min-height: 44px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--field-line); background: var(--field); color: var(--ink);
  font: 700 15px/1.15 "Lato", system-ui, sans-serif; cursor: pointer; }
.reason:hover { border-color: var(--ink); }
.rseg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 3px; background: var(--track); border-radius: 11px; }
.rseg .reason.nur { border: 0; border-radius: 8px; background: transparent; min-height: 40px; }
.rseg .reason.nur:hover { background: var(--strong); color: var(--on-strong); }
.closewarn { margin: 0; color: var(--accent); }
.sheetx { align-self: center; }
@media (min-width: 641px) {
  .reasons { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: 460px; border-radius: 18px; padding: 16px 18px 12px; }
  .grab { display: none; }
}

/* ------------------------------------------------------------------ the builder */
.dhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 4px; }
.dhead h1 { margin: 0; font-size: 26px; }
.back { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-weight: 700; text-decoration: none; font-size: 15px; }
.back:hover { color: var(--ink); }
/* A SENT PROPOSAL, AS TEXT (Kenyon, 2026-10-21). */
.dealsum { align-self: start; }
.dealsum { position: relative; }
.dealsum .dealedit { position: absolute; top: 12px; right: 12px; }
.dealsum .dsumhead { margin-right: 96px; }
/* Editing (Kenyon, 2026-10-26: the form landed in the narrow column on a computer): the summary,
   the form and the actions keep the wide left column, the numbers stay right; the emptied
   summary is just its Done button. */
.dealgrid > .dealsum, .dealgrid > .dealform { grid-column: 1; }
@media (min-width: 901px) { .dealgrid > .dealside { grid-column: 2; grid-row: 1 / span 2; } }
.dealsum:has([data-dealedit][aria-expanded="true"]) { min-height: 44px; padding: 0; background: none; box-shadow: none; }
.dealsum:has([data-dealedit][aria-expanded="true"]) .dealedit { top: 0; right: 0; }
.dsumhead { display: flex; flex-direction: column; gap: 2px; margin: 0 40px 14px 0; }
.dsumhead b { font-size: 20px; font-weight: 900; }
.dsumhead span { color: var(--muted); font-size: 15px; }
.dealgrid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; margin-top: 12px; }
.dealform { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 18px; }
.dealform .lform { margin: 0; }
.dealform .lform .f { justify-content: flex-end; }
.dealform .lform .f.notes { grid-column: 1 / -1; }
.dealform .lform.rows .f.c2a { grid-column: 1 / span 2; }
.dealform .lform.rows .f.c2b { grid-column: 3 / span 2; }
.dealform .lform.rows .f.c1  { grid-column: 1 / span 1; }
.dealform .lform.rows .f.c3  { grid-column: 1 / span 3; }
.dealform .lform.rows .f.c4  { grid-column: 4 / span 1; }
.dealform input:disabled[id$="_amt"] { color: var(--ink); -webkit-text-fill-color: var(--ink); font-weight: 700; }
.lform .times .pair { display: flex; align-items: center; gap: 10px; }
.lform .times .pair select { flex: 1; min-width: 0; padding-left: 10px; padding-right: 26px; background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; }
.lform .times .pair span { color: var(--muted); font-size: 14px; }
.dsec { margin: 22px 0 10px; }
.dsec:first-child { margin-top: 0; }
.dsaved { margin: 2px 0 0; }
.dealside { align-self: stretch; }
.dealside > .quote { position: sticky; top: 16px; }
.quote h2 { font-size: 18px; margin: 0 0 10px; }
.quote h3 { font-size: 15px; margin: 16px 0 6px; }
.quote.quiet .probs { display: none; }
.qt { width: 100%; border-collapse: collapse; font-size: 15px; }
.qt td { padding: 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.qt td:last-child { text-align: right; white-space: nowrap; padding-left: 12px; font-variant-numeric: tabular-nums; }
.qt td .small { display: block; }
.qt .sub td { color: var(--muted); font-size: 14px; }
.qt .tot td { font-weight: 700; }
.qt .grand td { font-weight: 900; font-size: 20px; line-height: 1.2; border-bottom: 0; padding-top: 10px; }
.probs, .warns { margin: 0 0 12px; padding: 10px 14px 10px 30px; border-radius: 10px; font-size: 14px; }
.probs { background: var(--accent-bg); }
.warns { background: var(--amber-bg); }
.dactions { grid-column: 1 / -1; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 20px 0 4px; }
.dnote { text-align: center; grid-column: 1 / -1; color: var(--accent); }
.dversions { margin-top: 24px; }
.docs { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 10px; }
.docs li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; row-gap: 4px; align-items: center;
  padding: 14px 16px; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); }
.docs li > a:first-child { font-weight: 700; text-decoration: none; }
.docs li > a:first-child, .docs li > span.small { grid-column: 1; }
.docs li > .pills { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sendpill { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 10px; background: var(--strong);
  color: var(--on-strong); border: 1px solid var(--strong); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.sendpill.sign { background: transparent; color: var(--ink); border-color: var(--field-line); }
.sendpill:hover { opacity: .88; }
.upform label { cursor: pointer; }
/* The event, large: its name and date read as editable. */
.dbig { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; margin: 0 0 8px; }
.dbig input { font: 900 26px/1.2 "Lato", system-ui, sans-serif; border: 0; border-bottom: 2px dashed var(--field-line);
  background: transparent; padding: 2px 0; border-radius: 0; min-height: 0; }
.dbig input:disabled { border-bottom-color: transparent; background: transparent; }
.dbig .dbig-name { flex: 1 1 320px; min-width: 0; width: auto; }
.dbig input:focus { border-bottom-style: solid; border-bottom-color: var(--ink); outline: none; }
.dbig .dbig-date { position: relative; display: inline-block; font-size: 18px; font-weight: 700; color: var(--muted); cursor: pointer;
  border-bottom: 2px dashed var(--field-line); }
.dbig .dbig-date input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.totbar { display: none; }
.amtkind { display: flex; }
.amtkind select { flex: none; width: 60px; border-radius: 10px 0 0 10px; border-right: 0; padding-left: 12px; padding-right: 22px; background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%; }
.amtkind input { flex: 1 1 auto; min-width: 0; border-radius: 0 10px 10px 0; }
.signstatus { margin: 0 0 16px; }
.signstatus h3 { margin: 0 0 8px; }
.signstatus ul { margin: 0 0 10px; padding-left: 18px; font-size: 14px; }
.recallform, .signstatus form { margin-right: 8px; }

/* The client card atop the builder: the lead's row, folded until tapped. */
.leadref { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; margin: 12px 0 0; }
.leadref summary { display: block; list-style: none; cursor: pointer; }
.leadref summary::-webkit-details-marker { display: none; }
.leadref .lrrow { border-top: 0; margin-top: 0; }
.leadref .lrrow .chev { display: grid; }
.leadref[open] .lrrow .chev { transform: rotate(180deg); }
.leadref[open] { background: var(--soft); }
.leadref[open] .lrrow { background: var(--card); }
.leadref[open] > :not(summary) { margin: 14px; }
.leadref .lrform-live .lpanel-in { max-width: none; }

/* New proposal: the proposal types, and the leads list. */
.tpick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 10px; }
.tpl { display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer; font: inherit; color: var(--ink);
  border: 1px solid transparent; }
.tpl b { font-size: 17px; }
.tpl:hover { border-color: var(--field-line); }
.tpl.likely { border-color: var(--green); }
.likely-tag { color: var(--green); font-weight: 700; font-size: 13px; }
.tpls .tpl { flex-direction: row; gap: 12px; align-items: flex-start; }
.tpl span { display: flex; flex-direction: column; }
.tpl:has(input:checked) { border-color: var(--ink); }
.form h2 { font-size: 18px; margin: 22px 0 8px; }
.leads { max-height: 420px; overflow-y: auto; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); margin: 10px 0 16px; }
.lead { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-top: 1px solid var(--line); cursor: pointer; margin: 0; }
.lead:first-child { border-top: 0; }
.lead > span { display: flex; flex-direction: column; }
.lead:has(input:checked) { background: var(--soft); }
.lead.off { cursor: default; opacity: .7; }
.vtag { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); font-weight: 700; }
.vtag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--muted); }
.vtag.ideal::before { background: var(--accent); border-color: var(--accent); }
.vtag.oly::before { background: var(--blue); border-color: var(--blue); }

/* Log in, set up, team, send, sign: one column of labelled boxes on a card. */
.form { display: flex; flex-direction: column; gap: 6px; }
.form > label:not(.check) { font-size: 14px; font-weight: 700; margin-top: 8px; }
.form > label:first-of-type { margin-top: 0; }
.form > .btn { margin-top: 14px; }
.form > .check { margin-top: 6px; }
.signgrid { display: grid; gap: 14px; max-width: 760px; }
.signcard { display: flex; flex-direction: column; gap: 6px; }
.signcard h3 { margin: 0 0 4px; }
.signcard label { margin-top: 8px; }
.signcard .lform { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.signbig { font-size: 26px; font-weight: 900; margin: 0; }
.signline { font-style: italic; }
.holdlist { margin: 0 0 6px; padding-left: 18px; }
.linkcard { margin: 0 0 16px; }
.cards .card h2 { font-size: 18px; margin: 0 0 4px; }
.cards .card > form + form { margin-top: 6px; }
.restorecard { margin: 12px 0; }
.restorecard h3 { margin: 0 0 6px; }
.restorelist { margin: 0; padding-left: 18px; font-size: 14px; }
.restorelist .lhead2 { color: var(--muted); }

/* ------------------------------------------------------------------ tablet and phone */
@media (max-width: 1024px) {
  .lform { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lform .f.notes { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .dealgrid { grid-template-columns: minmax(0, 1fr); }
  .dealside > .quote { position: static; }
  /* THE TOTAL, ALWAYS IN VIEW on a phone or tablet (audit, 2026-10-16). */
  .totbar { display: flex; position: sticky; bottom: 0; z-index: 5; align-items: center; gap: 12px;
    margin: 12px calc(-1 * var(--gutter)) 0; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: var(--strong); color: var(--on-strong); }
  .totbar b { font-size: 20px; font-weight: 900; }
  .totbar a { margin-left: auto; color: var(--on-strong); min-height: 44px; display: inline-flex; align-items: center; font-weight: 700; }
  .dealform .lform.rows { grid-template-columns: minmax(0, 1fr) 120px; }
  .dealform .lform.rows .f.c2a, .dealform .lform.rows .f.c2b, .dealform .lform.rows .f.c1 { grid-column: 1 / -1; }
  .dealform .lform.rows .f.c3 { grid-column: 1; }
  .dealform .lform.rows .f.c4 { grid-column: 2; }
}
@media (max-width: 640px) {
  .cb-1 { font-size: 17px; }
  .dealform { padding: 14px; }
  .lform { grid-template-columns: minmax(0, 1fr); }
  .signcard .lform { grid-template-columns: minmax(0, 1fr); }
  /* MORE DETAILS (phones, audit 2026-10-16): the rarely-changed fields fold away. */
  .ledit .lform .rare { display: none; }
  .ledit.showmore .lform .rare { display: flex; }
  .ledit.showmore .lform fieldset.rare { display: block; }
  .moretoggle { display: flex; width: 100%; margin: 12px 0 0; align-items: center; justify-content: center; min-height: 44px;
    background: transparent; border: 1px solid var(--field-line); border-radius: 10px; font: 700 14px/1 "Lato", system-ui, sans-serif;
    color: var(--muted); cursor: pointer; }
  .ledit.showmore .moretoggle .when-closed, .moretoggle .when-open { display: none; }
  .ledit.showmore .moretoggle .when-open { display: inline; }
  .tday { grid-template-columns: 1fr; gap: 6px; }
  .tdlabel { padding-top: 0; }
  .docs li { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  .docs li > .pills { grid-column: 1; grid-row: auto; justify-content: flex-start; }
  .dbig input { font-size: 22px; }
  .undobar .undoright { width: 100%; justify-content: space-between; flex-wrap: nowrap; }
  .undobar .fudate { flex-direction: column; align-items: flex-start; gap: 3px; font-size: 12px; }
  .dhead h1 { font-size: 22px; }
}

/* BOOKED AND FILED (2026-10-28) */
.bsteps { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; font-size: 14px; }
.bsteps li::before { content: "·"; display: inline-block; width: 18px; color: var(--muted); font-weight: 900; }
.bsteps li.ok::before { content: "✓"; color: var(--green); }
.bsteps li.bad::before { content: "!"; color: var(--accent); }
.takebtn { align-self: flex-start; margin: 4px 0 8px; }

/* DID IT GO? (2026-11-21, sentcheck.js): back from Messages, one full-screen question. */
dialog.sentask { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; box-sizing: border-box;
  padding: 24px var(--gutter) calc(24px + env(safe-area-inset-bottom)); border: 0; background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column; justify-content: center; gap: 28px; }
dialog.sentask:not([open]) { display: none; }
dialog.sentask::backdrop { background: var(--bg); }
.sentq { font-size: 30px; font-weight: 900; line-height: 1.2; margin: 0; max-width: 640px; }
.senterr { margin: 0; color: var(--accent); font-size: 17px; max-width: 640px; }
.sentbtns { display: grid; gap: 12px; max-width: 640px; }
.sentbtns .btn { min-height: 64px; font-size: 18px; }
