/* Dealer catalogue sites. Neutrals, type sizes and radii are the trade
   catalogue's own tokens (copied from the design preview); one accent colour
   per shop, from the fixed safe list (src/config.mjs ACCENTS). System fonts
   only: nothing is loaded from anywhere else. */
:root {
  --ink:      oklch(0.17 0.006 260);
  --ink-2:    oklch(0.45 0.010 260);
  --ink-3:    oklch(0.55 0.008 260);
  --ground:   oklch(1 0 0);
  --ground-2: oklch(0.972 0.002 260);
  --ground-3: oklch(0.940 0.003 260);
  --line:     oklch(0.895 0.004 260);
  --line-2:   oklch(0.82 0.006 260);
  --signal:   oklch(0.55 0.20 27);
  --accent:     oklch(0.45 0.13 240);
  --accent-ink: oklch(1 0 0);
  --accent-bg:  oklch(0.96 0.02 240);
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px;
  --t-xs: 0.75rem; --t-sm: 0.8125rem; --t-base: 0.9375rem; --t-lg: 1.125rem; --t-xl: 1.375rem;
  --page: 76rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: var(--ground);
}
.accent-blue     { --accent: oklch(0.45 0.13 240); --accent-bg: oklch(0.96 0.02 240); }
.accent-ocean    { --accent: oklch(0.44 0.09 225); --accent-bg: oklch(0.96 0.02 225); }
.accent-plum     { --accent: oklch(0.42 0.14 320); --accent-bg: oklch(0.96 0.02 320); }
.accent-rose     { --accent: oklch(0.45 0.15 355); --accent-bg: oklch(0.96 0.02 355); }
.accent-slate    { --accent: oklch(0.40 0.03 250); --accent-bg: oklch(0.96 0.01 250); }
.accent-charcoal { --accent: oklch(0.30 0.01 260); --accent-bg: oklch(0.95 0.005 260); }

/* Dark colours. Shop pages follow the phone's own dark mode as before. The back office (html.office-html) never
   does: it is light unless the dealer picks dark with its switch (row 4ead, Mithun 22 Nov: "it's too dark"). */
@media (prefers-color-scheme: dark) {
  :root:not(.office-html) {
    --ink: oklch(0.95 0.004 260); --ink-2: oklch(0.78 0.008 260); --ink-3: oklch(0.68 0.008 260);
    --ground: oklch(0.19 0.006 260); --ground-2: oklch(0.23 0.006 260); --ground-3: oklch(0.29 0.006 260);
    --line: oklch(0.32 0.006 260); --line-2: oklch(0.40 0.006 260);
  }
  :root:not(.office-html) .tag { background: var(--accent); color: var(--accent-ink); }
}
html.office-html[data-theme="dark"] {
  --ink: oklch(0.95 0.004 260); --ink-2: oklch(0.78 0.008 260); --ink-3: oklch(0.68 0.008 260);
  --ground: oklch(0.21 0.006 260); --ground-2: oklch(0.17 0.006 260); --ground-3: oklch(0.29 0.006 260);
  --line: oklch(0.32 0.006 260); --line-2: oklch(0.40 0.006 260);
  color-scheme: dark;
}
html.office-html { color-scheme: light; }
html.office-html[data-theme="dark"] .tag { background: var(--accent); color: var(--accent-ink); }

* { box-sizing: border-box; }
body { margin: 0; font-size: var(--t-base); line-height: 1.4; background: var(--ground); color: var(--ink); }
body.shop { padding-bottom: 5rem; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent); }
.preview-flag { background: var(--ink); color: var(--ground); font-size: var(--t-xs); text-align: center; padding: 4px 8px; letter-spacing: .02em; }
.closed-flag { background: var(--signal); color: #fff; }
.wrap { max-width: var(--page); margin: 0 auto; padding: 0 12px; }
.narrow { max-width: 34rem; padding-top: 24px; }
.signin { text-align: center; padding-top: 40px; }
.mark.signin-mark { display: block; margin: 0 auto 12px; width: auto; height: 64px; max-width: 180px; }
.signin-hello { color: var(--ink-2); }

header.top { border-bottom: 1px solid var(--line); background: var(--ground); position: sticky; top: 0; z-index: 5; }
.top-row { display: flex; align-items: center; gap: 10px; min-height: 56px; }
/* The shop's own logo, at its own shape (never squeezed into a square or a circle). Without a logo, only the name. */
.mark { height: 44px; width: auto; max-width: 140px; flex: none; }
/* Small phones: a wide logo gets less room, so a long shop name wraps beside it and never pushes into the Call button (Codex r1, row c0b3). */
.top .shop { overflow-wrap: anywhere; } /* a long name or town wraps, never into the Call button (Codex r4-r5) */
@media (max-width: 420px) { .mark { max-width: 96px; height: 40px; } }
.top .shop { min-width: 0; flex: 1; }
.top .shop b { display: block; font-size: var(--t-xl); font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; }
.top .shop span { color: var(--ink-2); font-size: var(--t-xs); }
.call { flex: none; min-height: 44px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--ground); color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; font-size: var(--t-sm); }

