/* Petal design system — CSS variables, light + dark, small component set.
   No framework, no build step. Tune tokens here; components inherit. */

:root {
  /* brand */
  --petal:        #d1477a;   /* petal pink */
  --petal-soft:   #f7d9e6;
  --accent:       #2f7d6b;   /* money green */
  --warn:         #c9772b;
  --danger:       #c8402f;
  --good:         #2f7d6b;

  /* neutrals (light) */
  --bg:           #f6f5f4;
  --surface:      #ffffff;
  --surface-2:    #f0eeec;
  --border:       #e2ded9;
  --text:         #23201e;
  --text-dim:     #6b6560;
  --text-faint:   #9a938c;

  /* spacing scale */
  --sp-xs: 4px;  --sp-sm: 8px;  --sp-md: 16px;  --sp-lg: 24px;  --sp-xl: 40px;

  /* type */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --fs-title: 22px; --fs-head: 16px; --fs-body: 14px; --fs-cap: 12px;

  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
  --sidebar-w: 216px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:         #1a1817;
    --surface:    #242120;
    --surface-2:  #2d2a28;
    --border:     #38332f;
    --text:       #f0ece8;
    --text-dim:   #a89f98;
    --text-faint: #756c65;
    --petal-soft: #4a2536;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: var(--fs-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* The `hidden` attribute must win over any display rule below. Without this a
   flex/grid element (the share menu, the subtab row) stays visible with
   hidden=true: the UA's [hidden]{display:none} loses to a class's display. */
[hidden] { display: none !important; }

/* --- app shell --- */
#app { display: flex; height: 100vh; overflow: hidden; }

#sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: var(--sp-md) var(--sp-sm);
  gap: 2px;
}
.brand {
  display: flex; align-items: center; gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-sm) var(--sp-md);
  font-weight: 650; font-size: var(--fs-head);
}
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--petal); }

.nav-item {
  display: flex; align-items: center; gap: var(--sp-sm);
  padding: 9px var(--sp-sm); border-radius: var(--radius-sm);
  color: var(--text-dim); cursor: pointer; user-select: none;
  border: none; background: none; width: 100%; text-align: left;
  font-size: var(--fs-body); font-family: var(--font);
}
.nav-item:hover { background: var(--border); color: var(--text); }
/* Setup is an <a>, not a <button>, because it leaves the SPA for a
   server-rendered page. Without this it arrives underlined and link-coloured. */
a.nav-item { text-decoration: none; }
.nav-item.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.nav-item .ico { width: 18px; text-align: center; }
/* A link that leaves the app should not look like a tab inside it. */
.nav-item.external { color: var(--muted); }
.nav-item.external .out { margin-left: auto; opacity: .5; font-size: 11px; }
.nav-item.external:hover .out { opacity: 1; }
.nav-spacer { flex: 1; }

#content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
/* min-width: 0 so a page whose content is wider than the window (the access
   grid with a column per person) scrolls inside its own box instead of
   widening the page and centring .view somewhere off to the right. */
#main { flex: 1; overflow-y: auto; min-width: 0; }
/* The pages of the active sidebar group, as a pill row across the top. */
#subnav {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 10px var(--sp-xl) 0; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.subtab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px 9px; margin-bottom: -1px;
  border: none; border-bottom: 2px solid transparent; background: none;
  color: var(--text-dim); cursor: pointer; user-select: none;
  font-size: var(--fs-body); font-family: var(--font); text-decoration: none;
}
.subtab:hover { color: var(--text); }
.subtab.active { color: var(--text); font-weight: 600; border-bottom-color: var(--petal); }
.subtab.external { color: var(--muted); }
.subtab .out { opacity: .5; font-size: 11px; }
.subtab:hover .out { opacity: 1; }
.subtab.dim { color: var(--text-faint); }
.view { padding: var(--sp-lg) var(--sp-xl); max-width: 1100px; margin: 0 auto; }
.view-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--sp-lg); gap: var(--sp-md); }
.view-head h1 { font-size: var(--fs-title); font-weight: 680; margin: 0; }
.view-head .sub { color: var(--text-dim); font-size: var(--fs-cap); }

/* --- components --- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--sp-lg); box-shadow: var(--shadow);
  margin-bottom: var(--sp-md);
}
.card h2 { font-size: var(--fs-head); margin: 0 0 var(--sp-md); }

.btn {
  font-family: var(--font); font-size: var(--fs-body); font-weight: 550;
  padding: 8px 14px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--petal); border-color: var(--petal); color: #fff; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-dim); }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px; font-size: var(--fs-cap);
  background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--border);
}
.chip.active   { background: var(--text); color: var(--surface); border-color: var(--text); }
.chip.active .dim { color: inherit; opacity: .75; }
.chip.asset    { color: var(--good);  border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.chip.liability{ color: var(--danger);border-color: color-mix(in srgb, var(--danger) 40%, transparent); }

.empty {
  text-align: center; color: var(--text-dim);
  padding: var(--sp-xl); border: 1px dashed var(--border); border-radius: var(--radius);
}
.empty .big { font-size: 34px; margin-bottom: var(--sp-sm); }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.dim  { color: var(--text-dim); }
.row  { display: flex; align-items: center; gap: var(--sp-sm); }

/* --- finance grid --- */
.grid-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.grid { border-collapse: collapse; width: 100%; font-size: var(--fs-body); }
table.grid th, table.grid td { padding: 7px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); }
table.grid thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 2; font-weight: 600; color: var(--text-dim); }
table.grid thead th .date { font-size: var(--fs-cap); font-weight: 500; }
table.grid .metric-col { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 210px; }
table.grid thead .metric-col { z-index: 3; background: var(--surface-2); }
table.grid tr.group-row td { background: var(--surface-2); font-weight: 650; color: var(--text); text-align: left; position: sticky; left: 0; }
table.grid td.val { font-family: var(--mono); font-variant-numeric: tabular-nums; cursor: text; }
table.grid td.val.computed { cursor: default; color: var(--text-dim); background: color-mix(in srgb, var(--accent) 6%, transparent); }
table.grid td.val.current { font-weight: 650; }
table.grid td.val.hit  { color: var(--good); }
table.grid td.val.miss { color: var(--danger); }
table.grid td.val:hover:not(.computed) { background: var(--petal-soft); }
table.grid td.val input { width: 92px; font: inherit; text-align: right; border: 1px solid var(--petal); border-radius: 6px; padding: 3px 5px; background: var(--surface); color: var(--text); }
.metric-name { display: flex; flex-direction: column; gap: 2px; }
.metric-name .n { font-weight: 550; }
.metric-name .meta { font-size: 11px; color: var(--text-faint); display: flex; gap: 6px; align-items: center; }
.metric-name .del { opacity: 0; cursor: pointer; color: var(--text-faint); }
table.grid tr:hover .metric-name .del { opacity: 1; }
.spark { width: 74px; height: 22px; }
.spark path { fill: none; stroke: var(--petal); stroke-width: 1.5; }
.spark .dot { fill: var(--petal); }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; z-index: 60; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-lg); width: 420px; max-width: 92vw; box-shadow: var(--shadow); }
.modal h2 { margin: 0 0 var(--sp-md); }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: var(--sp-md); }
.field label { font-size: var(--fs-cap); color: var(--text-dim); }
.field input, .field select, .field textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.field.row2 { flex-direction: row; gap: var(--sp-sm); align-items: flex-start; }
.field textarea.autogrow { width: 100%; max-width: 100%; resize: none; overflow: hidden; min-height: 0; }
.field.row2 > div { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.modal-actions { display: flex; justify-content: flex-end; gap: var(--sp-sm); margin-top: var(--sp-sm); }

/* action items + notes */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-md); align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.action { display: flex; align-items: flex-start; gap: var(--sp-sm); padding: 8px 0; border-bottom: 1px solid var(--border); }
.action.done .txt { text-decoration: line-through; color: var(--text-faint); }
.action .txt { flex: 1; }
.action .box { cursor: pointer; width: 18px; height: 18px; border: 1.5px solid var(--border); border-radius: 5px; flex: 0 0 auto; margin-top: 1px; text-align: center; line-height: 15px; }
.action.done .box { background: var(--good); border-color: var(--good); color: #fff; }
.notes-area { width: 100%; min-height: 120px; resize: vertical; }

/* delivery map */
.deliv-map path:hover { stroke: var(--text); stroke-width: 1.3; }
.map-tip {
  position: absolute; pointer-events: none; display: none; z-index: 5;
  background: var(--text); color: var(--bg); font-size: 12px; font-weight: 600;
  padding: 4px 8px; border-radius: 6px; white-space: nowrap; box-shadow: var(--shadow);
}

/* toast */
#toast {
  position: fixed; bottom: var(--sp-lg); left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px;
  font-size: var(--fs-body); box-shadow: var(--shadow); opacity: 0; transition: all .25s ease;
  pointer-events: none; z-index: 50;
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* --- Initiatives board ------------------------------------------------------ */
.lanes { display: flex; gap: var(--sp-md); align-items: flex-start; }
.lane { flex: 1 1 0; min-width: 0; }
.lane-head { display: flex; justify-content: space-between; align-items: baseline;
  margin: 0 2px 10px; font-weight: 600; color: var(--text-dim); font-size: 13px; }
.lane-head .n { background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: 0 7px; font-size: 11px; color: var(--text-faint); }
.init-card { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px;
  cursor: pointer; box-shadow: var(--shadow); transition: border-color .15s ease; }
.init-card:hover { border-color: color-mix(in srgb, var(--petal) 45%, var(--border)); }
.init-card .t { font-weight: 600; font-size: 14px; line-height: 1.3; }
.init-card .meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 7px; }
.lane-empty { border: 1px dashed var(--border); border-radius: var(--radius-sm);
  padding: 14px; text-align: center; color: var(--text-faint); font-size: 12px; }
.cdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.ie { font-size: 11px; color: var(--text-faint); }
.ie b { color: var(--text-dim); font-weight: 600; }
@media (max-width: 860px) { .lanes { flex-direction: column; } }

/* A number that is blank because its module has not moved over yet. Warm rather
   than red: nothing is broken, something is simply not here. */
.provider-gap {
  border-left: 3px solid #c9a227;
  background: #fdfaf0;
}
.provider-gap ul { padding: 0; }
.provider-gap li { font-size: 13px; color: #5b5347; }


/* --- catalog --- */
.cat-group { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: var(--sp-sm);
  overflow: hidden; }
.cat-group > summary { list-style: none; cursor: pointer; padding: 12px var(--sp-lg);
  display: flex; align-items: baseline; gap: var(--sp-md); user-select: none; }
.cat-group > summary::-webkit-details-marker { display: none; }
.cat-group > summary::before { content: ""; width: 6px; height: 6px; flex: none;
  align-self: center; border-right: 1.5px solid var(--text-faint);
  border-bottom: 1.5px solid var(--text-faint); transform: rotate(-45deg);
  transition: transform .15s ease; }
.cat-group[open] > summary::before { transform: rotate(45deg); }
.cat-group > summary:hover { background: var(--surface-2); }
.cg-name { font-weight: 620; }
.cg-meta { color: var(--text-dim); font-size: var(--fs-cap); margin-left: auto; }
.cat-body { padding: 0 var(--sp-lg) var(--sp-md); }
.cat-row { display: grid; grid-template-columns: 1fr 70px 90px 210px;
  gap: var(--sp-md); align-items: center; padding: 8px 0;
  border-top: 1px solid var(--border); }
.cat-row.cat-head { border-top: none; font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-faint); padding-bottom: 4px; }
/* A product nobody has bought is still a product; it just should not shout. */
.cat-row.unsold .cat-name b { color: var(--text-dim); font-weight: 500; }
.cat-name b { display: block; font-weight: 550; }
.cat-name span { display: block; font-size: 11.5px; color: var(--text-faint);
  min-height: 1em; }
.cat-num { font-family: var(--mono); font-variant-numeric: tabular-nums;
  text-align: right; font-size: 13px; }
select.cat-pick { font: inherit; font-size: 12.5px; padding: 5px 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); width: 100%; }
select.cat-pick:disabled { opacity: .5; }
@media (max-width: 720px) {
  .cat-row { grid-template-columns: 1fr 60px 80px; }
  select.cat-pick { grid-column: 1 / -1; }
}

/* --- sales: what sells --- */
.sells-head, .sells-row { display: grid;
  grid-template-columns: minmax(120px, 1.4fr) 2fr 84px 48px 64px;
  gap: var(--sp-md); align-items: center; }
.sells-head { font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-faint); padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.sells-row { padding: 7px 0; border-bottom: 1px solid var(--border); }
.sells-row:last-of-type { border-bottom: none; }
.sells-name { font-size: 13.5px; }
.sells-bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.sells-bar span { display: block; height: 100%; background: var(--petal); border-radius: 999px; }
.sells-num, .sells-pct { font-family: var(--mono); font-variant-numeric: tabular-nums;
  text-align: right; font-size: 13px; }
.sells-pct { color: var(--text-dim); }
@media (max-width: 720px) {
  .sells-head, .sells-row { grid-template-columns: 1fr 74px 44px; }
  .sells-bar { display: none; }
}

/* A number that is probably an artefact, said so on the spot. */
.banner-warn { background: color-mix(in srgb, var(--warn) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
  border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 12px;
  font-size: 13px; line-height: 1.5; }

/* --- sales: size & colour --- */
.sells-sub { font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 5px; }
.tier-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden;
  background: var(--surface-2); }
.tier-bar span { display: block; height: 100%; }
.tier-key { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px;
  font-size: 12px; color: var(--text-dim); }
.tier-key span { display: inline-flex; align-items: center; gap: 5px; }
.tier-key i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
/* A row that opens should look like one before it is clicked. */
tr.prod-row { cursor: pointer; }
tr.prod-row:hover td { background: var(--surface-2); }
tr.prod-row.is-open td { font-weight: 600; }
tr.variant-row td { background: var(--surface-2); }
.variant-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2px 20px; padding: 4px 0; }
.variant-line { display: grid; grid-template-columns: 1fr 74px 44px; gap: 10px;
  font-size: 12.5px; color: var(--text-dim); }

/* --- sales: revenue per day --- */
.daily-svg { width: 100%; height: auto; display: block; }
.daily-big { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums;
  letter-spacing: -.01em; }

/* --- sales: trends --- */
.sells-head, .sells-row { grid-template-columns:
  minmax(110px, 1.3fr) 80px 84px 58px 62px 60px; }
.sells-spark { display: flex; align-items: center; }
svg.spark { width: 74px; height: 22px; }
svg.spark path { fill: none; stroke: var(--petal); stroke-width: 1.4; }
svg.spark .dot { fill: var(--petal); }
.spark-empty { display: block; width: 74px; height: 22px; }
.share-move { font-style: normal; font-size: 9px; margin-left: 3px; }
.movers { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px;
  color: var(--text-dim); margin-bottom: 12px; }
.movers b { color: var(--text); font-weight: 600; }
.btn.sm { font-size: 12.5px; padding: 5px 10px; }
@media (max-width: 860px) {
  .sells-head, .sells-row { grid-template-columns: 1fr 78px 56px 58px; }
  .sells-spark { display: none; }
}

/* --- sales: varieties --- */
.facets { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-lg); margin-top: var(--sp-md); }
.facet-col { min-width: 0; }
.facet-row { display: grid; grid-template-columns: 1fr 74px 78px 56px 58px;
  gap: 10px; align-items: center; padding: 6px 0;
  border-top: 1px solid var(--border); }
.facet-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
/* A row that opens should look like one before it is clicked. */
.sells-row.can-open { cursor: pointer; }
.sells-row.can-open:hover { background: var(--surface-2); }
.sells-row.can-open.is-open .sells-name { font-weight: 650; }
.cat-detail { background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 10px 14px; margin: 2px 0 8px; }
.cat-detail .facets { margin-top: 0; gap: var(--sp-md); }

/* A qualifier only appears on names that actually repeat. */
.qualifier { font-size: 11px; color: var(--text-faint); margin-left: 6px;
  padding: 1px 6px; border: 1px solid var(--border); border-radius: 999px;
  white-space: nowrap; font-weight: 400; }

/* ── charts: hover readout ────────────────────────────────────────────────── */
.chart-wrap { position: relative; }
.chart-wrap .daily-svg, .chart-wrap .cal-svg { display: block; width: 100%; height: auto; }
.chart-tip {
  display: none; position: absolute; top: 8px; z-index: 4; pointer-events: none;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 10px; min-width: 168px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .13); font-size: 12px;
}
.chart-tip .tip-head { font-weight: 600; margin-bottom: 2px; }
.chart-tip .tip-sub { color: var(--text-faint); font-size: 11px; margin-bottom: 6px; }
.chart-tip .tip-row {
  display: flex; justify-content: space-between; gap: 14px; line-height: 1.7;
  font-variant-numeric: tabular-nums;
}
.chart-tip .tip-row > span:first-child { color: var(--text-dim); }
.chart-tip .up { color: var(--good); }
.chart-tip .down { color: var(--danger); }
/* A hairline under the pointer: the tooltip says which day, this shows it. */
.chart-cursor {
  display: none; position: absolute; top: 0; bottom: 16px; width: 1px;
  background: var(--text-faint); opacity: .45; pointer-events: none;
}
.chart-title { font-size: 13px; font-weight: 600; margin: 0 0 2px; }
.chart-note {
  color: var(--text-faint); font-size: 12px; line-height: 1.5; margin: 0 0 8px;
  max-width: 68ch;
}

/* ── one category, in detail ──────────────────────────────────────────────── */
.cat-panel { display: flex; flex-direction: column; gap: 16px; }
.panel-big { font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; }
.pts { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pts.up { color: var(--good); }
.pts.down { color: var(--danger); }

/* Findings: the answer, before the evidence for it. */
.findings { display: flex; flex-direction: column; gap: 2px; }
.finding {
  display: flex; gap: 10px; align-items: baseline; padding: 8px 10px;
  border-left: 2px solid var(--petal); background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 13.5px;
}
.finding-kind {
  flex: none; width: 62px; font-size: 10px; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-faint); padding-top: 2px;
}
.finding-detail { color: var(--text-dim); font-size: 12px; margin-top: 2px; }

