/* Harbourline Talent brand (client's Brand Refresh v4, 20 Nov 2026: "LH Brand Guidelines_v4.pdf"). Loaded last, after look-signature.css, so it
   decides the colours; the layout stays as it is. To go back to the earlier warm-orange look: delete the <link> to brand.css in index.html
   (the sign-in page has its own brand block at the end of signin.css).
   Palette from the guidelines:
     LH Sunset (master gradient): coral #E8654A at 0% to peach #F6B26B at 100%, bottom-left to top-right.
     Navy, Teal, Berry and the rest are service colours in the guide (Navy is GP & Everyday Care), not the master brand, so the app is
     Sunset-led: no blue. Navy is used only as the dark writing colour; Teal, Violet, Gold, Berry only as extra chart lines.
   Readability: white text on coral or peach is too faint (2.6:1 and 1.5:1), so writing on Sunset is navy (5.7:1), and coral words and
   links use a deeper coral #B03E27 (5.4:1). Grey text stays at 4.5:1 or more on the page. */

:root {
  --mh-coral: #E8654A; --mh-peach: #F6B26B; --mh-navy: #221A45; --mh-coral-ink: #B03E27;
  --mh-sunset: linear-gradient(45deg, #221A45 0%, #4338CA 100%);
  --t-hero: var(--mh-sunset); --t-hero-shadow: 0 10px 30px -14px rgba(67, 56, 202, .6);
}
/* Light: soft neutral page, white cards, navy inks. */
html.mi-light {
  --t-page: #F7F5F2; --ink: #221A45; --ink-2: #3B3264; --muted: #5E5873;
  --t-track: #E9E8E9;
  --shadow: 0 1px 2px rgba(34, 26, 69, .05), 0 6px 20px -8px rgba(34, 26, 69, .12);
  --accent: #E8654A; --accent-2: #F6B26B; --accent-soft: rgba(232, 101, 74, .13); --accent-ink: #4338CA; --on-accent: #221A45;
  --t-act: #3F35B5; --t-on-act: #FFFFFF; --t-sel: #3F35B5; --t-sel-ink: #FFFFFF;
  --heat: 232, 101, 74; /* heat maps (busiest hours, rebooking): coral, dark writing on the strong cells */
  --navy: #221A45; --navy-2: #3B3264; --peach: #E8654A; --peach-soft: rgba(232, 101, 74, .12); --peach-ink: #B03E27;
  --chart-1: #4338CA; --chart-2: #E8654A; --chart-3: #F59E0B; --chart-4: #8B5CF6; --chart-5: #0EA5E9; --chart-6: #EC4899; --chart-7: #64748B; --chart-8: #84CC16;
  --chart-grid: rgba(34, 26, 69, .07); --tooltip: #221A45;
}
/* Dark: the theme's own dark, with brand accents. */
html:not(.mi-light) {
  --accent: #E8654A; --accent-2: #F6B26B; --accent-soft: rgba(232, 101, 74, .16); --accent-ink: #B9B4FF;
  --t-act: #3F35B5; --t-on-act: #FFFFFF; --t-sel: #3F35B5; --t-sel-ink: #FFFFFF;
  --chart-1: #A5B4FC; --chart-2: #E8654A; --chart-3: #FBBF24; --chart-4: #A78BFA; --chart-5: #38BDF8; --chart-6: #F472B6; --chart-7: #94A3B8; --chart-8: #A3E635;
}
/* The page (owner, 20 Nov 2026: flat white with hairlines "looks like a Word file"; the guide's pages get their quality from contrast and
   depth: rich glowing panels against clean, light ones). A warm paper page; white cards that lift off it with a soft two-layer shadow
   and rise a little under the pointer; the dark sidebar and the Sunset sales box carry the richness. */
html.mi-light { --t-page: #F7F5F2; --shadow: 0 1px 1px rgba(34, 26, 69, .04), 0 10px 28px -14px rgba(34, 26, 69, .16); }
html.mi-light body { background: #F7F5F2; }
html.mi-light :is(.card, .kpi) { border: 1px solid rgba(255, 255, 255, .9) !important; box-shadow: 0 1px 1px rgba(34, 26, 69, .04), 0 10px 28px -14px rgba(34, 26, 69, .16) !important; }
html.mi-light .kpis > .kpi { transition: transform .18s ease, box-shadow .18s ease; }
html.mi-light .kpis > .kpi:hover { transform: translateY(-2px); box-shadow: 0 2px 2px rgba(34, 26, 69, .04), 0 18px 36px -16px rgba(34, 26, 69, .24) !important; }
html.mi-light .kpis > .kpi.hero, html.mi-light .stats-row > .stat.main { border-color: transparent !important; box-shadow: 0 16px 34px -16px rgba(67, 56, 202, .75) !important; }
@media (prefers-reduced-motion: reduce) { html.mi-light .kpis > .kpi { transition: none; } html.mi-light .kpis > .kpi:hover { transform: none; } }
@media (min-width: 701px) {
  html.mi-light main > .top::before { background: rgba(244, 248, 250, .82); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); }
  html.mi-light.tabs-up main > .top:has(#top-tabs:not(:empty))::before { border-bottom-color: rgba(34, 26, 69, .08); box-shadow: 0 10px 22px -18px rgba(34, 26, 69, .3); }
}

/* Buttons: one style (primary in LH Sunset with navy writing, others white with a fine edge). */
html.mi-light :is(.pill.dark, .btn.primary, .depth-toggle button.on, .step > i, .yf-go, .pull-ind.ready) { background: var(--mh-sunset); color: #FFFFFF; }
html.mi-light :is(.pill.dark, .btn.primary):hover { background: linear-gradient(45deg, #1DAA9C 0%, #83D4F3 100%); }
.pill.dark, .btn.primary { box-shadow: 0 8px 18px -10px rgba(232, 101, 74, .8); }
html.mi-light .btn:not(.primary):not(.ghost):not(.danger), html.mi-light .btn.next-step { border-color: rgba(34, 26, 69, .22); color: #221A45; }
html.mi-light .btn:not(.primary):not(.ghost):not(.danger):hover, html.mi-light .btn.next-step:hover { border-color: rgba(34, 26, 69, .55); color: #221A45; }
html.mi-light .btn.ghost:hover { background: rgba(34, 26, 69, .06); color: #221A45; }
input:focus, select:focus, textarea:focus { border-color: #E8654A; box-shadow: 0 0 0 3px rgba(232, 101, 74, .25); }

/* Words and links that were orange: deep coral. */
html.mi-light :is(.lk-ico, .yt-calc, .yt-who .linkish, .yfc-eq li.final .val, .set-list .btn, .news-item.mention b.at, .link-btn, button.kt.wait .kt-w) { color: #B03E27; }
html.mi-light .lk-ico { background: rgba(232, 101, 74, .14); }
html.mi-light .yfc-eq li.final { background: rgba(246, 178, 107, .28); }
html.mi-light .set-list .btn { box-shadow: 0 0 0 1px rgba(34, 26, 69, .18); }
.dp-d.s::before, .dp-d.e::before, .dp-d.s:hover::before, .dp-d.e:hover::before { background: #E8654A; }

/* The sales box: LH Sunset with navy writing (the light travelling round it stays: magic.css). */
.kpis > .kpi.hero, .stats-row > .stat.main, .headline .main { background: var(--mh-sunset) !important; color: #FFFFFF; }
.kpi.hero :is(.l, .sub), .stat.main :is(.k, .s), .headline .main .k { color: rgba(255, 255, 255, .82) !important; }
.kpi.hero :is(.v, .v.proof-link, .delta), .stat.main .v, .answer-card .stats-row .stat.main .v, .answer-card .stats-row .stat.main .v * { color: #FFFFFF !important; }
.answer-card .stats-row .stat.main :is(.k, .s) { color: rgba(255, 255, 255, .82) !important; }
.kpi.hero :is(.trend, .trend.up, .trend.down, .trend.flat) { background: rgba(255, 255, 255, .16) !important; color: #FFFFFF !important; }
.kpi.hero .spark polyline, .kpi.hero .spark path { stroke: #FFFFFF !important; }
.kpi.hero .ib, .kpi.hero .ib.pin.on { color: rgba(255, 255, 255, .8); }
.kpi.hero .unpaid-note { background: rgba(255, 255, 255, .16); color: #FFFFFF; }

/* Sidebar (owner, 20 Nov 2026: "keep it as white as it was or … something really creative but more premium"; no shading, no blue).
   A white panel drawn like the brand's circle: a hair-thin LH Sunset line all the way round it, and a faint arc of the circle resting in
   its bottom corner. Navy writing; the open page is the Sunset pill. In dark mode the same, on warm dark. */
.rail { background: url("/brand/ring-soft.svg") no-repeat left -92px bottom -92px / 250px 250px padding-box, linear-gradient(#FFFFFF, #FFFFFF) padding-box, linear-gradient(45deg, #4338CA 0%, #E8654A 100%) border-box !important;
  border: 1.5px solid transparent !important; box-shadow: 0 1px 1px rgba(34, 26, 69, .04), 0 14px 34px -18px rgba(232, 101, 74, .45) !important; }
html[data-rail="min"] .rail { background: linear-gradient(#FFFFFF, #FFFFFF) padding-box, linear-gradient(45deg, #4338CA 0%, #E8654A 100%) border-box !important; }
.rail .nav { color: #3B3264; } .rail .nav .i { color: #6B7686; }
.rail .nav:hover { background: rgba(232, 101, 74, .1); color: #221A45; } .rail .nav:hover .i { color: #B03E27; }
.rail .nav-group span { color: #6B7686; }
.rail .rail-foot { border-color: #E6E2EE; } .rail .rail-toggle { color: #6B7686; }
.rail .rail-toggle:hover { background: rgba(232, 101, 74, .1); color: #221A45; }
.rail .nav-sep { background: #E6E2EE; }
.rail :is(.beta-tag, .pin-f) { color: #B03E27; background: rgba(232, 101, 74, .14); }
.rail .nav.active { background: var(--mh-sunset) !important; color: #FFFFFF; box-shadow: 0 10px 22px -12px rgba(67, 56, 202, .9) !important; } .rail .nav.active .i { color: #FFFFFF; }
.rail .nav.active :is(.beta-tag, .pin-f) { color: #221A45; background: rgba(255, 255, 255, .45); }
html[data-rail="min"] .rail .nav-group { background: rgba(34, 26, 69, .05); }
/* Dark mode: the same panel on warm dark. */
html:not(.mi-light) .rail { background: url("/brand/ring-soft.svg") no-repeat left -92px bottom -92px / 250px 250px padding-box, linear-gradient(#161327, #161327) padding-box, linear-gradient(45deg, #4338CA 0%, #E8654A 100%) border-box !important; box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .9) !important; }
html:not(.mi-light)[data-rail="min"] .rail { background: linear-gradient(#161327, #161327) padding-box, linear-gradient(45deg, #4338CA 0%, #E8654A 100%) border-box !important; }
html:not(.mi-light) .rail .nav { color: rgba(255, 255, 255, .82); } html:not(.mi-light) .rail .nav .i { color: rgba(255, 255, 255, .6); }
html:not(.mi-light) .rail .nav:hover { background: rgba(255, 255, 255, .09); color: #FFFFFF; } html:not(.mi-light) .rail .nav:hover .i { color: #F6B26B; }
html:not(.mi-light) .rail .nav-group span, html:not(.mi-light) .rail .rail-toggle { color: rgba(255, 255, 255, .5); }
html:not(.mi-light) .rail .rail-foot { border-color: rgba(255, 255, 255, .1); } html:not(.mi-light) .rail .nav-sep { background: rgba(255, 255, 255, .1); }
html:not(.mi-light) .rail :is(.beta-tag, .pin-f) { color: #F6B26B; background: rgba(246, 178, 107, .14); }
html:not(.mi-light) .rail .nav.active, html:not(.mi-light) .rail .nav.active .i { color: #161327; }
html:not(.mi-light)[data-rail="min"] .rail .nav-group { background: rgba(255, 255, 255, .08); }

/* Small dark things (tooltips, tips, menus, the person's initials) in navy rather than near-black. */
.htip { background: #221A45 !important; color: #FFFFFF !important; }
:is(.note-tip, .tip-nudge, .focus-exit, .pull-ind) { background: #221A45; }
.pull-ind { color: #F6B26B; }
html.mi-light .info-tip:hover, html.mi-light .info-tip[aria-expanded="true"] { background: #221A45; }
html.mi-light .sn::after, .gap-bar b, .dw-handle:hover::after, html.dw-dragging .dw-handle::after { background: #221A45; }
.fq.on { background: #221A45; border-color: #221A45; }
.me-av, html.mi-light .me-av { background: var(--mh-sunset); color: #FFFFFF; }
.mention-pop button { color: #221A45; }

/* Ask a question: deep coral writing on a soft coral wash. */
html.mi-light .top .pill.ask { color: #B03E27; background: rgba(232, 101, 74, .12); border-color: rgba(232, 101, 74, .3); }
html.mi-light .top .pill.ask:hover { background: rgba(232, 101, 74, .2); }

/* Counts and chips: coral edge, navy writing. */
.pill b.count { background: #E8654A; color: #221A45; }
html.mi-light .chip { background: rgba(232, 101, 74, .14); color: #221A45; }
html.mi-light .tag.fc { background: rgba(232, 101, 74, .14); color: #221A45; }

/* Board pack preview and print: the client's brand (theme.css sets its own warm copy with this selector). */
html #print-root, html .pack-preview { --bp-navy: #161327; --bp-peach: #E8654A; --bp-bg: #FBF4EF; --bp-line: #ECE4DC; --bp-ink-2: #4F4446; --bp-muted: #7A6E6A; --bp-cover-sub: #DCD6EA; }

/* Dark mode in the brand, no blue (owner, 20 Nov 2026: "i dont want that blue thing in the dark mode"): a warm near-black page and
   cards, LH Sunset glows (peach top-right, coral bottom-left) and coral/peach accents. Written for both ways dark is chosen (the system
   setting and Settings → Display), with the same selectors as theme.css so these win. */
:root[data-theme="dark"] {
  --navy: #F1EEF8; --navy-2: #FFFFFF; --peach: #E8654A; --peach-soft: rgba(232, 101, 74, .16); --peach-ink: #F6B26B;
  --accent: #E8654A; --accent-2: #F6B26B; --accent-soft: rgba(232, 101, 74, .16); --accent-ink: #B9B4FF;
  --bg: #110F1C; --card: #1B1830; --line: rgba(220, 210, 255, .09); --line-2: rgba(220, 210, 255, .05);
  --ink: #F1EEF8; --ink-2: #D3CEE0; --muted: #A29CB6;
  --hover: rgba(220, 210, 255, .05); --glass: rgba(21, 32, 34, .97); --bar-glass: rgba(17, 15, 28, .86);
  --shadow: 0 0 0 1px rgba(220, 210, 255, .06), 0 18px 40px -24px rgba(0, 0, 0, .9);
  --chart-1: #A5B4FC; --chart-2: #E8654A; --chart-3: #FBBF24; --chart-4: #A78BFA; --chart-5: #38BDF8; --chart-6: #F472B6; --chart-7: #94A3B8; --chart-8: #A3E635;
  --chart-grid: rgba(220, 210, 255, .06); --tooltip: #262142; --heat: 232, 101, 74;
  --t-page: #110F1C; --t-glow: radial-gradient(1100px 600px at 100% -10%, rgba(246, 178, 107, .13), transparent 62%), radial-gradient(900px 620px at -6% 108%, rgba(232, 101, 74, .14), transparent 62%);
  --t-side: #161327; --t-side-line: rgba(220, 210, 255, .07); --t-ink: #F1EEF8;
  --t-card: #1B1830; --t-card-bg: linear-gradient(180deg, #1F1B36 0%, #18152A 100%); --t-solid: #1C1932; --t-sub: rgba(220, 210, 255, .045);
  --t-edge: rgba(220, 210, 255, .06); --t-outline: rgba(220, 210, 255, .12); --t-ctrl: rgba(220, 210, 255, .05); --t-ctrl-edge: rgba(220, 210, 255, .08);
  --t-act: #5B50D6; --t-on-act: #FFFFFF; --t-sel: #5B50D6; --t-sel-ink: #FFFFFF;
  --t-track: rgba(220, 210, 255, .06); --t-seg-on: rgba(220, 210, 255, .13);
  --t-hero: var(--mh-sunset); --t-hero-shadow: 0 20px 44px -22px rgba(67, 56, 202, .5);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --navy: #F1EEF8; --navy-2: #FFFFFF; --peach: #E8654A; --peach-soft: rgba(232, 101, 74, .16); --peach-ink: #F6B26B;
  --accent: #E8654A; --accent-2: #F6B26B; --accent-soft: rgba(232, 101, 74, .16); --accent-ink: #B9B4FF;
  --bg: #110F1C; --card: #1B1830; --line: rgba(220, 210, 255, .09); --line-2: rgba(220, 210, 255, .05);
  --ink: #F1EEF8; --ink-2: #D3CEE0; --muted: #A29CB6;
  --hover: rgba(220, 210, 255, .05); --glass: rgba(21, 32, 34, .97); --bar-glass: rgba(17, 15, 28, .86);
  --shadow: 0 0 0 1px rgba(220, 210, 255, .06), 0 18px 40px -24px rgba(0, 0, 0, .9);
  --chart-1: #A5B4FC; --chart-2: #E8654A; --chart-3: #FBBF24; --chart-4: #A78BFA; --chart-5: #38BDF8; --chart-6: #F472B6; --chart-7: #94A3B8; --chart-8: #A3E635;
  --chart-grid: rgba(220, 210, 255, .06); --tooltip: #262142; --heat: 232, 101, 74;
  --t-page: #110F1C; --t-glow: radial-gradient(1100px 600px at 100% -10%, rgba(246, 178, 107, .13), transparent 62%), radial-gradient(900px 620px at -6% 108%, rgba(232, 101, 74, .14), transparent 62%);
  --t-side: #161327; --t-side-line: rgba(220, 210, 255, .07); --t-ink: #F1EEF8;
  --t-card: #1B1830; --t-card-bg: linear-gradient(180deg, #1F1B36 0%, #18152A 100%); --t-solid: #1C1932; --t-sub: rgba(220, 210, 255, .045);
  --t-edge: rgba(220, 210, 255, .06); --t-outline: rgba(220, 210, 255, .12); --t-ctrl: rgba(220, 210, 255, .05); --t-ctrl-edge: rgba(220, 210, 255, .08);
  --t-act: #5B50D6; --t-on-act: #FFFFFF; --t-sel: #5B50D6; --t-sel-ink: #FFFFFF;
  --t-track: rgba(220, 210, 255, .06); --t-seg-on: rgba(220, 210, 255, .13);
  --t-hero: var(--mh-sunset); --t-hero-shadow: 0 20px 44px -22px rgba(67, 56, 202, .5);
} }
html:not(.mi-light) body { background: var(--t-glow), #110F1C; background-attachment: fixed; background-color: #110F1C; }
@media (min-width: 701px) { html:not(.mi-light) main > .top::before { background: rgba(17, 15, 28, .74); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); } }
html:not(.mi-light) :is(.pill.dark, .btn.primary) { background: var(--mh-sunset); color: #FFFFFF; }
html:not(.mi-light) .top .pill.ask { color: #F6B26B; }

/* The theme's blue (links, "steady" trend lines, notes dots) is not in the brand: deep coral for links and dots, brand grey for steady lines. */
html.mi-light { --blue: #B03E27; }
html:not(.mi-light) { --blue: #F6B26B; }
.spark polyline { stroke: #89898C; }

/* Dark mode: small dark items (tooltips, tips, picked filters) in warm dark, not navy. */
html:not(.mi-light) .htip, html:not(.mi-light) :is(.note-tip, .tip-nudge, .focus-exit, .pull-ind) { background: #262142 !important; }
html:not(.mi-light) .fq.on { background: #E8654A; border-color: #E8654A; color: #110F1C; }

/* Brand type (guide: Gotham, with Poppins as the brand's second font). Gotham needs a paid web licence, so headings and the big figures
   use Poppins (self-hosted, SIL Open Font Licence: fonts/poppins-LICENSE.txt); body text and tables stay Inter for small-size reading. */
@font-face { font-family: "Poppins"; src: url("/fonts/poppins-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/fonts/poppins-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/fonts/poppins-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/fonts/poppins-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/fonts/poppins-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
:root { --font-display: "Poppins", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
/* Light, airy headings as in the guide; card titles and figures a step firmer so they still read at a glance. */
h1 { letter-spacing: -.02em; font-weight: 400; }
:is(.card, .visual) h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.005em; }
.kpi .v, .kpi .v.proof-link, .stat .v { letter-spacing: -.02em; font-weight: 500; }
/* The wordmark as the guide sets it: "Harbourline" light in navy, "Health" bold in LH Sunset. */
.word { font-family: var(--font-display); letter-spacing: -.01em; }
.word b { font-weight: 300 !important; color: #221A45 !important; }
.word i { font-weight: 700 !important; background: linear-gradient(45deg, #E8654A 0%, #F6B26B 100%); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
html:not(.mi-light) .word b { color: #FFFFFF !important; }

/* The circle (guide: "The circle places people at the heart of the identity"): the open ring as a soft watermark on the Sunset sales box. */
.kpis > .kpi.hero, .stats-row > .stat.main { background: url("/brand/ring-white.svg") no-repeat right 0 bottom 22px / 240px 74px,
  radial-gradient(90% 120% at 0% 100%, rgba(232, 101, 74, .5), transparent 60%), radial-gradient(70% 90% at 100% 0%, rgba(255, 255, 255, .28), transparent 60%), var(--mh-sunset) !important; }
/* People's initials sit in a Sunset ring. */
.me-av { box-shadow: 0 0 0 2px var(--t-page, #FBF4EF), 0 0 0 3.5px #E8654A; }

/* "Open …" links on Home's boxes (owner, 20 Nov 2026): to the tab with the detail, only drawn for someone who can open it. */
.go-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; padding: 0; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--accent-ink); cursor: pointer; }
.go-link .i, .go-link svg { width: 14px; height: 14px; transition: transform .15s ease; }
.go-link:hover { text-decoration: underline; text-underline-offset: 3px; } .go-link:hover :is(.i, svg) { transform: translateX(2px); }
.vhead .go-link { margin-top: 4px; }
.kpi.hero .go-link { color: #FFFFFF; }
html:not(.mi-light) .kpi.hero .go-link { color: #FFFFFF; }

/* Finishing touches for depth and rhythm. */
/* Tabs: the open tab is underlined in LH Sunset. */
.tabs button.on, #top-tabs button.on, #top-tabs a.on { box-shadow: inset 0 -2.5px 0 0 #E8654A; }
/* Table headers: quiet small caps, so the figures lead. */
html.mi-light table thead th { text-transform: uppercase; letter-spacing: .05em; font-size: 10.5px; font-weight: 600; color: #6B7686; }
html.mi-light table tbody tr:hover > td { background: rgba(232, 101, 74, .05); }
/* The page's lead sentence: a touch larger and lighter, like the guide's statements. */
.ov-lead > .lead { font-family: var(--font-display); font-weight: 400; letter-spacing: -.01em; }
/* The search and round controls in the top bar sit on white with the same lift as cards. */
html.mi-light .top :is(.pill, .ib, .search) { box-shadow: 0 1px 1px rgba(34, 26, 69, .04), 0 6px 16px -10px rgba(34, 26, 69, .2); }
/* Dark mode keeps its own page; the cards get a soft warm edge light. */
html:not(.mi-light) :is(.card, .kpi) { box-shadow: 0 0 0 1px rgba(220, 210, 255, .06), 0 18px 40px -24px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(220, 210, 255, .05); }

/* Your figures boxes (owner, 20 Nov 2026: "the boxes … created by the AI with the formulas are not good"). Buttons no longer break over
   two lines, the figure is set like Home's figures, the source links are crisp outlines, and the old orange is LH Sunset. */
.yf-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.yt { gap: 4px; padding: 18px 20px 14px; border-radius: 18px; }
html.mi-light .yt { background: #FBFAFD; box-shadow: inset 0 0 0 1px #E6E2EE; }
html.mi-light .yt:hover { background: #FFFFFF; box-shadow: inset 0 0 0 1px #83E2DF, 0 14px 30px -18px rgba(34, 26, 69, .3); }
.yt.new::after { box-shadow: 0 0 0 2px #E8654A; }
.yt-top { gap: 10px; min-height: 24px; align-items: flex-start; }
.yt-l { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; line-height: 1.35; }
html.mi-light .yt-l { color: #5A6679; }
.yt-top .yt-who { flex: none; margin: 1px 0 0; font-size: 12px; font-weight: 500; white-space: nowrap; color: var(--muted); }
.yt-top button.yt-who { color: var(--accent-ink); }
.yt-x { flex: none; margin: -3px -6px 0 -4px; width: 24px; height: 24px; }
.yt-v { margin-top: 6px; font-size: 32px; font-weight: 500; letter-spacing: -.025em; }
.yt-v small { font-weight: 500; }
.yt-d { margin-top: 2px; font-weight: 500; text-align: left; }
.yt-wait { padding: 12px 0 8px; }
.yt-src { gap: 6px; margin-top: 12px; }
.yt-src button { padding: 3px 9px; font-size: 11.5px; font-weight: 500; }
html.mi-light .yt-src button { background: transparent; color: #3B3264; box-shadow: inset 0 0 0 1px rgba(34, 26, 69, .16); }
html.mi-light .yt-src button em { color: #6B7686; }
html.mi-light .yt-src button:hover { background: rgba(232, 101, 74, .1); color: #B03E27; box-shadow: inset 0 0 0 1px rgba(176, 62, 39, .4); }
html.mi-light .yt-src button:hover em { color: #B03E27; }
.yt-foot { flex-wrap: wrap; gap: 6px 14px; margin-top: auto; padding-top: 12px; }
.yt-src + .yt-foot, .yt-tg + .yt-foot, .yt-d + .yt-foot, .yt-wait + .yt-foot { margin-top: auto; }
.yt > :nth-last-child(2) { margin-bottom: 14px; }
html.mi-light .yt-foot { border-top-color: #E1ECF0; }
.yt-calc, .yt-tgb { font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.yt-calc svg { width: 14px; height: 14px; }
html.mi-light .yf-ask { background: #FBFAFD; }
html.mi-light .yf-ask:focus-within { box-shadow: inset 0 0 0 1.5px #E8654A, 0 0 0 5px rgba(232, 101, 74, .14); }
html.mi-light .yf-ask .spark { color: #E8654A; }
html.mi-light .yf-steps i.done::before { background: #E8654A; }
html.mi-light .yf-try button { background: transparent; color: #3B3264; box-shadow: inset 0 0 0 1px rgba(34, 26, 69, .16); font-weight: 500; }
html.mi-light .yf-try button:hover { background: rgba(232, 101, 74, .1); color: #B03E27; }
html.mi-light .yf-msg { background: #EEFAFC; color: #3B3264; }
html:not(.mi-light) .yt { background: rgba(220, 210, 255, .03); box-shadow: inset 0 0 0 1px rgba(220, 210, 255, .1); }
html:not(.mi-light) .yt:hover { box-shadow: inset 0 0 0 1px rgba(246, 178, 107, .35); }

/* Lighter type (owner, 20 Nov 2026: "the fonts … too bold"). The guide sets figures and headings light to medium, never heavy:
   figures and names medium, small labels and buttons medium, only the wordmark's "Health" stays bold. */
:is(.sc-v, .kt-v, .stat .v, .kpi .v, .kpi .value, .fp-v) { font-weight: 500 !important; }
:is(.sc-n, .ny-l, .yf-try span, .sn-f, .sc-need, .ask-l, .period-mini, .me-av, .beta-tag, .yf-go, .yf-msg .pill) { font-weight: 500 !important; }
:is(.btn, .pill, .sn, .tabs button, .nav span, th) { font-weight: 500; }
.sn.on, .tabs button.on, .rail .nav.active span { font-weight: 600 !important; }
main h3 { font-weight: 500 !important; }
main :is(b, strong) { font-weight: 600; }

/* Premium pass (owner, 20 Nov 2026: "is the app more premium? if not … fix"). What a page-by-page sweep still found off brand. */
/* 1. The sorted column heading showed blue: navy ink, like every other heading. */
html.mi-light table.grid th.sorted, html.mi-light table thead th.sorted { color: #221A45 !important; }
html:not(.mi-light) table.grid th.sorted { color: #FFFFFF !important; }
/* 2. Old orange and brown left in small places: owed-by-age bar, late-payer note. */
.ag0 { background: #9ED5CE; } .ag1 { background: #F6B26B; } .ag2 { background: #E8654A; } .ag3 { background: #B03E27; }
html.mi-light .wd .wd-late { color: #B03E27; font-weight: 500; }
/* 3. Heavy type left over: totals rows, small headings, the "i" dots, list figures. */
table.grid tfoot td, table.grid td.num b, table.grid .num { font-weight: 500; }
table.grid tfoot td { font-weight: 600 !important; }
main :is(h2, h4, .subhead, .sf-t, .as-v, .count-dot) { font-weight: 500 !important; }
main table.grid tbody td { font-weight: 400; } main table.grid tbody td:first-child { font-weight: 500; }
main table.grid tbody td :is(b, strong) { font-weight: 500; }
html.mi-light .info-tip { background: transparent; color: #6B7686; box-shadow: inset 0 0 0 1px rgba(34, 26, 69, .22); font-weight: 500; font-size: 11px; }
html.mi-light .info-tip:hover { color: #B03E27; box-shadow: inset 0 0 0 1px rgba(176, 62, 39, .5); }
/* 4. Board pack pages: the guide's light, confident type and thin circle (was extra-bold with a thick ring). */
.bp-cover-title, .bp-title, .bp-kpi-value { font-family: var(--font-display); font-weight: 500 !important; }
.bp-cover-title { font-weight: 300 !important; letter-spacing: -.025em; }
.bp-page :is(b, strong, .bp-pno, i) { font-weight: 600 !important; }
.bp-ring { border-width: 3.2mm !important; }
.bp-ring-2 { border-width: 1mm !important; }

/* To chase: notes always in reach (owner, 20 Nov 2026: "the notes col was overlapped … I don't want to scroll right or left").
   A row has Chased, Notes and More; the buttons column stays pinned to the right edge even on a narrow screen; the note and tags
   sit under the service in full. */
table.grid td:has(> .rc-actions) { position: sticky; right: 0; z-index: 1; background: var(--t-solid, #FFFFFF); width: 1%; padding-left: 14px; }
html.mi-light table.grid tbody tr:hover > td:has(> .rc-actions) { background: #EBFDFE; }
table.grid td.wrap:has(.rc-bits), table.grid:has(.rc-actions) td.wrap { min-width: 170px; }
.rc-actions { gap: 6px; align-items: center; }
.rc-actions .btn.sm { padding: 0 11px; }
.rc-notes.has { color: #B03E27; box-shadow: inset 0 0 0 1px rgba(176, 62, 39, .45); background: rgba(232, 101, 74, .08); }
html:not(.mi-light) .rc-notes.has { color: #F6B26B; box-shadow: inset 0 0 0 1px rgba(246, 178, 107, .45); background: rgba(246, 178, 107, .08); }
.rc-count { border: 0; background: currentColor; min-width: 17px; line-height: 17px; font-weight: 600; }
.rc-count { color: inherit; } .rc-notes .rc-count { background: #B03E27; color: #FFFFFF; }
button.rc-bits { display: flex; flex-wrap: wrap; gap: 5px 6px; align-items: center; min-width: 0; max-width: none; width: 100%; margin-top: 6px; padding: 6px 9px; border: 0; border-radius: 9px; background: rgba(232, 101, 74, .08); font: inherit; text-align: left; cursor: pointer; }
button.rc-bits:hover { background: rgba(232, 101, 74, .16); }
.rc-bits .rc-cnote { max-width: none; white-space: normal; overflow: visible; font-size: 12.5px; color: var(--ink); line-height: 1.4; }
.rc-tag { border-color: rgba(34, 26, 69, .28); font-weight: 500; }
html:not(.mi-light) .rc-tag { border-color: rgba(255, 255, 255, .3); color: var(--ink-2); }
.rc-more-menu { min-width: 250px; }
.rc-more-menu button { display: grid !important; gap: 1px; height: auto; white-space: normal; }
.rc-more-menu button span { font-weight: 500; }
.rc-more-menu button small { font-size: 12px; color: var(--muted); font-weight: 400; }
html.mi-light .ctx-menu button:hover, html.mi-light .ctx-menu button:focus-visible { background: rgba(232, 101, 74, .14); color: #B03E27; }
.rc-panel h3 .rc-h { margin-left: 6px; font-size: 12px; font-weight: 400; color: var(--muted); }
.rc-panel textarea { border-radius: 12px; padding: 10px 12px; font: inherit; }
.rc-panel textarea:focus { outline: none; box-shadow: 0 0 0 2px #E8654A; }
.rc-ideas .btn.sm { border-radius: 999px; }
.rc-comment { border-radius: 12px; }
@media (max-width: 720px) { table.grid td:has(> .rc-actions) { position: static; } }
table.grid:has(.rc-actions) td.wrap { white-space: normal !important; min-width: 170px; max-width: 215px; overflow: visible; text-overflow: clip; }
table.grid:has(.rc-actions) .rc-cell { max-width: 135px; }
table.grid:has(.rc-actions) :is(th, td) { padding-left: 8px; padding-right: 8px; }
.rc-bits .rc-cnote { flex: 1 1 100%; min-width: 0; white-space: normal !important; overflow-wrap: anywhere; text-overflow: clip; }
button.rc-bits { white-space: normal !important; overflow: visible; }
html.mi-light .rc-actions .btn.ghost:not(.has) { box-shadow: inset 0 0 0 1px rgba(34, 26, 69, .14); color: #3B3264; }
.rc-more-menu { opacity: 1 !important; animation: none !important; }
.tablewrap:has(.rc-actions) { max-height: max(560px, 78vh); }

/* Payer type, one of three everywhere (owner, 20 Nov 2026): a small outlined tag. */
.ptype { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500; line-height: 18px; white-space: nowrap; box-shadow: inset 0 0 0 1px rgba(34, 26, 69, .22); color: #3B3264; }
.ptype-ins { box-shadow: inset 0 0 0 1px rgba(176, 62, 39, .5); color: #1C6367; }
.ptype-corp { box-shadow: inset 0 0 0 1px rgba(118, 77, 116, .5); color: #764D74; }
html:not(.mi-light) .ptype { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); color: var(--ink-2); }
.rules-table td.wrap { white-space: normal; min-width: 240px; max-width: 460px; line-height: 1.45; }
.rules-table td:first-child { white-space: nowrap; vertical-align: top; }
.rules-table td { vertical-align: top; }
select.rules-type { height: 30px; padding: 0 26px 0 10px; border-radius: 9px; border: 1px solid rgba(34, 26, 69, .2); background-color: var(--t-solid, #FFF); color: var(--ink); font: inherit; font-size: 13px; }
.rules-who { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.rules-who > span:not(.muted) { padding: 1px 8px; border-radius: 999px; font-size: 12px; box-shadow: inset 0 0 0 1px rgba(34, 26, 69, .16); white-space: nowrap; }
.rules-num { white-space: normal; font-size: 13px; color: var(--muted); }
.rules-num input { width: 72px; height: 30px; margin-right: 6px; padding: 0 8px; border-radius: 9px; border: 1px solid rgba(34, 26, 69, .2); background: var(--t-solid, #FFF); color: var(--ink); font: inherit; }
input.rules-ins { width: 100%; min-width: 260px; height: 32px; padding: 0 10px; border-radius: 9px; border: 1px solid rgba(34, 26, 69, .2); background: var(--t-solid, #FFF); color: var(--ink); font: inherit; font-size: 13px; }
.rules-set select.rules-type { max-width: 300px; }
.rules-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.rules-acts { display: inline-flex; gap: 8px; }

/* Rules: the owner's own rules, one sentence each, and the builder. */
.rules-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: rule; }
.rules-list li { counter-increment: rule; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; box-shadow: inset 0 0 0 1px #E6E2EE; background: #FBFAFD; }
.rules-list li::before { content: counter(rule); flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: #221A45; background: rgba(232, 101, 74, .2); }
.rules-list li.off { opacity: .55; }
.rules-kind { flex: none; padding: 1px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500; box-shadow: inset 0 0 0 1px rgba(34, 26, 69, .22); white-space: nowrap; }
.rules-line { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.45; }
.rules-line b { font-weight: 600; }
.rules-line small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.rules-add { margin-top: 14px; padding: 14px 16px; border-radius: 14px; box-shadow: inset 0 0 0 1.5px #83E2DF; background: #EBFDFE; display: grid; gap: 10px; }
.rules-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rules-lbl { flex: none; width: 92px; font-size: 13px; font-weight: 500; color: #5A6679; }
.rules-then { font-size: 13.5px; }
input.rules-val { flex: 1; width: auto; min-width: 180px; max-width: 360px; }
tr.rules-name { cursor: pointer; } tr.rules-name:hover > td { background: rgba(232, 101, 74, .07); }
html:not(.mi-light) .rules-list li { background: rgba(220, 210, 255, .03); box-shadow: inset 0 0 0 1px rgba(220, 210, 255, .1); }
html:not(.mi-light) .rules-add { background: rgba(220, 210, 255, .04); box-shadow: inset 0 0 0 1.5px rgba(246, 178, 107, .35); }
html:not(.mi-light) .rules-list li::before { color: #161327; background: #F6B26B; }
@media (max-width: 700px) { .rules-list li { flex-wrap: wrap; } .rules-lbl { width: 100%; } }
/* The register of every rule. */
.rules-reg td { vertical-align: top; }
.rules-reg td.wrap { min-width: 190px; max-width: 340px; }
.rules-reg .rules-does { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 400; color: var(--muted); line-height: 1.45; }
.rules-reg tr.rules-group td { padding-top: 18px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #B03E27; border-bottom-color: rgba(232, 101, 74, .45); background: transparent !important; }
html:not(.mi-light) .rules-reg tr.rules-group td { color: #F6B26B; }
.rules-setcell { white-space: normal !important; min-width: 220px; max-width: 320px; }
.rules-fixed { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500; color: #5A6679; box-shadow: inset 0 0 0 1px rgba(34, 26, 69, .2); }
.rules-why { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); line-height: 1.4; white-space: normal; }
.rules-setcell input.rules-ins { min-width: 200px; }
.rules-reg td.wrap { min-width: 170px; max-width: 300px; }
.rules-setcell { min-width: 200px; max-width: 280px; }
.rules-reg .rules-num input { width: 62px; }
.rules-set select.rules-type { max-width: 250px; }
/* Open in Semble: an invoice number that is a link. */
a.semble-link { color: var(--accent-ink, #B03E27); text-decoration: underline; text-decoration-color: rgba(176, 62, 39, .35); text-underline-offset: 3px; }
a.semble-link:hover { text-decoration-color: currentColor; }
.rc-more-menu a.rc-more-link { display: grid; gap: 1px; padding: 8px 12px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: 13.5px; }
.rc-more-menu a.rc-more-link:hover { background: rgba(232, 101, 74, .14); color: #B03E27; }
.rc-more-menu a.rc-more-link span { font-weight: 500; } .rc-more-menu a.rc-more-link small { font-size: 12px; color: var(--muted); }
.rules-differs { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 500; line-height: 18px; color: #B03E27; box-shadow: inset 0 0 0 1px rgba(176, 62, 39, .5); }
button.rules-differs { border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 11.5px; font-weight: 500; }
button.rules-differs:hover { background: rgba(232, 101, 74, .12); }
.rules-ok { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 500; line-height: 18px; color: #1C6367; box-shadow: inset 0 0 0 1px rgba(176, 62, 39, .5); } span.rules-differs { cursor: default; } td .rules-why + button.rules-differs { display: block; margin: 4px 0 0; padding: 0; text-decoration: underline; color: #B03E27; box-shadow: none; }

/* Rules: topics as chips, one card per rule (owner, 21 Nov 2026: no long list in a scroll box). */
.rule-topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.rule-topics button { border: 0; cursor: pointer; padding: 7px 14px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 500; color: #3B3264; background: transparent; box-shadow: inset 0 0 0 1px rgba(34, 26, 69, .16); }
.rule-topics button b { margin-left: 4px; font-weight: 500; color: var(--muted); }
.rule-topics button:hover { background: rgba(232, 101, 74, .1); }
.rule-topics button.on { background: var(--mh-sunset); color: #FFFFFF; box-shadow: none; } .rule-topics button.on b { color: #FFFFFF; opacity: .7; }
.rule-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.rule-card { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 14px; border-radius: 16px; background: #FBFAFD; box-shadow: inset 0 0 0 1px #E6E2EE; }
.rule-card h4 { margin: 0; font-family: var(--font-display); font-size: 15.5px; font-weight: 500; color: var(--ink); }
.rule-card .rule-does { margin: 0; font-size: 13.5px; line-height: 1.5; color: #4A5669; }
.rule-card :is(.rule-effect, .rule-set) { display: grid; gap: 4px; font-size: 13.5px; line-height: 1.45; }
.rule-card :is(.rule-effect, .rule-set) > span:first-child { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: #8A93A1; }
.rule-card .rule-effect { padding: 10px 12px; border-radius: 10px; background: rgba(232, 101, 74, .08); color: var(--ink); }
.rule-card .rule-set { margin-top: auto; }
.rule-card.is-fixed .rule-set > div { font-size: 13px; color: var(--muted); }
.rule-card .rules-why { margin: 0; }
.rule-card .rule-set select.rules-type, .rule-card .rule-set input.rules-ins { max-width: 100%; }
.rule-more { border-top: 1px solid #E1ECF0; padding-top: 8px; }
.rule-more summary { cursor: pointer; font-size: 12.5px; color: var(--accent-ink, #B03E27); list-style: none; } .rule-more summary::-webkit-details-marker { display: none; }
.rule-more summary::after { content: " ›"; } .rule-more[open] summary::after { content: " ⌄"; }
.rule-more p { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.rules-savebar { position: sticky; bottom: 14px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-radius: 14px; background: #221A45; color: #FFFFFF; font-size: 13.5px; box-shadow: 0 16px 34px -16px rgba(34, 26, 69, .7); }
.rules-savebar .btn.sm:not(.primary) { background: transparent; color: #FFFFFF; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45); }
html:not(.mi-light) .rule-card { background: rgba(220, 210, 255, .03); box-shadow: inset 0 0 0 1px rgba(220, 210, 255, .1); }
html:not(.mi-light) .rule-card .rule-does { color: var(--ink-2); } html:not(.mi-light) .rule-more { border-top-color: rgba(255, 255, 255, .1); }
html:not(.mi-light) .rules-savebar { background: #262142; }
@media (max-width: 700px) { .rule-cards { grid-template-columns: 1fr; } }

/* The header block of a page (lead sentence and its three boxes) is not a card: no outline, no shadow (owner, 21 Nov 2026: "a very thin
   transparent box outside and the texts are overlapping" — the brand's card edge was being drawn round it, and the words sat on that line). */
html.mi-light .card.answer-card, html:not(.mi-light) .card.answer-card, .card.answer-card { border: 0 !important; box-shadow: none !important; background: transparent !important; }
/* A button inside a rule card's "In these weeks" box keeps its own width. */
.rule-card .rule-effect button.rules-differs { justify-self: start; padding: 0; text-decoration: underline; color: #B03E27; box-shadow: none; background: none; }
/* On a phone the save bar sits above the bottom menu, not under it. */
@media (max-width: 700px) { .rules-savebar { bottom: 86px; } }
/* A table too wide for its box (ux-extras.js fitTable): headings may take a second line, long names are cut a little shorter, and as a
   last step the first column may take a second line. */
.tablewrap > table.grid.fit-heads thead th { white-space: normal; text-wrap: balance; vertical-align: bottom; line-height: 1.25; }
.tablewrap > table.grid.fit-heads td.one-line { max-width: var(--one-max, 300px); }
.tablewrap > table.grid.fit-heads td.wrap { min-width: min(220px, var(--one-max, 220px)); }
.tablewrap > table.grid.fit-tight :is(th, td) { padding-left: 6px; padding-right: 6px; }
.tablewrap > table.grid.fit-wrap tbody td:first-child:not(.one-line), .tablewrap > table.grid.fit-wrap tbody td.num { white-space: normal; }
.tablewrap > table.grid.fit-wrap tbody td.num > .muted { display: block; }
.tablewrap > table.grid.rooms-grid.fit-heads th.rg-b { min-width: 14px; letter-spacing: -.02em; }

/* Phone area tabs: the open tab uses the brand Sunset with navy writing (white on orange was hard to read). */
@media (max-width: 700px) { .sn.on { background: linear-gradient(45deg, #E8654A, #F6B26B); color: #221A45 !important; } }

/* Design review upgrades (22 Nov 2026). */
/* Table headings readable: 11.5px (was 10.5px), warm grey in light mode. */
table thead th { font-size: 11.5px; letter-spacing: .04em; }
html.mi-light table thead th { color: #574C45; }
@media (max-width: 700px) {
  /* To chase on phones: invoice numbers on one line, bigger buttons, no sideways scroll. */
  table.grid:has(.rc-actions) td.col-keep .mono { white-space: nowrap !important; overflow-wrap: normal !important; }
  .rc-actions .btn.sm { min-height: 40px; padding: 0 10px; }
  table.grid:has(.rc-actions) :is(th, td) { padding-left: 5px; padding-right: 5px; }
  table.grid:has(.rc-actions) thead th:not(:first-child) { white-space: normal !important; }
  /* (Board pack on phones: the preview pages shrink to fit, see the end of this file.) */
}
/* Side panel: dates and invoice numbers stay on one line. */
#drawer .tablewrap > table.grid tbody td:is(:first-child, :nth-child(2)) { white-space: nowrap; }
/* To chase: a long name ends in … (full name on hover) instead of being cut mid-word. */
table.grid:has(.rc-actions) td.one-line > .rc-cell { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Filters: "Show all N" under a long list. */
.fmore-btn { display: block; margin: 6px 0 2px; padding: 4px 0; border: 0; background: none; color: #B03E27; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.fmore-btn:hover { text-decoration: underline; }
html:not(.mi-light) .fmore-btn { color: #22C9BC; }
/* Read by screen readers, not shown. */
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* Diary gap bars on brand: Sunset fill; a quiet track and a light "usual" mark in dark mode. */
.gap-bar i { background: linear-gradient(90deg, #E8654A, #F6B26B); }
html:not(.mi-light) .gap-bar { background: rgba(255, 255, 255, .12); }
html:not(.mi-light) .gap-bar b { background: #E5EFF1; }
/* Rooms, block by block: the week fits on a laptop (narrower blocks once the table is too wide). */
.tablewrap > table.grid.rooms-grid.fit-tight :is(td.rc, th.rg-b) { padding-left: 1px !important; padding-right: 1px !important; min-width: 0; }
.tablewrap > table.grid.rooms-grid.fit-tight th.rg-b { font-size: 9px; letter-spacing: -.03em; }
.tablewrap > table.grid.rooms-grid.fit-tight td.rc .rcell { width: 11px; min-width: 0; }
.tablewrap > table.grid.rooms-grid.fit-tight :is(td.rc, th.rg-b).d0 { padding-left: 5px !important; }
/* Phones: a table that is still too wide after the last fitting step lets every cell wrap and the first column narrow. */
@media (max-width: 700px) {
  .tablewrap > table.grid.fit-wrap:not(.rooms-grid) :is(td, th) { white-space: normal !important; min-width: 0 !important; }
  .tablewrap > table.grid.fit-wrap:not(.rooms-grid) td:first-child { min-width: 64px !important; overflow-wrap: break-word; hyphens: auto; }
}
/* Phones: rows of form fields stack one per line, each field as wide as the card. */
@media (max-width: 700px) {
  :is(.row2, .row3):has(> .field) { grid-template-columns: minmax(0, 1fr) !important; }
  :is(.row2, .row3) > .field { min-width: 0; }
  :is(.row2, .row3) > .field :is(input, select) { width: 100%; min-width: 0; }
}
/* Phones, last fitting step (ux-extras fitTable "fit-phone"): closer columns, smaller grid text, controls and pills that shrink. */
@media (max-width: 700px) {
  .tablewrap > table.grid.fit-phone :is(td, th) { padding-left: 3px !important; padding-right: 3px !important; }
  .tablewrap > table.grid.fit-phone :is(td, th):first-child { padding-left: 6px !important; }
  .tablewrap > table.grid.fit-phone.heat td.num { font-size: 11.5px; }
  .tablewrap > table.grid.fit-phone thead th { font-size: 10.5px; letter-spacing: .02em; }
  .tablewrap > table.grid.fit-phone :is(select, input) { width: 100%; min-width: 0; max-width: 100%; }
  .tablewrap > table.grid.fit-phone :is(.btn, .status, .tag, .pill) { white-space: normal; min-width: 0; max-width: 100%; height: auto; }
  .tablewrap > table.grid.fit-phone :is(details, summary, .hint) { min-width: 0; max-width: 100%; white-space: normal; }
  .tablewrap > table.grid.fit-phone .sharebar { max-width: 100%; }
  .tablewrap > table.grid.fit-phone td.fit-cut { white-space: nowrap; }
}
@media (max-width: 700px) {
  .tablewrap > table.grid.fit-phone .btn { padding-left: 6px; padding-right: 6px; }
  .tablewrap > table.grid.fit-phone .status { white-space: normal !important; }
  .tablewrap > table.grid.fit-phone2 :is(td, th) { padding-left: 2px !important; padding-right: 2px !important; }
  .tablewrap > table.grid.fit-phone2 td:first-child { min-width: 0 !important; padding-left: 6px !important; }
  .tablewrap > table.grid.fit-phone2 :is(td.num, th) { font-size: 10px !important; letter-spacing: -.01em; }
}
@media (max-width: 700px) { .tablewrap > table.grid.fit-phone2 td.fit-cut { font-size: 9.5px !important; letter-spacing: -.02em; } }
@media (max-width: 700px) { .tablewrap > table.grid.fit-phone2 td.hc, .tablewrap > table.grid.fit-phone2 td.hc-all { border-width: 1px; padding-left: 1px !important; padding-right: 1px !important; } }
/* Board pack preview on narrow screens: each page shrinks to the width of the box (ux-extras sets --pk-zoom), so nothing runs off the side. */
@media (max-width: 900px) { .pack-preview .bp-page { zoom: var(--pk-zoom, .52); } }
@media (max-width: 700px) {
  /* Words break at a hyphen, never mid-word; buttons in table rows stay whole. */
  .tablewrap > table.grid.fit-phone :is(td, th) { overflow-wrap: break-word; hyphens: auto; }
  .tablewrap > table.grid.fit-phone td.one-line, .tablewrap > table.grid.fit-phone td.one-line > * { text-overflow: clip; overflow: visible; }
  .tablewrap > table.grid.fit-phone .btn.sm { padding-left: 4px; padding-right: 4px; font-size: 11.5px; gap: 3px; }
  .tablewrap > table.grid.fit-phone2 td:first-child { font-size: 12.5px; line-height: 1.3; }
}
@media (max-width: 700px) {
  .tablewrap > table.grid.fit-phone3:not(.heat) :is(td, th, td *, th *):not(svg, svg *) { font-size: var(--fit-fs, 12px) !important; }
  .tablewrap > table.grid.fit-phone3:not(.heat) thead th { font-size: min(10px, var(--fit-fs, 10px)) !important; }
}
@media (max-width: 700px) { .tablewrap.fit-bleed { margin-left: -12px; margin-right: -12px; width: auto; max-width: none; } .tablewrap.fit-bleed > table.grid :is(td, th):first-child { padding-left: 10px !important; } }
@media (max-width: 700px) { .tablewrap.fit-bleed > table.grid.fit-phone3 tbody td:first-child { overflow-wrap: anywhere !important; } }
@media (max-width: 700px) {
  .tablewrap > table.grid.fit-phone td > .muted { white-space: normal !important; }
  .tablewrap > table.grid.fit-phone3 td *:not(svg, svg *, .btn, .btn *) { white-space: normal !important; min-width: 0 !important; max-width: 100%; }
}
@media (max-width: 700px) {
  /* Headings, figures and buttons never break inside a word. */
  .tablewrap > table.grid.fit-phone :is(th, td.num, td.num *, .btn, .btn *) { overflow-wrap: normal !important; word-break: normal !important; hyphens: manual !important; }
  .tablewrap > table.grid.fit-phone :is(.btn, td.num.fit-cut) { white-space: nowrap !important; }
}
@media (max-width: 700px) {
  .tablewrap > table.grid.heat.fit-phone3 td:first-child { font-size: 11px !important; }
  .tablewrap > table.grid.heat.fit-phone3 thead th { font-size: 9px !important; letter-spacing: 0 !important; }
}
@media (max-width: 700px) { .tablewrap > table.grid.heat.fit-phone3 td.fit-cut { font-size: 8.5px !important; letter-spacing: -.03em; } }
@media (max-width: 700px) {
  .tablewrap > table.grid.fit-phone3:not(.heat) thead th { letter-spacing: 0 !important; font-size: min(9.5px, var(--fit-fs, 9.5px)) !important; }
  .tablewrap > table.grid.fit-phone3:not(.heat) tbody td:first-child { min-width: 56px !important; }
}
/* "More on this page" stays on one line; the list of what is inside is cut with … */
.more-fold > summary .sf-t { white-space: nowrap; flex: none; }
.more-fold > summary .sf-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Who owes it: self-pay / insurers / companies under the debt-age chart (22 Nov 2026) */
.debt-split { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line, #D8E3E6); }
.debt-split h4 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ink-2, #3B3264); }
.ds-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; }
.ds-seg { border: 0; padding: 0; min-width: 4px; cursor: pointer; }
.ds-seg:hover, .ds-seg:focus-visible { filter: brightness(1.1); outline: none; }
.ds-key { list-style: none; margin: 8px 0 0; padding: 0; }
.ds-key button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 4px; border: 0; background: none; color: inherit; font: inherit; font-size: 13px; cursor: pointer; border-radius: 6px; text-align: left; }
.ds-key button:hover:not(:disabled) { background: var(--hover, rgba(34, 26, 69, .05)); }
.ds-key button:disabled { cursor: default; opacity: .6; }
.ds-key i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.ds-key .ds-n { flex: 1; min-width: 0; }
.ds-key b { font-weight: 600; font-variant-numeric: tabular-nums; }
.ds-key .ds-p { width: 40px; text-align: right; color: var(--muted, #6B6560); font-variant-numeric: tabular-nums; }

/* Keyboard shortcuts list, in three groups (22 Nov 2026) */
.keys-box { max-height: 86vh; overflow: auto; width: min(760px, calc(100vw - 32px)); }
.keys-h { margin: 16px 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #6B6560); }
.keys-box h3 + .keys-h { margin-top: 8px; }
.keys-box .keys div span { min-width: 0; }
.keys-box kbd { white-space: nowrap; flex: none; }
@media (max-width: 600px) { .keys-box .keys { grid-template-columns: 1fr; } }

.merged-part { scroll-margin-top: 90px; }