.search { padding: 10px 0 6px; }
.search input { width: 100%; min-height: 44px; border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 0 12px; background: var(--ground-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 10px; }
.chip { flex: 0 1 auto; max-width: 100%; min-height: 44px; padding: 4px 14px; overflow-wrap: anywhere; text-align: center; border-radius: 999px; border: 1px solid var(--line-2); background: var(--ground); font-size: var(--t-sm); color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; }
.chip[aria-current="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.chips.shop-sort { align-items: center; padding: 4px 0 10px; color: var(--ink-2); font-size: var(--t-sm); }

h2.section { font-size: var(--t-lg); color: var(--ink); font-weight: 700; margin: 12px 0 10px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px)  { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } .wrap { padding: 0 24px; } }
@media (min-width: 1280px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.card { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; background: var(--ground); }
.plate { aspect-ratio: 1; background: #fff; border-bottom: 1px solid var(--line); display: grid; place-items: center; }
.plate img { width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; user-select: none; }
.no-photo { color: #6b7280; font-size: var(--t-xs); }
.card .body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.brand { font-size: var(--t-xs); color: var(--ink-2); min-height: 1.2em; }
.tag { font-size: 0.6875rem; border-radius: var(--r-sm); padding: 1px 6px; background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.name { font-size: var(--t-base); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.price { margin-top: auto; padding-top: 4px; display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.price b { font-size: var(--t-lg); }
.price small { color: var(--ink-2); font-size: var(--t-xs); }
.ask { color: var(--ink-2); font-size: var(--t-sm); }
.moq { color: var(--ink-2); font-size: var(--t-xs); }
.mrp { color: var(--ink-2); font-size: var(--t-xs); }
.add { min-height: 44px; border-radius: var(--r-md); border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 600; margin-top: 6px; cursor: pointer; }
.add[aria-pressed="true"] { background: var(--ground-3); color: var(--ink); }
.empty { color: var(--ink-2); padding: 24px 0; }
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; padding: 16px 0; }
.pager a { min-height: 44px; display: inline-flex; align-items: center; }

.basket { position: fixed; left: 0; right: 0; bottom: 0; background: var(--ground); border-top: 1px solid var(--line-2); z-index: 6; }
.basket .wrap { display: flex; align-items: center; gap: 10px; min-height: 64px; }
.basket .sum { flex: 1; font-size: var(--t-sm); color: var(--ink-2); }
.basket .sum b { color: var(--ink); font-size: var(--t-base); }
.basket form { margin: 0; }
.basket .list { flex: 1; min-width: 0; }
.basket .list[hidden] { display: none; }
.basket .list summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.basket .list[open] .lines { position: absolute; left: 0; right: 0; bottom: 100%; max-height: 50vh; overflow: auto; background: var(--ground); border-top: 1px solid var(--line-2); padding: 0 16px; }
.line { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); align-items: center; }
.line .ln { flex: 1; }
.basket button { min-height: 48px; padding: 0 18px; border: 0; border-radius: var(--r-md); background: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer; }
.basket button:disabled { background: var(--ground-3); color: var(--ink-3); cursor: default; }
/* Row ef52: the name-and-mobile sheet. Over the bar (like the open list) on the shop page; in the page on its own page. */
.who { display: grid; gap: 6px; background: var(--ground); padding: 14px 16px 16px; }
.who[hidden] { display: none; }
.basket .who { position: absolute; left: 0; right: 0; bottom: 100%; max-height: 80vh; overflow: auto; border-top: 1px solid var(--line-2); box-shadow: 0 -8px 24px rgb(0 0 0 / 0.12); }
.who h2 { font-size: var(--t-lg); margin: 0; }
.who .who-why { margin: 0 0 4px; font-size: var(--t-sm); color: var(--ink-2); }
.who label { font-size: var(--t-sm); font-weight: 600; margin-top: 4px; }
.who .who-need { font-weight: 400; color: var(--ink-2); }
.who input { width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--ground); font-size: 1rem; }
.who input[aria-invalid="true"] { border-color: #c62828; }
.who .who-err { margin: 0; color: #c62828; font-size: var(--t-sm); font-weight: 600; }
.who .who-err[hidden] { display: none; }
.who .who-row { display: flex; gap: 10px; margin-top: 8px; }
.who .who-row [hidden] { display: none; }
.who #send { flex: 1; min-height: 48px; padding: 0 18px; border: 0; border-radius: var(--r-md); background: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer; }
.who #send:disabled { background: var(--ground-3); color: var(--ink-3); cursor: default; }
.who .who-back { min-height: 48px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--ground); color: var(--ink); font-weight: 600; cursor: pointer; }
.who-page .who { padding: 0; }
.order-phone { font-weight: 600; white-space: nowrap; }

footer.foot { color: var(--ink-2); font-size: var(--t-xs); padding: 24px 0 8px; }

.qty { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.qty[hidden] { display: none; }
.qty button { min-width: 44px; min-height: 44px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--ground); cursor: pointer; }
.qty output { min-width: 2.5em; text-align: center; }
.primary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; border: 0; border-radius: var(--r-md); background: var(--accent); color: var(--accent-ink); font-weight: 700; margin-top: 14px; text-decoration: none; cursor: pointer; }
.primary.big { min-height: 56px; font-size: var(--t-lg); }
.quiet { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; border: 0; background: none; color: var(--ink-2); margin-top: 6px; cursor: pointer; }
.note { font-size: var(--t-xs); color: var(--ink-2); }
pre.message { white-space: pre-wrap; background: var(--ground-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; font-size: var(--t-sm); }

/* Back office and Mithun's screens */
.tabs { display: flex; gap: 4px; overflow-x: auto; }
.tabs a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 12px; color: var(--ink); text-decoration: none; font-size: var(--t-sm); }
.office-main { padding-top: 12px; padding-bottom: 48px; }
.office-main h1 { font-size: var(--t-xl); }
.panel { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; margin: 14px 0; list-style: none; }
.panel h2 { font-size: var(--t-lg); margin: 0 0 8px; }
.office label { display: inline-flex; flex-direction: column; gap: 2px; font-size: var(--t-sm); margin: 4px 8px 4px 0; }
.office label.check { flex-direction: row; align-items: center; gap: 6px; }
.office input:not([type=checkbox]):not([type=hidden]), .office select { min-height: 44px; border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 0 10px; background: var(--ground); }
.office button { min-height: 44px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--ground-2); cursor: pointer; }
.office button.primary-inline { background: var(--accent); color: var(--accent-ink); border: 0; font-weight: 600; }
.office button.danger { color: var(--signal); }
.row-fields { display: flex; flex-wrap: wrap; align-items: flex-end; }
.muted { color: var(--ink-2); }
.pill { font-size: var(--t-xs); border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 8px; }
.pill.warn { border-color: var(--signal); color: var(--signal); }
.flash { background: var(--ground-2); border-left: 4px solid var(--accent); padding: 8px 12px; }
table.preview { width: 100%; border-collapse: collapse; font-size: var(--t-sm); display: block; overflow-x: auto; }
table.preview th, table.preview td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
/* On a phone the price preview fits the screen: each product is a small card, each figure on its own line with its name. */
@media (max-width: 639px) {
  table.preview, table.preview tbody, table.preview tr, table.preview td { display: block; width: 100%; overflow: visible; }
  table.preview thead { display: none; }
  table.preview tr { border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px 10px; margin: 0 0 8px; }
  table.preview td { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  table.preview td:first-child { font-weight: 600; padding-bottom: 4px; }
  table.preview td[data-label]:not(:first-child)::before { content: attr(data-label); color: var(--ink-2); flex: none; }
}
ul.groups, ul.owns, ul.orders, ul.dealers, ul.settings { padding: 0; list-style: none; }
li.group, li.own, li.order, ul.settings li { border-bottom: 1px solid var(--line); padding: 10px 0; }
li.own { display: flex; gap: 12px; flex-wrap: wrap; }
.own-photo img { border-radius: var(--r-md); border: 1px solid var(--line); background: #fff; }
/* Own products page (row 9854): "+ Add new" line under each pick box; the note finder */
.office button.add-new { display: block; margin: -4px 0 10px; padding: 6px 0; min-height: 36px; border: 0; background: none; color: var(--accent, var(--ink)); font-size: var(--t-sm); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
[data-note-picker] li[hidden], .office button.add-new[hidden], .office button[data-note-more][hidden] { display: none; }
.note-find { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; }
.note-find label { flex: 1 1 200px; }
.note-find input, .note-find select { width: 100%; min-height: 44px; }
form.inline { display: inline; }
code { overflow-wrap: anywhere; }

/* Filters on the shop page (round 2): brand buttons above, product type and category below. */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; padding: 0 0 10px; }
.filter { display: inline-flex; flex-direction: column; gap: 2px; font-size: var(--t-xs); color: var(--ink-2); flex: 1 1 9rem; min-width: 0; }
.filter select { min-height: 44px; border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 0 10px; background: var(--ground); color: var(--ink); font-size: var(--t-sm); width: 100%; }
.filters .apply { min-height: 44px; padding: 0 16px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--ground-2); cursor: pointer; }
h2.section .clear { min-height: 44px; display: inline-flex; align-items: center; margin-left: 8px; text-transform: none; letter-spacing: 0; font-weight: 400; }

/* THE LOOK of a shop's site (round 2): the dealer picks clean, bold or classic in the back office. All three keep
   the layout, the 44px tap sizes, the white photo plates and system fonts; only type, lines and the header change.
   Clean is the plain base look above, unchanged. */
.theme-bold { --r-md: 12px; --r-lg: 18px; }
.theme-bold header.top { background: var(--accent); border-bottom: 0; }
.theme-bold header.top .shop b, .theme-bold header.top .shop span { color: var(--accent-ink); }
.mark-logo { object-fit: contain; object-position: left center; }
.theme-bold .mark-logo { background: #fff; padding: 3px; border-radius: var(--r-sm); }
.theme-bold .call { background: var(--accent-ink); color: var(--accent); border-color: transparent; font-weight: 700; }
.theme-bold .card { border: 2px solid var(--ink); }
.theme-bold .name { font-size: var(--t-base); font-weight: 800; }
.theme-bold .price b { font-size: var(--t-xl); font-weight: 800; }
.theme-bold h2.section { color: var(--ink); font-size: var(--t-xl); font-weight: 800; }
.theme-bold .chip { border-width: 2px; font-weight: 700; }
.theme-bold .chip[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.theme-bold .add { text-transform: uppercase; letter-spacing: .03em; font-weight: 800; }
.theme-classic { font-family: Georgia, "Times New Roman", Times, serif; --r-sm: 2px; --r-md: 3px; --r-lg: 4px; }
.theme-classic header.top { border-bottom: 3px double var(--line-2); }
.theme-classic .top .shop b { font-weight: 400; letter-spacing: .01em; }
.theme-classic h2.section { text-transform: none; letter-spacing: 0; font-style: italic; font-weight: 400; font-size: var(--t-lg); color: var(--ink); border-bottom: 3px double var(--line-2); padding-bottom: 4px; }
.theme-classic .card { border-color: var(--line-2); }
.theme-classic .name { font-weight: 400; font-size: var(--t-base); }
.theme-classic .add { background: var(--ground); color: var(--accent); border: 1px solid var(--accent); font-weight: 400; }
.theme-classic .add[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.theme-classic .chip[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* The look page in the back office: a small sample of each look, drawn with that look's own rules above. */
.look-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 12px; margin: 12px 0; }
.office label.look-option { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 12px; margin: 0; cursor: pointer; }
.office label.look-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.look-option .check { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.look-sample { display: block; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--ground); color: var(--ink); }
.look-sample .ls-top { display: flex; align-items: center; gap: 8px; padding: 8px; border-bottom: 1px solid var(--line); }
.look-sample.theme-bold .ls-top { background: var(--accent); color: var(--accent-ink); border-bottom: 0; }
.look-sample.theme-classic .ls-top { border-bottom: 3px double var(--line-2); }
.look-sample .ls-section { display: block; padding: 8px 8px 0; font-size: var(--t-sm); color: var(--ink); font-weight: 700; }
.look-sample.theme-bold .ls-section { color: var(--ink); font-weight: 800; }
.look-sample.theme-classic .ls-section { text-transform: none; font-style: italic; font-weight: 400; font-size: var(--t-sm); }
.look-sample .ls-card { margin: 8px; padding: 8px; gap: 4px; }
.look-sample .ls-card .price { padding-top: 0; }
.look-sample .ls-card .add { display: flex; align-items: center; justify-content: center; min-height: 36px; }

/* Round 3: a page per product. The name on a card leads there; the shop's name in the header leads home. */
.top .shop a.home { color: inherit; text-decoration: none; }
.card .name a { color: inherit; text-decoration: none; }
.card .name a:hover, .card .name a:focus-visible { text-decoration: underline; }
.crumbs { padding: 10px 0 4px; }
.crumbs .back { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--t-sm); font-weight: 600; }
.product-one { max-width: 34rem; margin: 0 auto; padding-bottom: 12px; }
.card.one h1.name { font-size: var(--t-lg); margin: 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: var(--t-sm); margin: 12px 0; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; }

/* Round 3: problem reports (back office and Mithun's list), downloads, the sign-in mail counts. */
.office textarea { width: 100%; min-height: 6rem; border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 8px 10px; background: var(--ground); font: inherit; }
.office label:has(textarea) { display: flex; }
.voice { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 8px 0; }
ul.reports { padding: 0; list-style: none; }
li.report { border-bottom: 1px solid var(--line); padding: 10px 0; }
.report-text { white-space: normal; overflow-wrap: anywhere; }
.report-shot { display: block; max-width: 160px; height: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; margin: 6px 0; }
li.report audio { display: block; width: 100%; max-width: 360px; margin: 6px 0; }
.pill.status-received { border-color: var(--signal); color: var(--signal); }
.pill.status-fixing { border-color: var(--accent); color: var(--accent); }
.downloads { padding: 0; list-style: none; }
.downloads li { padding: 6px 0; }
.downloads a { display: inline-flex; align-items: center; min-height: 44px; }
table.counts { border-collapse: collapse; font-size: var(--t-sm); }
table.counts th, table.counts td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); }

/* Row 3d0b: a dealer's description or note on a product page */
.desc { margin: 12px 0; line-height: 1.5; max-width: 60ch; }

.desc { overflow-wrap: anywhere; }

/* Row fb62: the new shop's look picker and its live preview. */
/* Ten looks as one plain row of choices that wraps, not ten same-size boxes. */
.shop-looks { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 10px 0; }
.office .shop-looks label.look-option { display: inline-flex; border: 0; padding: 0; margin: 0; }
.office .shop-looks label.look-option:has(input:checked) { box-shadow: none; }
.shop-looks .look-option b { font-weight: 600; }
.colour-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 10px 0; }
.colour-row input[type=color] { width: 56px; height: 40px; padding: 0; border: 1px solid var(--line-2); border-radius: 8px; vertical-align: middle; }
/* Row 04b8: the Look page preview is the new shop drawn small: the SAME look variables as shop/app/globals.css (copied
   by script; test/look-preview.test.mjs checks every look's block matches), so every one of the ten looks changes the
   box (ground, header, type, corners, borders, hero, buttons). The dealer's colours arrive as --brand etc. from manage.js. */
.shop-preview {
  --ground: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f5f7;
  --ink: #14171c;
  --ink-2: #4b5260;
  --ink-3: #6b7280;
  --line: #e3e5e9;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 1px 3px rgb(16 24 40 / 8%);
  --shadow-up: 0 10px 24px -8px rgb(16 24 40 / 22%), 0 4px 8px -4px rgb(16 24 40 / 10%);
  --card-border: 1px solid var(--line);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: var(--font);
  --head-weight: 750;
  --head-case: none;
  --head-track: -0.01em;
  --price-size: 1.15rem;
  --btn-radius: 999px;
  --top-bg: color-mix(in srgb, var(--ground) 88%, transparent);
  --top-ink: var(--ink);
  --hero-bg: var(--tint);
  --hero-ink: var(--ink);
  --photo-bg: #f3f4f6;
  
  
  
  
}

/* ---------------------------------------------------------------- the ten looks */
.shop-preview[data-look="clean"] { }
.shop-preview[data-look="bold"] {
  --head-weight: 850; --price-size: 1.35rem; --radius: 10px; --radius-sm: 8px; --btn-radius: 10px;
  --card-border: 2px solid var(--line); --top-bg: var(--brand); --top-ink: var(--brand-ink);
  --hero-bg: var(--brand); --hero-ink: var(--brand-ink);
}
.shop-preview[data-look="classic"] {
  --ground: #fbf8f2; --surface: #fffdf8; --surface-2: #f3eee3; --line: #ddd3c0; --ink: #221d16; --ink-2: #5b5244; --ink-3: #7a705f;
  --font-head: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --head-weight: 600; --head-track: 0; --radius: 4px; --radius-sm: 3px; --btn-radius: 4px;
  --card-border: 3px double var(--line); --shadow: none; --photo-bg: #f1ece1;
  --hero-bg: var(--surface-2);
}
.shop-preview[data-look="showroom"] {
  --ground: #f1f2f4; --surface: #ffffff; --surface-2: #e8eaee; --line: transparent; --radius: 22px; --radius-sm: 14px;
  --shadow: 0 2px 6px rgb(16 24 40 / 6%), 0 8px 24px -12px rgb(16 24 40 / 18%); --card-border: 0;
  --photo-bg: #ffffff; --hero-bg: #ffffff;
}
.shop-preview[data-look="midnight"] {
  --ground: #0e1116; --surface: #161a22; --surface-2: #1d222c; --line: #2a303c; --ink: #eef1f6; --ink-2: #b3bac7; --ink-3: #8b93a3;
  --shadow: 0 0 0 1px rgb(255 255 255 / 4%); --shadow-up: 0 12px 30px -10px color-mix(in srgb, var(--brand) 55%, transparent);
  --photo-bg: #ffffff; --top-bg: color-mix(in srgb, #0e1116 85%, transparent);
  --hero-bg: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--brand) 38%, #0e1116), #0e1116 70%); --hero-ink: #ffffff;
}
.shop-preview[data-look="garage"] {
  --ground: #e9e7e3; --surface: #f7f6f3; --surface-2: #dcd9d3; --line: #c9c5bd; --ink: #1b1c1e; --ink-2: #45474b; --ink-3: #66686d;
  --font-head: "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --head-weight: 800; --head-case: uppercase; --head-track: 0.02em; --radius: 6px; --radius-sm: 4px; --btn-radius: 6px;
  --card-border: 1px solid var(--line); --top-bg: #1b1c1e; --top-ink: #ffffff;
  --hero-bg: repeating-linear-gradient(135deg, #24262a 0 14px, #1f2124 14px 28px); --hero-ink: #ffffff; --photo-bg: #ffffff;
}
.shop-preview[data-look="fresh"] {
  --ground: #ffffff; --surface: #ffffff; --surface-2: var(--tint); --line: color-mix(in srgb, var(--brand) 16%, #e6e8eb);
  --radius: 20px; --radius-sm: 999px; --btn-radius: 999px; --photo-bg: var(--tint); --hero-bg: var(--tint);
}
.shop-preview[data-look="minimal"] {
  --line: #eeeff1; --card-border: 0; --shadow: none; --radius: 8px; --radius-sm: 6px; --btn-radius: 6px;
  --head-weight: 600; --price-size: 1.05rem; --hero-bg: transparent; --photo-bg: #f6f6f7;
}
.shop-preview[data-look="carbon"] {
  --ground: #16181b; --surface: #1e2125; --surface-2: #262a2f; --line: #33383e; --ink: #f2f3f5; --ink-2: #b9bec6; --ink-3: #8e949d;
  --radius: 2px; --radius-sm: 2px; --btn-radius: 2px; --head-weight: 800; --head-case: uppercase; --head-track: 0.04em;
  --font-head: "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --shadow: none; --photo-bg: #ffffff; --top-bg: #101214; --top-ink: #ffffff;
  --hero-bg: repeating-linear-gradient(45deg, #1b1e22 0 3px, #15171a 3px 6px), #16181b; --hero-ink: #ffffff;
}
.shop-preview[data-look="royal"] {
  --ground: #141a2e; --surface: #1b2340; --surface-2: #222b4c; --line: color-mix(in srgb, var(--second) 30%, #2b3456);
  --ink: #f4f1e8; --ink-2: #c9c3b2; --ink-3: #9d988a;
  --font-head: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; --head-weight: 600; --head-track: 0;
  --radius: 12px; --radius-sm: 8px; --btn-radius: 8px; --photo-bg: #ffffff; --shadow: none;
  --top-bg: color-mix(in srgb, #141a2e 90%, transparent);
  --hero-bg: linear-gradient(160deg, #1b2340, #141a2e); --hero-ink: #f4f1e8;
}
/* Dark looks: the dealer's colour as text uses the version lightened for the dark ground (lib/looks.ts). */

/* The dealer's own choices on top of a look (row 2961): system fonts only, a button shape, and the list layout. */
.shop-preview[data-font="sans"] { --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --font-head: var(--font); }
.shop-preview[data-font="serif"] { --font: Georgia, "Iowan Old Style", "Times New Roman", serif; --font-head: var(--font); }
.shop-preview[data-font="condensed"] { --font: "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", sans-serif; --font-head: var(--font); }
.shop-preview[data-font="rounded"] { --font: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", Nunito, system-ui, sans-serif; --font-head: var(--font); }
.shop-preview[data-buttons="round"] { --btn-radius: 999px; }
.shop-preview[data-buttons="soft"] { --btn-radius: 10px; }
.shop-preview[data-buttons="square"] { --btn-radius: 2px; }


.shop-preview { display: block; width: 100%; max-width: 360px; margin: 12px 0; border: 1px solid var(--line-2, #ccc); border-radius: 18px; overflow: hidden;
  background: var(--ground); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.4; }
.shop-preview b { font-weight: 700; }
.shop-preview .sp-name { font-weight: var(--head-weight); }
.sp-mark img { display: block; width: auto; height: 30px; max-width: 80px; object-fit: contain; }
.sp-top { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--top-bg); color: var(--top-ink); border-bottom: 1px solid var(--line); }
.sp-mark { flex: none; }
.shop-preview[data-look="bold"] .sp-mark img, .shop-preview[data-look="garage"] .sp-mark img, .shop-preview[data-look="carbon"] .sp-mark img, .shop-preview[data-look="midnight"] .sp-mark img, .shop-preview[data-look="royal"] .sp-mark img { background: #fff; padding: 2px; border-radius: 4px; }
.sp-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-head); font-weight: var(--head-weight); text-transform: var(--head-case); letter-spacing: var(--head-track); }
.sp-btn, .sp-add { display: inline-flex; align-items: center; justify-content: center; border-radius: var(--btn-radius); font-weight: 700; background: var(--brand); color: var(--brand-ink); border: 1.5px solid var(--brand-text); }
.sp-btn { height: 28px; min-width: 28px; padding: 0 8px; font-size: .9rem; margin-left: auto; }
.sp-btn + .sp-btn { margin-left: 0; }
.sp-ghost { background: transparent; color: inherit; border-color: currentColor; }
.shop-preview[data-look="bold"] .sp-btn, .shop-preview[data-look="garage"] .sp-btn, .shop-preview[data-look="carbon"] .sp-btn { background: var(--second); color: var(--second-ink); }
.sp-hero { display: block; margin: 10px 12px 0; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--hero-bg); color: var(--hero-ink); font-size: .78rem; font-weight: 600; }
.shop-preview[data-look="minimal"] .sp-hero { padding: 6px 0 0; }
.shop-preview[data-look="classic"] .sp-hero { border-top: 3px double var(--line); border-bottom: 3px double var(--line); border-radius: 0; background: transparent; text-align: center; }
.shop-preview[data-look="royal"] .sp-hero { border: 1px solid color-mix(in srgb, var(--second) 45%, transparent); color: var(--second-text); }
.sp-section { display: block; margin: 12px 12px 8px; font-family: var(--font-head); font-weight: var(--head-weight); text-transform: var(--head-case); letter-spacing: var(--head-track); font-size: 1.02rem; }
.sp-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 12px 14px; }
.sp-card { display: flex; flex-direction: column; background: var(--surface); border: var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.sp-photo { display: block; height: 62px; background: var(--photo-bg); position: relative; }
.sp-photo::after { content: ""; position: absolute; inset: 14px 30%; border-radius: 6px; background: color-mix(in srgb, var(--brand) 30%, #cfd3da); }
.sp-body { display: flex; flex-direction: column; gap: 3px; padding: 8px 9px 10px; }
.sp-brandtag { font-size: .7rem; font-weight: 700; color: var(--brand-text); text-transform: none; letter-spacing: .01em; }
.shop-preview[data-look="royal"] .sp-brandtag, .shop-preview[data-look="garage"] .sp-brandtag { color: var(--second-text); }
.sp-pname { font-size: .82rem; font-weight: 600; line-height: 1.25; }
.shop-preview[data-look="classic"] .sp-pname, .shop-preview[data-look="royal"] .sp-pname { font-family: var(--font-head); }
.sp-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1px 6px; }
.sp-price b { font-size: var(--price-size); font-weight: 800; color: var(--ink); }
.shop-preview[data-look="bold"] .sp-price b, .shop-preview[data-look="midnight"] .sp-price b, .shop-preview[data-look="fresh"] .sp-price b { color: var(--brand-text); }
.shop-preview[data-look="royal"] .sp-price b { color: var(--second-text); }
.sp-price s { font-size: .7rem; color: var(--ink-3); }
.sp-save { font-size: .62rem; font-weight: 800; color: var(--second-ink); background: var(--second); padding: 1px 6px; border-radius: 999px; }
.sp-add { height: 30px; margin-top: 4px; font-size: .78rem; }
.shop-preview[data-layout="list"] .sp-cards { grid-template-columns: 1fr; }
.shop-preview[data-layout="list"] .sp-card { flex-direction: row; }
.shop-preview[data-layout="list"] .sp-photo { flex: none; width: 84px; height: auto; min-height: 84px; }
.shop-preview[data-layout="list"] .sp-body { flex: 1; min-width: 0; }

/* Back office Prices screen (row 40a0): sticky header, level switch, grouped rows, price cells that save by themselves. */
.tabs a.on { font-weight: 700; border-bottom: 3px solid var(--accent); }
.prices-head { position: sticky; top: 0; z-index: 5; background: var(--ground); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.prices-head h1 { margin: 6px 0 0; }
.prices-head p { margin: 2px 0 6px; }
.seg { display: flex; gap: 2px; padding: 3px; background: var(--ground-3); border-radius: var(--r-md); margin: 6px 0; }
.office .seg-b { flex: 1; min-width: 0; min-height: 44px; border: 0; border-radius: var(--r-sm); background: transparent; font-size: var(--t-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background 180ms; }
.office .seg-b.on { background: var(--ground); font-weight: 700; box-shadow: 0 1px 2px rgb(0 0 0 / 0.15); }
.office .search { width: 100%; box-sizing: border-box; font-size: 16px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 2px; }
.office .chip { flex: none; min-height: 44px; border-radius: 999px; font-size: var(--t-sm); background: var(--ground); border: 1px solid var(--line-2); padding: 0 14px; color: var(--ink); }
.office .chip.on { border-color: var(--accent); background: var(--accent-bg); font-weight: 600; }
.office .chip.warn { color: var(--signal); }
.rule-strip { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.rule-line { margin: 0; }
.office .linkish { min-height: 44px; border: 0; background: none; color: var(--accent); text-decoration: underline; padding: 0 6px; cursor: pointer; }
.rule-form { padding: 8px 0; }
.rule-form[hidden], .rule-form [hidden] { display: none; }
.brand-h { font-size: var(--t-base); margin: 16px 0 4px; position: static; }
.prow { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 10px; min-height: 72px; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; transition: background 200ms; }
.prow.edited { background: oklch(0.96 0.06 85); border-left-color: oklch(0.72 0.15 75); }
.pinfo { flex: 1; min-width: 0; }
.pname { font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pmeta, .pedit { font-size: var(--t-xs); color: var(--ink-2); }
.pedit { color: oklch(0.45 0.12 75); }
.pcell { flex: none; width: 112px; text-align: right; }
.office .pcell input { width: 104px; min-height: 44px; box-sizing: border-box; text-align: right; font-size: 16px; font-weight: 700; }
.prow.edited .pcell input { border-color: oklch(0.72 0.15 75); }
.prow.bad .pcell input { border-color: var(--signal); }
.pnote { font-size: var(--t-xs); color: var(--ink-2); min-height: 1.2em; }
.pnote.ok { color: oklch(0.45 0.13 150); }
.pnote.bad { color: var(--signal); }
.unsaved-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; background: var(--signal); color: #fff; padding: 14px; text-align: center; font-weight: 700; }
.unsaved-bar[hidden] { display: none; }
.empty { padding: 24px 0; text-align: center; color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .prow, .seg-b { transition: none; } }
html[data-theme="dark"] .prow.edited { background: oklch(0.30 0.05 85); }
html[data-theme="dark"] .pedit { color: oklch(0.80 0.12 80); }
html[data-theme="dark"] .pnote.ok { color: oklch(0.80 0.14 150); }
/* Phone: the back office tabs wrap onto two lines instead of scrolling sideways and cutting a tab off. */
@media (max-width: 639px) { .tabs { flex-wrap: wrap; overflow-x: visible; } .tabs a { white-space: nowrap; } }

/* Back-office Help (row 9854): a plain link beside Sign out, and the Help page's parts. */
.help-link { flex: none; min-height: 44px; display: inline-flex; align-items: center; padding: 0 6px; color: var(--ink); font-size: var(--t-sm); font-weight: 600; }
.help-link[aria-current="page"] { text-decoration-thickness: 3px; }
.help-index { margin: 8px 0 4px; line-height: 2; font-size: var(--t-sm); }
.help-part p { max-width: 62ch; }

/* ------------------------------------------------------------------------------------------------------------------
   Row 4ead: a friendly back office, built to the approved mock-ups (growth/launches/dealer-back-office-design-2026-11-22):
   light grey page with white cards, plain big headings, labels above full-width boxes, grouped forms, big buttons,
   a side menu on a laptop and a bottom bar on a phone. Motion: a soft fade-in of each screen, pressed buttons shrink
   a little, the light/dark switch fades; all of it off for people who ask their phone for less motion. */
html.office-html body.office { background: var(--ground-2); padding-bottom: calc(48px + 32px + env(safe-area-inset-bottom)); }
body.office .office-main { padding-top: 16px; padding-bottom: 32px; max-width: 60rem; animation: office-in 200ms ease-out both; }
@keyframes office-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
body.office .office-main h1 { font-size: 1.625rem; line-height: 1.2; letter-spacing: -0.01em; margin: 8px 0 8px; }
body.office .office-main > h2, body.office h2.list-h { font-size: var(--t-lg); margin: 24px 0 8px; }
body.office .office-main > p, body.office p.lead { color: var(--ink-2); max-width: 62ch; margin: 0 0 12px; }
body.office .panel, body.office fieldset.card-group, body.office li.own-item, body.office li.order-card, body.office li.report {
  background: var(--ground); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px;
  box-shadow: 0 1px 2px rgb(16 24 40 / 5%); margin: 0 0 12px; }
body.office .panel h2 { font-size: 1.1875rem; margin: 0 0 12px; }
body.office .panel h3 { font-size: var(--t-base); margin: 16px 0 8px; }

/* Header: the screen's name big, the shop under it; Help and the switch at the side. */
body.office header.office-top { background: color-mix(in srgb, var(--ground) 92%, transparent); backdrop-filter: blur(8px); }
body.office header.office-top .shop b { font-size: var(--t-lg); }
.phone-only { display: contents; }
.office-shell { min-height: 100vh; }
aside.side { display: none; }

/* Forms: one field per line, label above its box, boxes full width and easy to tap. */
body.office fieldset.group { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
body.office fieldset.group > legend { font-weight: 700; font-size: var(--t-base); padding: 0; margin: 0 0 12px; }
body.office fieldset.card-group { padding: 16px; }
body.office fieldset.card-group > legend { float: left; width: 100%; font-size: 1.1875rem; margin-bottom: 12px; }
body.office fieldset.card-group > legend + * { clear: both; }
body.office .panel form > label:not(.check):not(.look-option), body.office .panel fieldset > label:not(.check),
body.office form.own-form > label:not(.check), body.office form.own-form fieldset > label:not(.check),
body.office .own-form > label:not(.check) {
  display: flex; flex-direction: column; gap: 8px; width: 100%; margin: 0 0 12px; font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
body.office .panel input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=color]):not([type=file]),
body.office .own-form input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=color]):not([type=file]),
body.office .panel select, body.office .own-form select, body.office .panel textarea, body.office .own-form textarea {
  width: 100%; min-height: 48px; border-radius: 12px; font-size: 16px; font-weight: 400; color: var(--ink); background: var(--ground); }
body.office textarea { padding: 12px; line-height: 1.45; }
body.office input:focus-visible, body.office select:focus-visible, body.office textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 1px; border-color: var(--accent); }
body.office label.check { font-size: var(--t-base); min-height: 44px; margin: 4px 0; color: var(--ink); }
body.office label.check input { width: 22px; height: 22px; accent-color: var(--accent); }
body.office .note { font-weight: 400; }
/* Photo: a big dashed tile instead of the browser's small "Choose file". */
body.office input[type=file] { width: 100%; padding: 12px; border: 2px dashed var(--line-2); border-radius: 12px; background: var(--ground-2); font-size: var(--t-sm); cursor: pointer; }
body.office input[type=file]::file-selector-button { min-height: 40px; margin-right: 12px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 600; cursor: pointer; }

/* Buttons: the main one big and in the shop's colour (full width on a phone), others calm; all react to a press. */
body.office button.primary-inline, body.office a.primary { min-height: 52px; padding: 0 24px; border-radius: 12px; border: 0;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: var(--t-base); box-shadow: 0 1px 2px rgb(16 24 40 / 12%); }
body.office button, body.office a.primary, body.office .bottom-bar a, body.office .side-nav a, body.office .more-row {
  transition: transform 90ms ease-out, background-color 150ms, box-shadow 150ms; }
body.office button:active, body.office a.primary:active, body.office .bottom-bar a:active, body.office .side-nav a:active, body.office .more-row:active { transform: scale(0.98); }
body.office button.danger { background: var(--ground); border-color: color-mix(in srgb, var(--signal) 45%, var(--line-2)); }
body.office .quiet-btn { min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--ground); color: var(--ink); cursor: pointer; }
body.office .wide { width: 100%; justify-content: center; }
body.office .theme-switch { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--ground); color: var(--ink); font-size: var(--t-sm); cursor: pointer; }
body.office .theme-switch.icon-only [data-theme-word] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
body.office .theme-switch.icon-only { width: 44px; padding: 0; justify-content: center; font-size: 1.1rem; }
html.theme-fade body.office, html.theme-fade body.office * { transition: background-color 220ms, color 220ms, border-color 220ms !important; }
body.office .flash { border-radius: 12px; background: var(--accent-bg); color: var(--ink); }
html[data-theme="dark"] body.office .flash { background: var(--ground-3); }

/* "How it works": the long explanation folded away behind one small line. */
details.howto { margin: -8px 0 12px; color: var(--ink-2); }
details.howto summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; color: var(--accent); font-weight: 600; }
details.howto p { max-width: 62ch; }

/* Own products: one tidy card each; tap to open its form. */
body.office ul.owns { margin: 0; }
body.office li.own-item { display: block; padding: 0; overflow: hidden; }
details.own-card > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 12px; min-height: 72px; cursor: pointer; }
details.own-card > summary::-webkit-details-marker { display: none; }
details.own-card .own-photo img, details.own-card .own-photo .no-photo { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; object-fit: contain; font-size: 0.6875rem; text-align: center; }
.own-sum { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.own-sum b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.own-sum .muted { font-size: var(--t-xs); }
details.own-card .chev { color: var(--accent); font-size: var(--t-sm); font-weight: 600; flex: none; }
details.own-card[open] > summary { border-bottom: 1px solid var(--line); }
details.own-card[open] .chev { visibility: hidden; }
details.own-card > form.own-form { padding: 16px 12px 4px; animation: office-in 180ms ease-out both; }
details.own-card > form.own-delete { padding: 0 12px 16px; }
.pill.ok { border-color: oklch(0.62 0.13 150); color: oklch(0.42 0.12 150); }
html[data-theme="dark"] .pill.ok { color: oklch(0.80 0.14 150); }
body.office li.empty-line { padding: 16px; text-align: center; background: var(--ground); border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
body.office [data-note-picker] li.own { display: block; border-bottom: 1px solid var(--line); }

/* Orders: a card each; lines and the total lined up on the right. */
body.office ul.orders { margin: 0; }
.order-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; font-size: var(--t-base); }
.order-lines { list-style: none; padding: 12px 0; margin: 12px 0 0; border-top: 1px solid var(--line); }
.order-lines li, .order-total { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.order-lines li span:last-child { flex: none; font-variant-numeric: tabular-nums; }
.order-total { border-top: 1px solid var(--line); padding-top: 12px; font-variant-numeric: tabular-nums; }

/* More (phone): rows with an icon, a hint and a chevron. */
ul.more-list { list-style: none; padding: 0; margin: 0 0 12px; background: var(--ground); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
ul.more-list li + li { border-top: 1px solid var(--line); }
a.more-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 16px; color: var(--ink); text-decoration: none; }
a.more-row > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
a.more-row .muted { font-size: var(--t-xs); }
a.more-row .ni { width: 28px; text-align: center; font-size: 1.15rem; color: var(--accent); }
a.more-row .chev { color: var(--ink-3); font-size: 1.4rem; }

/* Phone: a bottom bar with five screens; the open one in the shop's colour. */
nav.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--ground) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); }
nav.bottom-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 62px;
  color: var(--ink-2); text-decoration: none; font-size: 0.75rem; }
nav.bottom-bar a .ni { font-size: 1.25rem; line-height: 1; }
nav.bottom-bar a.on { color: var(--accent); font-weight: 700; }
html[data-theme="dark"] nav.bottom-bar a.on, html[data-theme="dark"] .side-nav a.on .ni { color: var(--ink); }
body.office .unsaved-bar { bottom: calc(48px + env(safe-area-inset-bottom)); }
@media (max-width: 639px) {
  body.office button.primary-inline, body.office a.primary { width: 100%; }
  body.office .panel { padding: 16px; }
  body.office .help-link { padding: 0 4px; }
}

/* Laptop: the side menu with every screen; no bottom bar. */
@media (min-width: 1024px) {
  html.office-html body.office { padding-bottom: 0; }
  .office-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); }
  aside.side { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    padding: 16px 12px; background: var(--ground); border-right: 1px solid var(--line); }
  .side-shop { display: flex; align-items: center; gap: 12px; padding: 4px 8px 12px; font-size: var(--t-lg); }
  .side-shop b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-nav { display: flex; flex-direction: column; gap: 4px; }
  .side-nav a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-size: var(--t-base); }
  .side-nav a:hover { background: var(--ground-2); }
  .side-nav a .ni { width: 22px; text-align: center; color: var(--ink-2); }
  .side-nav a.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
  .side-nav a.on .ni { color: var(--accent-ink); }
  html[data-theme="dark"] .side-nav a.on { background: var(--ground-3); color: var(--ink); }
  .side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
  .side-foot .theme-switch, .side-foot .quiet-btn { width: 100%; justify-content: center; }
  .phone-only { display: none; }
  nav.bottom-bar { display: none; }
  body.office .unsaved-bar { bottom: 0; }
  body.office .office-main { padding: 24px 32px 48px; margin: 0; }
  body.office header.office-top .wrap { padding: 0 32px; max-width: none; }
  body.office .panel form > fieldset.group { max-width: 44rem; }
}
@media (prefers-reduced-motion: reduce) {
  body.office .office-main, details.own-card > form.own-form { animation: none; }
  body.office button, body.office a.primary, body.office .bottom-bar a, body.office .side-nav a, body.office .more-row { transition: none; }
  body.office button:active, body.office a.primary:active, body.office .bottom-bar a:active, body.office .side-nav a:active, body.office .more-row:active { transform: none; }
  html.theme-fade body.office, html.theme-fade body.office * { transition: none !important; }
}
/* Row 4ead: Prices on the grey page: the sticky search band matches the page, the list sits in one white card. */
body.office .prices-head { background: var(--ground-2); }
body.office .price-list { background: var(--ground); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0 4px; margin-top: 12px; overflow: hidden; }
body.office .price-list .brand-h { padding: 0 12px; }