.facet-grid {
  display: grid; gap: 14px;
  /* Wide, deliberately. Five fixed numeric columns leave a facet card under
     ~380px with barely fifty pixels for the name, and "Designer's Choice
     (Monthly Color Palette)" arrives as "D". Two columns only where both
     halves can still be read. */
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
}
.facet { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.facet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.facet-head h4 { margin: 0; font-size: 13px; }
.facet-cover, .facet-more { font-size: 11px; color: var(--text-faint); }
.facet-more { padding: 4px 0 0; }
.facet-note { color: var(--text-faint); font-size: 11.5px; margin: 2px 0 8px; }

/* Name | share | net | avg | vs LY. The bar is painted behind the row, so the
   distribution reads at a glance without spending a column on it. */
.facet-cols, .facet-row {
  display: grid; grid-template-columns: 1fr 44px 62px 52px 56px;
  gap: 6px; align-items: center; font-variant-numeric: tabular-nums;
}
.facet-cols { font-size: 10.5px; color: var(--text-faint); text-transform: uppercase;
  letter-spacing: .04em; padding-bottom: 3px; border-bottom: 1px solid var(--border); }
.facet-cols span:not(:first-child), .facet-val { text-align: right; }
.facet-row { position: relative; padding: 5px 0; font-size: 12.5px; }
.facet-row::before {
  content: ''; position: absolute; left: 0; bottom: 1px; height: 2px;
  width: var(--fill); background: var(--petal); opacity: .3; border-radius: 1px;
}
.facet-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facet-skew {
  font-size: 10px; margin-left: 6px; padding: 1px 5px; border-radius: 999px;
  background: var(--petal-soft); color: var(--petal); white-space: nowrap;
}
.facet-val.dim { color: var(--text-dim); }

.detail-fold > summary {
  cursor: pointer; font-size: 12.5px; color: var(--text-dim); padding: 4px 0;
}

/* ── people & access ──────────────────────────────────────────────────────── */
/* One row per surface, one column per person. The surface column is wide
   because the note under each label is the part that stops a switch being
   flipped on a guess. */
/* The grid is as wide as its people and scrolls sideways inside .access-scroll;
   `contain: inline-size` keeps that width from leaking up into the card, the
   view and the page (the page used to centre around the grid's width, leaving
   the left half of a wide window blank - Amir, 9 Sep 2026). */
.access-card { min-width: 0; }
.access-scroll { overflow-x: auto; max-width: 100%; contain: inline-size; }
.access-grid {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(120px, max-content);
  grid-template-columns: minmax(260px, 380px); gap: 0 6px; width: max-content; min-width: 100%;
}
/* A heading row per sidebar group (Clients · Shop · Studio · Money · Insights ·
   Admin); every person's column carries a spacer of the same height so the
   switches stay beside their labels. */
.surface-group, .grant-gap { height: 30px; }
.surface-group {
  display: flex; align-items: flex-end; padding-bottom: 4px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-dim); border-bottom: 1px solid var(--border);
}
.grant-gap { border-bottom: 1px solid var(--border); }
.surface-head, .person-head {
  height: 52px; display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
  font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-faint);
}
.person-head { align-items: center; gap: 4px; }
.person-name {
  font-size: 12.5px; text-transform: none; letter-spacing: 0; color: var(--text);
  font-weight: 600; white-space: nowrap;
}
.person-role { font-size: 11px; padding: 1px 4px; }
.surface-row { height: 44px; display: flex; flex-direction: column; justify-content: center; }
.surface-label { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.surface-note { font-size: 11px; color: var(--text-faint); line-height: 1.3; }
.surface-kind {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em;
  padding: 1px 5px; border-radius: 3px; background: var(--surface-2);
  color: var(--text-faint); flex: none; width: 48px; text-align: center;
}
.surface-kind.sec { background: var(--petal-soft); color: var(--petal); }
.person-cells { display: flex; flex-direction: column; }
.grant {
  height: 44px; width: 100%; border: 0; background: none; cursor: pointer;
  font-size: 14px; color: var(--text-faint); border-radius: var(--radius-sm);
}
.grant:hover { background: var(--surface-2); }
/* An inherited yes must not look like a decision somebody made about this
   person — that is the difference the whole page turns on. */
.grant.inherited { opacity: .45; }
.grant.on { color: var(--good); font-weight: 700; }
.grant.off { color: var(--danger); font-weight: 700; }
.person-all {
  font-size: 12px; color: var(--text-faint); text-align: center; padding: 16px 4px;
}
.person-col.is-owner { opacity: .8; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px;
  font-size: 11.5px; color: var(--text-faint); }
.legend-item { display: flex; align-items: center; gap: 6px; }
.grant.legend-mark { height: auto; width: auto; padding: 0 2px; cursor: default; }

.preview { margin-top: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.preview-head { display: flex; justify-content: space-between; align-items: center; }
.preview-head h3 { margin: 0; font-size: 14px; }
.preview-note { font-size: 11.5px; color: var(--text-faint); margin: 2px 0 10px; }
.preview-body { display: flex; gap: 20px; flex-wrap: wrap; }
.preview-nav { display: flex; flex-direction: column; gap: 2px; min-width: 160px; }
.preview-tab {
  padding: 6px 10px; border-radius: var(--radius-sm); background: var(--surface-2);
  font-size: 13px;
}
.preview-off { flex: 1 1 220px; }
.preview-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-faint); margin-bottom: 6px; }
.preview-gone {
  font-size: 12.5px; color: var(--text-faint); text-decoration: line-through;
  padding: 2px 0;
}
.preview-gone.sec::after { content: ' (section)'; text-decoration: none; font-size: 10.5px; }
.add-person { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.add-person input, .add-person select { padding: 6px 8px; font-size: 13px; }
.sens-list { display: flex; flex-direction: column; gap: 2px; }
.sens-row { display: flex; align-items: center; gap: 8px; font-size: 13px;
  padding: 5px 0; cursor: pointer; }

/* ── arranging the cards ──────────────────────────────────────────────────── */
/* A native <dialog>: Esc closes it, focus is trapped, and the backdrop comes
   free. It lives on document.body so redrawing the page behind it — which is
   the point, you watch the order change — cannot tear it down mid-drag. */
dialog.reorder {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); padding: 16px;
  width: min(420px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.28);
  /* The frame never scrolls: on a short screen it is the list that gives way,
     so the title stays readable and Reset stays reachable. */
  max-height: min(80vh, 640px); display: flex; flex-direction: column;
}
dialog.reorder::backdrop { background: rgba(0, 0, 0, .32); }
.reorder-head { display: flex; justify-content: space-between; align-items: center; }
.reorder-head h3 { margin: 0; font-size: 15px; }
.reorder-note { font-size: 11.5px; color: var(--text-faint); line-height: 1.45; margin: 6px 0 12px; }
.reorder-list {
  display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto; min-height: 0; flex: 1;
}
.reorder-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 8px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--surface-2); font-size: 13px; cursor: grab;
}
.reorder-row.is-dragging { opacity: .35; }
.reorder-row.is-over { border-color: var(--petal); }
.reorder-grip { color: var(--text-faint); letter-spacing: -2px; }
.reorder-num {
  width: 18px; text-align: right; color: var(--text-faint); font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.reorder-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reorder-row .btn { padding: 0 6px; line-height: 1.6; }
.reorder-row .btn[disabled] { opacity: .25; cursor: default; }
.reorder-foot { margin-top: 12px; display: flex; justify-content: flex-end; flex: none; }
.reorder-head, .reorder-note { flex: none; }

/* Design board (the shop iPad): big type, big targets, one action per card. */
.dz .dz-header { margin-bottom: 14px; }
.dz .dz-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dz .dz-top h1 { margin: 0; }
.dz .dz-top .sub { margin-top: 2px; }
.dz .dz-toolbar { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.dz .dz-toolbar .dz-search { flex: 1; max-width: 420px; }
.dz .dz-toolbar .dz-chip { margin-left: auto; }
.dz .dz-chip.open { box-shadow: 0 0 0 3px color-mix(in srgb, var(--petal) 25%, transparent); }
.dz .dz-search { font: inherit; font-size: 18px; padding: 12px 16px; min-width: 280px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); }
.dz .dz-daytabs { display: none; gap: 8px; margin: 8px 0 12px; }
.dz .dz-daytab { font: inherit; font-size: 17px; padding: 12px 18px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); display: flex; gap: 10px; align-items: center; }
.dz .dz-daytab.on { background: var(--petal); color: #fff; border-color: var(--petal); }
.dz .dz-tabn { font-weight: 700; opacity: .8; }
.dz .dz-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.dz .dz-col { min-width: 0; }
.dz .dz-colhead { margin-bottom: 10px; }
.dz .dz-daylabel { font-size: 20px; font-weight: 700; }
.dz .dz-daydate, .dz .dz-count, .dz .dz-sub { color: var(--text-dim); font-size: 14px; }
.dz .dz-empty { color: var(--text-faint); padding: 18px; border: 1px dashed var(--border); border-radius: 12px; text-align: center; }
.dz .dz-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.dz .dz-card.made { opacity: .55; }
.dz .dz-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; min-height: 72px; }
.dz .dz-headtext { min-width: 0; flex: 1; }
.dz .dz-order { font-size: 13px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.dz .dz-who { font-size: 20px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz .dz-method { text-align: center; font-size: 12px; color: var(--text-dim); min-width: 64px; }
.dz .dz-method.delivery { color: var(--petal); font-weight: 600; }
.dz .dz-ico { font-size: 22px; }
.dz .dz-window { font-weight: 700; color: var(--text); }
.dz .dz-addr { margin-top: 6px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 22px; color: var(--text-dim); }
.dz .dz-items { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.dz .dz-card .dz-items { min-height: 168px; }
.dz .dz-itemtext { min-width: 0; }
.dz .dz-item { display: flex; gap: 10px; align-items: center; }
.dz .dz-thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); flex: none; }
.dz .dz-thumb.blank { display: flex; align-items: center; justify-content: center; font-size: 22px; background: var(--bg); }
.dz .dz-title { font-size: 17px; font-weight: 600; }
.dz .dz-card .dz-items .dz-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz .dz-variant { font-size: 14px; color: var(--text-dim); }
.dz .dz-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 2px; }
.dz .dz-message { margin-top: 12px; padding: 10px 12px; background: var(--bg); border-radius: 10px; }
.dz .dz-quote { font-size: 17px; line-height: 1.4; font-style: italic; }
.dz .dz-brief { margin-top: 10px; font-size: 15px; line-height: 1.4; }
.dz .dz-photos { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.dz .dz-photos img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.dz .dz-photos.strip { height: 76px; flex-wrap: nowrap; overflow: hidden; align-items: center; }
.dz .dz-photos.strip img { width: 72px; height: 72px; }
.dz .dz-photos.strip.nophotos { justify-content: center; border: 1px dashed var(--border); border-radius: 10px; color: var(--text-faint); font-size: 13px; }
.dz .dz-stepsline { margin-top: 8px; height: 18px; }
.dz .dz-foot { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.dz .dz-foot .dz-claim { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz .dz-foot .dz-made { margin-left: auto; }
.dz .dz-note { flex: 1 1 100%; order: 3; width: 100%; font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; resize: none; background: var(--surface); color: var(--text); }
.dz .dz-made { font: inherit; font-size: 16px; font-weight: 700; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--good); background: var(--surface); color: var(--good); white-space: nowrap; flex: none; }
.dz .dz-made.on { background: var(--good); color: #fff; }
.dz .dz-overdue { margin: 0 0 14px; padding: 12px; border: 1px solid var(--warn); border-radius: 12px; }
.dz .dz-results { margin: 0 0 14px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.dz .dz-resultgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.dz .dz-ahead { margin-top: 18px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.dz .dz-aheadlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.dz .dz-aheaditem { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--bg); }
.dz .dz-aheaditem.done { opacity: .5; }
.dz .dz-aheadn { font-size: 26px; font-weight: 800; min-width: 34px; text-align: center; color: var(--petal); }
.dz .dz-who-box { margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.dz .dz-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.dz .dz-chip { font: inherit; font-size: 15px; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.dz .dz-chip.on { background: var(--petal); border-color: var(--petal); color: #fff; font-weight: 700; }
.dz .dz-chip.ghost { color: var(--text-dim); }
.dz .dz-chipinput { font: inherit; font-size: 15px; padding: 9px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.dz .dz-claim { font: inherit; font-size: 14px; font-weight: 600; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); white-space: nowrap; }
.dz .dz-claim.on { background: var(--bg); color: var(--text-dim); display: inline-flex; align-items: center; }
.dz .dz-claimrow { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; }
.dz .dz-claim.on.mine { background: var(--petal); border-color: var(--petal); color: #fff; }
.dz .dz-card.theirs { border-style: dashed; }
.dz .dz-mine { margin: 0 0 14px; padding: 12px; border: 1px solid var(--petal); border-radius: 12px; background: color-mix(in srgb, var(--petal) 6%, var(--surface)); }
/* A written note reads like a sticky note, not a grey input. */
.dz .dz-note.has-note { background: #fff6cc; border-color: #e6c94a; color: #4a3d00; font-weight: 600; }
/* The clock inside Today: amber as the delivery window nears, red once it has passed. */
.dz .dz-card.soon { border-color: var(--warn); box-shadow: 0 0 0 2px color-mix(in srgb, var(--warn) 35%, transparent); }
.dz .dz-card.late { border-color: var(--danger); box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 35%, transparent); }
.dz .dz-addr { display: flex; justify-content: space-between; gap: 10px; }
.dz .dz-addr > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dz .dz-by { flex: none; font-weight: 700; color: var(--text); }
.dz .dz-card.soon .dz-by { color: var(--warn); }
.dz .dz-card.late .dz-by { color: var(--danger); }
.dz .dz-daytab.late:not(.on) { border-color: var(--danger); color: var(--danger); }
.dz .dz-extras { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.dz .dz-extras .dz-chip { white-space: nowrap; }
.dz .dz-x { font: inherit; border: none; background: none; color: var(--text-faint); font-size: 16px; padding: 6px; }
.dz .dz-checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 10px; }
.dz .dz-check { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--bg); cursor: pointer; }
.dz .dz-check input { width: 26px; height: 26px; accent-color: var(--good); flex: none; }
.dz .dz-check.done .dz-title { text-decoration: line-through; color: var(--text-dim); }
.dz .dz-who-box.slim { display: flex; gap: 14px; align-items: center; padding: 8px 14px; }
.dz .dz-card { cursor: pointer; }
.dz .dz-full { position: fixed; inset: 0; background: rgba(20,20,20,.55); z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 24px; overflow: auto; }
.dz .dz-fullcard { position: relative; background: var(--surface); border-radius: 18px; width: min(1180px, 100%); padding: 26px 28px 28px; box-shadow: var(--shadow); }
.dz .dz-fullhead { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.dz .dz-headright { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.dz .dz-fullhead > div:first-child { flex: 1; }
.dz .dz-fullwho { font-size: 34px; font-weight: 800; line-height: 1.15; }
.dz .dz-fullmethod { display: inline-flex; align-items: center; gap: 10px; height: 46px; box-sizing: border-box; font-size: 17px; font-weight: 700; line-height: 1.2; color: var(--text-dim); padding: 0 18px; border-radius: 999px; background: var(--bg); white-space: nowrap; }
.dz .dz-fullmethod > div:first-child { font-size: 22px; line-height: 1; }
.dz .dz-fullmethod .dz-sub { font-weight: 500; font-size: 15px; }
.dz .dz-fullmethod .dz-sub::before { content: '·'; margin-right: 8px; color: var(--text-faint); }
.dz .dz-fullmethod.delivery { color: var(--petal); }
.dz .dz-close { font: inherit; font-size: 20px; border: 1px solid var(--border); background: var(--bg); color: var(--text-dim); border-radius: 999px; width: 46px; height: 46px; flex: none; display: flex; align-items: center; justify-content: center; }
.dz .dz-close:hover { color: var(--text); }
.dz .dz-fulladdr { font-size: 20px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.dz .dz-fullgrid { display: grid; grid-template-columns: 3fr 2fr; gap: 26px; margin-top: 18px; align-items: start; }
.dz .dz-thumb.big { width: 120px; height: 120px; border-radius: 14px; }
.dz .dz-thumb.big.blank { font-size: 44px; }
.dz .dz-photos.big img { width: 150px; height: 150px; }
.dz .dz-steps { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.dz .dz-check.step { padding: 12px 14px; }
.dz .dz-check.step input { width: 30px; height: 30px; }
.dz .dz-made.big { font-size: 18px; padding: 16px 22px; }
.dz .dz-palettebar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.dz .dz-palettetext { font-size: 15px; font-weight: 600; flex: 1; }
.dz .dz-itemblock { display: flex; flex-direction: column; gap: 8px; }
.dz .dz-kicker { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 2px; }
.dz .dz-kicker[data-kind="wedding"], .dz .dz-kicker[data-kind="-la-carte-wedding"] { color: var(--petal); }
.dz .dz-kicker[data-kind="event"], .dz .dz-kicker[data-kind="partnership"] { color: var(--accent); }
.dz .dz-madecount { display: flex; gap: 8px; align-items: center; }
.dz .dz-madecount.big { margin-top: 6px; }
.dz .dz-method.make, .dz .dz-method.strike { color: var(--text-dim); }
.dz .dz-thumbbtn { border: none; background: none; padding: 0; cursor: pointer; }
.dz .dz-recipe { padding: 12px 14px; border-radius: 12px; background: var(--bg); display: flex; flex-direction: column; gap: 6px; }
.dz .dz-recipehead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dz .dz-recipelines { margin: 0; padding-left: 20px; font-size: 17px; line-height: 1.5; }
.dz .dz-recipetext { font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); width: 100%; resize: vertical; }
.dz .dz-recipeimg { max-width: 220px; border-radius: 10px; border: 1px solid var(--border); margin-top: 6px; }
.dz .dz-viewtabs { display: inline-flex; flex: none; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.dz .dz-viewtab { font: inherit; font-size: 15px; font-weight: 600; padding: 11px 18px; border: none; background: transparent; color: var(--text-dim); cursor: pointer; }
.dz .dz-viewtab.on { background: var(--petal); color: #fff; }
.dz .dz-catalogue { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.dz .dz-catrow { padding: 10px 12px; border-radius: 10px; background: var(--bg); }
.dz .dz-catrow.open { background: var(--surface); border: 1px solid var(--border); }
.dz .dz-catline { display: flex; gap: 12px; align-items: center; }
.dz .dz-catdot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--text-faint); }
.dz .dz-catdot.current { background: var(--good); }
.dz .dz-catdot.carried { background: var(--warn); }
.dz .dz-catrow .dz-recipe { margin-top: 10px; }
.dz .dz-madephotos { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--bg); }
.dz .dz-madephotos .dz-photos img { width: 120px; height: 120px; }
.dz .dz-madehead { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dz .dz-madehead > div:first-child { min-width: 0; }
.dz .dz-madehead .dz-sub { margin-top: 2px; }
.dz .dz-madehead .dz-chip { flex: none; white-space: nowrap; }
.dz .dz-palette { margin-top: 6px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 15px; }
@media (max-width: 1000px) {
  .dz .dz-fullgrid { grid-template-columns: 1fr; }
  .dz .dz-full { padding: 10px; }
  .dz .dz-grid { grid-template-columns: 1fr; }
  .dz .dz-daytabs { display: flex; }
  .dz .dz-col { display: none; }
  .dz .dz-col.active { display: block; }
  .dz .dz-resultgrid { grid-template-columns: 1fr; }
}

/* quote share menu */
.share-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 280px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; gap: 2px; }

/* --- Pipeline (crm) ---------------------------------------------------------- */
/* Four groups in the order to work them; the whole row is a button; one type
   size a person can read across the shop (Amir, 6 Sep 2026). Colour means one
   thing: pink = our move, grey = theirs, green = money, faint = done. */
.crm-board .view-head { align-items: flex-start; }
.crm-segs { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.crm-seg { border: none; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text-dim); padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.crm-seg.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.crm-groups { display: flex; flex-direction: column; gap: 26px; margin-top: 6px; }
.crm-group-head { display: flex; align-items: baseline; gap: 10px; margin: 0 4px 8px; }
.crm-group-head h2 { margin: 0; font-size: 18px; letter-spacing: -.005em; }
.crm-group-n { font-size: 15px; font-weight: 600; color: var(--text-faint); }
.crm-group-n.hot { color: var(--petal); }
.crm-group-hint { color: var(--text-dim); font-size: 13.5px; }
.crm-done-toggle { align-self: flex-start; border: 1px dashed var(--border); background: none; font: inherit; font-size: 14px; color: var(--text-dim); padding: 12px 18px; border-radius: var(--radius); cursor: pointer; width: 100%; text-align: left; }
.crm-done-toggle:hover { border-color: var(--text-dim); color: var(--text); }
.crm-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
/* Columns: who · the next step · when (fixed, wide enough for "they ordered
   from the menu" on two lines) · owner. The two text columns truncate; the
   when column wraps; nothing runs past the card's edge (Amir, 9 Sep 2026). */
.crm-row {
  display: grid; grid-template-columns: minmax(200px, 1.3fr) minmax(240px, 1.8fr) 118px 150px;
  gap: 18px; align-items: center;
  padding: 15px 20px; border-bottom: 1px solid var(--border); font-size: 15px; min-width: 0; position: relative;
}
/* Just mine: my own rows need no owner column; an unclaimed row keeps a narrow one for "claim" */
.crm-board[data-scope="mine"] .crm-row { grid-template-columns: minmax(200px, 1.3fr) minmax(240px, 1.8fr) 118px; }
.crm-board[data-scope="mine"] .crm-group[data-bucket="unclaimed"] .crm-row { grid-template-columns: minmax(200px, 1.3fr) minmax(240px, 1.8fr) 118px 150px; }
.crm-row:last-child { border-bottom: none; }
.crm-row > * { min-width: 0; }
.crm-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: transparent; }
.crm-row[data-tone="us"]::before { background: var(--petal); }
.crm-row[data-tone="them"]::before { background: var(--border); }
.crm-row[data-tone="money"]::before { background: var(--accent); }
.crm-row[data-clickable="1"] { cursor: pointer; }
.crm-row[data-clickable="1"]:hover { background: var(--surface-2); }
.crm-row:focus-visible { outline: 2px solid var(--petal); outline-offset: -2px; }
.crm-who, .crm-next { overflow: hidden; }
.crm-name { font-size: 16.5px; font-weight: 600; letter-spacing: -.005em; color: var(--text); }
.crm-sub { font-size: 13.5px; color: var(--text-dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-next-t { font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-row[data-tone="us"] .crm-next-t { color: var(--petal); }
.crm-row[data-tone="them"] .crm-next-t { color: var(--text-dim); font-weight: 500; }
.crm-row[data-tone="money"] .crm-next-t { color: var(--accent); }
.crm-row[data-tone="done"] .crm-next-t { color: var(--text-faint); font-weight: 500; }
.crm-row[data-tone="done"] .crm-name { color: var(--text-dim); }
.crm-age { text-align: right; font-variant-numeric: tabular-nums; overflow: hidden; }
.crm-age b { display: block; font-size: 19px; font-weight: 600; letter-spacing: -.01em; line-height: 1.1; }
.crm-age span { display: block; font-size: 12.5px; color: var(--text-faint); line-height: 1.25; white-space: normal; overflow-wrap: anywhere; }
.crm-row[data-tone="us"] .crm-age b { color: var(--petal); }
.crm-owner { font-size: 13.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.crm-claimed { font-weight: 600; color: var(--text); }
.crm-claim { border: none; background: none; padding: 0; font: inherit; font-size: 12.5px; color: var(--petal); cursor: pointer; text-decoration: underline dotted; }
.crm-claim:hover { text-decoration: underline; }
.crm-empty { text-align: center; color: var(--text-dim); font-size: 14.5px; padding: 26px 20px; }
.crm-empty a { color: var(--petal); font-weight: 600; text-decoration: none; }
.crm-empty a:hover { text-decoration: underline; }
@keyframes crm-flash { from { background: var(--petal-soft); } to { background: transparent; } }
.crm-flash { animation: crm-flash 1.6s ease-out 1; }
@media (prefers-reduced-motion: reduce) { .crm-flash { animation: none; } }
/* after a send, on the client page */
.crm-donebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: color-mix(in srgb, var(--accent) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); border-radius: var(--radius); padding: 12px 16px; margin: 4px 0 16px; font-size: 14.5px; }
.crm-donebar-t { font-weight: 600; color: var(--accent); }
.crm-needs { border-color: var(--warn) !important; box-shadow: 0 0 0 2px color-mix(in srgb, var(--warn) 25%, transparent); }
.tp-nosubject { color: var(--warn); font-size: 12.5px; margin-top: 4px; }
/* the questionnaire's pictures (Templates → Questionnaires) */
.qe-pics { margin: 12px 0 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2, var(--surface)); }
.qe-pic-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 10px; }
.qe-pic { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start; }
.qe-pic-tile { width: 96px; height: 72px; border-radius: 8px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.qe-pic-tile.empty { border-style: dashed; }
.crm-releasebar { background: var(--petal-soft); border-color: color-mix(in srgb, var(--petal) 35%, var(--border)); }
.crm-releasebar .crm-donebar-t { color: var(--petal); }
.cx-letgo { appearance: none; -webkit-appearance: none; padding-right: 14px; }
.cx-d-reach { font-size: 14px; color: var(--text-dim); margin: 2px 0 4px; display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.cx-op-reach { font-size: 11.5px; color: var(--text-dim); display: inline-flex; gap: 8px; align-items: baseline; }
.cx-shopify { color: var(--accent); font-weight: 600; text-decoration: none; }
.cx-shopify:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .crm-row { grid-template-columns: 1fr 1fr; }
  .crm-age { display: none; }
}

/* --- "email me": a person's own nudge choices (popover under the mailbox chip) */
.crm-pop { position: fixed; z-index: 70; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; width: 320px; max-width: 94vw; display: grid; gap: 8px; }
.crm-pop-row { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; font-size: 13.5px; cursor: pointer; }
.crm-pop-row input { margin-top: 3px; }

/* --- the Quotes list: big New buttons (Amir, 8 Sep 2026) ------------------------ */
.q-new { font-size: 15px; font-weight: 600; padding: 12px 18px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--border); display: inline-flex; align-items: center; }
.q-new:hover { border-color: var(--accent); }

/* --- the packet's palette: house colours as chips (pricing.js packetCard) ------- */
.q-swatch { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 999px; padding: 3px 8px 3px 4px; background: var(--surface); }
.q-swatch i, .q-house-chip i { width: 22px; height: 22px; border-radius: 11px; display: inline-block; border: 1px solid rgba(0,0,0,.08); flex: none; }
.q-house-chip { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 11.5px; border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px 2px 3px; background: var(--surface); color: var(--text); cursor: pointer; }
.q-house-chip:hover { border-color: var(--text-dim); } .q-house-chip.on, .q-house-chip:disabled { opacity: .45; cursor: default; }

/* --- the person editor + the touch logger (crm/person.js) ------------------- */
.px-modal { width: 640px; max-width: 94vw; max-height: 90vh; overflow-y: auto; }
.px-body { display: grid; gap: 12px; }
.px-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-dim); font-weight: 600; }
.px-f input, .px-f textarea { font-weight: 400; color: var(--text); }
.px-f small { font-weight: 400; font-size: 11.5px; }
.px-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.px-ids { display: grid; gap: 6px; }
.px-id { display: flex; gap: 8px; align-items: center; font-size: 13.5px; font-weight: 400; color: var(--text); min-height: 30px; }
.px-id-v { flex: 1; overflow-wrap: anywhere; }
.px-id-new input { min-width: 0; }
.px-facts { display: grid; gap: 6px; }
.px-fact { display: flex; gap: 8px; align-items: center; }
.px-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.px-chips .chip { cursor: pointer; }
.cx-d-partner { font-size: 26px; color: var(--text-dim); font-weight: 500; margin-left: 6px; }
.cx-d-about { border-top: 1px solid var(--border); padding-top: 10px; }
.cx-d-msg[data-kind="touch"] { background: var(--surface-2); border-style: dashed; }
.cx-d-msg[data-kind="touch"][data-dir="out"] { margin-left: 32px; }
.cx-d-msg[data-kind="touch"][data-dir="in"] { margin-right: 32px; }
@media (max-width: 640px) { .px-two { grid-template-columns: 1fr; } }

/* --- the wedding file (client page) ----------------------------------------- */
.wd { margin-top: 28px; border-top: 1px solid var(--border); padding-top: 14px; font-family: var(--font); }
.wd-title { font-weight: 600; font-size: 15px; }
.wd-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.wd-service { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.wd-q { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin: 10px 0 12px; font-size: 13.5px; }
.wd-sec { border: 1px solid var(--border); border-radius: 10px; margin: 8px 0; background: var(--surface); }
.wd-sec summary { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; cursor: pointer; font-size: 14px; list-style: none; }
.wd-sec summary::-webkit-details-marker { display: none; }
.wd-ok { color: var(--accent); font-weight: 700; } .wd-need { color: var(--petal); font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.wd-body { padding: 4px 12px 12px; display: grid; gap: 8px; }
.wd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wd-f { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--text-dim); font-weight: 600; }
.wd-f input, .wd-f select, .wd-f textarea { font-weight: 400; color: var(--text); }
.wd-h { font-size: 11.5px; color: var(--text-dim); font-weight: 600; margin-top: 4px; }
.wd-todos { margin: 4px 0 12px; display: grid; gap: 4px; }
.wd-todo { display: grid; grid-template-columns: 92px 1fr; gap: 10px; font-size: 13.5px; padding: 5px 0; border-top: 1px solid var(--border); }
.wd-todo-when { color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wd-todo.late .wd-todo-when, .wd-todo.late b { color: var(--warn); }
.wd-lh, .wd-lr { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr) 28px; gap: 6px; align-items: center; }
.wd-lh { font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); margin: 4px 0 2px; }
.wd-lr { margin: 3px 0; }
.wd-lr input, .wd-lr select { width: 100%; min-width: 0; }
@media (max-width: 700px) { .wd-grid { grid-template-columns: 1fr; } }

/* --- questionnaire editor (templates page) ------------------------------------- */
.qe { margin-top: 16px; padding: 14px 16px; }
.qe-g { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: grid; gap: 8px; background: var(--surface); }
.qe-q { padding: 6px 0; border-top: 1px solid var(--border); }
.qe-q:first-of-type { border-top: 0; }

/* --- booking links + email footer (templates page) ------------------------------ */
.bk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; align-items: start; }
.bk-card { padding: 14px 16px; }
.bk-head, .bk-row { display: grid; grid-template-columns: 1fr 1.6fr 60px; gap: 8px; align-items: center; }
.bk-head { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); margin: 12px 0 4px; }
.bk-row { margin: 4px 0; }
.bk-field { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; font-weight: 600; margin-top: 8px; }
@media (max-width: 900px) { .bk-grid { grid-template-columns: 1fr; } }

/* --- payment reminders (quotes list) ------------------------------------------- */
.rem-row { padding: 8px 0; border-bottom: 1px solid var(--border); }
.rem-row:last-of-type { border-bottom: none; }
.rem-row.rem-done { color: var(--text-dim); font-size: 12.5px; }
.rem-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warn); flex: none; }
.rem-dot[data-urgency="red"] { background: var(--danger); }
.rem-body { margin: 8px 0 2px 19px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12.5px; }
.rem-text { margin: 0; white-space: pre-wrap; font: inherit; line-height: 1.45; }

/* --- compose (client page) ------------------------------------------------------ */
.crm-compose { margin-top: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.crm-compose textarea { resize: none; overflow: hidden; line-height: 1.45; font: inherit; }

/* --- the conversation on an inquiry card ---------------------------------------- */
.crm-thread { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.crm-msg-bubble { padding: 8px 11px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); max-width: 640px; }
.crm-msg-bubble[data-kind="sent"] { border-color: color-mix(in srgb, var(--petal) 35%, transparent); margin-left: 24px; }
.crm-msg-bubble[data-kind="reply"] { background: var(--surface); margin-right: 24px; }

/* --- the submission on an inquiry card ------------------------------------------ */
.crm-form { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; font-size: 12.5px; margin-top: 8px; max-width: 640px; }
.crm-form-k { color: var(--text-faint); font-size: 11px; letter-spacing: .03em; text-transform: uppercase; padding-top: 2px; }
.crm-form-v { color: var(--text); }
.crm-photo { height: 110px; width: auto; max-width: 180px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); display: block; }

/* --- client page, two styles (crm/client.js) ------------------------------------ */
.cx-wrap { position: relative; }
.cx-switch { position: absolute; top: 10px; right: 16px; display: flex; gap: 2px; z-index: 2; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px; }
.cx-switch button { border: none; background: none; font: inherit; font-size: 11.5px; padding: 3px 10px; border-radius: 999px; color: var(--text-dim); cursor: pointer; }
.cx-switch button.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.cx-dim { font-size: 12.5px; color: var(--text-dim); }
.cx-mono { font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px; color: var(--text-faint); letter-spacing: .02em; }
.cx-amt { text-align: right; font-variant-numeric: tabular-nums; }

/* Dossier */
.cx-dossier { font-family: "Karla", -apple-system, system-ui, sans-serif; padding: 22px 48px 56px; max-width: 1240px; margin: 0 auto; color: var(--text); }
.cx-d-top { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-dim); padding-right: 200px; }
.cx-d-back { color: var(--text-dim); text-decoration: none; }
.cx-d-actions { display: flex; gap: 8px; align-items: center; }
.cx-d-btn { font: inherit; font-size: 13px; padding: 8px 14px; border-radius: 2px; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.cx-d-btn .crm-claim { font-size: 12px; }
.cx-d-btn-dark { background: var(--text); color: var(--surface); border-color: var(--text); letter-spacing: .02em; font-weight: 600; }
.cx-d-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-top: 18px; }
.cx-d-name { font-family: "Cormorant Garamond", Georgia, serif; font-size: 44px; line-height: 1; font-weight: 600; letter-spacing: -0.01em; }
.cx-d-sub { font-size: 13.5px; color: var(--text-dim); margin-top: 6px; }
.cx-d-sub b { color: var(--petal); font-weight: 600; }
.cx-d-status { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--petal); font-weight: 600; white-space: nowrap; text-transform: capitalize; }
.cx-d-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--petal); display: inline-block; }
.cx-d-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--text); border-bottom: 1px solid var(--border); margin-top: 22px; }
.cx-d-fact { padding: 14px 20px 14px 0; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--border); }
.cx-d-fact + .cx-d-fact { padding-left: 20px; }
.cx-d-fact:last-child { border-right: none; }
.cx-d-k { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.cx-d-v { font-family: "Cormorant Garamond", Georgia, serif; font-size: 24px; font-weight: 600; line-height: 1.15; }
.cx-d-photos { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.cx-d-photo { width: 220px; height: 150px; object-fit: cover; display: block; }
.cx-d-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; margin-top: 26px; }
.cx-d-left, .cx-d-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cx-d-quote { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: 22px; line-height: 1.45; font-weight: 500; }
.cx-d-more summary { font-size: 12.5px; color: var(--text-dim); cursor: pointer; }
.cx-d-grid { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin-top: 10px; font-size: 13px; }
.cx-d-grid-row { display: contents; }
.cx-d-meta { font-size: 12.5px; color: var(--text-faint); line-height: 1.7; }
.cx-d-meta a { color: var(--petal); }
.cx-d-thread { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.cx-d-msg { padding: 12px 14px; border: 1px solid var(--border); background: var(--surface); }
.cx-d-msg[data-kind="sent"] { margin-left: 32px; border-left: 2px solid var(--petal); }
.cx-d-msg[data-kind="reply"] { margin-right: 32px; }
.cx-d-msg-who { font-size: 11.5px; color: var(--text-faint); margin-bottom: 4px; }
.cx-d-msg-text { font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.cx-d-menu { display: flex; flex-direction: column; border: 1px solid var(--border); background: var(--surface); }
.cx-d-menu-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--surface-2); font-size: 14px; cursor: pointer; }
.cx-d-menu-row:last-child { border-bottom: none; }
.cx-d-menu-row:hover { background: var(--surface-2); }
.cx-d-menu-blank { color: var(--petal); font-weight: 600; }
.cx-d-use { font-size: 12px; color: var(--text-faint); font-weight: 400; }
.cx-hist { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.cx-hist-row { display: grid; grid-template-columns: 60px 1fr 80px; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--surface-2); font-size: 13px; }
.cx-hist .cx-k { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); padding-top: 2px; }
.cx-dossier .crm-compose { border-radius: 0; }

