/* polish.css — Builder 16, the mobile design audit (29 Nov 2026). Loaded LAST (index.html).
   Cross-screen polish on top of every builder's styles: compact controls with 44 px touch targets, a calmer phone top bar,
   denser customer rows with quick-info icons, toasts that do not darken the tab bar, contrast fixes.
   Theme tokens only (API.md § Theme). Only transform and opacity animate.
   The Write window, SOFO and the real-mode bar add their own <style> AFTER this file: those overrides start with `html` to win. */

/* ══ Cedric, 29 Nov 23:05: "a polished premium app, not bold border lines … a bit sleek, similar to the Claude mobile app".
   The calm layer: a warm cream room with peach light (light, still HALO) / a neutral charcoal (dark, below), quiet surfaces with hairlines instead of outlines,
   soft tinted selected states instead of black slabs, a deeper refined hero, lighter headings, thin icons.
   Kept as he asked: the black pill tab bar (low), the rainbow ring on the pen, his logo, Back, the swipe tray colours. ══ */
:root,:root[data-theme="light"]{
  --bg:#F7F2ED;
  --bg-img:
    radial-gradient(1000px 620px at 104% -14%,rgba(250,150,100,.20),transparent 62%),
    radial-gradient(860px 640px at -12% 112%,rgba(226,128,96,.13),transparent 60%),
    linear-gradient(#F7F2ED,#F7F2ED);
  --pane:rgba(255,255,255,.38); --pane-line:rgba(110,70,50,.06); --pane-shadow:0 30px 70px -50px rgba(90,50,30,.18);
  --glass:rgba(255,255,255,.80); --glass-2:rgba(110,70,50,.04); --glass-in:rgba(110,70,50,.05); --glass-hover:rgba(110,70,50,.065);
  --glass-press:rgba(110,70,50,.11); --glass-solid:#FFFCFA; --panel2:#FFFFFF;
  --line:rgba(255,255,255,.72); --line-2:rgba(110,70,50,.13); --sep:rgba(110,70,50,.09); --line-h:rgba(110,70,50,.13); --handle:rgba(110,70,50,.22);
  --hi:0 0 #0000; --edge:0 0 #0000; --sheen:none;
  --shadow:0 1px 2px rgba(80,50,30,.035),0 8px 22px -14px rgba(80,50,30,.16);
  --shadow-2:0 2px 6px rgba(80,50,30,.05),0 16px 34px -18px rgba(80,50,30,.22);
  --shadow-pop:0 4px 14px rgba(60,35,20,.07),0 24px 60px -22px rgba(60,35,20,.30);
  --tile-shadow:0 4px 10px -6px rgba(80,50,30,.28); --btn-shadow:0 6px 14px -9px rgba(234,88,12,.55);
  --bar-bg:#FAF6F2;
  --text-strong:#1D1510; --text:#2A1F19; --muted:#6A584E; --faint:#73625A;
  --sel:rgba(249,115,22,.15); --on-sel:#7C2D12;
  --hero:linear-gradient(140deg,#C24A26 0%,#A93C1F 55%,#8E301B 100%);
  --hero-glass:rgba(60,10,0,.16); --hero-glass-h:rgba(60,10,0,.24); --hero-line:rgba(255,255,255,.40);
  --hero-shadow:0 18px 40px -26px rgba(140,48,20,.50); --hero-shadow-h:0 22px 48px -26px rgba(140,48,20,.60); --hero-tshadow:none;
  --money:linear-gradient(140deg,#B83A2E 0%,#962B24 100%);
  --veil:#F7F2ED; --map-bg:#F3ECE6;
  --toast-shadow:0 1px 2px rgba(80,50,30,.06),0 10px 24px -12px rgba(80,50,30,.30);
  --tbadge-bg:var(--orange); --tbadge-ink:var(--ink);
  --nav-shadow:0 10px 22px -8px rgba(70,24,6,.34),0 2px 5px rgba(70,24,6,.14);   /* tight: no dark halo over the row above the bar */
  --quiet:rgba(110,70,50,.07); --quiet-h:rgba(110,70,50,.11);   /* quiet tinted buttons (were black pills) */
  /* computer sidebar: a quiet warm surface beside the page (was rosy terracotta glass) */
  --side-bg:#F0E8E1; --side-text:#2A1F19; --side-nav:#3A2D25; --side-muted:#6A584E; --side-field:rgba(110,70,50,.06); --side-kbd:rgba(110,70,50,.10);
  --side-hover:rgba(110,70,50,.07); --side-on:#FFFFFF; --side-on-text:#1D1510; --side-line:rgba(110,70,50,.08); --side-on-shadow:0 1px 3px rgba(80,50,30,.10);
  --hit:4px;   /* extra invisible touch area above and below a compact control (36 px visual + 2 × 4 = 44 px) */
}
/* ══ DARK (Cedric, 29 Nov ~23:50: "a more polished darker UI, a bit similar to Linear but not too much" — off brown). Neutral charcoal:
   near-black base, surfaces lifted in small steps, white hairlines at 5–8 %, cool grey secondary text, desaturated status colours,
   the orange accent used sparingly (the hero carries the one soft glow). No brown tint in any neutral. ══ */
:root[data-theme="dark"]{
  --bg:#0F0F11;
  --bg-img:linear-gradient(#0F0F11,#0F0F11);
  --pane:transparent; --pane-line:transparent; --pane-shadow:0 0 #0000;
  --glass:rgba(255,255,255,.04); --glass-2:rgba(255,255,255,.03); --glass-in:rgba(255,255,255,.045); --glass-hover:rgba(255,255,255,.065);
  --glass-press:rgba(255,255,255,.10); --glass-solid:#1C1C21; --panel2:#1C1C21;
  --line:rgba(255,255,255,.07); --line-2:rgba(255,255,255,.11); --sep:rgba(255,255,255,.06); --line-h:rgba(255,255,255,.13); --handle:rgba(255,255,255,.22);
  --hi:inset 0 1px 0 rgba(255,255,255,.035); --edge:0 0 #0000; --sheen:none;
  --shadow:0 1px 2px rgba(0,0,0,.35); --shadow-2:0 14px 34px -18px rgba(0,0,0,.75);
  --shadow-pop:0 0 0 1px rgba(255,255,255,.06),0 24px 60px -20px rgba(0,0,0,.8);
  --tile-shadow:0 0 #0000; --btn-shadow:0 0 #0000; --bar-shadow:0 16px 40px rgba(0,0,0,.6);
  --viewer-bg:#0B0B0D;
  --side-bg:rgba(255,255,255,.025); --side-text:#ECECEF; --side-nav:rgba(236,236,239,.80); --side-muted:#8E8E97; --side-field:rgba(255,255,255,.045); --side-kbd:rgba(255,255,255,.08);
  --side-hover:rgba(255,255,255,.05); --side-on:rgba(255,255,255,.08); --side-on-text:#FFFFFF; --side-line:rgba(255,255,255,.07); --side-on-shadow:0 0 #0000;
  --bar-bg:#111113;
  --text-strong:#F5F5F7; --text:#ECECEF; --muted:#9A9AA3; --faint:#8C8C95; --link:#FDBA74; --link-hover:#FED7AA;
  --accent:#FDBA74; --accent-2:#FED7AA; --accent-bg:rgba(249,115,22,.14); --accent-bg-2:rgba(249,115,22,.22); --accent-line:rgba(249,115,22,.42);
  --sel:rgba(255,255,255,.09); --on-sel:#F5F5F7; --inv:#ECECEF; --on-inv:#111113;
  --nav-bg:#17171A; --nav-line:rgba(255,255,255,.09); --nav-ic:rgba(236,236,239,.70); --nav-on-bg:#2B2B31; --nav-on:#FFFFFF; --nav-shadow:0 12px 30px rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.05);
  --ok:#74CF9C; --ok-bg:rgba(76,183,130,.14); --ok-dot:#4CB782;
  --warn:#E5BE68; --warn-bg:rgba(226,184,92,.13); --warn-dot:#DDA73C; --warn-line:rgba(226,184,92,.30);
  --bad:#F08C8C; --bad-bg:rgba(235,87,87,.14); --bad-dot:#EB5757; --bad-line:rgba(235,87,87,.32);
  --info:#93B6F2; --info-bg:rgba(94,140,230,.15); --info-dot:#5E8CE6;
  --purple:#B9A8F4; --purple-bg:rgba(140,115,230,.16); --purple-dot:#8C73E6;
  --cyan:#84D3E6; --cyan-bg:rgba(70,180,210,.13); --cyan-dot:#46B4D2;
  /* the hero: a lifted charcoal card with ONE soft orange glow, white text; the money card the same with a red glow */
  --hero:radial-gradient(460px 300px at 92% -6%,rgba(255,122,47,.26),transparent 68%),linear-gradient(150deg,#26262C 0%,#1B1B20 100%);
  --hero-text:#FFFFFF; --hero-muted:#D6D6DC; --hero-accent:#FDBA74; --hero-glass:rgba(255,255,255,.07); --hero-glass-h:rgba(255,255,255,.11); --hero-line:rgba(255,255,255,.14);
  --hero-track:rgba(255,255,255,.10); --hero-fill:#FB923C; --hero-shadow:0 0 0 1px rgba(255,255,255,.06),0 24px 60px -30px rgba(0,0,0,.8); --hero-shadow-h:0 0 0 1px rgba(255,255,255,.09),0 28px 64px -30px rgba(0,0,0,.85); --hero-tshadow:none;
  --money:radial-gradient(320px 200px at 92% -6%,rgba(235,87,87,.32),transparent 70%),linear-gradient(150deg,#26262C 0%,#1B1B20 100%);
  --ch-1:#F97316; --ch-2:#5E8CE6; --ch-3:#3FB59A; --ch-4:#8C73E6; --ch-5:#D9A43A; --ch-6:#EB6F7E;
  --ch-grid:rgba(255,255,255,.06); --ch-axis:#8C8C95; --ch-track:rgba(255,255,255,.07); --ch-area:rgba(249,115,22,.16);
  --map-tiles:invert(1) hue-rotate(180deg) brightness(.82) contrast(.9) saturate(.35); --map-pane:invert(1) hue-rotate(180deg) brightness(.82) contrast(.9) saturate(.35); --map-bg:#141416;
  --focus:#FDBA74; --focus-glow:rgba(249,115,22,.22); --scrim:rgba(0,0,0,.55);
  --skel:rgba(255,255,255,.05); --skel-hi:rgba(255,255,255,.08); --doc-shadow:0 10px 26px rgba(0,0,0,.5);
  --veil:#0F0F11; --veil-glow:rgba(249,115,22,.22); --veil-glow-2:rgba(249,115,22,.14);
  --toast-shadow:0 0 0 1px rgba(255,255,255,.06),0 12px 28px -10px rgba(0,0,0,.7);
  --tbadge-bg:#FDBA74; --tbadge-ink:#1a0d06;   /* peach on the black bar: AA even under a passing shadow */
  --quiet:rgba(255,255,255,.07); --quiet-h:rgba(255,255,255,.11);
}
html{background:var(--bg)}
/* type: hierarchy from size and weight, slightly tighter big headings; the page kicker is a quiet sentence, not tracked capitals */
.phead h1{font-weight:700;letter-spacing:-.022em}
.phead-l>.lbl{text-transform:none;letter-spacing:0;font-size:13.5px;font-weight:500;color:var(--muted)}
.card-h h2,.card h2{font-weight:650;letter-spacing:-.01em}
.kpi b{font-weight:700}
.hero .v{font-weight:700;letter-spacing:-.02em}
.ic{stroke-width:1.7}
/* quiet secondary buttons: a soft tint, not a black pill */
.btn.inv,.mini.inv{background:var(--quiet);color:var(--text-strong)}
.btn.inv:hover,.mini.inv:hover{background:var(--quiet-h);color:var(--text-strong);filter:none}
/* selected states are soft tints with medium-weight text */
.chip.on,.pill.on,.ctab.on,.seg button.on{font-weight:650;border-color:transparent}
html .ib-tabs button.on .ib-n{background:var(--orange);color:var(--ink)}   /* the count on the soft "Needs reply" tab */
/* inputs: soft filled fields, a hairline only */
.in,.searchbox{border-color:var(--line-2)}
/* sheets, menus and toasts are solid (--glass-solid is opaque here): on a blurred scrim, iPhone Safari shows the page through a 98 % sheet */
/* status chooser: soft filled choices, the current one tinted in its own colour (no coloured outlines) */
.st-opt{border-color:transparent;background:var(--glass-2);font-weight:650}
.st-opt.on{border-color:transparent;background:var(--b)}
/* menus: section labels as quiet small text */
.menu-g .lbl{letter-spacing:.04em}
/* Ask Sofo: a soft accent, so the screen's one orange button stays the main action */
html .sofo-side{background:var(--accent-bg);color:var(--accent-2);box-shadow:none}
html .sofo-side:hover{background:var(--accent-bg-2);filter:none}
html .sofo-side kbd{background:var(--accent-bg);color:var(--accent-2)}
html .iconb.sofo-top{background-color:var(--accent-bg);color:var(--accent-2)}

/* ── a compact control keeps a 44 px touch target with an invisible frame around it ── */
.hit44{position:relative}
.hit44::after{content:'';position:absolute;left:0;right:0;top:calc(-1 * var(--hit));bottom:calc(-1 * var(--hit))}

/* ── quick-info icons on customer rows (customers.js QuickIcons) ── */
.qi{display:inline-flex;align-items:center;gap:7px;min-width:0;flex:none}
.qi-i{display:inline-flex;align-items:center;gap:1px;line-height:1}
.qi-i .ic{width:15px;height:15px;stroke-width:2}
.qi-i small{font-size:10.5px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--muted)}
.qi-i.t-muted{color:var(--muted)}
.qi-i.qi-paid .ic,.qi-i.qi-due .ic,.qi-i.qi-refund .ic{stroke-width:2.2}
/* computer table: the icons sit after the phone number */
.c-sub{display:flex;align-items:center;gap:8px;min-width:0}
.c-sub>.cellb{flex:0 1 auto;min-width:0}
.c-sub .qi{gap:6px}.c-sub .qi-i .ic{width:14px;height:14px}

/* ── toasts: a tight shadow, so a toast above the tab bar never darkens the bar or the row under it ── */
.toast{box-shadow:var(--hi),var(--toast-shadow)}

/* ══════════════════════════════ PHONE ══════════════════════════════ */
@media (max-width:899px){

  /* ── top bar: one quiet row. Bare logo mark, glass pen, plain bell and search, one orange SOFO ── */
  .topbar{gap:4px;padding-left:12px;padding-right:10px}
  .topbar .brand .logo-s{width:32px;height:32px;border-radius:0;background:transparent url(/logo-mark.png) center/86% no-repeat;box-shadow:none}
  .topbar .iconb:not(.sofo-top){background:transparent;box-shadow:none;color:var(--text-strong)}
  .topbar .iconb:not(.sofo-top):active{background:var(--glass-press)}
  .topbar .iconb .ic{width:22px;height:22px}
  html .iconb.sofo-top{background-clip:content-box;padding:4px;box-shadow:none}   /* 36 px orange disc inside the 44 px target */
  html .iconb.sofo-top .ic{width:19px;height:19px}
  .topbar .sync{padding:6px 4px}
  /* Back: the iPhone way — a chevron and the word, no pill */
  .topbar .backb{height:44px;padding:0 8px 0 0;margin-left:-6px;background:transparent;border-color:transparent;color:var(--accent);font-weight:600;font-size:16px}
  .topbar .backb .ic{width:24px;height:24px;stroke-width:2.2}
  /* the pen (Write window): a glass circle like its neighbours; the AI ring stays, thinner; the draft count is a calm dark dot, not an alert */
  html .ww-dock{left:50px;top:calc(var(--safe-t) + 8px)}
  html:has(.topbar .backb) body .ww-dock{left:84px}
  html .ww-pen{width:44px;min-width:44px;height:44px;padding:0;border-radius:50%;background:var(--glass-hover);color:var(--text);box-shadow:var(--edge)}
  html .ww-pen .ic{width:20px;height:20px;color:var(--accent)}
  html .ww-pen::before{inset:3px;padding:1.5px}
  html .ww-pen::after{inset:4px;opacity:.32;filter:blur(6px)}
  html .ww-badge{top:0;right:-2px;min-width:17px;height:17px;padding:0 5px;font-size:10.5px;background:var(--inv);color:var(--on-inv);box-shadow:0 0 0 2px var(--bar-bg)}

  /* ── tab bar badge: AA on the black bar in both looks ── */
  .tbadge{background:var(--tbadge-bg);color:var(--tbadge-ink)}

  /* ── toasts float a little higher above the bar ── */
  .toasts{bottom:calc(var(--nav-top) + 12px)}

  /* ── page head: compact; the buttons keep their own width (no full-width orange slabs) ── */
  .phead{gap:10px}
  .phead-r .btn{flex:0 1 auto}
  .phead-r .btn,.phead-r .chip{min-height:40px;padding:8px 14px;font-size:14px}
  .phead-r .chip{padding:8px 13px}

  /* ── compact chips and filter pills: 36 px to the eye, 44 px to the finger ── */
  .chip{min-height:36px;padding:7px 13px;font-size:13.5px;position:relative}
  .chip::after{content:'';position:absolute;left:0;right:0;top:calc(-1 * var(--hit));bottom:calc(-1 * var(--hit))}
  .pill.big{min-height:36px;padding:7px 13px;position:relative}
  .pill.big::after{content:'';position:absolute;left:0;right:0;top:calc(-1 * var(--hit));bottom:calc(-1 * var(--hit))}
  .brandpills{padding-top:var(--hit);padding-bottom:var(--hit);margin-top:calc(-1 * var(--hit));margin-bottom:calc(-1 * var(--hit))}

  /* ══ Customers (phone): the list starts high and uses the whole width ══ */
  .cust{gap:12px}
  .cust .phead-r{width:auto;margin-left:auto}
  .cust .kpis{gap:0;grid-template-columns:repeat(3,minmax(0,1fr));border-radius:16px;overflow:hidden;background:var(--glass);border:1px solid var(--line);box-shadow:var(--hi),var(--shadow)}
  .cust .kpi{background:transparent;border:0;border-radius:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;padding:9px 12px;gap:0}
  .cust .kpi+.kpi{border-left:1px solid var(--sep)}
  .cust .kpi .lbl{font-size:11.5px;letter-spacing:0;text-transform:none;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .cust .kpi b{font-size:17px;line-height:1.25}
  .cust .kpi-s{display:none}
  .cust .filters{background:transparent;border:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;padding:0;gap:8px;border-radius:0}
  .cust .brandpills{margin-left:-16px;margin-right:-16px;padding-left:16px;padding-right:16px}
  .cust .frow{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;gap:6px;margin:0 -16px;padding:var(--hit) 16px}
  .cust .frow::-webkit-scrollbar{display:none}
  .cust .fsel{flex:none;width:auto;min-width:0;min-height:36px;padding:6px 30px 6px 13px;border-radius:999px;font-size:13.5px;font-weight:600;background-position:right 10px center}
  .cust .frow .pill{flex:none}
  .cust .searchbox{min-height:42px}
  .cust .searchbox input{min-height:40px}
  /* rows: one grouped glass list, hairlines between rows (each row keeps its own glass for the swipe strip) */
  .cust .plist{gap:0;margin:0 -6px}
  .cust .prow{gap:6px;padding:9px 12px 9px 10px;border-radius:0;border:0;border-bottom:1px solid var(--sep);box-shadow:none;background-image:none}
  .cust .prow:first-child{border-radius:18px 18px 0 0}
  .cust .prow:last-child{border-radius:0 0 18px 18px;border-bottom:0}
  .cust .prow:only-child{border-radius:18px}
  .cust .plist{border-radius:18px;box-shadow:var(--hi),var(--shadow)}
  .cust .pr-tap{gap:10px;min-height:52px;align-items:flex-start}
  .cust .pr-tap>.ptile{margin-top:2px}
  .cust .pr-main{gap:1px}
  .cust .pr-main b{font-size:15.5px;line-height:1.3}
  .cust .pr-sys{font-size:12.5px;line-height:1.35}
  .cust .pr-sub{display:flex;align-items:center;gap:8px;min-height:20px;margin-top:2px;overflow:hidden}
  .cust .pr-cert{font-size:11.5px;color:var(--faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;padding-right:4px}
  .cust .pr-sub .qi+.pr-cert{padding-left:9px;border-left:1px solid var(--sep)}
  .cust .pr-r{gap:6px;align-self:stretch;justify-content:space-between;padding:1px 0 2px}
  .cust .pr-r .stp{min-height:26px;padding:3px 10px;font-size:12px;position:relative}
  .cust .pr-r .stp::after{content:'';position:absolute;inset:-9px -4px}
  .cust .pr-amt{font-size:13px}
  .cust .listfoot{padding:0 2px}

  /* ── tab bar on the narrowest phones (320 px): the open tab shows only its icon, all five fit ── */
  @media (max-width:359px){
    html:has(.topbar .backb) .topbar .ntf-bell{margin-left:auto}   /* the dot is hidden here: keep bell, search and SOFO on the right, clear of the pen */
    .cust .kpi{padding:8px 9px}.cust .kpi b{font-size:15px}
    nav.tabbar{left:8px;right:8px}
    nav.tabbar .tab{padding:0 10px;min-width:42px}
    nav.tabbar .tab.on,nav.tabbar.mo-pill.mo-pill-has .tab.on{gap:0;padding:0 14px}
    nav.tabbar .tab.on>span:not(.tic):not(.tbadge){max-width:0;opacity:0}
  }
}

/* ── order progress (card overview): done steps are a soft tint with a check, the current one a quiet ring — not six orange discs ── */
.step.done .step-m{background:var(--accent-bg-2);color:var(--accent-2)}
.step.now .step-m{background:var(--panel2);box-shadow:0 0 0 1px var(--accent-line),0 0 0 4px var(--accent-bg)}

/* ── job cards (Today, Calendar): the five quick actions a little lower and lighter ── */
html .b2-acts5>*{min-height:46px;font-size:11.5px;font-weight:600}
html .b2-acts5 .ic{width:18px;height:18px}

/* ── real app: the "Your real data · saving to Google" bar (real/client.js, Builder 12) never covers content (DESIGN_NOTES 7).
   Phone: one slim status line folded under the top bar, no buttons (Sign out lives in Settings → Sign out); the page moves down by
   its height. Computer: a small one-line pill left of the pen, inside the page's bottom gutter. Its own rules still hide it while a
   sheet, viewer, the bell, SOFO or the Write window is open (display is never set here). ── */
html body #sofoRealBar .rb-dot{width:7px;height:7px}
html body #sofoRealBar #sofoRealPend:not(:empty){display:inline;margin-left:6px;color:var(--accent);font-weight:700}
@media (max-width:899px){
  html body #sofoRealBar{left:0;right:0;top:calc(var(--safe-t) + 61px);bottom:auto;z-index:29;min-height:0;height:24px;padding:0 14px;gap:6px;justify-content:center;
    border:0;border-bottom:1px solid var(--sep);border-radius:0;background:var(--bar-bg);box-shadow:none;color:var(--muted);font-size:11.5px;font-weight:600;line-height:24px}
  html body #sofoRealBar.rb-min{left:0;right:0}
  html body #sofoRealBar .rb-t,html body #sofoRealBar.rb-min .rb-t{display:block;flex:0 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  html body #sofoRealBar .rb-t b{display:inline;font-weight:600}
  html body #sofoRealBar button{display:none}
  html body #sofoRealBar.rb-ping{animation:none}
  html:has(#sofoRealBar) .main{padding-top:calc(var(--safe-t) + 61px + 24px)}
  html:has(#sofoRealBar) #sofoRealBox{top:calc(env(safe-area-inset-top) + 92px)}
}
@media (min-width:900px){
  html body #sofoRealBar{left:auto;right:68px;bottom:12px;max-width:440px;min-height:0;padding:5px 6px 5px 12px;gap:8px;border-radius:999px;border:1px solid var(--line);
    background:var(--glass-solid);box-shadow:var(--shadow-2);font-size:12.5px;color:var(--muted)}
  html body #sofoRealBar .rb-t{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  html body #sofoRealBar .rb-t b{display:inline;font-weight:650;color:var(--text)}
  html body #sofoRealBar .rb-t span:not(#sofoRealPend){display:none}
  html body #sofoRealBar .rb-min-btn{display:none}
  html body #sofoRealBar .rb-out{min-height:30px;padding:4px 10px;border:0;background:transparent;color:var(--link);font-weight:650}
  html body #sofoRealBar .rb-out:hover{background:var(--glass-hover)}
  html body #sofoRealBar.rb-min .rb-t{display:block}
}

/* ── inbox list (Builder 12's screen, CSS only): the certificate next to a name is quiet text, the waiting time keeps its colour ── */
html .ib-chip.cust{background:transparent;color:var(--muted);font-weight:600;padding:1px 2px;font-variant-numeric:tabular-nums}

/* ── phone: the slit under the floating tab bar fades to the page (iOS scroll edge), so no half line of text peeks out below it ── */
@media (max-width:899px){
  .app::after{content:'';position:fixed;left:0;right:0;bottom:0;height:calc(var(--nav-gap) + 22px);z-index:39;pointer-events:auto;background:linear-gradient(to bottom,transparent,var(--bg) 70%)}
}

/* dark: icon tiles are neutral (an orange tint over charcoal reads brown); the icon keeps the accent */
:root[data-theme="dark"] .ib{background:var(--glass-hover);color:var(--accent)}

/* ── the smooth line chart (js/linechart.js): HALO's line with a soft fill, a minimal axis, a readout that follows the finger ── */
.lc{display:flex;flex-direction:column;gap:6px;min-width:0}
.lc-read{display:flex;align-items:baseline;justify-content:space-between;gap:10px;font-size:13px;color:var(--muted);min-height:22px}
.lc-read b{font-size:17px;font-weight:700;color:var(--text-strong);font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.lc-plot{position:relative;touch-action:pan-y;cursor:crosshair;border-radius:10px;outline:none}
.lc-plot:focus-visible{box-shadow:0 0 0 2px var(--focus)}
.lc-plot svg{width:100%;height:100%;display:block;overflow:visible}
.lc-dot{position:absolute;width:11px;height:11px;margin:-5.5px 0 0 -5.5px;border-radius:50%;box-shadow:0 0 0 2.5px var(--panel2),0 2px 6px rgba(0,0,0,.18);pointer-events:none}
.lc-x{display:flex;justify-content:space-between;font-size:11.5px;color:var(--faint);min-height:16px}
.lc-x span{flex:0 0 0;display:flex;justify-content:center;white-space:nowrap}
.lc-x span:first-child{justify-content:flex-start}.lc-x span:last-child{justify-content:flex-end}
.lc-x span.on{color:var(--text);font-weight:600}
.lc-spark{margin:2px 0}

/* ── Today (B16, Cedric 30 Nov "a better home page"): what needs you, today's jobs, money with one donut and the smooth line,
   the pipeline in four quiet tiles, the rest below. ── */
.b16-money{gap:14px}
.b16-mtop{display:flex;align-items:center;gap:18px;min-width:0}
.b16-donut{position:relative;display:grid;place-items:center;flex:none;color:inherit;border-radius:50%}
.b16-donut:hover{color:inherit}
.b16-dc{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;line-height:1.15;pointer-events:none}
.b16-dc small{font-size:11.5px;color:var(--muted)}
.b16-dc b{font-size:15px;font-weight:700;color:var(--text-strong);font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.b16-mleg{flex:1;min-width:0;display:flex;flex-direction:column}
.b16-mleg a{display:grid;grid-template-columns:10px 1fr auto;column-gap:8px;align-items:baseline;padding:7px 0;color:var(--text);border-bottom:1px solid var(--sep);min-width:0}
.b16-mleg a:last-child{border-bottom:0}
.b16-mleg a:hover{color:var(--text-strong)}
.b16-mleg i{width:8px;height:8px;border-radius:50%;align-self:center}
.b16-mleg span{font-size:13.5px;font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.b16-mleg b{font-size:14px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.b16-mleg small{grid-column:2 / 4;font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.b16-live{display:flex;align-items:center;gap:8px;margin:0;padding:2px 4px;font-size:12.5px;color:var(--faint)}
/* the pipeline tiles: quiet, the same size, the label first */
#td-pipe .b2-stat{background-image:none}
html #td-pipe .b2-hot,html #td-pipe .b2-hot:hover{color:inherit}
@media (max-width:899px){
  .b16-mtop{gap:14px}
  .b16-mleg small{display:none}
  .b16-mleg a{padding:8px 0}
  #today .b2-td-hero{padding:18px}
  #today .b2-td-hero .b2-td-figs b{font-size:19px}
}
@media (max-width:359px){ .b16-mtop{flex-direction:column;align-items:stretch} .b16-donut{align-self:center} }
/* Today's "Waiting for you": rows on the card itself with hairlines (no box inside the box) */
html #td-needs .b2-need{background:transparent;border-radius:0;padding:10px 0;border-bottom:1px solid var(--sep)}
html #td-needs .b2-need:last-of-type{border-bottom:0}

/* dark: the open conversation is a neutral lift, not an orange tint (it read brown on charcoal) */
:root[data-theme="dark"] .ib-row.on{background:var(--glass-press)}

/* ── Today's hero: the latest installation photos, a slow CSS crossfade (7 s each); still with reduced motion or motion off;
   paused while the app is in the background (photohero.js sets html.b16-hidden) ── */
.b2-td-hero.b16-hasph{isolation:isolate}
.b2-td-hero.b16-hasph>:not(.b16-hp):not(.b16-ph){position:relative;z-index:2}
.b16-hp{position:absolute;inset:0;z-index:0;overflow:hidden;border-radius:inherit}
.b16-hp::after{content:'';position:absolute;inset:0;z-index:1;pointer-events:none;background:var(--photo-veil)}
.b16-slide{position:absolute;inset:0;margin:0;opacity:0;visibility:hidden;will-change:opacity}
.b16-slide:first-child{opacity:1;visibility:visible}
.b16-slide img{width:100%;height:100%;object-fit:cover;object-position:50% 40%;display:block}
.b16-cap{position:absolute;z-index:3;right:12px;top:12px;display:inline-flex;align-items:center;gap:6px;max-width:calc(100% - 24px);min-height:28px;padding:4px 10px;border-radius:999px;background:var(--photo-chip);color:var(--on-photo);font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.b16-cap:hover{color:var(--on-photo)}
.b16-cap::after{content:'';position:absolute;inset:-8px -2px}
.b2-td-hero.b16-hasph .pill2{background:var(--photo-chip);color:var(--on-photo)}
:root,:root[data-theme="light"],:root[data-theme="dark"]{--photo-veil:linear-gradient(180deg,rgba(14,10,8,.42) 0%,rgba(14,10,8,.32) 35%,rgba(14,10,8,.64) 70%,rgba(14,10,8,.84) 100%),linear-gradient(90deg,rgba(14,10,8,.58),rgba(14,10,8,0) 75%)}
html.mo-reduced .b16-slide,html.mo-off .b16-slide{animation:none!important}
html.b16-hidden .b16-slide{animation-play-state:paused}
@keyframes b16-xf2{0%{opacity:0;visibility:visible}8.57%{opacity:1;visibility:visible}50.00%{opacity:1;visibility:visible}58.57%{opacity:0;visibility:hidden}100%{opacity:0;visibility:hidden}}
.b16-hp.n2 .b16-slide{animation:b16-xf2 14s linear infinite;animation-delay:calc(var(--i) * 7s - 1.2s)}
@keyframes b16-xf3{0%{opacity:0;visibility:visible}5.71%{opacity:1;visibility:visible}33.33%{opacity:1;visibility:visible}39.05%{opacity:0;visibility:hidden}100%{opacity:0;visibility:hidden}}
.b16-hp.n3 .b16-slide{animation:b16-xf3 21s linear infinite;animation-delay:calc(var(--i) * 7s - 1.2s)}
@keyframes b16-xf4{0%{opacity:0;visibility:visible}4.29%{opacity:1;visibility:visible}25.00%{opacity:1;visibility:visible}29.29%{opacity:0;visibility:hidden}100%{opacity:0;visibility:hidden}}
.b16-hp.n4 .b16-slide{animation:b16-xf4 28s linear infinite;animation-delay:calc(var(--i) * 7s - 1.2s)}
@keyframes b16-xf5{0%{opacity:0;visibility:visible}3.43%{opacity:1;visibility:visible}20.00%{opacity:1;visibility:visible}23.43%{opacity:0;visibility:hidden}100%{opacity:0;visibility:hidden}}
.b16-hp.n5 .b16-slide{animation:b16-xf5 35s linear infinite;animation-delay:calc(var(--i) * 7s - 1.2s)}
@keyframes b16-xf6{0%{opacity:0;visibility:visible}2.86%{opacity:1;visibility:visible}16.67%{opacity:1;visibility:visible}19.52%{opacity:0;visibility:hidden}100%{opacity:0;visibility:hidden}}
.b16-hp.n6 .b16-slide{animation:b16-xf6 42s linear infinite;animation-delay:calc(var(--i) * 7s - 1.2s)}
@keyframes b16-xf7{0%{opacity:0;visibility:visible}2.45%{opacity:1;visibility:visible}14.29%{opacity:1;visibility:visible}16.73%{opacity:0;visibility:hidden}100%{opacity:0;visibility:hidden}}
.b16-hp.n7 .b16-slide{animation:b16-xf7 49s linear infinite;animation-delay:calc(var(--i) * 7s - 1.2s)}
@keyframes b16-xf8{0%{opacity:0;visibility:visible}2.14%{opacity:1;visibility:visible}12.50%{opacity:1;visibility:visible}14.64%{opacity:0;visibility:hidden}100%{opacity:0;visibility:hidden}}
.b16-hp.n8 .b16-slide{animation:b16-xf8 56s linear infinite;animation-delay:calc(var(--i) * 7s - 1.2s)}
@media (max-width:899px){ .b2-td-hero.b16-hasph{min-height:236px} .b16-cap{top:auto;bottom:10px;right:10px;max-width:calc(100% - 20px)} .b2-td-hero.b16-hasph .b2-td-figs{padding-bottom:30px} }
/* ── the customer card's banner: the order's own cover photo behind the name (photohero.js sets html.b16-cover + --b16-cover).
   The name block becomes the banner, so one or two lines of name always sit on the dark end of the gradient. Without a photo: as before. ── */
html.b16-cover .card-screen .phead-l{display:flex;flex-direction:column}
html.b16-cover .card-screen .phead-l>h1{order:-1;margin:0 0 10px;padding:128px 18px 16px;border-radius:22px;color:var(--on-photo);
  background:var(--photo-veil),var(--b16-cover) 50% 40%/cover no-repeat,var(--glass-2);box-shadow:var(--doc-shadow)}
html.b16-cover .card-screen .phead-l>h1 .serif{color:var(--hero-accent)}
html.b16-cover .card-screen .phead-l>h1 [data-motion="name"]{color:var(--on-photo)}
@media (max-width:899px){ html.b16-cover .card-screen .phead-l>h1{margin:-14px -16px 10px;padding:150px 16px 16px;border-radius:0 0 22px 22px;font-size:25px} }
/* main 1 Dec (Cedric, a quote page on the computer: "This space looks empty, do something" — the banner took the left third, nothing beside
   it): on the computer the banner spans the whole head, the full-size photo behind it; the crumbs and chips stay under it on the left and
   the buttons on the right, as before */
@media (min-width:900px){
  html.b16-cover .card-screen .phead{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:14px;row-gap:0;align-items:end}
  html.b16-cover .card-screen .phead-l{display:contents}
  html.b16-cover .card-screen .phead-l>h1{grid-column:1/-1;grid-row:1;margin-bottom:12px;background:var(--photo-veil),var(--b16-cover-full,var(--b16-cover)) 50% 42%/cover no-repeat,var(--glass-2)}
  html.b16-cover .card-screen .phead-l>:not(h1){grid-column:1;min-width:0}
  html.b16-cover .card-screen .phead-r{grid-column:2;grid-row:2/span 6;align-self:end;justify-content:flex-end}
}
@media (min-width:900px) and (max-width:1279px){   /* not wide enough for the chips and the buttons side by side: the buttons get their own row */
  html.b16-cover .card-screen .phead-r{grid-column:1/-1;grid-row:auto;justify-content:flex-start;margin-top:10px}
}

/* ── photo heroes, random and self-updating (photohero.js PhotoHero): two slots, a 1.2 s opacity crossfade, nothing else moves ── */
.b16-ph{position:absolute;inset:0;z-index:0;overflow:hidden;border-radius:inherit;pointer-events:none}
.b16-ph::after{content:'';position:absolute;inset:0;z-index:1;pointer-events:none;background:var(--photo-veil)}
.b16-ph-slot{position:absolute;inset:0;margin:0;opacity:0;transition:opacity 1.2s ease}
.b16-ph-slot.on{opacity:1}
.b16-ph-slot img{width:100%;height:100%;object-fit:cover;object-position:50% 40%;display:block}
.b16-ph-slot .b16-cap{pointer-events:none}.b16-ph-slot.on .b16-cap{pointer-events:auto}
html.mo-reduced .b16-ph-slot,html.mo-off .b16-ph-slot{transition:none}
/* readable on the brightest photo, both looks: a solid dark glass chip with white text, a stronger bottom veil, a dark backing behind the ring */
:root,:root[data-theme="light"],:root[data-theme="dark"]{--photo-veil:linear-gradient(180deg,rgba(12,10,9,.44) 0%,rgba(12,10,9,.34) 32%,rgba(12,10,9,.70) 66%,rgba(12,10,9,.90) 100%),linear-gradient(90deg,rgba(12,10,9,.58),rgba(12,10,9,0) 75%)}
.b16-cap{background:rgba(14,12,11,.84);color:#fff;font-weight:650;border:1px solid rgba(255,255,255,.14)}
.b16-cap:hover{color:#fff}
.b16-new{font-style:normal;font-size:10.5px;font-weight:800;letter-spacing:.02em;padding:1px 6px;border-radius:999px;background:var(--orange);color:var(--ink)}
.b2-td-hero.b16-hasph svg:has(.b2-ring){border-radius:50%;background:radial-gradient(closest-side,rgba(12,10,9,.62) 0,rgba(12,10,9,.62) 96%,rgba(12,10,9,0) 100%)}
/* the Customers stat strip and the More page get a quiet photo band (a hero, never in a list row) */
.cust .kpis.b16-band,.b16-moreband{position:relative;isolation:isolate;overflow:hidden}
.cust .kpis.b16-band{min-height:104px;align-items:end;border-color:transparent}
.cust .kpis.b16-band .kpi{position:relative;z-index:2;color:var(--on-photo)}
.cust .kpis.b16-band .kpi .lbl,.cust .kpis.b16-band .kpi b,.cust .kpis.b16-band .kpi b.due{color:var(--on-photo)}
.cust .kpis.b16-band .kpi+.kpi{border-left-color:rgba(255,255,255,.18)}
.cust .kpis.b16-band .b16-cap{top:8px;bottom:auto;left:10px;right:auto}
.b16-moreband{min-height:128px;border-radius:20px;display:flex;align-items:flex-end;padding:14px 16px;color:var(--on-photo);box-shadow:var(--doc-shadow)}
.b16-moreband>b{position:relative;z-index:2;font-size:17px;font-weight:700;letter-spacing:-.01em}
.b16-moreband>b small{display:block;font-size:12.5px;font-weight:500;opacity:.9}
.b16-moreband .b16-cap{top:10px;right:10px;bottom:auto}

/* ── Today's folding sections: the header is a button (chevron, count + the most urgent fact even when folded) ── */
.b16-fh{margin:0}
.b16-ft{flex:1;min-width:0;display:flex;align-items:center;gap:10px;min-height:44px;margin:-6px 0;padding:0;border:0;background:none;color:inherit;text-align:left;cursor:pointer;font:inherit}
.b16-ft h2{flex:none;margin:0}
.b16-fact{flex:1;min-width:0;font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.b16-chev{flex:none;color:var(--muted);transition:transform .2s cubic-bezier(.23,1,.32,1)}
.b16-fold.folded .b16-chev{transform:rotate(-90deg)}
html.mo-reduced .b16-chev,html.mo-off .b16-chev{transition:none}
.b16-fb{display:flex;flex-direction:column;gap:12px;min-width:0}
[data-motion~="height"][hidden]{display:none}   /* main 30 Nov (Cedric: "many collapsible menu you added doesn't work"): .b16-fb's display:flex beat the hidden attribute, so a folded card stayed open; motion.js keeps it on screen (inline display) only while it folds */
.b16-fold.folded{gap:0}
.b16-ft:focus-visible{outline:2px solid var(--focus);outline-offset:4px;border-radius:8px}
/* Waiting for you: one tappable row each (~64 px), a quiet "Open ›" on the right */
html #td-needs .b16-nrow{display:flex;flex-wrap:nowrap;align-items:center;gap:12px;width:100%;min-height:62px;padding:9px 0;border:0;border-bottom:1px solid var(--sep);border-radius:0;background:transparent;color:var(--text);font:inherit;text-align:left;cursor:pointer}
html #td-needs .b16-nrow:last-of-type{border-bottom:0}
html #td-needs .b16-nrow .b2-grow{flex:1;min-width:0;display:flex;flex-direction:column}
html #td-needs .b16-nrow b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:650}
html #td-needs .b16-nrow small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted)}
.b16-open{flex:none;display:inline-flex;align-items:center;gap:2px;font-size:12.5px;font-weight:600;color:var(--muted)}
html #td-needs .b16-nrow:hover .b16-open{color:var(--text)}
/* main 1 Dec 2026 (Cedric: "The blur on header still there"): the top bar is solid — no frosted glass, nothing blurred behind it */
.topbar{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