/* Row 4ead part A (Mithun 15:36-15:38: the "Edited" filter goes white and unreadable; the full-width "Public" bar looks
   like a button but is not clear). A switched-on filter is the shop's colour with its own readable text, in light and
   dark alike; the level switch is a labelled set of tabs whose chosen one is clearly marked. */
.office .chip.on, .office select.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
html[data-theme="dark"] .office .chip.on, html[data-theme="dark"] .office select.chip.on { background: var(--ground-3); border-color: var(--ink-2); color: var(--ink); }
html[data-theme="dark"] .office .linkish, html[data-theme="dark"] body.office details.howto summary { color: var(--ink); }
.office .chip.warn.on { background: var(--signal); border-color: var(--signal); color: #fff; }
html[data-theme="dark"] .office .chip.warn.on { background: var(--ground-3); border-color: var(--signal); color: oklch(0.82 0.12 30); }
body.office .chips { flex-wrap: wrap; gap: 8px; padding: 12px 0 8px; overflow: visible; }
body.office #level-seg::before { content: "Prices for"; align-self: center; padding: 0 12px 0 8px; font-size: var(--t-xs); font-weight: 700; color: var(--ink-2); white-space: nowrap; }
body.office .seg { background: var(--ground); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
body.office .seg-b { color: var(--ink-2); border-radius: 9px; }
body.office .seg-b:hover { background: var(--ground-2); }
body.office .seg-b.on { background: var(--accent-bg); color: var(--ink); box-shadow: inset 0 -3px 0 var(--accent); }
html[data-theme="dark"] body.office .seg-b.on { background: var(--ground-3); box-shadow: inset 0 -3px 0 var(--ink-2); }
/* Row 4ead part A (audit 26-27): on a laptop the screen's name is the big heading on the page, so the top bar shows only
   the shop line and Help (no name twice); menu symbols drawn at one size and weight as plain text, never emoji. */
@media (min-width: 1024px) {
  body.office header.office-top .shop b { display: none; }
  body.office header.office-top .shop span { font-size: var(--t-sm); color: var(--ink-2); }
  body.office header.office-top .top-row { min-height: 52px; }
}
body.office .ni { font-variant-emoji: text; font-weight: 700; font-size: 1.05rem; line-height: 1; }
body.office .help-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none; font-weight: 600; color: var(--ink); background: var(--ground); }
body.office .help-link[aria-current="page"] { background: var(--accent-bg); border-color: var(--accent); }
html[data-theme="dark"] body.office .help-link[aria-current="page"] { background: var(--ground-3); border-color: var(--ink-2); }
/* ------------------------------------------------------------------------------------------------------------------
   Row dde1 (back office rebuild part B): Prices and Own products to mock-ups 1, 3, 5 and 8 of the approved UI-SPEC.
   Uses part A's tokens and cards. Amber is only "edited by you", red only a problem, green only saved / on the site. */
body.office { --edited: oklch(0.78 0.14 75); --edited-bg: oklch(0.965 0.05 85); --edited-ink: oklch(0.40 0.10 65); }
html[data-theme="dark"] body.office { --edited: oklch(0.72 0.13 75); --edited-bg: oklch(0.31 0.05 80); --edited-ink: oklch(0.88 0.10 85); }
.ph-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ph-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; min-width: 0; }
body.office .ph-title h1 { margin: 4px 0; }
.ph-title .muted { font-size: var(--t-sm); }
body.office a.levels-btn { flex: none; display: inline-flex; align-items: center; text-decoration: none; font-weight: 600; }
/* Search with a magnifier inside the box. */
label.search-box { position: relative; display: block; margin: 8px 0 4px; }
label.search-box .search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 1.15rem; pointer-events: none; }
body.office label.search-box input.search { min-height: 48px; padding-left: 42px; border-radius: 12px; background: var(--ground); color: var(--ink); width: 100%; }
/* Filter chips and the level switch are part A's (row 4ead 3df524c); part B does not restyle .chip or .seg. */
/* Overall rule: a calm blue card, the rule in bold, one Change button on the right; its form opens inside the card. */
body.office .rule-strip { border: 0; padding: 0; margin: 12px 0 4px; }
.rule-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 12px 16px; border-radius: var(--r-lg);
  background: var(--accent-bg); border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); }
