/* Homeostasis v3: dashboard-first. New components only; everything else inherits styles.css + v2.css. */

/* ---- Light browser frame: the dashboard is a light app, so its frame is too ---- */
.frame--light { background: #fff; box-shadow: 0 40px 80px -40px rgba(0,0,0,.35), 0 0 0 1px rgba(24,24,27,.08); }
.frame--light .frame-bar { background: var(--h-zinc-50); border-bottom: 1px solid var(--h-zinc-200); }
.frame--light .frame-bar i { background: var(--h-zinc-200); }
.frame--light .frame-bar span { color: var(--h-zinc-500); }
.frame img { display: block; width: 100%; }
.frame .stack-img + .stack-img { border-top: 1px solid var(--h-zinc-200); }

/* ---- Reveal: the dashboard on a dark scene, the phone that feeds it overlapping ---- */
.reveal-wrap { padding: 8px 8px 0; }
.reveal { position: relative; border-radius: var(--h-r-scene); overflow: hidden; background: var(--h-black); color: #fff; padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 72px) 0; isolation: isolate; }
.reveal::before { content: ""; position: absolute; inset: -20% -10% auto; height: 90%; z-index: -1; background: radial-gradient(60% 60% at 30% 40%, rgba(30,75,96,.55), transparent 70%), radial-gradient(50% 50% at 75% 30%, rgba(42,106,90,.4), transparent 70%); filter: blur(10px); }
.reveal .intro { margin-bottom: clamp(32px, 4vw, 56px); }
.reveal .intro .lede { color: rgba(255,255,255,.72); }
.reveal .eyebrow { font: var(--h-label); letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.reveal-stage { position: relative; max-width: 1120px; margin: 0 auto; }
.reveal-stage .frame { border-radius: 16px 16px 0 0; }
.reveal-stage .phone { position: absolute; left: clamp(-8px, -2vw, -40px); bottom: 32px; width: clamp(120px, 17vw, 220px); border-radius: 34px; box-shadow: 0 40px 80px -20px rgba(0,0,0,.8), inset 0 0 0 2px #2a2a2a; }
.reveal-stage .phone .phone-screen { border-radius: 26px; }
.reveal-tags { position: absolute; right: -28px; top: 46%; display: grid; gap: 10px; }
.reveal-tags span { background: rgba(24,24,27,.78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; font: 500 13px/1 var(--h-sans); padding: 10px 14px; border-radius: 999px; box-shadow: 0 12px 30px -10px rgba(0,0,0,.6); white-space: nowrap; }
@media (max-width: 860px) { .reveal-tags { display: none; } .reveal-stage .phone { left: 8px; bottom: 12px; width: 96px; border-radius: 20px; padding: 5px; } .reveal-stage .phone .phone-screen { border-radius: 16px; } }

/* ---- Dashboard rows: the clinic's view large, the app screen that feeds it inset ---- */
.drows { display: grid; gap: 16px; margin-top: 8px; }
.drow { background: var(--h-zinc-100); border-radius: var(--h-r-panel); padding: clamp(28px, 4vw, 56px); display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.4fr); gap: clamp(28px, 4vw, 56px); align-items: center; overflow: hidden; }
.drow.flip { grid-template-columns: minmax(0, 1.4fr) minmax(0, .85fr); }
.drow.flip .drow-media { order: -1; }
.drow .panel-copy { max-width: 42ch; }
.drow-media { position: relative; }
.drow-media.has-phone { padding-right: 96px; }
.drow-media .frame { border-radius: 14px; }
.drow-media .phone { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 124px; border-radius: 24px; padding: 5px; }
.drow-media .phone .phone-screen { border-radius: 20px; }
@media (max-width: 960px) {
  .drow, .drow.flip { grid-template-columns: 1fr; }
  .drow.flip .drow-media { order: 0; }
  .drow-media.has-phone { padding-right: 44px; }
  .drow-media .phone { width: 104px; border-radius: 20px; padding: 4px; }
  .drow-media .phone .phone-screen { border-radius: 16px; }
}

/* Two-up closing pair inside the dashboard section */
.dpair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dpair .drow { grid-template-columns: 1fr; align-content: start; }
.dpair .drow-media { padding-bottom: 0; }
@media (max-width: 960px) { .dpair { grid-template-columns: 1fr; } }

/* ---- Compare: the "after" column carries a real alert ---- */
.col--new .col-shot { margin-top: 6px; border-radius: 12px; overflow: hidden; box-shadow: 0 20px 40px -20px rgba(0,0,0,.8); }
.col--new .col-shot img { display: block; width: 100%; }

/* ---- White label: dashboard + phone instead of two phones ---- */
.brandit-media.combo { position: relative; padding: 0 0 40px 40px; justify-items: stretch; }
.brandit-media.combo .frame { border-radius: 12px; }
.brandit-media.combo .phone { position: absolute; left: 0; bottom: 0; width: 132px; border-radius: 26px; padding: 6px; }
.brandit-media.combo .phone .phone-screen { border-radius: 21px; }
@media (max-width: 860px) { .brandit-media.combo { padding: 0 0 24px 24px; } .brandit-media.combo .phone { width: 92px; border-radius: 18px; padding: 4px; } .brandit-media.combo .phone .phone-screen { border-radius: 14px; } }

/* Section-level eyebrow on light sections */
.kicker { font: var(--h-label); letter-spacing: .1em; text-transform: uppercase; color: var(--h-zinc-400); }

/* Phones: the dashboard crop alone. An inset phone at this width is taller than the frame
   it annotates and lands on the copy above it. */
@media (max-width: 600px) {
  .drow-media.has-phone { padding-right: 0; }
  .drow-media .phone { display: none; }
}

/* ---- Program cards: image, name, one line; each opens a modal ---- */
.programs--cards { grid-template-columns: repeat(4, 1fr); gap: 16px; }
.prog--card { font: inherit; color: inherit; text-align: left; background: #fff; cursor: pointer; padding: 0 0 18px; overflow: hidden; gap: 4px; }
.prog--card .prog-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--h-black); margin-bottom: 12px; }
.prog--card .prog-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--h-ease); }
.prog--card:hover .prog-img img { transform: scale(1.04); }
.prog--card > b, .prog--card > span:not(.prog-img) { padding: 0 18px; }
.prog--card:focus-visible { outline: 2px solid var(--h-ink); outline-offset: 2px; }
@media (max-width: 960px) { .programs--cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .programs--cards { grid-template-columns: 1fr; } }

/* ---- Program modal ---- */
.pmodal { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: var(--h-r-panel); overflow: auto; background: #fff; color: var(--h-ink); box-shadow: 0 40px 100px -30px rgba(0,0,0,.5); }
.pmodal::backdrop { background: rgba(10,10,10,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.pmodal[open] { animation: pm-in .25s var(--h-ease); }
@keyframes pm-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.pm-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(24,24,27,.6); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.pm-img { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; }
.pm-body { padding: clamp(22px, 4vw, 36px); display: grid; gap: 14px; }
.pm-body h3 { font: 500 clamp(22px, 2.6vw, 28px)/1.2 var(--h-sans); letter-spacing: -0.02em; }
.pm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 4px; }
.pm-cols h4 { margin: 0 0 8px; font: var(--h-label); letter-spacing: .08em; text-transform: uppercase; color: var(--h-zinc-400); }
.pm-cols ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 15px; color: var(--h-zinc-500); }
.pm-cols li { display: flex; gap: 10px; } .pm-cols li::before { content: "✓"; color: var(--h-ink); font-weight: 600; }
.pm-note { color: var(--h-zinc-500); }
.pm-cta { justify-self: start; margin-top: 6px; }
@media (max-width: 560px) { .pm-cols { grid-template-columns: 1fr; } .pm-cta { justify-self: stretch; } }
body.modal-open { overflow: hidden; }

/* ---- Getting started with photos ---- */
.timeline--img { grid-template-columns: repeat(3, 1fr); }
.timeline--img .tl { padding: 0 0 22px; overflow: hidden; }
.timeline--img .tl img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 10px; }
.timeline--img .tl > :not(img) { padding: 0 22px; }
@media (max-width: 1000px) { .timeline--img { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .timeline--img { grid-template-columns: 1fr; } }

/* ---- What's included with real screens ---- */
.modules--img .mod { padding: 0 0 24px; overflow: hidden; }
.modules--img .mod > :not(.mod-img) { padding: 0 24px; }
.mod-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--h-zinc-200); margin-bottom: 8px; position: relative; }
.mod-img--wide img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.mod-img--phone { display: grid; justify-items: center; padding-top: 22px; }
.mod-img--phone .phone { width: 150px; border-radius: 26px; padding: 6px; }
.mod-img--phone .phone-screen { border-radius: 21px; }

