/* Ventures · the ledger desk (Workshop Shadow Board; locked surface brief .impeccable/surfaces/app-features-ventures.md).
   A ledger book on the shop bench: index tabs per venture across the top, ruled ledger rows with a totals rule
   (profit to date on a double underline), the price sheet and one live "what if" in the margin, filed folders below.
   Numbers are mono with tabular figures; negatives sit in parentheses and are never red (red means a fight).
   Dashed means "not yet": the empty ledger, the add-a-line zone, and every number a what-if is only imagining.
   Registered with registry.register_stylesheet (the parent panel and go-live renderer use it on parent pages), so
   every rule is scoped under a .vx* class. Tokens only; no hex values. */

/* ------------------------------------------------------------------ shared bits */
.vx .vx-n, .vx-op .vx-n { font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.vx .mono, .vx-op .mono, .vx-pp .mono, .vx-ap .mono { font-variant-numeric: tabular-nums; }
.vx details > summary { list-style: none; }
.vx details > summary::-webkit-details-marker { display: none; }
.vx-summary { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; cursor: pointer; font-weight: 700; color: var(--ink-2); border-radius: var(--r); }
.vx-summary:hover { color: var(--ink); }
.vx-summary .icon { width: 1em; height: 1em; transition: rotate .2s cubic-bezier(.16, 1, .3, 1); }
details[open] > .vx-summary .icon { rotate: 180deg; }
.vx-money { display: flex; align-items: center; gap: 0; border: 1px solid var(--field-line); border-radius: var(--r); background: var(--surface); }
.vx-money > span[aria-hidden] { padding-left: 10px; font: 500 .95rem var(--font-mono); color: var(--ink-3); }
.vx-money input { border: 0 !important; min-width: 0; padding-left: 4px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.vx-money:focus-within { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.vx-money input:focus-visible { outline: none; }
.vx input[type="number"], .vx input[name="amount"], .vx input[name="price"], .vx input[name="cost"] { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.vx .vx-x { width: 36px; padding: 0; color: var(--ink-3); }
.vx .vx-x:hover { color: var(--bad); background: var(--bad-soft); }
.vx .btn.vx-remove { color: var(--bad); }
.vx .btn.vx-remove:hover { background: var(--bad-soft); color: var(--bad); }
.vx-mempty { color: var(--ink-2); font-size: .92rem; }
.vx [hidden], .vx-golive[hidden], .vx-editform[hidden] { display: none !important; }
.vx-msec > .btn { justify-self: start; }
.vx .form-error.calm { margin: 0; }

/* ------------------------------------------------------------------ index tabs (one per venture) */
.vx-deskwrap { display: grid; min-width: 0; }
.vx-tabs {
  display: flex; align-items: flex-end; gap: 4px; padding: 0 10px; overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: thin; position: relative; z-index: 1; margin-bottom: -1px;
}
.vx-tab {
  flex: none; display: grid; gap: 1px; min-height: 48px; max-width: 15rem; padding: 7px 14px 8px;
  border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r) var(--r) 0 0;
  background: var(--surface-2); color: var(--ink-2); text-decoration: none; line-height: 1.2;
  transition: background-color .15s ease, color .15s ease;
}
.vx-tab:hover { background: var(--surface-3); color: var(--ink); }
.vx-tab-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-tab-status { font-size: .74rem; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.vx-tab[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 3px 0 var(--blue); padding-top: 9px; }
.vx-tab[aria-current="page"] .vx-tab-status { color: var(--blue); }
.vx-tab.is-shelved:not([aria-current]) { opacity: .75; }
.vx-tab-new { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); background: transparent; border-style: dashed; border-color: var(--field-line); }
.vx-tab-new:hover { background: var(--blue-soft); color: var(--blue); }
.vx-tab-new .icon { width: 1.1em; height: 1.1em; }
.vx-tab-new[aria-current="page"] { background: var(--surface); border-style: solid; border-color: var(--line); }

/* ------------------------------------------------------------------ the book (the bench plate) */
.vx-book {
  display: grid; gap: 18px; padding: 20px; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 0 var(--r-lg) var(--r-lg) var(--r-lg);
  box-shadow: var(--shadow);
}
.vx-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.vx-vise { margin-top: 2px; }
.vx-name { font: 800 clamp(1.9rem, 1.4rem + 2vw, 2.6rem)/1 var(--font-display); text-transform: uppercase; letter-spacing: .01em; overflow-wrap: anywhere; }
.vx-tagline { margin-top: 6px; color: var(--ink-2); max-width: 60ch; }
.vx-edit-btn[aria-expanded="true"] { background: var(--surface-2); color: var(--ink); }
.vx-editform, .vx-golive { display: grid; gap: 12px; padding: 16px; border-radius: var(--r-lg); background: var(--surface-2); }
.vx-editgrid, .vx-golive-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.vx-ed-wide { grid-column: 1 / -1; }

/* ------------------------------------------------------------------ status ladder: a dimension line with stops */
.vx-status { display: grid; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.vx-status-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vx-ladder { list-style: none; margin: 0; padding: 0; flex: 1 1 22rem; max-width: 34rem; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.vx-rung { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; font-size: .78rem; font-weight: 700; line-height: 1.2; color: var(--ink-3); }
.vx-rung::before { content: ""; position: absolute; top: 11px; left: -50%; right: 50%; height: 2px; background: var(--line); }
.vx-rung:first-child::before { display: none; }
.vx-rung-mark { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--outline); background: var(--surface); }
.vx-rung.is-done { color: var(--ink-2); }
.vx-rung.is-done .vx-rung-mark { background: var(--paint); border-color: var(--paint); }
.vx-rung.is-done::before, .vx-rung.is-current::before { background: var(--paint); }
.vx-rung.is-current { color: var(--ink); }
.vx-rung.is-current .vx-rung-mark { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.vx-status-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vx-waiting { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.vx-waiting .icon { color: var(--ink-2); }
.vx-statusmenu { position: relative; }
.vx-statusmenu > summary .icon { width: 1em; height: 1em; transition: rotate .2s cubic-bezier(.16, 1, .3, 1); }
.vx-statusmenu[open] > summary { background: var(--surface-2); color: var(--ink); }
.vx-statusmenu[open] > summary .icon { rotate: 180deg; }
.vx-statusmenu-list { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 6px; }
.vx-notyet { max-width: 70ch; }
.vx-golive h3 { font-size: 1.1rem; }
.vx-golive-form { display: grid; gap: 14px; }
.vx-safety { padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.vx-safety h4 { font-size: .95rem; margin-bottom: 6px; }
.vx-safety ul, .vx-ap-safety { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; color: var(--ink-2); font-size: .92rem; }

/* ------------------------------------------------------------------ the spread: ledger page + margin */
.vx-spread { display: grid; gap: 28px; align-items: start; min-width: 0; }
@media (min-width: 1040px) { .vx-spread { grid-template-columns: minmax(0, 1fr) 19rem; } }
.vx-page { display: grid; gap: 18px; align-content: start; }

/* ------------------------------------------------------------------ the ledger */
.vx-ledger { display: grid; gap: 10px; min-width: 0; transition: opacity .15s ease; }
.vx-ledger.htmx-request { opacity: .6; }
.vx-wi-banner { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1.5px dashed var(--field-line); border-radius: var(--r); color: var(--ink); font-weight: 700; font-size: .92rem; }
.vx-wi-banner .icon { color: var(--blue); }
.vx-earlier { font-size: .9rem; }
.vx-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.vx-table th, .vx-table td { padding: 9px 8px; text-align: left; vertical-align: baseline; }
.vx-table thead th { padding-top: 0; font-size: .78rem; font-weight: 700; color: var(--ink-3); border-bottom: 1.5px solid var(--ink-2); white-space: nowrap; }
.vx-table .num { text-align: right; font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vx-table thead th.num { font-family: var(--font-body); font-weight: 700; }
/* money columns ruled like a ledger book: hairlines between Price | Cost | Profit */
.vx-table .c-cost, .vx-table .c-profit { border-left: 1px solid var(--line); }
.vx-line > tr:first-child > td { border-bottom: 1px solid var(--line); }
.vx-line:hover > tr:first-child > td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.c-date { font-family: var(--font-mono); font-size: .85rem; color: var(--ink-2); white-space: nowrap; width: 4.6rem; }
.vx-table thead .c-date { font-family: var(--font-body); }
.c-item { width: 100%; }
.vx-item { font-weight: 700; overflow-wrap: anywhere; }
.vx-kindtag { margin-left: 6px; font-size: .74rem; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.c-qty { width: 3rem; }
.vx-dash { color: var(--ink-3); }
.c-more { width: 40px; padding-left: 2px !important; padding-right: 0 !important; text-align: right; }
.vx-morebtn { width: 36px; height: 32px; display: inline-grid; place-items: center; border: 0; border-radius: var(--r); background: transparent; color: var(--ink-3); cursor: pointer; }
.vx-morebtn:hover { background: var(--surface-2); color: var(--ink); }
.vx-morebtn .icon { width: 1.05em; height: 1.05em; transition: rotate .2s cubic-bezier(.16, 1, .3, 1); }
.vx-morebtn[aria-expanded="true"] .icon { rotate: 180deg; }
.vx-line-more > td { padding: 0 0 10px !important; border-bottom: 1px solid var(--line); }
.vx-line-detail { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); }
.vx-line-facts { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; }
.vx-line-facts > div { display: grid; }
.vx-line-facts dt { font-size: .74rem; font-weight: 700; color: var(--ink-3); }
.vx-line-facts dd { margin: 0; font: 500 .9rem var(--font-mono); font-variant-numeric: tabular-nums; }
.vx-line-facts .d-note dd { font: 400 .92rem var(--font-body); overflow-wrap: anywhere; }
.vx-line-facts .d-phone { display: none; }

/* the totals rule: a single rule above, profit to date double-underlined (accounting style) */
.vx-totalrow > * { padding-top: 12px !important; border-top: 1.5px solid var(--ink); font-weight: 700; }
.vx-totalrow th { font-weight: 700; white-space: nowrap; }
.vx-profit { display: inline-block; padding-bottom: 2px; border-bottom: 3px double var(--ink); font-size: 1.05rem; }

/* what-if: imagined numbers wear a dashed box (dashed means not yet) */
.vx-line.is-whatif .c-price .vx-n, .vx-line.is-whatif .c-profit .vx-n,
.vx-ledger.is-whatif .vx-profit, .vx-ledger.is-whatif .vx-facts .vx-n,
.vx-onums.is-whatif .vx-n, .vx-wi-res .vx-n {
  padding: 0 4px; border: 1.5px dashed var(--ink-3); border-radius: var(--r-sm);
}
.vx-ledger.is-whatif .vx-profit { border-bottom-style: dashed; }

/* empty ledger: dashed ruled lines waiting for writing */
.vx-blank-cell { padding: 14px 8px !important; color: var(--ink-2); border-bottom: 1.5px dashed var(--line); }
.vx-blank-row td { height: 38px; border-bottom: 1.5px dashed var(--line); }

/* facts line under the totals */
.vx-facts { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 0; padding-top: 4px; }
.vx-facts > div { display: grid; gap: 1px; }
.vx-facts dt { font-size: .76rem; font-weight: 700; color: var(--ink-3); }
.vx-facts dd { margin: 0; font-weight: 700; color: var(--ink); }
.vx-facts .vx-n, .vx-facts .mono { font-weight: 500; }

/* ------------------------------------------------------------------ add a line (dashed: not yet) */
.vx-addline { display: grid; gap: 12px; padding: 16px; border: 1.5px dashed var(--line); border-radius: var(--r-lg); }
.vx-addline-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.vx-add-h { font-size: 1rem; }
.vx-seg { display: inline-flex; flex-wrap: wrap; width: fit-content; max-width: 100%; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.vx-seg legend { position: absolute; }
.vx-seg-btn { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px; color: var(--ink-2); font-weight: 700; font-size: .95rem; cursor: pointer; text-decoration: none; transition: background-color .15s ease, color .15s ease; }
.vx-seg-btn + .vx-seg-btn { border-left: 1px solid var(--line); }
.vx-seg-btn:hover { background: var(--surface-2); color: var(--ink); }
.vx-seg-btn input { position: absolute; opacity: 0; pointer-events: none; }
.vx-seg-btn:has(input:checked), .vx-seg-btn[aria-current="page"] { background: var(--blue); color: var(--blue-ink); }
.vx-seg-btn:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: -3px; }
.vx-addgrid { display: grid; gap: 10px 12px; grid-template-columns: 9.5rem minmax(0, 1.4fr) 5rem 7.5rem; grid-template-areas: "day what qty amt" "note note note note"; }
.vx-addgrid .f-day { grid-area: day; }
.vx-addgrid .f-offer, .vx-addgrid .f-label { grid-area: what; }
.vx-addgrid .f-qty { grid-area: qty; }
.vx-addgrid .f-amt { grid-area: amt; }
.vx-addgrid .f-note { grid-area: note; }
.vx-addline-foot { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
.vx-addline-foot .hint { margin: 0; }
/* Sale shows the offer picker (and a name box only for "Something else"); Cost/Startup show the name box. */
.vx-addline .when-notsale, .vx-addline .when-cost, .vx-addline .when-startup { display: none; }
.vx-addline:has(input[value="cost"]:checked) .when-sale, .vx-addline:has(input[value="startup"]:checked) .when-sale { display: none; }
.vx-addline:has(input[value="cost"]:checked) .when-notsale, .vx-addline:has(input[value="startup"]:checked) .when-notsale { display: inline; }
.vx-addline:has(input[value="cost"]:checked) .when-cost, .vx-addline:has(input[value="startup"]:checked) .when-startup { display: block; }
.vx-addline:has(input[value="sale"]:checked):has(#vx-e-offer option[value=""]:checked) .f-offer { grid-area: what; }
.vx-addline:has(input[value="sale"]:checked):not(:has(#vx-e-offer option[value=""]:checked)) .f-label { display: none; }
.vx-addline:has(input[value="sale"]:checked):has(#vx-e-offer option[value=""]:checked) .vx-addgrid { grid-template-areas: "day what qty amt" "label label note note"; }
.vx-addline:has(input[value="sale"]:checked):has(#vx-e-offer option[value=""]:checked) .f-label { grid-area: label; }

/* ------------------------------------------------------------------ the margin */
.vx-margin { display: grid; gap: 0; align-content: start; }
.vx-msec { display: grid; gap: 12px; padding: 16px 0; position: relative; }
.vx-msec:first-child { padding-top: 0; }
/* margin sections are divided by dimension lines: |———| */
.vx-msec + .vx-msec { border-top: 1px solid var(--line); }
.vx-msec + .vx-msec::before, .vx-msec + .vx-msec::after { content: ""; position: absolute; top: -5px; width: 1px; height: 9px; background: var(--ink-3); }
.vx-msec + .vx-msec::before { left: 0; }
.vx-msec + .vx-msec::after { right: 0; }
.vx-mh { font: 700 1rem/1.3 var(--font-body); }
@media (min-width: 1040px) {
  .vx-margin { padding-left: 22px; border-left: 1px solid var(--line); }
}

/* price sheet */
.vx-offer { display: grid; gap: 8px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.vx-offer:last-of-type { border-bottom: 0; }
.vx-offer-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; }
.vx-offer-name { font: 700 1rem/1.3 var(--font-body); overflow-wrap: anywhere; }
.vx-offer-price { white-space: nowrap; }
.vx-offer-price .mono { font-size: 1.05rem; font-weight: 500; }
.vx-per { font-size: .82rem; color: var(--ink-3); font-weight: 700; }
.vx-onums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin: 0; }
.vx-onums > div { display: grid; }
.vx-onums dt { font-size: .74rem; font-weight: 700; color: var(--ink-3); }
.vx-onums dd { margin: 0; font: 500 .92rem var(--font-mono); font-variant-numeric: tabular-nums; }
.vx-onums .vx-on-none { grid-column: 1 / -1; }
.vx-onums .vx-on-none dd { font: 400 .9rem var(--font-body); color: var(--ink-2); }
.vx-onums .vx-on-try { grid-column: 1 / -1; }
.vx-offer-body { display: grid; gap: 12px; padding-top: 4px; }
.vx-mats { list-style: none; margin: 0; padding: 0; display: grid; }
.vx-mat { display: grid; grid-template-columns: minmax(0, 1fr) auto 36px; gap: 8px; align-items: center; min-height: 40px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.vx-mat-name { overflow-wrap: anywhere; }
.vx-mat-cost { text-align: right; white-space: nowrap; color: var(--ink-2); }
.vx-mat-cost .mono { color: var(--ink); }
.vx-mat-total { border-top: 1.5px solid var(--ink-2); border-bottom: 0; font-weight: 700; }
.vx-mat-total .vx-mat-cost { color: var(--ink); }
.vx-matform, .vx-mform { display: grid; gap: 10px; }
.vx-matgrid { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) 6.5rem 4.5rem; }
.vx-mform-row { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.vx-offer-form { padding-top: 12px; border-top: 1px solid var(--line); }
.vx-addoffer > summary { width: fit-content; }
.vx-addoffer[open] > summary { background: var(--surface-2); }
.vx-addoffer .vx-mform { margin-top: 12px; }

/* what if */
.vx-wi-q { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-weight: 700; }
.vx-wi-part { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.vx-wi-part:first-child { flex: 1 1 100%; }
.vx-wi-q label { font-weight: 700; white-space: nowrap; }
.vx-wi-q select { width: auto; min-width: 0; max-width: 100%; flex: 1 1 auto; }
.vx-wi-money { width: 7.5rem; border-style: dashed; border-width: 1.5px; }
.vx-wi-out { display: grid; gap: 10px; }
.vx-wi-hint { color: var(--ink-2); font-size: .92rem; }
.vx-wi-res { display: grid; gap: 8px; margin: 0; }
.vx-wi-res > div { display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr); gap: 8px; align-items: baseline; }
.vx-wi-res dt { font-size: .8rem; font-weight: 700; color: var(--ink-3); }
.vx-wi-res dd { margin: 0; font-weight: 700; }
.vx-wi-big dd .vx-n { font-size: 1.1rem; }
.vx-was { font-size: .8rem; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.vx-delta { font-size: .9rem; color: var(--ink-2); }
.vx-wi-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* partner notes */
.vx-note { margin: 0; padding: 10px 12px; border-radius: var(--r); background: var(--paint-soft); font-size: .95rem; line-height: 1.5; }

/* ------------------------------------------------------------------ filed folders */
.vx-folders { display: grid; min-width: 0; }
.vx-ftabs { display: flex; gap: 4px; padding: 0 10px; overflow-x: auto; position: relative; z-index: 1; margin-bottom: -1px; scrollbar-width: thin; }
.vx-ftab {
  flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 16px;
  border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r) var(--r) 0 0; background: var(--surface-2);
  color: var(--ink-2); font-weight: 700; text-decoration: none; transition: background-color .15s ease, color .15s ease;
}
.vx-ftab .icon { width: 1.1em; height: 1.1em; }
.vx-ftab:hover { background: var(--surface-3); color: var(--ink); }
.vx-ftab[aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 3px 0 var(--blue); }
.vx-ftab[aria-current="true"] .icon { color: var(--blue); }
.vx-ftab-n { min-width: 22px; padding: 1px 6px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--ink); font: 500 .74rem/1.4 var(--font-mono); text-align: center; }
.vx-folder-body { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 0 var(--r-lg) var(--r-lg) var(--r-lg); min-width: 0; }
.vx-fhead { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; }
.vx-fhead h3, .vx-ms h3, .vx-links h3 { font-size: 1.1rem; }
.vx-fsave { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
.vx-fsave .hint { margin: 0; }

/* plan canvas */
.vx-plan { display: grid; gap: 28px; align-items: start; }
@media (min-width: 1100px) { .vx-plan { grid-template-columns: minmax(0, 1fr) 19rem; } }
.vx-canvas { display: grid; gap: 14px; }
.vx-canvas-grid { display: grid; gap: 12px 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.vx-cell textarea { min-height: 84px; }
.vx-cell:target textarea { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.vx-plan-side { display: grid; gap: 28px; align-content: start; }
.vx-ms, .vx-links { display: grid; gap: 10px; }
.vx-mslist, .vx-linklist { list-style: none; margin: 0; padding: 0; display: grid; }
.vx-msrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; min-height: 48px; border-bottom: 1px solid var(--line); }
.vx-check { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 1.5px solid var(--outline); border-radius: var(--r-sm); background: var(--surface); color: transparent; cursor: pointer; transition: background-color .15s ease; }
.vx-check .icon { width: 18px; height: 18px; stroke-width: 3; }
.vx-check:hover { border-color: var(--blue); }
.vx-msrow.is-done .vx-check { background: var(--paint); border-color: var(--paint); color: var(--paint-ink); }
.vx-msrow.is-done .vx-ms-title { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--paint); text-decoration-thickness: 3px; }
.vx-ms-title { overflow-wrap: anywhere; font-weight: 700; }
.vx-ms-title .pill { margin-left: 4px; vertical-align: 1px; }
.vx-ms-date { font-size: .82rem; color: var(--ink-2); }
.vx-inlineadd { display: grid; gap: 10px; padding-top: 4px; }
.vx-inlinegrid { display: grid; gap: 8px 10px; grid-template-columns: minmax(0, 1fr); }
.vx-inlineadd .btn { justify-self: start; }
.vx-linkrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 48px; border-bottom: 1px solid var(--line); }
.vx-linkrow a { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
.vx-linkrow a .icon { width: 1em; height: 1em; flex: none; }

/* ads */
.vx-ads { display: grid; gap: 22px; }
.vx-newad > summary { width: fit-content; }
.vx-newad[open] > summary { background: var(--surface-2); }
.vx-adform { display: grid; gap: 14px; margin-top: 14px; max-width: 46rem; }
.vx-ad { display: grid; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.vx-ad-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; }
.vx-ad-titles { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.vx-ad-title { font-size: 1.15rem; overflow-wrap: anywhere; }
.vx-ad-meta { font-size: .82rem; font-weight: 700; color: var(--ink-3); }
/* the piece itself, on a sheet of paper (Read mode inside the folder) */
.vx-ad-sheet { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); max-width: 46rem; padding: 18px 20px; border-radius: var(--r); background: var(--board); border: 1px solid var(--line); }
@media (min-width: 720px) { .vx-ad-sheet:has(.vx-ad-photo) { grid-template-columns: minmax(0, 1fr) 11rem; } }
.vx-ad-body { white-space: pre-line; overflow-wrap: anywhere; line-height: 1.6; max-width: 62ch; }
.vx-ad-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface-2); }
.vx-ad-tools { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.vx-newver { flex: 1 1 20rem; }
.vx-newver[open] > summary { background: var(--surface-2); color: var(--ink); }
.vx-history { max-width: 46rem; }
.vx-histlist { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.vx-histlist li { display: grid; gap: 4px; padding: 10px 12px; border-radius: var(--r); border: 1px dashed var(--line); }

/* proof */
.vx-proof { display: grid; gap: 16px; }
.vx-prooflist { list-style: none; margin: 0; padding: 0; display: grid; }
.vx-proofrow { display: grid; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.vx-proofrow:first-child { padding-top: 0; }
.vx-proof-head { display: flex; align-items: baseline; gap: 8px 10px; flex-wrap: wrap; }
.vx-proof-title { overflow-wrap: anywhere; }
.vx-proof-codes { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; }
.vx-proof-date { font-size: .82rem; color: var(--ink-3); }
.vx-proof-sum { color: var(--ink-2); max-width: 70ch; font-size: .95rem; }
.vx-proof > .btn, .vx-partner > .btn { width: fit-content; }

/* partner */
.vx-partner { display: grid; gap: 16px; }
.vx-partner-notes { display: grid; gap: 8px; max-width: 60ch; }

/* ------------------------------------------------------------------ the empty ledger / new venture */
.vx-book-new { gap: 20px; }
.vx-new-h { font: 800 clamp(1.9rem, 1.4rem + 2vw, 2.6rem)/1.02 var(--font-display); text-transform: uppercase; letter-spacing: .01em; max-width: 22ch; }
.vx-new-form { display: grid; gap: 16px; max-width: 44rem; }
.vx-new-form .chip .icon { width: 1.1em; height: 1.1em; }
.vx-blankpage { display: grid; max-width: 44rem; }
.vx-blank-head { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr) 3rem 4.5rem 4.5rem 4.5rem; gap: 8px; padding-bottom: 6px; border-bottom: 1.5px solid var(--ink-3); font-size: .78rem; font-weight: 700; color: var(--ink-3); }
.vx-blank-head span:nth-child(n+3) { text-align: right; }
.vx-blank-line { height: 34px; border-bottom: 1.5px dashed var(--line); }

/* ------------------------------------------------------------------ phones: Item · Qty · Profit + a row expander */
@media (max-width: 640px) {
  .vx-book { padding: 16px; gap: 16px; border-radius: 0 var(--r-lg) var(--r-lg) var(--r-lg); }
  .vx-head { grid-template-columns: minmax(0, 1fr) auto; }
  .vx-vise { display: none; }
  .vx-tabs, .vx-ftabs { padding: 0 6px; }
  .vx-tab { max-width: 11rem; padding-inline: 12px; }
  .vx-table .c-date, .vx-table .c-price, .vx-table .c-cost { display: none; }
  .vx-table .c-profit { border-left: 0; }
  .vx-line-facts .d-phone { display: grid; }
  .vx-addgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "what what" "qty amt" "day day" "note note"; }
  .vx-addline:has(input[value="sale"]:checked):has(#vx-e-offer option[value=""]:checked) .vx-addgrid { grid-template-areas: "what what" "label label" "qty amt" "day day" "note note"; }
  .vx-addgrid .f-amt { grid-column: auto; }
  .vx-ladder { flex-basis: 100%; }
  .vx-rung { font-size: .72rem; }
  .vx-folder-body { padding: 16px; }
  .vx-blank-head { grid-template-columns: minmax(0, 1fr) 3rem 4.5rem; }
  .vx-blank-head span:nth-child(1), .vx-blank-head span:nth-child(4), .vx-blank-head span:nth-child(5) { display: none; }
}
@media (pointer: coarse) {
  .vx-morebtn { width: 44px; height: 44px; }
  .vx .vx-x { width: 44px; }
  .vx-check { width: 32px; height: 32px; }
  .vx-msrow form { display: grid; place-items: center; min-width: 44px; min-height: 44px; }
}

/* ------------------------------------------------------------------ parent office (read-only), panel, go-live renderer */
.vx-office .vx-op { display: grid; gap: 14px; }
.vx-op-name { font-size: var(--step-2); overflow-wrap: anywhere; }
.vx-op .panel-head { margin-bottom: 0; align-items: flex-start; }
.vx-op-total th, .vx-op-total td { font-weight: 700; border-top: 1.5px solid var(--ink); }
.vx-op-facts { color: var(--ink-2); }
.vx-op-dl, .vx-ap-dl { display: grid; gap: 8px; margin: 0; }
.vx-op-dl > div, .vx-ap-dl > div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 4px 12px; }
.vx-op-dl dt, .vx-ap-dl dt { font-size: .85rem; font-weight: 700; color: var(--ink-2); }
.vx-op-dl dd, .vx-ap-dl dd { margin: 0; overflow-wrap: anywhere; }
.vx-pre { white-space: pre-line; }
.vx-ap-h { font-size: .95rem; margin-bottom: 4px; }
.vx-ap-offers { max-width: 30rem; }
.vx-pp-table td.vx-pp-name { overflow-wrap: anywhere; min-width: 8rem; }
.vx-pp-wait { text-decoration: none; color: inherit; }
.vx-pp-wait .min0 { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .vx-op-dl > div, .vx-ap-dl > div { grid-template-columns: minmax(0, 1fr); }
}
.vx-op-total th { background: transparent; color: var(--ink); font-size: .95rem; }
.vx-op-ledger td:first-child { white-space: nowrap; }
.vx-proof-head a.vx-proof-title { font-weight: 700; }