html[data-theme="dark"] .rule-card { background: var(--ground-3); border-color: var(--line-2); }
.rule-card .rule-line { flex: 1; min-width: 12rem; }
.rule-card p { margin: 0; }
.rule-main { font-size: var(--t-base); color: var(--ink); }
.rule-sub { font-size: var(--t-sm); color: var(--ink-2); margin-top: 4px !important; }
body.office .rule-change { flex: none; font-weight: 700; color: var(--accent); }
html[data-theme="dark"] body.office .rule-change { color: var(--ink); }
body.office .rule-form { background: var(--ground); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin-top: 12px;
  box-shadow: 0 1px 2px rgb(16 24 40 / 5%); animation: office-in 180ms ease-out both; }
body.office .rule-form h3 { margin: 0 0 12px; font-size: var(--t-lg); }
.choices { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 12px; }
@media (min-width: 640px) { .choices { grid-template-columns: 1fr 1fr; } }
body.office label.choice { display: flex; flex-direction: row; gap: 12px; align-items: flex-start; padding: 12px; min-height: 56px; border: 2px solid var(--line-2);
  border-radius: 12px; cursor: pointer; background: var(--ground); }
body.office label.choice input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
body.office label.choice > span { display: flex; flex-direction: column; gap: 4px; }
body.office label.choice .muted { font-size: var(--t-xs); }
body.office label.choice:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent-bg) 60%, var(--ground)); }
html[data-theme="dark"] body.office label.choice:has(input:checked) { background: var(--ground-3); }
.rule-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 12px; margin-bottom: 12px; }
body.office .rule-fields[hidden], body.office .rule-fields [hidden] { display: none !important; }
body.office .rule-fields label { display: flex; flex-direction: column; gap: 8px; font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
body.office .rule-fields input, body.office .rule-fields select { width: 100%; min-height: 48px; border-radius: 12px; font-size: 16px; color: var(--ink); background: var(--ground); }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
@media (max-width: 639px) { .form-actions > * { flex: 1 1 100%; } }
/* Price list: brand headers, rows with name + figures on the left and the price box close beside them. */
body.office .price-list { padding: 0; margin-top: 12px; }
body.office .price-list .brand + .brand { border-top: 8px solid var(--ground-2); }
body.office .price-list .brand-h { display: flex; align-items: baseline; gap: 8px; margin: 0; padding: 12px 16px 12px; font-size: var(--t-lg); border-bottom: 1px solid var(--line); }
body.office .price-list .brand-h .muted { font-size: var(--t-sm); font-weight: 400; }
body.office .prow { padding: 12px 16px 12px 12px; gap: 12px; align-items: flex-start; }
body.office .prow:last-child { border-bottom: 0; }
body.office .pname { font-size: var(--t-base); line-height: 1.3; }
body.office .pmeta { font-size: var(--t-sm); margin-top: 4px; }
body.office .prow.edited { background: var(--edited-bg); border-left-color: var(--edited); }
body.office .prow.edited .pcell input { border-color: var(--edited); border-width: 2px; }
.pedit { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; }
.edited-tag { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--edited); color: oklch(0.22 0.04 70); font-size: var(--t-xs); font-weight: 700; }
body.office .pedit .reset { min-height: 36px; padding: 0 4px; font-weight: 700; text-decoration: none; font-size: var(--t-sm); }
body.office .pcell { width: 120px; }
body.office .pcell input { width: 116px; min-height: 48px; border-radius: 12px; font-size: 1.125rem; border: 1px solid var(--line-2); background: var(--ground); color: var(--ink); }
body.office .pcell input:focus-visible { border-color: var(--accent); }
body.office .pnote { margin-top: 4px; }
body.office .price-list .more { margin: 8px 16px 12px; }
body.office .empty { padding: 24px 16px; }
@media (min-width: 1024px) {
  /* Laptop (mock-up 8): one readable column, so the price box sits close to its item instead of at the far edge. */
  body.office #prices-app, body.office #levels-panel, body.office .prices ~ .howto { max-width: 52rem; }
  body.office .prow { align-items: center; }
  body.office .prices-head { padding-top: 4px; }
}
/* Price levels (mock-up 3): one card per customer level. */
ul.level-cards { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 12px; }
li.level-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; background: var(--ground-2); }
body.office form.level-rename { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
body.office form.level-rename label { flex: 1 1 12rem; margin: 0 !important; }
body.office form.level-rename .quiet-btn { min-height: 48px; }
.level-link { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; font-size: var(--t-sm); }
.level-link code { display: block; padding: 12px 12px; border-radius: 10px; background: var(--ground); border: 1px solid var(--line); overflow-wrap: anywhere; font-size: var(--t-sm); }
body.office .level-remove .danger { color: var(--signal); }
body.office form.level-add { margin-top: 16px; padding-top: 4px; }
body.office form.level-add h3 { margin-top: 8px; }
#levels-panel { scroll-margin-top: 80px; }

/* Own products (mock-up 5): search, one big "+ Add a product" button that opens the form, compact rows. */
body.office .own-search { margin: 4px 0 12px; }
details.add-product { margin: 8px 0 16px; }
details.add-product > summary.big-add { list-style: none; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px;
  border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: var(--t-lg); cursor: pointer;
  box-shadow: 0 1px 2px rgb(16 24 40 / 12%); transition: transform 90ms ease-out; }
details.add-product > summary.big-add::-webkit-details-marker { display: none; }
details.add-product > summary.big-add:active { transform: scale(0.98); }
details.add-product[open] > summary.big-add { background: var(--ground); color: var(--ink); border: 1px solid var(--line-2); box-shadow: none; font-size: var(--t-base); min-height: 48px; }
details.add-product[open] > summary.big-add span { display: inline-block; transform: rotate(45deg); }
details.add-product > .add-panel { margin-top: 12px; animation: office-in 180ms ease-out both; }
.own-sum .need { color: var(--signal); font-weight: 600; }
.tag-bad { align-self: flex-start; margin-top: 4px; padding: 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--signal) 12%, var(--ground)); color: var(--signal); font-size: var(--t-xs); font-weight: 700; }
p.own-hint { font-size: var(--t-sm); margin: 4px 4px 16px; }
p.own-empty-search { padding: 12px 4px; }
@media (min-width: 1024px) {
  body.office details.add-product > summary.big-add { display: inline-flex; padding: 0 24px; }
  body.office details.add-product, body.office ul.owns, body.office .own-search { max-width: 52rem; }
}
@media (prefers-reduced-motion: reduce) {
  body.office .rule-form, details.add-product > .add-panel { animation: none; }
  details.add-product > summary.big-add { transition: none; }
  details.add-product > summary.big-add:active { transform: none; }
}
/* Row dde1: a product's name gets two lines before it is cut; on a phone the open arrow is a small chevron. */
body.office .own-sum b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
@media (max-width: 639px) {
  details.own-card > summary { gap: 12px; padding: 12px; }
  details.own-card .pill { font-size: var(--t-xs); padding: 4px 8px; }
  details.own-card .chev { font-size: 0; }
  details.own-card .chev::after { content: "›"; font-size: 1.5rem; color: var(--ink-3); }
}
body.office li.own-item[hidden] { display: none; }
/* Row dde1 (audit 5): price levels folded into one "Manage levels" card; the Levels button at the top opens it. */
details.levels-box > summary { list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; position: relative; padding-right: 24px; cursor: pointer; min-height: 48px; }
details.levels-box > summary::-webkit-details-marker { display: none; }
details.levels-box > summary h2 { margin: 0 !important; }
details.levels-box > summary .muted { font-size: var(--t-sm); }
details.levels-box > summary::after { content: "›"; position: absolute; right: 4px; top: 50%; margin-top: -0.75rem; font-size: 1.5rem; line-height: 1; color: var(--ink-3); transition: transform 150ms; }
details.levels-box[open] > summary::after { transform: rotate(90deg); }
details.levels-box[open] > summary { margin-bottom: 12px; }
/* Row dde1 (audit 11): "+ Add new brand" is a clear small button under its box, not a thin underlined link. */
body.office button.add-new { align-self: flex-start; min-height: 40px; margin: -8px 0 12px; padding: 0 12px; border-radius: 999px;
  border: 1px dashed var(--line-2); background: var(--ground-2); color: var(--ink); font-size: var(--t-sm); font-weight: 600; text-decoration: none; cursor: pointer; }