/* ---- White label, live: the visitor's name, colour and logo painted into two mocks ----
   Colours arrive as custom properties from js/brand-preview.js (a port of the app's palette). */
.brandit--live { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; }
.bp-form { display: grid; gap: 16px; margin-top: 6px; }
.bp-field { display: grid; gap: 8px; }
.bp-field > span { font: var(--h-label); letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.bp-field em { font-style: normal; text-transform: none; letter-spacing: 0; }
.bp-field input[type=text] { font: 500 16px var(--h-sans); padding: 13px 15px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #fff; width: 100%; max-width: 340px; }
.bp-field input[type=text]:focus { outline: 2px solid #fff; outline-offset: -1px; }
.bp-field input[type=file] { font-size: 14px; color: rgba(255,255,255,.7); max-width: 100%; }
.bp-field input[type=file]::file-selector-button { font: 500 14px var(--h-sans); padding: 9px 14px; margin-right: 12px; border: 0; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; }
.bp-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.bp-swatches button, .bp-custom { width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); padding: 0; }
.bp-swatches button[aria-checked=true] { box-shadow: 0 0 0 2px var(--h-black), 0 0 0 4px #fff; }
.bp-custom { position: relative; display: grid; place-items: center; background: conic-gradient(#f43f5e, #f59e0b, #22c55e, #06b6d4, #6366f1, #d946ef, #f43f5e); color: #fff; font: 600 16px/1 var(--h-sans); overflow: hidden; }
.bp-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.bp-custom span { text-shadow: 0 1px 3px rgba(0,0,0,.5); pointer-events: none; }
.bp-fine { font-size: 12.5px; color: rgba(255,255,255,.45); }

.bp-stage { position: relative; padding: 0 0 36px 56px; font-family: var(--h-sans); }
.bp-logo { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--l-accent); color: var(--l-on-accent); font: 700 9px/1 var(--h-sans); letter-spacing: .02em; background-size: contain; background-position: center; background-repeat: no-repeat; }
.bp-logo.has-img { background-color: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.bp-stage, .bp-stage * { transition: background-color .35s var(--h-ease), color .35s var(--h-ease), border-color .35s var(--h-ease); }

/* Dashboard mock */
.bp-dash { border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 40px 80px -30px rgba(0,0,0,.7); font-size: 11px; color: var(--l-text); }
.bp-dash-bar { display: flex; gap: 5px; padding: 8px 10px; background: var(--h-zinc-50); border-bottom: 1px solid var(--h-zinc-200); }
.bp-dash-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--h-zinc-200); }
.bp-dash-body { display: grid; grid-template-columns: 112px 1fr; min-height: 300px; }
.bp-rail { background: var(--l-rail); padding: 14px 8px; display: grid; align-content: start; gap: 4px; }
.bp-rail-item { display: flex; align-items: center; gap: 7px; padding: 7px 8px; border-radius: 7px; color: rgba(255,255,255,.62); font-weight: 500; }
.bp-rail-item b { width: 10px; height: 10px; border-radius: 3px; border: 1.5px solid currentColor; opacity: .8; }
.bp-rail-item em { margin-left: auto; font-style: normal; font-size: 10px; background: var(--l-accent); color: var(--l-on-accent); border-radius: 999px; padding: 1px 6px; }
.bp-rail-item.on { background: rgba(255,255,255,.1); color: #fff; }
.bp-main { background: var(--l-bg); padding: 14px 16px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.bp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.bp-h1 { font: 600 17px/1.1 var(--h-sans); letter-spacing: -.02em; }
.bp-sub { color: var(--l-text2); margin-top: 3px; }
.bp-lockup { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.bp-stats { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border: 1px solid var(--l-border); border-radius: 8px; }
.bp-stats div { padding: 9px 10px; display: grid; gap: 2px; } .bp-stats div + div { border-left: 1px solid var(--l-border); }
.bp-stats b { font: 600 16px/1 var(--h-sans); } .bp-stats b.acc { color: var(--l-accent); } .bp-stats span { color: var(--l-text2); font-size: 10px; }
.bp-card { background: #fff; border: 1px solid var(--l-border); border-radius: 8px; overflow: hidden; }
.bp-card-h { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; font-weight: 600; border-bottom: 1px solid var(--l-border); }
.bp-pill { font-weight: 500; font-size: 10px; background: var(--l-accent-dim); color: var(--l-accent); border-radius: 999px; padding: 3px 8px; }
.bp-row { display: grid; grid-template-columns: 90px 78px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--l-border); }
.bp-row:first-of-type { border-top: 0; }
.bp-row span { color: var(--l-text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-row .bp-btn { color: var(--l-on-accent); background: var(--l-accent); border-radius: 999px; padding: 4px 10px; font-weight: 600; font-size: 10px; }

/* App mock (dark) */
.bp-phone { position: absolute; left: 0; bottom: 0; width: 196px; aspect-ratio: 300 / 624; border-radius: 34px; background: #0d0d0d; padding: 7px; box-shadow: 0 40px 80px -20px rgba(0,0,0,.85), inset 0 0 0 2px #2a2a2a; }
.bp-screen { height: 100%; border-radius: 28px; overflow: hidden; background: linear-gradient(180deg, var(--l-bg), var(--l-bg) 38%); color: #F5F5F5; padding: 10px 10px 0; display: flex; flex-direction: column; gap: 7px; font-size: 9px; position: relative; }
.bp-status { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 8.5px; padding: 0 6px; }
.bp-island { width: 52px; height: 15px; border-radius: 10px; background: #000; }
.bp-hello { display: flex; justify-content: space-between; align-items: center; font-size: 12px; line-height: 1.2; color: var(--l-text2); margin: 4px 2px 2px; }
.bp-hello b { color: #F5F5F5; font-weight: 600; }
.bp-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--l-elev); display: grid; place-items: center; font-size: 8px; font-weight: 700; color: #F5F5F5; }
.bp-tcard { background: #fff; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 8px 9px; display: grid; gap: 6px; }
.bp-label { display: flex; justify-content: space-between; font-weight: 600; font-size: 9px; } .bp-label span { color: var(--l-muted); font-weight: 500; }
.bp-trow { display: flex; gap: 8px; align-items: center; } .bp-trow b { display: block; font-size: 10px; } .bp-trow small { color: var(--l-muted); font-size: 8px; }
.bp-dot { width: 22px; height: 22px; border-radius: 7px; background: var(--l-elev); box-shadow: inset 0 0 0 5px var(--l-elev), inset 0 0 0 20px var(--l-accent); flex: none; }
.bp-bar { height: 4px; border-radius: 4px; background: var(--l-track); overflow: hidden; } .bp-bar i { display: block; height: 100%; background: var(--l-accent); border-radius: 4px; }
.bp-check { display: flex; align-items: center; gap: 6px; color: var(--l-text2); }
.bp-check::before { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--l-muted); flex: none; }
.bp-check.on::before { background: var(--l-accent); border-color: var(--l-accent); }
.bp-care { grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
.bp-care small { display: block; color: var(--l-muted); font-size: 8px; } .bp-care b { font-size: 10px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-logo--tile { width: 26px; height: 26px; border-radius: 8px; background: var(--l-accent); color: var(--l-on-accent); font-size: 9px; }
.bp-msg { background: var(--l-accent); color: var(--l-on-accent); border-radius: 999px; padding: 4px 8px; font-weight: 600; font-size: 8.5px; }
.bp-nav { margin-top: auto; display: flex; align-items: center; justify-content: space-around; padding: 9px 8px 14px; background: #fff; margin-left: -10px; margin-right: -10px; border-top: 1px solid rgba(255,255,255,.06); }
.bp-nav i { width: 12px; height: 12px; border-radius: 4px; border: 1.5px solid var(--l-muted); } .bp-nav i:first-child { border-color: var(--l-accent); background: var(--l-accent); }
.bp-plus { width: 22px; height: 22px; border-radius: 50%; background: var(--l-accent); color: var(--l-on-accent); display: grid; place-items: center; font-weight: 600; font-size: 14px; }

@media (max-width: 960px) {
  .brandit--live { grid-template-columns: 1fr; }
  .bp-stage { padding: 0 0 24px 40px; }
}
@media (max-width: 600px) {
  .bp-stage { padding: 0 0 140px 0; }
  .bp-dash-body { grid-template-columns: 1fr; } .bp-rail { display: none; }
  .bp-row { grid-template-columns: 1fr auto; } .bp-row > span:nth-child(2), .bp-row .bp-grow { display: none; }
  .bp-phone { width: 150px; left: auto; right: 8px; }
  .bp-screen { font-size: 7px; }
}

/* Layout fixes: phone hangs off the dashboard's right edge so the rail stays visible;
   the tile keeps the logo contained (the `background` shorthand above reset its size). */
.bp-stage { padding: 0 128px 72px 0; }
.bp-phone { left: auto; right: 0; bottom: 0; }
.bp-logo--tile { background-size: contain; background-position: center; background-repeat: no-repeat; }
.bp-care > div { min-width: 0; }
.bp-care { gap: 6px; padding-right: 7px; }
@media (max-width: 960px) { .bp-stage { padding: 0 100px 56px 0; } }
@media (max-width: 600px) { .bp-stage { padding: 0 0 150px 0; } .bp-phone { right: 8px; } }
.bp-stage { padding-right: 176px; }
.bp-head { display: grid; gap: 0; justify-content: start; }
.bp-lockup { max-width: 100%; margin-bottom: 10px; }
.bp-care b { white-space: normal; line-height: 1.2; }
@media (max-width: 960px) { .bp-stage { padding-right: 150px; } }
@media (max-width: 600px) { .bp-stage { padding-right: 0; } }

/* What's included: cards are buttons that open the shared modal */
button.mod { font: inherit; color: inherit; text-align: left; border: 0; cursor: pointer; width: 100%; }
button.mod:focus-visible { outline: 2px solid var(--h-ink); outline-offset: 2px; }
.modules--img .mod .more { font: 500 13px var(--h-sans); color: var(--h-ink); margin-top: 4px; }
.pm-img--shot { object-fit: cover; object-position: left top; background: var(--h-zinc-100); }
.pm-img--phone { display: grid; justify-items: center; align-items: start; padding-top: 28px; background: var(--h-zinc-100); overflow: hidden; }
.pm-img--phone .phone { width: 200px; }
.pm-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 15px; color: var(--h-zinc-500); }
.pm-list li { display: flex; gap: 10px; } .pm-list li::before { content: "✓"; color: var(--h-ink); font-weight: 600; }

/* In-page links land below the floating nav, not under it. */
section[id], div[id="patient"] { scroll-margin-top: 88px; }

/* App mock in light mode, on the app's light palette. No gradient: the colour sits on the
   things that carry it in the real app — the dose ring, progress bars, checks, buttons. */
.bp-rail-item em { background: var(--l-accent); color: var(--l-on-accent); }
.bp-screen { background: var(--l-bg); color: var(--l-text); gap: 6px; }
.bp-status { color: var(--l-text); }
.bp-hello { color: var(--l-text2); } .bp-hello b { color: var(--l-text); }
.bp-avatar { background: var(--l-elev); color: var(--l-text); }
.bp-tcard { background: #fff; border: 1px solid var(--l-border); box-shadow: 0 1px 2px rgba(0,0,0,.04); gap: 5px; }
.bp-label span, .bp-trow small, .bp-care small { color: var(--l-muted); }
.bp-treat { grid-template-columns: auto 1fr; align-items: center; gap: 9px; }
.bp-treat b { display: block; font-size: 10px; margin-top: 2px; } .bp-treat small { color: var(--l-muted); font-size: 8px; }
.bp-ring { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--l-accent) calc(var(--p) * 360deg), var(--l-track) 0); position: relative; }
.bp-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #fff; }
.bp-ring span { position: relative; font: 700 11px/1 var(--h-sans); color: var(--l-text); text-align: center; }
.bp-ring small { display: block; font: 500 6.5px/1.2 var(--h-sans); color: var(--l-muted); }
.bp-nut { display: grid; grid-template-columns: 34px 1fr 30px; align-items: center; gap: 6px; font-size: 8.5px; color: var(--l-text2); }
.bp-nut em { font-style: normal; text-align: right; color: var(--l-text); font-weight: 600; }
.bp-bar { background: var(--l-track); height: 5px; } .bp-bar i { background: var(--l-accent); }
.bp-nut:nth-child(3) .bp-bar i { opacity: .7; } .bp-nut:nth-child(4) .bp-bar i { opacity: .45; }
.bp-check { color: var(--l-text2); } .bp-check::before { border-color: var(--l-muted); }
.bp-check.on::before { background: var(--l-accent); border-color: var(--l-accent); }
.bp-logo--tile { background-color: var(--l-accent); color: var(--l-on-accent); }
.bp-msg, .bp-plus { background: var(--l-accent); color: var(--l-on-accent); }
.bp-nav { background: #fff; border-top: 1px solid var(--l-border); }
.bp-nav i { border-color: var(--l-muted); } .bp-nav i:first-child { border-color: var(--l-accent); background: var(--l-accent); }
.bp-island { background: #000; }
.bp-care small { white-space: nowrap; }
.bp-care b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bp-msg { padding: 4px 7px; font-size: 8px; }

.pm-img--center { object-position: center; }
.pm-img--center { object-fit: contain; background: #E4E4E7; }

/* ---- Logo-driven brand preview ---- */
.bp-upload { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bp-upload-btn { position: relative; display: inline-flex; align-items: center; padding: 12px 18px; border-radius: 999px; background: #fff; color: var(--h-ink); font: 500 15px/1 var(--h-sans); cursor: pointer; }
.bp-upload-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.bp-upload-btn:focus-within { outline: 2px solid #fff; outline-offset: 3px; }
.bp-clear { font: 500 15px/1 var(--h-sans); padding: 12px 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: transparent; color: #fff; cursor: pointer; }
.bp-clear:hover { background: rgba(255,255,255,.08); }
.bp-colors { display: flex; gap: 10px; flex-wrap: wrap; }
.bp-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 7px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); font-size: 13px; color: rgba(255,255,255,.8); }
.bp-chip i { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); background: repeating-linear-gradient(45deg, rgba(255,255,255,.12) 0 3px, transparent 3px 6px); }
.bp-chip b { font-weight: 500; } .bp-chip code { font: 12px var(--h-mono); color: rgba(255,255,255,.5); }
.bp-colors.is-empty { opacity: .5; }
.bp-note { font-size: 13px; color: rgba(255,255,255,.55); min-height: 1em; }

/* Logos: the square version is already padded and centred, so it fills its tile. A logo
   without its own background sits on a white plate, as ClinicLogoTile does in the app. */
.bp-logo.has-img { background-color: #fff; background-size: 100% 100%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.bp-lockup .bp-logo.has-img { background-color: transparent; background-size: contain; box-shadow: none; border-radius: 0; }
.bp-logo.has-img.on-solid { box-shadow: none; }

/* Secondary colour: the second accent spots. Falls back to the primary when there is none. */
.bp-rail-item em { background: var(--l-second); color: var(--l-on-second); }
.bp-pill { background: var(--l-second-dim); color: var(--l-text); }
.bp-stats div:nth-child(4) b.acc { color: var(--l-second); }
.bp-nut:nth-child(3) .bp-bar i { background: var(--l-second); opacity: 1; }
.bp-avatar { background: var(--l-second-dim); }

/* Ask AI: five assistant buttons in the footer. Each opens the assistant with "tell me about <this page>". */
.ask-ai { display: grid; gap: 12px; margin-top: 8px; }
.ask-ai-label { font-size: 14px; color: var(--h-ink); margin: 0; }
.ask-ai-logos { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-ai-logo { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 12px; background: var(--h-zinc-50); border: 1px solid transparent; border-radius: 12px; box-shadow: -1px -1px 2px rgba(0,0,0,.1); color: var(--h-ink); transition: opacity var(--h-fast) var(--h-ease), border-color var(--h-fast) var(--h-ease); }
.ask-ai-logo svg { width: 100%; height: 100%; fill: currentColor; opacity: .5; }
.ask-ai-logo:hover { opacity: .6; }
.ask-ai-logo:focus-visible { outline: none; border-color: var(--h-ink); }