/* Operator */
.cx-op { font-family: -apple-system, system-ui, sans-serif; font-size: 13px; color: var(--text); background: var(--surface); min-height: 100%; }
.cx-op-bar { display: flex; align-items: center; gap: 14px; padding: 10px 20px; border-bottom: 1px solid var(--text); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; padding-right: 200px; flex-wrap: wrap; }
.cx-op-link { color: var(--text); text-decoration: none; }
.cx-op-sep { color: var(--text-faint); }
.cx-op-strong { font-weight: 600; }
.cx-op-pill { padding: 1px 8px; border: 1px solid var(--text-dim); color: var(--text-dim); font-weight: 600; }
.cx-op-pill[data-stage="new"] { border-color: var(--petal); color: var(--petal); }
.cx-op-turn[data-turn="us"] { color: var(--petal); }
.cx-op-turn[data-turn="them"], .cx-op-turn[data-turn="nobody"] { color: var(--text-dim); }
.cx-op-dim { color: var(--text-faint); }
.cx-op-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.cx-op-btn { font: inherit; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; padding: 6px 12px; border: 1px solid var(--text); background: var(--surface); color: var(--text); cursor: pointer; text-transform: uppercase; display: inline-flex; gap: 8px; align-items: center; }
.cx-op-btn .crm-claim { text-transform: none; }
.cx-op-btn-go { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.cx-op-cols { display: grid; grid-template-columns: 340px minmax(0, 1fr) 420px; min-height: 70vh; }
.cx-op-col { padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; border-right: 1px solid var(--border); min-width: 0; }
.cx-op-col:last-child { border-right: none; }
.cx-op-grid { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 6px 10px; font-size: 13px; }
.cx-op-grid .cx-mono { padding-top: 2px; }
.cx-op-p { margin: 0; line-height: 1.5; }
.cx-op-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cx-op-photo { width: 100%; height: 100px; object-fit: cover; display: block; border: 1px solid var(--border); }
.cx-op-sub { max-height: 48vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }
.cx-op-list { max-height: 36vh; overflow-y: auto; overflow-x: hidden; border-top: 1px solid var(--border); padding: 10px 6px 0; margin: 4px -6px 0; }
.cx-op-earlier { display: grid; grid-template-columns: 90px 1fr; gap: 8px; font-size: 12px; padding: 5px 6px; margin: 0 -6px; border-bottom: 1px solid var(--surface-2); cursor: pointer; border-radius: 4px; }
.cx-op-earlier:hover { background: var(--surface-2); }
.cx-op-earlier.on { background: var(--petal-soft); font-weight: 600; }
.cx-op-earlier.on .cx-mono { color: var(--petal); }
.cx-op-thread { display: flex; flex-direction: column; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 6px 0; }
.cx-op-trow { display: grid; grid-template-columns: 90px 90px minmax(0, 1fr); gap: 4px 12px; font-size: 12.5px; padding: 3px 0; }
.cx-op-ttext { margin: 2px 0 8px 96px; padding: 8px 10px; background: var(--surface-2); font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; }
.cx-op-empty { padding: 14px 16px; border: 1px dashed var(--border); color: var(--text-dim); font-size: 12.5px; }
.cx-op-table { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.cx-op-row { display: grid; grid-template-columns: 60px 1fr 80px; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--surface-2); font-size: 12.5px; }
.cx-op .crm-compose { border: none; background: none; padding: 0; }
.cx-op .crm-compose textarea { min-height: 260px; }
@media (max-width: 1100px) { .cx-op-cols { grid-template-columns: 1fr; } .cx-d-cols { grid-template-columns: 1fr; } .cx-d-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --- Templates page -------------------------------------------------------------- */
/* --- Templates page (Amir, 7 Sep 2026: roomier, responsive, an inbox preview) --- */
.tp-tabs { display: inline-flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; margin-bottom: 18px; flex-wrap: wrap; }
.tp-tab { border: none; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text-dim); padding: 7px 14px; border-radius: 8px; cursor: pointer; }
.tp-tab.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.tp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
.tp-rail { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 12px; }
.tp-rail input[type=search] { width: 100%; }
.tp-item { text-align: left; font: inherit; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid transparent; background: none; cursor: pointer; color: var(--text); display: grid; gap: 2px; }
.tp-item:hover { background: var(--surface-2); }
.tp-item.on { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow); }
.tp-item b { font-size: 14px; } .tp-item span { font-size: 12.5px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-pick { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.tp-pick .lab { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; }
.tp-select { display: block; min-width: 280px; max-width: 520px; font-size: 14px; }
.tp-sheet { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 26px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tp-name { font: inherit; font-size: 22px; font-weight: 680; letter-spacing: -.01em; border: none; background: none; padding: 0; width: 100%; color: var(--text); outline: none; }
.tp-name:focus { border-bottom: 2px solid var(--petal); }
.tp-name::placeholder { color: var(--text-faint); font-weight: 500; }
.tp-subject { display: grid; grid-template-columns: max-content 1fr; gap: 10px; align-items: center; font-size: 13px; color: var(--text-dim); border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.tp-subject input { border: none; background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--text); padding: 4px 0; width: 100%; outline: none; }
.tp-fields { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tp-fields .lab { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; margin-right: 4px; }
.tp-field { font: inherit; font-size: 12px; font-family: var(--mono); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px; cursor: pointer; color: var(--text); }
.tp-field:hover { border-color: var(--petal); color: var(--petal); }
.tp-body { width: 100%; border: none; background: none; font: inherit; font-size: 16px; line-height: 1.6; resize: none; overflow: hidden; padding: 6px 0; min-height: 320px; color: var(--text); outline: none; }
.tp-tools { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--border); }
.tp-tools-left, .tp-tools-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tp-remove { border: none; background: none; font: inherit; font-size: 12.5px; color: var(--text-faint); cursor: pointer; text-decoration: underline dotted; }
.tp-remove:hover { color: var(--danger); }
.tp-menu { left: 0; right: auto; min-width: 300px; max-height: 70vh; overflow-y: auto; }
.tp-menu-item { text-align: left; font-size: 13px; display: flex; justify-content: space-between; gap: 10px; }
.tp-menu-item .dim { font-size: 11.5px; }
.tp-menu-head { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); padding: 8px 8px 2px; }
.tp-menu-note { font-size: 12px; padding: 4px 8px; }
.tp-notation { font-size: 12px; color: var(--text-faint); }
.tp-notation code { font-family: var(--mono); font-size: 11px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.tp-status { font-size: 12px; color: var(--text-dim); } .tp-status.dirty { color: var(--warn); font-weight: 600; }
.tp-preview { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tp-preview .cap { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; }
.tp-inbox { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.tp-inbox > div { min-width: 0; }
.tp-avatar { width: 36px; height: 36px; border-radius: 18px; background: var(--petal-soft); color: var(--petal); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.tp-inbox .from { font-size: 13px; font-weight: 600; } .tp-inbox .subj { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-inbox .snip { font-size: 12.5px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-phone { border: 10px solid #1d1b1a; border-radius: 34px; background: #1d1b1a; padding: 0; overflow: hidden; width: 100%; max-width: 400px; margin: 0 auto; box-shadow: var(--shadow); }
.tp-phone iframe { display: block; width: 100%; height: 640px; border: none; background: #faf9f8; border-radius: 24px; }
.tp-wide { max-width: 760px; }
.tp-two { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
@media (max-width: 1000px) {
  .tp-layout { grid-template-columns: 1fr; }
  .tp-preview { position: static; }
  .tp-two { grid-template-columns: 1fr; }
  .tp-sheet { padding: 16px; }
  .tp-phone { max-width: 100%; }
}

/* --- hero picture picker --------------------------------------------------------- */
.pic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 14px 0 6px; }
.pic-star { position: absolute; top: 6px; left: 8px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); font-size: 14px; }
.pic-notours, .ph-notours { position: absolute; top: 6px; right: 6px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; background: rgba(35,32,30,.75); color: #fff; padding: 2px 7px; border-radius: 999px; }
.pic-cell { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); padding: 0; cursor: pointer; overflow: hidden; text-align: left; font: inherit; color: var(--text); display: flex; flex-direction: column; }
.pic-cell:hover { border-color: var(--petal); }
.pic-cell img { width: 100%; height: 110px; object-fit: cover; display: block; }
.pic-cap { font-size: 11.5px; padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* On a phone (Tajalli checks leads between consults) the sidebar becomes a
   scrolling bar of group tabs across the top; the subnav row keeps the pages. */
@media (max-width: 900px) {
  #app { flex-direction: column; height: 100dvh; }
  #sidebar { width: auto; flex: 0 0 auto; flex-direction: row; align-items: center; gap: 4px;
             padding: 8px 10px; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); }
  #sidebar .brand { padding: 4px 8px 4px 2px; font-size: 15px; flex: 0 0 auto; }
  #sidebar #nav { display: flex; gap: 4px; flex: 1; }
  #sidebar .nav-item { width: auto; padding: 7px 10px; white-space: nowrap; font-size: 13.5px; }
  #sidebar .nav-spacer, #sidebar #demo-toggle, #sidebar #footer, #sidebar .shared-banner { display: none; }
  #subnav { padding: 8px 12px 0; overflow-x: auto; flex-wrap: nowrap; }
  .view { padding: 14px 12px 40px; }
  .view-head { flex-wrap: wrap; }
  #main { -webkit-overflow-scrolling: touch; }
  /* the Pipeline on a phone: one column per row, the sentence wraps */
  .crm-row { grid-template-columns: 1fr; gap: 4px; padding: 12px 14px; }
  .crm-next-t, .crm-sub { white-space: normal; }
  .crm-age { display: none; }
  .crm-owner { justify-content: flex-start; }
  .crm-group-head h2 { white-space: nowrap; }
  .crm-group-head { flex-wrap: wrap; }
}

/* ── the storyboard quote editor (weddings & events, 9 Sep 2026) ───────────── */
.sb-shelf { margin-top: 14px; padding: 16px 18px 18px; }
.sb-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.sb-title { font: inherit; font-size: 20px; font-weight: 600; border: 1px solid transparent; border-radius: 6px; padding: 2px 6px; margin-left: -6px; background: transparent; color: var(--text); min-width: 160px; flex: 1; }
.sb-title:hover, .sb-title:focus { border-color: var(--border); background: var(--surface); outline: none; }
.sb-sum { font-size: 12.5px; color: var(--text-dim); white-space: nowrap; }
.sb-grid, .sb-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.sb-menu { margin: 4px 0 8px; }
.sb-piece { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); text-align: left; font: inherit; color: var(--text); cursor: pointer; transition: border-color .12s, box-shadow .12s; min-width: 0; }
.sb-piece:hover, .sb-piece:focus-visible { border-color: var(--petal); box-shadow: 0 2px 10px rgba(0,0,0,.05); outline: none; }
.sb-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 26px; height: 26px; border-radius: 13px; border: 1px solid var(--border); background: rgba(255,255,255,.92); color: var(--text-dim); font: inherit; font-size: 13px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .12s; }
.sb-piece:hover .sb-x, .sb-piece:focus-within .sb-x, .sb-x:focus { opacity: 1; }
.sb-x:hover { color: var(--danger); border-color: var(--danger); }
@media (hover: none) { .sb-x { opacity: 1; } }
.sb-piece.sb-off { opacity: .62; }
.sb-piece.sb-off .sb-name { text-decoration: line-through; text-decoration-color: var(--text-faint); }
.sb-piece.sb-alt { background: var(--surface-2); }
.sb-tile { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; display: block; background: var(--surface-2); }
.sb-tile-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1.5px dashed var(--border); background: none; color: var(--text-faint); font: inherit; font-size: 12px; cursor: pointer; }
.sb-tile-empty:hover { border-color: var(--petal); color: var(--petal); }
.sb-menutile { display: grid; place-items: center; font-family: Georgia, "Times New Roman", serif; font-size: 44px; color: rgba(0,0,0,.28); }
.sb-name { font-size: 16px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.sb-note { font-size: 12.5px; color: var(--text-dim); font-style: italic; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sb-meta { display: flex; align-items: center; gap: 4px; font-size: 12.5px; margin-top: auto; }
.sb-n { width: 44px; font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; text-align: center; padding: 3px 2px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--text); -moz-appearance: textfield; }
.sb-n::-webkit-outer-spin-button, .sb-n::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sb-n:hover, .sb-n:focus { border-color: var(--border); background: var(--surface); outline: none; }
.sb-price { width: 58px; text-align: left; }
.sb-line { font-family: ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13.5px; }
.sb-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.sb-badge { font-size: 10.5px; letter-spacing: .04em; border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px; color: var(--text-dim); background: var(--surface-2); }
.sb-badge.off { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.sb-badge.ok { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); background: none; }
.sb-add { align-items: center; justify-content: center; border-style: dashed; color: var(--text-dim); min-height: 160px; gap: 2px; }
.sb-add:hover { color: var(--petal); }
.sb-addplus { font-size: 34px; line-height: 1; font-weight: 300; }
.sb-sheetbg { position: fixed; inset: 0; background: rgba(35,32,30,.22); z-index: 70; display: flex; justify-content: flex-end; }
.sb-sheet { width: 420px; max-width: 96vw; height: 100%; overflow-y: auto; background: var(--surface); border-left: 1px solid var(--border); box-shadow: -8px 0 30px rgba(0,0,0,.12); padding: 16px 20px 40px; display: flex; flex-direction: column; gap: 2px; }
.sb-sheethead { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sb-sheetpic { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; background: var(--surface-2); }
.sb-sheet .field { margin-bottom: 12px; }
.sb-sheet .field label { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.sb-rail { padding: 16px 18px; }
.sb-total { display: flex; justify-content: space-between; align-items: baseline; }
.sb-total b { font-size: 26px; font-weight: 600; }
.sb-sched { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 6px; display: grid; gap: 3px; }
.sb-schedrow { display: flex; justify-content: space-between; font-size: 13px; }
.sb-fold { margin-top: 14px; padding: 10px 14px; }
.sb-foldbtn { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; font: inherit; color: var(--text); cursor: pointer; text-align: left; padding: 2px 0; }
.sb-foldbtn .dim { font-size: 12.5px; }
.sb-foldarrow { color: var(--text-faint); width: 12px; }
.sb-fold > .sb-foldbtn + div > .card { box-shadow: none; border: 0; padding: 8px 0 0; margin: 0; }
@media (prefers-reduced-motion: reduce) { .sb-piece { transition: none; } }

/* ── client page: long emails scroll, long links wrap (Tajalli, 9 Sep 2026) ── */
.cx-d-msg-text, .cx-op-ttext { max-height: 320px; overflow-y: auto; overflow-wrap: anywhere; word-break: break-word; }
.cx-d-msg, .cx-d-sub, .cx-d-quote, .cx-d-grid, .cx-op-sub, .cx-d-about { overflow-wrap: anywhere; word-break: break-word; min-width: 0; }
.cx-d-more .cx-d-grid { max-height: 40vh; overflow-y: auto; }
.cx-d-menu details { border-bottom: 1px solid var(--border); }
.cx-d-menu details summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; padding: 10px 14px; font-weight: 600; font-size: 14px; }
.cx-d-menu details summary::-webkit-details-marker { display: none; }
.cx-d-menu details summary .cx-d-use { font-weight: 400; }
.cx-d-menu details[open] summary { background: var(--surface-2); }
.cx-d-menu details .cx-d-menu-row { padding-left: 26px; }

/* ── Photos library: select + download (9 Sep 2026) ───────────────────────── */
.ph-tick { position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; margin: 0; cursor: pointer; opacity: 0; transition: opacity .12s; z-index: 2; }
.ph-card:hover .ph-tick, .ph-tick:checked, .ph-card.ph-picked .ph-tick { opacity: 1; }
.ph-card.ph-picked { outline: 2px solid var(--petal); outline-offset: 1px; }
.ph-selbar { display: flex; gap: 12px; align-items: center; padding: 8px 12px; margin: 8px 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-size: 13px; position: sticky; top: 0; z-index: 3; }
@media (hover: none) { .ph-tick { opacity: 1; } }

/* ── client page tabs: Conversation · History · Wedding file (9 Sep 2026) ── */
.cx-tabs { display: flex; gap: 2px; margin: 18px 0 14px; border-bottom: 1px solid var(--border); }
.cx-tab { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 600; color: var(--text-dim); cursor: pointer; }
.cx-tab.on { color: var(--text); border-bottom-color: var(--petal); }
.cx-tab:hover { color: var(--text); }
.cx-d-tabs .cx-tab { font-family: 'Karla', sans-serif; letter-spacing: .02em; }
.cx-op-tabs { margin: 10px 0 12px; }
.cx-op-tabs .cx-tab { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.cx-d-histpane { max-width: 760px; }

/* ── an inquiry under another name (9 Sep 2026) ───────────────────────────── */
.crm-linked { font-weight: 400; color: var(--text-dim); font-size: 12.5px; }
.cx-camein { font-size: 13px; }
.cx-d-sub.cx-camein b { color: var(--text); }
/* the next step, as the board says it, under the head of the client page */
.cx-next { display: flex; align-items: center; gap: 16px; margin: 18px 0 0; padding: 14px 18px; border: 1px solid var(--border); border-left: 5px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.cx-next[data-tone="us"] { border-left-color: var(--petal); background: color-mix(in srgb, var(--petal) 6%, var(--surface)); }
.cx-next[data-tone="money"] { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.cx-next[data-bucket="done"] { opacity: .7; }
.cx-next-k { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--text-faint); white-space: nowrap; min-width: 56px; }
.cx-next[data-tone="us"] .cx-next-k { color: var(--petal); }
.cx-next[data-tone="money"] .cx-next-k { color: var(--accent); }
.cx-next-body { flex: 1; min-width: 0; }
.cx-next-t { font-size: 19px; font-weight: 600; line-height: 1.25; }
.cx-next[data-tone="them"] .cx-next-t { font-weight: 500; color: var(--text-dim); }
.cx-next-d { font-size: 13.5px; color: var(--text-dim); margin-top: 3px; }
.cx-next-btn { font: inherit; font-size: 14.5px; font-weight: 600; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--text); background: var(--text); color: var(--surface); cursor: pointer; white-space: nowrap; }
.cx-next[data-tone="us"] .cx-next-btn { background: var(--petal); border-color: var(--petal); color: #fff; }
.cx-next[data-tone="money"] .cx-next-btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.cx-next-btn:hover { filter: brightness(.94); }
.cx-next-op { margin: 12px 20px 0; border-radius: 0; font-family: -apple-system, system-ui, sans-serif; }
.cx-next-op .cx-next-k { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.cx-next-op .cx-next-t { font-size: 17px; }
.cx-next-op .cx-next-btn { border-radius: 3px; padding: 8px 14px; font-size: 13px; }
@media (max-width: 640px) { .cx-next { flex-wrap: wrap; } .cx-next-btn { width: 100%; } }

/* --- Quotes list (pricing) ---------------------------------------------------- */
/* Sections in the order you work them, the Pipeline's colours: pink = ours
   (drafts), grey = theirs (sent), green = money (booked), faint = done. The
   row is the button; the ✕ on a draft is the only thing on it. */
.ql-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.ql-chips .chip { cursor: pointer; font-size: 13px; }
.ql-chips input[type="search"] { margin-left: auto; width: 240px; }
.ql-groups { display: flex; flex-direction: column; gap: 22px; }
.ql-row {
  display: grid; grid-template-columns: minmax(200px, 1.4fr) minmax(200px, 1.6fr) 90px 92px 18px;
  gap: 14px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--border);
  font-size: 15px; min-width: 0; position: relative; cursor: pointer;
}
.ql-row:last-child { border-bottom: none; }
.ql-row > * { min-width: 0; }
.ql-row:hover { background: var(--surface-2); }
.ql-row:focus-visible { outline: 2px solid var(--petal); outline-offset: -2px; }
.ql-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: transparent; }
.ql-row[data-tone="us"]::before { background: var(--petal); }
.ql-row[data-tone="them"]::before { background: var(--border); }
.ql-row[data-tone="money"]::before { background: var(--accent); }
.ql-name { font-size: 15.5px; font-weight: 600; letter-spacing: -.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ql-sub { font-size: 13px; color: var(--text-dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ql-facts { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ql-row[data-tone="us"] .ql-facts { color: var(--petal); }
.ql-row[data-tone="them"] .ql-facts { color: var(--text-dim); }
.ql-row[data-tone="money"] .ql-facts { color: var(--accent); font-weight: 600; }
.ql-row[data-tone="done"] .ql-facts, .ql-row[data-tone="done"] .ql-name,
.ql-row.faint .ql-name, .ql-row.faint .ql-facts { color: var(--text-faint); font-weight: 500; }
.ql-money { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.ql-chipcol { text-align: right; }
.ql-x { text-align: center; color: var(--text-faint); cursor: pointer; }
.ql-x:hover { color: var(--danger); }
.ql-empty { color: var(--text-dim); font-size: 14px; padding: 14px 18px; }
.ql-foot { display: flex; justify-content: flex-end; padding: 8px 4px 0; font-size: 13px; }
.ql-foot a { color: var(--text-dim); }
.ql-foot a:hover { color: var(--danger); }
@media (max-width: 760px) {
  .ql-row { grid-template-columns: 1fr 1fr 18px; gap: 8px; padding: 12px 14px; }
  .ql-money, .ql-chipcol { display: none; }
  .ql-facts, .ql-sub { white-space: normal; }
  .ql-chips input[type="search"] { margin-left: 0; width: 100%; }
}