body.office button.add-new[hidden] { display: none; }
/* Row dde1 (audit 12): "Your note on our products" folded into one card that opens. */
details.notes-box > summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-height: 48px; justify-content: center; }
details.notes-box > summary::-webkit-details-marker { display: none; }
details.notes-box > summary h2 { margin: 0 !important; }
details.notes-box > summary .muted { font-size: var(--t-sm); }
details.notes-box[open] > summary { margin-bottom: 12px; }
@media (prefers-reduced-motion: reduce) { details.levels-box > summary::after { transition: none; } }
/* Row dde1 (audit 8, mock-up 2): an item's name opens its sheet: a bottom sheet on a phone, a centred card on a laptop. */
body.office button.pname { display: -webkit-box; border: 0; background: none; padding: 0; margin: 0; min-height: 0; text-align: left; font: inherit;
  font-weight: 600; color: var(--ink); cursor: pointer; text-decoration: underline dotted color-mix(in srgb, var(--ink) 35%, transparent); text-underline-offset: 3px; }
body.office button.pname:hover { text-decoration-color: var(--accent); }
body.office button.pname:active { transform: none; }
dialog.item-sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 34rem; max-height: 88vh; border-radius: 18px 18px 0 0;
  background: var(--ground); color: var(--ink); box-shadow: 0 -8px 30px rgb(0 0 0 / 18%); animation: sheet-up 220ms ease-out both; }
dialog.item-sheet::backdrop { background: rgb(0 0 0 / 40%); animation: sheet-fade 220ms ease-out both; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@keyframes sheet-fade { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 640px) { dialog.item-sheet { margin: auto; border-radius: 18px; } }
.is-card { padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; max-height: 88vh; box-sizing: border-box; }
.is-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.is-head h2 { margin: 0; font-size: var(--t-lg); line-height: 1.3; }
.is-head p { margin: 4px 0 0; font-size: var(--t-sm); }
.is-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 12px; }
.is-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--ground-2); }
.is-box.after { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.is-box-h { font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 8px; opacity: 0.8; }
.is-line { display: flex; flex-direction: column; gap: 1px; margin-bottom: 8px; font-size: var(--t-xs); }
.is-line b { font-size: var(--t-lg); font-variant-numeric: tabular-nums; }
.is-earn { margin: 0 0 8px; padding: 12px 12px; border-radius: 10px; background: color-mix(in srgb, oklch(0.62 0.13 150) 14%, var(--ground)); color: oklch(0.38 0.11 150); font-size: var(--t-sm); }
html[data-theme="dark"] .is-earn { color: oklch(0.82 0.13 150); background: var(--ground-3); }
.is-card h3 { font-size: var(--t-base); margin: 16px 0 8px; }
ul.is-levels { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
ul.is-levels li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 12px; border-left: 4px solid transparent; }
ul.is-levels li + li { border-top: 1px solid var(--line); }
ul.is-levels li.edited { background: var(--edited-bg); border-left-color: var(--edited); }
ul.is-levels li > div:first-child { display: flex; flex-direction: column; min-width: 0; }
ul.is-levels li .muted { font-size: var(--t-xs); }
ul.is-levels .is-fig { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
ul.is-levels .linkish { grid-column: 1 / -1; justify-self: start; min-height: 36px; padding: 0; font-size: var(--t-sm); font-weight: 600; }
.is-limits { font-size: var(--t-xs); margin: 12px 0 0; }
@media (prefers-reduced-motion: reduce) { dialog.item-sheet, dialog.item-sheet::backdrop { animation: none; } }
/* Row dde1 (audit 4): on a laptop each item is a short row, name then price box right beside it (mock-up 8), not 60 rem apart. */
@media (min-width: 1024px) {
  body.office .price-list .prow { display: grid; grid-template-columns: minmax(0, 24rem) 120px; justify-content: start; column-gap: 24px; }
}
/* ------------------------------------------------------------------------------------------------------------------
   Row b6eb (part C of the back-office rebuild): Orders, Shop details, My pages, Look, Report a problem, My data and
   Help built to the approved mock-ups 6, 7, 9 and 10 (growth/launches/dealer-back-office-design-2026-11-22), on top
   of part A's shared layout (cards, forms, buttons, bottom bar). Light and dark both come from the same tokens. */

/* A field kept for the keyboard and screen readers but drawn by its tile (no browser "Choose file"). */
body.office input.vh-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap; }
body.office label:focus-within.logo-tile, body.office label:focus-within.report-tile { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px; }

/* The red count of New orders on the Orders tab. */
.nav-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 8px; border-radius: 999px;
  background: var(--signal); color: #fff; font-size: 0.6875rem; font-weight: 700; line-height: 1; margin-left: 8px; }
nav.bottom-bar a { position: relative; }
nav.bottom-bar .nav-count { position: absolute; top: 6px; left: calc(50% + 4px); margin: 0; }
.side-nav a .nav-count { margin-left: auto; }

/* Filter chips on the grey back-office page. */
body.office nav.office-chips { margin: 0 0 8px; }

/* Orders: day headings, New cards in full, Seen ones as one line that opens. */
body.office h2.day-h { font-size: var(--t-lg); margin: 16px 0 8px; }
body.office li.order-card { list-style: none; }
body.office li.order-card.new { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.order-card .order-top b { font-size: 1.0625rem; }
.pill.new-pill { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; padding: 4px 12px; }
.pill.seen-pill { background: var(--ground-3); color: var(--ink-2); border-color: transparent; font-weight: 600; padding: 4px 12px; }
.order-card .order-total b { font-size: 1.0625rem; }
details.order-more > summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-height: 44px; }
details.order-more > summary::-webkit-details-marker, details.order-rest > summary::-webkit-details-marker { display: none; }
details.order-more[open] > summary { padding-bottom: 4px; }
details.order-rest > summary { list-style: none; cursor: pointer; color: var(--accent); font-weight: 600; min-height: 36px; display: flex; align-items: center; }
details.order-rest .order-lines { border-top: 0; margin: 0; padding-top: 0; }
body.office .empty-card { background: var(--ground); border: 1px dashed var(--line-2); border-radius: var(--r-lg); padding: 24px 16px; text-align: center; margin: 12px 0 12px; }
body.office .empty-card p { margin: 8px 0 12px; }
body.office a.quiet-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* Logo tile: tap to change; the logo saves by itself. */
body.office .panel form.logo-form > label.logo-tile, .logo-tile { display: flex; flex-direction: row; width: 100%; margin: 0; font-weight: 400; color: var(--ink); align-items: center; gap: 12px; min-height: 72px; padding: 12px 12px; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--ground); cursor: pointer; transition: transform 90ms ease-out, background-color 150ms; }
.logo-tile:active { transform: scale(0.98); }
.logo-now img, .logo-now .no-photo { width: 56px; height: 56px; border-radius: 10px; border: 1px solid var(--line); object-fit: contain; background: #fff;
  display: grid; place-items: center; font-size: 1.6rem; color: var(--accent); }
.logo-words { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.logo-words b { color: var(--accent); font-size: var(--t-base); }
.logo-words .muted { font-size: var(--t-xs); }
form.logo-form { margin: 0; }
form.logo-form [data-photo-status]:not(:empty) { display: block; margin-top: 8px; }
form.logo-form [data-autosave-fallback] { margin-top: 12px; }
form.logo-remove { margin: 8px 0 0; }

/* Sticky Save bar: above the bottom bar on a phone, at the foot of the screen on a laptop; only once something changed. */
body.office .save-bar { position: sticky; bottom: calc(48px + 16px + env(safe-area-inset-bottom)); z-index: 7; display: flex; align-items: center; gap: 12px;
  margin: 12px 0 0; padding: 12px; border-radius: 16px; background: color-mix(in srgb, var(--ground) 96%, transparent); backdrop-filter: blur(8px);
  border: 1px solid var(--line); box-shadow: 0 6px 20px rgb(16 24 40 / 14%); }
body.office .save-bar .save-bar-words { flex: 1; font-weight: 600; color: var(--ink-2); padding-left: 8px; }
body.office .save-bar.waiting { display: none; }
body.office .save-bar.shown { animation: bar-up 220ms ease-out both; }
@keyframes bar-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (max-width: 639px) {
  body.office .save-bar .save-bar-words { display: none; }
  body.office .save-bar button.primary-inline { width: 100%; }
}
@media (min-width: 1024px) { body.office .save-bar { bottom: 16px; max-width: 44rem; } }

/* My pages: list rows like More, a big "+ Add a page", one editor card. */
ul.page-list a.page-row.on { background: var(--accent-bg); }
html[data-theme="dark"] ul.page-list a.page-row.on { background: var(--ground-3); }
body.office a.add-page { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.editor-head h2 { margin: 0; overflow-wrap: anywhere; }
body.office .editor-card form { margin-top: 12px; }
.tool-row { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 12px; scrollbar-width: none; }
body.office button.tool { flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--ground); color: var(--ink); font-weight: 600; cursor: pointer; }
body.office label.switch-row, body.office .panel form.own-form > label.switch-row { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px;
  margin: 4px 0 12px; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: var(--t-base); font-weight: 600; color: var(--ink); cursor: pointer; }
input.switch { appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 32px; margin: 0; border-radius: 999px; background: var(--line-2);
  position: relative; cursor: pointer; transition: background-color 180ms; }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 25%); transition: transform 180ms ease-out; }
input.switch:checked { background: oklch(0.55 0.14 150); }
input.switch:checked::after { transform: translateX(20px); }
input.switch:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 12px; }
.page-actions .primary-inline { order: -1; }
@media (max-width: 639px) { .page-actions > * { width: 100%; } body.office .page-actions .quiet-btn { min-height: 48px; } }
body.office .danger-text { color: var(--signal); }
form.page-remove { margin: 4px 0 0; }

/* Report a problem: three big tiles; a tile turns blue once it holds something. */
.report-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 12px; }
body.office .report-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 96px; padding: 12px 8px;
  border: 2px solid var(--line-2); border-radius: 16px; background: var(--ground); color: var(--ink); font-weight: 700; font-size: var(--t-base);
  text-align: center; cursor: pointer; transition: transform 90ms ease-out, background-color 150ms, border-color 150ms; }
body.office .report-tile::before { font-size: 1.6rem; line-height: 1; }
body.office .report-tile.tile-write::before { content: "✎"; }
body.office .report-tile.tile-shot::before { content: "▣"; color: var(--accent); }
body.office .report-tile.tile-voice::before { content: "●"; color: var(--signal); }
body.office .report-tile:active { transform: scale(0.98); }
body.office .report-tile.ready { border-color: var(--accent); background: var(--accent-bg); }
html[data-theme="dark"] body.office .report-tile.ready { background: var(--ground-3); }
body.office .report-tile:disabled { font-size: var(--t-xs); font-weight: 600; color: var(--ink-2); cursor: default; }
body.office label.pick-voice, body.office .panel form[data-report-form] > label.pick-voice { display: block; font-weight: 600; margin: 0 0 12px; font-size: var(--t-sm); color: var(--accent); cursor: pointer; min-height: 44px; line-height: 44px; }
body.office form[data-report-form] .note:not(:empty) { display: block; margin: 0 0 8px; }

/* Help: the index as chips that wrap. */
body.office nav.help-index { flex-wrap: wrap; overflow: visible; }

@media (prefers-reduced-motion: reduce) {
  body.office .save-bar.shown { animation: none; }
  .logo-tile, body.office .report-tile, input.switch, input.switch::after { transition: none; }
  .logo-tile:active, body.office .report-tile:active { transform: none; }
}
.add-page-row { margin: 0 0 12px; }

/* Audit 13-25 (part C). Look: colours, font, layout and buttons as full-width boxes in a grid. */
body.office .colour-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 0 0 12px; }
body.office .colour-row > label:not(.check) { display: flex; flex-direction: column; gap: 8px; font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
body.office .colour-row select { width: 100%; min-height: 48px; border-radius: 12px; font-size: 16px; background: var(--ground); color: var(--ink); }
body.office .colour-row input[type=color] { width: 100%; height: 48px; padding: 4px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--ground); cursor: pointer; }
/* Shop details: the private payment card stands apart from "Save my shop". */
body.office form[data-details-form] + .panel { margin-top: 24px; }
/* My data: one row per spreadsheet with a download mark. */
ul.download-list a.more-row .chev { color: var(--accent); font-weight: 700; font-size: var(--t-sm); }
/* Help: each part folds; a search box keeps only the parts that match. */
body.office .help-search { width: 100%; min-height: 48px; border-radius: 12px; font-size: 16px; padding: 0 12px; border: 1px solid var(--line-2); background: var(--ground); color: var(--ink); margin: 0 0 12px; }
details.help-part { padding: 0; }
details.help-part > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 8px 16px; }
details.help-part > summary::-webkit-details-marker { display: none; }
details.help-part > summary h2 { margin: 0; }
details.help-part > summary::after { content: "+"; font-size: 1.4rem; color: var(--accent); }
details.help-part[open] > summary::after { content: "−"; }
details.help-part > .help-body { padding: 0 16px 8px; animation: office-in 160ms ease-out both; }
@media (prefers-reduced-motion: reduce) { details.help-part > .help-body { animation: none; } }

/* Row 8da9: a refused save: the reason in red at the top and under the box it is about; the box itself outlined red. */
.flash.refused, body.office .flash.refused { background: #fdecea; color: #8a1c13; border-left: 4px solid #c62828; }
html[data-theme="dark"] body.office .flash.refused { background: #3a1512; color: #ffd7d2; }
.field-error { display: block; color: #c62828; font-weight: 600; margin-top: 4px; }
html[data-theme="dark"] .field-error { color: #ff8a80; }
body.office [aria-invalid="true"] { border: 2px solid #c62828 !important; }

/* Own products: before / after of the background cleaning (row f323). */
.office .cutout[hidden] { display: none; }
.office .old-photo-cleanup { min-width: 0; overflow-wrap: anywhere; }
.office .cutout { margin: 8px 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); }
.office .cutout-pair { display: flex; gap: 12px; flex-wrap: wrap; }
.office .cutout-pair figure { margin: 0; text-align: center; flex: 1 1 120px; max-width: 160px; }
.office .cutout-pair img { width: 100%; height: auto; aspect-ratio: 1;  object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.office .cutout-use { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.office .cutout-use button { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; color: inherit; cursor: pointer; }
.office .cutout-use button[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); font-weight: 600; }

/* ------------------------------------------------------------------------------------------------------------------
   Row 73d0: the Look screen. One list of looks as small pictures of the dealer's own shop; the big phone picture beside
   (laptop) or above (phone); big swatches for his colour. The small pictures are the same .shop-preview, drawn at 45%. */
.look-stage { display: grid; gap: 12px; margin: 12px 0; }
.look-live { display: flex; flex-direction: column; align-items: center; }
.look-live .shop-preview { margin: 8px 0; }
.look-now { margin: 0; font-size: var(--t-base); }
.look-pick h2 { margin: 8px 0 8px; }
.look-cards { display: grid; grid-template-columns: repeat(auto-fill, 160px); justify-content: space-between; gap: 12px 8px; }
body.office .look-card { display: flex; flex-direction: column; gap: 8px; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; width: 160px; position: relative; }
.lc-frame { display: block; width: 160px; height: 190px; overflow: hidden; border-radius: 14px; border: 2px solid var(--line-2); position: relative; background: var(--ground); transition: border-color .15s, box-shadow .15s, transform .1s; }
.look-card:active .lc-frame { transform: scale(.97); }
.look-card:has(input:checked) .lc-frame { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent); }
.look-card:has(input:focus-visible) .lc-frame { outline: 3px solid var(--ink); outline-offset: 2px; }
.lc-mini { position: absolute; left: 0; top: 0; width: 356px; margin: 0; border: 0; border-radius: 0; transform: scale(.45); transform-origin: 0 0; pointer-events: none; }
.lc-name { display: flex; align-items: center; gap: 8px; min-height: 28px; font-size: var(--t-base); }
.look-colour .swatches { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 8px 0 12px; }
.swatch { width: 44px; height: 44px; min-height: 44px; border-radius: 50%; border: 3px solid var(--ground); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; padding: 0; }
.swatch:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.look-colour .picker { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.look-colour .picker input[type=color] { width: 56px; height: 44px; padding: 0; border: 1px solid var(--line-2); border-radius: 10px; }
.look-more summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
@media (min-width: 900px) {
  .look-stage { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
  .look-live { order: 2; position: sticky; top: 12px; }
  .look-pick { order: 1; }
}
@media (prefers-reduced-motion: reduce) { .lc-frame { transition: none; } }

/* Picked design B: compact comparison rows and clear controls, on the existing office theme variables. */
body.office header.office-top .wrap { max-width: none; padding: 0 16px; }
body.office header.office-top .top-row { padding-top: 12px; padding-bottom: 12px; }
body.office .bottom-bar a, body.office .side-nav a, body.office .seg-b { min-height: 48px; }
body.office .bottom-bar { padding-top: 0; padding-bottom: env(safe-area-inset-bottom); }
body.office .office-main { padding: 16px 16px 32px; }
body.office .panel { border-radius: 8px; }
body.office label:not(.check):not(.look-card):not(.switch-row) { font-size: 14px; }
body.office .price-label { display: flex; flex-direction: column; gap: 4px; font-weight: 400; color: var(--ink-2); }
body.office .pcell { width: 108px; }
body.office .pcell .pnote-default { display: none; }
body.office .pcell input { width: 108px; height: 44px; min-height: 44px; padding: 0 8px; border-radius: 8px; font-size: 16px; }
body.office .prow { gap: 12px; padding: 12px; }
body.office .pname { font-size: 14px; display: block; overflow: visible; }
body.office .pmeta { margin-top: 4px; }
body.office .price-columns, body.office .price-compare { display: none; }
body.office #prices-app { max-width: none; }
body.office .look-stage { display: grid; gap: 24px; margin: 12px 0; }
body.office .look-pick, body.office .look-live { min-width: 0; order: initial; }
body.office .look-live { position: static; display: block; }
body.office .look-colour { margin-top: 24px; }
body.office .native-previews { width: 100%; }
body.office .device-preview { margin-top: 24px; }
body.office .device-preview h2 { font-size: 16px; margin: 0 0 8px; }
body.office .device-preview .note { margin: 0 0 8px; }
.native-shop { display: block; width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.native-canvas { display: block; container: shop-render / inline-size; transform-origin: top left; pointer-events: none; }
body.office .lc-mini { width: 390px; max-width: none; transform: scale(.4); }
body.office .lc-mini .native-shop { border: 0; border-radius: 0; }
body.office .look-cards { justify-content: start; gap: 12px; grid-template-columns: repeat(auto-fit, 160px); }
@media (min-width: 900px) {
  body.office .look-stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  body.office .look-live { position: sticky; top: 16px; }
}
@media (min-width: 1100px) {
  body.office .price-list .prow, body.office .price-columns { display: grid; grid-template-columns: minmax(0, 1fr) 112px 144px 108px; gap: 16px; align-items: center; }
  body.office .price-list .prow { min-height: 64px; padding: 8px 16px; }
  body.office .price-columns { padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 14px; font-weight: 600; }
  body.office .price-columns > :not(:first-child), body.office .price-compare { text-align: right; }
  body.office .price-compare { display: block; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
  body.office .prow .pmeta { display: none; }
  body.office .prow .pcell .price-label { font-size: 0; gap: 0; }
  body.office .price-label input { font-size: 16px; }
  body.office .pcell .pnote { min-height: 0; }
  body.office .pcell .pnote:empty, body.office .pcell .pnote-default { display: none; }
}
